fix(provider): remove model refresh during deactivation - #271
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes resolve the shutdown warning while preserving active model-refresh paths.
Pull request overview
Removes an ineffective shutdown-time model refresh that caused cancellation warnings.
Changes:
- Simplifies deactivation to local logger cleanup.
- Removes obsolete provider state and refresh logic.
- Deletes unused deactivation error translations.
File summaries
| File | Description |
|---|---|
src/runtime/lifecycle.ts |
Simplifies shutdown cleanup. |
src/provider/index.ts |
Removes deactivation refresh machinery. |
src/i18n.ts |
Removes unused translations. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Closes #268
Problem
Reloading a window or restarting the extension host logs
Failed to refresh DeepSeek models during deactivate Canceled: Canceledduring otherwise normal shutdown. The provider tries to clear model-picker entries throughvscode.lm.selectChatModels()after VS Code has disposed the extension-host RPC connection, so the refresh cannot complete.Changes and scope
Remove the deactivation-time refresh, its inactive-provider guard and global provider reference, and the unused English/Chinese deactivation-error strings. Deactivation now releases local logging resources synchronously. Startup, API-key, and configuration-change model refreshes remain intact.
The shutdown workaround was introduced in ced0242 — chore(release): prepare 0.2.0, alongside the original model-visibility fixes. Its comment intended the refresh to make the host re-query an inactive provider returning an empty list and remove stale picker entries. PR #104 (788b1d7) later moved the deactivation hook into
src/runtime/lifecycle.tswhile retaining that behavior.Local VS Code source review from 1.116 onward confirms that extension-host RPC is disposed before deactivation, so this shutdown refresh cannot achieve its intended effect. The original model-visibility fixes remain useful. The separate startup refresh added in PR #13 — fix: thinking effort dropdown missing on first launch (27deac1) also remains intact.
Validation:
npm run lint,npm run format:check,npm run compile, VSIX packaging, andgit diff --checkpassed.Final checks