webui: expand patch tool cards by default
Made patch tool cards expand by default to show inline diffs
immediately, similar to screenshot tool cards.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s56bd70ba6302978dk
diff --git a/webui/src/web-components/sketch-tool-calls.ts b/webui/src/web-components/sketch-tool-calls.ts
index a981608..8b2fb3d 100644
--- a/webui/src/web-components/sketch-tool-calls.ts
+++ b/webui/src/web-components/sketch-tool-calls.ts
@@ -167,9 +167,10 @@
<div class="block">
${repeat(this.toolCalls, this.toolUseKey, (toolCall, idx) => {
let shouldOpen = false;
- // Always expand screenshot tool calls, expand last tool call if this.open is true
+ // Always expand screenshot and patch tool calls, expand last tool call if this.open is true
if (
toolCall.name === "browser_take_screenshot" ||
+ toolCall.name === "patch" ||
(idx == this.toolCalls?.length - 1 && this.open)
) {
shouldOpen = true;