mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-27 11:22:03 +00:00
Merge pull request #52208 from NousResearch/bb/desktop-update-steps
fix(desktop): stop the update overlay looking frozen while it works
This commit is contained in:
commit
d635a6d507
2 changed files with 8 additions and 2 deletions
|
|
@ -407,7 +407,11 @@ export function DesktopInstallOverlay({ enabled = true }: DesktopInstallOverlayP
|
|||
|
||||
const totalCount = stages.length
|
||||
const failed = Boolean(state.error)
|
||||
const progressPct = totalCount > 0 ? Math.round((completedCount / totalCount) * 100) : 0
|
||||
// Count the running stage as half-done so the bar advances *during* a long
|
||||
// stage instead of sitting frozen at the last completed step while its logs
|
||||
// stream (e.g. "0 of 2" pinned at 0% for the whole first stage).
|
||||
const progressUnits = completedCount + (!failed && currentStage ? 0.5 : 0)
|
||||
const progressPct = totalCount > 0 ? Math.round((progressUnits / totalCount) * 100) : 0
|
||||
const currentStartedAt = currentStage ? state.stages[currentStage]?.startedAt : null
|
||||
const currentElapsed = typeof currentStartedAt === 'number' ? formatElapsed(now - currentStartedAt) : ''
|
||||
|
||||
|
|
|
|||
|
|
@ -531,7 +531,9 @@ function ingestProgress(payload: DesktopUpdateProgress): void {
|
|||
applying: !terminal,
|
||||
stage: payload.stage,
|
||||
message: payload.message,
|
||||
percent: payload.percent,
|
||||
// Streamed log lines carry percent: null; keep the last milestone percent
|
||||
// (10/60/…) instead of resetting the bar to indeterminate on every line.
|
||||
percent: payload.percent ?? current.percent,
|
||||
error: payload.error,
|
||||
// 'manual' carries the command to run in its message field.
|
||||
command: payload.stage === 'manual' ? payload.message : current.command,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue