fix: resolve critical failures on macOS - spawn npx ENOENT and missing webview assets

- Fix spawn npx ENOENT error on Windows by checking for npm-related commands
- Fix missing webview assets by including chunk files and source maps in .vscodeignore
- PostHog telemetry errors are already handled gracefully with try-catch

Fixes #6662
This commit is contained in:
Roo Code 2025-08-04 15:49:50 +00:00
parent a921d059e1
commit 707295d15a
2 changed files with 7 additions and 3 deletions

View file

@ -14,11 +14,12 @@
!dist
# Include the built webview
!**/*.map
!webview-ui/audio
!webview-ui/build/assets/*.js
!webview-ui/build/assets/*.map
!webview-ui/build/assets/*.ttf
!webview-ui/build/assets/*.css
!webview-ui/build/assets/chunk-*.js
!webview-ui/build/assets/fonts/*.woff
!webview-ui/build/assets/fonts/*.woff2
!webview-ui/build/assets/fonts/*.ttf

View file

@ -590,9 +590,12 @@ export class McpHub {
const isAlreadyWrapped =
configInjected.command.toLowerCase() === "cmd.exe" || configInjected.command.toLowerCase() === "cmd"
const command = isWindows && !isAlreadyWrapped ? "cmd.exe" : configInjected.command
// Check if the command is npx or other npm-related commands that might be scripts
const isNpmCommand = ["npx", "npm", "pnpm", "yarn"].includes(configInjected.command.toLowerCase())
const command = isWindows && !isAlreadyWrapped && isNpmCommand ? "cmd.exe" : configInjected.command
const args =
isWindows && !isAlreadyWrapped
isWindows && !isAlreadyWrapped && isNpmCommand
? ["/c", configInjected.command, ...(configInjected.args || [])]
: configInjected.args