Spaces:
Sleeping
Sleeping
Commit History
-
Use user token for LLM health checks
6a1ff53 -
Remove ml-agent-explorers org gate from Space copy
a5f4867 -
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
-
Rename CLI entry and Space assets from ml-agent to ml-intern
ae4a534
-
Rename product to ML Intern in frontend
Update page title, app header, welcome screen title, and the iframe 'Open' step labels from ML Agent to ML Intern.658b046 -
Rebrand frontend to ML Agent
Replace HF Agent branding and Hugging Face logo with ML Agent and the smolagents icon across the welcome screen, app header, favicon, and page title. Refresh the welcome screen tagline.a67b60f
-
4 steps shown
fdc5e27
-
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 -
Better deletion flow (#12)
- Better deletion flow (7390833c6455aef38a9c9abd7f36d754efbfc066)210a259 -
Show 4 rolling subtool steps in research display
d2636b9 -
Latest ui fixes (#11)
- Latest ui fixes (d9566205a4e89e9ebb3b7e498c11f4af642106cb)219e6a7 -
Add delete confirmation dialog and sidebar spacing tweaks
Show a confirmation dialog before deleting a conversation. Add spacing between sidebar chat items and below the section header. Show fun placeholder in output panel for running tools.bdefe29 -
Fix stale approval dialog reappearing after page refresh
The message persist effect only triggered on message count changes, so approval state updates (which modify tool state within existing messages) were never saved to localStorage. On refresh, stale approval-requested state was restored. Now saves messages immediately after approval submission.9b1773a -
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 -
Fix message disappearing and duplicate rendering bugs (#10)
- Fix message disappearing and duplicate rendering bugs (d95f6ccfe4ac3073e3064070e9b5e7097d435d35)0b311bb -
Restore localStorage org detection for iframe onboarding
Iframe users have no auth cookie, so backend polling can't check org membership. Restores visibilitychange + localStorage tracking for the iframe path while keeping backend polling for direct access.85274e0 -
Replace multi-screen onboarding with single checklist view
Replaces the 4 separate onboarding screens with a unified checklist showing all steps (sign in, join org, start session) with live status. Adds org membership polling via new GET /auth/org-membership endpoint that reuses existing check_org_membership(). Join link opens as popup and auto-closes when membership is detected.6d7f53f -
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 -
Fix session title only updating on the very first user message
2e60856 -
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
-
fix: use backend is_processing as source of truth on refresh
Replace message-based state inference with the backend's is_processing flag. Message inference is fundamentally broken — completed tool results make tools look "done" even when the agent is mid-turn. Also add resume: true to useChat so the SDK calls reconnectToStream() on mount, re-subscribing to live events if the agent is still running. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e229826 -
fix: auto-retry on truncated tool calls + correct activity status on refresh
Agent loop: when finish_reason=length drops tool calls, inject a system hint telling the LLM to use bash heredoc or smaller edits instead, then continue the loop. Also set max_tokens=16384 and emit an error event so the truncation is visible in the UI. Frontend: extract actual tool name from in-progress message parts on hydration instead of hardcoding 'running', which rendered as "Running running" in the activity bar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8e63f40 -
fix: live event streaming after reconnection + LiteLLM timeout
Frontend: visibility change handler now re-hydrates messages, opens a live event stream via GET /api/events, and polls messages every 3s to keep the chat in sync. Terminal events trigger a final hydration and clean up both the stream and poll. Backend: add timeout=600 to litellm acompletion() call — long tool-use turns were being killed by the default timeout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>47d6895 -
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: disable chat input during processing after page refresh
After hydrating messages from the backend, scan the last assistant message for in-progress tools (input-available state) or pending approvals and set the correct isProcessing/activityStatus. Previously the store defaults (idle) would briefly enable the chat input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0e75fdd -
fix: per-session state management for smooth task switching
Background sessions now maintain their own state snapshots in agentStore so streaming, tool calls, and panel updates are not lost when switching tasks or backgrounding the browser tab. - Add sessionStates map + updateSession/switchActiveSession/syncSnapshot - Side-channel callbacks always update per-session state (no isActiveRef guard) - Global setters (setPanel, setPanelView, etc.) sync to active snapshot - Re-sync state on browser tab visibility change - Fix direct state mutation in switchActiveSession Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f56fa2e
-
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: clear global activity state when switching away from a session
When a session becomes inactive, reset isProcessing, activityStatus, and panel state so the next session doesn't inherit stale UI (e.g. shimmering banner from a background tool execution). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7554f29 -
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: wire sandbox bash streaming to frontend panel
- Accept 'bash' in onToolLog filter (was only 'hf_jobs'|'sandbox') - Initialize panel on tool_call for bash with command in script tab - Handle null panelData in setPanelOutput (create panel instead of dropping) - Auto-open right panel and switch to output view for streaming logs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6c9f1f6
-
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