Skip to content

fix(tui): add provider refresh action - #2946

Open
PaiduiXiaowangzi wants to merge 1 commit into
MoonshotAI:mainfrom
PaiduiXiaowangzi:codex/issue-2111
Open

fix(tui): add provider refresh action#2946
PaiduiXiaowangzi wants to merge 1 commit into
MoonshotAI:mainfrom
PaiduiXiaowangzi:codex/issue-2111

Conversation

@PaiduiXiaowangzi

Copy link
Copy Markdown

Related Issue

Part of #2111

Problem

The /provider command advertises refresh support, but the Provider Manager exposes only add and delete actions. Provider and model state also reloads only when a refresh reports model-list changes, so the TUI can retain stale configuration state.

What changed

  • Add an R refresh action and visible key hint to Provider Manager.
  • Run the existing provider refresh flow with progress and failure feedback, then reopen the manager with the latest state.
  • Reload configured providers and models after every completed refresh, including unchanged results.
  • Add component and controller regression coverage.

This intentionally leaves models.dev provenance and unsupported-provider discovery out of scope.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill and added a patch changeset.
  • Ran gen-docs skill; no docs update is needed because this implements refresh behavior already advertised by /provider.

@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d3e5bd9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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: d3e5bd9ac2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +94 to +95
} finally {
reopenProviderManager(host);

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 a dismissed provider dialog closed

If a refresh takes long enough for the user to press Esc, the existing manager restores the editor, but the refresh continues and this unconditional finally mounts a new manager when it completes. This unexpectedly steals focus from the editor or any dialog opened in the meantime and makes Esc appear ineffective; reopen only if the original manager is still active, or disable/cancel dismissal while refreshing.

Useful? React with 👍 / 👎.

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.

1 participant