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:
commit
0a789396b2
2 changed files with 13 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue