Skip to content

Fix/一键配置失效#2249

Merged
farion1231 merged 19 commits into
farion1231:mainfrom
Coconut-Fish:fix/一键配置失效
Apr 23, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/\u4e00\u952e\u914d\u7f6e\u5931\u6548"
Merged

Fix/一键配置失效#2249
farion1231 merged 19 commits into
farion1231:mainfrom
Coconut-Fish:fix/一键配置失效

Conversation

@Coconut-Fish

Copy link
Copy Markdown
Contributor

Summary / 概述

一键配置失效,#2244 (comment)

Related Issue / 关联 Issue

#2244

Fixes #

Screenshots / 截图

Before / 修改前 After / 修改后

Checklist / 检查清单

  • [√] pnpm typecheck passes / 通过 TypeScript 类型检查
  • [√] pnpm format:check passes / 通过代码格式检查
  • [√] cargo clippy passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
  • Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件

Copilot AI review requested due to automatic review settings April 23, 2026 04:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the “one-click model setup” not persisting/syncing correctly in the Claude provider form by ensuring model updates apply to the latest config state rather than a stale snapshot.

Changes:

  • Track the latest settingsConfig via a ref to avoid stale-closure updates during rapid model changes.
  • Adjust handleModelChange to parse/update from the latest config value and reduce hook dependencies.
  • Minor formatting cleanup in Rust proxy handler code.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

File Description
src/components/providers/forms/hooks/useModelState.ts Use a ref-backed config source to avoid stale config when applying model changes.
src-tauri/src/proxy/handlers.rs Formatting-only change to a boolean expression.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/providers/forms/hooks/useModelState.ts
@Coconut-Fish

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0937aaa78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/providers/forms/hooks/useModelState.ts

@farion1231 farion1231 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢您的贡献!

@farion1231
farion1231 merged commit 010b163 into farion1231:main Apr 23, 2026
2 checks passed
@Coconut-Fish
Coconut-Fish deleted the fix/一键配置失效 branch April 23, 2026 07:43
ManLOK-Chu pushed a commit to ManLOK-Chu/cc-switch that referenced this pull request May 11, 2026
* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 更新供应商备注信息的显示样式

* style(FailoverQueueItem): 添加条件序列化以优化供应商备注字段

* fix: 优化模型状态管理,确保配置更新时正确引用最新设置

* fix(skill): improve error handling for skill source directory resolution

Co-authored-by: Copilot <[email protected]>

* fix(gemini): simplify project directory retrieval in scan_sessions function

* fix(useModelState): optimize latestConfigRef assignment in useModelState hook

* fix(useModelState): remove unnecessary blank line in useModelState hook

---------

Co-authored-by: Copilot <[email protected]>
dfbb pushed a commit to dfbb/cc-switch that referenced this pull request May 20, 2026
* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 更新供应商备注信息的显示样式

* style(FailoverQueueItem): 添加条件序列化以优化供应商备注字段

* fix: 优化模型状态管理,确保配置更新时正确引用最新设置

* fix(skill): improve error handling for skill source directory resolution

Co-authored-by: Copilot <[email protected]>

* fix(gemini): simplify project directory retrieval in scan_sessions function

* fix(useModelState): optimize latestConfigRef assignment in useModelState hook

* fix(useModelState): remove unnecessary blank line in useModelState hook

---------

Co-authored-by: Copilot <[email protected]>
delta-lo pushed a commit to delta-lo/cc-switch-mod that referenced this pull request May 31, 2026
* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 更新供应商备注信息的显示样式

* style(FailoverQueueItem): 添加条件序列化以优化供应商备注字段

* fix: 优化模型状态管理,确保配置更新时正确引用最新设置

* fix(skill): improve error handling for skill source directory resolution

Co-authored-by: Copilot <[email protected]>

* fix(gemini): simplify project directory retrieval in scan_sessions function

* fix(useModelState): optimize latestConfigRef assignment in useModelState hook

* fix(useModelState): remove unnecessary blank line in useModelState hook

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants