- Render permission modal inline below log panel instead of floating CenteredModal overlay
- Hide input area when permission prompt is active
- Add dev:debug and dev:debug-brk scripts for Bun inspector debugging
- Add background color to header to prevent content bleeding through
- Add margin spacing between header and log panel
- Change permission modal border to top-only for cleaner inline appearance
The plan approval system now has enforcement at the tool execution level:
- After modifying more than 2 files, the agent MUST use plan_approval
- File-modifying tools (write, edit, delete, etc.) are blocked until
an approved plan exists
- Clear error message guides agent to create and submit a plan
This ensures agents can't bypass plan approval instructions.
The rollback system was failing because it looked for `file_path`
(snake_case) but the write/edit tools use `filePath` (camelCase).
Now checks both formats when extracting the file path for rollback tracking.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds plan approval workflow per GitHub issue #111:
- Register plan_approval tool in tools index
- Add plan approval handling in message handler
- Check for pending plans on each message
- Detect approval/rejection messages
- Handle plan approval flow
- Create plan approval modal TUI component
- Update system prompts to instruct agents to use plan_approval tool
- Balanced tier: Updated to require plan_approval for complex tasks
- Thorough tier: Updated with plan_approval workflow
Workflow:
1. Agent analyzes task complexity with plan_approval
2. Agent creates plan with steps, context, risks
3. Agent submits plan for user approval
4. User approves/rejects/provides feedback
5. Only after approval, agent proceeds with execution
Closes#111
Adds execution control system per GitHub issue #113:
- Ctrl+P: Toggle pause/resume during agent execution
- Ctrl+Z: Abort with rollback (undo file changes)
- Ctrl+Shift+S: Toggle step-by-step mode
- Enter: Advance one step when in step mode
New files:
- src/types/execution-control.ts: Type definitions
- src/services/execution-control.ts: Control implementation with rollback
- src/constants/execution-control.ts: Keyboard shortcuts and messages
Modified:
- agent-stream.ts: Integrated execution control into agent loop
- message-handler.ts: Added control functions and callbacks
- app.tsx: Added keyboard shortcut handlers
- help-content.ts: Added help topics for new shortcuts
Closes#113
- CHANGELOG.md: Add version sections for 0.2.x and 0.3.0, add known
issues and planned features linking to GitHub issues #111-#115
- CONTRIBUTING.md: Update prerequisites to Bun, fix file structure
to reflect tui-solid migration, update commands to use bun
- README.md: Add version badges, roadmap section with v0.4.0 plans,
known issues section, and recent changes summary
- Added a system prompt builder to create dynamic prompts based on different modes (ask, code review, composer, debug, implement, plan, refactor).
- Introduced prompt tiers (balanced, fast, thorough) to tailor responses based on user needs
- Integrated multiple AI providers (Anthropic, Copilot, Google, Ollama, OpenAI) for flexible backend support.
- Updated agent and multi-agent services to utilize the new prompt system.
- 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)
Agent behavior improvements:
- Add project context detection (tsconfig.json, pom.xml, etc.)
- Enforce validation after changes (tsc --noEmit, mvn compile, etc.)
- Run tests automatically - never ask "do you want me to run tests"
- Complete full loop: create → type-check → test → confirm
- Add command detection for direct execution (run tree, run ls)
Diff view improvements:
- Use darker backgrounds for added/removed lines
- Add diffLineBgAdded, diffLineBgRemoved, diffLineText theme colors
- Improve text visibility with white text on dark backgrounds
- Update both React/Ink and SolidJS diff components
Streaming fixes:
- Fix tool call argument accumulation using OpenAI index field
- Fix streaming content display after tool calls
- Add consecutive error tracking to prevent token waste
Other changes:
- ESC to abort operations, Ctrl+C to exit
- Fix model selection when provider changes in cascade mode
- Add debug logging for troubleshooting
- Move tests to root tests/ folder
- Fix banner test GRADIENT_COLORS reference
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