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 -
Scope model selection per session instead of globally
Sessions now clone the config on creation, so switching model in one tab only affects that tab. SessionInfo carries a `model` field the selector reads on session change; writes go to a new POST /api/session/{id}/model endpoint. The global /api/config/model route still controls the default for new sessions. Unblocks running Claude in one chat and GLM 5.1 in another concurrently.bf564b6 -
Drop 'Via' prefix from provider subtitles
f0db8ab -
Show default provider under each HF-routed model in selector
Matches the 'Via Fireworks / Via Novita' convention the selector already had before the bare-id switch. Providers taken from the router's current :fastest ordering (live, tool-capable): Novita for MiniMax M2.7 and Kimi K2.6, Together for GLM 5.1.4c14bc5 -
Use model maker as subtitle in selector, not routing mechanic
'HF auto-routed' read as a plumbing detail. Matching the Claude row's 'Anthropic' convention, show who built the model — MiniMax, Moonshot AI, Z.ai — which is what users actually recognize.84d6f33 -
Route HF inference through /v1 auto-router + add reasoning_effort knob
Users paste bare HF model ids (MiniMaxAI/MiniMax-M2.7, moonshotai/Kimi-K2.6) with an optional :fastest|cheapest|preferred|<provider> suffix; the router picks a provider and handles failover. /model does a live preflight against /v1/models and prints providers, pricing, context, tool support — warn-and- allow for unknowns with fuzzy suggestions. Friendly messages replace LiteLLM's raw traceback for model/provider mismatches, and the noisy 'Give Feedback' banner is suppressed. Adds a reasoning_effort config + /effort command (default high). OpenAI and Anthropic get the top-level param natively; HF router gets it via extra_body with minimal->low normalization for models like MiniMax M2 that require reasoning. Frontend + backend model selectors updated to the bare-id format.0a9e96d
-
Fix stuck 'Waiting for approval' spinner and improve table rendering
Clear waiting-approval activity status immediately when user approves, instead of waiting for the backend's tool_state_change event over SSE. Improve markdown table styles: horizontal overflow scroll, header background, better padding, and alternating row striping.70d2074
-
Fix build: remove unused isRunning variable
d3076e4
-
Show fun running messages for all tools including research
10a7aa2 -
Fix missing detail in research step labels for truncated args
Add truncated JSON value extraction fallback so paper search queries that get cut at 80 chars still show detail text. Add missing operation labels: citation_graph, snippet_search, recommend.424559b -
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 -
Add Semantic Scholar integration: citation graph, filtered search, snippet search, recommendations
Extends hf_papers with S2 backend: - citation_graph: references + citations with influence flags and intents - Smart search routing: date/category/citation filters via S2 bulk search - snippet_search: semantic full-text passage search across 12M+ papers - recommend: single/multi-paper recommendations with pos/neg examples - paper_details enriched with citation count, TL;DR, fields of study - Rate-limited S2 client with 2 retries on 429/5xx - Research prompt: paper analysis checklist, new tool guidance - Frontend shimmer labels for new operationsd81613f -
Show 4 rolling subtool steps in research display
d2636b9 -
Latest ui fixes (#11)
- Latest ui fixes (d9566205a4e89e9ebb3b7e498c11f4af642106cb)219e6a7 -
Show fun placeholder instead of raw args for running tools
When clicking a tool that's still executing, the output panel was showing the tool's input arguments as JSON. Now shows a random playful message while the tool runs.f856047 -
Add message edit and regenerate from any point in conversation
Backend: add truncate_to_user_message() on ContextManager, POST /api/truncate/{session_id} endpoint, and session_manager.truncate() helper to slice conversation history to before a given user message. Frontend: add editAndRegenerate callback in useAgentChat that truncates backend + frontend messages then resubmits via existing chat flow. UserMessage gains an inline edit mode with pencil icon on hover, TextField for editing, Enter/Escape to confirm/cancel.0611031 -
Redesign research subagent display with live stats and rolling steps
- Add researchStats (toolCount, tokenCount, elapsed) to session state - Parse tokens:/tools: log events into stats instead of step list - Show live stats in chip (running · N tools · Xk tokens · Ys) - Rolling 2-line window of sub-tool calls, hidden on completion - Format step labels with specifics (dataset name, paper query, etc.) - Handle truncated JSON args from backend via regex fallback - Fix stale tool spinners on page reload (coerce to completed) - Clean activity status bar labels for research tool logs901a405 -
Show cancelled prompt in shimmer status bar instead of chat input placeholder
3b6a2ca -
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
-
fix: infinite re-render loop from Zustand selector returning new []
The researchSteps selector created a new empty array on every call via `?? []`, which fails Object.is equality and triggers a re-render loop. Use a stable EMPTY_STEPS constant and return undefined from the selector to let the ?? fallback use the stable reference.1867e5e -
feat: beautiful research sub-agent UI with inline progress steps
- ToolCallGroup: renders research sub-steps inline below the tool row with contextual icons (📂 finding examples, 📄 reading file, 📚 docs) and a spinner on the active step - ActivityStatusBar: shows current research step in the shimmer bar ("Exploring docs(trl)..." instead of generic "Running research...") - Store: tracks researchSteps per-session, cleared on each new research call - useAgentChat: routes research tool_log events to both the step list and activity statusfff300b
-
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: CLI local mode, slash commands, interrupt support; remove lmnr; frontend fixes
CLI: - Add local tools (bash/read/write/edit) via local_tools.py for CLI mode - Add ToolRouter local_mode to use local tools instead of sandbox - Add slash commands: /help, /undo, /compact, /model, /yolo, /status - Add Ctrl+C interrupt support (single=cancel, double=exit) - Add HF token auto-loading from env/huggingface-cli - Add session_holder for interrupt/model/status access - Add Session.update_model() method Cleanup: - Remove lmnr dependency and all observe/Laminar references - Delete unused logo PNGs Frontend: - Show hardware pricing in tool approval UI - Add sandbox explanation text - Revert bash streaming to panel (caused issues) - Fix setPanelOutput to not force panel view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>82b0c13
-
feat: improve bash tool status labels in activity bar
Add bash to TOOL_LABELS with a default label, and append a patience hint when the bash description mentions "install". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5ddd727 -
fix: reset approval UI state when new approval round arrives
After submitting a rejection with feedback, isSubmitting was never reset on success. When the agent made a second tool call requiring approval, the InlineApproval component was blocked by the stale isSubmitting=true. Track submitted tool IDs and reset submission state when new (unseen) pending tools arrive in the same ToolCallGroup instance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f8e758f
-
fix: properly close SDK message on error, show tool errorText
b22c5f3 -
Revert "fix: show errorText for failed tools, bump eval max_iterations to 300"
This reverts commit b2846f673c874945d2b55aaaf53287a2f8bd0b2f.f765eb4 -
fix: show errorText for failed tools, bump eval max_iterations to 300
b2846f6 -
stream sandbox creation logs to tool output, fix hf_jobs final status race
9d1a532
-
sync: org onboarding, model updates, sandbox cleanup, prompt fixes
5af3ab5 -
feat: input/output toggle in CodePanel, tool error handling
07fe978
-
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: approval UI not updating after approve click
7b34ae7
-
feat: implement cooperative agent cancellation with cancel button
ecbfd3c
-
fix: cast unknown to avoid TS2769 in sandbox approval UI
1384bcb -
feat: require sandbox_create approval before sandbox operations
642f202
-
feat: merge HF Space improvements
79b2fcc
-
frontend update
463e470 -
Improve job approval UX with tabs, job URL, and message ordering
- Add tabbed panel for switching between Script and Logs views - Show specific job URL from tool output (not generic jobs page link) - Fix message ordering so final assistant response appears below approval box - Persist logs in approval messages so users can access previous job logs - Add View Script/View Logs buttons on completed approval cards - Show job status and failure indicators in approval flow - Panel tabs only clear on new job, not during approval continuation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>ac3d272
-
making docker run build work
73b1ed7
-
improved tool calling, push to hub, etc.
Henri Bonamy72af187 -
logs have a button to see, improved rejection/approved flow, trying to handle tqdm
Henri Bonamy35dc01a
-
improved design
Henri Bonamyc1f951a
-
added code panel, tool approval, tool calls logging
Henri Bonamy3ce798d
-
Add web frontend infrastructure for HF Agent
- Backend: FastAPI server with WebSocket support - Session manager for multi-session handling - Agent API routes (create, submit, approve, interrupt, undo, compact) - HF OAuth authentication routes - WebSocket connection manager for real-time events - Frontend: React + Vite + MUI + TypeScript - Zustand stores for agent state and session management - Chat UI with markdown rendering - Tool approval modal for batch approvals - Session sidebar for multi-session support - WebSocket hook with auto-reconnection - Docker: Multi-stage build with uv for Python deps - Updated pyproject.toml with web backend dependencies - Added HF Space metadata to README.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>67b16c6