Fix Chat mode cycling on VS Code

Signed-off-by: Fred Bricon <fbricon@gmail.com>
This commit is contained in:
Fred Bricon 2025-04-04 13:50:38 +02:00
parent e6d627c2e3
commit 4b5533ae4b

View file

@ -642,8 +642,8 @@ export const sessionSlice = createSlice({
},
cycleMode: (state, action: PayloadAction<{ isJetBrains: boolean }>) => {
const modes = action.payload.isJetBrains
? ["chat", "edit", "agent"]
: ["chat", "agent"];
? ["chat", "agent"]
: ["chat", "edit", "agent"];
const currentIndex = modes.indexOf(state.mode);
const nextIndex = (currentIndex + 1) % modes.length;
state.mode = modes[nextIndex] as MessageModes;