@nalvietnam/avatar-cli 1.6.2 → 1.6.3
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/index.js
CHANGED
|
@@ -1851,8 +1851,8 @@ import { existsSync as existsSync5 } from "fs";
|
|
|
1851
1851
|
import { join as join14 } from "path";
|
|
1852
1852
|
import { confirm as confirm2 } from "@inquirer/prompts";
|
|
1853
1853
|
var WIKI_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
1854
|
-
var
|
|
1855
|
-
var
|
|
1854
|
+
var FALLBACK_LLMLITE_MODEL = "nal-claude";
|
|
1855
|
+
var FALLBACK_ANTHROPIC_MODEL = "claude-sonnet-4-5";
|
|
1856
1856
|
function normalizeAnthropicBaseUrl(rawBaseUrl) {
|
|
1857
1857
|
const cleaned = rawBaseUrl.replace(/\/+$/, "");
|
|
1858
1858
|
if (cleaned.endsWith("/v1")) return `${cleaned}/`;
|
|
@@ -1867,14 +1867,16 @@ async function readSettingsForWikiCredentials(workspacePath) {
|
|
|
1867
1867
|
const env = settings.env || {};
|
|
1868
1868
|
const baseUrl = typeof env.ANTHROPIC_BASE_URL === "string" ? env.ANTHROPIC_BASE_URL : null;
|
|
1869
1869
|
if (!baseUrl) return null;
|
|
1870
|
-
const
|
|
1870
|
+
const topLevelModel = typeof settings.model === "string" ? settings.model : "";
|
|
1871
|
+
const envModel = typeof env.ANTHROPIC_MODEL === "string" ? env.ANTHROPIC_MODEL : "";
|
|
1872
|
+
const userModel = topLevelModel.length > 0 ? topLevelModel : envModel;
|
|
1871
1873
|
const anthropicKey = typeof env.ANTHROPIC_API_KEY === "string" ? env.ANTHROPIC_API_KEY : null;
|
|
1872
1874
|
if (anthropicKey) {
|
|
1873
1875
|
return {
|
|
1874
1876
|
provider: "anthropic",
|
|
1875
1877
|
apiKey: anthropicKey,
|
|
1876
1878
|
baseUrl: normalizeAnthropicBaseUrl(baseUrl),
|
|
1877
|
-
model: userModel.length > 0 ? userModel :
|
|
1879
|
+
model: userModel.length > 0 ? userModel : FALLBACK_ANTHROPIC_MODEL
|
|
1878
1880
|
};
|
|
1879
1881
|
}
|
|
1880
1882
|
const llmliteToken = typeof env.ANTHROPIC_AUTH_TOKEN === "string" ? env.ANTHROPIC_AUTH_TOKEN : null;
|
|
@@ -1883,7 +1885,7 @@ async function readSettingsForWikiCredentials(workspacePath) {
|
|
|
1883
1885
|
provider: "llmlite",
|
|
1884
1886
|
apiKey: llmliteToken,
|
|
1885
1887
|
baseUrl,
|
|
1886
|
-
model: userModel.length > 0 ? userModel :
|
|
1888
|
+
model: userModel.length > 0 ? userModel : FALLBACK_LLMLITE_MODEL
|
|
1887
1889
|
};
|
|
1888
1890
|
}
|
|
1889
1891
|
return null;
|
|
@@ -4806,7 +4808,7 @@ async function removeSubmoduleEntry(gitmodulesPath, submodulePath) {
|
|
|
4806
4808
|
}
|
|
4807
4809
|
|
|
4808
4810
|
// src/commands/uninstall.ts
|
|
4809
|
-
var CLI_VERSION = "1.6.
|
|
4811
|
+
var CLI_VERSION = "1.6.3";
|
|
4810
4812
|
function registerUninstallCommand(program2) {
|
|
4811
4813
|
program2.command("uninstall").description("G\u1EE1 Avatar kh\u1ECFi project \u2014 backup t\u1EF1 \u0111\u1ED9ng (M11)").option("--yes", "Skip confirm prompt").option("--no-backup", "Kh\xF4ng t\u1EA1o backup tr\u01B0\u1EDBc khi x\xF3a (nguy hi\u1EC3m)").option("--keep-submodule", "Gi\u1EEF submodule .claude/pack/").option("--keep-hooks", "Gi\u1EEF git hooks post-merge, pre-push").option("--dry-run", "Hi\u1EC3n th\u1ECB danh s\xE1ch s\u1EBD x\xF3a, kh\xF4ng th\u1EF1c thi").action(async (opts) => {
|
|
4812
4814
|
try {
|
|
@@ -4888,7 +4890,7 @@ function printUninstallSuccessBox(backupPath) {
|
|
|
4888
4890
|
}
|
|
4889
4891
|
|
|
4890
4892
|
// src/index.ts
|
|
4891
|
-
var CLI_VERSION2 = "1.6.
|
|
4893
|
+
var CLI_VERSION2 = "1.6.3";
|
|
4892
4894
|
var program = new Command();
|
|
4893
4895
|
program.name("avatar").description("AI harness CLI for NAL Vietnam engineering").version(CLI_VERSION2, "-v, --version", "Hi\u1EC3n th\u1ECB phi\xEAn b\u1EA3n Avatar CLI").addHelpText(
|
|
4894
4896
|
"beforeAll",
|