jinzd-ai-cli 0.4.263 → 0.4.265

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 (41) hide show
  1. package/README.md +59 -37
  2. package/README.zh-CN.md +63 -41
  3. package/dist/{batch-AN47AYCZ.js → batch-C7SHXRQ2.js} +2 -2
  4. package/dist/{chunk-VT6NRDD2.js → chunk-23SJVOQD.js} +6 -2
  5. package/dist/{chunk-QMB7QYZC.js → chunk-2MR7EP24.js} +1 -1
  6. package/dist/chunk-5C76XDDF.js +78 -0
  7. package/dist/chunk-6YZEZFX5.js +40 -0
  8. package/dist/{chunk-TL5MD5XU.js → chunk-AUEX6RNY.js} +17 -1
  9. package/dist/{chunk-MTZ6XHJD.js → chunk-CVI3LSGR.js} +2 -2
  10. package/dist/{chunk-B27MLWFJ.js → chunk-E3JRGJCJ.js} +4 -4
  11. package/dist/{chunk-MJICIIBW.js → chunk-IFTUBTDA.js} +1 -1
  12. package/dist/{chunk-VUZAKIZ5.js → chunk-LZBD2VGJ.js} +1 -1
  13. package/dist/{chunk-3RHY2HF7.js → chunk-M2RKBTVZ.js} +1 -1
  14. package/dist/{chunk-7YCA2BD3.js → chunk-NJLPA6S4.js} +1 -1
  15. package/dist/{chunk-GMZTY7DA.js → chunk-NOS3QV7G.js} +13 -8
  16. package/dist/{chunk-GKI7B4BD.js → chunk-TJBG4F2R.js} +24 -95
  17. package/dist/{chunk-QG4NG7KJ.js → chunk-V4D7YD24.js} +9 -2
  18. package/dist/{chunk-3ARPAVNV.js → chunk-VOIOUJXI.js} +11 -3
  19. package/dist/{chunk-WM4VTGAF.js → chunk-X6NWK2YK.js} +1 -1
  20. package/dist/{chunk-VKBGOFEO.js → chunk-Y7KJPNQI.js} +1 -1
  21. package/dist/{chunk-XST4N2JM.js → chunk-YDTYBUAB.js} +1 -1
  22. package/dist/{chunk-5K2LFD7D.js → chunk-YXYOLPDB.js} +1 -1
  23. package/dist/{ci-JTO7LN5S.js → ci-TDXLI3OM.js} +6 -5
  24. package/dist/{ci-format-2VGHOLBA.js → ci-format-AFX2LP4Y.js} +2 -2
  25. package/dist/{constants-HLSJL5HQ.js → constants-66TQEDGO.js} +1 -1
  26. package/dist/{doctor-cli-JML4FGH4.js → doctor-cli-GMCOGCDR.js} +5 -5
  27. package/dist/electron-server.js +57 -12
  28. package/dist/{hub-6EYFGJRT.js → hub-2YXETHPY.js} +8 -4
  29. package/dist/{hub-server-QGUSMN22.js → hub-server-RF6LURXY.js} +3 -1
  30. package/dist/index.js +123 -546
  31. package/dist/{persistent-memory-MPBPSZDN.js → persistent-memory-2DKCETB7.js} +2 -2
  32. package/dist/{persistent-memory-ANIMO5CF.js → persistent-memory-WTZO5CQ7.js} +2 -2
  33. package/dist/{pr-XE7NGT6U.js → pr-Y2LDG3R7.js} +15 -10
  34. package/dist/{run-tests-TF7UPUWW.js → run-tests-FIUGDIDL.js} +2 -2
  35. package/dist/{run-tests-ME5KED57.js → run-tests-PWTNSUVP.js} +2 -2
  36. package/dist/{server-VKA4FR2Z.js → server-OZ4RFDFH.js} +25 -15
  37. package/dist/{server-BIYJEJK3.js → server-ZCG5QD6P.js} +6 -5
  38. package/dist/setup-wizard-S55ICNHH.js +483 -0
  39. package/dist/{task-orchestrator-2RAKLFWN.js → task-orchestrator-Q2L6JEUX.js} +10 -7
  40. package/dist/{usage-5F5Q3GGR.js → usage-SDL5Z4CS.js} +3 -3
  41. package/package.json +1 -1
@@ -28,9 +28,9 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-VUZAKIZ5.js";
31
+ } from "./chunk-LZBD2VGJ.js";
32
32
  import "./chunk-HOSJZMQS.js";
33
- import "./chunk-VKBGOFEO.js";
33
+ import "./chunk-Y7KJPNQI.js";
34
34
  import "./chunk-B5TYJO7V.js";
