jinzd-ai-cli 0.4.22 → 0.4.23

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.
@@ -7,7 +7,7 @@ import {
7
7
  ProviderNotFoundError,
8
8
  RateLimitError,
9
9
  schemaToJsonSchema
10
- } from "./chunk-A534NEBA.js";
10
+ } from "./chunk-PDVX5QJA.js";
11
11
  import {
12
12
  APP_NAME,
13
13
  CONFIG_DIR_NAME,
@@ -20,7 +20,7 @@ import {
20
20
  MCP_TOOL_PREFIX,
21
21
  PLUGINS_DIR_NAME,
22
22
  VERSION
23
- } from "./chunk-FAE7VQHT.js";
23
+ } from "./chunk-UA4BVWKV.js";
24
24
 
25
25
  // src/config/config-manager.ts
26
26
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -6,7 +6,7 @@ import {
6
6
  SUBAGENT_DEFAULT_MAX_ROUNDS,
7
7
  SUBAGENT_MAX_ROUNDS_LIMIT,
8
8
  runTestsTool
9
- } from "./chunk-FAE7VQHT.js";
9
+ } from "./chunk-UA4BVWKV.js";
10
10
 
11
11
  // src/tools/builtin/bash.ts
12
12
  import { execSync } from "child_process";
@@ -8,7 +8,7 @@ import { platform } from "os";
8
8
  import chalk from "chalk";
9
9
 
10
10
  // src/core/constants.ts
11
- var VERSION = "0.4.22";
11
+ var VERSION = "0.4.23";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.22";
9
+ var VERSION = "0.4.23";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -387,7 +387,7 @@ ${content}`);
387
387
  }
388
388
  }
389
389
  async function runTaskMode(config, providers, configManager, topic) {
390
- const { TaskOrchestrator } = await import("./task-orchestrator-SG2KFZJJ.js");
390
+ const { TaskOrchestrator } = await import("./task-orchestrator-C472QXTJ.js");
391
391
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
392
392
  let interrupted = false;
393
393
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  saveDevState,
24
24
  sessionHasMeaningfulContent,
25
25
  setupProxy
26
- } from "./chunk-37SPMWVR.js";
26
+ } from "./chunk-GBMVHLPA.js";
27
27
  import {
28
28
  ToolRegistry,
29
29
  askUserContext,
@@ -38,7 +38,7 @@ import {
38
38
  theme,
39
39
  truncateOutput,
40
40
  undoStack
41
- } from "./chunk-A534NEBA.js";
41
+ } from "./chunk-PDVX5QJA.js";
42
42
  import {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  AUTHOR,
@@ -59,7 +59,7 @@ import {
59
59
  SKILLS_DIR_NAME,
60
60
  VERSION,
61
61
  buildUserIdentityPrompt
62
- } from "./chunk-FAE7VQHT.js";
62
+ } from "./chunk-UA4BVWKV.js";
63
63
 
64
64
  // src/index.ts
65
65
  import { program } from "commander";
@@ -1944,7 +1944,7 @@ ${hint}` : "")
1944
1944
  usage: "/test [command|filter]",
1945
1945
  async execute(args, ctx) {
1946
1946
  try {
1947
- const { executeTests } = await import("./run-tests-H543F3AX.js");
1947
+ const { executeTests } = await import("./run-tests-7ZBI4ZTU.js");
1948
1948
  const argStr = args.join(" ").trim();
1949
1949
  let testArgs = {};
1950
1950
  if (argStr) {
@@ -5691,7 +5691,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5691
5691
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5692
5692
  process.exit(1);
5693
5693
  }
5694
- const { startWebServer } = await import("./server-WCTRTNNN.js");
5694
+ const { startWebServer } = await import("./server-SD5ICBFP.js");
5695
5695
  await startWebServer({ port, host: options.host });
5696
5696
  });
5697
5697
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -5924,7 +5924,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
5924
5924
  }),
5925
5925
  config.get("customProviders")
5926
5926
  );
5927
- const { startHub } = await import("./hub-DGUTSTL5.js");
5927
+ const { startHub } = await import("./hub-YN245LMP.js");
5928
5928
  await startHub(
5929
5929
  {
5930
5930
  topic: topic ?? "",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-HZL57QTJ.js";
4
+ } from "./chunk-XMTMCMAP.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-FAE7VQHT.js";
5
+ } from "./chunk-UA4BVWKV.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -18,7 +18,7 @@ import {
18
18
  renderDiff,
19
19
  runHook,
20
20
  setupProxy
21
- } from "./chunk-37SPMWVR.js";
21
+ } from "./chunk-GBMVHLPA.js";
22
22
  import {
23
23
  AuthManager
24
24
  } from "./chunk-BYNY5JPB.js";
@@ -32,7 +32,7 @@ import {
32
32
  spawnAgentContext,
33
33
  truncateOutput,
34
34
  undoStack
35
- } from "./chunk-A534NEBA.js";
35
+ } from "./chunk-PDVX5QJA.js";
36
36
  import {
37
37
  AGENTIC_BEHAVIOR_GUIDELINE,
38
38
  AUTHOR,
@@ -50,7 +50,7 @@ import {
50
50
  SKILLS_DIR_NAME,
51
51
  VERSION,
52
52
  buildUserIdentityPrompt
53
- } from "./chunk-FAE7VQHT.js";
53
+ } from "./chunk-UA4BVWKV.js";
54
54
 
55
55
  // src/web/server.ts
56
56
  import express from "express";
@@ -1090,8 +1090,26 @@ Tokens: in=${this.sessionTokenUsage.inputTokens} out=${this.sessionTokenUsage.ou
1090
1090
  }
1091
1091
  this.send({ type: "info", message: `Deleted ${deleted} session(s).` });
