feat: show loading stage name, count, and overall progress
Progress bar now fills to overall completion across all stages. Label shows e.g. "text model 1/3 23%" and stats panel shows "text model (1/3)". Label bumped to 8px full amber for readability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,10 +58,20 @@
|
|||||||
|
|
||||||
// Progress bar: model loading or prompt processing
|
// Progress bar: model loading or prompt processing
|
||||||
if (loading) {
|
if (loading) {
|
||||||
const pct = Math.round((loading.progress ?? 0) * 100);
|
const stageName = (loading.current ?? '').replace(/_/g, ' ');
|
||||||
progressFill.style.width = pct + '%';
|
const stageIdx = (loading.stages ?? []).indexOf(loading.current);
|
||||||
progressLabel.textContent = loading.current + ' ' + pct + '%';
|
const totalStages = (loading.stages ?? []).length;
|
||||||
svLoadStage.textContent = loading.current;
|
const stagePct = Math.round((loading.progress ?? 0) * 100);
|
||||||
|
const overallPct = totalStages > 0
|
||||||
|
? Math.round(((stageIdx + (loading.progress ?? 0)) / totalStages) * 100)
|
||||||
|
: stagePct;
|
||||||
|
progressFill.style.width = overallPct + '%';
|
||||||
|
progressLabel.textContent = stageName
|
||||||
|
+ (totalStages > 1 ? ' ' + (stageIdx + 1) + '/' + totalStages : '')
|
||||||
|
+ ' ' + stagePct + '%';
|
||||||
|
svLoadStage.textContent = totalStages > 1
|
||||||
|
? stageName + ' (' + (stageIdx + 1) + '/' + totalStages + ')'
|
||||||
|
: stageName;
|
||||||
} else if (state === 'processing_prompt' && metrics && metrics.prompt_progress != null) {
|
} else if (state === 'processing_prompt' && metrics && metrics.prompt_progress != null) {
|
||||||
const pct = Math.round(metrics.prompt_progress * 100);
|
const pct = Math.round(metrics.prompt_progress * 100);
|
||||||
progressFill.style.width = pct + '%';
|
progressFill.style.width = pct + '%';
|
||||||
|
|||||||
@@ -245,8 +245,8 @@ body.state-error #llama { animation: error-flash 1s ease-in-out infinite; }
|
|||||||
transition: width 0.4s ease;
|
transition: width 0.4s ease;
|
||||||
}
|
}
|
||||||
#progress-label {
|
#progress-label {
|
||||||
font-size: 7px;
|
font-size: 8px;
|
||||||
color: var(--amber-dim);
|
color: var(--amber);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Resize handle ───────────────────────────────────────────────────────── */
|
/* ── Resize handle ───────────────────────────────────────────────────────── */
|
||||||
|
|||||||
Reference in New Issue
Block a user