35
35
  import "./chunk-IW3Q7AE5.js";
36
36
  export {
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-5K2LFD7D.js";
30
+ } from "./chunk-YXYOLPDB.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-3RHY2HF7.js";
32
+ import "./chunk-M2RKBTVZ.js";
33
33
  import "./chunk-6BUTA5VW.js";
34
34
  export {
35
35
  addMemoryEntry,
@@ -2,24 +2,27 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-GMZTY7DA.js";
6
- import "./chunk-MJICIIBW.js";
5
+ } from "./chunk-NOS3QV7G.js";
6
+ import "./chunk-IFTUBTDA.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
10
10
  truncateDiff
11
11
  } from "./chunk-HLWUDRBO.js";
12
+ import {
13
+ thinkingParamsFor
14
+ } from "./chunk-6YZEZFX5.js";
12
15
  import {
13
16
  ProviderRegistry
14
- } from "./chunk-TL5MD5XU.js";
17
+ } from "./chunk-AUEX6RNY.js";
15
18
  import {
16
19
  ConfigManager
17
- } from "./chunk-WM4VTGAF.js";
20
+ } from "./chunk-X6NWK2YK.js";
18
21
  import "./chunk-3OBY7WSS.js";
19
22
  import "./chunk-TU3L3PW7.js";
20
23
  import {
21
24
  VERSION
22
- } from "./chunk-VKBGOFEO.js";
25
+ } from "./chunk-Y7KJPNQI.js";
23
26
  import "./chunk-IW3Q7AE5.js";
24
27
 
25
28
  // src/cli/pr.ts
@@ -185,16 +188,18 @@ async function getProvider(opts) {
185
188
  const providerId = opts.provider ?? config.getDefaultProvider();
186
189
  if (!registry.has(providerId)) throw new Error(`Provider '${providerId}' is not configured. Set the right AICLI_API_KEY_* env var or pass --provider.`);
187
190
  const info = registry.get(providerId).info;
188
- return { registry, providerId, modelId: opts.model ?? config.get("defaultModels")[providerId] ?? info.defaultModel };
191
+ const modelId = opts.model ?? config.get("defaultModels")[providerId] ?? info.defaultModel;
192
+ return { registry, providerId, modelId, thinking: thinkingParamsFor(config.get("modelParams"), modelId) };
189
193
  }
