feat: add Chrome extension browser relay
This commit is contained in:
@@ -4,6 +4,7 @@ const browserClientMocks = vi.hoisted(() => ({
|
||||
browserCloseTab: vi.fn(async () => ({})),
|
||||
browserFocusTab: vi.fn(async () => ({})),
|
||||
browserOpenTab: vi.fn(async () => ({})),
|
||||
browserProfiles: vi.fn(async () => []),
|
||||
browserSnapshot: vi.fn(async () => ({
|
||||
ok: true,
|
||||
format: "ai",
|
||||
@@ -113,6 +114,13 @@ describe("browser tool snapshot maxChars", () => {
|
||||
const [, opts] = browserClientMocks.browserSnapshot.mock.calls.at(-1) ?? [];
|
||||
expect(Object.hasOwn(opts ?? {}, "maxChars")).toBe(false);
|
||||
});
|
||||
|
||||
it("lists profiles", async () => {
|
||||
const tool = createBrowserTool();
|
||||
await tool.execute?.(null, { action: "profiles" });
|
||||
|
||||
expect(browserClientMocks.browserProfiles).toHaveBeenCalledWith("http://127.0.0.1:18791");
|
||||
});
|
||||
});
|
||||
|
||||
describe("browser tool snapshot labels", () => {
|
||||
|
||||
Reference in New Issue
Block a user