Compare commits

..

1 Commits

Author SHA1 Message Date
minori e00c7a04a2 deps: update @tauri-apps/plugin-dialog to 2.6.0
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m35s
CI / Lint & Check (pull_request) Successful in 15m34s
CI / Build Windows (pull_request) Failing after 31m19s
2026-04-10 07:05:48 -07:00
5 changed files with 50 additions and 66 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "2.5.0", "@tauri-apps/api": "2.5.0",
"@tauri-apps/plugin-dialog": "2.3.0", "@tauri-apps/plugin-dialog": "2.6.0",
"@tauri-apps/plugin-fs": "2.4.0", "@tauri-apps/plugin-fs": "2.4.0",
"react": "19.1.0", "react": "19.1.0",
"react-dom": "19.1.0" "react-dom": "19.1.0"
+5 -5
View File
@@ -12,8 +12,8 @@ importers:
specifier: 2.5.0 specifier: 2.5.0
version: 2.5.0 version: 2.5.0
'@tauri-apps/plugin-dialog': '@tauri-apps/plugin-dialog':
specifier: 2.3.0 specifier: 2.6.0
version: 2.3.0 version: 2.6.0
'@tauri-apps/plugin-fs': '@tauri-apps/plugin-fs':
specifier: 2.4.0 specifier: 2.4.0
version: 2.4.0 version: 2.4.0
@@ -649,8 +649,8 @@ packages:
engines: {node: '>= 10'} engines: {node: '>= 10'}
hasBin: true hasBin: true
'@tauri-apps/plugin-dialog@2.3.0': '@tauri-apps/plugin-dialog@2.6.0':
resolution: {integrity: sha512-ylSBvYYShpGlKKh732ZuaHyJ5Ie1JR71QCXewCtsRLqGdc8Is4xWdz6t43rzXyvkItM9syNPMvFVcvjgEy+/GA==} resolution: {integrity: sha512-q4Uq3eY87TdcYzXACiYSPhmpBA76shgmQswGkSVio4C82Sz2W4iehe9TnKYwbq7weHiL88Yw19XZm7v28+Micg==}
'@tauri-apps/plugin-fs@2.4.0': '@tauri-apps/plugin-fs@2.4.0':
resolution: {integrity: sha512-Sp8AdDcbyXyk6LD6Pmdx44SH3LPeNAvxR2TFfq/8CwqzfO1yOyV+RzT8fov0NNN7d9nvW7O7MtMAptJ42YXA5g==} resolution: {integrity: sha512-Sp8AdDcbyXyk6LD6Pmdx44SH3LPeNAvxR2TFfq/8CwqzfO1yOyV+RzT8fov0NNN7d9nvW7O7MtMAptJ42YXA5g==}
@@ -2896,7 +2896,7 @@ snapshots:
'@tauri-apps/cli-win32-ia32-msvc': 2.5.0 '@tauri-apps/cli-win32-ia32-msvc': 2.5.0
'@tauri-apps/cli-win32-x64-msvc': 2.5.0 '@tauri-apps/cli-win32-x64-msvc': 2.5.0
'@tauri-apps/plugin-dialog@2.3.0': '@tauri-apps/plugin-dialog@2.6.0':
dependencies: dependencies:
'@tauri-apps/api': 2.10.1 '@tauri-apps/api': 2.10.1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 155 KiB

