jinzd-ai-cli 0.4.225 → 0.4.227

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.
Files changed (26) hide show
  1. package/dist/{batch-OWM7PN4L.js → batch-W2DJGST7.js} +2 -2
  2. package/dist/{chunk-6ISALPIH.js → chunk-6LQ6PUNZ.js} +1 -1
  3. package/dist/{chunk-YUGXAALR.js → chunk-7X5TVGVY.js} +1 -1
  4. package/dist/{chunk-IZ4VM2P5.js → chunk-APBHCIPD.js} +8 -8
  5. package/dist/{chunk-DUKZBAI4.js → chunk-CYVVWFFO.js} +1 -1
  6. package/dist/{chunk-RC7FBLFT.js → chunk-DKJ5EFKA.js} +1 -1
  7. package/dist/{chunk-YENINV7F.js → chunk-NBG2STGM.js} +1 -1
  8. package/dist/{chunk-MFFMRTP6.js → chunk-OMFVR2O7.js} +3 -3
  9. package/dist/{chunk-BWCZYPEU.js → chunk-S4AKNVFK.js} +2 -2
  10. package/dist/{chunk-Q3XNGXNR.js → chunk-WJJIP34H.js} +3 -3
  11. package/dist/{chunk-M4QZYFPN.js → chunk-YK5DDJNH.js} +1 -1
  12. package/dist/{ci-RTGUV5C3.js → ci-PEOV2I3Z.js} +4 -4
  13. package/dist/{ci-format-QDBP5WBU.js → ci-format-4O7SHP4F.js} +2 -2
  14. package/dist/{constants-P4NBXYN5.js → constants-HLNS4O5H.js} +1 -1
  15. package/dist/{doctor-cli-SEX44HGI.js → doctor-cli-LA4AF6DK.js} +4 -4
  16. package/dist/electron-server.js +52 -8
  17. package/dist/{hub-FAKZZQGX.js → hub-MAJE7GB7.js} +1 -1
  18. package/dist/index.js +119 -25
  19. package/dist/{pr-DK6ENTZN.js → pr-CDJFUPZX.js} +4 -4
  20. package/dist/{run-tests-P6F27SWN.js → run-tests-DGV6D4L3.js} +1 -1
  21. package/dist/{run-tests-COCXP4B6.js → run-tests-QFYTNPSV.js} +2 -2
  22. package/dist/{server-J4W6UZXJ.js → server-GTIVGJ6S.js} +4 -4
  23. package/dist/{server-BG3J7GFG.js → server-ZQYQDQMT.js} +53 -9
  24. package/dist/{task-orchestrator-6LKQAS74.js → task-orchestrator-YSHHXWNT.js} +4 -4
  25. package/dist/{usage-IPFSL5WT.js → usage-QDSXUKN7.js} +2 -2
  26. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-6ISALPIH.js";
4
+ } from "./chunk-6LQ6PUNZ.js";
5
5
  import "./chunk-5ULLIOVC.js";
6
- import "./chunk-DUKZBAI4.js";
6
+ import "./chunk-CYVVWFFO.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-DUKZBAI4.js";
11
+ } from "./chunk-CYVVWFFO.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-DUKZBAI4.js";
5
+ } from "./chunk-CYVVWFFO.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -14,7 +14,7 @@ import {
14
14
  runHook,
15
15
  runLifecycleHooks,
16
16
  runTool
