jinzd-ai-cli 0.4.94 → 0.4.96

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.
@@ -23,10 +23,10 @@ import {
23
23
  persistToolRound,
24
24
  rebuildExtraMessages,
25
25
  setupProxy
26
- } from "./chunk-73IPBBNL.js";
26
+ } from "./chunk-SX7GCTSV.js";
27
27
  import {
28
28
  ConfigManager
29
- } from "./chunk-W7HOEYAA.js";
29
+ } from "./chunk-JFDAONPK.js";
30
30
  import {
31
31
  ToolExecutor,
32
32
  ToolRegistry,
@@ -44,7 +44,7 @@ import {
44
44
  spawnAgentContext,
45
45
  truncateOutput,
46
46
  undoStack
47
- } from "./chunk-7SBSBVUB.js";
47
+ } from "./chunk-2YXIZ3GN.js";
48
48
  import "./chunk-2ZD3YTVM.js";
49
49
  import "./chunk-4BKXL7SM.js";
50
50
  import "./chunk-ANYYM4CF.js";
@@ -53,7 +53,7 @@ import "./chunk-KJLJPUY2.js";
53
53
  import "./chunk-6VRJGH25.js";
54
54
  import "./chunk-2DXY7UGF.js";
55
55
  import "./chunk-KHYD3WXE.js";
56
- import "./chunk-PH7ICI6O.js";
56
+ import "./chunk-USRJN2CF.js";
57
57
  import {
58
58
  AGENTIC_BEHAVIOR_GUIDELINE,
59
59
  AUTHOR,
@@ -72,7 +72,7 @@ import {
72
72
  SKILLS_DIR_NAME,
73
73
  VERSION,
74
74
  buildUserIdentityPrompt
75
- } from "./chunk-CD6FE5UD.js";
75
+ } from "./chunk-6YHSSX6F.js";
76
76
 
77
77
  // src/web/server.ts
78
78
  import express from "express";
@@ -820,6 +820,7 @@ var SessionHandler = class _SessionHandler {
820
820
  signal: ac.signal
821
821
  });
822
822
  let fullContent = "";
823
+ let simpleReasoning;
823
824
  for await (const chunk of stream) {
824
825
  if (ac.signal.aborted) break;
825
826
  if (chunk.done) {
@@ -828,12 +829,18 @@ var SessionHandler = class _SessionHandler {
828
829
  this.addWebSessionUsage(chunk.usage);
829
830
  session.addTokenUsage(chunk.usage);
830
831
  }
832
+ if (chunk.reasoningContent) simpleReasoning = chunk.reasoningContent;
831
833
  break;
832
834
  }
833
835
  fullContent += chunk.delta;
834
836
  this.send({ type: "text_delta", delta: chunk.delta });
835
837
  }
836
- session.addMessage({ role: "assistant", content: fullContent, timestamp: /* @__PURE__ */ new Date() });
838
+ session.addMessage({
839
+ role: "assistant",
840
+ content: fullContent,
841
+ timestamp: /* @__PURE__ */ new Date(),
842
+ ...simpleReasoning ? { reasoningContent: simpleReasoning } : {}
843
+ });
837
844
  } catch (err) {
838
845
  if (err.name === "AbortError") {
839
846
  this.send({ type: "info", message: "[interrupted]" });
@@ -1036,7 +1043,12 @@ Details: ${errMsg.split("\n")[0]}
1036
1043
  continue;
1037
1044
  }
1038
1045
  this.send({ type: "response_done", content: result.content, usage: roundUsage });
1039
- session.addMessage({ role: "assistant", content: result.content, timestamp: /* @__PURE__ */ new Date() });
1046
+ session.addMessage({
1047
+ role: "assistant",
1048
+ content: result.content,
1049
+ timestamp: /* @__PURE__ */ new Date(),
1050
+ ...result.reasoningContent ? { reasoningContent: result.reasoningContent } : {}
1051
+ });
1040
1052
  this.addWebSessionUsage(roundUsage);
1041
1053
  session.addTokenUsage(roundUsage);
1042
1054
  return;
@@ -1178,6 +1190,7 @@ ${summaryResult.content}`,
1178
1190
  const toolArgBuffers = /* @__PURE__ */ new Map();
1179
1191
  let usage;
1180
1192
  let rawContent;
1193
+ let reasoningContent;
1181
1194
  for await (const event of streamGen) {
1182
1195
  if (ac.signal.aborted) break;
1183
1196
  switch (event.type) {
@@ -1219,6 +1232,7 @@ ${summaryResult.content}`,
1219
1232
  case "done":
1220
1233
  usage = event.usage;
1221
1234
  rawContent = event.rawContent;
1235
+ reasoningContent = event.reasoningContent;
1222
1236
  break;
1223
1237
  }
