From 4236744fb5787010d8f930e0599db78d2b58a57f Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Mon, 15 Dec 2025 12:01:11 -0600 Subject: fix: image attachments in desktop --- packages/desktop/src/components/prompt-input.tsx | 79 +++++++++++++++--------- 1 file changed, 51 insertions(+), 28 deletions(-) (limited to 'packages/desktop/src') diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx index 595f07972..840710152 100644 --- a/packages/desktop/src/components/prompt-input.tsx +++ b/packages/desktop/src/components/prompt-input.tsx @@ -79,6 +79,7 @@ export const PromptInput: Component = (props) => { const providers = useProviders() const command = useCommand() let editorRef!: HTMLDivElement + let fileInputRef!: HTMLInputElement const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const tabs = createMemo(() => layout.tabs(sessionKey())) @@ -791,7 +792,7 @@ export const PromptInput: Component = (props) => {
- + Drop images or PDFs here
@@ -871,34 +872,56 @@ export const PromptInput: Component = (props) => { - - -
- Stop - ESC -
-
- -
- Send - -
-
- - } - > - + { + const file = e.currentTarget.files?.[0] + if (file) addImageAttachment(file) + e.currentTarget.value = "" + }} /> -
+ + fileInputRef.click()} + /> + + + +
+ Stop + ESC +
+
+ +
+ Send + +
+
+ + } + > + +
+ -- cgit v1.2.3