chore: rebuild release package

This commit is contained in:
shiyue
2026-07-20 15:44:07 +08:00
parent a038485ab5
commit 9adc7c99f1
11 changed files with 662 additions and 9 deletions

View File

@@ -6488,6 +6488,80 @@
return tool?.name || 'Tool';
}
function normalizePlanProgress(value) {
if (!value || typeof value !== 'object') return null;
const source = value.progress && typeof value.progress === 'object' ? value.progress : value;
const total = Number(source.total);
const completed = Number(source.completed);
if (!Number.isFinite(total) || !Number.isFinite(completed) || total <= 0) return null;
const normalizedTotal = Math.max(0, Math.floor(total));
const normalizedCompleted = Math.min(normalizedTotal, Math.max(0, Math.floor(completed)));
return { completed: normalizedCompleted, total: normalizedTotal };
}
function planProgressFromPayload(payload) {
let value = payload;
if (typeof value === 'string') {
try {
value = JSON.parse(value);
} catch {
return null;
}
}
const explicitProgress = normalizePlanProgress(value);
if (explicitProgress) return explicitProgress;
if (!Array.isArray(value?.items) || value.items.length === 0) return null;
return {
completed: value.items.filter((item) => item?.completed).length,
total: value.items.length,
};
}
function resolveToolPlanProgress(tool) {
if (toolKind(tool) !== 'todo_list') return null;
const candidates = [tool?.meta?.progress, tool?.input, tool?.result];
for (const candidate of candidates) {
const progress = planProgressFromPayload(candidate);
if (progress) return progress;
}
return null;
}
function createPlanProgressElement(tool) {
const progress = resolveToolPlanProgress(tool);
if (!progress) return null;
const meter = document.createElement('span');
meter.className = 'plan-progress';
meter.setAttribute('role', 'img');
const progressLabel = `计划进度:已完成 ${progress.completed} 项,共 ${progress.total}`;
meter.setAttribute('aria-label', progressLabel);
meter.title = progressLabel;
const dots = document.createElement('span');
dots.className = 'plan-progress-dots';
dots.setAttribute('aria-hidden', 'true');
const visibleDotCount = Math.min(progress.total, 12);
const completedDotCount = progress.total <= visibleDotCount
? progress.completed
: Math.round((progress.completed / progress.total) * visibleDotCount);
for (let index = 0; index < visibleDotCount; index += 1) {
const dot = document.createElement('span');
dot.className = `plan-progress-dot ${index < completedDotCount ? 'is-complete' : 'is-remaining'}`;
dots.appendChild(dot);
}
meter.appendChild(dots);
if (progress.total > visibleDotCount) {
const count = document.createElement('span');
count.className = 'plan-progress-count';
count.setAttribute('aria-hidden', 'true');
count.textContent = `${progress.completed}/${progress.total}`;
meter.appendChild(count);
}
return meter;
}
function toolSubtitle(tool) {
if (toolKind(tool) === 'file_change') {
return '';
@@ -6554,7 +6628,12 @@
main.className = 'tool-call-summary-main';
const label = document.createElement('span');
label.className = 'tool-call-label';
label.textContent = toolTitle(tool);
const labelText = document.createElement('span');
labelText.className = 'tool-call-label-text';
labelText.textContent = toolTitle(tool);
label.appendChild(labelText);
const planProgress = createPlanProgressElement(tool);
if (planProgress) label.appendChild(planProgress);
main.appendChild(label);
const subtitleText = toolSubtitle(tool);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

View File

@@ -0,0 +1,85 @@
{
"source": "wasteland-icon-sheet.webp",
"source_path": ".trellis/tasks/07-17-gilded-wasteland-theme/references/source-assets/wasteland-icon-sheet.webp",
"source_sha256": "482edda2dbc8932b3c209686fab89f50fa8600242b16379b39fa6657e722410e",
"source_size": [
1672,
941
],
"assets": [
{
"name": "complete",
"semantic": "已完成",
"source": "wasteland-icon-sheet.webp",
"source_sha256": "482edda2dbc8932b3c209686fab89f50fa8600242b16379b39fa6657e722410e",
"source_card": "R2C3 STATUS (ONLINE)",
"source_variant": "16px",
"slot_box": [
596,
231,
60,
75
],
"detected_box": [
608,
255,
32,
33
],
"output": "icons/plan-progress/complete.png",
"size": [
20,
20
],
"alpha_bbox": [
2,
1,
17,
18
],
"alpha_center": [
9.885,
9.097
],
"sha256": "2f75c0dfc105e7fd50b1c90d3ca3b2439306afd50c2a0b5ebdeb674cd592516a",
"usage": "Plan List 已完成任务的绿色宝石"
},
{
"name": "remaining",
"semantic": "未完成",
"source": "wasteland-icon-sheet.webp",
"source_sha256": "482edda2dbc8932b3c209686fab89f50fa8600242b16379b39fa6657e722410e",
"source_card": "R2C4 LOADING",
"source_variant": "16px",
"slot_box": [
860,
231,
60,
75
],
"detected_box": [
870,
253,
34,
35
],
"output": "icons/plan-progress/remaining.png",
"size": [
20,
20
],
"alpha_bbox": [
2,
2,
17,
18
],
"alpha_center": [
9.268,
9.911
],
"sha256": "90decca2d4b8204032fa06c0bbde6e9f49afc11bf4fabe21b8307caf5769d672",
"usage": "Plan List 未完成任务的暗金分段环"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

View File

@@ -24,7 +24,7 @@
document.documentElement.dataset.dividerTime = dividerTime;
})();
</script>
<link rel="stylesheet" href="style.css?v=20260718-shared-locator-panel-2">
<link rel="stylesheet" href="style.css?v=20260720-plan-progress-icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css">
</head>
<body>
@@ -183,6 +183,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.1/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js"></script>
<script src="app.js?v=20260718-shared-locator-panel-2"></script>
<script src="app.js?v=20260720-plan-progress-icons"></script>
</body>
</html>

View File

@@ -19,6 +19,8 @@
--accent-hover: #a84530; /* 深朱 deep vermillion */
--accent-light: #f5ddd4; /* 薄朱 light vermillion */
--success: #5d8a54; /* 抹茶 matcha */
--plan-progress-complete: var(--success);
--plan-progress-remaining: var(--accent);
--danger: #c0553a;
--info: #5b7ea1; /* 縹色 blue-gray */
--note-accent: #5b7ea1;
@@ -3103,6 +3105,85 @@ html[data-divider-time='hide'] .msg-bubble .agent-message-divider span {
overflow: hidden;
text-overflow: ellipsis;
}
.tool-call-label-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.tool-call.codex-todo-list .tool-call-label {
display: flex;
align-items: center;
gap: 7px;
}
.plan-progress {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
gap: 5px;
vertical-align: middle;
}
.plan-progress-dots {
display: inline-flex;
align-items: center;
gap: 3px;
}
.plan-progress-dot {
display: block;
width: 14px;
height: 14px;
margin-left: 8px;
border-radius: 50%;
}
.plan-progress-dot.is-complete {
background: var(--plan-progress-complete);
}
.plan-progress-dot.is-remaining {
background: var(--plan-progress-remaining);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 28%, transparent);
transform-origin: center;
animation: plan-progress-breathe 1.8s ease-in-out infinite;
}
@keyframes plan-progress-breathe {
0%, 100% {
opacity: 0.68;
transform: scale(0.9);
}
50% {
opacity: 1;
transform: scale(1);
}
}
@media (prefers-reduced-motion: reduce) {
.plan-progress-dot.is-remaining {
animation: none;
opacity: 1;
transform: none;
}
}
.plan-progress-count {
color: var(--text-muted);
font-size: 9px;
font-variant-numeric: tabular-nums;
line-height: 1;
}
@media (max-width: 560px) {
.tool-call.codex-todo-list .tool-call-label {
gap: 5px;
}
.plan-progress {
gap: 3px;
}
.plan-progress-dots {
gap: 2px;
}
.plan-progress-dot {
width: 5px;
height: 5px;
}
.plan-progress-count {
font-size: 8px;
}
}
.tool-call-subtitle {
display: block;
width: 100%;
@@ -8692,6 +8773,29 @@ html[data-theme='wasteland'] .tool-call summary::before {
background: url('assets/themes/wasteland/icons/ui/terminal.png') center / 20px 18px no-repeat;
}
html[data-theme='wasteland'] .plan-progress-dot {
flex: 0 0 20px;
width: 20px;
height: 20px;
margin-left: 6px;
border-radius: 0;
background-color: transparent;
background-position: center;
background-repeat: no-repeat;
background-size: 20px 20px;
box-shadow: none;
filter: drop-shadow(0 0 3px rgba(223, 180, 108, 0.28));
}
html[data-theme='wasteland'] .plan-progress-dot.is-complete {
background-image: url('assets/themes/wasteland/icons/plan-progress/complete.png');
}
html[data-theme='wasteland'] .plan-progress-dot.is-remaining {
background-image: url('assets/themes/wasteland/icons/plan-progress/remaining.png');
box-shadow: none;
}
html[data-theme='wasteland'] :is(
.tool-call-content,
.tool-call-content.reasoning,
@@ -8963,6 +9067,14 @@ html[data-theme='wasteland'] .mode-select {
height: 24px;
background-size: 24px 24px;
}
html[data-theme='wasteland'] .plan-progress-dot {
flex-basis: 16px;
width: 16px;
height: 16px;
margin-left: 3px;
background-size: 16px 16px;
}
}
/* 暗金荒野:暗场气泡用无黑底的亮度补偿磨砂,避免透明层视觉上仍像实心黑块。 */