Skip to content

feat(desktop): 触发按钮显示模型服务商#4146

Open
ttmouse wants to merge 1 commit into
esengine:main-v2from
ttmouse:pr/model-trigger-label
Open

feat(desktop): 触发按钮显示模型服务商#4146
ttmouse wants to merge 1 commit into
esengine:main-v2from
ttmouse:pr/model-trigger-label

Conversation

@ttmouse

@ttmouse ttmouse commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

在 ModelSwitcher 触发按钮上,模型名后附加服务商名称,例如:deepseek-v4-flash · DeepSeek

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 12, 2026

@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: 9bc7b70679

ℹ️ 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 on lines +37 to +39
const currentProvider = useMemo(() => {
const cur = models.find((m) => m.current);
return cur ? providerLabel(cur.provider, t) : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the trigger provider in sync

Because currentProvider is derived from models, but that array is only fetched while the popover is open, the trigger shows no provider on initial render and can show the wrong provider after selecting a model from another provider: onPick refreshes the parent label, while this stale models state still marks the old model as current until the menu is opened and fetched again. In those common closed-menu states the new model · provider display is missing or mismatched.

Useful? React with 👍 / 👎.

@ttmouse ttmouse force-pushed the pr/model-trigger-label branch from e95e2dc to 508f1a8 Compare June 12, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant