fix(coding-agent): honor custom renderers for built-in tool overrides closes #2595

This commit is contained in:
Mario Zechner
2026-03-27 03:10:13 +01:00
parent bc8eb74b82
commit 1ba899f6a6
3 changed files with 46 additions and 11 deletions

View File

@@ -72,19 +72,11 @@ export class ToolExecutionComponent extends Container {
this.updateDisplay();
}
private isBuiltInDefinition(definition: ToolDefinition<any, any> | undefined): boolean {
return (
definition !== undefined &&
this.builtInToolDefinition !== undefined &&
definition.parameters === this.builtInToolDefinition.parameters
);
}
private getCallRenderer(): ToolDefinition<any, any>["renderCall"] | undefined {
if (!this.builtInToolDefinition) {
return this.toolDefinition?.renderCall;
}
if (!this.toolDefinition || this.isBuiltInDefinition(this.toolDefinition)) {
if (!this.toolDefinition) {
return this.builtInToolDefinition.renderCall;
}
return this.toolDefinition.renderCall ?? this.builtInToolDefinition.renderCall;
@@ -94,7 +86,7 @@ export class ToolExecutionComponent extends Container {
if (!this.builtInToolDefinition) {
return this.toolDefinition?.renderResult;
}
if (!this.toolDefinition || this.isBuiltInDefinition(this.toolDefinition)) {
if (!this.toolDefinition) {
return this.builtInToolDefinition.renderResult;
}
return this.toolDefinition.renderResult ?? this.builtInToolDefinition.renderResult;