Skip to content

Fix VS Code 1.110.0#104

Merged
wangshunnn merged 2 commits into
mainfrom
fix-vscode-1.111.0
Mar 9, 2026
Merged

Fix VS Code 1.110.0#104
wangshunnn merged 2 commits into
mainfrom
fix-vscode-1.111.0

Conversation

@wangshunnn

@wangshunnn wangshunnn commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

fix #103

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for the MPX language in the TypeScript server plugin.
  • Improvements

    • Enhanced error handling for TypeScript server requests.
  • Chores

    • Updated package manager and dependencies to latest versions.

@wangshunnn wangshunnn changed the title Fix VS Code >= 1.111.0 Fix VS Code 1.110.0 Mar 9, 2026
@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updates pnpm to version 10.31.0, upgrades volar-service packages to 0.0.70, updates volar and reactive-vscode dependencies, adds "languages" field to the TypeScript server plugin configuration in VS Code, and refactors tsserver request handling to use Promise-based chaining with optional response body.

Changes

Cohort / File(s) Summary
Package Manager and Dependency Updates
package.json, packages/language-service/package.json, pnpm-workspace.yaml
Upgrades pnpm from 10.27.0 to 10.31.0; updates six volar-service packages (css, emmet, html, json, prettier, typescript) from 0.0.64/0.0.63 to 0.0.70; updates five @volar packages from ~2.4.12 to ~2.4.28; updates reactive-vscode from ^0.2.14 to ^0.4.1.
TypeScript Server Plugin Configuration
vscode/package.json
Adds "languages": ["mpx"] field to the TypeScript server plugin entry, associating the MPX language with the plugin.
Client Request Handler Refactoring
vscode/src/client.ts
Refactors tsserver request handler from async/await to Promise-based chain using .then(success, failure), making the response body property optional (body?: unknown), and adding explicit rejection handling to send undefined body on failure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Dependencies dance and leap so high,
From pnpm's 10.27 to .31 we fly!
Volar and reactive packages stride,
MPX languages find their TypeScript ride,
Promises chain where async once did sway—bugs begone, hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive Title mentions VS Code 1.110.0 but PR actually targets 1.111.0; title is incomplete and somewhat misleading. Update title to reflect the actual target version (e.g., 'Fix VS Code >= 1.111.0') for clarity.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Changes address core issues: dependency updates support VSCode 1.111.0 compatibility, TypeScript plugin enhancement ensures commands are registered, and Promise-based async handling prevents hangs.
Out of Scope Changes check ✅ Passed All changes directly address VSCode 1.111.0 compatibility issues: dependency updates, TypeScript plugin language support, and async handling improvements are within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-vscode-1.111.0

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
vscode/src/client.ts (1)

113-122: The async keyword is now redundant.

Since the handler no longer uses await, the async modifier on line 113 serves no purpose. The Promise-based .then() pattern correctly handles both success and failure cases, which should address the save-hanging issue by preventing unhandled rejections.

🧹 Optional cleanup to remove unnecessary async
-    client.onNotification('tsserver/request', async ([seq, command, args]) => {
+    client.onNotification('tsserver/request', ([seq, command, args]) => {
       vscode.commands
         .executeCommand<
           { body?: unknown } | undefined
         >('typescript.tsserverRequest', command, args, { isAsync: true, lowPriority: true })
         .then(
           res => client.sendNotification('tsserver/response', [seq, res?.body]),
           () => client.sendNotification('tsserver/response', [seq, undefined]),
         )
     })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vscode/src/client.ts` around lines 113 - 122, The handler passed to
client.onNotification('tsserver/request') is marked async but never uses await,
so remove the redundant async modifier from the callback signature to avoid
misleading async behavior; locate the callback in
client.onNotification('tsserver/request', async ([seq, command, args]) => { ...
}) and change it to a plain synchronous function
(client.onNotification('tsserver/request', ([seq, command, args]) => { ... } )
while keeping the existing Promise.then(...) logic unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@vscode/src/client.ts`:
- Around line 113-122: The handler passed to
client.onNotification('tsserver/request') is marked async but never uses await,
so remove the redundant async modifier from the callback signature to avoid
misleading async behavior; locate the callback in
client.onNotification('tsserver/request', async ([seq, command, args]) => { ...
}) and change it to a plain synchronous function
(client.onNotification('tsserver/request', ([seq, command, args]) => { ... } )
while keeping the existing Promise.then(...) logic unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 60b7e589-e39c-4aac-82e3-6026266254ed

📥 Commits

Reviewing files that changed from the base of the PR and between 0c1b154 and 7e7c071.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • package.json
  • packages/language-service/package.json
  • pnpm-workspace.yaml
  • vscode/package.json
  • vscode/src/client.ts

@wangshunnn wangshunnn merged commit 6e3f8fc into main Mar 9, 2026
2 checks passed
@wangshunnn wangshunnn deleted the fix-vscode-1.111.0 branch March 9, 2026 09:34
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.

VSCode 1.110.0 不兼容

1 participant