Add /thinking command and improve TUI UX
- 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
This commit is contained in:
@@ -106,7 +106,7 @@ Guidelines:
|
||||
Current directory: ${process.cwd()}`;
|
||||
|
||||
async function runInteractiveMode(agent: Agent, _sessionManager: SessionManager): Promise<void> {
|
||||
const renderer = new TuiRenderer();
|
||||
const renderer = new TuiRenderer(agent);
|
||||
|
||||
// Initialize TUI
|
||||
await renderer.init();
|
||||
@@ -116,6 +116,9 @@ async function runInteractiveMode(agent: Agent, _sessionManager: SessionManager)
|
||||
agent.abort();
|
||||
});
|
||||
|
||||
// Render any existing messages (from --continue mode)
|
||||
renderer.renderInitialMessages(agent.state);
|
||||
|
||||
// Subscribe to agent events
|
||||
agent.subscribe(async (event) => {
|
||||
// Pass all events to the renderer
|
||||
|
||||
Reference in New Issue
Block a user