From e2d0d31edb503de68d8db81d0db024b257e28225 Mon Sep 17 00:00:00 2001 From: lzt404 <2596933790@qq.com> Date: Mon, 28 Sep 2026 21:03:12 +0800 Subject: [PATCH] Remove redundant buttons --- docs/release-notes/v0.3.10/en.md | 19 +++++++++++++++++++ docs/release-notes/v0.3.10/ja.md | 19 +++++++++++++++++++ docs/release-notes/v0.3.10/zh-CN.md | 19 +++++++++++++++++++ docs/release-notes/v0.3.10/zh-TW.md | 19 +++++++++++++++++++ src-tauri/src/core_config/settings.rs | 4 ++-- src-tauri/src/tests/core_config.rs | 2 +- src-tauri/src/tests/core_v8_contract.rs | 4 ++-- src/i18n/ja.ts | 1 - src/i18n/locales/en.ts | 1 - src/i18n/locales/zh-CN.ts | 1 - src/pages/ConfigPanel.tsx | 1 - 11 files changed, 81 insertions(+), 9 deletions(-) create mode 100644 docs/release-notes/v0.3.10/en.md create mode 100644 docs/release-notes/v0.3.10/ja.md create mode 100644 docs/release-notes/v0.3.10/zh-CN.md create mode 100644 docs/release-notes/v0.3.10/zh-TW.md diff --git a/docs/release-notes/v0.3.10/en.md b/docs/release-notes/v0.3.10/en.md new file mode 100644 index 0000000..91f09f4 --- /dev/null +++ b/docs/release-notes/v0.3.10/en.md @@ -0,0 +1,19 @@ +## Improved + +- Added support for the latest ZCode `.zcode/v2/provider_config.json` format. The app can set, detect, and restore its proxy connection and default model while preserving other provider configurations. +- App and core updates are now checked whenever you enter Version Management. Return to the page to check again. +- Provider priorities now accept negative integers, with input range validation before saving. +- Session affinity TTL is validated before saving and accepts durations such as `30m` and `1h30m`. Leave it blank to use the default; valid values below one second are saved as one second. +- Core v8 Management API errors now show both the error type and detailed reason, making invalid configurations easier to identify. + +## Fixed + +- Fixed macOS updates being interrupted when a DMG was temporarily busy and could not be unmounted. Unmounting is retried, and cleanup is deferred when necessary. +- Fixed core v8 provider group names and remarks sometimes being lost after reading or saving. Duplicate detection no longer depends on group names. +- Fixed DeepSeek credentials being rejected by the core on save when group names were written to the wrong fields. +- Fixed model reasoning settings being overwritten when editing a provider. Existing settings for each model are preserved when reasoning levels are unchanged, while manually clearing them no longer restores old values. +- Added compatibility with reasoning fields in model discovery results and removed the legacy “Test Model” configuration item. +- Fixed the “Disable Cooldown” and Claude user ID cache settings not being saved correctly when turned off. You can now explicitly choose the default, enabled, or disabled state. +- Fixed empty nodes and mixed old and new fields in core v8 configurations causing TLS, sensitive word, and other settings to be read or written incorrectly. +- Corrected the displayed defaults for the listening address, usage statistics, retry count, and retry interval to match the core’s behavior when these settings are omitted. +- Fixed API provider editing and model selection dialogs extending beyond the screen and failing to scroll properly in narrow windows or macOS WebKit. diff --git a/docs/release-notes/v0.3.10/ja.md b/docs/release-notes/v0.3.10/ja.md new file mode 100644 index 0000000..32b1848 --- /dev/null +++ b/docs/release-notes/v0.3.10/ja.md @@ -0,0 +1,19 @@ +## 改善 + +- 最新版 ZCode の `.zcode/v2/provider_config.json` 設定形式に対応しました。他のプロバイダー設定を保持しながら、アプリからプロキシ接続とデフォルトモデルを設定・検出・復元できます。 +- 「バージョン管理」画面に入るたびに、アプリとコアの更新を自動確認するようにしました。画面に戻ると再確認できます。 +- プロバイダーの優先度に負の整数を指定できるようにし、保存前に入力範囲を検証します。 +- セッションアフィニティ TTL は保存前に期間の形式を検証し、`30m` や `1h30m` などの指定に対応します。空欄では既定値を使用し、1 秒未満の有効な値は 1 秒として保存します。 +- コア v8 の管理 API でエラーが発生した際に、エラーの種類と詳細な理由を両方表示し、無効な設定を特定しやすくしました。 + +## 修正 + +- macOS の更新時に DMG が一時的に使用中でアンマウントに失敗すると、更新が中断する場合がある問題を修正しました。アンマウントを再試行し、必要に応じてクリーンアップを後回しにします。 +- コア v8 のプロバイダーのグループ名とメモが読み込みまたは保存後に失われる場合がある問題を修正しました。重複判定はグループ名に左右されなくなりました。 +- グループ名が誤ったフィールドに書き込まれ、DeepSeek の認証情報の保存がコア側で拒否される問題を修正しました。 +- プロバイダーの編集時にモデルの推論設定が上書きされる場合がある問題を修正しました。推論レベルを変更していない場合は各モデルの既存設定を保持し、手動で消去した場合は古い値を復元しません。 +- モデル検出結果の推論フィールドに対応し、旧「テストモデル」設定項目を削除しました。 +- 「クールダウンを無効化」と Claude ユーザー ID キャッシュをオフにした際、その選択が正しく保存されない問題を修正しました。既定値、有効、無効を明示的に選べます。 +- コア v8 の設定にある空のノードや新旧フィールドの混在によって、TLS やセンシティブワードなどの設定の読み書きが正しく行われない場合がある問題を修正しました。 +- 待ち受けアドレス、使用統計、再試行回数、再試行間隔が未設定の場合の表示を、コアの実際の動作に合わせて修正しました。 +- API プロバイダーの編集ダイアログとモデル選択ダイアログが、狭いウィンドウや macOS WebKit で画面外にはみ出し、正常にスクロールできない問題を修正しました。 diff --git a/docs/release-notes/v0.3.10/zh-CN.md b/docs/release-notes/v0.3.10/zh-CN.md new file mode 100644 index 0000000..0dcb345 --- /dev/null +++ b/docs/release-notes/v0.3.10/zh-CN.md @@ -0,0 +1,19 @@ +## 优化 + +- 适配最新版 ZCode 的 `.zcode/v2/provider_config.json` 配置格式,支持设置、识别和恢复代理接入与默认模型,并保留其他提供方配置。 +- 每次进入“版本管理”页面时自动检查软件和内核更新,返回该页面即可重新检查。 +- 提供方优先级支持负整数,并在保存前校验输入范围。 +- 会话亲和 TTL 在保存前校验时长格式,支持 `30m`、`1h30m` 等写法;留空使用默认值,小于 1 秒的有效值按 1 秒保存。 +- 内核 v8 管理接口报错时,同时显示错误类型和详细原因,便于定位无效配置。 + +## 修复 + +- 修复 macOS 更新时 DMG 暂时被占用、卸载失败可能中断更新的问题;卸载会重试,必要时延后清理。 +- 修复内核 v8 提供方分组名称和备注在读取或保存后可能丢失的问题;重复项判断不再受分组名称影响。 +- 修复 DeepSeek 凭据因分组名称写入错误字段而被内核拒绝保存的问题。 +- 修复编辑提供方时模型思考设置可能被覆盖的问题:未修改思考等级时保留各模型原有设置,手动清空后不再恢复旧值。 +- 兼容模型发现结果中的思考字段,并移除旧的“测试模型”配置项。 +- 修复“禁用冷却”和 Claude 用户 ID 缓存在选择关闭时未正确保存的问题;现在可明确选择使用默认值、启用或禁用。 +- 修复内核 v8 配置中的空节点和新旧字段混用可能导致 TLS、敏感词等设置读取或写入异常的问题。 +- 修正监听地址、使用统计、重试次数和重试间隔等设置未配置时的显示值,使其与内核实际行为一致。 +- 修复 API 提供方编辑和模型选择弹窗在窄窗口或 macOS WebKit 下可能超出屏幕、无法正常滚动的问题。 diff --git a/docs/release-notes/v0.3.10/zh-TW.md b/docs/release-notes/v0.3.10/zh-TW.md new file mode 100644 index 0000000..6d61dca --- /dev/null +++ b/docs/release-notes/v0.3.10/zh-TW.md @@ -0,0 +1,19 @@ +## 優化 + +- 適配最新版 ZCode 的 `.zcode/v2/provider_config.json` 設定格式,支援設定、辨識及還原代理連線與預設模型,並保留其他提供者設定。 +- 每次進入「版本管理」頁面時自動檢查應用程式和核心更新,返回該頁面即可重新檢查。 +- 提供者優先度支援負整數,並在儲存前驗證輸入範圍。 +- 工作階段親和性 TTL 在儲存前驗證時長格式,支援 `30m`、`1h30m` 等寫法;留空使用預設值,小於 1 秒的有效值以 1 秒儲存。 +- 核心 v8 管理介面報錯時,同時顯示錯誤類型和詳細原因,方便找出無效設定。 + +## 修復 + +- 修復 macOS 更新時 DMG 暫時被佔用、卸載失敗可能中斷更新的問題;卸載會重試,必要時延後清理。 +- 修復核心 v8 提供者分組名稱和備註在讀取或儲存後可能遺失的問題;重複項目的判斷不再受分組名稱影響。 +- 修復 DeepSeek 憑據因分組名稱寫入錯誤欄位而被核心拒絕儲存的問題。 +- 修復編輯提供者時模型思考設定可能被覆蓋的問題:未修改思考等級時保留各模型原有設定,手動清空後不再還原舊值。 +- 相容模型探索結果中的思考欄位,並移除舊的「測試模型」設定項目。 +- 修復「停用冷卻」和 Claude 使用者 ID 快取在選擇關閉時未正確儲存的問題;現在可明確選擇使用預設值、啟用或停用。 +- 修復核心 v8 設定中的空節點和新舊欄位混用可能導致 TLS、敏感詞等設定讀取或寫入異常的問題。 +- 修正監聽位址、使用統計、重試次數和重試間隔等設定未配置時的顯示值,使其與核心實際行為一致。 +- 修復 API 提供者編輯和模型選擇對話框在窄視窗或 macOS WebKit 下可能超出畫面、無法正常捲動的問題。 diff --git a/src-tauri/src/core_config/settings.rs b/src-tauri/src/core_config/settings.rs index fc29759..39dcaf9 100644 --- a/src-tauri/src/core_config/settings.rs +++ b/src-tauri/src/core_config/settings.rs @@ -155,10 +155,10 @@ pub(crate) fn is_hashed_management_secret_key(secret_key: &str) -> bool { } pub(crate) fn validate_routing_strategy(strategy: &str) -> Result<(), String> { - if matches!(strategy, "round-robin" | "weighted-round-robin" | "fill-first") { + if matches!(strategy, "round-robin" | "fill-first") { return Ok(()); } - Err("Routing strategy supports only round-robin, weighted-round-robin or fill-first".to_string()) + Err("Routing strategy supports only round-robin or fill-first".to_string()) } pub(crate) fn normalize_optional_config_string( diff --git a/src-tauri/src/tests/core_config.rs b/src-tauri/src/tests/core_config.rs index 6eb0f84..8075317 100644 --- a/src-tauri/src/tests/core_config.rs +++ b/src-tauri/src/tests/core_config.rs @@ -1852,7 +1852,7 @@ fn core_config_validates_keys_and_routing_strategy() { assert!(validate_core_api_key("").is_err()); assert!(validate_core_api_key("contains space").is_err()); assert!(validate_routing_strategy("round-robin").is_ok()); - assert!(validate_routing_strategy("weighted-round-robin").is_ok()); + assert!(validate_routing_strategy("weighted-round-robin").is_err()); assert!(validate_routing_strategy("fill-first").is_ok()); assert!(validate_routing_strategy("random").is_err()); } diff --git a/src-tauri/src/tests/core_v8_contract.rs b/src-tauri/src/tests/core_v8_contract.rs index 201804e..17c15c5 100644 --- a/src-tauri/src/tests/core_v8_contract.rs +++ b/src-tauri/src/tests/core_v8_contract.rs @@ -152,7 +152,7 @@ async fn v8_accepts_gui_settings_and_reloads_client_keys() { remark: String::new(), }], proxy_url: "direct".into(), - routing_strategy: "weighted-round-robin".into(), + routing_strategy: "round-robin".into(), routing_session_affinity: true, routing_session_affinity_ttl: "2h30m".into(), request_retry: 2, @@ -184,7 +184,7 @@ async fn v8_accepts_gui_settings_and_reloads_client_keys() { fs::write(&core.config, &content).unwrap(); core.start().await; let view = core.validate_save(&content).await; - assert_eq!(view["routing"]["strategy"], "weighted-round-robin"); + assert_eq!(view["routing"]["strategy"], "round-robin"); assert_eq!(view["routing"]["retry"]["request-retry"], 2); assert_eq!(view["routing"]["retry"]["max-retry-credentials"], 3); assert_eq!(view["routing"]["retry"]["max-retry-interval"], 5); diff --git a/src/i18n/ja.ts b/src/i18n/ja.ts index fd90257..f90f187 100644 --- a/src/i18n/ja.ts +++ b/src/i18n/ja.ts @@ -683,7 +683,6 @@ export const jaOverrides = { 'aliases.unboundEffort': 'レベル未設定', 'aliases.delete': '{alias} を削除', 'config.routing.roundRobin': 'ラウンドロビン', - 'config.routing.weightedRoundRobin': '重み付きラウンドロビン', 'config.routing.fillFirst': '優先充填', 'config.tabs.label': '詳細設定ページ', 'config.tabs.general': '基本設定', diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 8298d7d..27f14ce 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -680,7 +680,6 @@ export const en: Record = { 'speedAliases.fast.title': 'Fast', 'speedAliases.aliasName.example': 'For example: {model}-fast', 'config.routing.roundRobin': 'Round Robin', - 'config.routing.weightedRoundRobin': 'Weighted Round Robin', 'config.routing.fillFirst': 'Fill First', 'config.tabs.label': 'Advanced features sections', 'config.tabs.general': 'General Settings', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index f9948ff..c58df9f 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -679,7 +679,6 @@ export const zhCN = { 'speedAliases.fast.title': 'Fast', 'speedAliases.aliasName.example': '例如 {model}-fast', 'config.routing.roundRobin': '轮询', - 'config.routing.weightedRoundRobin': '加权轮询', 'config.routing.fillFirst': '优先填充', 'config.tabs.label': '高级功能子页面', 'config.tabs.general': '基础设置', diff --git a/src/pages/ConfigPanel.tsx b/src/pages/ConfigPanel.tsx index 579242f..059882e 100644 --- a/src/pages/ConfigPanel.tsx +++ b/src/pages/ConfigPanel.tsx @@ -136,7 +136,6 @@ const cleanNetworkDraft = (): NetworkDraftDirty => ({ const ROUTING_OPTIONS = [ { value: 'round-robin', labelKey: 'config.routing.roundRobin' }, - { value: 'weighted-round-robin', labelKey: 'config.routing.weightedRoundRobin' }, { value: 'fill-first', labelKey: 'config.routing.fillFirst' }, ] as const;