an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
fix(gauge): zero context gauge instantly on /clear
Chaitanya Giri95930dbbf043
diff --git a/src/renderer/src/hooks/useHive.ts b/src/renderer/src/hooks/useHive.tsindex 88d2e45d..31db41ec 100644--- a/src/renderer/src/hooks/useHive.ts+++ b/src/renderer/src/hooks/useHive.ts@@ -448,6 +448,12 @@ export function useHive(config: HarnessConfig | null): void {lastFlush.current[target.id] = now;// Remove first so a burst of store updates can't double-send the same one.removeQueuedMessage(srcId, next.id);+ // Zero the gauge instantly on /clear — the new session's context isn't+ // known until statusLine fires after the first post-clear response, so+ // leaving it at the old value shows a stale-full bar during that window.+ if (next.text.trimStart().startsWith('/clear')) {+ useStore.getState().updateAgent(target.id, { contextTokens: 0, contextLimit: undefined, progress: 0 });+ }submitToPty(target.ptyId, wrap ? wrap(next.text) : next.text).catch(() => { /* pty may have died */ });return true;};