You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd2769f
Browse filesBrowse the repository at this point in the historyBrowse files
[Fix] Append queued feedback once and bind mention cwd before the await
What: `persistQueuedFeedbackAndAcknowledge` now appends its `user_feedback`
row once, before the save-retry loop, and records the append in
`queuedFeedbackRowWritten` so a retry (or a reclaimed message persisted
again) re-saves the existing row instead of appending a duplicate. The
record is cleared on consume and on the queue-prune sweep.
`resolveIncomingImages` reads its cwd before its own awaits, so mention
resolution uses the workspace captured with the task rather than whichever
task is current after the state read.
Why: the retry loop re-entered the append on every attempt, so a save that
failed and then succeeded left two identical `user_feedback` rows in
history and the webview; a message released by
`releaseUnconsumedQueuedMessage` and persisted on a later turn appended a
second row for text already retained in `clineMessages`. Separately,
`cwd: getCurrentCwd()` was evaluated after `await provider.getState()`, so a
task switch during that await resolved image mentions against the new
task's workspace (security seat LOW-3).
Impact: queued feedback history stays single-row per message, and queued
messages resolve `@` image mentions against the workspace that receives
them. No public API change; budget stays at 500/500 committed non-test
lines. Regression tests fail on the pre-fix shapes.
@@ -392,10 +394,7 @@ export class ExecuteCommandTool extends BaseTool<"execute_command"> {
392
394
publishToolResult(result)
393
395
shouldDrainQueuedMessages=commandSubmitted
394
396
}catch(fallbackError){
395
-
// The retry never published: settle the signal (and
396
-
// rethrow) so the background-completion drain chain
397
-
// awaiting toolResultPublished cannot hang forever and
398
-
// hold task references. Settling is idempotent.
397
+
// The retry never published: settle before rethrowing.
399
398
settleToolResultPublished?.(false)
400
399
throwfallbackError
401
400
}
@@ -407,8 +406,7 @@ export class ExecuteCommandTool extends BaseTool<"execute_command"> {
407
406
"Command was submitted in the VS Code terminal, but shell integration did not report its output or completion status. Do not run the command again automatically.",
408
407
)
409
408
}catch(warningError){
410
-
// Same hang hazard as the fallback arm: a throw before
411
-
// publishToolResult leaves the signal unsettled.
409
+
// A throw before publishToolResult leaves the signal unsettled.
412
410
settleToolResultPublished?.(false)
413
411
throwwarningError
414
412
}
@@ -419,14 +417,8 @@ export class ExecuteCommandTool extends BaseTool<"execute_command"> {
419
417
}else{
420
418
// Ordinary execution error (e.g. the terminal failed to start) —
421
419
// not a shell-integration failure, so it must not emit the
422
-
// shell-integration warning; surface it through the tool's
423
-
// error path instead.
424
-
// Settle the publication signal before the error bubbles: the
0 commit comments