jinzd-ai-cli 0.2.23 → 0.2.24
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/{chunk-QZR2SIUB.js → chunk-FGZU7XNQ.js} +1 -1
- package/dist/{chunk-M6BBSIGR.js → chunk-I5PCIFFK.js} +1 -1
- package/dist/index.js +6 -54
- package/dist/{run-tests-A74MA54Z.js → run-tests-MIUBHRXG.js} +1 -1
- package/dist/{server-LMXSNPOQ.js → server-E2TJNNYH.js} +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
theme,
|
|
37
37
|
truncateOutput,
|
|
38
38
|
undoStack
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-FGZU7XNQ.js";
|
|
40
40
|
import {
|
|
41
41
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
42
42
|
AUTHOR,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
REPO_URL,
|
|
57
57
|
SKILLS_DIR_NAME,
|
|
58
58
|
VERSION
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-I5PCIFFK.js";
|
|
60
60
|
|
|
61
61
|
// src/index.ts
|
|
62
62
|
import { program } from "commander";
|
|
@@ -1905,7 +1905,7 @@ ${hint}` : "")
|
|
|
1905
1905
|
description: "Run project tests and show structured report",
|
|
1906
1906
|
usage: "/test [command|filter]",
|
|
1907
1907
|
async execute(args, _ctx) {
|
|
1908
|
-
const { executeTests } = await import("./run-tests-
|
|
1908
|
+
const { executeTests } = await import("./run-tests-MIUBHRXG.js");
|
|
1909
1909
|
const argStr = args.join(" ").trim();
|
|
1910
1910
|
let testArgs = {};
|
|
1911
1911
|
if (argStr) {
|
|
@@ -3394,14 +3394,8 @@ var Repl = class {
|
|
|
3394
3394
|
_escHandler = null;
|
|
3395
3395
|
/** User interjection: completed line queued for injection into agentic loop */
|
|
3396
3396
|
_userInterjection = null;
|
|
3397
|
-
/**
|
|
3398
|
-
_interjectionTrigger = null;
|
|
3399
|
-
/** Whether interjection system is active (agentic loop) */
|
|
3397
|
+
/** Whether interjection system is active (agentic loop) — currently disabled */
|
|
3400
3398
|
_interjectionActive = false;
|
|
3401
|
-
/** Whether user is currently in interjection typing mode (rl.question active) */
|
|
3402
|
-
_interjectionTyping = false;
|
|
3403
|
-
/** Reference to the current spinner, so interjection can pause/resume it */
|
|
3404
|
-
_currentSpinner = null;
|
|
3405
3399
|
/** Multi-line input buffer: accumulates lines ending with \ */
|
|
3406
3400
|
_multilineBuf = [];
|
|
3407
3401
|
/** 运行时动态添加的额外上下文目录(/add-dir 命令) */
|
|
@@ -4549,49 +4543,12 @@ Session '${this.resumeSessionId}' not found.
|
|
|
4549
4543
|
setupInterjectionListener() {
|
|
4550
4544
|
this._userInterjection = null;
|
|
4551
4545
|
this._interjectionActive = true;
|
|
4552
|
-
this._interjectionTyping = false;
|
|
4553
|
-
const trigger = (data) => {
|
|
4554
|
-
if (this.toolExecutor.confirming || askUserContext.prompting) return;
|
|
4555
|
-
if (this._interjectionTyping) return;
|
|
4556
|
-
const byte = data[0];
|
|
4557
|
-
if (byte < 32 || byte === 127 || byte === 27) return;
|
|
4558
|
-
this._interjectionTyping = true;
|
|
4559
|
-
if (this._currentSpinner) this._currentSpinner.stop();
|
|
4560
|
-
const rlAny = this.rl;
|
|
4561
|
-
const savedOutput = rlAny.output;
|
|
4562
|
-
rlAny.output = process.stdout;
|
|
4563
|
-
process.stdout.write(theme.dim("\n \u25B8 "));
|
|
4564
|
-
const firstChar = data.toString("utf-8").replace(/[\x00-\x1f\x7f]/g, "");
|
|
4565
|
-
if (firstChar) process.stdout.write(firstChar);
|
|
4566
|
-
this.rl.question("", (answer) => {
|
|
4567
|
-
const fullLine = (firstChar + answer).trim();
|
|
4568
|
-
rlAny.output = savedOutput;
|
|
4569
|
-
this._interjectionTyping = false;
|
|
4570
|
-
if (fullLine.length === 0) {
|
|
4571
|
-
} else if (fullLine.startsWith("/")) {
|
|
4572
|
-
this.toolExecutor.pendingSlashCommand = fullLine;
|
|
4573
|
-
process.stdout.write(theme.dim(` (command "${fullLine}" queued)
|
|
4574
|
-
`));
|
|
4575
|
-
} else {
|
|
4576
|
-
this._userInterjection = fullLine;
|
|
4577
|
-
}
|
|
4578
|
-
if (this._currentSpinner) this._currentSpinner.start();
|
|
4579
|
-
});
|
|
4580
|
-
};
|
|
4581
|
-
this._interjectionTrigger = trigger;
|
|
4582
|
-
process.stdin.prependListener("data", trigger);
|
|
4583
|
-
process.stdin.resume();
|
|
4584
4546
|
}
|
|
4585
4547
|
/**
|
|
4586
4548
|
* Remove the interjection listener, clean up state.
|
|
4587
4549
|
*/
|
|
4588
4550
|
teardownInterjectionListener() {
|
|
4589
|
-
if (this._interjectionTrigger) {
|
|
4590
|
-
process.stdin.removeListener("data", this._interjectionTrigger);
|
|
4591
|
-
this._interjectionTrigger = null;
|
|
4592
|
-
}
|
|
4593
4551
|
this._interjectionActive = false;
|
|
4594
|
-
this._interjectionTyping = false;
|
|
4595
4552
|
}
|
|
4596
4553
|
/**
|
|
4597
4554
|
* 注册 Ctrl+V 剪贴板图片粘贴快捷键。
|
|
@@ -4846,7 +4803,6 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
|
|
|
4846
4803
|
const modelParams = this.getModelParams();
|
|
4847
4804
|
const useStreaming = this.config.get("ui").streaming;
|
|
4848
4805
|
const spinner = this.renderer.showSpinner("Thinking...");
|
|
4849
|
-
this._currentSpinner = spinner;
|
|
4850
4806
|
const roundUsage = { inputTokens: 0, outputTokens: 0 };
|
|
4851
4807
|
const supportsStreamingTools = useStreaming && typeof provider.chatWithToolsStream === "function";
|
|
4852
4808
|
let consecutiveFreeRounds = 0;
|
|
@@ -4854,7 +4810,6 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
|
|
|
4854
4810
|
let repeatedToolCallCount = 0;
|
|
4855
4811
|
const roundToolHistory = [];
|
|
4856
4812
|
this.setupInterjectionListener();
|
|
4857
|
-
process.stdout.write(theme.dim(" (Type a message + Enter to redirect AI at any time)\n"));
|
|
4858
4813
|
try {
|
|
4859
4814
|
for (let round = 0; round < MAX_TOOL_ROUNDS; round++) {
|
|
4860
4815
|
this.toolExecutor.setRoundInfo(round + 1, MAX_TOOL_ROUNDS);
|
|
@@ -5098,9 +5053,7 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
|
|
|
5098
5053
|
}
|
|
5099
5054
|
}
|
|
5100
5055
|
}
|
|
5101
|
-
|
|
5102
|
-
process.stdin.resume();
|
|
5103
|
-
}
|
|
5056
|
+
process.stdin.resume();
|
|
5104
5057
|
const reasoningContent = "reasoningContent" in result ? result.reasoningContent : void 0;
|
|
5105
5058
|
const newMsgs = provider.buildToolResultMessages(result.toolCalls, toolResults, reasoningContent);
|
|
5106
5059
|
extraMessages.push(...newMsgs);
|
|
@@ -5254,7 +5207,6 @@ Tip: You can continue the conversation by asking the AI to proceed.`
|
|
|
5254
5207
|
}
|
|
5255
5208
|
} finally {
|
|
5256
5209
|
this.teardownInterjectionListener();
|
|
5257
|
-
this._currentSpinner = null;
|
|
5258
5210
|
spinner.stop();
|
|
5259
5211
|
await this.checkContextPressure();
|
|
5260
5212
|
}
|
|
@@ -5518,7 +5470,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5518
5470
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5519
5471
|
process.exit(1);
|
|
5520
5472
|
}
|
|
5521
|
-
const { startWebServer } = await import("./server-
|
|
5473
|
+
const { startWebServer } = await import("./server-E2TJNNYH.js");
|
|
5522
5474
|
await startWebServer({ port, host: options.host });
|
|
5523
5475
|
});
|
|
5524
5476
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
setupProxy,
|
|
25
25
|
spawnAgentContext,
|
|
26
26
|
truncateOutput
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FGZU7XNQ.js";
|
|
28
28
|
import {
|
|
29
29
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
30
30
|
CONTEXT_FILE_CANDIDATES,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
PLAN_MODE_SYSTEM_ADDON,
|
|
37
37
|
SKILLS_DIR_NAME,
|
|
38
38
|
VERSION
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-I5PCIFFK.js";
|
|
40
40
|
import {
|
|
41
41
|
AuthManager
|
|
42
42
|
} from "./chunk-CPLT6CD3.js";
|