Skip to content

Commit 10bd3a6

Browse files
joshariansketch
andcommitted
webui: suppress patch edit count when tool call fails
Instead of showing misleading edit counts like '66 edits' when a patch tool call fails, now shows 'failed' when tool_error is true. Co-Authored-By: sketch <[email protected]> Change-ID: s8ccc88517ab9d41ak
1 parent c4b78b4 commit 10bd3a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webui/src/web-components/sketch-tool-card.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,14 @@ export class SketchToolCardPatch extends SketchTailwindElement {
232232
render() {
233233
const patchInput = JSON.parse(this.toolCall?.input);
234234

235+
const toolFailed = this.toolCall?.result_message?.tool_error;
235236
const summaryContent = html`<span
236237
class="text-gray-600 font-mono overflow-hidden text-ellipsis whitespace-nowrap rounded"
237238
>
238-
${patchInput?.path}: ${patchInput.patches.length}
239-
edit${patchInput.patches.length > 1 ? "s" : ""}
239+
${toolFailed
240+
? `${patchInput?.path}: failed`
241+
: `${patchInput?.path}: ${patchInput.patches.length} edit${patchInput.patches.length > 1 ? "s" : ""}`
242+
}
240243
</span>`;
241244

242245
const inputContent = html``;

0 commit comments

Comments
 (0)