diff --git a/src/tests/tool-executor.test.ts b/src/tests/tool-executor.test.ts index f7def2f..f36def2 100644 --- a/src/tests/tool-executor.test.ts +++ b/src/tests/tool-executor.test.ts @@ -29,9 +29,9 @@ test("ToolExecutor accepts title-case built-in tool aliases", async () => { type: "function", function: { name: "Read", - arguments: JSON.stringify({ file_path: filePath }) - } - } + arguments: JSON.stringify({ file_path: filePath }), + }, + }, ]); assert.equal(executions.length, 1); diff --git a/src/tools/executor.ts b/src/tools/executor.ts index edfca6f..220fc89 100644 --- a/src/tools/executor.ts +++ b/src/tools/executor.ts @@ -93,7 +93,7 @@ const BUILT_IN_TOOL_NAME_ALIASES = new Map([ ["Bash", "bash"], ["Read", "read"], ["Write", "write"], - ["Edit", "edit"] + ["Edit", "edit"], ]); export type ToolCallExecution = { diff --git a/src/ui/PromptInput.tsx b/src/ui/PromptInput.tsx index 074cab6..d2af534 100644 --- a/src/ui/PromptInput.tsx +++ b/src/ui/PromptInput.tsx @@ -659,11 +659,7 @@ export const PromptInput = React.memo(function PromptInput({ } if (item.kind === "undo") { onSubmit({ text: "/undo", imageUrls: [], command: "undo" }); - setBuffer(EMPTY_BUFFER); - clearUndoRedoStacks(); - setImageUrls([]); - setSelectedSkills([]); - setShowSkillsDropdown(false); + resetPromptInput(); return; } if (item.kind === "mcp") {