refactor: rename apply_patch tool

This commit is contained in:
Dax Raad
2026-07-07 16:27:03 -04:00
parent bfdddfd904
commit 6fb2144fa6
22 changed files with 48 additions and 46 deletions
+3 -3
View File
@@ -1908,7 +1908,7 @@ function ToolPart(props: { part: SessionMessageAssistantTool }) {
<Match when={display() === "execute"}>
<Execute {...toolprops} />
</Match>
<Match when={display() === "apply_patch"}>
<Match when={display() === "patch"}>
<ApplyPatch {...toolprops} />
</Match>
<Match when={display() === "todowrite"}>
@@ -2737,7 +2737,7 @@ const toolDisplays = new Set([
"edit",
"subagent",
"execute",
"apply_patch",
"patch",
"todowrite",
"question",
"skill",
@@ -2746,7 +2746,7 @@ const toolDisplays = new Set([
export function toolDisplay(tool: string) {
// Legacy transcripts recorded the shell tool as "bash" and the subagent tool as "task"; render
// them with the renamed views.
const normalized = tool === "bash" ? "shell" : tool === "task" ? "subagent" : tool
const normalized = tool === "bash" ? "shell" : tool === "task" ? "subagent" : tool === "apply_patch" ? "patch" : tool
return toolDisplays.has(normalized) ? normalized : "generic"
}