190
- async function runPrompt(registry, providerId, modelId, prompt) {
194
+ async function runPrompt(registry, providerId, modelId, prompt, thinking = {}) {
191
195
  const provider = registry.get(providerId);
192
196
  const resp = await provider.chat({
193
197
  messages: [{ role: "user", content: prompt, timestamp: /* @__PURE__ */ new Date() }],
194
198
  model: modelId,
195
199
  stream: false,
196
200
  temperature: 0.3,
197
- maxTokens: 8192
201
+ maxTokens: 8192,
202
+ ...thinking
198
203
  });
199
204
  return resp.content?.trim() ?? "";
200
205
  }
@@ -248,9 +253,9 @@ async function runPrCli(opts) {
248
253
  if (source.metadata) sections.push(`> ${metadataMarkdown(source.metadata).trim()}`, "");
249
254
  try {
250
255
  const prompt = opts.action === "security-review" ? buildSecurityReviewPrompt(trimmedDiff, gitContext) : opts.action === "summarize" ? buildSummaryPrompt(trimmedDiff, gitContext) : buildReviewPrompt(trimmedDiff, gitContext, !!opts.detailed);
251
- sections.push(await runPrompt(providerBundle.registry, providerBundle.providerId, providerBundle.modelId, prompt), "");
256
+ sections.push(await runPrompt(providerBundle.registry, providerBundle.providerId, providerBundle.modelId, prompt, providerBundle.thinking), "");
252
257
  if (requestedAgents.length) {
253
- const outputs = await Promise.all(requestedAgents.map(async (agent) => ({ agent, output: await runPrompt(providerBundle.registry, providerBundle.providerId, providerBundle.modelId, buildAgentPrompt(agent, trimmedDiff, gitContext)) })));
258
+ const outputs = await Promise.all(requestedAgents.map(async (agent) => ({ agent, output: await runPrompt(providerBundle.registry, providerBundle.providerId, providerBundle.modelId, buildAgentPrompt(agent, trimmedDiff, gitContext), providerBundle.thinking) })));
254
259
  sections.push("### Agent Lenses", "");
255
260
  for (const item of outputs) sections.push(`#### ${item.agent}`, item.output, "");
256
261
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-7YCA2BD3.js";
5
- import "./chunk-3RHY2HF7.js";
4
+ } from "./chunk-NJLPA6S4.js";
5
+ import "./chunk-M2RKBTVZ.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-XST4N2JM.js";
6
- import "./chunk-VKBGOFEO.js";
5
+ } from "./chunk-YDTYBUAB.js";
6
+ import "./chunk-Y7KJPNQI.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -3,8 +3,8 @@ import {
3
3
  DiscussionOrchestrator,
4
4
  getPreset,
5
5
  resolveRoleProviders
6
- } from "./chunk-VT6NRDD2.js";
7
- import "./chunk-3ARPAVNV.js";
6
+ } from "./chunk-23SJVOQD.js";
7
+ import "./chunk-VOIOUJXI.js";
8
8
  import {
9
9
  persistDiscussion
10
10
  } from "./chunk-JQXXPTWL.js";
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-MTZ6XHJD.js";
26
+ } from "./chunk-CVI3LSGR.js";
27
27
  import {
28
28
  computeCost,
29
29
  formatCost,
@@ -33,6 +33,9 @@ import {
33
33
  buildReviewPrompt,
34
34
  buildSecurityReviewPrompt
35
35
  } from "./chunk-HLWUDRBO.js";
36
+ import {
37
+ thinkingParamsFor
38
+ } from "./chunk-6YZEZFX5.js";
36
39
  import {
37
40
  ToolExecutor,
38
41
  ToolRegistry,
@@ -64,7 +67,7 @@ import {
64
67
  spawnAgentContext,
65
68
  truncateOutput,
66
69
  undoStack
67
- } from "./chunk-GKI7B4BD.js";
70
+ } from "./chunk-TJBG4F2R.js";
68
71
  import {
69
72
  addMemoryEntry,
70
73
  clearMemoryEntries,
@@ -78,11 +81,12 @@ import {
78
81
  parseWritableScope,
79
82
  updateMemoryApproval,
80
83
  updateMemoryEntry
81
- } from "./chunk-VUZAKIZ5.js";
84
+ } from "./chunk-LZBD2VGJ.js";
82
85
  import "./chunk-GLSR2NR3.js";
83
86
  import "./chunk-UUSRWSSX.js";
84
87
  import "./chunk-CKH4KQ4E.js";
85
88
  import "./chunk-BXP6YZ2P.js";
89
+ import "./chunk-5C76XDDF.js";
86
90
  import {
87
91
  SessionManager,
88
92
  getContentText
@@ -91,13 +95,13 @@ import {
91
95
  buildDoctorReport,
92
96
  formatDoctorReport,
93
97
  loadContextFiles
94
- } from "./chunk-B27MLWFJ.js";
98
+ } from "./chunk-E3JRGJCJ.js";
95
99
  import {
96
100
  ProviderRegistry
97
- } from "./chunk-TL5MD5XU.js";
101
+ } from "./chunk-AUEX6RNY.js";
98
102
  import {
99
103
  ConfigManager
100
- } from "./chunk-WM4VTGAF.js";
104
+ } from "./chunk-X6NWK2YK.js";
101
105
  import {
102
106
  describePlugin,
103
107
  getActivePluginAssets,
@@ -112,7 +116,7 @@ import {
112
116
  runTool,
113
117
  setPluginEnabled,
114
118
  trustPlugin
115
- } from "./chunk-QMB7QYZC.js";
119
+ } from "./chunk-2MR7EP24.js";
116
120
  import {
117
121
  CONTENT_ONLY_STREAM_REMINDER,
118
122
  TEE_FINAL_USER_NUDGE,
@@ -137,7 +141,7 @@ import {
137
141
  getGitRoot
138
142
  } from "./chunk-HOSJZMQS.js";
139
143
  import "./chunk-4BKXL7SM.js";
140
- import "./chunk-XST4N2JM.js";
144
+ import "./chunk-YDTYBUAB.js";
141
145
  import {
142
146
  AGENTIC_BEHAVIOR_GUIDELINE,
143
147
  AUTHOR,
@@ -153,7 +157,7 @@ import {
153
157
  SKILLS_DIR_NAME,
154
158
  VERSION,
155
159
  buildUserIdentityPrompt
156
- } from "./chunk-VKBGOFEO.js";
160
+ } from "./chunk-Y7KJPNQI.js";
157
161
  import "./chunk-6RPGQ5CG.js";
158
162
  import "./chunk-KHYD3WXE.js";
159
163
  import "./chunk-NYNSYLFY.js";
@@ -754,9 +758,14 @@ async function handleModel(args, ctx) {
754
758
  async function handleThink(args, ctx) {
755
759
  const sub = args[0]?.toLowerCase() ?? "toggle";
756
760
  if (sub === "status") {
761
+ const configured = ctx.config.get("modelParams")[ctx.currentModel]?.thinking;
762
+ const effective = ctx.runtimeThinking ?? configured ?? false;
763
+ const origin = ctx.runtimeThinking !== null ? "runtime" : configured !== void 0 ? "config" : "default";
764
+ const supportsEffort = ctx.providers.get(ctx.currentProvider)?.supportsReasoningEffort ?? false;
765
+ const effortPart = !effective ? "" : supportsEffort ? `; effort: ${ctx.runtimeThinkingEffort ?? ctx.config.get("modelParams")[ctx.currentModel]?.thinkingEffort ?? "high (provider default)"}` : `; effort: n/a for ${ctx.currentProvider}`;
757
766
  ctx.send({
758
767
  type: "info",
759
- message: `Thinking mode: ${ctx.runtimeThinking === null ? "CONFIG" : ctx.runtimeThinking ? "ON" : "OFF"}; effort: ${ctx.runtimeThinkingEffort ?? "config/default (high for DeepSeek V4)"}`
768
+ message: `Thinking mode: ${effective ? "ON" : "OFF"} (${origin})${effortPart}`
760
769
  });
761
770
  return;
762
771
  }
@@ -828,7 +837,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
828
837
  Cost: ${formatCost(cost)}` : "";
829
838
  let memoryLine = "";
830
839
  try {
831
- const { countPendingMemories } = await import("./persistent-memory-MPBPSZDN.js");
840
+ const { countPendingMemories } = await import("./persistent-memory-2DKCETB7.js");
832
841
  const pending = countPendingMemories(ctx.config.getConfigDir());
833
842
  if (pending > 0) memoryLine = `
834
843
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1643,7 +1652,7 @@ async function handleTest(args, ctx) {
1643
1652
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1644
1653
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1645
1654
  }
1646
- const runTests = ctx.runTests ?? (await import("./run-tests-ME5KED57.js")).executeTests;
1655
+ const runTests = ctx.runTests ?? (await import("./run-tests-PWTNSUVP.js")).executeTests;
1647
1656
  const report = await runTests(testArgs);
1648
1657
  ctx.send({ type: "info", message: report });
1649
1658
  } catch (err) {
@@ -1901,7 +1910,7 @@ async function handleMemory(args, ctx) {
1901
1910
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
1902
1911
  } else if (sub === "export") {
1903
1912
  if (args[1] === "md") {
1904
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-MPBPSZDN.js");
1913
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-2DKCETB7.js");
1905
1914
  ctx.send({
1906
1915
  type: "export_data",
1907
1916
  format: "md",
@@ -2684,6 +2693,7 @@ var SessionHandler = class {
2684
2693
  const roles = resolution.roles;
2685
2694
  for (const w of resolution.warnings) this.send({ type: "info", message: w });
2686
2695
  const config = {
2696
+ thinking: thinkingParamsFor(this.config.get("modelParams"), this.currentModel),
2687
2697
  mode: "discuss",
2688
2698
  roles,
2689
2699
  defaultProvider,
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-GKI7B4BD.js";
5
- import "./chunk-VUZAKIZ5.js";
4
+ } from "./chunk-TJBG4F2R.js";
5
+ import "./chunk-LZBD2VGJ.js";
6
6
  import "./chunk-GLSR2NR3.js";
7
7
  import "./chunk-UUSRWSSX.js";
8
8
  import "./chunk-CKH4KQ4E.js";
9
9
  import "./chunk-BXP6YZ2P.js";
10
+ import "./chunk-5C76XDDF.js";
10
11
  import {
11
12
  runTool
12
- } from "./chunk-QMB7QYZC.js";
13
+ } from "./chunk-2MR7EP24.js";
13
14
  import {
14
15
  getDangerLevel,
15
16
  schemaToJsonSchema
@@ -17,10 +18,10 @@ import {
17
18
  import "./chunk-TU3L3PW7.js";
18
19
  import "./chunk-HOSJZMQS.js";
19
20
  import "./chunk-4BKXL7SM.js";
20
- import "./chunk-XST4N2JM.js";
21
+ import "./chunk-YDTYBUAB.js";
21
22
  import {
22
23
  VERSION
23
- } from "./chunk-VKBGOFEO.js";
24
+ } from "./chunk-Y7KJPNQI.js";
24
25
  import "./chunk-6RPGQ5CG.js";
25
26
  import "./chunk-KHYD3WXE.js";
26
27
  import "./chunk-NYNSYLFY.js";