jinzd-ai-cli 0.1.71 → 0.1.73

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.
@@ -16,7 +16,7 @@ import {
16
16
  SUBAGENT_MAX_ROUNDS_LIMIT,
17
17
  VERSION,
18
18
  runTestsTool
19
- } from "./chunk-FGJNF6EC.js";
19
+ } from "./chunk-FEYESHOP.js";
20
20
 
21
21
  // src/config/config-manager.ts
22
22
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -8,7 +8,7 @@ import { platform } from "os";
8
8
  import chalk from "chalk";
9
9
 
10
10
  // src/core/constants.ts
11
- var VERSION = "0.1.71";
11
+ var VERSION = "0.1.73";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  theme,
35
35
  truncateOutput,
36
36
  undoStack
37
- } from "./chunk-44MLZVRC.js";
37
+ } from "./chunk-ABXJS3XB.js";
38
38
  import {
39
39
  AGENTIC_BEHAVIOR_GUIDELINE,
40
40
  AUTHOR,
@@ -54,7 +54,7 @@ import {
54
54
  REPO_URL,
55
55
  SKILLS_DIR_NAME,
56
56
  VERSION
57
- } from "./chunk-FGJNF6EC.js";
57
+ } from "./chunk-FEYESHOP.js";
58
58
 
59
59
  // src/index.ts
60
60
  import { program } from "commander";
@@ -1903,7 +1903,7 @@ ${hint}` : "")
1903
1903
  description: "Run project tests and show structured report",
1904
1904
  usage: "/test [command|filter]",
1905
1905
  async execute(args, _ctx) {
1906
- const { executeTests } = await import("./run-tests-X3FEAHV3.js");
1906
+ const { executeTests } = await import("./run-tests-MYRF47LA.js");
1907
1907
  const argStr = args.join(" ").trim();
1908
1908
  let testArgs = {};
1909
1909
  if (argStr) {
@@ -5290,7 +5290,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5290
5290
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5291
5291
  process.exit(1);
5292
5292
  }
5293
- const { startWebServer } = await import("./server-XCCS3HC3.js");
5293
+ const { startWebServer } = await import("./server-AAP2OMDQ.js");
5294
5294
  await startWebServer({ port, host: options.host });
5295
5295
  });
5296
5296
  program.command("sessions").description("List recent conversation sessions").action(async () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-FGJNF6EC.js";
5
+ } from "./chunk-FEYESHOP.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -21,7 +21,7 @@ import {
21
21
  runHook,
22
22
  spawnAgentContext,
23
23
  truncateOutput
24
- } from "./chunk-44MLZVRC.js";
24
+ } from "./chunk-ABXJS3XB.js";
25
25
  import {
26
26
  AGENTIC_BEHAVIOR_GUIDELINE,
27
27
  DEFAULT_MAX_TOKENS,
@@ -32,7 +32,7 @@ import {
32
32
  PLAN_MODE_SYSTEM_ADDON,
33
33
  SKILLS_DIR_NAME,
34
34
  VERSION
35
- } from "./chunk-FGJNF6EC.js";
35
+ } from "./chunk-FEYESHOP.js";
36
36
 
37
37
  // src/web/server.ts
38
38
  import express from "express";
@@ -422,8 +422,20 @@ var SessionHandler = class {
422
422
  this.skillManager = shared.skillManager;
423
423
  this.toolExecutor = new ToolExecutorWeb(shared.toolRegistry, ws);
424
424
  this.currentProvider = this.config.get("defaultProvider");
425
- const provider = this.providers.get(this.currentProvider);
426
- this.currentModel = provider?.info.defaultModel ?? "";
425
+ const allDefaultModels = this.config.get("defaultModels");
426
+ try {
427
+ const provider = this.providers.get(this.currentProvider);
428
+ this.currentModel = allDefaultModels[this.currentProvider] ?? provider?.info.defaultModel ?? "";
429
+ } catch {
430
+ const available = this.providers.listAvailable();
431
+ if (available.length > 0) {
432
+ this.currentProvider = available[0].info.id;
433
+ this.currentModel = allDefaultModels[this.currentProvider] ?? available[0].info.defaultModel;
434
+ } else {
435
+ this.currentProvider = "";
436
+ this.currentModel = "";
437
+ }
438
+ }
427
439
  this.sessions.createSession(this.currentProvider, this.currentModel);
428
440
  this.activeSystemPrompt = this.loadContextFiles();
429
441
  const hooks = this.config.get("hooks");
@@ -438,14 +450,11 @@ var SessionHandler = class {
438
450
  }
439
451
  }
440
452
  sendStatus() {
441
- const providerList = this.providers.listAvailable().map((id) => {
442
- const p = this.providers.get(id);
443
- return {
444
- id,
445
- displayName: p?.info.displayName ?? id,
446
- models: (p?.info.models ?? []).map((m) => ({ id: m.id, name: m.name ?? m.id }))
447
- };
448
- });
453
+ const providerList = this.providers.listAvailable().map((p) => ({
454
+ id: p.info.id,
455
+ displayName: p.info.displayName,
456
+ models: p.info.models.map((m) => ({ id: m.id, name: m.name ?? m.id }))
457
+ }));
449
458
  this.send({
450
459
  type: "status",
451
460
  provider: this.currentProvider,