mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 19:32:27 +00:00
refactor: switch browser ownership to bundled plugin
This commit is contained in:
@@ -13,7 +13,11 @@ import {
|
||||
} from "./completion-fish.js";
|
||||
import { getCoreCliCommandNames, registerCoreCliByName } from "./program/command-registry.js";
|
||||
import { getProgramContext } from "./program/program-context.js";
|
||||
import { getSubCliEntries, registerSubCliByName } from "./program/register.subclis.js";
|
||||
import {
|
||||
getSubCliEntries,
|
||||
loadValidatedConfigForPluginRegistration,
|
||||
registerSubCliByName,
|
||||
} from "./program/register.subclis.js";
|
||||
|
||||
const COMPLETION_SHELLS = ["zsh", "bash", "powershell", "fish"] as const;
|
||||
type CompletionShell = (typeof COMPLETION_SHELLS)[number];
|
||||
@@ -273,6 +277,12 @@ export function registerCompletionCli(program: Command) {
|
||||
await registerSubCliByName(program, entry.name);
|
||||
}
|
||||
|
||||
const config = await loadValidatedConfigForPluginRegistration();
|
||||
if (config) {
|
||||
const { registerPluginCliCommands } = await import("../plugins/cli.js");
|
||||
registerPluginCliCommands(program, config);
|
||||
}
|
||||
|
||||
if (options.writeState) {
|
||||
const writeShells = options.shell ? [shell] : [...COMPLETION_SHELLS];
|
||||
await writeCompletionCache({
|
||||
|
||||
Reference in New Issue
Block a user