fix: TUI overflow, scrollable header, tool output, git branch
- Fixed: chat content no longer overflows past allocated height. Lines are measured for physical width and hard-truncated to exactly the chat area height. Input + status bar always visible. - Header scrolls with chat (not pinned), only input/status fixed - Git branch in status bar (green, via git rev-parse) - Alt screen mode — terminal scrollback disabled - Mouse wheel + PgUp/PgDown scroll within TUI - New EventToolResult: tool output as dimmed indented block - Separator lines above/below input, no status bar backgrounds
This commit is contained in:
@@ -218,11 +218,12 @@ func (e *Engine) executeTools(ctx context.Context, calls []message.ToolCall, cb
|
||||
output = e.cfg.Firewall.ScanToolResult(output)
|
||||
}
|
||||
|
||||
// Emit tool result as a text delta event so the UI can show it
|
||||
// Emit tool result event for the UI
|
||||
if cb != nil {
|
||||
cb(stream.Event{
|
||||
Type: stream.EventTextDelta,
|
||||
Text: fmt.Sprintf("\n[tool:%s] %s\n", call.Name, truncate(output, 500)),
|
||||
Type: stream.EventToolResult,
|
||||
ToolName: call.Name,
|
||||
ToolOutput: truncate(output, 2000),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user