mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 03:20:43 +00:00
fix(cli): preserve lazy placeholder options
This commit is contained in:
@@ -28,9 +28,14 @@ type BrowserCommandGroupDefinition = {
|
||||
register: BrowserCommandRegistrar;
|
||||
};
|
||||
|
||||
const command = (name: string, description: string): CommandGroupPlaceholder => ({
|
||||
const command = (
|
||||
name: string,
|
||||
description: string,
|
||||
options?: CommandGroupPlaceholder["options"],
|
||||
): CommandGroupPlaceholder => ({
|
||||
name,
|
||||
description,
|
||||
...(options ? { options } : {}),
|
||||
});
|
||||
|
||||
const browserCommandGroupDefinitions: readonly BrowserCommandGroupDefinition[] = [
|
||||
@@ -48,6 +53,9 @@ const browserCommandGroupDefinitions: readonly BrowserCommandGroupDefinition[] =
|
||||
command("profiles", "List all browser profiles"),
|
||||
command("create-profile", "Create a new browser profile"),
|
||||
command("delete-profile", "Delete a browser profile"),
|
||||
command("doctor", "Check browser plugin readiness", [
|
||||
{ flags: "--deep", description: "Run a live snapshot probe" },
|
||||
]),
|
||||
],
|
||||
register: async (args) => {
|
||||
const module = await import("./browser-cli-manage.js");
|
||||
@@ -105,7 +113,6 @@ const browserCommandGroupDefinitions: readonly BrowserCommandGroupDefinition[] =
|
||||
command("highlight", "Highlight an element by ref"),
|
||||
command("errors", "Get recent page errors"),
|
||||
command("requests", "Get recent network requests (best-effort)"),
|
||||
command("doctor", "Check browser plugin readiness"),
|
||||
command("trace", "Record a Playwright trace"),
|
||||
],
|
||||
register: async (args) => {
|
||||
|
||||
Reference in New Issue
Block a user