From 7e854bd5d1ee2781b103bac67aaaea4c831275de Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 14 Mar 2026 00:29:02 +0100 Subject: [PATCH] Remove unused AI action handling functions --- src/App.tsx | 57 ----------------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 77e60e8..684548d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -917,63 +917,6 @@ export default function App() { }; }, []); - const dispatchAiAction = useCallback( - (template: AiPromptTemplate | null, isCustomPrompt: boolean) => { - const selection = getCurrentAiSelection(); - if (selection) { - setPendingAiScopeChoice({ - template, - selection, - isCustomPrompt - }); - return; - } - - if (isCustomPrompt) { - setCustomPromptText(""); - setCustomPromptState({ - scope: "document", - selection: null - }); - return; - } - - if (!template) return; - runAiAction({ template }).catch((error) => { - console.error("Failed to run AI tool", error); - }); - }, - [getCurrentAiSelection, runAiAction] - ); - - const handleChooseAiScope = useCallback( - (scope: AiEditScope) => { - const pending = pendingAiScopeChoice; - if (!pending) return; - setPendingAiScopeChoice(null); - - if (pending.isCustomPrompt) { - setCustomPromptText(""); - setCustomPromptState({ - scope, - selection: scope === "selection" ? pending.selection : null - }); - return; - } - - if (!pending.template) return; - - runAiAction({ - template: pending.template, - scope, - selection: scope === "selection" ? pending.selection : null - }).catch((error) => { - console.error("Failed to run AI tool", error); - }); - }, - [pendingAiScopeChoice, runAiAction] - ); - const statusKey = useMemo(() => { if (isViewingHistory) return "history"; if (isDirty) return "unsaved";