Merge pull request #10112 from continuedev/nate/fix-cn-maybe
Register `cn check` as a CLI subcommand
This commit is contained in:
commit
1557544093
2 changed files with 18 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import { type AssistantConfig } from "@continuedev/sdk";
|
|||
|
||||
// Export command functions
|
||||
export { chat } from "./chat.js";
|
||||
export { check } from "./check.js";
|
||||
export { login } from "./login.js";
|
||||
export { logout } from "./logout.js";
|
||||
export { listSessionsCommand } from "./ls.js";
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import "./init.js";
|
|||
import { Command } from "commander";
|
||||
|
||||
import { chat } from "./commands/chat.js";
|
||||
import { check } from "./commands/check.js";
|
||||
import { login } from "./commands/login.js";
|
||||
import { logout } from "./commands/logout.js";
|
||||
import { listSessionsCommand } from "./commands/ls.js";
|
||||
|
|
@ -419,6 +420,22 @@ program
|
|||
await remoteTest(prompt, options.url);
|
||||
});
|
||||
|
||||
// Check subcommand
|
||||
program
|
||||
.command("check")
|
||||
.description("Run AI-powered checks on your changes")
|
||||
.option("--base <ref>", "Base git ref to diff against (default: auto-detect)")
|
||||
.option("--format <format>", "Output format")
|
||||
.option("--fix", "Automatically apply suggested fixes")
|
||||
.option("--patch", "Show patches")
|
||||
.option("--fail-fast", "Stop on first failure")
|
||||
.option("--check-agents <agents...>", "Specific check agents to run")
|
||||
.option("--verbose", "Enable verbose logging")
|
||||
.action(async (options) => {
|
||||
await posthogService.capture("cliCommand", { command: "check" });
|
||||
await check(options);
|
||||
});
|
||||
|
||||
// Handle unknown commands
|
||||
program.on("command:*", () => {
|
||||
console.error(`Error: Unknown command '${program.args.join(" ")}'\n`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue