fix(browser): default chrome profile to host

This commit is contained in:
Peter Steinberger
2026-01-15 10:34:57 +00:00
parent 725c340257
commit 6042485367
2 changed files with 41 additions and 5 deletions

View File

@@ -134,6 +134,18 @@ describe("browser tool snapshot maxChars", () => {
}),
);
});
it("defaults to host when using profile=chrome (even in sandboxed sessions)", async () => {
const tool = createBrowserTool({ defaultControlUrl: "http://127.0.0.1:9999" });
await tool.execute?.(null, { action: "snapshot", profile: "chrome", format: "ai" });
expect(browserClientMocks.browserSnapshot).toHaveBeenCalledWith(
"http://127.0.0.1:18791",
expect.objectContaining({
profile: "chrome",
}),
);
});
});
describe("browser tool snapshot labels", () => {