jinzd-ai-cli 0.2.16 → 0.2.17

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 (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4521,14 +4521,18 @@ Session '${this.resumeSessionId}' not found.
4521
4521
  return ac;
4522
4522
  }
4523
4523
  /**
4524
- * 流式生成结束后调用(finally 块中):清理 ESC 监听器,还原 stdin 暂停状态。
4524
+ * 流式生成结束后调用(finally 块中):清理 ESC 监听器。
4525
+ * 若 interjection listener 仍活跃(agentic 循环中),保持 stdin 流动以接收用户输入;
4526
+ * 否则还原为 rl.pause() 时的暂停状态。
4525
4527
  */
4526
4528
  teardownStreamInterrupt() {
4527
4529
  if (this._escHandler) {
4528
4530
  process.stdin.removeListener("data", this._escHandler);
4529
4531
  this._escHandler = null;
4530
4532
  }
4531
- process.stdin.pause();
4533
+ if (!this._interjectionHandler) {
4534
+ process.stdin.pause();
4535
+ }
4532
4536
  this.streamAbortController = null;
4533
4537
  }
4534
4538
  /**
@@ -5059,9 +5063,6 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
5059
5063
  spawnAgentContext.systemPrompt = systemPrompt;
5060
5064
  spawnAgentContext.modelParams = modelParams;
5061
5065
  spawnAgentContext.configManager = this.config;
5062
- if (this._interjectionHandler) {
5063
- process.stdin.removeListener("data", this._interjectionHandler);
5064
- }
5065
5066
  const toolResults = await this.toolExecutor.executeAll(result.toolCalls);
5066
5067
  const thisRoundTools = result.toolCalls.map((tc) => tc.name);
5067
5068
  roundToolHistory.push({ round: round + 1, tools: thisRoundTools });
@@ -5090,7 +5091,6 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
5090
5091
  }
5091
5092
  }
5092
5093
  if (this._interjectionHandler) {
5093
- process.stdin.on("data", this._interjectionHandler);
5094
5094
  process.stdin.resume();
5095
5095
  }
5096
5096
  const reasoningContent = "reasoningContent" in result ? result.reasoningContent : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",