mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(cli): add completion command to commands array for help --all and cli-reference
The shell-completion entrypoint was registered via .completion() in index.ts but missing from the commands array used by generateHelp(). This meant kilo help --all and cli-reference.md never included it. Add a synthetic CommandModule entry for completion to commands.ts and remove the now-redundant manual row in generateCommandTable().
This commit is contained in:
@@ -24,6 +24,14 @@ import { RemoteCommand } from "../cli/cmd/remote"
|
||||
import { DbCommand } from "../cli/cmd/db"
|
||||
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> = {
|
||||
command: "completion",
|
||||
describe: "generate shell completion script",
|
||||
handler: () => {},
|
||||
}
|
||||
|
||||
export const commands: CommandModule<any, any>[] = [
|
||||
AcpCommand,
|
||||
McpCommand,
|
||||
@@ -46,4 +54,5 @@ export const commands: CommandModule<any, any>[] = [
|
||||
RemoteCommand,
|
||||
DbCommand,
|
||||
HelpCommand,
|
||||
CompletionCommand,
|
||||
]
|
||||
|
||||
@@ -227,11 +227,6 @@ export async function generateCommandTable(options?: { commands?: Cmd[] }) {
|
||||
})
|
||||
}
|
||||
|
||||
rows.push({
|
||||
display: "kilo completion",
|
||||
description: "generate shell completion script",
|
||||
})
|
||||
|
||||
const lines = ["| Command | Description |", "| --- | --- |"]
|
||||
|
||||
for (const row of rows) {
|
||||
|
||||
Reference in New Issue
Block a user