Merge pull request #6481 from rkhanwani10/rkhanwani10/default-agent-mode
Change default to agent mode
This commit is contained in:
commit
6700d017fe
2 changed files with 14 additions and 14 deletions
|
|
@ -15,7 +15,7 @@ test("should render input box", async () => {
|
|||
|
||||
test("should be able to toggle modes", async () => {
|
||||
await renderWithProviders(<Chat />);
|
||||
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 () => {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const initialState: SessionState = {
|
|||
id: uuidv4(),
|
||||
streamAborter: new AbortController(),
|
||||
symbols: {},
|
||||
mode: "chat",
|
||||
mode: "agent",
|
||||
isInEdit: false,
|
||||
codeBlockApplyStates: {
|
||||
states: [],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue