Fix VS Code 1.110.0#104
Conversation
📝 WalkthroughWalkthroughUpdates 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
vscode/src/client.ts (1)
113-122: Theasynckeyword is now redundant.Since the handler no longer uses
await, theasyncmodifier 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
package.jsonpackages/language-service/package.jsonpnpm-workspace.yamlvscode/package.jsonvscode/src/client.ts
fix #103
Summary by CodeRabbit
Release Notes
New Features
Improvements
Chores