feat: add Apply Patch tool with patch input and diff view (#196)

* feat: add Apply Patch tool with patch input and diff view

Introduce Apply Patch tool with a patch input field and diff preview
Display target file path or file count for patch operations in tool UI
Update status label to show applying patch during execution

* fix: include apply_patch in editing tools detection
This commit is contained in:
Bohdan Triapitsyn
2026-01-22 19:09:07 +02:00
committed by GitHub
parent ef4d37df09
commit 87175566b9
6 changed files with 47 additions and 13 deletions
+2 -1
View File
@@ -169,7 +169,7 @@ export function useAssistantStatus(): AssistantStatusSnapshot {
let activePartType: 'text' | 'tool' | 'reasoning' | 'editing' | undefined = undefined;
let activeToolName: string | undefined = undefined;
const editingTools = new Set(['edit', 'write']);
const editingTools = new Set(['edit', 'write', 'apply_patch']);
for (let i = (lastAssistant.parts ?? []).length - 1; i >= 0; i -= 1) {
const part = lastAssistant.parts?.[i];
@@ -218,6 +218,7 @@ export function useAssistantStatus(): AssistantStatusSnapshot {
write: 'writing file',
edit: 'editing file',
multiedit: 'editing files',
apply_patch: 'applying patch',
bash: 'running command',
grep: 'searching content',
glob: 'finding files',