diff --git a/package.json b/package.json index dea6af7..99df770 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kimiswitch", "private": true, - "version": "0.5.0", + "version": "0.5.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 6b1e490..0482a31 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1958,7 +1958,7 @@ dependencies = [ [[package]] name = "kimiswitch" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index b582312..b712cad 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kimiswitch" -version = "0.5.0" +version = "0.5.1" description = "Kimi Switch - model config manager" authors = ["you"] edition = "2021" diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index f82463f..ffa0e53 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -65,27 +65,23 @@ pub fn run() { if button == MouseButton::Left && button_state == MouseButtonState::Up { let app = tray.app_handle(); if let Some(window) = app.get_webview_window("main") { - if window.is_visible().unwrap_or(true) { - let _ = window.hide(); - } else { - let _ = window.show(); - let _ = window.unminimize(); - let _ = window.set_focus(); - } + let _ = window.show(); + let _ = window.unminimize(); + let _ = window.set_focus(); } } } }) .build(app)?; - // Minimize to tray: restore then hide so the taskbar button disappears + // Close button -> hide to tray instead of quitting. Minimize keeps + // the taskbar button (native behaviour); only an explicit close + // (window X) retreats to the tray. let window_clone = window.clone(); window.on_window_event(move |event| match event { - tauri::WindowEvent::Resized(_) => { - if window_clone.is_minimized().unwrap_or(false) { - let _ = window_clone.unminimize(); - let _ = window_clone.hide(); - } + tauri::WindowEvent::CloseRequested { api, .. } => { + api.prevent_close(); + let _ = window_clone.hide(); } _ => {} }); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e978a4a..cdca091 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "Kimi Switch", - "version": "0.5.0", + "version": "0.5.1", "identifier": "com.kimiswitch.app", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/components/ProviderEdit.tsx b/src/components/ProviderEdit.tsx index 6b40ad7..42e9ad1 100644 --- a/src/components/ProviderEdit.tsx +++ b/src/components/ProviderEdit.tsx @@ -598,7 +598,7 @@ function ModelMapping({ {t("operation")} - + {models.map((m) => ( @@ -776,8 +776,6 @@ function CapabilitiesCell({ onChange: (next: string[]) => void; }) { const { t } = useTranslation(); - const known = new Set(KNOWN_CAPABILITIES); - const customs = capabilities.filter((c) => !known.has(c)); const toggle = (cap: string, on: boolean) => { if (on) { @@ -789,7 +787,13 @@ function CapabilitiesCell({ return (
- {KNOWN_CAPABILITIES.map((cap) => ( + {/* Only `thinking` is user-editable. The other capabilities + (always_thinking / image_in / video_in / tool_use) are still + auto-derived from models.dev via `capabilitiesFromRef` and saved + to config.toml — they just aren't exposed for manual editing. + To restore the full editor, drop the `.filter(...)` below and + re-add the custom-capabilities input (see git history). */} + {KNOWN_CAPABILITIES.filter((cap) => cap === "thinking").map((cap) => (
); } diff --git a/src/components/dashboard/DashboardPage.tsx b/src/components/dashboard/DashboardPage.tsx index b288d34..55edb02 100644 --- a/src/components/dashboard/DashboardPage.tsx +++ b/src/components/dashboard/DashboardPage.tsx @@ -228,7 +228,7 @@ export function DashboardPage() { }} />
-
{m.modelDisplay || m.model}
+
{m.modelDisplay || m.model}
{m.costEstimated && ( 估算 )}