- Add NO_IMAGE to error finish reasons in Google provider
- Fix non-null assertion after optional chaining in Anthropic provider
- Migrate biome config to 2.3.5
- Ignore Tailwind CSS file from biome checks
- Bump all packages to version 0.6.0
Tools now resolve with error messages in content blocks rather than
rejecting the promise. This matches the expected behavior where tools
always return a result, with errors indicated in the text content.
- read: Return error content for missing files
- edit: Return error content for missing files, text not found, multiple matches
- bash: Return error content for command failures, timeouts, and aborts
- All tools now include required details field in error results
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
- SessionManager now collects text from all user and assistant messages
- Added allMessagesText field containing concatenated message text
- Search now matches against all messages in a session
- More powerful session discovery (e.g., search "write file" finds any session discussing file writing)
- Add search input at top - filters sessions as you type
- Add scrolling with max 5 visible sessions at a time
- Add scroll indicator showing position (e.g., (3/15))
- Add blank line spacing between session items
- Ctrl+C now exits process (process.exit(0)) instead of canceling
- Escape still cancels and returns to main menu
- Enter in search box selects current session
- Custom SessionList component with 2 lines per item
- First line: message text (bold when selected)
- Second line: metadata (time · message count) in dim
- Blue › cursor for selected item
- Added "Resume Session" header
- Handle Ctrl+C (‹x03›) in SelectList for consistency
- Improved date formatting (38 minutes ago, 8 hours ago, etc.)
- Add SIGINT handler to allow Ctrl+C to exit during session selection
- Remove hardcoded 60-char truncation, let SelectList handle dynamic truncation
- Simplify date format (5m, 2h, 3d instead of "5m ago")
- Make metadata more compact (5msg instead of "5 msgs")
- New SessionSelectorComponent to browse and select sessions
- Lists sessions sorted by last modified date
- Shows first message, created/modified dates, message count
- Automatically truncates long messages and formats dates
- Adds --resume/-r flag to CLI
- Session selector integrates with main flow
Session manager changes:
- Add ThinkingLevelChangeEntry and ModelChangeEntry types
- Add saveThinkingLevelChange() and saveModelChange() methods
- Update loadThinkingLevel() to also check for thinking_level_change events
(not just session headers)
TUI changes:
- Pass SessionManager to TuiRenderer constructor
- Call saveThinkingLevelChange() when user changes thinking level via /thinking
- Store session manager as instance variable for future use
This ensures thinking level changes during a session are persisted
and correctly restored on --continue.
Thinking selector fix:
- Replace hardcoded 50-character borders with DynamicBorder component
that adjusts to viewport width
- Prevents crash when terminal is resized narrow
Text/Markdown rendering fixes:
- Fix Markdown wrapSingleLine to check if adding next character would
exceed width BEFORE adding it (was checking AFTER, causing lines to
be 1 character too long)
- Add word truncation in Text component for words longer than
contentWidth (prevents long unbreakable words from exceeding width)
These fixes prevent "Rendered line exceeds terminal width" errors.
SelectList fixes:
- Use hardcoded visual width for arrow prefix instead of string length
which includes ANSI codes
- Truncate scroll indicator text to prevent exceeding terminal width
- Fixes crash when terminal is resized narrow and arrow keys are pressed
Thinking level fix:
- Restore thinking level even if it's "off" (removed !== "off" check)
- This ensures the thinking level selector shows the correct state on continue
Update streaming component with final message in message_end event.
The final message includes the stopReason, which allows the component
to render "Aborted" text for aborted text generation.
Now behavior is consistent:
- Abort during text generation (no tool calls) → shows red "Aborted"
- Abort during tool call streaming → tool components turn red
Two fixes for rendering aborted tools in --continue mode:
1. In renderInitialMessages: Check if assistant message was aborted/errored
and immediately mark tool execution components as failed instead of
leaving them in pending state.
2. In AssistantMessageComponent: Don't show "Aborted" text when there are
tool calls in the message, since the tool execution components will
show the error state themselves. This prevents duplicate error messages.
Now aborted tools show properly as red with "Operation aborted" message,
without the duplicate "Aborted" text above them.
When user presses Esc during tool argument streaming, the assistant
message ends with stopReason="aborted" but tool execution never starts.
Now we check for aborted/error stopReasons in message_end and update
all pending tool execution components to show red error state with
"Operation aborted" message.
This fixes the issue where tool components stayed stuck in blue/pending
state after aborting during JSON streaming.
Replace synchronous file operations with async Promise-based operations
that listen to abort signals during execution:
- read, write, edit now use fs/promises async APIs
- Add abort event listeners that reject immediately on abort
- Check abort status before and after each async operation
- Clean up event listeners properly
This ensures pressing Esc during file operations shows red error state.
All tools now check the abort signal before executing and throw
"Operation aborted" error if the signal is already aborted.
This ensures consistent abort behavior across all tools.
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.
- Save and restore thinking level when continuing sessions
- Fix thinking level confirmation message spacing and styling
- Fix thinking text wrapping to preserve ANSI formatting across lines
- 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
- StreamingMessageComponent was just a wrapper around AssistantMessageComponent
- AssistantMessageComponent now handles its own stats rendering
- Made AssistantMessageComponent updatable with updateContent()
- Removed duplicate stats handling code from tui-renderer
- All stats are now managed by the component itself
- Create UserMessageComponent - handles user messages with spacing
- Create AssistantMessageComponent - handles complete assistant messages
- Create ThinkingSelectorComponent - wraps selector with borders
- Add setSelectedIndex to SelectList for preselecting current level
- Simplify tui-renderer by using dedicated components
- Much cleaner architecture - each message type is now a component
- 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
- 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)
- 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
- 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
- Remove "Command aborted by user" message (Aborted already shown separately)
- Remove STDOUT/STDERR labels - just show output cleanly
- Stderr is now separated by newline without labels
- Timeout and error messages moved to end of output
- Switch from exec() to spawn() with detached: true
- Create new process group for spawned commands
- Kill entire process group with process.kill(-pid) on abort
- This ensures commands like "sleep 4 && echo hello" abort immediately
- Previous implementation only killed parent shell, leaving subprocesses running
- Render thinking traces in dark gray italic in final messages
- Show thinking as italic markdown in streaming view
- Remove code fences from bash output for cleaner minimal display
- Remove superfluous empty line after tool executions
- Thinking blocks now render inline in proper order with text
- Add ctrl+k to delete line instruction
- Change all "set x to y" confirmation messages to blue with padding
- Add blue top and bottom borders around thinking selector dialog
- Add /thinking slash command with autocomplete for setting reasoning levels (off, minimal, low, medium, high)
- Fix Ctrl+C behavior: remove hardcoded exit in TUI, let focused component handle it
- Add empty lines before and after tool execution components for better visual separation
- Fix stats rendering: display stats AFTER tool executions complete (matches web-ui behavior)
- Remove "Press Ctrl+C again to exit" message, show "(esc to interrupt)" in loader instead
- Add bash tool abort signal support with immediate SIGKILL on interrupt
- Make Text and Markdown components return empty arrays when no actual text content
- Add setCustomBgRgb() method to Markdown for dynamic background colors
- Added string-width library for proper terminal column width calculation
- Fixed wrapLine() to split by newlines before wrapping (like Text component)
- Fixed Loader interval leak by stopping before container removal
- Changed loader message from 'Loading...' to 'Working...'