Spaces:
Sleeping
Sleeping
Commit History
-
fix: pendingText ReferenceError in useChat.ts - assistant_message handler was broken
Claw Web1f70f8f -
CRITICAL FIX: SendUserMessage no longer breaks agent loop + match original behavior
Claw WebROOT CAUSE #1 (CRITICAL - agent.ts): - SendUserMessage/Brief was BREAKING the agent loop (shouldBreakForAskUser=true) - Original claw-code does NOT break on SendUserMessage! - Model sends progress updates ('checking...', 'found vuln...') AND continues working - Our code was STOPPING the entire agent on every progress message - FIX: Remove shouldBreakForAskUser, emit 'assistant_message' SSE instead ROOT CAUSE #2 (agent.ts): - content: '' (empty string) when tool_calls present - Original uses content: null - Some API providers treat '' differently from null - FIX: Match original: content: result.content || null ROOT CAUSE #3 (agent.ts): - tool_choice forced to TodoWrite on first iteration when planMode active - Original ALWAYS uses tool_choice: 'auto' - Forcing TodoWrite may confuse the model - FIX: Always use 'auto' SYSTEM PROMPT FIXES (system-prompt.ts): - bash tool: added CORRECT/WRONG usage examples for Qwen3-Coder - SendUserMessage: updated description to say 'does NOT stop execu…5d6ab9e -
fix: smarter error classification + interleaved text/tool rendering
Claw WebFIX 1: Error classification (agent.ts) - Exit code 127 from bad bash syntax is now RETRYABLE, not permanent - Model gets: 'SYNTAX ERROR — fix your command and retry' - Truly permanent errors (ENOENT, EACCES) still marked permanent - 'not found' / 'command not found' only permanent for non-bash tools - Bash with unescaped URLs/special chars = syntax error, not fatal FIX 2: Interleaved content segments (useChat.ts + MessageBubble.tsx) - New ContentSegment type: { type: 'text' | 'tool', ... } - useChat tracks segments in arrival order as SSE events stream in - text_delta → appends to current text segment - tool_call_start → creates new tool segment, breaks text segment - MessageBubble renders segments in order: text → tool → text → tool - Result: explanations appear UNDER each tool action, not at bottom - Backward compatible: falls back to legacy rendering if no segments1f28fab
-
Fix all 10 critical audit bugs:
Claw Web1. LLM-based compaction (real summarization instead of heuristics) 2. Dynamic tool_choice (force TodoWrite in plan mode) 3. In-memory state preserved across compaction 4. Shell injection fix in grepSearch (execFileSync) 5. Glob matching fixed (**, trailing slashes, edge cases) 6. readFile size limit (10MB cap + 30k output truncation) 7. React state immutable updates (no direct mutation) 8. Hooks config supports all naming conventions 9. DeepInfra API key hardcoded + Qwen3-Coder-480B-Turbo default 10. Max settings: 256k context, 32k tokens, temp 0.5c663926 -
Fix 7 critical autonomy bugs:
Claw Web1. Empty LLM response: retry 3x instead of throw+crash 2. catch(ALL)->break: per-tool try-catch, errors sent to LLM as tool results 3. Tool exception: caught per-tool, LLM decides next action 4. ask_user: now breaks loop and waits for user response 5. Client disconnect: graceful handling, messages saved to DB even on abort 6. Error event: finalize assistant message so UI doesn't freeze 7. message_start: don't reset assistantContent between iterations Also: stream processing errors retried with backoff9791d99 -
fix: critical compaction, buddy SVG sprites, session events, max_tokens
Claw Web- Compaction: preserve system prompt after compacting (was losing all instructions) - Compaction: dynamic threshold (70% of model context window, not hardcoded 10k) - Compaction: /compact slash command uses dynamic config + force-compact at >8 msgs - Buddy: real SVG sprite animations replacing emoji stubs (6 stages x 10 moods) - Buddy: session_completed event now emitted and handled for XP - Buddy: file_created passes actual line count - Agent: max_tokens clamped to 32000 (HuggingFace Router limit) - Settings: max_tokens slider max=32000, buttons=[4k,8k,16k,24k,32k] - useChat: forwards all buddy_event fields (toolCallCount, lines)37d6c24 -
feat: auto-compact on context overflow + proactive compaction + token tracking + buddy server events
Claw Web- Auto-compact on 400 context_length error (matches original conversation.rs) - Proactive compaction at 80% context window usage - Context usage SSE events (estimatedTokens, contextWindow, usagePercent) - Buddy events SSE from agent loop (tool_call, file_created) - useChat.ts handles context_usage, buddy_event, auto_compact SSE - useBuddyNotification.tsx listens for server-driven buddy-event CustomEvents - MODEL_CONTEXT_WINDOWS for known models - agentMessagesToSession/sessionToAgentMessages converters3705a49
-
Claw Web v1.0 — AI Agent Web Interface with MiMo-V2-Flash
Claw Web7540aea