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 + +
+
+ + } + > + +
+ diff --git a/packages/tauri/src-tauri/src/lib.rs b/packages/tauri/src-tauri/src/lib.rs index b06ccd06c..aab2ce5f3 100644 --- a/packages/tauri/src-tauri/src/lib.rs +++ b/packages/tauri/src-tauri/src/lib.rs @@ -183,6 +183,7 @@ pub fn run() { .inner_size(size.width as f64, size.height as f64) .decorations(true) .zoom_hotkeys_enabled(true) + .disable_drag_drop_handler() .initialization_script(format!( r#" window.__OPENCODE__ ??= {{}}; diff --git a/packages/ui/src/components/icon.tsx b/packages/ui/src/components/icon.tsx index 0dbd7a650..b8e8106e8 100644 --- a/packages/ui/src/components/icon.tsx +++ b/packages/ui/src/components/icon.tsx @@ -51,6 +51,7 @@ const icons = { "circle-check": ``, copy: ``, check: ``, + photo: ``, } export interface IconProps extends ComponentProps<"svg"> {