From f7733a65720a8276d99b1c227db4564d6cda016b Mon Sep 17 00:00:00 2001 From: QiuYang Shen <1741258352@qq.com> Date: Wed, 23 Jul 2025 13:44:27 +0800 Subject: [PATCH] fix: attempt pass GUI.test.ts --- extensions/vscode/e2e/tests/GUI.test.ts | 7 +------ gui/src/pages/gui/Chat.tsx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index 2c1be987e..e53f2129a 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -287,9 +287,6 @@ describe("GUI Test", () => { }).timeout(DEFAULT_TIMEOUT.MD); it("should render tool call", async () => { - // all tool's toolSettings here defaults to ? - // await GUIActions.toggleToolPolicy(view, "view_diff", 0); - const [messageInput] = await GUISelectors.getMessageInputFields(view); await messageInput.sendKeys("Hello"); await messageInput.sendKeys(Key.ENTER); @@ -307,8 +304,7 @@ describe("GUI Test", () => { }).timeout(DEFAULT_TIMEOUT.MD * 100); it("should call tool after approval", async () => { - // all tool's toolSettings here defaults to ? - // await GUIActions.toggleToolPolicy(view, "view_diff", 1); + await GUIActions.toggleToolPolicy(view, "view_diff", 2); const [messageInput] = await GUISelectors.getMessageInputFields(view); await messageInput.sendKeys("Hello"); @@ -329,7 +325,6 @@ describe("GUI Test", () => { }).timeout(DEFAULT_TIMEOUT.XL); it("should cancel tool", async () => { - // all tool's toolSettings here defaults to ? await GUIActions.toggleToolPolicy(view, "view_diff", 2); const [messageInput] = await GUISelectors.getMessageInputFields(view); diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index ab1ab53b0..d7e359cfc 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -127,7 +127,7 @@ export function Chat() { }, []); const availableTools = useAppSelector((state) => state.config.config.tools); - // 标记是否已初始化 + // Mark if initialized const [toolSettingsInitialized, setToolSettingsInitialized] = useState(false); useEffect(() => {