Spaces:
Sleeping
Sleeping
Commit History
-
Restore expired sessions via summary-based catch-up (#52)
Aksel Joonas ReediUnverified signatureWhen the backend loses a session (typically: HF Space restarted), the chat now shows a small inline banner instead of silently erroring: Where were we? Let me skim the conversation so far and pick up right where we left off — or we can start something new. [ Catch me up ] [ Start fresh ] Flow, in one pass: * Frontend stashes the raw backend messages in localStorage on every mount-hydrate and turn_complete. When the backend 404s for the session id, the SSE transport and the mount effect both fire onSessionDead → the session is flagged `expired` in sessionStore; the sidebar marks it "needs a catch-up". * Catch me up → POST /api/session/restore-summary with the cached messages. Backend creates a fresh session, runs the existing summarizer (factored into summarize_messages() and shared with in-session compaction) with a restore-specific prompt that preserves the tool-call trail, and seeds the new session with that summary wrapped in a [SYS…962191f -
Fix parallel-research display: per-call stats in CLI and web UI (#49)
Aksel Joonas Reedi +1: lee101Unverified signatureWhen multiple research sub-agents ran concurrently, the CLI collapsed them into a single flickering slot and every web-UI tool card showed the aggregate across all agents — so 3 parallel calls looked like 1. CLI (agent/utils/terminal_display.py): - Replace the global SubAgentDisplay singleton with SubAgentDisplayManager that tracks each agent by agent_id and renders one block per agent with independent (tool count · tokens · elapsed). - 4 rolling tool-call lines per agent (was 2). - When 2+ agents are live, switch to a compact one-line-per-agent layout (label + stats + most-recent tool). Detailed 4-line rolling view only when a single agent is active. Keeps the live region small enough to fit on one terminal page so cursor-up/erase doesn't drift when content would otherwise scroll into scrollback. - Clip every live-region line to terminal width (ANSI-aware) so a wrapped line can't corrupt the cursor-up math on narrow terminals. - On completion, erase the live block and f…5ab7c4e
-
4 steps shown
fdc5e27
-
Persist research subtool steps across page refresh
Save research steps and stats to localStorage on every update, restore atomically with isProcessing on mount so the rolling display survives page refresh during active research.ccfb504 -
Fix message disappearing and duplicate rendering bugs (#10)
- Fix message disappearing and duplicate rendering bugs (d95f6ccfe4ac3073e3064070e9b5e7097d435d35)0b311bb -
Fix tool errors not persisting (#3)
- Bug fix + fixed a couple rendering issues (dbd4801af40df211f75b20a0ab94d3415640d08d) Co-authored-by: Elisa Klunder <elisaklunder@users.noreply.huggingface.co>4b24bd9
-
feat: render cancelled tool state in UI after user interrupt
Send tool_state_change(cancelled) events for in-flight tools so the frontend can flip spinners to a muted "cancelled" state. Keep SSE stream open (don't call chat.stop()) so backend events arrive. Show "What should the agent do instead?" placeholder after cancel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>887da19
-
feat: SSE keepalive, reconnection, and is_processing flag
Prevents SSE streams from being killed by reverse proxies during long operations and lets the frontend recover gracefully after sleep/disconnect. Backend: - SSE keepalive pings every 15s via `: keepalive` comments - New GET /api/events/{session_id} subscribe-only endpoint for reconnection - is_processing flag on AgentSession, exposed in session info API Frontend: - reconnectToStream() re-attaches to a running session via /api/events - Visibility change re-hydrates ALL sessions from backend on wake - Background sessions also re-sync (removed isActive guard on listener) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d7f2a7c
-
fix: properly close SDK message on error, show tool errorText
b22c5f3 -
replace websocket transport with SSE
564aab6
-
fix: buffer websocket events during disconnects and replay on reconnect
ca13fee
-
fix: merge consecutive assistant messages on page refresh
The live streaming transport groups all text and tool parts into one assistant UIMessage per turn (single start/finish pair). The message converter was creating separate UIMessages for each backend assistant message, splitting turns into multiple bubbles after refresh.02e4cdf
-
fix: show activity status for approval-flow tools and revert chip override
- Call onToolRunning on tool_state_change with state 'running' so the activity bar updates for approval-flow tools (hf_jobs, sandbox_create) - Revert description override in ToolCallGroup status chipd211359 -
feat: resolve sandbox file paths and show tool description in status
- Extract resolve_sandbox_script utility in sandbox_tool.py to detect file paths and read content from sandbox via cat - Resolve script paths before sending approval_required event so the frontend receives actual file content for display and editing - Show tool description arg in status chip and activity bar instead of generic "running" / "Running bash" textae24efc -
fix: reconnect WS on session switch instead of deleting dead sessions
838cd50 -
feat: per-session WebSocket architecture for parallel chat sessions
Each session now owns its own useAgentChat + WebSocket transport instead of sharing a single instance. Background sessions process all events (including approval_required) continuously, fixing the bug where approvals from non-active sessions were silently dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>27da720
-
feat: cooperative cancellation, session persistence, background generation
7d17616
-
feat: merge HF Space improvements
79b2fcc