Compare commits

..

1 Commits

Author SHA1 Message Date
minori 39ceef3958 deps: update @types/react to 19.2.14
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m17s
CI / Lint & Check (pull_request) Successful in 13m42s
CI / Build Windows (pull_request) Failing after 31m27s
2026-04-10 07:06:32 -07:00
5 changed files with 53 additions and 69 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
"@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0",
"@tauri-apps/cli": "2.5.0",
"@types/react": "19.1.2",
"@types/react": "19.2.14",
"@types/react-dom": "19.1.2",
"autoprefixer": "10.4.21",
"eslint": "9.25.1",
+8 -8
View File
@@ -34,11 +34,11 @@ importers:
specifier: 2.5.0
version: 2.5.0
'@types/react':
specifier: 19.1.2
version: 19.1.2
specifier: 19.2.14
version: 19.2.14
'@types/react-dom':
specifier: 19.1.2
version: 19.1.2(@types/react@19.1.2)
version: 19.1.2(@types/react@19.2.14)
'@vitejs/plugin-react':
specifier: 4.4.1
version: 4.4.1(vite@6.3.2(jiti@1.21.7)(yaml@2.8.3))
@@ -690,8 +690,8 @@ packages:
peerDependencies:
'@types/react': ^19.0.0
'@types/react@19.1.2':
resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==}
'@types/react@19.2.14':
resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==}
'@typescript-eslint/eslint-plugin@8.19.0':
resolution: {integrity: sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==}
@@ -2940,11 +2940,11 @@ snapshots:
'@types/normalize-package-data@2.4.4': {}
'@types/react-dom@19.1.2(@types/react@19.1.2)':
'@types/react-dom@19.1.2(@types/react@19.2.14)':
dependencies:
'@types/react': 19.1.2
'@types/react': 19.2.14
'@types/react@19.1.2':
'@types/react@19.2.14':
dependencies:
csstype: 3.2.3
Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 155 KiB

+10 -14
View File
@@ -83,26 +83,22 @@ fn build_user_gemini_parts(
user_image_base64: &Option<String>,
user_image_mime: &Option<String>,
) -> 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 data = user_image_base64.as_deref().unwrap_or("");
let base_text = user_text.as_deref().unwrap_or("");
let final_text = if mode == "replace" {
if base_text.is_empty() {
REPLACE_MODE_APPEND.to_string()
} else {
format!("{}\n{}", base_text, REPLACE_MODE_APPEND)
}
let final_text = if base_text.is_empty() {
REPLACE_MODE_APPEND.to_string()
} else {
base_text.to_string()
format!("{}\n{}", base_text, REPLACE_MODE_APPEND)
};
let mut parts = vec![json!({"inlineData": {"mimeType": mime, "data": image_data}})];
if !final_text.is_empty() {
parts.push(json!({"text": final_text}));
}
parts
vec![
json!({"inlineData": {"mimeType": mime, "data": data}}),
json!({"text": final_text}),
]
} 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("");
vec![json!({"text": text})]
}
+34 -46
View File
@@ -256,8 +256,7 @@ const inputArea = ({
if (isInitialReplace && imageBase64 === undefined) {
return;
}
const hasContent = text.trim().length > 0 || imageBase64 !== undefined;
if (!isInitialReplace && !hasContent) {
if (!isInitialReplace && text.trim().length === 0) {
return;
}
@@ -333,9 +332,6 @@ const inputArea = ({
: dropZoneInactiveClass,
].join(" ");
const hasNoContent = text.trim().length === 0 && imageBase64 === undefined;
const isSendDisabled = isLoading || hasNoContent;
return (
<div className="border-t border-purple-900/30 p-4 bg-[#0f0a1a]">
<div className="flex items-center gap-2 mb-2">
@@ -401,15 +397,6 @@ const inputArea = ({
type="file"
/>
<textarea
className={textareaClass}
disabled={isLoading}
onChange={handleTextChange}
placeholder="Add notes to include with the image (optional)..."
rows={2}
value={text}
/>
<button
className={replaceButtonClass}
disabled={isLoading || imageBase64 === undefined}
@@ -427,40 +414,41 @@ const inputArea = ({
</div>
: <div className="flex flex-col gap-3">
<div className="flex flex-col gap-2">
{imagePreview === undefined
? <button
className={pasteButtonClass}
onClick={handlePasteButtonClick}
type="button"
>
{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}
{mode === "replace"
? <div className="flex flex-col gap-2">
{imagePreview === undefined
? <button
className={pasteButtonClass}
onClick={handlePasteButtonClick}
type="button"
>
{"ร—"}
{"๐Ÿ“‹ Paste replacement image (optional)"}
</button>
</div>}
<input
accept="image/*"
className="hidden"
onChange={handleFileChange}
ref={fileInputReference}
type="file"
/>
</div>
: <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"
>
{"ร—"}
</button>
</div>}
<input
accept="image/*"
className="hidden"
onChange={handleFileChange}
ref={fileInputReference}
type="file"
/>
</div>
: null}
<div className="flex gap-3 items-end">
<textarea
@@ -476,7 +464,7 @@ const inputArea = ({
/>
<button
className={sendButtonClass}
disabled={isSendDisabled}
disabled={isLoading || text.trim().length === 0}
onClick={handleSend}
type="button"
>