mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(cli): drop explicit CommandModule type from commands array to fix typecheck
UpgradeCommand and UninstallCommand are plain object literals (no cmd() wrapper) whose handler param types don't satisfy CommandModule<any, any>. Remove the annotation and let TypeScript infer the union type — consumers already cast via loadCommands().
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// All CommandModules in one place so help.ts and generate-cli-docs.ts can
|
||||
// introspect them without importing index.ts (which has startup side effects).
|
||||
// When upstream adds a new command to index.ts, add it here too.
|
||||
import type { CommandModule } from "yargs"
|
||||
import { AcpCommand } from "../cli/cmd/acp"
|
||||
import { McpCommand } from "../cli/cmd/mcp"
|
||||
import { TuiThreadCommand } from "../cli/cmd/tui/thread"
|
||||
@@ -26,13 +25,13 @@ import { HelpCommand } from "./help-command"
|
||||
|
||||
// Synthetic entry for the yargs built-in .completion() command so that
|
||||
// generateHelp --all and cli-reference.md include it automatically.
|
||||
const CompletionCommand: CommandModule<any, any> = {
|
||||
const CompletionCommand = {
|
||||
command: "completion",
|
||||
describe: "generate shell completion script",
|
||||
handler: () => {},
|
||||
}
|
||||
|
||||
export const commands: CommandModule<any, any>[] = [
|
||||
export const commands = [
|
||||
AcpCommand,
|
||||
McpCommand,
|
||||
TuiThreadCommand,
|
||||
|
||||
Reference in New Issue
Block a user