jinzd-ai-cli 0.2.4 → 0.2.5
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-HTXJ23TX.js → chunk-EKCYEBAS.js} +1 -1
- package/dist/{chunk-2WCLXWAH.js → chunk-OIJT7K75.js} +1 -1
- package/dist/index.js +48 -7
- package/dist/{run-tests-L5G4W7EB.js → run-tests-TEXIYKPE.js} +1 -1
- package/dist/{server-N2LG3A4M.js → server-IT4WXV42.js} +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
theme,
|
|
36
36
|
truncateOutput,
|
|
37
37
|
undoStack
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-EKCYEBAS.js";
|
|
39
39
|
import {
|
|
40
40
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
41
41
|
AUTHOR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
REPO_URL,
|
|
56
56
|
SKILLS_DIR_NAME,
|
|
57
57
|
VERSION
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-OIJT7K75.js";
|
|
59
59
|
|
|
60
60
|
// src/index.ts
|
|
61
61
|
import { program } from "commander";
|
|
@@ -1904,7 +1904,7 @@ ${hint}` : "")
|
|
|
1904
1904
|
description: "Run project tests and show structured report",
|
|
1905
1905
|
usage: "/test [command|filter]",
|
|
1906
1906
|
async execute(args, _ctx) {
|
|
1907
|
-
const { executeTests } = await import("./run-tests-
|
|
1907
|
+
const { executeTests } = await import("./run-tests-TEXIYKPE.js");
|
|
1908
1908
|
const argStr = args.join(" ").trim();
|
|
1909
1909
|
let testArgs = {};
|
|
1910
1910
|
if (argStr) {
|
|
@@ -2474,6 +2474,8 @@ var ToolExecutor = class {
|
|
|
2474
2474
|
* 防止用户输入 "y"+Enter 被同时触发 once('line') 和主循环 on('line')。
|
|
2475
2475
|
*/
|
|
2476
2476
|
confirming = false;
|
|
2477
|
+
/** 在 confirm 期间用户输入的 slash 命令,由 repl.ts 主循环消费 */
|
|
2478
|
+
pendingSlashCommand = null;
|
|
2477
2479
|
/** confirm() 的取消回调,由 SIGINT handler 调用 */
|
|
2478
2480
|
cancelConfirmFn = null;
|
|
2479
2481
|
/**
|
|
@@ -2691,7 +2693,16 @@ var ToolExecutor = class {
|
|
|
2691
2693
|
resolve3(result);
|
|
2692
2694
|
};
|
|
2693
2695
|
const onLine = (line) => {
|
|
2694
|
-
const
|
|
2696
|
+
const trimmed = line.trim();
|
|
2697
|
+
if (trimmed.startsWith("/")) {
|
|
2698
|
+
this.pendingSlashCommand = trimmed;
|
|
2699
|
+
process.stdout.write(theme.dim(`
|
|
2700
|
+
(command "${trimmed}" queued, will execute after current operation)
|
|
2701
|
+
`));
|
|
2702
|
+
cleanup("none");
|
|
2703
|
+
return;
|
|
2704
|
+
}
|
|
2705
|
+
const input2 = trimmed.toLowerCase();
|
|
2695
2706
|
if (input2 === "a" || input2 === "all" || input2 === "y") {
|
|
2696
2707
|
cleanup("all");
|
|
2697
2708
|
} else if (input2 === "r" || input2 === "reject" || input2 === "n" || input2 === "") {
|
|
@@ -2862,7 +2873,16 @@ var ToolExecutor = class {
|
|
|
2862
2873
|
resolve3(answer === "y");
|
|
2863
2874
|
};
|
|
2864
2875
|
const onLine = (line) => {
|
|
2865
|
-
|
|
2876
|
+
const trimmed = line.trim();
|
|
2877
|
+
if (trimmed.startsWith("/")) {
|
|
2878
|
+
this.pendingSlashCommand = trimmed;
|
|
2879
|
+
process.stdout.write(theme.dim(`
|
|
2880
|
+
(command "${trimmed}" queued, will execute after current operation)
|
|
2881
|
+
`));
|
|
2882
|
+
cleanup("n");
|
|
2883
|
+
return;
|
|
2884
|
+
}
|
|
2885
|
+
cleanup(trimmed.toLowerCase());
|
|
2866
2886
|
};
|
|
2867
2887
|
this.cancelConfirmFn = () => {
|
|
2868
2888
|
process.stdout.write(theme.dim("\n(cancelled)\n"));
|
|
@@ -4490,9 +4510,16 @@ Session '${this.resumeSessionId}' not found.
|
|
|
4490
4510
|
const byte = data[i];
|
|
4491
4511
|
if (byte === 13 || byte === 10) {
|
|
4492
4512
|
if (this._interjectionBuf.length > 0) {
|
|
4493
|
-
|
|
4513
|
+
const line = this._interjectionBuf;
|
|
4494
4514
|
this._interjectionBuf = "";
|
|
4495
4515
|
process.stdout.write("\n");
|
|
4516
|
+
if (line.startsWith("/")) {
|
|
4517
|
+
this.toolExecutor.pendingSlashCommand = line;
|
|
4518
|
+
process.stdout.write(theme.dim(` (command "${line}" queued)
|
|
4519
|
+
`));
|
|
4520
|
+
} else {
|
|
4521
|
+
this._userInterjection = line;
|
|
4522
|
+
}
|
|
4496
4523
|
}
|
|
4497
4524
|
} else if (byte === 127 || byte === 8) {
|
|
4498
4525
|
if (this._interjectionBuf.length > 0) {
|
|
@@ -4761,6 +4788,20 @@ Session '${this.resumeSessionId}' not found.
|
|
|
4761
4788
|
try {
|
|
4762
4789
|
for (let round = 0; round < MAX_TOOL_ROUNDS; round++) {
|
|
4763
4790
|
this.toolExecutor.setRoundInfo(round + 1, MAX_TOOL_ROUNDS);
|
|
4791
|
+
if (this.toolExecutor.pendingSlashCommand) {
|
|
4792
|
+
const cmd = this.toolExecutor.pendingSlashCommand;
|
|
4793
|
+
this.toolExecutor.pendingSlashCommand = null;
|
|
4794
|
+
if (cmd === "/exit" || cmd === "/quit" || cmd === "/q") {
|
|
4795
|
+
spinner.stop();
|
|
4796
|
+
process.stdout.write(theme.warning(`\u26A1 ${cmd} \u2014 stopping agentic loop
|
|
4797
|
+
`));
|
|
4798
|
+
this.teardownInterjectionListener();
|
|
4799
|
+
return;
|
|
4800
|
+
}
|
|
4801
|
+
process.stdout.write(theme.warning(`\u26A1 Command "${cmd}" \u2014 injected as message
|
|
4802
|
+
`));
|
|
4803
|
+
extraMessages.push({ role: "user", content: cmd });
|
|
4804
|
+
}
|
|
4764
4805
|
if (this._userInterjection) {
|
|
4765
4806
|
const msg = this._userInterjection;
|
|
4766
4807
|
this._userInterjection = null;
|
|
@@ -5292,7 +5333,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5292
5333
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5293
5334
|
process.exit(1);
|
|
5294
5335
|
}
|
|
5295
|
-
const { startWebServer } = await import("./server-
|
|
5336
|
+
const { startWebServer } = await import("./server-IT4WXV42.js");
|
|
5296
5337
|
await startWebServer({ port, host: options.host });
|
|
5297
5338
|
});
|
|
5298
5339
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
setupProxy,
|
|
24
24
|
spawnAgentContext,
|
|
25
25
|
truncateOutput
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EKCYEBAS.js";
|
|
27
27
|
import {
|
|
28
28
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
29
29
|
CONTEXT_FILE_CANDIDATES,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
PLAN_MODE_SYSTEM_ADDON,
|
|
36
36
|
SKILLS_DIR_NAME,
|
|
37
37
|
VERSION
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OIJT7K75.js";
|
|
39
39
|
import {
|
|
40
40
|
AuthManager
|
|
41
41
|
} from "./chunk-CPLT6CD3.js";
|