fix(browser): add profile param to tabs routes and browser-tool
- tabs.ts now uses getProfileContext like other routes - browser-tool threads profile param through all actions - add tests for profile query param on /tabs endpoints - update docs with browser tool profile parameter
This commit is contained in:
committed by
Peter Steinberger
parent
40758b16a9
commit
9b6e2478f5
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { Command } from "commander";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("browser CLI --browser-profile flag", () => {
|
||||
it("parses --browser-profile from parent command options", () => {
|
||||
@@ -17,7 +17,14 @@ describe("browser CLI --browser-profile flag", () => {
|
||||
capturedProfile = parent?.browserProfile;
|
||||
});
|
||||
|
||||
program.parse(["node", "test", "browser", "--browser-profile", "onasset", "status"]);
|
||||
program.parse([
|
||||
"node",
|
||||
"test",
|
||||
"browser",
|
||||
"--browser-profile",
|
||||
"onasset",
|
||||
"status",
|
||||
]);
|
||||
|
||||
expect(capturedProfile).toBe("onasset");
|
||||
});
|
||||
|
||||
@@ -20,7 +20,10 @@ export function registerBrowserCli(program: Command) {
|
||||
"--url <url>",
|
||||
"Override browser control URL (default from ~/.clawdbot/clawdbot.json)",
|
||||
)
|
||||
.option("--browser-profile <name>", "Browser profile name (default from config)")
|
||||
.option(
|
||||
"--browser-profile <name>",
|
||||
"Browser profile name (default from config)",
|
||||
)
|
||||
.option("--json", "Output machine-readable JSON", false)
|
||||
.addHelpText(
|
||||
"after",
|
||||
|
||||
Reference in New Issue
Block a user