When quitting the CLI, users now see a comprehensive session summary:
- Total API time spent and session duration
- Total code changes (+additions/-deletions)
- Per-model token usage breakdown (input/output/cached)
- Resume command with session ID
Implementation details:
- Extended SessionStats type with apiTimeSpent, apiCallStartTime, and modelUsage
- Added startApiCall(), stopApiCall(), and addTokensWithModel() tracking functions
- Created session-stats.ts utility with formatters and generateSessionSummary()
- Updated TUI exit handler to display formatted stats
- Added mouse tracking disable to drainStdin() for cleaner exit
- Added modifiedFiles to getState() for exit summary access
- Add Pink Purple theme (hot pink/purple/magenta on dark plum background)
- Fix race condition where clearPastedImages() in input-area ran before
the async message handler could read the images, silently dropping them
- Allow @ file picker and / command menu to trigger at any cursor position,
not just when the input is empty
- Update CHANGELOG and README with new changes
Add cross-platform text clipboard operations (macOS, Linux, Windows)
with OSC 52 support for SSH/tmux environments. Wire up onMouseUp and
Ctrl+Y in the TUI to copy selected text to the system clipboard via
OpenTUI's renderer selection API.
- Fix space key not working in MCP add form by handling evt.name === "space"
- Add support for multi-character paste sequences via evt.sequence
- Add MCPServerDisplay type to types/tui.ts for UI display
- Add mcpServers reactive state to app store with setMcpServers,
addMcpServer, and updateMcpServerStatus actions
- Update session.tsx to use store's mcpServers instead of static props
- Update execute.tsx to update store when server is added/connected
- Remove duplicate MCPServer interfaces from app.tsx, session.tsx,
and mcp-select.tsx in favor of shared MCPServerDisplay type
Features:
- Add BRAIN_DISABLED feature flag to hide all Brain functionality
- When enabled, hides Brain banner, status indicator, menu, and commands
- Flag location: src/constants/brain.ts
Fixes:
- Fix Ollama 400 error by properly formatting tool_calls in messages
- Update OllamaMessage type to include tool_calls field
- Fix Brain menu keyboard not working (add missing modes to isMenuOpen)
UI Changes:
- Remove "^Tab toggle mode" hint from status bar
- Remove "ctrl+t to hide todos" hint from status bar
Files modified:
- src/constants/brain.ts (add BRAIN_DISABLED flag)
- src/types/ollama.ts (add tool_calls to OllamaMessage)
- src/providers/ollama/chat.ts (format tool_calls in messages)
- src/tui-solid/components/header.tsx (hide Brain UI when disabled)
- src/tui-solid/components/status-bar.tsx (remove hints)
- src/tui-solid/components/command-menu.tsx (filter brain command)
- src/tui-solid/components/input-area.tsx (fix isMenuOpen modes)
- src/tui-solid/routes/session.tsx (skip brain menu when disabled)
- src/services/brain.ts (early return when disabled)
- src/services/chat-tui/initialize.ts (skip brain init when disabled)
Features:
- Add /logs command to toggle debug log panel (20% width on right)
- Debug panel shows API calls, streaming events, tool calls, state changes
- Add /help submenus with detailed command explanations
- Center all modal dialogs in the terminal window
Bug Fixes:
- Fix streaming content not displaying (add fallback when streaming fails)
- Fix permission modal shortcut key mismatch ('a' → 'l' for local scope)
- Fix agent prompt accumulation when switching agents multiple times
- Fix permission modal using brittle index for "No" option
Improvements:
- Restrict git commands (add, commit, push, etc.) unless user explicitly requests
- Unify permission options across all UI components
- Add Ollama model selection when switching to Ollama provider
- Store base system prompt to prevent agent prompt stacking
New files:
- src/tui-solid/components/debug-log-panel.tsx
- src/tui-solid/components/centered-modal.tsx
- src/tui-solid/components/help-menu.tsx
- src/tui-solid/components/help-detail.tsx
- src/constants/help-content.ts