nolo-cli 0.15.0 → 0.16.0-alpha.10

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 (97) hide show
  1. package/{_executeModel-QAUS6B7J.js → _executeModel-6BR65FSI.js} +29 -28
  2. package/{action-GUOZYYGN.js → action-F5JACQBG.js} +4 -4
  3. package/{addContentAction-QDGHGUBH.js → addContentAction-AQXEYRBE.js} +3 -3
  4. package/{addDialogAgentAction-Z4YCYZIV.js → addDialogAgentAction-EJHHJZWW.js} +2 -2
  5. package/{agentDeleteCommand-QDO62EZA.js → agentDeleteCommand-PBIUC4FT.js} +18 -17
  6. package/{agentEmailCommands-UZ5BKX3P.js → agentEmailCommands-KNZY4HXV.js} +35 -34
  7. package/{agentListCommands-ZC33UDWT.js → agentListCommands-N64PHBXM.js} +20 -19
  8. package/{agentMachineCommands-RZGZEZRL.js → agentMachineCommands-2AIPJKFM.js} +18 -17
  9. package/{agentRecordCommands-DGDXE2VH.js → agentRecordCommands-TB4N7YSB.js} +34 -33
  10. package/{agentRunCommand-SRZWFOPH.js → agentRunCommand-UVW2ZLKT.js} +34 -33
  11. package/{agentRuntimeLocal-4YCF6IRF.js → agentRuntimeLocal-T6YECTNF.js} +15 -16
  12. package/{agentSlice-IVE735EV.js → agentSlice-533PEM4O.js} +3 -3
  13. package/{appDeleteCommands-7I26L64I.js → appDeleteCommands-D6B6Z4ZQ.js} +19 -18
  14. package/{appDeployCommands-TZLZNTJN.js → appDeployCommands-YMO5FK4T.js} +19 -18
  15. package/{appDeployStatusCommands-OPPTLHRW.js → appDeployStatusCommands-EO5DWWPQ.js} +19 -18
  16. package/{appGetCommands-N2S4HYKY.js → appGetCommands-6SMZ3URQ.js} +19 -18
  17. package/{appListCommands-OBTPPKUM.js → appListCommands-RZXSWR2G.js} +19 -18
  18. package/{authCommand-YFTR3347.js → authCommand-MSSBXCQ6.js} +8 -2
  19. package/{chunk-OQMPU2ML.js → chunk-2OUI4TLC.js} +4 -4
  20. package/{chunk-SFXYKGK2.js → chunk-3S2VOMIF.js} +3 -3
  21. package/{chunk-JBKVPAYK.js → chunk-6KBBMW4D.js} +2 -2
  22. package/{chunk-U7LEGLEB.js → chunk-6N4KODMN.js} +1 -1
  23. package/{chunk-IZ2QRVEU.js → chunk-A7O4KKLZ.js} +3 -3
  24. package/{chunk-WA6KZL5V.js → chunk-AAODAAUQ.js} +23 -20
  25. package/{chunk-K53477EY.js → chunk-C4MMO7W4.js} +1 -1
  26. package/{chunk-YNHQIXX5.js → chunk-CXM4IIUF.js} +21 -21
  27. package/{chunk-JKWWVF2I.js → chunk-D3HVJJIA.js} +1 -1
  28. package/{chunk-XGQZFBO5.js → chunk-DBLHEQH7.js} +148 -175
  29. package/{chunk-TTGAVETO.js → chunk-EABWT43X.js} +2 -2
  30. package/{chunk-OKSYPTDZ.js → chunk-F3UOACU4.js} +1 -1
  31. package/{chunk-VE6XMVKG.js → chunk-G2IQGDQZ.js} +163 -53
  32. package/{chunk-RKM3K52F.js → chunk-GPELDE6I.js} +2 -2
  33. package/{chunk-OGGHETUE.js → chunk-HQPG2PIV.js} +62 -19
  34. package/{chunk-XVP3C2KY.js → chunk-IWLUTMYX.js} +1 -1
  35. package/{chunk-B4KT7RN2.js → chunk-JTMNCCWF.js} +2 -2
  36. package/chunk-KFEVY3ST.js +255 -0
  37. package/{chunk-WNLPAOIT.js → chunk-KFHN5NGJ.js} +1 -1
  38. package/{chunk-P4MJQWWF.js → chunk-KPD4CEQD.js} +2 -2
  39. package/{chunk-G2MKOQCB.js → chunk-KPJWHHG4.js} +1 -1
  40. package/{chunk-ISYE6GZB.js → chunk-L6NVTGI7.js} +1 -1
  41. package/{chunk-O53CP2QR.js → chunk-LCMAJFAD.js} +3 -3
  42. package/{chunk-UXKQQ2MR.js → chunk-LO6JNGCT.js} +3 -3
  43. package/{chunk-472E5RMQ.js → chunk-MSA4JAOZ.js} +1 -1
  44. package/{chunk-HRQCKQA5.js → chunk-MUCU6ATG.js} +8 -257
  45. package/{chunk-524BDL33.js → chunk-O6W2O2DA.js} +1 -15
  46. package/{chunk-4QQFLN5C.js → chunk-OVBVEXZ7.js} +4 -4
  47. package/{chunk-IOQ7IBPU.js → chunk-PU4LXVAC.js} +1 -1
  48. package/{chunk-Z24FGIU2.js → chunk-R4L524UB.js} +3 -3
  49. package/{chunk-4IJYA27C.js → chunk-RG2U2MTJ.js} +1 -1
  50. package/{chunk-6MHDWKOT.js → chunk-RIF3XLXK.js} +9 -5
  51. package/{chunk-IKXL2HZ3.js → chunk-RK5NYQEL.js} +1 -1
  52. package/{chunk-JS33TCQ3.js → chunk-RPDGJO4D.js} +2 -2
  53. package/{chunk-BFRVXJJJ.js → chunk-SI73WO7P.js} +10 -10
  54. package/{chunk-WRN5EQT7.js → chunk-T26DWCH5.js} +3 -3
  55. package/{chunk-EHLHSX7R.js → chunk-UB4RYYNQ.js} +9 -2
  56. package/{chunk-5VMYGIIL.js → chunk-VHXXRWNL.js} +23 -9
  57. package/{chunk-OOIN7HSO.js → chunk-XJITGCTM.js} +10 -1
  58. package/{chunk-AWDOJBHW.js → chunk-XJYXSTBK.js} +883 -174
  59. package/{chunk-V2J635L5.js → chunk-XOIF2TNF.js} +2 -2
  60. package/{chunk-VPTJB4HM.js → chunk-XPC5C7BK.js} +0 -3
  61. package/{chunk-NTC6I2FN.js → chunk-XRSPI6CP.js} +1 -1
  62. package/{chunk-N5424GSW.js → chunk-YJKXGHJ6.js} +1 -1
  63. package/chunk-ZHXJ6M7T.js +27 -0
  64. package/{chunk-6565R2TI.js → chunk-ZOQNJXMS.js} +23 -18
  65. package/{createAgentAutomationAction-TS6NNZ4X.js → createAgentAutomationAction-OARFMDWU.js} +13 -13
  66. package/{createDialogAction-5HVQ33EX.js → createDialogAction-4E6ALCDK.js} +14 -14
  67. package/{createPageAction-4F3ZGQJD.js → createPageAction-RS65DDRX.js} +13 -13
  68. package/{dbSlice-OP6UPXKA.js → dbSlice-7KQH6GOU.js} +2 -2
  69. package/{dialogCommands-3GEPXHFB.js → dialogCommands-DFY5HJ6M.js} +19 -18
  70. package/{dialogSlice-FAWUQDJW.js → dialogSlice-MS7OYWHW.js} +13 -13
  71. package/{docCreateCommands-ZE3S6BCP.js → docCreateCommands-5L76YTI2.js} +18 -17
  72. package/{docDeleteCommands-TW6PGTRT.js → docDeleteCommands-3GASP3VR.js} +19 -18
  73. package/{docReadCommands-LDXL3B6J.js → docReadCommands-ALA77AZM.js} +18 -17
  74. package/{docStore-2UHVWLTV.js → docStore-KYTKNGMU.js} +14 -14
  75. package/{docUpdateCommands-GYD6XI5O.js → docUpdateCommands-6AZGXE5M.js} +18 -17
  76. package/{getPricing-UGDJHI7M.js → getPricing-RYY6OBA4.js} +4 -4
  77. package/{handleSendMessageAction-LJPUYNOH.js → handleSendMessageAction-LHTGYRMN.js} +201 -15
  78. package/index.js +47 -47
  79. package/{machineCommands-OKNDYS3M.js → machineCommands-RDQQBA72.js} +33 -32
  80. package/{machineWsRunDispatch-ZX5AJ6FJ.js → machineWsRunDispatch-27RCTQQF.js} +33 -32
  81. package/{models-LSCRJJ6P.js → models-5K5G2CZI.js} +2 -2
  82. package/package.json +1 -1
  83. package/{read-HXHAZBKH.js → read-CN3TNXIP.js} +1 -1
  84. package/{readDocTool-VPBDTO4G.js → readDocTool-WF3675ED.js} +1 -1
  85. package/{readlineWorkspace-MB3ANKHM.js → readlineWorkspace-BTONC7NW.js} +177 -76
  86. package/{removeDialogAgentAction-HUFVN35S.js → removeDialogAgentAction-YDHBFEGI.js} +5 -5
  87. package/{runAgentClientLoop-A75BUU6D.js → runAgentClientLoop-Q4CL22BP.js} +26 -25
  88. package/{setDialogExtraReferencesAction-2VLGWQKG.js → setDialogExtraReferencesAction-LR6MSIXO.js} +2 -2
  89. package/{setPrimaryDialogAgentAction-VB4UV2CC.js → setPrimaryDialogAgentAction-IIVDCY5C.js} +5 -5
  90. package/{settingSlice-7JYPQNAC.js → settingSlice-O23YDK2O.js} +3 -3
  91. package/{spaceCommands-O3KJNCON.js → spaceCommands-AB2D7A2R.js} +18 -17
  92. package/{spaceSlice-444MFUP6.js → spaceSlice-XLJ4DRG6.js} +13 -13
  93. package/{streamAgentChatTurn-DJAE7USZ.js → streamAgentChatTurn-YYAAGLZL.js} +30 -32
  94. package/{tools-YB6LXSVN.js → tools-5UKY65R3.js} +20 -20
  95. package/{tuiSummaryLlmCaller-QQL3JA5I.js → tuiSummaryLlmCaller-VUNVBRX3.js} +7 -6
  96. package/{updateDialogTitleAction-6HGFBM64.js → updateDialogTitleAction-VNSUVPUZ.js} +13 -13
  97. package/chunk-BYXBJQAS.js +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  normalizeDialogRecord,
4
4
  readDialogSnapshot,
5
5
  sortDialogs
6
- } from "./chunk-OKSYPTDZ.js";
6
+ } from "./chunk-F3UOACU4.js";
7
7
  import {
8
8
  ANSI_ESCAPE_REGEX,
9
9
  CLI_AUTO_TIER_AGENT_KEYS,
@@ -12,6 +12,7 @@ import {
12
12
  COLLAPSED_PASTE_PLACEHOLDER_RE,
13
13
  THEME_PALETTES,
14
14
  allocateCollapsedPaste,
15
+ applyDetectedBackground,
15
16
  applyTerminalOutputToText,
16
17
  buildSkillContextBlocks,
17
18
  classifyCliAutoRoute,
@@ -56,7 +57,7 @@ import {
56
57
  visibleWidth,
57
58
  wrapTextToLines,
58
59
  wrapTranscriptLine
59
- } from "./chunk-XGQZFBO5.js";
60
+ } from "./chunk-DBLHEQH7.js";
60
61
  import "./chunk-DZ3XJVET.js";
61
62
  import "./chunk-6HYVJV7B.js";
62
63
  import {
@@ -64,19 +65,19 @@ import {
64
65
  listLocalCachedAgents,
65
66
  listRemoteAgents,
66
67
  listRemoteAgentsAcrossServers
67
- } from "./chunk-IZ2QRVEU.js";
68
+ } from "./chunk-A7O4KKLZ.js";
68
69
  import "./chunk-ID4G2MAR.js";
69
70
  import {
70
71
  listUserRecordsFromServers
71
- } from "./chunk-472E5RMQ.js";
72
+ } from "./chunk-MSA4JAOZ.js";
72
73
  import {
73
74
  createCliLocalRuntimeAdapter,
74
75
  initCliLocale,
75
76
  parseCliLocale,
76
77
  setCliLocale,
77
78
  t
78
- } from "./chunk-AWDOJBHW.js";
79
- import "./chunk-EHLHSX7R.js";
79
+ } from "./chunk-XJYXSTBK.js";
80
+ import "./chunk-UB4RYYNQ.js";
80
81
  import {
81
82
  getReadableCliDb
82
83
  } from "./chunk-W4NVOSFF.js";
@@ -84,44 +85,49 @@ import {
84
85
  deleteDbRecord,
85
86
  queryUserRecords,
86
87
  readDbRecord
87
- } from "./chunk-K53477EY.js";
88
- import "./chunk-IOQ7IBPU.js";
88
+ } from "./chunk-C4MMO7W4.js";
89
+ import "./chunk-PU4LXVAC.js";
89
90
  import {
90
91
  resolveCliAgentKeyInput
91
92
  } from "./chunk-VHBWHNVT.js";
92
93
  import "./chunk-LTRXGFMS.js";
93
- import "./chunk-WNLPAOIT.js";
94
+ import "./chunk-KFHN5NGJ.js";
94
95
  import "./chunk-JEXVIMYZ.js";
95
96
  import {
96
97
  prepareTools
97
- } from "./chunk-WRN5EQT7.js";
98
- import "./chunk-ISYE6GZB.js";
98
+ } from "./chunk-T26DWCH5.js";
99
+ import "./chunk-L6NVTGI7.js";
99
100
  import {
100
- expandEnabledPacks
101
- } from "./chunk-VE6XMVKG.js";
101
+ expandEnabledPacks,
102
+ formatRunAge,
103
+ getAgentRunStatusIcon,
104
+ isAgentRunTerminalStatus,
105
+ runShowsLogTail,
106
+ shortRunId
107
+ } from "./chunk-G2IQGDQZ.js";
102
108
  import "./chunk-RQSOAMPJ.js";
103
- import "./chunk-OOIN7HSO.js";
109
+ import "./chunk-XJITGCTM.js";
104
110
  import "./chunk-KQHGZWSV.js";
105
- import "./chunk-O53CP2QR.js";
106
- import "./chunk-U7LEGLEB.js";
111
+ import "./chunk-LCMAJFAD.js";
112
+ import "./chunk-6N4KODMN.js";
107
113
  import "./chunk-3LY4F7SV.js";
108
114
  import "./chunk-VP4WJWKW.js";
109
115
  import "./chunk-63W5N6P3.js";
110
116
  import "./chunk-VF4K2QE6.js";
111
- import "./chunk-Z24FGIU2.js";
117
+ import "./chunk-R4L524UB.js";
112
118
  import "./chunk-VC6OZXO5.js";
113
119
  import "./chunk-OWOHNGCN.js";
114
120
  import {
115
121
  extractReferenceKeysFromMessage
116
- } from "./chunk-YNHQIXX5.js";
122
+ } from "./chunk-CXM4IIUF.js";
117
123
  import {
118
124
  buildBuiltinSummaryContent
119
- } from "./chunk-V2J635L5.js";
125
+ } from "./chunk-XOIF2TNF.js";
120
126
  import "./chunk-MRC4Q34M.js";
121
127
  import "./chunk-MTU75CZ2.js";
122
128
  import "./chunk-CWMSB67P.js";
123
- import "./chunk-OQMPU2ML.js";
124
- import "./chunk-JS33TCQ3.js";
129
+ import "./chunk-2OUI4TLC.js";
130
+ import "./chunk-RPDGJO4D.js";
125
131
  import "./chunk-SOTZ6RDN.js";
126
132
  import "./chunk-Z4NR32XR.js";
127
133
  import "./chunk-M76ECQRD.js";
@@ -133,40 +139,41 @@ import {
133
139
  buildLocalWorkspaceOpenAiTools,
134
140
  buildLocalWorkspaceToolset,
135
141
  getProcessRegistry
136
- } from "./chunk-5VMYGIIL.js";
137
- import "./chunk-WA6KZL5V.js";
142
+ } from "./chunk-VHXXRWNL.js";
143
+ import "./chunk-AAODAAUQ.js";
138
144
  import "./chunk-ZNFJWEN4.js";
139
145
  import "./chunk-OIQPORYI.js";
140
146
  import {
141
147
  readCommandActionGatePayload,
142
148
  resolveAgentImageInputSupport
143
- } from "./chunk-6MHDWKOT.js";
149
+ } from "./chunk-RIF3XLXK.js";
144
150
  import "./chunk-LSFAWXKC.js";
145
151
  import {
146
152
  buildCurrentTimeBlock,
147
153
  buildIdentityBlock,
148
154
  buildRuntimeGuidanceBlocks
149
- } from "./chunk-RKM3K52F.js";
155
+ } from "./chunk-GPELDE6I.js";
156
+ import "./chunk-KFEVY3ST.js";
150
157
  import {
151
158
  resolvePlatformAuthToken
152
- } from "./chunk-HRQCKQA5.js";
159
+ } from "./chunk-MUCU6ATG.js";
153
160
  import {
154
161
  canonicalizeToolNames
155
- } from "./chunk-B4KT7RN2.js";
162
+ } from "./chunk-JTMNCCWF.js";
156
163
  import {
157
164
  DEFAULT_CONTEXT_WINDOW,
158
165
  estimateTokenCount,
159
166
  getModelContextWindow,
160
167
  planCompression,
161
168
  serializeMessageContent
162
- } from "./chunk-4QQFLN5C.js";
169
+ } from "./chunk-OVBVEXZ7.js";
163
170
  import {
164
171
  clipCompactText
165
172
  } from "./chunk-5MMAK75Q.js";
166
- import "./chunk-OGGHETUE.js";
173
+ import "./chunk-HQPG2PIV.js";
167
174
  import "./chunk-5CS33IBL.js";
168
175
  import "./chunk-JZPBVBIY.js";
169
- import "./chunk-BYXBJQAS.js";
176
+ import "./chunk-ZHXJ6M7T.js";
170
177
  import "./chunk-QLUFR47U.js";
171
178
  import "./chunk-KKY4B2Q2.js";
172
179
  import "./chunk-5MIDPSSK.js";
@@ -206,14 +213,14 @@ import {
206
213
  import {
207
214
  DEFAULT_NOLO_SERVER_URL
208
215
  } from "./chunk-OLZBQWZU.js";
209
- import "./chunk-IKXL2HZ3.js";
210
- import "./chunk-524BDL33.js";
211
- import "./chunk-N5424GSW.js";
212
- import "./chunk-TTGAVETO.js";
216
+ import "./chunk-RK5NYQEL.js";
217
+ import "./chunk-O6W2O2DA.js";
218
+ import "./chunk-YJKXGHJ6.js";
219
+ import "./chunk-EABWT43X.js";
213
220
  import "./chunk-Y5GCAMGP.js";
214
221
  import "./chunk-KX6YBIHG.js";
215
- import "./chunk-XVP3C2KY.js";
216
- import "./chunk-SFXYKGK2.js";
222
+ import "./chunk-IWLUTMYX.js";
223
+ import "./chunk-3S2VOMIF.js";
217
224
  import "./chunk-O4BU24WZ.js";
218
225
  import "./chunk-I42VC5KR.js";
219
226
  import "./chunk-WWC7I6TA.js";
@@ -221,7 +228,7 @@ import "./chunk-JTINRTBT.js";
221
228
  import {
222
229
  asTrimmedLowercaseString
223
230
  } from "./chunk-QSJ3HFEF.js";
224
- import "./chunk-VPTJB4HM.js";
231
+ import "./chunk-XPC5C7BK.js";
225
232
  import "./chunk-DVRHHFEA.js";
226
233
  import "./chunk-OOSFSFMA.js";
227
234
  import "./chunk-GBRG75BQ.js";
@@ -1716,7 +1723,7 @@ function createActivityIndicator(deps) {
1716
1723
  }
1717
1724
  }
1718
1725
  if (agentRunSnapshot) {
1719
- lines.push(...formatAgentRunPanelLines(agentRunSnapshot, colorEnabled));
1726
+ lines.push(...formatAgentRunPanelLines(agentRunSnapshot, colorEnabled, now()));
1720
1727
  }
1721
1728
  return lines.length > 0 ? lines : null;
1722
1729
  };
@@ -1745,52 +1752,56 @@ function createActivityIndicator(deps) {
1745
1752
  stop
1746
1753
  };
1747
1754
  }
1748
- function formatAgentRunPanelLines(snapshot, colorEnabled) {
1755
+ function formatPanelProgress(snapshot) {
1756
+ const parts = [];
1757
+ if (typeof snapshot.toolCallCount === "number" && Number.isFinite(snapshot.toolCallCount)) {
1758
+ parts.push(`${snapshot.toolCallCount} tools`);
1759
+ }
1760
+ if (snapshot.lastToolNames && snapshot.lastToolNames.length > 0) {
1761
+ parts.push(snapshot.lastToolNames.join(", "));
1762
+ }
1763
+ return parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
1764
+ }
1765
+ function formatPanelDetail(snapshot) {
1766
+ const note = snapshot.lastAssistantText?.trim();
1767
+ if (note) return note;
1768
+ if (!runShowsLogTail(snapshot.status)) return "";
1769
+ const lines = snapshot.logLines;
1770
+ if (!lines || lines.length === 0) return "";
1771
+ return lines[lines.length - 1]?.trim() ?? "";
1772
+ }
1773
+ function formatAgentRunPanelLines(snapshot, colorEnabled, now = Date.now()) {
1749
1774
  const lines = [];
1750
1775
  const name = snapshot.agentName || "sub-agent";
1751
- const runId = snapshot.runId ? ` (${snapshot.runId.slice(0, 8)})` : "";
1776
+ const short = shortRunId(snapshot.runId);
1777
+ const runId = short ? ` (${short})` : "";
1752
1778
  const status = snapshot.status || "running";
1753
- let statusSymbol = "\u231B";
1754
- let statusColor = "warning";
1755
- if (status === "completed" || status === "finished" || status === "success") {
1756
- statusSymbol = "\u2713";
1757
- statusColor = "success";
1758
- } else if (status === "killed" || status === "cancelled" || status === "failed" || status === "stopped") {
1759
- statusSymbol = "\u{1F534}";
1760
- statusColor = "danger";
1761
- }
1762
- const pollPart = snapshot.polls !== void 0 ? ` (polls: ${snapshot.polls})` : "";
1779
+ const statusSymbol = getAgentRunStatusIcon(status);
1780
+ const statusColor = !isAgentRunTerminalStatus(status) ? "warning" : status === "done" ? "success" : "danger";
1763
1781
  const errPart = snapshot.errorMessage ? ` \xB7 ${snapshot.errorMessage}` : "";
1782
+ const progressPart = formatPanelProgress(snapshot);
1783
+ const age = formatRunAge(snapshot, now);
1784
+ const agePart = age ? ` \xB7 ${age}` : "";
1764
1785
  if (!colorEnabled) {
1765
- lines.push(`\u{1F916} Sub-Agent: ${name}${runId} \xB7 ${statusSymbol} ${status}${pollPart}${errPart}`);
1786
+ lines.push(
1787
+ `\u{1F916} Sub-Agent: ${name}${runId} \xB7 ${statusSymbol} ${status}${agePart}${progressPart}${errPart}`
1788
+ );
1766
1789
  } else {
1767
1790
  const botIcon = themeText("\u{1F916}", "accent", true);
1768
1791
  const labelText = themeText(" Sub-Agent: ", "muted", true);
1769
1792
  const nameText = themeText(`${name}${runId}`, "chrome", true);
1770
1793
  const statusText = themeText(` \xB7 ${statusSymbol} ${status}`, statusColor, true);
1771
- const pollsText = pollPart ? themeText(pollPart, "chrome") : "";
1794
+ const ageText = agePart ? themeText(agePart, "chrome") : "";
1795
+ const progressText = progressPart ? themeText(progressPart, "chrome") : "";
1772
1796
  const errorText = errPart ? themeText(errPart, "danger") : "";
1773
- lines.push(`${botIcon}${labelText}${nameText}${statusText}${pollsText}${errorText}`);
1797
+ lines.push(`${botIcon}${labelText}${nameText}${statusText}${ageText}${progressText}${errorText}`);
1774
1798
  }
1775
- let logLine;
1776
- if (snapshot.logTail) {
1777
- const trimmed = snapshot.logTail.trim();
1778
- if (trimmed) {
1779
- const parts = trimmed.split(/\r?\n/);
1780
- logLine = parts[parts.length - 1];
1781
- }
1782
- } else if (snapshot.logLines && snapshot.logLines.length > 0) {
1783
- logLine = snapshot.logLines[snapshot.logLines.length - 1];
1784
- }
1785
- if (logLine && logLine.trim()) {
1786
- const cleanLog = logLine.trim();
1799
+ const detail = formatPanelDetail(snapshot);
1800
+ if (detail) {
1787
1801
  if (!colorEnabled) {
1788
- lines.push(` \u2514 Log: ${cleanLog}`);
1802
+ lines.push(` \u2514 ${detail}`);
1789
1803
  } else {
1790
- const branchChar = themeText(" \u2514 ", "muted");
1791
- const logTag = themeText("Log: ", "muted");
1792
- const logContent = themeText(cleanLog, "chrome");
1793
- lines.push(`${branchChar}${logTag}${logContent}`);
1804
+ lines.push(`${themeText(" \u2514 ", "muted")}${themeText(detail, "chrome")}`);
1794
1805
  }
1795
1806
  }
1796
1807
  return lines;
@@ -3206,6 +3217,9 @@ function handleTuiInput(input, state) {
3206
3217
  ].join("\n")
3207
3218
  };
3208
3219
  }
3220
+ if (sub === "refresh") {
3221
+ return { nextState: state, action: { type: "theme-refresh" }, output: "" };
3222
+ }
3209
3223
  if (sub === "light" || sub === "dark") {
3210
3224
  setActiveBrightness(sub);
3211
3225
  return { nextState: state, output: t("themeBrightnessSwitched", sub) };
@@ -4028,8 +4042,8 @@ function renderTurnBlock(role, content, contentWidth, colorEnabled) {
4028
4042
  const line = logicalLines[i];
4029
4043
  let styledLine;
4030
4044
  if (colorEnabled) {
4031
- const prefix = i === 0 ? `${accentSeq}\u276F\x1B[39m ` : `${chromeSeq}\u2502\x1B[39m `;
4032
- styledLine = `${prefix}${line}`;
4045
+ const prefix = i === 0 ? `${accentSeq}\u276F ` : `${chromeSeq}\u2502 `;
4046
+ styledLine = `${prefix}\x1B[1m${accentSeq}${line}`;
4033
4047
  } else {
4034
4048
  const prefix = i === 0 ? "\u276F " : " ";
4035
4049
  styledLine = `${prefix}${line}`;
@@ -4446,6 +4460,22 @@ function readCsiSequence(input, start) {
4446
4460
  }
4447
4461
  return null;
4448
4462
  }
4463
+ function parseOscEnd(input, start) {
4464
+ if (!input.startsWith("\x1B]", start)) return null;
4465
+ const bodyStart = start + 2;
4466
+ const bel = input.indexOf("\x07", bodyStart);
4467
+ const st = input.indexOf("\x1B\\", bodyStart);
4468
+ let end = -1;
4469
+ if (bel !== -1) end = bel + 1;
4470
+ if (st !== -1) {
4471
+ const stEnd = st + 2;
4472
+ if (end === -1 || stEnd < end) end = stEnd;
4473
+ }
4474
+ return end === -1 ? null : end;
4475
+ }
4476
+ function isIncompleteOsc(input) {
4477
+ return input.startsWith("\x1B]") && parseOscEnd(input, 0) === null;
4478
+ }
4449
4479
  function isIncompleteTail(input, start) {
4450
4480
  if (start >= input.length) return false;
4451
4481
  const rem = input.slice(start);
@@ -4466,6 +4496,9 @@ function isIncompleteTail(input, start) {
4466
4496
  }
4467
4497
  return true;
4468
4498
  }
4499
+ if (parseOscEnd(input, start) === null && input.startsWith("\x1B]", start)) {
4500
+ return true;
4501
+ }
4469
4502
  if (rem.startsWith("\x1BO") && rem.length < 3) {
4470
4503
  return true;
4471
4504
  }
@@ -4497,6 +4530,11 @@ function splitRawInputWithTail(input, options) {
4497
4530
  if (isIncompleteTail(input, index)) {
4498
4531
  return { tokens, tail: input.slice(index) };
4499
4532
  }
4533
+ const oscEnd = parseOscEnd(input, index);
4534
+ if (oscEnd !== null) {
4535
+ index = oscEnd;
4536
+ continue;
4537
+ }
4500
4538
  if (input.startsWith(PASTE_START, index)) {
4501
4539
  const contentStart = index + PASTE_START.length;
4502
4540
  const endPos = findBracketedPasteEnd(input, contentStart);
@@ -4600,7 +4638,9 @@ function createRawInputDecoder(onToken, options) {
4600
4638
  }
4601
4639
  if (!tail) return;
4602
4640
  if (forceCompleteOpenPaste) {
4603
- if (consumeSgrMouseSequence(tail) === void 0) return;
4641
+ if (consumeSgrMouseSequence(tail) === void 0 || isIncompleteOsc(tail)) {
4642
+ return;
4643
+ }
4604
4644
  emitCodePoints(tail);
4605
4645
  return;
4606
4646
  }
@@ -4628,7 +4668,9 @@ function createRawInputDecoder(onToken, options) {
4628
4668
  for (const token of tokens) onToken(token);
4629
4669
  if (pendingBuffer.startsWith(PASTE_START)) return;
4630
4670
  if (pendingBuffer.length > 0) {
4631
- if (consumeSgrMouseSequence(pendingBuffer) === void 0) return;
4671
+ if (consumeSgrMouseSequence(pendingBuffer) === void 0 || isIncompleteOsc(pendingBuffer)) {
4672
+ return;
4673
+ }
4632
4674
  timer = setTimeout(() => flushEscPending(true), timeoutMs);
4633
4675
  }
4634
4676
  return;
@@ -4875,7 +4917,8 @@ async function runAgentChat(scriptDir, state, message, env, output, agentRunner
4875
4917
  localRuntimeAdapterFactory: (factoryEnv, factoryOptions) => createCliLocalRuntimeAdapter({
4876
4918
  env: factoryEnv,
4877
4919
  cwd: factoryOptions?.cwd ?? state.cwd,
4878
- pastedTextStore: options.pastedTextStore
4920
+ pastedTextStore: options.pastedTextStore,
4921
+ ...options.activityReporter ? { activityReporter: options.activityReporter } : {}
4879
4922
  })
4880
4923
  } : {},
4881
4924
  ...options.activityReporter ? { activityReporter: options.activityReporter } : {},
@@ -5275,6 +5318,43 @@ async function startTuiWorkspace(options) {
5275
5318
  };
5276
5319
  let modalOwnsKeyboard = false;
5277
5320
  let rawActionGateTokenHandler = null;
5321
+ const AUTO_THEME_POLL_MS = 3e4;
5322
+ let autoThemeTimer = null;
5323
+ const maybeAutoRefreshTheme = async () => {
5324
+ if (sessionEnded) return;
5325
+ if (fixedInput.isPaused()) return;
5326
+ if (modalOwnsKeyboard) return;
5327
+ if (getActiveBrightness() !== null) return;
5328
+ if (!isInteractiveInput(input)) return;
5329
+ const detected2 = await detectTerminalBackground({
5330
+ stdin: input,
5331
+ stdout: output
5332
+ });
5333
+ if (sessionEnded) return;
5334
+ if (!detected2) {
5335
+ if (autoThemeTimer !== null) {
5336
+ clearInterval(autoThemeTimer);
5337
+ autoThemeTimer = null;
5338
+ }
5339
+ return;
5340
+ }
5341
+ if (applyDetectedBackground(detected2)) {
5342
+ if (fixedInput.active && !fixedInput.isPaused() && !modalOwnsKeyboard) {
5343
+ output.write("\x1B[?2026h\x1B[?25l");
5344
+ try {
5345
+ renderHistoryToOutput();
5346
+ fixedInput.repaint(buffer, cursorPos);
5347
+ } finally {
5348
+ output.write("\x1B[?25h\x1B[?2026l");
5349
+ }
5350
+ }
5351
+ }
5352
+ };
5353
+ if (detected && isInteractiveInput(input) && (options.env ?? process.env).NOLO_TUI_AUTO_THEME !== "0") {
5354
+ autoThemeTimer = setInterval(() => {
5355
+ void maybeAutoRefreshTheme();
5356
+ }, AUTO_THEME_POLL_MS);
5357
+ }
5278
5358
  const runOneAgentTurn = async (message, imageUrls, actionGateHandler, confirmDestructiveAction) => {
5279
5359
  forcedStop = false;
5280
5360
  turnEpoch += 1;
@@ -5376,7 +5456,11 @@ async function startTuiWorkspace(options) {
5376
5456
  dialogLabel: runResult.title || runResult.dialogId
5377
5457
  } : {},
5378
5458
  ...runResult.turnTokens ? { turnTokens: runResult.turnTokens } : {},
5379
- ...runResult.contextWindow ? { contextWindow: runResult.contextWindow } : {}
5459
+ ...runResult.contextWindow ? { contextWindow: runResult.contextWindow } : {},
5460
+ // input_tokens 是累计上下文输入(含历史消息),把它持久化到
5461
+ // estimatedContextTokens:下一轮若 provider 不返回 usage,context
5462
+ // chip 仍显示真实累计占用而不是回退到启动时的静态估算。
5463
+ ...runResult.turnTokens && runResult.turnTokens.input > 0 ? { estimatedContextTokens: runResult.turnTokens.input } : {}
5380
5464
  };
5381
5465
  }
5382
5466
  if (!wasAborted && runResult.exitCode !== 0) {
@@ -5537,6 +5621,19 @@ async function startTuiWorkspace(options) {
5537
5621
  output.write("Update failed. Check the error above, then run /update again or use nolo update.\n");
5538
5622
  }
5539
5623
  }
5624
+ if (result.action?.type === "theme-refresh") {
5625
+ const detected2 = await detectTerminalBackground({
5626
+ stdin: input,
5627
+ stdout: output
5628
+ });
5629
+ if (detected2 && applyDetectedBackground(detected2)) {
5630
+ emitCommandOutput(t("themeRefreshed", detected2.brightness));
5631
+ } else if (detected2) {
5632
+ emitCommandOutput(t("themeRefreshed", detected2.brightness));
5633
+ } else {
5634
+ emitCommandOutput(t("themeRefreshFailed"));
5635
+ }
5636
+ }
5540
5637
  if (result.action?.type === "pick-agent") {
5541
5638
  try {
5542
5639
  const pickResult = await dialogHost.run(
@@ -5851,6 +5948,10 @@ ${err.message}` : ""}`
5851
5948
  if (done) return;
5852
5949
  done = true;
5853
5950
  sessionEnded = true;
5951
+ if (autoThemeTimer !== null) {
5952
+ clearInterval(autoThemeTimer);
5953
+ autoThemeTimer = null;
5954
+ }
5854
5955
  resolveDone?.();
5855
5956
  clearCollapsedPasteStore(pasteStore);
5856
5957
  resizeTarget.off?.("resize", onResize);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanupCliSessionForDialog
3
- } from "./chunk-JS33TCQ3.js";
3
+ } from "./chunk-RPDGJO4D.js";
4
4
  import {
5
5
  getPrimaryDialogAgentId,
6
6
  removeDialogAgentId
@@ -8,23 +8,23 @@ import {
8
8
  import {
9
9
  require_date_fns
10
10
  } from "./chunk-M76ECQRD.js";
11
- import "./chunk-BYXBJQAS.js";
11
+ import "./chunk-ZHXJ6M7T.js";
12
12
  import {
13
13
  getActiveDialogKey
14
14
  } from "./chunk-3ASDTTEI.js";
15
- import "./chunk-TTGAVETO.js";
15
+ import "./chunk-EABWT43X.js";
16
16
  import "./chunk-Y5GCAMGP.js";
17
17
  import "./chunk-KX6YBIHG.js";
18
18
  import {
19
19
  patch,
20
20
  selectById
21
- } from "./chunk-SFXYKGK2.js";
21
+ } from "./chunk-3S2VOMIF.js";
22
22
  import "./chunk-O4BU24WZ.js";
23
23
  import "./chunk-I42VC5KR.js";
24
24
  import "./chunk-WWC7I6TA.js";
25
25
  import "./chunk-JTINRTBT.js";
26
26
  import "./chunk-QSJ3HFEF.js";
27
- import "./chunk-VPTJB4HM.js";
27
+ import "./chunk-XPC5C7BK.js";
28
28
  import "./chunk-DVRHHFEA.js";
29
29
  import "./chunk-OOSFSFMA.js";
30
30
  import "./chunk-GBRG75BQ.js";
@@ -1,53 +1,54 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-G2MKOQCB.js";
3
+ } from "./chunk-KPJWHHG4.js";
4
4
  import {
5
5
  generateRequestBody,
6
6
  mergeReferences,
7
7
  performFetchRequest
8
- } from "./chunk-6565R2TI.js";
9
- import "./chunk-ISYE6GZB.js";
8
+ } from "./chunk-ZOQNJXMS.js";
9
+ import "./chunk-L6NVTGI7.js";
10
10
  import {
11
11
  findToolExecutor,
12
12
  getToolResultErrorData
13
- } from "./chunk-VE6XMVKG.js";
13
+ } from "./chunk-G2IQGDQZ.js";
14
14
  import "./chunk-RQSOAMPJ.js";
15
- import "./chunk-OOIN7HSO.js";
15
+ import "./chunk-XJITGCTM.js";
16
16
  import "./chunk-KQHGZWSV.js";
17
- import "./chunk-O53CP2QR.js";
18
- import "./chunk-U7LEGLEB.js";
17
+ import "./chunk-LCMAJFAD.js";
18
+ import "./chunk-6N4KODMN.js";
19
19
  import "./chunk-3LY4F7SV.js";
20
20
  import "./chunk-VP4WJWKW.js";
21
21
  import "./chunk-63W5N6P3.js";
22
22
  import "./chunk-VF4K2QE6.js";
23
- import "./chunk-Z24FGIU2.js";
23
+ import "./chunk-R4L524UB.js";
24
24
  import "./chunk-VC6OZXO5.js";
25
25
  import {
26
26
  updateTokensAction
27
- } from "./chunk-YNHQIXX5.js";
28
- import "./chunk-V2J635L5.js";
27
+ } from "./chunk-CXM4IIUF.js";
28
+ import "./chunk-XOIF2TNF.js";
29
29
  import "./chunk-MRC4Q34M.js";
30
30
  import "./chunk-MTU75CZ2.js";
31
31
  import "./chunk-CWMSB67P.js";
32
- import "./chunk-OQMPU2ML.js";
33
- import "./chunk-JS33TCQ3.js";
32
+ import "./chunk-2OUI4TLC.js";
33
+ import "./chunk-RPDGJO4D.js";
34
34
  import "./chunk-SOTZ6RDN.js";
35
35
  import "./chunk-Z4NR32XR.js";
36
36
  import "./chunk-M76ECQRD.js";
37
37
  import "./chunk-WZSRQNQG.js";
38
- import "./chunk-RKM3K52F.js";
39
- import "./chunk-HRQCKQA5.js";
38
+ import "./chunk-GPELDE6I.js";
39
+ import "./chunk-KFEVY3ST.js";
40
+ import "./chunk-MUCU6ATG.js";
40
41
  import {
41
42
  canonicalizeToolName
42
- } from "./chunk-B4KT7RN2.js";
43
- import "./chunk-4QQFLN5C.js";
43
+ } from "./chunk-JTMNCCWF.js";
44
+ import "./chunk-OVBVEXZ7.js";
44
45
  import "./chunk-5MMAK75Q.js";
45
46
  import {
46
47
  getApiEndpoint
47
- } from "./chunk-OGGHETUE.js";
48
+ } from "./chunk-HQPG2PIV.js";
48
49
  import "./chunk-5CS33IBL.js";
49
50
  import "./chunk-JZPBVBIY.js";
50
- import "./chunk-BYXBJQAS.js";
51
+ import "./chunk-ZHXJ6M7T.js";
51
52
  import "./chunk-KKY4B2Q2.js";
52
53
  import "./chunk-5MIDPSSK.js";
53
54
  import {
@@ -56,24 +57,24 @@ import {
56
57
  import "./chunk-3ASDTTEI.js";
57
58
  import "./chunk-DWLEOOGR.js";
58
59
  import "./chunk-HNMXYYJR.js";
59
- import "./chunk-IKXL2HZ3.js";
60
- import "./chunk-524BDL33.js";
61
- import "./chunk-N5424GSW.js";
60
+ import "./chunk-RK5NYQEL.js";
61
+ import "./chunk-O6W2O2DA.js";
62
+ import "./chunk-YJKXGHJ6.js";
62
63
  import {
63
64
  selectCurrentServer
64
- } from "./chunk-TTGAVETO.js";
65
+ } from "./chunk-EABWT43X.js";
65
66
  import "./chunk-Y5GCAMGP.js";
66
67
  import "./chunk-KX6YBIHG.js";
67
- import "./chunk-XVP3C2KY.js";
68
+ import "./chunk-IWLUTMYX.js";
68
69
  import {
69
70
  read
70
- } from "./chunk-SFXYKGK2.js";
71
+ } from "./chunk-3S2VOMIF.js";
71
72
  import "./chunk-O4BU24WZ.js";
72
73
  import "./chunk-I42VC5KR.js";
73
74
  import "./chunk-WWC7I6TA.js";
74
75
  import "./chunk-JTINRTBT.js";
75
76
  import "./chunk-QSJ3HFEF.js";
76
- import "./chunk-VPTJB4HM.js";
77
+ import "./chunk-XPC5C7BK.js";
77
78
  import {
78
79
  selectIdentityToken
79
80
  } from "./chunk-DVRHHFEA.js";
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-SFXYKGK2.js";
10
+ } from "./chunk-3S2VOMIF.js";
11
11
  import "./chunk-O4BU24WZ.js";
