From 4356630fc6c30da9c29b61d54c2eb74f45a499c9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 8 May 2026 01:35:40 +0200 Subject: [PATCH] Remove image generation functionality from App component --- src/App.tsx | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9b6c270..42c340e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -399,33 +399,6 @@ export default function App() { } }; - const onGenerateImage = async () => { - if (!imagePrompt.trim() || imagePrompt === IMAGE_PROMPT_PLACEHOLDER) { - window.alert("Generate an image prompt first."); - return; - } - const output = await open({ directory: true, title: "Select output folder" }); - if (!output) return; - const outputDir = Array.isArray(output) ? output[0] : output; - setBusy((prev) => ({ ...prev, imageGen: true })); - setStatus("Generating image..."); - try { - const result = await runBackend<{ output_path: string }>("generate_image", { - prompt: imagePrompt, - output_dir: outputDir, - title, - }); - setStatus(`Image saved: ${result.output_path}`); - window.alert(`Image saved to:\n${result.output_path}`); - } catch (err) { - setStatus("Image generation failed"); - console.error(err); - window.alert("Image generation failed. Check console for details."); - } finally { - setBusy((prev) => ({ ...prev, imageGen: false })); - } - }; - const onPriorArt = async () => { if (!ollamaModel || ollamaModel === "Select model...") { window.alert("Please select a model first."); @@ -765,7 +738,6 @@ export default function App() { {markdownPreview ? "Edit Markdown" : "Preview Markdown"} -