Merge pull request #10112 from continuedev/nate/fix-cn-maybe

Register `cn check` as a CLI subcommand
This commit is contained in:
Nate Sesti 2026-02-02 01:25:00 -08:00 • committed by GitHub
commit 1557544093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -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";

View file

@ -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`);