+8 -12
View File
@@ -83,26 +83,22 @@ fn build_user_gemini_parts(
user_image_base64: &Option<String>, user_image_base64: &Option<String>,
user_image_mime: &Option<String>, user_image_mime: &Option<String>,
) -> Vec<Value> { ) -> Vec<Value> {
if let Some(image_data) = user_image_base64.as_deref() { if mode == "replace" && user_image_base64.is_some() {
let mime = user_image_mime.as_deref().unwrap_or("image/png"); let mime = user_image_mime.as_deref().unwrap_or("image/png");
let data = user_image_base64.as_deref().unwrap_or("");
let base_text = user_text.as_deref().unwrap_or(""); let base_text = user_text.as_deref().unwrap_or("");
let final_text = if mode == "replace" { let final_text = if base_text.is_empty() {
if base_text.is_empty() {
REPLACE_MODE_APPEND.to_string() REPLACE_MODE_APPEND.to_string()
} else { } else {
format!("{}\n{}", base_text, REPLACE_MODE_APPEND) format!("{}\n{}", base_text, REPLACE_MODE_APPEND)
}
} else {
base_text.to_string()
}; };
let mut parts = vec![json!({"inlineData": {"mimeType": mime, "data": image_data}})]; vec![
if !final_text.is_empty() { json!({"inlineData": {"mimeType": mime, "data": data}}),
parts.push(json!({"text": final_text})); json!({"text": final_text}),
} ]
parts
} else { } else {
// No image: text-only message // Art/avatar mode, or replace mode follow-up correction (text only)
let text = user_text.as_deref().unwrap_or(""); let text = user_text.as_deref().unwrap_or("");
vec![json!({"text": text})] vec![json!({"text": text})]
} }
+7 -19
View File
@@ -256,8 +256,7 @@ const inputArea = ({
if (isInitialReplace && imageBase64 === undefined) { if (isInitialReplace && imageBase64 === undefined) {
return; return;
} }
const hasContent = text.trim().length > 0 || imageBase64 !== undefined; if (!isInitialReplace && text.trim().length === 0) {
if (!isInitialReplace && !hasContent) {
return; return;
} }
@@ -333,9 +332,6 @@ const inputArea = ({
: dropZoneInactiveClass, : dropZoneInactiveClass,
].join(" "); ].join(" ");
const hasNoContent = text.trim().length === 0 && imageBase64 === undefined;
const isSendDisabled = isLoading || hasNoContent;
return ( return (
<div className="border-t border-purple-900/30 p-4 bg-[#0f0a1a]"> <div className="border-t border-purple-900/30 p-4 bg-[#0f0a1a]">
<div className="flex items-center gap-2 mb-2"> <div className="flex items-center gap-2 mb-2">
@@ -401,15 +397,6 @@ const inputArea = ({
type="file" type="file"
/> />
<textarea
className={textareaClass}
disabled={isLoading}
onChange={handleTextChange}
placeholder="Add notes to include with the image (optional)..."
rows={2}
value={text}
/>
<button <button
className={replaceButtonClass} className={replaceButtonClass}
disabled={isLoading || imageBase64 === undefined} disabled={isLoading || imageBase64 === undefined}
@@ -427,16 +414,15 @@ const inputArea = ({
</div> </div>
: <div className="flex flex-col gap-3"> : <div className="flex flex-col gap-3">
<div className="flex flex-col gap-2"> {mode === "replace"
? <div className="flex flex-col gap-2">
{imagePreview === undefined {imagePreview === undefined
? <button ? <button
className={pasteButtonClass} className={pasteButtonClass}
onClick={handlePasteButtonClick} onClick={handlePasteButtonClick}
type="button" type="button"
> >
{mode === "replace" {"๐Ÿ“‹ Paste replacement image (optional)"}
? "๐Ÿ“‹ Paste replacement image (optional)"
: "๐Ÿ“‹ Paste image (optional)"}
</button> </button>
: <div className="relative inline-block"> : <div className="relative inline-block">
@@ -462,6 +448,8 @@ const inputArea = ({
/> />
</div> </div>
: null}
<div className="flex gap-3 items-end"> <div className="flex gap-3 items-end">
<textarea <textarea
className={textareaClass} className={textareaClass}
@@ -476,7 +464,7 @@ const inputArea = ({
/> />
<button <button
className={sendButtonClass} className={sendButtonClass}
disabled={isSendDisabled} disabled={isLoading || text.trim().length === 0}
onClick={handleSend} onClick={handleSend}
type="button" type="button"
> >