Skip to content

Commit f13f62e

Browse files
taltasroomote[bot]
andauthored
Update webview-ui/src/components/modes/ModesView.tsx
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent 70c3771 commit f13f62e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

webview-ui/src/components/modes/ModesView.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,19 @@ const ModesView = () => {
263263
type: "updateModeToProfileMapping",
264264
mapping: newMapping,
265265
})
266-
}
267266
// If switching to 'selected' mode, keep current selections (or start with empty)
267+
} else {
268+
// Add mode to mapping with current selection (or empty array)
269+
const newMapping = {
270+
...modeToProfile,
271+
[visualMode]: selectedMcpServers,
272+
}
273+
setModeToProfile(newMapping)
274+
vscode.postMessage({
275+
type: "updateModeToProfileMapping",
276+
mapping: newMapping,
277+
})
278+
}
268279
},
269280
[visualMode, modeToProfile],
270281
)

0 commit comments

Comments
 (0)