Commit graph

12 commits

Author SHA1 Message Date
Mario Zechner
1b28780155 Release v0.7.21 2025-11-19 00:56:16 +01:00
Mario Zechner
6680034a64 Release v0.7.16 2025-11-17 14:12:04 +01:00
Mario Zechner
c75f53f6f2 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
2025-11-12 20:09:11 +01:00
Mario Zechner
84dcab219b 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
2025-11-12 10:45:56 +01:00
Mario Zechner
001beff394 Fix tab rendering in TUI components
Replace tabs with 3 spaces for consistent rendering and width calculation:
- Updated visibleWidth() to normalize tabs before measuring
- Updated Text and Markdown components to replace tabs when rendering
- Updated tool-execution display for read/write tools to replace tabs

This fixes background color rendering issues when displaying files with tab indentation.
2025-11-11 23:24:48 +01:00
Mario Zechner
159075cad7 Improve tool execution rendering and error handling
- Show tool execution components immediately when tool calls appear in streaming
- Update components with streaming arguments as they come in
- Handle incomplete/partial arguments gracefully with optional chaining
- Fix error handling: tools now throw exceptions instead of returning error messages
- Fix bash abort handling to properly reject on abort/timeout
- Clean up error display
2025-11-11 23:05:58 +01:00
Mario Zechner
0cceb346be Use Spacer component for blank line before tool execution 2025-11-11 21:37:11 +01:00
Mario Zechner
c061b4fba9 Simplify tool execution component structure with proper padding
- Use single Text component with paddingY=1 for green background box
- Add spacer line with transparent background at top
- Header and content in same component with blank line separator
- Move error markers to header line instead of after content
2025-11-11 21:35:11 +01:00
Mario Zechner
ba5299a39e Fix tool execution formatting and colors
- Add blank spacer line with no background before tool execution
- Apply colored background to header (read/write/edit line)
- Apply same colored background to content
- Use lighter gray (chalk.dim) for file content
- Show first 10 lines of content for write operations
- Use cyan color for file paths (matching markdown code color)
2025-11-11 21:32:00 +01:00
Mario Zechner
5d7bc60cff Replace Markdown with Text component for tool execution
- Add background color support to Text component
- Replace Markdown component with Text in ToolExecutionComponent
- Use chalk.bold for formatting instead of markdown syntax
- Remove unnecessary markdown parsing overhead
2025-11-11 21:27:23 +01:00
Mario Zechner
10520a8c41 Fix read/write tool output formatting
- Remove code fences (```) from read output - show raw content
- Show first 10 lines instead of 5 for read
- Only show line count for write if > 10 lines
- Remove indentation from read output
- Cleaner, more minimal tool output display
2025-11-11 21:22:08 +01:00
Mario Zechner
4fa09814bd Refactor TUI components into separate files
- Move TUI components into src/tui/ folder
- Split out CustomEditor, StreamingMessageComponent, ToolExecutionComponent, FooterComponent
- Trim assistant message text content
- Add newline after per-message token/cost stats
- Improve code organization and maintainability
2025-11-11 21:16:31 +01:00