17
- } from "./chunk-YUGXAALR.js";
17
+ } from "./chunk-7X5TVGVY.js";
18
18
  import {
19
19
  getDangerLevel,
20
20
  isFileWriteTool,
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-4BKXL7SM.js";
34
34
  import {
35
35
  runTestsTool
36
- } from "./chunk-RC7FBLFT.js";
36
+ } from "./chunk-DKJ5EFKA.js";
37
37
  import {
38
38
  CONFIG_DIR_NAME,
39
39
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -43,7 +43,7 @@ import {
43
43
  SUBAGENT_ALLOWED_TOOLS,
44
44
  SUBAGENT_DEFAULT_MAX_ROUNDS,
45
45
  SUBAGENT_MAX_ROUNDS_LIMIT
46
- } from "./chunk-DUKZBAI4.js";
46
+ } from "./chunk-CYVVWFFO.js";
47
47
  import {
48
48
  loadChatIndex,
49
49
  searchChatMemory
@@ -1185,7 +1185,7 @@ var readFileTool = {
1185
1185
  dangerous: false
1186
1186
  },
1187
1187
  async execute(args) {
1188
- const filePath = String(args["path"] ?? "");
1188
+ const filePath = String(args["path"] ?? args["file"] ?? "");
1189
1189
  const encoding = args["encoding"] ?? "utf-8";
1190
1190
  const rawOffset = args["offset"];
1191
1191
  const rawLimit = args["limit"];
@@ -2835,7 +2835,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
2835
2835
  // executor 会将 write_file 标记为 'write' 级别
2836
2836
  },
2837
2837
  async execute(args) {
2838
- const filePath = String(args["path"] ?? "");
2838
+ const filePath = String(args["path"] ?? args["file"] ?? "");
2839
2839
  const content = String(args["content"] ?? "");
2840
2840
  const encoding = args["encoding"] ?? "utf-8";
2841
2841
  const appendMode = String(args["append"] ?? "false").toLowerCase() === "true";
@@ -3227,7 +3227,7 @@ Note: Path can be absolute or relative to cwd.`,
3227
3227
  // executor 中 edit_file 按 write 级别处理
3228
3228
  },
3229
3229
  async execute(args) {
3230
- const filePath = String(args["path"] ?? "");
3230
+ const filePath = String(args["path"] ?? args["file"] ?? "");
3231
3231
  const encoding = args["encoding"] ?? "utf-8";
3232
3232
  if (!filePath) throw new ToolError("edit_file", "path is required");
3233
3233
  if (!existsSync6(filePath)) throw new ToolError("edit_file", `File not found: ${filePath}`);
@@ -4628,7 +4628,7 @@ Any of these triggers means use save_last_response, NOT write_file:
4628
4628
  // getDangerLevel 中标记为 write
4629
4629
  },
4630
4630
  async execute(args) {
4631
- const filePath = String(args["path"] ?? "");
4631
+ const filePath = String(args["path"] ?? args["file"] ?? "");
4632
4632
  if (!filePath) throw new ToolError("save_last_response", "path is required");
4633
4633
  const content = lastResponseStore.content;
4634
4634
  if (!content) {
@@ -6314,7 +6314,7 @@ var notebookEditTool = {
6314
6314
  dangerous: false
6315
6315
  },
6316
6316
  async execute(args) {
6317
- const filePath = String(args["path"] ?? "");
6317
+ const filePath = String(args["path"] ?? args["file"] ?? "");
6318
6318
  const action = String(args["action"] ?? "");
6319
6319
  const cellIndexRaw = Number(args["cell_index"]);
6320
6320
  const content = args["content"] != null ? String(args["content"]) : "";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.225";
4
+ var VERSION = "0.4.227";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-DUKZBAI4.js";
4
+ } from "./chunk-CYVVWFFO.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-DUKZBAI4.js";
4
+ } from "./chunk-CYVVWFFO.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-YENINV7F.js";
5
+ } from "./chunk-NBG2STGM.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-PUBCJF7E.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-6ISALPIH.js";
16
+ } from "./chunk-6LQ6PUNZ.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-DUKZBAI4.js";
19
+ } from "./chunk-CYVVWFFO.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-IZ4VM2P5.js";
4
+ } from "./chunk-APBHCIPD.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-DUKZBAI4.js";
14
+ } from "./chunk-CYVVWFFO.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -11,10 +11,10 @@ import {
11
11
  listHooks,
12
12
  listInstalledPlugins,
13
13
  resetStats
14
- } from "./chunk-YUGXAALR.js";
14
+ } from "./chunk-7X5TVGVY.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-6ISALPIH.js";
17
+ } from "./chunk-6LQ6PUNZ.js";
18
18
  import {
19
19
  getGitRoot
20
20
  } from "./chunk-HOSJZMQS.js";
@@ -26,7 +26,7 @@ import {
26
26
  MCP_PROJECT_CONFIG_NAME,
27
27
  MEMORY_FILE_NAME,
28
28
  VERSION
29
- } from "./chunk-DUKZBAI4.js";
29
+ } from "./chunk-CYVVWFFO.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.225";
9
+ var VERSION = "0.4.227";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-MFFMRTP6.js";
7
- import "./chunk-YENINV7F.js";
6
+ } from "./chunk-OMFVR2O7.js";
7
+ import "./chunk-NBG2STGM.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-PUBCJF7E.js";
10
10
  import "./chunk-XPBEJB27.js";
11
- import "./chunk-6ISALPIH.js";
11
+ import "./chunk-6LQ6PUNZ.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-DUKZBAI4.js";
13
+ import "./chunk-CYVVWFFO.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
  export {
16
16
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-YENINV7F.js";
10
- import "./chunk-DUKZBAI4.js";
9
+ } from "./chunk-NBG2STGM.js";
10
+ import "./chunk-CYVVWFFO.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-DUKZBAI4.js";
41
+ } from "./chunk-CYVVWFFO.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-Q3XNGXNR.js";
5
+ } from "./chunk-WJJIP34H.js";
6
6
  import "./chunk-PUBCJF7E.js";
7
- import "./chunk-YUGXAALR.js";
7
+ import "./chunk-7X5TVGVY.js";
8
8
  import "./chunk-XPBEJB27.js";
9
- import "./chunk-6ISALPIH.js";
9
+ import "./chunk-6LQ6PUNZ.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-DUKZBAI4.js";
12
+ import "./chunk-CYVVWFFO.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,
@@ -38,7 +38,7 @@ import {
38
38
  VERSION,
39
39
  buildUserIdentityPrompt,
40
40
  runTestsTool
41
- } from "./chunk-M4QZYFPN.js";
41
+ } from "./chunk-YK5DDJNH.js";
42
42
  import {
43
43
  hasSemanticIndex,
44
44
  semanticSearch
@@ -5958,7 +5958,7 @@ var readFileTool = {
5958
5958
  dangerous: false
5959
5959
  },
5960
5960
  async execute(args) {
5961
- const filePath = String(args["path"] ?? "");
5961
+ const filePath = String(args["path"] ?? args["file"] ?? "");
5962
5962
  const encoding = args["encoding"] ?? "utf-8";
5963
5963
  const rawOffset = args["offset"];
5964
5964
  const rawLimit = args["limit"];
@@ -7833,7 +7833,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
7833
7833
  // executor 会将 write_file 标记为 'write' 级别
7834
7834
  },
7835
7835
  async execute(args) {
7836
- const filePath = String(args["path"] ?? "");
7836
+ const filePath = String(args["path"] ?? args["file"] ?? "");
7837
7837
  const content = String(args["content"] ?? "");
7838
7838
  const encoding = args["encoding"] ?? "utf-8";
7839
7839
  const appendMode = String(args["append"] ?? "false").toLowerCase() === "true";
@@ -8225,7 +8225,7 @@ Note: Path can be absolute or relative to cwd.`,
8225
8225
  // executor 中 edit_file 按 write 级别处理
8226
8226
  },
8227
8227
  async execute(args) {
8228
- const filePath = String(args["path"] ?? "");
8228
+ const filePath = String(args["path"] ?? args["file"] ?? "");
8229
8229
  const encoding = args["encoding"] ?? "utf-8";
8230
8230
  if (!filePath) throw new ToolError("edit_file", "path is required");
8231
8231
  if (!existsSync11(filePath)) throw new ToolError("edit_file", `File not found: ${filePath}`);
@@ -9626,7 +9626,7 @@ Any of these triggers means use save_last_response, NOT write_file:
9626
9626
  // getDangerLevel 中标记为 write
9627
9627
  },
9628
9628
  async execute(args) {
9629
- const filePath = String(args["path"] ?? "");
9629
+ const filePath = String(args["path"] ?? args["file"] ?? "");
9630
9630
  if (!filePath) throw new ToolError("save_last_response", "path is required");
9631
9631
  const content = lastResponseStore.content;
9632
9632
  if (!content) {
@@ -11687,7 +11687,7 @@ var notebookEditTool = {
11687
11687
  dangerous: false
11688
11688
  },
11689
11689
  async execute(args) {
11690
- const filePath = String(args["path"] ?? "");
11690
+ const filePath = String(args["path"] ?? args["file"] ?? "");
11691
11691
  const action = String(args["action"] ?? "");
11692
11692
  const cellIndexRaw = Number(args["cell_index"]);
11693
11693
  const content = args["content"] != null ? String(args["content"]) : "";
@@ -15289,6 +15289,50 @@ async function handleSession(args, ctx) {
15289
15289
  }
15290
15290
  if (sub === "delete" && args[1]) {
15291
15291
  const targetId = args[1];
15292
+ if (targetId === "--filter") {
15293
+ let filterMessages;
15294
+ for (let i = 1; i < args.length; i++) {
15295
+ if (args[i] === "--filter" && i + 1 < args.length) {
15296
+ const val = args[i + 1];
15297
+ i++;
15298
+ const eq = val.indexOf("=");
15299
+ if (eq > 0) {
15300
+ const key = val.slice(0, eq);
15301
+ const vals = val.slice(eq + 1).split(",").map((s) => s.trim().toLowerCase());
15302
+ if (key === "messages") {
15303
+ const n = Number(vals[0]);
15304
+ if (Number.isFinite(n) && n >= 0) filterMessages = n;
15305
+ }
15306
+ }
15307
+ }
15308
+ }
15309
+ if (filterMessages === void 0) {
15310
+ ctx.send({ type: "error", message: "Usage: /session delete --filter messages=N" });
15311
+ return;
15312
+ }
15313
+ const list2 = ctx.sessions.listSessions();
15314
+ const matches = list2.filter((s) => s.messageCount === filterMessages);
15315
+ if (matches.length === 0) {
15316
+ ctx.send({ type: "info", message: `No sessions with ${filterMessages} message(s) found.` });
15317
+ return;
15318
+ }
15319
+ let deleted = 0;
15320
+ let failed = 0;
15321
+ for (const s of matches) {
15322
+ if (ctx.sessions.deleteSession(s.id)) {
15323
+ deleted++;
15324
+ } else {
15325
+ failed++;
15326
+ }
15327
+ }
15328
+ if (!ctx.sessions.current) {
15329
+ ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
15330
+ ctx.resetWebSessionUsage();
15331
+ }
15332
+ ctx.send({ type: "info", message: `Deleted ${deleted} session(s) with ${filterMessages} message(s)${failed > 0 ? `, ${failed} failed` : ""}.` });
15333
+ ctx.sendSessionList();
15334
+ return;
15335
+ }
15292
15336
  const cachedKey = ctx.unsavedSessions.has(targetId) ? targetId : [...ctx.unsavedSessions.keys()].find((k) => k.startsWith(targetId));
15293
15337
  if (cachedKey) {
15294
15338
  ctx.unsavedSessions.delete(cachedKey);
@@ -15363,7 +15407,7 @@ async function handleSession(args, ctx) {
15363
15407
  }
15364
15408
  return;
15365
15409
  }
15366
- ctx.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id> | rename <id> <title>" });
15410
+ ctx.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id> | delete --filter messages=N | rename <id> <title>" });
15367
15411
  }
15368
15412
  async function handleExport(args, ctx) {
15369
15413
  const format = args[0] === "json" ? "json" : "md";
@@ -15973,7 +16017,7 @@ async function handleSecurityReview(args, ctx) {
15973
16017
  async function handleTest(args, ctx) {
15974
16018
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
15975
16019
  try {
15976
- const { executeTests } = await import("./run-tests-P6F27SWN.js");
16020
+ const { executeTests } = await import("./run-tests-DGV6D4L3.js");
15977
16021
  const argStr = args.join(" ").trim();
15978
16022
  let testArgs = {};
15979
16023
  if (argStr) {
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-6LKQAS74.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-YSHHXWNT.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  scanProject,
15
15
  sessionHasMeaningfulContent,
16
16
  setupProxy
17
- } from "./chunk-BWCZYPEU.js";
17
+ } from "./chunk-S4AKNVFK.js";
18
18
  import {
19
19
  buildReviewPrompt,
20
20
  buildSecurityReviewPrompt
@@ -52,7 +52,7 @@ import {
52
52
  theme,
53
53
  undoStack,
54
54
  updateMemoryApproval
55
- } from "./chunk-IZ4VM2P5.js";
55
+ } from "./chunk-APBHCIPD.js";
56
56
  import "./chunk-K3CF65QH.js";
57
57
  import "./chunk-UUSRWSSX.js";
58
58
  import "./chunk-CKH4KQ4E.js";
@@ -74,7 +74,7 @@ import {
74
74
  formatDoctorReport,
75
75
  loadContextFiles,
76
76
  writeCrashLog
77
- } from "./chunk-Q3XNGXNR.js";
77
+ } from "./chunk-WJJIP34H.js";
78
78
  import {
79
79
  ProviderRegistry
80
80
  } from "./chunk-PUBCJF7E.js";
@@ -94,7 +94,7 @@ import {
94
94
  trustHook,
95
95
  trustPlugin,
96
96
  untrustHook
97
- } from "./chunk-YUGXAALR.js";
97
+ } from "./chunk-7X5TVGVY.js";
98
98
  import {
99
99
  CONTENT_ONLY_STREAM_REMINDER,
100
100
  TEE_FINAL_USER_NUDGE,
@@ -116,7 +116,7 @@ import {
116
116
  } from "./chunk-XPBEJB27.js";
117
117
  import {
118
118
  ConfigManager
119
- } from "./chunk-6ISALPIH.js";
119
+ } from "./chunk-6LQ6PUNZ.js";
120
120
  import {
121
121
  AuthError,
122
122
  ProviderError,
@@ -130,7 +130,7 @@ import {
130
130
  import {
131
131
  fileCheckpoints
132
132
  } from "./chunk-4BKXL7SM.js";
133
- import "./chunk-RC7FBLFT.js";
133
+ import "./chunk-DKJ5EFKA.js";
134
134
  import {
135
135
  AGENTIC_BEHAVIOR_GUIDELINE,
136
136
  AUTHOR,
@@ -149,7 +149,7 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-DUKZBAI4.js";
152
+ } from "./chunk-CYVVWFFO.js";
153
153
  import {
154
154
  buildChatIndex,
155
155
  clearChatIndex,
@@ -279,7 +279,8 @@ var ABOUT_TOOL_DESCRIPTIONS = {
279
279
  get_outline: "Enumerate all top-level declarations in one source file",
280
280
  find_references: "Search indexed files for references to a symbol name",
281
281
  search_code: "Semantic (meaning-based) code search via local embeddings",
282
- recall_memory: 'Semantic recall over past chat sessions ("remember when\u2026")'
282
+ recall_memory: 'Semantic recall over past chat sessions ("remember when\u2026")',
283
+ stream_to_file: "Stream large content (>5KB) directly to disk (avoids output truncation)"
283
284
  };
284
285
  var ABOUT_FEATURES = [
285
286
  "Agentic loop: up to 200 tool-call rounds (configurable), final answer streamed",
@@ -427,15 +428,15 @@ var Renderer = class {
427
428
  const feat = (s) => theme.dim(" \u2726 ") + chalk.white(s);
428
429
  console.log();
429
430
  console.log(
430
- theme.heading(" \u{1F916} ai-cli") + theme.dim(` v${VERSION}`) + theme.dim(" \u2014 Cross-platform agentic AI assistant (REPL \xB7 Web \xB7 Desktop, 9 providers)")
431
+ theme.heading(" \u{1F916} ai-cli") + theme.dim(` v${VERSION}`) + theme.dim(" \u2014 Cross-platform agentic AI assistant (REPL \xB7 Web \xB7 Desktop, 10 providers)")
431
432
  );
432
433
  console.log(HR);
433
434
  console.log(label("Desc") + chalk.white(DESCRIPTION));
434
435
  console.log(label("Author") + theme.warning(AUTHOR) + theme.dim(" <" + AUTHOR_EMAIL + ">"));
435
436
  console.log(HR);
436
- console.log(theme.dim(" Supported Providers (9):"));
437
+ console.log(theme.dim(" Supported Providers (10):"));
437
438
  console.log(theme.dim(" OpenAI \xB7 DeepSeek \xB7 Kimi (Moonshot) \xB7 Claude (Anthropic) \xB7 MiniMax (\u6D77\u87BA)"));
438
- console.log(theme.dim(" Gemini (Google) \xB7 Zhipu (GLM) \xB7 OpenRouter \xB7 Ollama (Local, no API key)"));
439
+ console.log(theme.dim(" Gemini (Google) \xB7 Zhipu (GLM) \xB7 Qwen (\u901A\u4E49\u5343\u95EE) \xB7 OpenRouter \xB7 Ollama (Local, no API key)"));
439
440
  console.log(HR);
440
441
  const mcpToolCount = mcpInfo?.tools ?? 0;
441
442
  const toolTotal = builtinTools.length + pluginCount + mcpToolCount;
@@ -1049,7 +1050,7 @@ function createMiscCommands() {
1049
1050
  ["/tools", "List all AI tools available"],
1050
1051
  ["/plugins", "Show plugin directory and loaded plugins"],
1051
1052
  ["/plugin [list|install|enable|disable|inspect|trust]", "Manage package plugins"],
1052
- ["/mcp [reconnect [id]]", "MCP servers / reconnect disconnected"],
1053
+ ["/mcp [reconnect [serverId]|trust-project]", "Show MCP server connections and tools"],
1053
1054
  ["/skill [name|off|list]", "Manage agent skills (reusable prompt packs)"],
1054
1055
  ["/context", "Show or reload hierarchical context layers"],
1055
1056
  ["/add-dir [path|remove]", "Add/remove a directory from AI context"],
@@ -1833,7 +1834,7 @@ No tools match "${filter}".
1833
1834
  const { join: join7 } = await import("path");
1834
1835
  const { existsSync: existsSync6 } = await import("fs");
1835
1836
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1836
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-P4NBXYN5.js");
1837
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-HLNS4O5H.js");
1837
1838
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1838
1839
  const cwd = process.cwd();
1839
1840
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2812,7 +2813,7 @@ function createReviewCommands() {
2812
2813
  usage: "/test [command|filter]",
2813
2814
  async execute(args, ctx) {
2814
2815
  try {
2815
- const { executeTests } = await import("./run-tests-COCXP4B6.js");
2816
+ const { executeTests } = await import("./run-tests-QFYTNPSV.js");
2816
2817
  const argStr = args.join(" ").trim();
2817
2818
  let testArgs = {};
2818
2819
  if (argStr) {
@@ -3621,9 +3622,102 @@ function createSessionCommands() {
3621
3622
  }
3622
3623
  renderTranscriptPage(cur.messages, ctx.renderer, n);
3623
3624
  } else if (sub === "remove" || sub === "delete") {
3625
+ if (args[1] === "--filter") {
3626
+ let filterMessages;
3627
+ let dryRun = false;
3628
+ for (let i = 1; i < args.length; i++) {
3629
+ if (args[i] === "--filter" && i + 1 < args.length) {
3630
+ const val = args[++i];
3631
+ const eq = val.indexOf("=");
3632
+ if (eq > 0) {
3633
+ const key = val.slice(0, eq);
3634
+ const vals = val.slice(eq + 1).split(",").map((s) => s.trim().toLowerCase());
3635
+ if (key === "messages") {
3636
+ const n = Number(vals[0]);
3637
+ if (Number.isFinite(n) && n >= 0) filterMessages = n;
3638
+ else {
3639
+ ctx.renderer.renderError(`Invalid filter value for "messages": expected a non-negative integer, got "${vals[0]}"`);
3640
+ return;
3641
+ }
3642
+ } else {
3643
+ ctx.renderer.renderError(`Unsupported filter key for remove: "${key}". Only "messages" is supported.`);
3644
+ return;
3645
+ }
3646
+ } else {
3647
+ ctx.renderer.renderError(`Invalid --filter syntax: "${val}". Expected key=value (e.g., messages=0)`);
3648
+ return;
3649
+ }
3650
+ } else if (args[i] === "--dry-run") {
3651
+ dryRun = true;
3652
+ }
3653
+ }
3654
+ if (filterMessages === void 0) {
3655
+ ctx.renderer.renderError("Usage: /session remove --filter messages=N [--dry-run]");
3656
+ return;
3657
+ }
3658
+ const allSessions = ctx.sessions.listSessions();
3659
+ const matches3 = allSessions.filter((s) => s.messageCount === filterMessages);
3660
+ if (matches3.length === 0) {
3661
+ ctx.renderer.printInfo(`No sessions with ${filterMessages} message(s) found.`);
3662
+ return;
3663
+ }
3664
+ console.log();
3665
+ console.log(
3666
+ theme.warning(` Found ${matches3.length} session(s) with ${filterMessages} message(s):`)
3667
+ );
3668
+ for (const s of matches3.slice(0, 20)) {
3669
+ console.log(
3670
+ theme.dim(
3671
+ ` ${s.id.slice(0, 12)} ${s.provider}/${s.model} ${String(s.messageCount).padStart(4)} msgs ${s.updated.toISOString().slice(0, 10)} ${truncateTitle(s.title ?? "(untitled)", 60)}`
3672
+ )
3673
+ );
3674
+ }
3675
+ if (matches3.length > 20) {
3676
+ console.log(theme.dim(` ... and ${matches3.length - 20} more`));
3677
+ }
3678
+ if (dryRun) {
3679
+ console.log(
3680
+ theme.info(`
3681
+ --dry-run: no sessions were deleted. Remove --dry-run to actually delete.`)
3682
+ );
3683
+ return;
3684
+ }
3685
+ console.log();
3686
+ const choice2 = await ctx.select(
3687
+ `Delete all ${matches3.length} matching sessions?`,
3688
+ [
3689
+ { label: "No \u2014 keep them", value: "no" },
3690
+ { label: "Yes \u2014 delete permanently", value: "yes", hint: "unlinks all matching history files" }
3691
+ ]
3692
+ );
3693
+ if (choice2 !== "yes") {
3694
+ ctx.renderer.printInfo("Cancelled \u2014 no sessions deleted.");
3695
+ return;
3696
+ }
3697
+ let deleted = 0;
3698
+ let failed = 0;
3699
+ for (const s of matches3) {
3700
+ if (ctx.sessions.deleteSession(s.id)) {
3701
+ deleted++;
3702
+ } else {
3703
+ failed++;
3704
+ }
3705
+ }
3706
+ const currentStillExists = ctx.sessions.current !== null;
3707
+ ctx.renderer.printSuccess(
3708
+ `Removed: ${deleted} deleted${failed > 0 ? `, ${failed} failed` : ""}.`
3709
+ );
3710
+ if (!currentStillExists) {
3711
+ ctx.sessions.createSession(ctx.getCurrentProvider(), ctx.getCurrentModel());
3712
+ ctx.resetSessionTokenUsage();
3713
+ ctx.clearDevState();
3714
+ ctx.renderer.printInfo("Current session was among deleted \u2014 started a fresh session.");
3715
+ }
3716
+ return;
3717
+ }
3624
3718
  const id = args[1];
3625
3719
  if (!id) {
3626
- ctx.renderer.renderError("Usage: /session remove <id>");
3720
+ ctx.renderer.renderError("Usage: /session remove <id> | /session remove --filter messages=N [--dry-run]");
3627
3721
  return;
3628
3722
  }
3629
3723
  const sessions = ctx.sessions.listSessions();
@@ -3731,7 +3825,7 @@ function createSessionCommands() {
3731
3825
  `Cleaned up: ${deleted} deleted${failed > 0 ? `, ${failed} failed` : ""}.`
3732
3826
  );
3733
3827
  } else {
3734
- ctx.renderer.renderError("Usage: /session new|list|load <id>|show <id> [page]|page <n>|remove <id>");
3828
+ ctx.renderer.renderError("Usage: /session new|list|load <id>|show <id> [page]|page <n>|remove <id>|remove --filter messages=N [--dry-run]|clean --stale N [--dry-run]");
3735
3829
  }
3736
3830
  }
3737
3831
  },
@@ -7664,7 +7758,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7664
7758
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7665
7759
  process.exit(1);
7666
7760
  }
7667
- const { startWebServer } = await import("./server-BG3J7GFG.js");
7761
+ const { startWebServer } = await import("./server-ZQYQDQMT.js");
7668
7762
  await startWebServer({ port, host: options.host });
7669
7763
  });
7670
7764
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
@@ -7831,11 +7925,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7831
7925
  console.log(footer + "\n");
7832
7926
  });
7833
7927
  program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
7834
- const { runUsageCli } = await import("./usage-IPFSL5WT.js");
7928
+ const { runUsageCli } = await import("./usage-QDSXUKN7.js");
7835
7929
  await runUsageCli(options);
7836
7930
  });
7837
7931
  program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
7838
- const { runDoctorCli } = await import("./doctor-cli-SEX44HGI.js");
7932
+ const { runDoctorCli } = await import("./doctor-cli-LA4AF6DK.js");
7839
7933
  const argv = process.argv.slice(2);
7840
7934
  await runDoctorCli({
7841
7935
  json: !!options.json || argv.includes("--json"),
@@ -7844,7 +7938,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7844
7938
  });
7845
7939
  program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
7846
7940
  try {
7847
- const batch = await import("./batch-OWM7PN4L.js");
7941
+ const batch = await import("./batch-W2DJGST7.js");
7848
7942
  switch (action) {
7849
7943
  case "submit":
7850
7944
  if (!arg) {
@@ -7887,7 +7981,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7887
7981
  }
7888
7982
  });
7889
7983
  program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
7890
- const { startMcpServer } = await import("./server-J4W6UZXJ.js");
7984
+ const { startMcpServer } = await import("./server-GTIVGJ6S.js");
7891
7985
  await startMcpServer({
7892
7986
  allowDestructive: !!options.allowDestructive,
7893
7987
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7900,7 +7994,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7900
7994
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7901
7995
  process.exit(1);
7902
7996
  }
7903
- const { runPrCli } = await import("./pr-DK6ENTZN.js");
7997
+ const { runPrCli } = await import("./pr-CDJFUPZX.js");
7904
7998
  const result = await runPrCli({
7905
7999
  action,
7906
8000
  target,
@@ -7920,8 +8014,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7920
8014
  process.exit(result.exitCode);
7921
8015
  });
7922
8016
  program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
7923
- const { runCi } = await import("./ci-RTGUV5C3.js");
7924
- const { formatCiResult } = await import("./ci-format-QDBP5WBU.js");
8017
+ const { runCi } = await import("./ci-PEOV2I3Z.js");
8018
+ const { formatCiResult } = await import("./ci-format-4O7SHP4F.js");
7925
8019
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
7926
8020
  if (formats > 1) {
7927
8021
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8079,7 +8173,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8079
8173
  config.get("customProviders"),
8080
8174
  config.getConfigDir()
8081
8175
  );
8082
- const { startHub } = await import("./hub-FAKZZQGX.js");
8176
+ const { startHub } = await import("./hub-MAJE7GB7.js");
8083
8177
  await startHub(
8084
8178
  {
8085
8179
  topic: topic ?? "",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-MFFMRTP6.js";
6
- import "./chunk-YENINV7F.js";
5
+ } from "./chunk-OMFVR2O7.js";
6
+ import "./chunk-NBG2STGM.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -15,11 +15,11 @@ import {
15
15
  import "./chunk-XPBEJB27.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-6ISALPIH.js";
18
+ } from "./chunk-6LQ6PUNZ.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-DUKZBAI4.js";
22
+ } from "./chunk-CYVVWFFO.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-M4QZYFPN.js";
4
+ } from "./chunk-YK5DDJNH.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-RC7FBLFT.js";
6
- import "./chunk-DUKZBAI4.js";
5
+ } from "./chunk-DKJ5EFKA.js";
6
+ import "./chunk-CYVVWFFO.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-IZ4VM2P5.js";
4
+ } from "./chunk-APBHCIPD.js";
5
5
  import "./chunk-K3CF65QH.js";
6
6
  import "./chunk-UUSRWSSX.js";
7
7
  import "./chunk-CKH4KQ4E.js";
8
8
  import "./chunk-BXP6YZ2P.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-YUGXAALR.js";
11
+ } from "./chunk-7X5TVGVY.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
@@ -16,10 +16,10 @@ import {
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-RC7FBLFT.js";
19
+ import "./chunk-DKJ5EFKA.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-DUKZBAI4.js";
22
+ } from "./chunk-CYVVWFFO.js";
23
23
  import "./chunk-NVUCDUXE.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
25
  import "./chunk-B5TYJO7V.js";
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-BWCZYPEU.js";
26
+ } from "./chunk-S4AKNVFK.js";
27
27
  import {
28
28
  buildReviewPrompt,
29
29
  buildSecurityReviewPrompt
@@ -67,7 +67,7 @@ import {
67
67
  truncateOutput,
68
68
  undoStack,
69
69
  updateMemoryApproval
70
- } from "./chunk-IZ4VM2P5.js";
70
+ } from "./chunk-APBHCIPD.js";
71
71
  import "./chunk-K3CF65QH.js";
