Compare commits

..

1 Commits

Author SHA1 Message Date
minori 6635d6ebfb deps: update react-dom to 19.2.4
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m28s
CI / Lint & Check (pull_request) Successful in 13m0s
CI / Build Windows (pull_request) Failing after 29m2s
2026-04-10 07:06:08 -07:00
4 changed files with 55 additions and 71 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
"@tauri-apps/plugin-dialog": "2.3.0", "@tauri-apps/plugin-dialog": "2.3.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.2.4"
}, },
"devDependencies": { "devDependencies": {
"@nhcarrigan/eslint-config": "5.2.0", "@nhcarrigan/eslint-config": "5.2.0",
+10 -10
View File
@@ -21,8 +21,8 @@ importers:
specifier: 19.1.0 specifier: 19.1.0
version: 19.1.0 version: 19.1.0
react-dom: react-dom:
specifier: 19.1.0 specifier: 19.2.4
version: 19.1.0(react@19.1.0) version: 19.2.4(react@19.1.0)
devDependencies: devDependencies:
'@nhcarrigan/eslint-config': '@nhcarrigan/eslint-config':
specifier: 5.2.0 specifier: 5.2.0
@@ -1948,10 +1948,10 @@ packages:
queue-microtask@1.2.3: queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
react-dom@19.1.0: react-dom@19.2.4:
resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} resolution: {integrity: sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==}
peerDependencies: peerDependencies:
react: ^19.1.0 react: ^19.2.4
react-is@16.13.1: react-is@16.13.1:
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
@@ -2037,8 +2037,8 @@ packages:
resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
scheduler@0.26.0: scheduler@0.27.0:
resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==}
semver@5.7.2: semver@5.7.2:
resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==}
@@ -4435,10 +4435,10 @@ snapshots:
queue-microtask@1.2.3: {} queue-microtask@1.2.3: {}
react-dom@19.1.0(react@19.1.0): react-dom@19.2.4(react@19.1.0):
dependencies: dependencies:
react: 19.1.0 react: 19.1.0
scheduler: 0.26.0 scheduler: 0.27.0
react-is@16.13.1: {} react-is@16.13.1: {}
@@ -4568,7 +4568,7 @@ snapshots:
es-errors: 1.3.0 es-errors: 1.3.0
is-regex: 1.2.1 is-regex: 1.2.1
scheduler@0.26.0: {} scheduler@0.27.0: {}
semver@5.7.2: {} semver@5.7.2: {}
+10 -14
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 {
format!("{}\n{}", base_text, REPLACE_MODE_APPEND)
}
} else { } else {
base_text.to_string() format!("{}\n{}", base_text, REPLACE_MODE_APPEND)
}; };
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})]
} }
+34 -46
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,40 +414,41 @@ 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"
{imagePreview === undefined ? <div className="flex flex-col gap-2">
? <button {imagePreview === undefined
className={pasteButtonClass} ? <button
onClick={handlePasteButtonClick} className={pasteButtonClass}
type="button" onClick={handlePasteButtonClick}
>
{mode === "replace"
? "📋 Paste replacement image (optional)"
: "📋 Paste image (optional)"}
</button>
: <div className="relative inline-block">
<img
alt="Upload preview"
className="max-h-32 rounded-lg border border-purple-700/40"
src={imagePreview}
/>
<button
className={clearButtonClass}
onClick={clearImage}
type="button" type="button"
> >
{"×"} {"📋 Paste replacement image (optional)"}
</button> </button>
</div>}
<input : <div className="relative inline-block">
accept="image/*" <img
className="hidden" alt="Upload preview"
onChange={handleFileChange} className="max-h-32 rounded-lg border border-purple-700/40"
ref={fileInputReference} src={imagePreview}
type="file" />
/> <button
</div> className={clearButtonClass}
onClick={clearImage}
type="button"
>
{"×"}
</button>
</div>}
<input
accept="image/*"
className="hidden"
onChange={handleFileChange}
ref={fileInputReference}
type="file"
/>
</div>
: null}
<div className="flex gap-3 items-end"> <div className="flex gap-3 items-end">
<textarea <textarea
@@ -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"
> >