jinzd-ai-cli 0.4.264 → 0.4.266
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/README.md +59 -37
- package/README.zh-CN.md +63 -41
- package/dist/{batch-Q22M55UP.js → batch-FQU6HK3Z.js} +2 -2
- package/dist/{chunk-VT6NRDD2.js → chunk-23SJVOQD.js} +6 -2
- package/dist/{chunk-K7HQLXXQ.js → chunk-3O4VLKD4.js} +1 -1
- package/dist/chunk-5C76XDDF.js +78 -0
- package/dist/chunk-6YZEZFX5.js +40 -0
- package/dist/{chunk-TL5MD5XU.js → chunk-AUEX6RNY.js} +17 -1
- package/dist/{chunk-IAIUXBB5.js → chunk-CEJUB4YV.js} +1 -1
- package/dist/{chunk-4T4KHPRD.js → chunk-FA3HGXXM.js} +1 -1
- package/dist/{chunk-BMSBFK7J.js → chunk-FIDEG2PG.js} +4 -4
- package/dist/{chunk-UQP2BNQT.js → chunk-GWOZET2E.js} +1 -1
- package/dist/{chunk-JVUYKO4V.js → chunk-LGJ7EX2F.js} +1 -1
- package/dist/{chunk-TANTNIGP.js → chunk-LHY7ST6X.js} +1 -1
- package/dist/{chunk-QCZFHQHY.js → chunk-N2E6GFLZ.js} +1 -1
- package/dist/{chunk-U4XQIP7Z.js → chunk-QW76RX6G.js} +1 -1
- package/dist/{chunk-UGJIRJ4H.js → chunk-TJNBSR3I.js} +1 -1
- package/dist/{chunk-IEYR2BGG.js → chunk-UCHND2K6.js} +65 -2
- package/dist/{chunk-QG4NG7KJ.js → chunk-V4D7YD24.js} +9 -2
- package/dist/{chunk-3ARPAVNV.js → chunk-VOIOUJXI.js} +11 -3
- package/dist/{chunk-DYONT23T.js → chunk-XEVURCAM.js} +13 -8
- package/dist/{chunk-53SOOMYG.js → chunk-Y2X24VYB.js} +24 -95
- package/dist/{ci-RMEIHZJL.js → ci-GZH3QMME.js} +6 -5
- package/dist/{ci-format-UCFSWVG5.js → ci-format-VKP2MGYJ.js} +2 -2
- package/dist/{constants-Z2R2BKUY.js → constants-ICAF6I3J.js} +1 -1
- package/dist/{doctor-cli-64L7BBK7.js → doctor-cli-CO6BJWRW.js} +5 -5
- package/dist/electron-server.js +127 -26
- package/dist/{hub-P7D6VDCK.js → hub-4APIRQ73.js} +8 -4
- package/dist/{hub-server-QGUSMN22.js → hub-server-RF6LURXY.js} +3 -1
- package/dist/index.js +125 -582
- package/dist/{persistent-memory-CELKJM4U.js → persistent-memory-YD3SHSUH.js} +2 -2
- package/dist/{persistent-memory-QX6C2JAR.js → persistent-memory-YPO25MOP.js} +2 -2
- package/dist/{pr-DJP53EZV.js → pr-CDOPCAPK.js} +15 -10
- package/dist/{run-tests-CK44KRY3.js → run-tests-4XRHKHN5.js} +2 -2
- package/dist/{run-tests-A2YM4U2U.js → run-tests-QNNP2HCD.js} +2 -2
- package/dist/{server-XYVL7A33.js → server-53GM3CRH.js} +34 -29
- package/dist/{server-GUV2HZ7N.js → server-B4A7LHZ5.js} +6 -5
- package/dist/setup-wizard-S55ICNHH.js +483 -0
- package/dist/{task-orchestrator-5RT5EH2J.js → task-orchestrator-WNV6PT6Z.js} +10 -7
- package/dist/{usage-LGPJ4UAW.js → usage-E3FEYSBU.js} +3 -3
- package/package.json +1 -1
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3O4VLKD4.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-LGJ7EX2F.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-
|
|
30
|
+
} from "./chunk-GWOZET2E.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-FA3HGXXM.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-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XEVURCAM.js";
|
|
6
|
+
import "./chunk-TJNBSR3I.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-
|
|
17
|
+
} from "./chunk-AUEX6RNY.js";
|
|
15
18
|
import {
|
|
16
19
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CEJUB4YV.js";
|
|
18
21
|
import "./chunk-3OBY7WSS.js";
|
|
19
22
|
import "./chunk-TU3L3PW7.js";
|
|
20
23
|
import {
|
|
21
24
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LGJ7EX2F.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
|
-
|
|
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
|
}
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
DiscussionOrchestrator,
|
|
4
4
|
getPreset,
|
|
5
5
|
resolveRoleProviders
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-23SJVOQD.js";
|
|
7
|
+
import "./chunk-VOIOUJXI.js";
|
|
8
8
|
import {
|
|
9
9
|
persistDiscussion
|
|
10
10
|
} from "./chunk-JQXXPTWL.js";
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
McpManager,
|
|
17
17
|
SkillManager,
|
|
18
|
+
applyThinkCommand,
|
|
18
19
|
autoTrimSessionIfNeeded,
|
|
19
20
|
buildInitPrompt,
|
|
20
21
|
loadDevState,
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
scanDirTree,
|
|
24
25
|
scanProject,
|
|
25
26
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UCHND2K6.js";
|
|
27
28
|
import {
|
|
28
29
|
computeCost,
|
|
29
30
|
formatCost,
|
|
@@ -33,6 +34,9 @@ import {
|
|
|
33
34
|
buildReviewPrompt,
|
|
34
35
|
buildSecurityReviewPrompt
|
|
35
36
|
} from "./chunk-HLWUDRBO.js";
|
|
37
|
+
import {
|
|
38
|
+
thinkingParamsFor
|
|
39
|
+
} from "./chunk-6YZEZFX5.js";
|
|
36
40
|
import {
|
|
37
41
|
ToolExecutor,
|
|
38
42
|
ToolRegistry,
|
|
@@ -64,7 +68,7 @@ import {
|
|
|
64
68
|
spawnAgentContext,
|
|
65
69
|
truncateOutput,
|
|
66
70
|
undoStack
|
|
67
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-Y2X24VYB.js";
|
|
68
72
|
import {
|
|
69
73
|
addMemoryEntry,
|
|
70
74
|
clearMemoryEntries,
|
|
@@ -78,11 +82,12 @@ import {
|
|
|
78
82
|
parseWritableScope,
|
|
79
83
|
updateMemoryApproval,
|
|
80
84
|
updateMemoryEntry
|
|
81
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-3O4VLKD4.js";
|
|
82
86
|
import "./chunk-GLSR2NR3.js";
|
|
83
87
|
import "./chunk-UUSRWSSX.js";
|
|
84
88
|
import "./chunk-CKH4KQ4E.js";
|
|
85
89
|
import "./chunk-BXP6YZ2P.js";
|
|
90
|
+
import "./chunk-5C76XDDF.js";
|
|
86
91
|
import {
|
|
87
92
|
SessionManager,
|
|
88
93
|
getContentText
|
|
@@ -91,13 +96,13 @@ import {
|
|
|
91
96
|
buildDoctorReport,
|
|
92
97
|
formatDoctorReport,
|
|
93
98
|
loadContextFiles
|
|
94
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-FIDEG2PG.js";
|
|
95
100
|
import {
|
|
96
101
|
ProviderRegistry
|
|
97
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-AUEX6RNY.js";
|
|
98
103
|
import {
|
|
99
104
|
ConfigManager
|
|
100
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-CEJUB4YV.js";
|
|
101
106
|
import {
|
|
102
107
|
describePlugin,
|
|
103
108
|
getActivePluginAssets,
|
|
@@ -112,7 +117,7 @@ import {
|
|
|
112
117
|
runTool,
|
|
113
118
|
setPluginEnabled,
|
|
114
119
|
trustPlugin
|
|
115
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-QW76RX6G.js";
|
|
116
121
|
import {
|
|
117
122
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
118
123
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -137,7 +142,7 @@ import {
|
|
|
137
142
|
getGitRoot
|
|
138
143
|
} from "./chunk-HOSJZMQS.js";
|
|
139
144
|
import "./chunk-4BKXL7SM.js";
|
|
140
|
-
import "./chunk-
|
|
145
|
+
import "./chunk-N2E6GFLZ.js";
|
|
141
146
|
import {
|
|
142
147
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
143
148
|
AUTHOR,
|
|
@@ -153,7 +158,7 @@ import {
|
|
|
153
158
|
SKILLS_DIR_NAME,
|
|
154
159
|
VERSION,
|
|
155
160
|
buildUserIdentityPrompt
|
|
156
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
157
162
|
import "./chunk-6RPGQ5CG.js";
|
|
158
163
|
import "./chunk-KHYD3WXE.js";
|
|
159
164
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -752,25 +757,24 @@ async function handleModel(args, ctx) {
|
|
|
752
757
|
ctx.sendStatus();
|
|
753
758
|
}
|
|
754
759
|
async function handleThink(args, ctx) {
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
ctx.
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
760
|
+
const modelParams = ctx.config.get("modelParams")[ctx.currentModel];
|
|
761
|
+
const outcome = applyThinkCommand(args[0], {
|
|
762
|
+
runtimeThinking: ctx.runtimeThinking,
|
|
763
|
+
runtimeEffort: ctx.runtimeThinkingEffort,
|
|
764
|
+
configuredThinking: modelParams?.thinking,
|
|
765
|
+
configuredEffort: modelParams?.thinkingEffort,
|
|
766
|
+
supportsEffort: ctx.providers.get(ctx.currentProvider)?.supportsReasoningEffort ?? false,
|
|
767
|
+
provider: ctx.currentProvider
|
|
768
|
+
});
|
|
769
|
+
if (outcome.changed) {
|
|
770
|
+
ctx.runtimeThinking = outcome.runtimeThinking;
|
|
771
|
+
ctx.runtimeThinkingEffort = outcome.runtimeEffort;
|
|
762
772
|
}
|
|
763
|
-
if (sub === "on") ctx.runtimeThinking = true;
|
|
764
|
-
else if (sub === "off") ctx.runtimeThinking = false;
|
|
765
|
-
else if (sub === "low" || sub === "high" || sub === "max") {
|
|
766
|
-
ctx.runtimeThinking = true;
|
|
767
|
-
ctx.runtimeThinkingEffort = sub;
|
|
768
|
-
} else ctx.runtimeThinking = ctx.runtimeThinking !== true;
|
|
769
773
|
ctx.send({
|
|
770
774
|
type: "info",
|
|
771
|
-
message:
|
|
775
|
+
message: [outcome.summary, ...outcome.details].join(" \u2014 ")
|
|
772
776
|
});
|
|
773
|
-
ctx.sendStatus();
|
|
777
|
+
if (outcome.changed) ctx.sendStatus();
|
|
774
778
|
}
|
|
775
779
|
async function handlePlan(args, ctx) {
|
|
776
780
|
const sub = args[0];
|
|
@@ -828,7 +832,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
828
832
|
Cost: ${formatCost(cost)}` : "";
|
|
829
833
|
let memoryLine = "";
|
|
830
834
|
try {
|
|
831
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
835
|
+
const { countPendingMemories } = await import("./persistent-memory-YD3SHSUH.js");
|
|
832
836
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
833
837
|
if (pending > 0) memoryLine = `
|
|
834
838
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1643,7 +1647,7 @@ async function handleTest(args, ctx) {
|
|
|
1643
1647
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1644
1648
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1645
1649
|
}
|
|
1646
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1650
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-QNNP2HCD.js")).executeTests;
|
|
1647
1651
|
const report = await runTests(testArgs);
|
|
1648
1652
|
ctx.send({ type: "info", message: report });
|
|
1649
1653
|
} catch (err) {
|
|
@@ -1901,7 +1905,7 @@ async function handleMemory(args, ctx) {
|
|
|
1901
1905
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
1902
1906
|
} else if (sub === "export") {
|
|
1903
1907
|
if (args[1] === "md") {
|
|
1904
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
1908
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-YD3SHSUH.js");
|
|
1905
1909
|
ctx.send({
|
|
1906
1910
|
type: "export_data",
|
|
1907
1911
|
format: "md",
|
|
@@ -2684,6 +2688,7 @@ var SessionHandler = class {
|
|
|
2684
2688
|
const roles = resolution.roles;
|
|
2685
2689
|
for (const w of resolution.warnings) this.send({ type: "info", message: w });
|
|
2686
2690
|
const config = {
|
|
2691
|
+
thinking: thinkingParamsFor(this.config.get("modelParams"), this.currentModel),
|
|
2687
2692
|
mode: "discuss",
|
|
2688
2693
|
roles,
|
|
2689
2694
|
defaultProvider,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-Y2X24VYB.js";
|
|
5
|
+
import "./chunk-3O4VLKD4.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-
|
|
13
|
+
} from "./chunk-QW76RX6G.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-
|
|
21
|
+
import "./chunk-N2E6GFLZ.js";
|
|
21
22
|
import {
|
|
22
23
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
24
25
|
import "./chunk-6RPGQ5CG.js";
|
|
25
26
|
import "./chunk-KHYD3WXE.js";
|
|
26
27
|
import "./chunk-NYNSYLFY.js";
|