Commit Graph

10 Commits

  • fix(coding-agent): use describe.skipIf for RPC test with explicit model
    - Use describe.skipIf pattern matching other tests
    - Skip when ANTHROPIC_API_KEY and ANTHROPIC_OAUTH_TOKEN are missing
    - Use explicit --provider anthropic --model claude-sonnet-4-5
  • fix: RPC mode session management not saving sessions
    Since version 0.9.0, RPC mode (--mode rpc) was not saving messages to
    session files. The agent.subscribe() call with session management logic
    was only present in the TUI renderer after it was refactored.
    
    RPC mode now properly saves sessions just like interactive mode.
    
    Added test for RPC mode session management to prevent regression.
    
    Fixes #83
    
    Thanks @kiliman for reporting this issue!
  • feat(coding-agent): add read-only exploration tools (grep, find, ls) and --tools flag
    Add grep, find, and ls tools for safe code exploration without modification risk.
    These tools are available via the new --tools CLI flag.
    
    - grep: Uses ripgrep (auto-downloaded) for fast regex searching. Respects .gitignore,
      supports glob filtering, context lines, and hidden files.
    - find: Uses fd (auto-downloaded) for fast file finding. Respects .gitignore, supports
      glob patterns, and hidden files.
    - ls: Lists directory contents with proper sorting and directory indicators.
    - --tools flag: Specify available tools (e.g., --tools read,grep,find,ls for read-only mode)
    - Dynamic system prompt adapts to selected tools with relevant guidelines
    
    Closes #74
  • Improve edit tool diff display with context-aware rendering
    - Add generateDiffString() function in edit tool to create unified diffs with line numbers and 4 lines of context
    - Store only the formatted diff string in tool result details instead of full file contents
    - Update tool-execution renderer to parse and colorize the diff string
    - Filter out message_update events from session saving to prevent verbose session files
    - Add markdown nested list and table rendering tests
  • Add proper truncation notices and comprehensive tests for read tool
    **Improved output messages:**
    1. File fits within limits: Just outputs content (no notices)
    2. Lines get truncated: Shows "Some lines were truncated to 2000 characters for display"
    3. File doesn't fit limit: Shows "N more lines not shown. Use offset=X to continue reading"
    4. Offset beyond file: Shows "Error: Offset X is beyond end of file (N lines total)"
    5. Both truncations: Combines both notices with ". " separator
    
    **Comprehensive test coverage:**
    - Files within limits (no notices)
    - Large files (line truncation)
    - Long lines (character truncation)
    - Offset parameter
    - Limit parameter
    - Offset + limit together
    - Invalid offset (out of bounds)
    - Combined truncations (both notices)
    
    All 17 tests passing ✓
  • Add image support in tool results across all providers
    Tool results now use content blocks and can include both text and images.
    All providers (Anthropic, Google, OpenAI Completions, OpenAI Responses)
    correctly pass images from tool results to LLMs.
    
    - Update ToolResultMessage type to use content blocks
    - Add placeholder text for image-only tool results in Google/Anthropic
    - OpenAI providers send tool result + follow-up user message with images
    - Fix Anthropic JSON parsing for empty tool arguments
    - Add comprehensive tests for image-only and text+image tool results
    - Update README with tool result content blocks API