Skip to content

Commit acfd9ae

Browse files
fix: rebuild re-pinned siblings' tasks on profile deletion
Review-round fix on the shared code this unit carries: rePinViewLocalStateForDeletedProfile updated each sibling's buffer but not its running task: the posted state prefers the task's own apiConfiguration, so a conversation in a view pinned to the deleted profile kept sending the deleted profile's settings - the re-pin now rebuilds the sibling's API handler with the replacement's settings and re-points the task's sticky profile name, mirroring the activation path. Tested by the sibling re-pin assertions in the unit that owns the parallel mode suite; this unit's suites confirm the port is behavior-preserving for its own coverage. Proofs: ClineProvider.spec and sticky-mode green; eslint --max-warnings=0 clean; prettier clean.
1 parent eda590a commit acfd9ae

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/core/webview/ClineProvider.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,16 @@ export class ClineProvider
34163416
if (snapshot.instance._disposed) {
34173417
return
34183418
}
3419+
// The active task of a view pinned to the deleted profile holds its own API
3420+
// handler and sticky profile name built from the deleted profile: rebuild
3421+
// the handler with the replacement's settings and re-point the sticky name,
3422+
// or the running conversation keeps sending the deleted profile's
3423+
// configuration even though the view's buffer was re-pointed (the posted
3424+
// state prefers the task's own apiConfiguration).
3425+
if (replacementSettings) {
3426+
snapshot.instance.updateTaskApiHandlerIfNeeded(replacementSettings, { forceRebuild: true })
3427+
}
3428+
await snapshot.instance.persistStickyProviderProfileToCurrentTask(replacementName)
34193429
await snapshot.instance.postStateToWebview()
34203430
}),
34213431
)

0 commit comments

Comments
 (0)