@dugleelabs/copair 1.4.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +8 -1
- package/dist/api.js +11 -14
- package/dist/api.js.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23,9 +23,9 @@ var pkg = (() => {
|
|
|
23
23
|
}
|
|
24
24
|
return { name: "copair", version: process.env["COPAIR_VERSION"] ?? "0.0.0-dev" };
|
|
25
25
|
})();
|
|
26
|
-
function parseArgs(argv = process.argv) {
|
|
26
|
+
function parseArgs(argv = process.argv, versionString) {
|
|
27
27
|
const program = new Command();
|
|
28
|
-
program.name("copair").description("Model-agnostic AI coding agent for the terminal").version(pkg.version, "-v, --version").option("-m, --model <name>", "Model to use (overrides config default)").option("-c, --config <path>", "Path to config file").option("--verbose", "Enable verbose logging (WARN + INFO)", false).option("--debug", "Enable debug logging (all levels)", false).option("--resume [identifier]", 'Resume a previous session (use "latest" for most recent)').parse(argv);
|
|
28
|
+
program.name("copair").description("Model-agnostic AI coding agent for the terminal").version(versionString ?? pkg.version, "-v, --version").option("-m, --model <name>", "Model to use (overrides config default)").option("-c, --config <path>", "Path to config file").option("--verbose", "Enable verbose logging (WARN + INFO)", false).option("--debug", "Enable debug logging (all levels)", false).option("--resume [identifier]", 'Resume a previous session (use "latest" for most recent)').parse(argv);
|
|
29
29
|
const opts = program.opts();
|
|
30
30
|
return {
|
|
31
31
|
model: opts.model,
|
|
@@ -6399,7 +6399,7 @@ import chalk6 from "chalk";
|
|
|
6399
6399
|
// package.json
|
|
6400
6400
|
var package_default = {
|
|
6401
6401
|
name: "@dugleelabs/copair",
|
|
6402
|
-
version: "1.
|
|
6402
|
+
version: "1.5.0",
|
|
6403
6403
|
description: "Model-agnostic AI coding agent for the terminal",
|
|
6404
6404
|
type: "module",
|
|
6405
6405
|
main: "dist/api.js",
|
|
@@ -6494,11 +6494,12 @@ var LOGO = `
|
|
|
6494
6494
|
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
|
|
6495
6495
|
\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
|
|
6496
6496
|
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D`.trimStart();
|
|
6497
|
-
function printBanner(modelName) {
|
|
6497
|
+
function printBanner(modelName, versionString) {
|
|
6498
|
+
const display = (versionString ?? `copair ${package_default.version} (community)`).replace(/^copair\s+/, "");
|
|
6498
6499
|
process.stdout.write("\n");
|
|
6499
6500
|
process.stdout.write(chalk6.cyan(LOGO) + "\n");
|
|
6500
6501
|
process.stdout.write(
|
|
6501
|
-
chalk6.gray(` ${package_default.description}`) + chalk6.dim(" \xB7 ") + chalk6.gray(`v${
|
|
6502
|
+
chalk6.gray(` ${package_default.description}`) + chalk6.dim(" \xB7 ") + chalk6.gray(`v${display}`) + "\n"
|
|
6502
6503
|
);
|
|
6503
6504
|
process.stdout.write(
|
|
6504
6505
|
chalk6.dim(" Model: ") + chalk6.white(modelName) + chalk6.dim(" \xB7 /help for commands \xB7 Ctrl+D to exit") + "\n\n"
|
|
@@ -7405,6 +7406,9 @@ var _pkg = (() => {
|
|
|
7405
7406
|
}
|
|
7406
7407
|
return { version: process.env["COPAIR_VERSION"] ?? "0.0.0-dev" };
|
|
7407
7408
|
})();
|
|
7409
|
+
function getVersionString() {
|
|
7410
|
+
return `copair ${_pkg.version} (community)`;
|
|
7411
|
+
}
|
|
7408
7412
|
function detectTestFramework(cwd) {
|
|
7409
7413
|
const patterns = [
|
|
7410
7414
|
"vitest.config.ts",
|
|
@@ -7480,7 +7484,8 @@ async function bootstrapCLI(options = {}) {
|
|
|
7480
7484
|
await runAuditCommand(rawArgv.slice(3));
|
|
7481
7485
|
return;
|
|
7482
7486
|
}
|
|
7483
|
-
const
|
|
7487
|
+
const versionString = options.plugins?.find((p) => p.versionIdentifier)?.versionIdentifier ?? getVersionString();
|
|
7488
|
+
const cliOpts = parseArgs(options.argv, versionString);
|
|
7484
7489
|
if (cliOpts.debug) {
|
|
7485
7490
|
logger.setLevel(3 /* DEBUG */);
|
|
7486
7491
|
} else if (cliOpts.verbose) {
|
|
@@ -7647,7 +7652,7 @@ Environment:
|
|
|
7647
7652
|
cmdNames.set("model", "Switch model");
|
|
7648
7653
|
completionEngine.addProvider(new SlashCommandProvider(cmdNames));
|
|
7649
7654
|
completionEngine.addProvider(new FilePathProvider(cwd));
|
|
7650
|
-
printBanner(modelAlias);
|
|
7655
|
+
printBanner(modelAlias, versionString);
|
|
7651
7656
|
await new Promise((r) => setTimeout(r, 50));
|
|
7652
7657
|
let appHandle = null;
|
|
7653
7658
|
const doExit = async () => {
|