Merge pull request #2544 from gsd-build/feat/external-tool-execution

fix: revert insertChildBefore and clean up external tool rendering
This commit is contained in:
TÂCHES 2026-03-25 15:42:49 -06:00 committed by GitHub
commit 0a789396b2
2 changed files with 13 additions and 2 deletions

View file

@ -234,8 +234,9 @@ async function runLoop(
const toolResults: ToolResultMessage[] = [];
if (hasMoreToolCalls && config.externalToolExecution) {
// External execution mode: tools were handled by the provider (e.g., Claude Code SDK).
// Emit synthetic tool events for TUI rendering but skip local dispatch.
// External execution mode: tools were handled by the provider
// (e.g., Claude Code SDK). Emit tool_execution events for each
// tool call. The TUI adds these as components after the message.
for (const tc of toolCalls as AgentToolCall[]) {
stream.push({
type: "tool_execution_start",

View file

@ -31,6 +31,16 @@ export class Box implements Component {
this.invalidateCache();
}
insertChildBefore(component: Component, before: Component): void {
const index = this.children.indexOf(before);
if (index !== -1) {
this.children.splice(index, 0, component);
} else {
this.children.push(component);
}
this.invalidateCache();
}
removeChild(component: Component): void {
const index = this.children.indexOf(component);
if (index !== -1) {