72
72
  import "./chunk-UUSRWSSX.js";
73
73
  import "./chunk-CKH4KQ4E.js";
@@ -84,7 +84,7 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-Q3XNGXNR.js";
87
+ } from "./chunk-WJJIP34H.js";
88
88
  import {
89
89
  ProviderRegistry
90
90
  } from "./chunk-PUBCJF7E.js";
@@ -102,7 +102,7 @@ import {
102
102
  runTool,
103
103
  setPluginEnabled,
104
104
  trustPlugin
105
- } from "./chunk-YUGXAALR.js";
105
+ } from "./chunk-7X5TVGVY.js";
106
106
  import {
107
107
  CONTENT_ONLY_STREAM_REMINDER,
108
108
  TEE_FINAL_USER_NUDGE,
@@ -121,7 +121,7 @@ import {
121
121
  } from "./chunk-XPBEJB27.js";
122
122
  import {
123
123
  ConfigManager
124
- } from "./chunk-6ISALPIH.js";
124
+ } from "./chunk-6LQ6PUNZ.js";
125
125
  import "./chunk-5ULLIOVC.js";
126
126
  import {
127
127
  formatGitContextForPrompt,
@@ -129,7 +129,7 @@ import {
129
129
  getGitRoot
130
130
  } from "./chunk-HOSJZMQS.js";
131
131
  import "./chunk-4BKXL7SM.js";
132
- import "./chunk-RC7FBLFT.js";
132
+ import "./chunk-DKJ5EFKA.js";
133
133
  import {
134
134
  AGENTIC_BEHAVIOR_GUIDELINE,
135
135
  AUTHOR,
@@ -146,7 +146,7 @@ import {
146
146
  SKILLS_DIR_NAME,
147
147
  VERSION,
148
148
  buildUserIdentityPrompt
149
- } from "./chunk-DUKZBAI4.js";
149
+ } from "./chunk-CYVVWFFO.js";
150
150
  import "./chunk-NVUCDUXE.js";
151
151
  import "./chunk-KHYD3WXE.js";
152
152
  import {
@@ -870,6 +870,50 @@ async function handleSession(args, ctx) {
870
870
  }
871
871
  if (sub === "delete" && args[1]) {
872
872
  const targetId = args[1];
873
+ if (targetId === "--filter") {
874
+ let filterMessages;
875
+ for (let i = 1; i < args.length; i++) {
876
+ if (args[i] === "--filter" && i + 1 < args.length) {
877
+ const val = args[i + 1];
878
+ i++;
879
+ const eq = val.indexOf("=");
880
+ if (eq > 0) {
881
+ const key = val.slice(0, eq);
882
+ const vals = val.slice(eq + 1).split(",").map((s) => s.trim().toLowerCase());
883
+ if (key === "messages") {
884
+ const n = Number(vals[0]);
885
+ if (Number.isFinite(n) && n >= 0) filterMessages = n;
886
+ }
887
+ }
888
+ }
889
+ }
890
+ if (filterMessages === void 0) {
891
+ ctx.send({ type: "error", message: "Usage: /session delete --filter messages=N" });
892
+ return;
893
+ }
894
+ const list2 = ctx.sessions.listSessions();
895
+ const matches = list2.filter((s) => s.messageCount === filterMessages);
896
+ if (matches.length === 0) {
897
+ ctx.send({ type: "info", message: `No sessions with ${filterMessages} message(s) found.` });
898
+ return;
899
+ }
900
+ let deleted = 0;
901
+ let failed = 0;
902
+ for (const s of matches) {
903
+ if (ctx.sessions.deleteSession(s.id)) {
904
+ deleted++;
905
+ } else {
906
+ failed++;
907
+ }
908
+ }
909
+ if (!ctx.sessions.current) {
910
+ ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
911
+ ctx.resetWebSessionUsage();
912
+ }
913
+ ctx.send({ type: "info", message: `Deleted ${deleted} session(s) with ${filterMessages} message(s)${failed > 0 ? `, ${failed} failed` : ""}.` });
914
+ ctx.sendSessionList();
915
+ return;
916
+ }
873
917
  const cachedKey = ctx.unsavedSessions.has(targetId) ? targetId : [...ctx.unsavedSessions.keys()].find((k) => k.startsWith(targetId));
874
918
  if (cachedKey) {
875
919
  ctx.unsavedSessions.delete(cachedKey);
@@ -944,7 +988,7 @@ async function handleSession(args, ctx) {
944
988
  }
945
989
  return;
946
990
  }
947
- ctx.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id> | rename <id> <title>" });
991
+ ctx.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id> | delete --filter messages=N | rename <id> <title>" });
948
992
  }
949
993
  async function handleExport(args, ctx) {
950
994
  const format = args[0] === "json" ? "json" : "md";
@@ -1554,7 +1598,7 @@ async function handleSecurityReview(args, ctx) {
1554
1598
  async function handleTest(args, ctx) {
1555
1599
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1556
1600
  try {
1557
- const { executeTests } = await import("./run-tests-COCXP4B6.js");
1601
+ const { executeTests } = await import("./run-tests-QFYTNPSV.js");
1558
1602
  const argStr = args.join(" ").trim();
1559
1603
  let testArgs = {};
1560
1604
  if (argStr) {
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-IZ4VM2P5.js";
6
+ } from "./chunk-APBHCIPD.js";
7
7
  import "./chunk-K3CF65QH.js";
8
8
  import "./chunk-UUSRWSSX.js";
9
9
  import "./chunk-CKH4KQ4E.js";
10
10
  import "./chunk-BXP6YZ2P.js";
11
11
  import {
12
12
  runTool
13
- } from "./chunk-YUGXAALR.js";
13
+ } from "./chunk-7X5TVGVY.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
@@ -18,10 +18,10 @@ import {
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-RC7FBLFT.js";
21
+ import "./chunk-DKJ5EFKA.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-DUKZBAI4.js";
24
+ } from "./chunk-CYVVWFFO.js";
25
25
  import "./chunk-NVUCDUXE.js";
26
26
  import "./chunk-KHYD3WXE.js";
27
27
  import "./chunk-B5TYJO7V.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-6ISALPIH.js";
11
+ } from "./chunk-6LQ6PUNZ.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-DUKZBAI4.js";
13
+ import "./chunk-CYVVWFFO.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
 
16
16
  // src/cli/usage.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.225",
3
+ "version": "0.4.227",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",