feat: add Chrome extension browser relay

This commit is contained in:
Peter Steinberger committed 2026-01-15 04:52:28 +00:00
1 parent 5fdaef3646
commit ef78b198cb
40 files changed
+2467 -49

No files matched your search

+8
View File
@@ -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", () => {