From f8881f43b18447cf0a4c26c24d45c41ad839c32e Mon Sep 17 00:00:00 2001 From: Rohit Khanwani Date: Mon, 7 Jul 2025 01:24:28 +0100 Subject: [PATCH 1/2] change default mode to agent --- gui/src/redux/slices/sessionSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 8d1ef3e3e..dbf019a22 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -74,7 +74,7 @@ const initialState: SessionState = { id: uuidv4(), streamAborter: new AbortController(), symbols: {}, - mode: "chat", + mode: "agent", isInEdit: false, codeBlockApplyStates: { states: [], From ca0938c6799e143fb6bff9e15331208a1772e201 Mon Sep 17 00:00:00 2001 From: Rohit Khanwani Date: Mon, 7 Jul 2025 01:26:58 +0100 Subject: [PATCH 2/2] change tests to check for agent mode as default --- gui/src/pages/gui/chat-tests/Chat.test.tsx | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gui/src/pages/gui/chat-tests/Chat.test.tsx b/gui/src/pages/gui/chat-tests/Chat.test.tsx index b0164a437..638d3538a 100644 --- a/gui/src/pages/gui/chat-tests/Chat.test.tsx +++ b/gui/src/pages/gui/chat-tests/Chat.test.tsx @@ -15,7 +15,7 @@ test("should render input box", async () => { test("should be able to toggle modes", async () => { await renderWithProviders(); - await getElementByText("Chat"); + await getElementByText("Agent"); // Simulate cmd+. keyboard shortcut to toggle modes act(() => { @@ -27,6 +27,18 @@ test("should be able to toggle modes", async () => { ); }); + // Check that it switched to Chat mode + await getElementByText("Chat"); + + act(() => { + document.dispatchEvent( + new KeyboardEvent("keydown", { + key: ".", + metaKey: true, // cmd key on Mac + }), + ); + }); + // Check that it switched to Plan mode await getElementByText("Plan"); @@ -39,19 +51,7 @@ test("should be able to toggle modes", async () => { ); }); - // Check that it switched to Agent mode await getElementByText("Agent"); - - act(() => { - document.dispatchEvent( - new KeyboardEvent("keydown", { - key: ".", - metaKey: true, // cmd key on Mac - }), - ); - }); - - await getElementByText("Chat"); }); test("should send a message and receive a response", async () => {