1092
1092
  this.sendSessionList();
1093
+ } else if (sub === "rename" && args[1] && args.length >= 3) {
1094
+ const targetId = args[1];
1095
+ const newTitle = args.slice(2).join(" ").trim();
1096
+ if (!newTitle) {
1097
+ this.send({ type: "error", message: "Title cannot be empty." });
1098
+ break;
1099
+ }
1100
+ const list = this.sessions.listSessions();
1101
+ const found = list.find((s) => s.id.startsWith(targetId));
1102
+ if (found) {
1103
+ const session = this.sessions.loadSession(found.id);
1104
+ session.title = newTitle;
1105
+ this.sessions.save();
1106
+ this.send({ type: "info", message: `Renamed session: "${newTitle}"` });
1107
+ this.sendSessionList();
1108
+ } else {
1109
+ this.send({ type: "error", message: `Session not found: ${targetId}` });
1110
+ }
1093
1111
  } else {
1094
- this.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id>" });
1112
+ this.send({ type: "info", message: "Usage: /session new | list | load <id> | delete <id> | rename <id> <title>" });
1095
1113
  }
1096
1114
  break;
1097
1115
  }
@@ -1498,7 +1516,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
1498
1516
  case "test": {
1499
1517
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1500
1518
  try {
1501
- const { executeTests } = await import("./run-tests-H543F3AX.js");
1519
+ const { executeTests } = await import("./run-tests-7ZBI4ZTU.js");
1502
1520
  const argStr = args.join(" ").trim();
1503
1521
  let testArgs = {};
1504
1522
  if (argStr) {
@@ -4,10 +4,10 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-A534NEBA.js";
7
+ } from "./chunk-PDVX5QJA.js";
8
8
  import {
9
9
  SUBAGENT_ALLOWED_TOOLS
10
- } from "./chunk-FAE7VQHT.js";
10
+ } from "./chunk-UA4BVWKV.js";
11
11
 
12
12
  // src/hub/task-orchestrator.ts
13
13
  import { createInterface } from "readline";
@@ -785,7 +785,7 @@ function renderFilteredSessions(filter) {
785
785
  // Click to load session (only in normal mode)
786
786
  sessionListEl.querySelectorAll('.session-item').forEach(el => {
787
787
  el.addEventListener('click', (e) => {
788
- if (e.target.closest('.session-delete-btn') || e.target.closest('.session-batch-cb')) return;
788
+ if (e.target.closest('.session-delete-btn') || e.target.closest('.session-batch-cb') || e.target.closest('.session-rename-input')) return;
789
789
  if (batchSelectMode) {
790
790
  // In batch mode, clicking the row toggles the checkbox
791
791
  const cb = el.querySelector('.session-batch-cb');
@@ -796,6 +796,17 @@ function renderFilteredSessions(filter) {
796
796
  if (!id) return;
797
797
  send({ type: 'command', name: 'session', args: ['load', id] });
798
798
  });
799
+
800
+ // Double-click session title to rename
801
+ if (!batchSelectMode) {
802
+ const titleEl = el.querySelector('.session-title');
803
+ if (titleEl) {
804
+ titleEl.addEventListener('dblclick', (e) => {
805
+ e.stopPropagation();
806
+ startSessionRename(el, titleEl);
807
+ });
808
+ }
809
+ }
799
810
  });
800
811
 
801
812
  // Checkbox change in batch mode
@@ -822,6 +833,43 @@ function renderFilteredSessions(filter) {
822
833
  }
823
834
  }
824
835
 
836
+ function startSessionRename(itemEl, titleEl) {
837
+ const sessionId = itemEl.dataset.sessionId;
838
+ const currentTitle = titleEl.textContent.trim();
839
+ const input = document.createElement('input');
840
+ input.type = 'text';
841
+ input.value = currentTitle;
842
+ input.className = 'input input-xs input-bordered session-rename-input w-full';
843
+ input.style.fontSize = '0.85rem';
844
+
845
+ titleEl.replaceWith(input);
846
+ input.focus();
847
+ input.select();
848
+
849
+ function commit() {
850
+ const newTitle = input.value.trim();
851
+ if (newTitle && newTitle !== currentTitle) {
852
+ send({ type: 'command', name: 'session', args: ['rename', sessionId, newTitle] });
853
+ } else {
854
+ // Restore original title without server round-trip
855
+ const span = document.createElement('div');
856
+ span.className = 'session-title flex-1';
857
+ span.textContent = currentTitle;
858
+ input.replaceWith(span);
859
+ span.addEventListener('dblclick', (e) => {
860
+ e.stopPropagation();
861
+ startSessionRename(itemEl, span);
862
+ });
863
+ }
864
+ }
865
+
866
+ input.addEventListener('blur', commit);
867
+ input.addEventListener('keydown', (e) => {
868
+ if (e.key === 'Enter') { e.preventDefault(); input.blur(); }
869
+ if (e.key === 'Escape') { input.value = currentTitle; input.blur(); }
870
+ });
871
+ }
872
+
825
873
  function toggleBatchSelect() {
826
874
  batchSelectMode = !batchSelectMode;
827
875
  batchSelectedIds.clear();
@@ -324,6 +324,12 @@
324
324
  overflow: hidden;
325
325
  text-overflow: ellipsis;
326
326
  font-size: 0.85rem;
327
+ cursor: text;
328
+ }
329
+ .sidebar .session-item .session-rename-input {
330
+ height: 1.5rem;
331
+ min-height: 1.5rem;
332
+ padding: 0 0.4rem;
327
333
  }
328
334
  .sidebar .session-item .session-meta {
329
335
  font-size: 0.7rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.22",
3
+ "version": "0.4.23",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",