Skip to content

fix(provider): remove model refresh during deactivation - #271

Merged
Vizards merged 1 commit into
mainfrom
fix/provider-deactivation-warning
Sep 11, 2026
Merged

Vizards merged 1 commit into
mainfrom
fix/provider-deactivation-warning

Conversation

@Vizards

@Vizards Vizards commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Related issues

Closes #268

Problem

Reloading a window or restarting the extension host logs Failed to refresh DeepSeek models during deactivate Canceled: Canceled during otherwise normal shutdown. The provider tries to clear model-picker entries through vscode.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.ts while 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, and git diff --check passed.
  • Computer Use testing in existing Stable 1.136.2 and Insiders 1.138.0-insider environments reproduced the warning with a VSIX built from main.
  • With the fixed VSIX, window reload and extension-host restart produced no new deactivation-refresh warning. DeepSeek models and all four thinking-effort choices remained available after reload.
  • Disabling the extension and restarting extensions removed DeepSeek from the selectable model list; re-enabling restored the models in both builds.
  • Insiders retained the previously selected model label in the input while disabled, although its picker contained no DeepSeek entries. That label behavior was not separately compared against the original build. No inference requests were sent in these lifecycle tests.

Final checks

  • I reviewed and can explain every change
  • I reviewed any user-facing text changes in both English and Chinese
  • This pull request contains no API keys, authorization headers, private prompts, private code, or unreviewed sensitive logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T06:58:22.970717Z 98d893b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

🟢 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.

@Vizards
Vizards merged commit 7126168 into main Sep 11, 2026
2 checks passed
@Vizards
Vizards deleted the fix/provider-deactivation-warning branch September 11, 2026 13:16
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.

[Bug] Regular debug errors in DeepSeek.log

2 participants