1224
1238
  }
@@ -1229,9 +1243,9 @@ ${summaryResult.content}`,
1229
1243
  if (textContent) {
1230
1244
  toolCalls._streamedText = textContent;
1231
1245
  }
1232
- return { toolCalls, usage };
1246
+ return { toolCalls, usage, reasoningContent };
1233
1247
  }
1234
- return { content: textContent, usage };
1248
+ return { content: textContent, usage, reasoningContent };
1235
1249
  }
1236
1250
  // ── Commands ─────────────────────────────────────────────────────
1237
1251
  async handleCommand(name, args) {
@@ -2237,7 +2251,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2237
2251
  case "test": {
2238
2252
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2239
2253
  try {
2240
- const { executeTests } = await import("./run-tests-BOAAXNEG.js");
2254
+ const { executeTests } = await import("./run-tests-P7DC5HZH.js");
2241
2255
  const argStr = args.join(" ").trim();
2242
2256
  let testArgs = {};
2243
2257
  if (argStr) {
@@ -4,7 +4,7 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-7SBSBVUB.js";
7
+ } from "./chunk-2YXIZ3GN.js";
8
8
  import "./chunk-2ZD3YTVM.js";
9
9
  import "./chunk-4BKXL7SM.js";
10
10
  import "./chunk-ANYYM4CF.js";
@@ -13,10 +13,10 @@ import "./chunk-KJLJPUY2.js";
13
13
  import "./chunk-6VRJGH25.js";
14
14
  import "./chunk-2DXY7UGF.js";
15
15
  import "./chunk-KHYD3WXE.js";
16
- import "./chunk-PH7ICI6O.js";
16
+ import "./chunk-USRJN2CF.js";
17
17
  import {
18
18
  SUBAGENT_ALLOWED_TOOLS
19
- } from "./chunk-CD6FE5UD.js";
19
+ } from "./chunk-6YHSSX6F.js";
20
20
 
21
21
  // src/hub/task-orchestrator.ts
22
22
  import { createInterface } from "readline";
@@ -845,132 +845,132 @@ button, a, .session-item, .file-tree-row, .template-item, .tool-item, .mcp-serve
845
845
  @media (display-mode: standalone) {
846
846
  .navbar { padding-top: env(safe-area-inset-top, 0px); }
847
847
  }
848
-
849
- /* ── Session Replay (B1) ───────────────────────────── */
850
- .replay-step {
851
- border-left: 3px solid hsl(var(--b3));
852
- padding: 0.5rem 0.6rem;
853
- background: hsl(var(--b1));
854
- border-radius: 0 0.35rem 0.35rem 0;
855
- font-size: 0.85rem;
856
- }
857
- .replay-step.role-user { border-left-color: #3b82f6; }
858
- .replay-step.role-assistant { border-left-color: #10b981; }
859
- .replay-step.role-tool { border-left-color: #f59e0b; }
860
- .replay-step.role-tool.error { border-left-color: #ef4444; }
861
- .replay-step-header {
862
- display: flex;
863
- gap: 0.5rem;
864
- align-items: center;
865
- font-size: 0.72rem;
866
- opacity: 0.75;
867
- margin-bottom: 0.25rem;
868
- }
869
- .replay-step-header .role-tag {
870
- font-weight: 600;
871
- padding: 0 0.35rem;
872
- border-radius: 0.25rem;
873
- background: hsl(var(--b3));
874
- }
875
- .replay-step-body {
876
- white-space: pre-wrap;
877
- word-break: break-word;
878
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
879
- font-size: 0.78rem;
880
- max-height: 18rem;
881
- overflow-y: auto;
882
- }
883
- .replay-step-body.text-body {
884
- font-family: inherit;
885
- font-size: 0.85rem;
886
- }
887
- .replay-tool-block {
888
- margin-top: 0.3rem;
889
- padding: 0.4rem;
890
- background: hsl(var(--b2));
891
- border-radius: 0.3rem;
892
- font-size: 0.78rem;
893
- }
894
- .replay-tool-block .tool-name {
895
- font-weight: 600;
896
- color: #f59e0b;
897
- }
898
- .replay-tool-block pre {
899
- margin: 0.2rem 0 0;
900
- white-space: pre-wrap;
901
- word-break: break-word;
902
- font-size: 0.72rem;
903
- max-height: 12rem;
904
- overflow-y: auto;
905
- }
906
-
907
- /* ── B2 Branch picker (sidebar) ─────────────────────────── */
908
- .branch-item {
909
- display: flex;
910
- align-items: center;
911
- gap: 0.35rem;
912
- padding: 0.35rem 0.5rem;
913
- border-radius: 0.35rem;
914
- cursor: pointer;
915
- border: 1px solid transparent;
916
- transition: background 0.1s, border-color 0.1s;
917
- font-size: 0.78rem;
918
- line-height: 1.25;
919
- position: relative;
920
- }
921
- .branch-item:hover {
922
- background: rgba(128, 128, 128, 0.12);
923
- }
924
- .branch-item.active {
925
- background: rgba(34, 197, 94, 0.12);
926
- border-color: rgba(34, 197, 94, 0.45);
927
- }
928
- .branch-item .branch-marker {
929
- flex-shrink: 0;
930
- width: 0.8rem;
931
- color: rgb(34, 197, 94);
932
- }
933
- .branch-item .branch-title {
934
- flex: 1;
935
- min-width: 0;
936
- overflow: hidden;
937
- text-overflow: ellipsis;
938
- white-space: nowrap;
939
- }
940
- .branch-item .branch-id {
941
- flex-shrink: 0;
942
- opacity: 0.5;
943
- font-family: ui-monospace, SFMono-Regular, monospace;
944
- font-size: 0.7rem;
945
- }
946
- .branch-item .branch-count {
947
- flex-shrink: 0;
948
- opacity: 0.55;
949
- font-size: 0.7rem;
950
- }
951
- .branch-item .branch-actions {
952
- display: none;
953
- gap: 0.15rem;
954
- flex-shrink: 0;
955
- }
956
- .branch-item:hover .branch-actions {
957
- display: flex;
958
- }
959
- .branch-item .branch-actions button {
960
- background: transparent;
961
- border: none;
962
- padding: 0 0.2rem;
963
- font-size: 0.72rem;
964
- cursor: pointer;
965
- opacity: 0.7;
966
- }
967
- .branch-item .branch-actions button:hover {
968
- opacity: 1;
969
- }
970
- .branch-item .branch-indent {
971
- flex-shrink: 0;
972
- color: rgba(128, 128, 128, 0.5);
973
- font-family: ui-monospace, SFMono-Regular, monospace;
974
- font-size: 0.72rem;
975
- white-space: pre;
976
- }
848
+
849
+ /* ── Session Replay (B1) ───────────────────────────── */
850
+ .replay-step {
851
+ border-left: 3px solid hsl(var(--b3));
852
+ padding: 0.5rem 0.6rem;
853
+ background: hsl(var(--b1));
854
+ border-radius: 0 0.35rem 0.35rem 0;
855
+ font-size: 0.85rem;
856
+ }
857
+ .replay-step.role-user { border-left-color: #3b82f6; }
858
+ .replay-step.role-assistant { border-left-color: #10b981; }
859
+ .replay-step.role-tool { border-left-color: #f59e0b; }
860
+ .replay-step.role-tool.error { border-left-color: #ef4444; }
861
+ .replay-step-header {
862
+ display: flex;
863
+ gap: 0.5rem;
864
+ align-items: center;
865
+ font-size: 0.72rem;
866
+ opacity: 0.75;
867
+ margin-bottom: 0.25rem;
868
+ }
869
+ .replay-step-header .role-tag {
870
+ font-weight: 600;
871
+ padding: 0 0.35rem;
872
+ border-radius: 0.25rem;
873
+ background: hsl(var(--b3));
874
+ }
875
+ .replay-step-body {
876
+ white-space: pre-wrap;
877
+ word-break: break-word;
878
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
879
+ font-size: 0.78rem;
880
+ max-height: 18rem;
881
+ overflow-y: auto;
882
+ }
883
+ .replay-step-body.text-body {
884
+ font-family: inherit;
885
+ font-size: 0.85rem;
886
+ }
887
+ .replay-tool-block {
888
+ margin-top: 0.3rem;
889
+ padding: 0.4rem;
890
+ background: hsl(var(--b2));
891
+ border-radius: 0.3rem;
892
+ font-size: 0.78rem;
893
+ }
894
+ .replay-tool-block .tool-name {
895
+ font-weight: 600;
896
+ color: #f59e0b;
897
+ }
898
+ .replay-tool-block pre {
899
+ margin: 0.2rem 0 0;
900
+ white-space: pre-wrap;
901
+ word-break: break-word;
902
+ font-size: 0.72rem;
903
+ max-height: 12rem;
904
+ overflow-y: auto;
905
+ }
906
+
907
+ /* ── B2 Branch picker (sidebar) ─────────────────────────── */
908
+ .branch-item {
909
+ display: flex;
910
+ align-items: center;
911
+ gap: 0.35rem;
912
+ padding: 0.35rem 0.5rem;
913
+ border-radius: 0.35rem;
914
+ cursor: pointer;
915
+ border: 1px solid transparent;
916
+ transition: background 0.1s, border-color 0.1s;
917
+ font-size: 0.78rem;
918
+ line-height: 1.25;
919
+ position: relative;
920
+ }
921
+ .branch-item:hover {
922
+ background: rgba(128, 128, 128, 0.12);
923
+ }
924
+ .branch-item.active {
925
+ background: rgba(34, 197, 94, 0.12);
926
+ border-color: rgba(34, 197, 94, 0.45);
927
+ }
928
+ .branch-item .branch-marker {
929
+ flex-shrink: 0;
930
+ width: 0.8rem;
931
+ color: rgb(34, 197, 94);
932
+ }
933
+ .branch-item .branch-title {
934
+ flex: 1;
935
+ min-width: 0;
936
+ overflow: hidden;
937
+ text-overflow: ellipsis;
938
+ white-space: nowrap;
939
+ }
940
+ .branch-item .branch-id {
941
+ flex-shrink: 0;
942
+ opacity: 0.5;
943
+ font-family: ui-monospace, SFMono-Regular, monospace;
944
+ font-size: 0.7rem;
945
+ }
946
+ .branch-item .branch-count {
947
+ flex-shrink: 0;
948
+ opacity: 0.55;
949
+ font-size: 0.7rem;
950
+ }
951
+ .branch-item .branch-actions {
952
+ display: none;
953
+ gap: 0.15rem;
954
+ flex-shrink: 0;
955
+ }
956
+ .branch-item:hover .branch-actions {
957
+ display: flex;
958
+ }
959
+ .branch-item .branch-actions button {
960
+ background: transparent;
961
+ border: none;
962
+ padding: 0 0.2rem;
963
+ font-size: 0.72rem;
964
+ cursor: pointer;
965
+ opacity: 0.7;
966
+ }
967
+ .branch-item .branch-actions button:hover {
968
+ opacity: 1;
969
+ }
970
+ .branch-item .branch-indent {
971
+ flex-shrink: 0;
972
+ color: rgba(128, 128, 128, 0.5);
973
+ font-family: ui-monospace, SFMono-Regular, monospace;
974
+ font-size: 0.72rem;
975
+ white-space: pre;
976
+ }