Skip to content

feat: upgrade CLI with local tools, slash commands, interrupt support#30

Open
akseljoonas wants to merge 3 commits intomainfrom
feat/cli-local-tools-upgrade
Open

feat: upgrade CLI with local tools, slash commands, interrupt support#30
akseljoonas wants to merge 3 commits intomainfrom
feat/cli-local-tools-upgrade

Conversation

@akseljoonas
Copy link
Collaborator

Summary

  • Local tools: Replace sandbox tools with local bash/read/write/edit that execute directly on the user machine via subprocess/pathlib
  • Slash commands: /help, /undo, /compact, /model, /yolo, /status
  • Interrupt support: Single Ctrl+C cancels the current agent turn, double Ctrl+C within 3s exits
  • HF token: Auto-loads from HF_TOKEN env var or huggingface-cli login
  • Event handlers: Added handlers for interrupted, undo_complete, tool_log, tool_state_change
  • Bug fix: Context manager _sanitize_tool_calls and _patch_dangling_tool_calls now handle tool_calls as both dicts and ToolCall objects (fixes dict object has no attribute function crash)
  • Remove lmnr: Removed lmnr dependency and all observe/Laminar references from agent code

akseljoonas and others added 3 commits March 10, 2026 19:23
…port

Replace sandbox tools with local bash/read/write/edit implementations that
execute directly on the user's machine. Add slash commands (/help, /undo,
/compact, /model, /yolo, /status), Ctrl+C interrupt support, HF token
loading, and missing event handlers. Remove lmnr dependency. Fix dict vs
ToolCall bug in context manager sanitization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…all objects

litellm's streaming handler uses .dict() internally (Pydantic v2 deprecated
path), and because Message has validate_assignment=False by default, direct
attribute assignment can leave tool_calls as raw dicts instead of
ChatCompletionMessageToolCall objects. Add _normalize_tool_calls() to
convert them back before sanitization and dangling-call patching.

Co-Authored-By: akseljoonas <akseljoonas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant