nolo-cli 0.47.0 → 0.48.0

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 (89) hide show
  1. package/{_executeModel-Q4NLKUPH.js → _executeModel-36GKPAEZ.js} +25 -25
  2. package/{action-FLLC2SIX.js → action-IU6ON7ZB.js} +4 -4
  3. package/{addContentAction-SVSPUUK4.js → addContentAction-5V5CCI3I.js} +3 -3
  4. package/{addDialogAgentAction-W3JGU4F7.js → addDialogAgentAction-KF3KZZNZ.js} +2 -2
  5. package/{agentDeleteCommand-6MHA67Q2.js → agentDeleteCommand-SBODEUPE.js} +12 -12
  6. package/{agentEmailCommands-L3XZ237J.js → agentEmailCommands-ME7BCY5S.js} +30 -30
  7. package/{agentListCommands-6PIBJFKH.js → agentListCommands-QBWPKN5D.js} +12 -12
  8. package/{agentMachineCommands-POTNZ57E.js → agentMachineCommands-KFFUPELZ.js} +13 -13
  9. package/{agentRecordCommands-IMRKLUIK.js → agentRecordCommands-4BF6JIHS.js} +29 -29
  10. package/{agentRunCommand-LFZCDJLJ.js → agentRunCommand-4MA7D6SV.js} +29 -29
  11. package/{agentRuntimeLocal-BVUV26QD.js → agentRuntimeLocal-RD52NPCG.js} +12 -12
  12. package/{agentSlice-CIN6FY6Z.js → agentSlice-AJABGQHU.js} +3 -3
  13. package/{appDeleteCommands-QZBYALTD.js → appDeleteCommands-I42NL3LP.js} +14 -14
  14. package/{appDeployCommands-UDUJPOBN.js → appDeployCommands-CZWHXVPU.js} +14 -14
  15. package/{appDeployStatusCommands-P2ZTUCDR.js → appDeployStatusCommands-PIQYXACM.js} +14 -14
  16. package/{appGetCommands-346YWTIX.js → appGetCommands-CI2OWLT7.js} +14 -14
  17. package/{appListCommands-ML7PAZXO.js → appListCommands-LWLSHPCP.js} +14 -14
  18. package/{authCommand-7A4LJ7RD.js → authCommand-WLWOEVYI.js} +6 -6
  19. package/{chatQueueReduxAdapter-46OTJS77.js → chatQueueReduxAdapter-V37RK3A6.js} +11 -11
  20. package/{chunk-Z5NW3O7V.js → chunk-2JYSSXLY.js} +8 -0
  21. package/{chunk-D45NILIX.js → chunk-3YVCM5PE.js} +1 -1
  22. package/{chunk-3EEK7T3D.js → chunk-4RXXP6WD.js} +1 -1
  23. package/{chunk-UYWXQCPH.js → chunk-4ZL2KBI7.js} +1 -1
  24. package/{chunk-UL3AIGAQ.js → chunk-5SLTA66C.js} +22 -22
  25. package/{chunk-FJHLA6SX.js → chunk-5XCW6RQG.js} +1 -1
  26. package/{chunk-FTGZTG2J.js → chunk-67Q6IHM5.js} +184 -50
  27. package/{chunk-WVGEBWA6.js → chunk-76UA7376.js} +3 -3
  28. package/{chunk-YB7675WX.js → chunk-AV4Z57LV.js} +3 -1
  29. package/{chunk-K3HS5RNN.js → chunk-AZ6DT2UD.js} +1 -1
  30. package/{chunk-LFLWZX76.js → chunk-B54WOZ77.js} +1 -1
  31. package/{chunk-UX4WJK6W.js → chunk-BO3YFOZR.js} +10 -1
  32. package/{chunk-H3YNPYSN.js → chunk-CY5KIIPU.js} +10 -10
  33. package/{chunk-QPIMHSA5.js → chunk-DFY6O64O.js} +8 -8
  34. package/{chunk-MKZRKDQM.js → chunk-DIQCV4FR.js} +1 -1
  35. package/{chunk-V5LQH25J.js → chunk-F22JQTSX.js} +2 -2
  36. package/{chunk-U72222TN.js → chunk-H5QLIP6S.js} +1 -1
  37. package/{chunk-2X5S4IBZ.js → chunk-HCBQVVFZ.js} +1 -1
  38. package/{chunk-GK74OOFT.js → chunk-HR5XDXYM.js} +2 -2
  39. package/{chunk-CKCHKUQZ.js → chunk-IVKEJD7I.js} +1 -1
  40. package/{chunk-2PGAWTDB.js → chunk-JBL24PK6.js} +1 -1
  41. package/{chunk-BEDKTILE.js → chunk-JVKFKKYN.js} +1 -1
  42. package/{chunk-EK6J2BLB.js → chunk-KOZ2G3ZG.js} +4 -4
  43. package/{chunk-HMMOAG2I.js → chunk-OZKJBDG4.js} +6 -3
  44. package/{chunk-6DYGT4IA.js → chunk-PGKZ2KGE.js} +20 -20
  45. package/{chunk-KZCDMZ6M.js → chunk-PJASTA2U.js} +3 -3
  46. package/{chunk-OTYXCO4M.js → chunk-POLE2QLO.js} +26 -21
  47. package/{chunk-QKF5I66W.js → chunk-QF27IZB3.js} +3 -3
  48. package/{chunk-D57WA7W3.js → chunk-QTH72J3N.js} +6 -6
  49. package/{chunk-AYXSUBVC.js → chunk-RO2IUWZE.js} +1 -1
  50. package/{chunk-HAPCUPEO.js → chunk-SG65C33A.js} +2 -2
  51. package/{chunk-HGDOIDQ4.js → chunk-SQTVMYMU.js} +1 -1
  52. package/{chunk-5Z7NTYAZ.js → chunk-TZRB2I2M.js} +14 -13
  53. package/{chunk-4UOFNBUR.js → chunk-VKSBVRGP.js} +1 -1
  54. package/{chunk-E5HKZ4TR.js → chunk-W3RZLXMA.js} +1 -1
  55. package/{chunk-EMEUU5IY.js → chunk-X7S7OFUX.js} +2 -2
  56. package/{chunk-IGQMIZ5L.js → chunk-XB7ACJFH.js} +2 -2
  57. package/{chunk-XY3V7K4L.js → chunk-XPW6JLOB.js} +22 -4
  58. package/{createAgentAutomationAction-OFRNHZWC.js → createAgentAutomationAction-5OZIWOK4.js} +12 -12
  59. package/{createDialogAction-2FF2JSWP.js → createDialogAction-334CHPJF.js} +13 -13
  60. package/{createPageAction-6MTVIU3J.js → createPageAction-LXY22WTA.js} +12 -12
  61. package/{dbSlice-XWUM4QOF.js → dbSlice-FWF5F4L7.js} +2 -2
  62. package/{dialogCommands-MMLBXSBC.js → dialogCommands-4MGUHAJI.js} +12 -12
  63. package/{dialogSlice-MONRO6AH.js → dialogSlice-76W7S3C4.js} +11 -11
  64. package/{docCreateCommands-K53AHACN.js → docCreateCommands-346W5443.js} +13 -13
  65. package/{docDeleteCommands-MJVGF67W.js → docDeleteCommands-FKEEPUUS.js} +13 -13
  66. package/{docReadCommands-VWNRVF6W.js → docReadCommands-AACI4DVO.js} +13 -13
  67. package/{docStore-A3UWWGMV.js → docStore-N7QTPHAX.js} +13 -13
  68. package/{docUpdateCommands-QUDD5TUR.js → docUpdateCommands-WHWVZ2XE.js} +13 -13
  69. package/{getPricing-AQ5MSXFO.js → getPricing-JNOCWYDH.js} +2 -2
  70. package/{handleSendMessageAction-6TQ7JM5X.js → handleSendMessageAction-EAXEX5AX.js} +11 -11
  71. package/index.js +47 -47
  72. package/{machineCommands-W7QEV6Q6.js → machineCommands-XNWLQVTN.js} +29 -29
  73. package/{machineWsRunDispatch-5P6X4WMI.js → machineWsRunDispatch-56HWQ67L.js} +29 -29
  74. package/package.json +1 -1
  75. package/{read-DQQ75VI3.js → read-J7RVVCHH.js} +1 -1
  76. package/{readDocTool-HCQQFAZD.js → readDocTool-G2WBM4IH.js} +1 -1
  77. package/{readlineWorkspace-PPPF6OCO.js → readlineWorkspace-AXTB7DJC.js} +142 -93
  78. package/{removeDialogAgentAction-DNONRKST.js → removeDialogAgentAction-RMPISD42.js} +4 -4
  79. package/{runAgentClientLoop-YBZTAE2J.js → runAgentClientLoop-PU3R3UXA.js} +23 -23
  80. package/{setDialogExtraReferencesAction-ERHUPT3F.js → setDialogExtraReferencesAction-7BUTHDAL.js} +3 -3
  81. package/{setPrimaryDialogAgentAction-6C2HYNEC.js → setPrimaryDialogAgentAction-WCYIBGZ4.js} +4 -4
  82. package/{settingSlice-YVRJFKQX.js → settingSlice-7NN2MI6Y.js} +3 -3
  83. package/{spaceCommands-FDZ4P33G.js → spaceCommands-JYI3X4N2.js} +12 -12
  84. package/{spaceSlice-NTZBL55S.js → spaceSlice-ERZ3RGWC.js} +12 -12
  85. package/{streamAgentChatTurn-N56LGQG4.js → streamAgentChatTurn-2IH4MTQC.js} +27 -27
  86. package/{switchDialogAgentAction-HP57XYFP.js → switchDialogAgentAction-WGMMQHDI.js} +2 -2
  87. package/{tools-GROQHVCL.js → tools-DJUTQEMP.js} +18 -18
  88. package/{tuiSummaryLlmCaller-32XPVSRB.js → tuiSummaryLlmCaller-U4EGD2SX.js} +8 -8
  89. package/{updateDialogTitleAction-WYAVJPLS.js → updateDialogTitleAction-OVOPGTC3.js} +12 -12
@@ -64,7 +64,7 @@ import {
64
64
  wrapTextToLines,
65
65
  wrapTranscriptLine,
66
66
  wrapTranscriptLineWithLayout
67
- } from "./chunk-FTGZTG2J.js";
67
+ } from "./chunk-67Q6IHM5.js";
68
68
  import {
69
69
  listFavoriteAgentIdsAcrossServers,
70
70
  listLocalCachedAgents,
@@ -86,8 +86,8 @@ import {
86
86
  readTimestamp,
87
87
  setCliLocale,
88
88
  t
89
- } from "./chunk-OTYXCO4M.js";
90
- import "./chunk-D45NILIX.js";
89
+ } from "./chunk-POLE2QLO.js";
90
+ import "./chunk-3YVCM5PE.js";
91
91
  import "./chunk-EADNWBAZ.js";
92
92
  import "./chunk-NI2BS6UD.js";
93
93
  import {
@@ -113,21 +113,21 @@ import {
113
113
  import "./chunk-ESHYE7WU.js";
114
114
  import "./chunk-JBTJAPUF.js";
115
115
  import "./chunk-LTRXGFMS.js";
116
- import "./chunk-AYXSUBVC.js";
116
+ import "./chunk-RO2IUWZE.js";
117
117
  import "./chunk-ATNTHIZI.js";
118
118
  import "./chunk-JEXVIMYZ.js";
119
119
  import {
120
120
  prepareTools
121
- } from "./chunk-U72222TN.js";
121
+ } from "./chunk-H5QLIP6S.js";
122
122
  import "./chunk-HS7MLR74.js";
123
- import "./chunk-UYWXQCPH.js";
124
- import "./chunk-UL3AIGAQ.js";
123
+ import "./chunk-4ZL2KBI7.js";
124
+ import "./chunk-5SLTA66C.js";
125
125
  import "./chunk-5XTOKQLW.js";
126
126
  import "./chunk-NF64D32W.js";
127
127
  import "./chunk-3L2WKC3W.js";
128
128
  import "./chunk-Z7A54NFZ.js";
129
129
  import "./chunk-KQHGZWSV.js";
130
- import "./chunk-FJHLA6SX.js";
130
+ import "./chunk-5XCW6RQG.js";
131
131
  import {
132
132
  clipText,
133
133
  formatDuration,
@@ -140,9 +140,9 @@ import {
140
140
  shortRunId
141
141
  } from "./chunk-KXKQO4Q6.js";
142
142
  import "./chunk-INZZJSQF.js";
143
- import "./chunk-KZCDMZ6M.js";
143
+ import "./chunk-PJASTA2U.js";
144
144
  import "./chunk-BANYWEYY.js";
145
- import "./chunk-2X5S4IBZ.js";
145
+ import "./chunk-HCBQVVFZ.js";
146
146
  import "./chunk-MEYIRKDN.js";
147
147
  import "./chunk-63W5N6P3.js";
148
148
  import "./chunk-VF4K2QE6.js";
@@ -151,17 +151,17 @@ import {
151
151
  createTurnRequest,
152
152
  normalizeRunCompletionShape
153
153
  } from "./chunk-YPREESF4.js";
154
- import "./chunk-XY3V7K4L.js";
155
- import "./chunk-QPIMHSA5.js";
154
+ import "./chunk-XPW6JLOB.js";
155
+ import "./chunk-DFY6O64O.js";
156
156
  import {
157
157
  extractReferenceKeysFromMessage
158
- } from "./chunk-6DYGT4IA.js";
158
+ } from "./chunk-PGKZ2KGE.js";
159
159
  import "./chunk-EVBFYPDC.js";
160
160
  import "./chunk-H2G6JXTR.js";
161
161
  import "./chunk-YYLHWIW6.js";
162
- import "./chunk-EK6J2BLB.js";
162
+ import "./chunk-KOZ2G3ZG.js";
163
163
  import "./chunk-AGGIDPCZ.js";
164
- import "./chunk-HAPCUPEO.js";
164
+ import "./chunk-SG65C33A.js";
165
165
  import "./chunk-5RGU3J7P.js";
166
166
  import "./chunk-M76ECQRD.js";
167
167
  import "./chunk-MRWGHF56.js";
@@ -183,10 +183,10 @@ import {
183
183
  buildLocalWorkspaceToolset,
184
184
  getProcessRegistry,
185
185
  readCommandActionGatePayload
186
- } from "./chunk-D57WA7W3.js";
187
- import "./chunk-IGQMIZ5L.js";
186
+ } from "./chunk-QTH72J3N.js";
187
+ import "./chunk-XB7ACJFH.js";
188
188
  import "./chunk-ZNFJWEN4.js";
189
- import "./chunk-4UOFNBUR.js";
189
+ import "./chunk-VKSBVRGP.js";
190
190
  import "./chunk-T27IEBNQ.js";
191
191
  import "./chunk-N7J63Q6C.js";
192
192
  import {
@@ -194,11 +194,11 @@ import {
194
194
  buildIdentityBlock,
195
195
  buildRuntimeGuidanceBlocks,
196
196
  resolveToolGuidedSections
197
- } from "./chunk-HMMOAG2I.js";
197
+ } from "./chunk-OZKJBDG4.js";
198
198
  import "./chunk-6BYAXNH5.js";
199
199
  import {
200
200
  resolvePlatformAuthToken
201
- } from "./chunk-2PGAWTDB.js";
201
+ } from "./chunk-JBL24PK6.js";
202
202
  import "./chunk-TNPCQNGQ.js";
203
203
  import {
204
204
  isQuotaExhaustedError
@@ -207,7 +207,7 @@ import "./chunk-2MBTWINN.js";
207
207
  import {
208
208
  DEFAULT_CONTEXT_WINDOW,
209
209
  getModelContextWindow
210
- } from "./chunk-V5LQH25J.js";
210
+ } from "./chunk-F22JQTSX.js";
211
211
  import {
212
212
  buildCompactionMetricsFromPlan,
213
213
  buildCompactionUserContent,
@@ -218,11 +218,11 @@ import {
218
218
  formatMessagesForSummaryWithTruncation,
219
219
  planCompression,
220
220
  serializeMessageContent
221
- } from "./chunk-GK74OOFT.js";
222
- import "./chunk-YB7675WX.js";
221
+ } from "./chunk-HR5XDXYM.js";
222
+ import "./chunk-AV4Z57LV.js";
223
223
  import "./chunk-NQ4N4IGO.js";
224
224
  import "./chunk-FD36SCCD.js";
225
- import "./chunk-UX4WJK6W.js";
225
+ import "./chunk-BO3YFOZR.js";
226
226
  import {
227
227
  compactWhitespace
228
228
  } from "./chunk-DWLEOOGR.js";
@@ -270,13 +270,13 @@ import {
270
270
  } from "./chunk-OLZBQWZU.js";
271
271
  import "./chunk-Y7TGWSUN.js";
272
272
  import "./chunk-VFN256RI.js";
273
- import "./chunk-HGDOIDQ4.js";
274
- import "./chunk-EMEUU5IY.js";
273
+ import "./chunk-SQTVMYMU.js";
274
+ import "./chunk-X7S7OFUX.js";
275
275
  import "./chunk-Y5GCAMGP.js";
276
276
  import "./chunk-UZ6XXCVR.js";
277
277
  import "./chunk-KX6YBIHG.js";
278
- import "./chunk-3EEK7T3D.js";
279
- import "./chunk-WVGEBWA6.js";
278
+ import "./chunk-4RXXP6WD.js";
279
+ import "./chunk-76UA7376.js";
280
280
  import "./chunk-SVEUG45B.js";
281
281
  import "./chunk-WWC7I6TA.js";
282
282
  import "./chunk-I42VC5KR.js";
@@ -289,7 +289,7 @@ import {
289
289
  BUILTIN_NOLO_AGENT_MODEL,
290
290
  BUILTIN_NOLO_AGENT_NAME,
291
291
  builtinAgentCatalogEntryById
292
- } from "./chunk-Z5NW3O7V.js";
292
+ } from "./chunk-2JYSSXLY.js";
293
293
  import {
294
294
  extractCustomId,
295
295
  parsePublicAgentId
@@ -1166,6 +1166,7 @@ function createTurnHistory() {
1166
1166
  turns: [],
1167
1167
  currentRole: null,
1168
1168
  currentContent: "",
1169
+ currentBlocks: [],
1169
1170
  scrollTop: 0,
1170
1171
  followBottom: true
1171
1172
  };
@@ -1176,19 +1177,40 @@ function startTurn(history, role) {
1176
1177
  }
1177
1178
  history.currentRole = role;
1178
1179
  history.currentContent = "";
1180
+ history.currentBlocks = [];
1179
1181
  resetStreamingTurnCache();
1180
1182
  }
1181
1183
  function appendToCurrentTurn(history, chunk) {
1182
1184
  history.currentContent += chunk;
1185
+ appendCurrentBlock(history, "assistant", chunk);
1186
+ }
1187
+ function appendCurrentBlock(history, kind, chunk) {
1188
+ if (!chunk) return;
1189
+ const last = history.currentBlocks.at(-1);
1190
+ if (last?.kind === kind) {
1191
+ last.content = applyTerminalOutputToText(last.content, chunk);
1192
+ } else {
1193
+ history.currentBlocks.push({
1194
+ kind,
1195
+ content: applyTerminalOutputToText("", chunk)
1196
+ });
1197
+ }
1183
1198
  }
1184
1199
  function finalizeCurrentTurn(history) {
1185
1200
  if (history.currentRole !== null) {
1186
1201
  history.turns.push({
1187
1202
  role: history.currentRole,
1188
- content: compactTurnContent(history.currentContent)
1203
+ content: compactTurnContent(history.currentContent),
1204
+ ...history.currentRole === "assistant" && history.currentBlocks.length > 0 ? {
1205
+ blocks: history.currentBlocks.map((block) => ({
1206
+ ...block,
1207
+ content: compactTurnContent(block.content)
1208
+ })).filter((block) => block.content.length > 0)
1209
+ } : {}
1189
1210
  });
1190
1211
  history.currentRole = null;
1191
1212
  history.currentContent = "";
1213
+ history.currentBlocks = [];
1192
1214
  resetStreamingTurnCache();
1193
1215
  trimHistoryToBudget(history);
1194
1216
  }
@@ -1203,17 +1225,20 @@ function appendLocalTurn(history, command, output) {
1203
1225
  trimHistoryToBudget(history);
1204
1226
  resetStreamingTurnCache();
1205
1227
  }
1206
- function applyOutputChunkToCurrentTurn(history, chunk) {
1228
+ function applyOutputChunkToCurrentTurn(history, chunk, kind = "assistant") {
1207
1229
  const next = applyTerminalOutputToText(history.currentContent, chunk);
1208
1230
  if (next === history.currentContent) return false;
1209
1231
  history.currentContent = next;
1232
+ appendCurrentBlock(history, kind, chunk);
1210
1233
  return true;
1211
1234
  }
1212
1235
  function styleAssistantTurn(content, colorEnabled) {
1213
1236
  const highlighted = colorEnabled ? formatAssistantDisplay(content, { trimEdges: false }) : stripAnsi(formatAssistantDisplay(content, { trimEdges: false }));
1214
1237
  const rawLines = highlighted.split("\n");
1215
- const styledLines = rawLines.map((line, idx) => {
1216
- if (idx === 0 && !line.startsWith("[nolo]")) {
1238
+ let anchored = false;
1239
+ const styledLines = rawLines.map((line) => {
1240
+ if (!anchored && line.trim().length > 0 && !line.startsWith("[nolo]")) {
1241
+ anchored = true;
1217
1242
  const anchorPrefix = colorEnabled ? `${themeColorSequence("chrome")}\u25C8\x1B[39m ` : "\u25C8 ";
1218
1243
  return `${anchorPrefix}${line}`;
1219
1244
  }
@@ -1324,9 +1349,11 @@ function layoutTurnRows(role, content, contentWidth, colorEnabled, command) {
1324
1349
  let rawIdx = 0;
1325
1350
  let rawOffset = 0;
1326
1351
  const rows = [];
1352
+ let anchored = false;
1327
1353
  for (let i = 0; i < styledLines.length; i++) {
1328
1354
  const styledLine = styledLines[i];
1329
- const isFirstLine = i === 0 && !styledLine.startsWith("[nolo]");
1355
+ const isFirstLine = !anchored && styledLine.trim().length > 0 && !styledLine.startsWith("[nolo]");
1356
+ if (isFirstLine) anchored = true;
1330
1357
  const anchorPrefix = isFirstLine ? colorEnabled ? `${themeColorSequence("chrome")}\u25C8\x1B[39m ` : "\u25C8 " : "";
1331
1358
  const prefixWidth = isFirstLine ? 2 : 0;
1332
1359
  const prefixCharCount = anchorPrefix.length;
@@ -1387,15 +1414,7 @@ function renderPrefixTurnBlock(role, content, contentWidth, colorEnabled) {
1387
1414
  if (role === "user") {
1388
1415
  return renderTurnBlock(role, content, contentWidth, colorEnabled);
1389
1416
  }
1390
- const highlighted = colorEnabled ? formatAssistantDisplay(content, { trimEdges: false }) : stripAnsi(formatAssistantDisplay(content, { trimEdges: false }));
1391
- const rawLines = highlighted.split("\n");
1392
- const styledLines = rawLines.map((line, idx) => {
1393
- if (idx === 0 && !line.startsWith("[nolo]")) {
1394
- const anchorPrefix = colorEnabled ? `${themeColorSequence("chrome")}\u25C8\x1B[39m ` : "\u25C8 ";
1395
- return `${anchorPrefix}${line}`;
1396
- }
1397
- return line.startsWith("[nolo]") && colorEnabled ? themeText(line, "chrome", true) : line;
1398
- });
1417
+ const styledLines = styleAssistantTurn(content, colorEnabled).split("\n");
1399
1418
  const lines = [];
1400
1419
  for (const logicalLine of styledLines) {
1401
1420
  lines.push(...wrapTranscriptLine(logicalLine, contentWidth));
@@ -1728,16 +1747,23 @@ function renderHistory(output, history, inputLines, selection) {
1728
1747
  }
1729
1748
  }
1730
1749
  function createHistoryOutputStream(history, onUpdate) {
1731
- return {
1750
+ const stream = {
1732
1751
  isTTY: true,
1752
+ assistantLabelManaged: true,
1733
1753
  write(chunk) {
1734
1754
  const text = typeof chunk === "string" ? chunk : chunk.toString();
1735
1755
  if (applyOutputChunkToCurrentTurn(history, text)) {
1736
1756
  onUpdate();
1737
1757
  }
1738
1758
  return true;
1759
+ },
1760
+ writeToolBlock(chunk) {
1761
+ if (applyOutputChunkToCurrentTurn(history, chunk, "tool")) {
1762
+ onUpdate();
1763
+ }
1739
1764
  }
1740
1765
  };
1766
+ return stream;
1741
1767
  }
1742
1768
  function applyScrollAction(history, action, output, inputLines) {
1743
1769
  const tty = output;
@@ -1830,6 +1856,10 @@ function activeInFlight(snapshot) {
1830
1856
  if (isAgentRunTerminalStatus(snapshot.status)) return null;
1831
1857
  return snapshot.inFlight ?? null;
1832
1858
  }
1859
+ function formatTerminalRunAge(snapshot, now) {
1860
+ if (!isAgentRunTerminalStatus(snapshot.status)) return null;
1861
+ return formatRunAge(snapshot, now);
1862
+ }
1833
1863
  function formatUnassignedFact(snapshot) {
1834
1864
  return snapshot.unassigned ? "parent: ?" : null;
1835
1865
  }
@@ -1868,7 +1898,7 @@ function formatAgentRunPanelLines(snapshot, colorEnabled, now = Date.now()) {
1868
1898
  const unassignedFact = formatUnassignedFact(snapshot);
1869
1899
  const unassignedPart = unassignedFact ? ` \xB7 ${unassignedFact}` : "";
1870
1900
  const progressPart = formatPanelProgress(snapshot, now);
1871
- const age = formatRunAge(snapshot, now);
1901
+ const age = formatTerminalRunAge(snapshot, now);
1872
1902
  const agePart = age ? ` \xB7 ${age}` : "";
1873
1903
  if (!colorEnabled) {
1874
1904
  lines.push(
@@ -2070,7 +2100,7 @@ function formatRunDockRow(snapshot, colorEnabled, now) {
2070
2100
  const terminal = isAgentRunTerminalStatus(snapshot.status);
2071
2101
  const statusColor = runStatusTone(snapshot.status);
2072
2102
  const facts = [];
2073
- const age = formatRunAge(snapshot, now);
2103
+ const age = formatTerminalRunAge(snapshot, now);
2074
2104
  if (terminal) facts.push(age ? `${snapshot.status} ${age}` : snapshot.status);
2075
2105
  else if (age) facts.push(age);
2076
2106
  const unassigned = formatUnassignedFact(snapshot);
@@ -2241,25 +2271,6 @@ var RUN_POLL_INTERVAL_MS = 1e3;
2241
2271
  var DISCOVERY_EVERY_TICKS = 5;
2242
2272
  var DISCOVERY_TERMINAL_LINGER_MS = 6e4;
2243
2273
  var RUN_RECONCILE_SILENCE_MS = 15e3;
2244
- var RUNNING_AGENT_COUNT_CACHE_TTL_MS = 1e3;
2245
- var cachedRunningAgentCount = 0;
2246
- var lastRunningAgentCountScannedAt = 0;
2247
- function getCachedRunningAgentCount(options) {
2248
- const now = options?.now ?? Date.now();
2249
- if (!options?.force && lastRunningAgentCountScannedAt > 0 && now - lastRunningAgentCountScannedAt < RUNNING_AGENT_COUNT_CACHE_TTL_MS) {
2250
- return cachedRunningAgentCount;
2251
- }
2252
- const readFn = options?.reader ?? listRunRecords;
2253
- try {
2254
- const records = readFn();
2255
- cachedRunningAgentCount = records.filter(
2256
- (r) => !isAgentRunTerminalStatus(r.status)
2257
- ).length;
2258
- lastRunningAgentCountScannedAt = now;
2259
- } catch {
2260
- }
2261
- return cachedRunningAgentCount;
2262
- }
2263
2274
  function snapshotFromRunRecord(record, now) {
2264
2275
  const label = resolveRunLabel(record);
2265
2276
  const startedAt = readTimestamp(record.startedAt);
@@ -2343,18 +2354,18 @@ function createRunRegistryPoller(deps) {
2343
2354
  }
2344
2355
  const discovered = discoveredRecords;
2345
2356
  const currentDialogId = deps.getCurrentDialogId?.();
2357
+ const belongsToCurrentDialog = (record) => !deps.getCurrentDialogId || currentDialogId !== null && record.parentDialogId === currentDialogId;
2346
2358
  const discoveredActive = discovered.filter(
2347
- (record) => record.runId && !dockedIds.has(record.runId) && !retiredRunIds.has(record.runId) && !isAgentRunTerminalStatus(record.status) && (!deps.getCurrentDialogId || currentDialogId !== void 0 && (record.parentDialogId === currentDialogId || !record.parentDialogId))
2359
+ (record) => record.runId && !dockedIds.has(record.runId) && !retiredRunIds.has(record.runId) && !isAgentRunTerminalStatus(record.status) && belongsToCurrentDialog(record)
2348
2360
  );
2349
2361
  const discoveredTerminal = discovered.filter((record) => {
2350
2362
  if (!record.runId || dockedIds.has(record.runId) || retiredRunIds.has(record.runId)) return false;
2351
- if (!isAgentRunTerminalStatus(record.status)) return false;
2352
- if (deps.getCurrentDialogId && (currentDialogId === void 0 || !(record.parentDialogId === currentDialogId || !record.parentDialogId))) return false;
2363
+ if (!isAgentRunTerminalStatus(record.status) || !belongsToCurrentDialog(record)) return false;
2353
2364
  const endedAt = readTimestamp(record.endedAt);
2354
2365
  return endedAt !== void 0 && at - endedAt <= DISCOVERY_TERMINAL_LINGER_MS;
2355
2366
  });
2356
2367
  for (const record of discovered) {
2357
- if (record.runId && isAgentRunTerminalStatus(record.status) && !discoveredTerminal.includes(record)) {
2368
+ if (record.runId && isAgentRunTerminalStatus(record.status) && belongsToCurrentDialog(record) && !discoveredTerminal.includes(record)) {
2358
2369
  retiredRunIds.add(record.runId);
2359
2370
  }
2360
2371
  }
@@ -2378,6 +2389,7 @@ function createRunRegistryPoller(deps) {
2378
2389
  continue;
2379
2390
  }
2380
2391
  if (!record) continue;
2392
+ if (deps.getCurrentDialogId && !belongsToCurrentDialog(record)) continue;
2381
2393
  polled.push(record);
2382
2394
  const snapshot = snapshotFromRunRecord(record, at);
2383
2395
  const mark = fingerprint(snapshot);
@@ -3623,7 +3635,7 @@ function renderComposerTokenChip(tokens, fallbackContextWindow, estimatedContext
3623
3635
  const pctText = pct > 0 && pct < 10 ? pct.toFixed(1) : Math.round(pct).toString();
3624
3636
  return `context: ${pctText}% (${formatTokenCount(used)}/${formatTokenCount(cw)})`;
3625
3637
  }
3626
- function renderStatusLine(state) {
3638
+ function renderStatusLine(state, maxWidth) {
3627
3639
  const colorEnabled = resolveCliColorEnabled();
3628
3640
  const sep = themeText(" \xB7 ", "chrome", colorEnabled);
3629
3641
  const agentDisplayName = state.agentName;
@@ -3652,25 +3664,65 @@ function renderStatusLine(state) {
3652
3664
  );
3653
3665
  parts.push(tokenSegment);
3654
3666
  const runningTaskCount = getProcessRegistry().listBackground().filter((p) => p.status === "running").length;
3655
- const runningAgentCount = getCachedRunningAgentCount();
3656
- const runningParts = [];
3657
3667
  if (runningTaskCount > 0) {
3658
- runningParts.push(`${runningTaskCount} running`);
3659
- }
3660
- if (runningAgentCount > 0) {
3661
- runningParts.push(`${runningAgentCount} ${runningAgentCount === 1 ? "agent" : "agents"}`);
3662
- }
3663
- if (runningParts.length > 0) {
3664
- parts.push(themeText(`\u2699 ${runningParts.join(" \xB7 ")}`, "info", colorEnabled));
3668
+ parts.push(themeText(`\u2699 ${runningTaskCount} running`, "info", colorEnabled));
3665
3669
  }
3666
3670
  if (state.autoConfirm === true) {
3667
3671
  parts.push(themeText("\u23F5 auto", "warning", colorEnabled));
3668
3672
  }
3669
- const body = parts.join(sep);
3673
+ let visibleParts = parts;
3674
+ if (maxWidth && maxWidth > 0) {
3675
+ const widthOf = (segments) => displayWidth(stripAnsi(segments.join(" \xB7 "))) + 2;
3676
+ for (const optional of [tokenSegment, cwdSegment, agentSegment]) {
3677
+ if (widthOf(visibleParts) <= maxWidth) break;
3678
+ visibleParts = visibleParts.filter((part) => part !== optional);
3679
+ }
3680
+ if (widthOf(visibleParts) > maxWidth && state.gitStatus) {
3681
+ const gitIndex = visibleParts.findIndex((part) => stripAnsi(part).startsWith("\u2442 "));
3682
+ if (gitIndex >= 0) {
3683
+ const { modified, untracked } = state.gitStatus;
3684
+ const compactDirty = themeText(
3685
+ `\u2442${modified > 0 ? ` *${modified}` : ""}${untracked > 0 ? ` ?${untracked}` : ""}`,
3686
+ "warning",
3687
+ colorEnabled
3688
+ );
3689
+ visibleParts = visibleParts.with(gitIndex, compactDirty);
3690
+ }
3691
+ }
3692
+ if (widthOf(visibleParts) > maxWidth) {
3693
+ const emergency = [];
3694
+ if (state.autoConfirm === true) {
3695
+ emergency.push(themeText("\u23F5", "warning", colorEnabled));
3696
+ }
3697
+ const runningTotal = runningTaskCount + runningAgentCount;
3698
+ if (runningTotal > 0) {
3699
+ emergency.push(themeText(`\u2699${runningTotal}`, "info", colorEnabled));
3700
+ }
3701
+ if (state.gitStatus) {
3702
+ const { modified, untracked } = state.gitStatus;
3703
+ emergency.push(themeText(
3704
+ `\u2442${modified > 0 ? `*${modified}` : ""}${untracked > 0 ? `?${untracked}` : ""}`,
3705
+ "warning",
3706
+ colorEnabled
3707
+ ));
3708
+ }
3709
+ visibleParts = [emergency.join(" ")];
3710
+ }
3711
+ }
3712
+ const body = visibleParts.join(sep);
3670
3713
  const surface = colorEnabled ? surfaceBackgroundSequence() : "";
3671
3714
  if (!surface) return body;
3672
3715
  return `${surface} ${body} \x1B[49m`;
3673
3716
  }
3717
+ function composeStatusLineWithQueue(state, queueSuffix, maxWidth) {
3718
+ const hasBudget = typeof maxWidth === "number" && maxWidth > 0;
3719
+ const queueWidth = queueSuffix ? visibleWidth(queueSuffix) : 0;
3720
+ const budget = hasBudget ? Math.max(1, maxWidth - queueWidth) : void 0;
3721
+ const base = renderStatusLine(state, budget);
3722
+ if (!queueSuffix) return base;
3723
+ if (!hasBudget) return base + queueSuffix;
3724
+ return visibleWidth(base) + queueWidth <= maxWidth ? base + queueSuffix : base;
3725
+ }
3674
3726
  function buildPlainScene(isDark, frame = 0, maxFrames = 0) {
3675
3727
  let skyLine = ` ${isDark ? "\u{1F319}" : "\u2600"}`;
3676
3728
  if (isDark) {
@@ -4328,7 +4380,7 @@ function createInitialTuiState(env = process.env) {
4328
4380
  modeLabel: asOptionalTrimmedString(env.NOLO_CLI_STATUS_MODE) ?? runtimeMode,
4329
4381
  userLanguage: asOptionalTrimmedString(env.NOLO_LANG),
4330
4382
  gitStatus: void 0,
4331
- toolDisplay: normalizeToolDisplayMode(env.NOLO_CLI_TOOLS ?? env.NOLO_TOOLS, "compact"),
4383
+ toolDisplay: normalizeToolDisplayMode(env.NOLO_CLI_TOOLS ?? env.NOLO_TOOLS, "normal"),
4332
4384
  thinkingDisplay: "show",
4333
4385
  contextWindow: resolveAgentContextWindow({ agentKey, agentName }),
4334
4386
  estimatedContextTokens: estimateDefaultCliContextTokens({
@@ -4498,7 +4550,7 @@ function handleTuiInput(input, state) {
4498
4550
  };
4499
4551
  }
4500
4552
  const normalizedArg = asTrimmedLowercaseString(argText);
4501
- if (!["hide", "compact", "verbose", "on", "off"].includes(normalizedArg)) {
4553
+ if (!["normal", "pro", "hide", "compact", "verbose", "on", "off"].includes(normalizedArg)) {
4502
4554
  return {
4503
4555
  nextState: state,
4504
4556
  output: t("toolsUsage")
@@ -6942,7 +6994,7 @@ function createFixedInput(output, config) {
6942
6994
  if (titleLine) {
6943
6995
  sections.push(fitAnsiLine(titleLine.replace(/\r?\n/g, " "), cols));
6944
6996
  }
6945
- sections.push(fitAnsiLine(config.getStatusLine(), cols));
6997
+ sections.push(fitAnsiLine(config.getStatusLine(cols), cols));
6946
6998
  const queueLines = config.getQueueLines?.() ?? [];
6947
6999
  for (const line of queueLines) {
6948
7000
  sections.push(fitAnsiLine(line.replace(/\r?\n/g, " "), cols));
@@ -8036,7 +8088,7 @@ async function runTuiWorkspace(options) {
8036
8088
  // 与 reconcile 的调用点也是同样写法。
8037
8089
  readRecord: (runId) => readRunRecord(runId, { env: effectiveEnv }),
8038
8090
  discoverRuns: () => listRunRecords({ env: effectiveEnv }),
8039
- getCurrentDialogId: () => state.dialogId,
8091
+ getCurrentDialogId: () => state.dialogId ?? null,
8040
8092
  reconcile: (runId) => checkStaleRun(runId, { env: effectiveEnv }),
8041
8093
  onRecordsPolled: (records) => runCompletionWatcher.observe(records)
8042
8094
  });
@@ -8303,15 +8355,12 @@ async function runTuiWorkspace(options) {
8303
8355
  let done = false;
8304
8356
  let resolveDone = null;
8305
8357
  const baseFixedInput = createFixedInput(output, {
8306
- getStatusLine: () => {
8307
- let base = renderStatusLine(state);
8308
- if (chatQueueBinding && chatQueueBinding.queueLength() > 0) {
8309
- base += dimCliText(
8310
- ` \xB7 ${chatQueueBinding.queueLength()} ${t("queuedHint")}`,
8311
- resolveCliColorEnabled()
8312
- );
8313
- }
8314
- return base;
8358
+ getStatusLine: (maxWidth) => {
8359
+ const queueSuffix = chatQueueBinding && chatQueueBinding.queueLength() > 0 ? dimCliText(
8360
+ ` \xB7 ${chatQueueBinding.queueLength()} ${t("queuedHint")}`,
8361
+ resolveCliColorEnabled()
8362
+ ) : "";
8363
+ return composeStatusLineWithQueue(state, queueSuffix, maxWidth);
8315
8364
  },
8316
8365
  getActivityLines: () => activityIndicator.getActivityLines(resolveCliColorEnabled()),
8317
8366
  getQueueLines: () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanupCliSessionForDialog
3
- } from "./chunk-HAPCUPEO.js";
3
+ } from "./chunk-SG65C33A.js";
4
4
  import {
5
5
  getPrimaryDialogAgentId,
6
6
  removeDialogAgentId
@@ -12,20 +12,20 @@ import {
12
12
  getActiveDialogKey
13
13
  } from "./chunk-MRWGHF56.js";
14
14
  import "./chunk-ZHXJ6M7T.js";
15
- import "./chunk-EMEUU5IY.js";
15
+ import "./chunk-X7S7OFUX.js";
16
16
  import "./chunk-Y5GCAMGP.js";
17
17
  import "./chunk-UZ6XXCVR.js";
18
18
  import "./chunk-KX6YBIHG.js";
19
19
  import {
20
20
  patch,
21
21
  selectById
22
- } from "./chunk-WVGEBWA6.js";
22
+ } from "./chunk-76UA7376.js";
23
23
  import "./chunk-SVEUG45B.js";
24
24
  import "./chunk-WWC7I6TA.js";
25
25
  import "./chunk-I42VC5KR.js";
26
26
  import "./chunk-YZ2WE6CW.js";
27
27
  import "./chunk-QSJ3HFEF.js";
28
- import "./chunk-Z5NW3O7V.js";
28
+ import "./chunk-2JYSSXLY.js";
29
29
  import "./chunk-BJIRLHJR.js";
30
30
  import "./chunk-HHBXCRJS.js";
31
31
  import "./chunk-L3JWI7WX.js";
@@ -1,43 +1,43 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-BEDKTILE.js";
3
+ } from "./chunk-JVKFKKYN.js";
4
4
  import {
5
5
  generateRequestBody,
6
6
  mergeReferences,
7
7
  performFetchRequest,
8
8
  sanitizeOutboundBody
9
- } from "./chunk-5Z7NTYAZ.js";
9
+ } from "./chunk-TZRB2I2M.js";
10
10
  import "./chunk-HS7MLR74.js";
11
- import "./chunk-UYWXQCPH.js";
11
+ import "./chunk-4ZL2KBI7.js";
12
12
  import {
13
13
  findToolExecutor,
14
14
  getToolResultErrorData
15
- } from "./chunk-UL3AIGAQ.js";
15
+ } from "./chunk-5SLTA66C.js";
16
16
  import "./chunk-5XTOKQLW.js";
17
17
  import "./chunk-NF64D32W.js";
18
18
  import "./chunk-3L2WKC3W.js";
19
19
  import "./chunk-Z7A54NFZ.js";
20
20
  import "./chunk-KQHGZWSV.js";
21
- import "./chunk-FJHLA6SX.js";
21
+ import "./chunk-5XCW6RQG.js";
22
22
  import "./chunk-KXKQO4Q6.js";
23
23
  import "./chunk-INZZJSQF.js";
24
- import "./chunk-KZCDMZ6M.js";
24
+ import "./chunk-PJASTA2U.js";
25
25
  import "./chunk-BANYWEYY.js";
26
- import "./chunk-2X5S4IBZ.js";
26
+ import "./chunk-HCBQVVFZ.js";
27
27
  import "./chunk-MEYIRKDN.js";
28
28
  import "./chunk-63W5N6P3.js";
29
29
  import "./chunk-VF4K2QE6.js";
30
- import "./chunk-XY3V7K4L.js";
31
- import "./chunk-QPIMHSA5.js";
30
+ import "./chunk-XPW6JLOB.js";
31
+ import "./chunk-DFY6O64O.js";
32
32
  import {
33
33
  updateTokensAction
34
- } from "./chunk-6DYGT4IA.js";
34
+ } from "./chunk-PGKZ2KGE.js";
35
35
  import "./chunk-EVBFYPDC.js";
36
36
  import "./chunk-H2G6JXTR.js";
37
37
  import "./chunk-YYLHWIW6.js";
38
- import "./chunk-EK6J2BLB.js";
38
+ import "./chunk-KOZ2G3ZG.js";
39
39
  import "./chunk-AGGIDPCZ.js";
40
- import "./chunk-HAPCUPEO.js";
40
+ import "./chunk-SG65C33A.js";
41
41
  import "./chunk-5RGU3J7P.js";
42
42
  import "./chunk-M76ECQRD.js";
43
43
  import "./chunk-MRWGHF56.js";
@@ -45,19 +45,19 @@ import "./chunk-V2IPBG5U.js";
45
45
  import "./chunk-LGUQHYAL.js";
46
46
  import "./chunk-AETZ7AD6.js";
47
47
  import "./chunk-KHCLMKZZ.js";
48
- import "./chunk-HMMOAG2I.js";
48
+ import "./chunk-OZKJBDG4.js";
49
49
  import "./chunk-6BYAXNH5.js";
50
- import "./chunk-2PGAWTDB.js";
50
+ import "./chunk-JBL24PK6.js";
51
51
  import "./chunk-TNPCQNGQ.js";
52
52
  import "./chunk-IWUMSAQF.js";
53
- import "./chunk-V5LQH25J.js";
54
- import "./chunk-GK74OOFT.js";
55
- import "./chunk-YB7675WX.js";
53
+ import "./chunk-F22JQTSX.js";
54
+ import "./chunk-HR5XDXYM.js";
55
+ import "./chunk-AV4Z57LV.js";
56
56
  import "./chunk-NQ4N4IGO.js";
57
57
  import "./chunk-FD36SCCD.js";
58
58
  import {
59
59
  getApiEndpoint
60
- } from "./chunk-UX4WJK6W.js";
60
+ } from "./chunk-BO3YFOZR.js";
61
61
  import "./chunk-DWLEOOGR.js";
62
62
  import "./chunk-ZHXJ6M7T.js";
63
63
  import "./chunk-HNMXYYJR.js";
@@ -68,23 +68,23 @@ import {
68
68
  import "./chunk-FA4SY4F5.js";
69
69
  import "./chunk-Y7TGWSUN.js";
70
70
  import "./chunk-VFN256RI.js";
71
- import "./chunk-HGDOIDQ4.js";
71
+ import "./chunk-SQTVMYMU.js";
72
72
  import {
73
73
  selectCurrentServer
74
- } from "./chunk-EMEUU5IY.js";
74
+ } from "./chunk-X7S7OFUX.js";
75
75
  import "./chunk-Y5GCAMGP.js";
76
76
  import "./chunk-UZ6XXCVR.js";
77
77
  import "./chunk-KX6YBIHG.js";
78
- import "./chunk-3EEK7T3D.js";
78
+ import "./chunk-4RXXP6WD.js";
79
79
  import {
80
80
  read
81
- } from "./chunk-WVGEBWA6.js";
81
+ } from "./chunk-76UA7376.js";
82
82
  import "./chunk-SVEUG45B.js";
83
83
  import "./chunk-WWC7I6TA.js";
84
84
  import "./chunk-I42VC5KR.js";
85
85
  import "./chunk-YZ2WE6CW.js";
86
86
  import "./chunk-QSJ3HFEF.js";
87
- import "./chunk-Z5NW3O7V.js";
87
+ import "./chunk-2JYSSXLY.js";
88
88
  import {
89
89
  extractCustomId
90
90
  } from "./chunk-BJIRLHJR.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  setDialogExtraReferencesAction
3
- } from "./chunk-2X5S4IBZ.js";
3
+ } from "./chunk-HCBQVVFZ.js";
4
4
  import "./chunk-M76ECQRD.js";
5
5
  import "./chunk-MRWGHF56.js";
6
- import "./chunk-WVGEBWA6.js";
6
+ import "./chunk-76UA7376.js";
7
7
  import "./chunk-SVEUG45B.js";
8
8
  import "./chunk-WWC7I6TA.js";
9
9
  import "./chunk-I42VC5KR.js";
10
10
  import "./chunk-YZ2WE6CW.js";
11
11
  import "./chunk-QSJ3HFEF.js";
12
- import "./chunk-Z5NW3O7V.js";
12
+ import "./chunk-2JYSSXLY.js";
13
13
  import "./chunk-BJIRLHJR.js";
14
14
  import "./chunk-HHBXCRJS.js";
15
15
  import "./chunk-L3JWI7WX.js";