12
12
  import "./chunk-I42VC5KR.js";
13
13
  import "./chunk-WWC7I6TA.js";
14
14
  import "./chunk-JTINRTBT.js";
15
15
  import "./chunk-QSJ3HFEF.js";
16
- import "./chunk-VPTJB4HM.js";
16
+ import "./chunk-XPC5C7BK.js";
17
17
  import "./chunk-DVRHHFEA.js";
18
18
  import "./chunk-OOSFSFMA.js";
19
19
  import "./chunk-GBRG75BQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanupCliSessionForDialog
3
- } from "./chunk-JS33TCQ3.js";
3
+ } from "./chunk-RPDGJO4D.js";
4
4
  import {
5
5
  getPrimaryDialogAgentId,
6
6
  replacePrimaryDialogAgentId
@@ -8,23 +8,23 @@ import {
8
8
  import {
9
9
  require_date_fns
10
10
  } from "./chunk-M76ECQRD.js";
11
- import "./chunk-BYXBJQAS.js";
11
+ import "./chunk-ZHXJ6M7T.js";
12
12
  import {
13
13
  getActiveDialogKey
14
14
  } from "./chunk-3ASDTTEI.js";
15
- import "./chunk-TTGAVETO.js";
15
+ import "./chunk-EABWT43X.js";
16
16
  import "./chunk-Y5GCAMGP.js";
17
17
  import "./chunk-KX6YBIHG.js";
18
18
  import {
19
19
  patch,
20
20
  selectById
21
- } from "./chunk-SFXYKGK2.js";
21
+ } from "./chunk-3S2VOMIF.js";
22
22
  import "./chunk-O4BU24WZ.js";
23
23
  import "./chunk-I42VC5KR.js";
24
24
  import "./chunk-WWC7I6TA.js";
25
25
  import "./chunk-JTINRTBT.js";
26
26
  import "./chunk-QSJ3HFEF.js";
27
- import "./chunk-VPTJB4HM.js";
27
+ import "./chunk-XPC5C7BK.js";
28
28
  import "./chunk-DVRHHFEA.js";
29
29
  import "./chunk-OOSFSFMA.js";
30
30
  import "./chunk-GBRG75BQ.js";