refactor: switch browser ownership to bundled plugin

This commit is contained in:
Peter Steinberger
2026-03-26 22:18:41 +00:00
parent 197510f693
commit 8eeb7f0829
255 changed files with 16981 additions and 21074 deletions

View File

@@ -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({