release/v6.0.2#81
Conversation
code-crusher
commented
Apr 28, 2026
- release/v5.7.1 (release/v5.7.1 #73)
- release/v5.7.2 (release/v5.7.2 #74)
- update readme (update readme #75)
- release/v5.7.3 (release/v5.7.3 #76)
- release/v5.7.6 (release/v5.7.6 #77)
- release/v5.7.7 (release/v5.7.7 #78)
- release/v6.0.0 (release/v6.0.0 #79)
- multi file edits + UI cleanups
- feat: update condense, task, assistant-message, and exploration UI components
- chore: remove .playwright-mcp from tracking and add to gitignore
- feat: enhance slash commands, chat UI, and add custom icons
- fix parallel tool calls exec
- fix filewrite tool response
- fix todo lists
- update pkg version
- create file in file change tracker
- optimise for light theme
There was a problem hiding this comment.
🧪 PR Review is completed: Solid release PR introducing multi-file edit, context condensation, and native tool call streaming fixes. Found a few runtime safety and async handling issues in the new Task and executeCommandTool code.
Skipped files
webview-ui/src/i18n/locales/en/chat.json: Skipped file pattern
⬇️ Low Priority Suggestions (1)
src/core/tools/executeCommandTool.ts (1 suggestion)
Location:
src/core/tools/executeCommandTool.ts(Lines 221-221)🟠 Logic Error
Issue: The new
task.say("command_output", ...)call is missingawait, while all othertask.saycalls in this file are awaited. Ifsayrejects or the caller relies on the message being posted beforecompleted = true, this creates a race condition or unhandled rejection risk.Fix: Await the
task.saycall to maintain consistency with the surrounding async flow.Impact: Eliminates potential unhandled promise rejections and ensures correct message ordering
- task.say("command_output", result, undefined, undefined, undefined, undefined, { isNonInteractive: true }) + await task.say("command_output", result, undefined, undefined, undefined, undefined, { isNonInteractive: true }) +
| const contextWindow = modelInfo.contextWindow | ||
|
|
||
| // Calculate context usage percentage | ||
| const contextPercent = (100 * contextTokens) / contextWindow |
There was a problem hiding this comment.
🔴 Logic Error
Issue: contextWindow can be undefined or 0 for some models, causing contextPercent to evaluate as NaN or Infinity. The comparison contextPercent < effectiveThreshold becomes unpredictable and may trigger or skip condensation incorrectly.
Fix: Guard against invalid contextWindow before calculating the percentage.
Impact: Prevents erroneous condensation behavior when model metadata is incomplete
| const contextWindow = modelInfo.contextWindow | |
| // Calculate context usage percentage | |
| const contextPercent = (100 * contextTokens) / contextWindow | |
| const contextWindow = modelInfo.contextWindow | |
| // Guard against invalid context window to prevent NaN/Infinity | |
| if (!contextWindow) { | |
| return false | |
| } | |
| // Calculate context usage percentage | |
| const contextPercent = (100 * contextTokens) / contextWindow | |
| console.log( | ||
| `[Task#${this.taskId}] Pre-tool context check: ${contextTokens} tokens (${contextPercent.toFixed(1)}%) ` + | ||
| `exceeds threshold ${effectiveThreshold}%. Triggering condensation.`, | ||
| ) |
There was a problem hiding this comment.
🟡 Code Quality
Issue: Debug console.log statement left in production code can leak internal state (token counts, thresholds) and clutter extension host logs.
Fix: Remove the debug log or replace it with a proper telemetry/verbose logger.
Impact: Keeps production logs clean
| console.log( | |
| `[Task#${this.taskId}] Pre-tool context check: ${contextTokens} tokens (${contextPercent.toFixed(1)}%) ` + | |
| `exceeds threshold ${effectiveThreshold}%. Triggering condensation.`, | |
| ) |