Skip to content

Commit 02262d0

Browse files
committed
fix: remove duplicate message calls in handleSubmit causing profile state sharing
When editing profile B while profile A is active, the handleSubmit function had a duplicate block that was: 1. Sending updateCondensingPrompt twice (line 560 and removed duplicate) 2. Sending upsertApiConfiguration to currentApiConfigName (active profile A) instead of editingApiConfigName (profile B being edited) 3. Sending telemetrySetting twice (line 564 and removed duplicate) The duplicate upsertApiConfiguration call caused both profiles to receive identical configuration when saving, explaining the bug where 'change B, then A gets the same changes'. The duplicate code block appears to be leftover from before PR #3732's profile isolation changes, likely kept during the merge in PR #3895. Fixes the profile state sharing bug reported after PR #3895 merge.
1 parent 0a1f30d commit 02262d0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,6 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
586586
// Update cachedState to match the current state to prevent isChangeDetected from being set back to true
587587
setCachedState((prevState) => ({ ...prevState, ...extensionState }))
588588

589-
// These have more complex logic so they aren't (yet) handled
590-
// by the `updateSettings` message.
591-
vscode.postMessage({ type: "updateCondensingPrompt", text: customCondensingPrompt || "" })
592-
vscode.postMessage({ type: "upsertApiConfiguration", text: currentApiConfigName, apiConfiguration })
593-
vscode.postMessage({ type: "telemetrySetting", text: telemetrySetting })
594-
595589
// kilocode_change: When editing a different profile, don't overwrite apiConfiguration
596590
if (editingApiConfigName !== currentApiConfigName) {
597591
// Only sync non-apiConfiguration fields from extensionState

0 commit comments

Comments
 (0)