nolo-cli 0.64.2 → 0.66.0-alpha.2

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 (76) hide show
  1. package/{_executeModel-R26QYY66.js → _executeModel-FIWTVU3A.js} +21 -21
  2. package/{agentDeleteCommand-6R6EXQOR.js → agentDeleteCommand-2L2IHCNI.js} +11 -11
  3. package/{agentEmailCommands-AKENZOKO.js → agentEmailCommands-QVKPWFUJ.js} +26 -26
  4. package/{agentListCommands-XJU3JJQO.js → agentListCommands-N5GDSFYM.js} +18 -13
  5. package/{agentMachineCommands-V7IJDPAY.js → agentMachineCommands-GOLJW4U5.js} +12 -12
  6. package/{agentRecordCommands-VIEINDIV.js → agentRecordCommands-VU3IKYKX.js} +25 -25
  7. package/{agentRunCommand-GT5ZTYRM.js → agentRunCommand-NRS5Z2H6.js} +25 -25
  8. package/{agentRunControl-WECMOO6O.js → agentRunControl-T44MESII.js} +1 -1
  9. package/{agentRuntimeLocal-HGJ4D3JF.js → agentRuntimeLocal-7OO6AW2D.js} +11 -11
  10. package/{agentSlice-7XJH5WQF.js → agentSlice-PS4PXWGK.js} +1 -1
  11. package/{appDeleteCommands-VG2UVW4T.js → appDeleteCommands-KY5FQZ6V.js} +11 -11
  12. package/{appDeployCommands-PABMVMN2.js → appDeployCommands-6ZMG2KK4.js} +11 -11
  13. package/{appDeployStatusCommands-X7WEU4TU.js → appDeployStatusCommands-MVEBIK32.js} +11 -11
  14. package/{appGetCommands-NQYXHVJL.js → appGetCommands-T3EKMNGI.js} +11 -11
  15. package/{appListCommands-5NGZQ6IK.js → appListCommands-RUFZFTUF.js} +11 -11
  16. package/{authCommand-WOTWLJNF.js → authCommand-QHMBXOOH.js} +7 -7
  17. package/{chatQueueReduxAdapter-F3R253JE.js → chatQueueReduxAdapter-33RTTNSP.js} +7 -7
  18. package/{chunk-BWIPK2PD.js → chunk-4Y4FN2LO.js} +53 -16
  19. package/{chunk-LJ6OKZ6D.js → chunk-55QEURAR.js} +17 -13
  20. package/{chunk-7KELZLC2.js → chunk-5BJ6YU5G.js} +10 -10
  21. package/{chunk-22BTGNSP.js → chunk-5YIL5WDC.js} +38 -5
  22. package/{chunk-FKFMIBTT.js → chunk-6IT5ECCC.js} +1 -1
  23. package/{chunk-NO42UD73.js → chunk-747NDZ5B.js} +1 -1
  24. package/{chunk-ZRSJ3JEH.js → chunk-AJF6YRN7.js} +5 -11
  25. package/{chunk-N6HLMLKE.js → chunk-B2BF4MPL.js} +1 -1
  26. package/{chunk-MXUDQZXQ.js → chunk-BNATE77Z.js} +1 -1
  27. package/{chunk-QEFJJS2I.js → chunk-CTYGL4ST.js} +8 -8
  28. package/{chunk-3ROJR3TG.js → chunk-H5X7CHZ7.js} +7 -7
  29. package/{chunk-45YO6H7P.js → chunk-HH65VA5U.js} +21 -0
  30. package/{chunk-VAKVNHK5.js → chunk-IZPSDMML.js} +7 -7
  31. package/{chunk-XAVSS3KE.js → chunk-KFE6BJJS.js} +8 -1
  32. package/{chunk-3BLB7QKO.js → chunk-N2COMZCD.js} +55 -2
  33. package/{chunk-SYNKICCB.js → chunk-OGYAS6L4.js} +2 -2
  34. package/{chunk-DWYSDNOH.js → chunk-OUZQS7HJ.js} +4 -4
  35. package/{chunk-F44FAXP2.js → chunk-PBD6MZSF.js} +3 -3
  36. package/{chunk-7A3RRUCQ.js → chunk-PGX53HOY.js} +2 -2
  37. package/{chunk-OOCYHKCV.js → chunk-PLHF5L4X.js} +1 -1
  38. package/{chunk-5ZYA4JJ3.js → chunk-Q6FPSY5O.js} +2 -2
  39. package/{chunk-PQDIDWGX.js → chunk-RSDPPLSM.js} +1 -1
  40. package/{chunk-E3YVTQWT.js → chunk-RW76G3YN.js} +2 -2
  41. package/{chunk-3QGUVVX5.js → chunk-SHPRRU2W.js} +2 -2
  42. package/{chunk-LJKICKVC.js → chunk-SQDGTW2T.js} +2 -2
  43. package/{chunk-MMZ6ZTVO.js → chunk-TQC77XVE.js} +4 -3
  44. package/{chunk-CQ2OZMLQ.js → chunk-V6J56AWD.js} +28 -24
  45. package/{chunk-URHZKKK7.js → chunk-VBMG2KME.js} +3 -3
  46. package/{chunk-RDBARW6T.js → chunk-VLQRD7ZJ.js} +2 -2
  47. package/{chunk-TBHAHL33.js → chunk-VTTBOV4G.js} +16 -12
  48. package/{chunk-GSXDRMDO.js → chunk-W7YUBKTY.js} +2 -2
  49. package/{chunk-XOKOSO35.js → chunk-Y7PULBIA.js} +1 -1
  50. package/{chunk-QEW2MFDQ.js → chunk-ZW22L5ES.js} +1 -1
  51. package/{codingSkills-TKROLCBA.js → codingSkills-DB4QPUND.js} +2 -2
  52. package/{contentThunks-OZPK5B4Z.js → contentThunks-V3J2MQ4F.js} +8 -8
  53. package/{createAgentAutomationAction-LCIBGE5T.js → createAgentAutomationAction-Z7ZGVMC4.js} +8 -8
  54. package/{createDialogAction-JPJZMHJE.js → createDialogAction-OMUP4F64.js} +10 -10
  55. package/{createPageAction-6P2WLNHO.js → createPageAction-WA3GXFVF.js} +8 -8
  56. package/{dialogCommands-HGMV4NQJ.js → dialogCommands-XUUKQIDU.js} +11 -11
  57. package/{dialogSlice-R5RZHFTU.js → dialogSlice-RG72CSE7.js} +7 -7
  58. package/{docCreateCommands-WQT5EZG2.js → docCreateCommands-7MJN7XQJ.js} +11 -11
  59. package/{docDeleteCommands-GUMELBKM.js → docDeleteCommands-GOGPGPHN.js} +11 -11
  60. package/{docReadCommands-T6FDDKJ3.js → docReadCommands-VVCG7D7A.js} +11 -11
  61. package/{docStore-DKWZ6XJ5.js → docStore-REBBJ26A.js} +1 -1
  62. package/{docUpdateCommands-GBWGXG2G.js → docUpdateCommands-WV5XALDB.js} +11 -11
  63. package/{getPricing-NM3NUTAS.js → getPricing-JRNHI5CV.js} +3 -3
  64. package/{handleSendMessageAction-UQGKM4UX.js → handleSendMessageAction-QFLWVH6S.js} +7 -7
  65. package/index.js +52 -52
  66. package/{machineCommands-SCGLQQCA.js → machineCommands-XCKQBA7O.js} +25 -25
  67. package/{machineWsRunDispatch-EAH5VIEL.js → machineWsRunDispatch-BFBMKHS2.js} +25 -25
  68. package/{models-FAMINFZ7.js → models-NBVTQACP.js} +2 -2
  69. package/package.json +1 -1
  70. package/{readlineWorkspace-PKOMYDRS.js → readlineWorkspace-TVRHMQYP.js} +195 -41
  71. package/{runAgentClientLoop-Y6HWP2PT.js → runAgentClientLoop-5YFXYEBP.js} +19 -19
  72. package/{spaceCommands-76ECKNFH.js → spaceCommands-3GWFIK3N.js} +11 -11
  73. package/{streamAgentChatTurn-6WFQJ4DY.js → streamAgentChatTurn-5UBPDCFQ.js} +22 -22
  74. package/{tools-RR53D65Q.js → tools-TEYPTVPC.js} +14 -14
  75. package/{tuiSummaryLlmCaller-F3DPFFZM.js → tuiSummaryLlmCaller-D7CCLLS7.js} +5 -5
  76. package/{updateDialogTitleAction-WXS3AKOL.js → updateDialogTitleAction-CTTQA4RH.js} +8 -8
@@ -72,7 +72,7 @@ import {
72
72
  wrapTextToLines,
73
73
  wrapTranscriptLine,
74
74
  wrapTranscriptLineWithLayout
75
- } from "./chunk-BWIPK2PD.js";
75
+ } from "./chunk-4Y4FN2LO.js";
76
76
  import "./chunk-S7Z2HMCN.js";
77
77
  import {
78
78
  listFavoriteAgentIdsAcrossServers,
@@ -80,7 +80,7 @@ import {
80
80
  listRemoteAgents,
81
81
  listRemoteAgentsAcrossServers,
82
82
  normalizeListedAgent
83
- } from "./chunk-XAVSS3KE.js";
83
+ } from "./chunk-KFE6BJJS.js";
84
84
  import "./chunk-ID4G2MAR.js";
85
85
  import {
86
86
  listUserRecordsFromServers,
@@ -97,8 +97,8 @@ import {
97
97
  readTimestamp,
98
98
  setCliLocale,
99
99
  t
100
- } from "./chunk-LJ6OKZ6D.js";
101
- import "./chunk-MXUDQZXQ.js";
100
+ } from "./chunk-55QEURAR.js";
101
+ import "./chunk-BNATE77Z.js";
102
102
  import "./chunk-EADNWBAZ.js";
103
103
  import {
104
104
  backfillRunRecordParentDialog,
@@ -106,7 +106,7 @@ import {
106
106
  isRunRecordClaimed,
107
107
  listRunRecords,
108
108
  readRunRecord
109
- } from "./chunk-45YO6H7P.js";
109
+ } from "./chunk-HH65VA5U.js";
110
110
  import "./chunk-DWUCB2A3.js";
111
111
  import {
112
112
  getReadableCliDb
@@ -135,12 +135,12 @@ import "./chunk-ATNTHIZI.js";
135
135
  import "./chunk-JEXVIMYZ.js";
136
136
  import {
137
137
  prepareTools
138
- } from "./chunk-SYNKICCB.js";
138
+ } from "./chunk-OGYAS6L4.js";
139
139
  import {
140
140
  buildResponseGuidelines
141
141
  } from "./chunk-EDKF7RX4.js";
142
142
  import "./chunk-HS7MLR74.js";
143
- import "./chunk-CQ2OZMLQ.js";
143
+ import "./chunk-V6J56AWD.js";
144
144
  import "./chunk-5XTOKQLW.js";
145
145
  import "./chunk-NF64D32W.js";
146
146
  import "./chunk-3L2WKC3W.js";
@@ -155,7 +155,7 @@ import {
155
155
  runShowsLogTail,
156
156
  shortRunId
157
157
  } from "./chunk-NTW5GWDM.js";
158
- import "./chunk-3BLB7QKO.js";
158
+ import "./chunk-N2COMZCD.js";
159
159
  import "./chunk-KQHGZWSV.js";
160
160
  import "./chunk-2PGGC63K.js";
161
161
  import "./chunk-MBOEV4L2.js";
@@ -166,18 +166,18 @@ import "./chunk-FZGV4FGK.js";
166
166
  import "./chunk-MEYIRKDN.js";
167
167
  import "./chunk-63W5N6P3.js";
168
168
  import "./chunk-VF4K2QE6.js";
169
- import "./chunk-GSXDRMDO.js";
170
- import "./chunk-DWYSDNOH.js";
171
- import "./chunk-N6HLMLKE.js";
169
+ import "./chunk-W7YUBKTY.js";
170
+ import "./chunk-OUZQS7HJ.js";
171
+ import "./chunk-B2BF4MPL.js";
172
172
  import "./chunk-ZJ7UHBJS.js";
173
173
  import {
174
174
  extractReferenceKeysFromMessage
175
- } from "./chunk-TBHAHL33.js";
175
+ } from "./chunk-VTTBOV4G.js";
176
176
  import "./chunk-EVBFYPDC.js";
177
177
  import "./chunk-HQUORJTM.js";
178
178
  import "./chunk-YYLHWIW6.js";
179
179
  import "./chunk-AGGIDPCZ.js";
180
- import "./chunk-F44FAXP2.js";
180
+ import "./chunk-PBD6MZSF.js";
181
181
  import "./chunk-4NJEIGBQ.js";
182
182
  import "./chunk-5RGU3J7P.js";
183
183
  import "./chunk-6YTOJY35.js";
@@ -191,10 +191,10 @@ import {
191
191
  buildSkillDiscoveryContextBlock,
192
192
  buildSkillDiscoveryContextLayer
193
193
  } from "./chunk-E4MARS3Q.js";
194
- import "./chunk-E3YVTQWT.js";
194
+ import "./chunk-RW76G3YN.js";
195
195
  import {
196
196
  expandEnabledPacks
197
- } from "./chunk-ZRSJ3JEH.js";
197
+ } from "./chunk-AJF6YRN7.js";
198
198
  import "./chunk-AETZ7AD6.js";
199
199
  import "./chunk-KHCLMKZZ.js";
200
200
  import {
@@ -202,22 +202,22 @@ import {
202
202
  buildLocalWorkspaceToolset,
203
203
  getProcessRegistry,
204
204
  readCommandActionGatePayload
205
- } from "./chunk-3ROJR3TG.js";
206
- import "./chunk-7A3RRUCQ.js";
205
+ } from "./chunk-H5X7CHZ7.js";
206
+ import "./chunk-PGX53HOY.js";
207
207
  import "./chunk-ZNFJWEN4.js";
208
- import "./chunk-XOKOSO35.js";
208
+ import "./chunk-Y7PULBIA.js";
209
209
  import "./chunk-2QDDKFG5.js";
210
210
  import "./chunk-N7J63Q6C.js";
211
211
  import {
212
212
  buildIdentityBlock,
213
213
  buildRuntimeGuidanceBlocks,
214
214
  resolveToolGuidedSections
215
- } from "./chunk-QEFJJS2I.js";
215
+ } from "./chunk-CTYGL4ST.js";
216
216
  import "./chunk-XTJTN3RW.js";
217
- import "./chunk-QEW2MFDQ.js";
217
+ import "./chunk-ZW22L5ES.js";
218
218
  import {
219
219
  resolvePlatformAuthToken
220
- } from "./chunk-RDBARW6T.js";
220
+ } from "./chunk-VLQRD7ZJ.js";
221
221
  import "./chunk-RJ2SAFB5.js";
222
222
  import {
223
223
  isQuotaExhaustedError
@@ -226,7 +226,7 @@ import "./chunk-2MBTWINN.js";
226
226
  import {
227
227
  DEFAULT_CONTEXT_WINDOW,
228
228
  getModelContextWindow
229
- } from "./chunk-5ZYA4JJ3.js";
229
+ } from "./chunk-Q6FPSY5O.js";
230
230
  import {
231
231
  buildCompactionMetricsFromPlan,
232
232
  buildCompactionUserContent,
@@ -237,12 +237,12 @@ import {
237
237
  planCompression,
238
238
  serializeMessageContent
239
239
  } from "./chunk-Z4QSJILV.js";
240
- import "./chunk-LJKICKVC.js";
240
+ import "./chunk-SQDGTW2T.js";
241
241
  import {
242
242
  estimateTokenCount
243
243
  } from "./chunk-PSCNXBYA.js";
244
244
  import "./chunk-BYXBJQAS.js";
245
- import "./chunk-MMZ6ZTVO.js";
245
+ import "./chunk-TQC77XVE.js";
246
246
  import {
247
247
  compactWhitespace
248
248
  } from "./chunk-DWLEOOGR.js";
@@ -292,8 +292,8 @@ import {
292
292
  import {
293
293
  DEFAULT_NOLO_SERVER_URL
294
294
  } from "./chunk-OLZBQWZU.js";
295
- import "./chunk-FKFMIBTT.js";
296
- import "./chunk-22BTGNSP.js";
295
+ import "./chunk-6IT5ECCC.js";
296
+ import "./chunk-5YIL5WDC.js";
297
297
  import "./chunk-JX5PJCWS.js";
298
298
  import "./chunk-VMWYBIXG.js";
299
299
  import "./chunk-Y5GCAMGP.js";
@@ -1653,13 +1653,15 @@ function layoutTurnRows(role, content, contentWidth, colorEnabled, command) {
1653
1653
  const multilinePrefix = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
1654
1654
  const hangingIndent = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
1655
1655
  const surfaceSeq = colorEnabled ? userSurfaceBackgroundSequence() : "";
1656
+ const boldOn = colorEnabled ? "\x1B[1m" : "";
1657
+ const boldOff = colorEnabled ? "\x1B[22m" : "";
1656
1658
  const prefixWidth = 3;
1657
1659
  let lineSourceStart = 0;
1658
1660
  const rows2 = [];
1659
1661
  for (let i = 0; i < logicalLines.length; i++) {
1660
1662
  const line = logicalLines[i];
1661
1663
  const prefix = i === 0 ? firstPrefix : multilinePrefix;
1662
- const styledLine = `${prefix}${line}`;
1664
+ const styledLine = `${prefix}${boldOn}${line}${boldOff}`;
1663
1665
  const prefixCharCount = prefix.length;
1664
1666
  const wrappedRows = wrapTranscriptLineWithLayout(
1665
1667
  styledLine,
@@ -1850,9 +1852,11 @@ function renderTailTurnBlock(role, content, contentWidth, colorEnabled) {
1850
1852
  const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
1851
1853
  const multilinePrefix = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
1852
1854
  const hangingIndent = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
1855
+ const boldOn = colorEnabled ? "\x1B[1m" : "";
1856
+ const boldOff = colorEnabled ? "\x1B[22m" : "";
1853
1857
  const lines = [];
1854
1858
  for (const rawLine of content.split("\n")) {
1855
- const styledLine = `${multilinePrefix}${rawLine}`;
1859
+ const styledLine = `${multilinePrefix}${boldOn}${rawLine}${boldOff}`;
1856
1860
  const rows = wrapTranscriptLine(styledLine, contentWidth, hangingIndent);
1857
1861
  lines.push(
1858
1862
  ...surfaceSeq ? rows.map((row) => fillUserBubbleRow(row, surfaceSeq, contentWidth)) : rows
@@ -2215,7 +2219,7 @@ function createHistoryOutputStream(history, onUpdate) {
2215
2219
  };
2216
2220
  return stream;
2217
2221
  }
2218
- function applyScrollAction(history, action, output, inputLines, reservedRows = 0) {
2222
+ function computeScrollMetrics(history, output, inputLines, reservedRows = 0) {
2219
2223
  const tty = output;
2220
2224
  const rows = tty.rows ?? 24;
2221
2225
  const columns = tty.columns ?? 80;
@@ -2230,6 +2234,15 @@ function applyScrollAction(history, action, output, inputLines, reservedRows = 0
2230
2234
  totalLines += currentTurnSeparator(history) + countTurnLines(history.currentRole, history.currentContent, contentWidth);
2231
2235
  }
2232
2236
  const maxScrollTop = Math.max(0, totalLines - visibleHeight);
2237
+ return { visibleHeight, contentWidth, totalLines, maxScrollTop };
2238
+ }
2239
+ function applyScrollAction(history, action, output, inputLines, reservedRows = 0) {
2240
+ const { visibleHeight, maxScrollTop } = computeScrollMetrics(
2241
+ history,
2242
+ output,
2243
+ inputLines,
2244
+ reservedRows
2245
+ );
2233
2246
  history.followBottom = false;
2234
2247
  switch (action) {
2235
2248
  case "page-up":
@@ -8214,7 +8227,118 @@ function createTuiRender(host) {
8214
8227
  renderHistoryToOutput,
8215
8228
  renderHistoryUnderDialog,
8216
8229
  scheduleRender,
8217
- flushPendingRender
8230
+ flushPendingRender,
8231
+ // 立即绘制一帧同步帧(BSU/ESU + 光标隐藏)。流式路径走 33ms 节流的
8232
+ // scheduleRender;平滑滚动推进器按 16ms 自己的节奏调用这里,避免被节流
8233
+ // 抹平成"每 33ms 一跳"。
8234
+ paintImmediate: paintSyncedFrame
8235
+ };
8236
+ }
8237
+
8238
+ // packages/cli/tui/tuiScrollAnimation.ts
8239
+ var SCROLL_ANIMATION_TICK_MS = 16;
8240
+ var DEFAULT_SCROLL_MAX_LINES_PER_TICK = 6;
8241
+ function readPositiveInt(raw, fallback, max) {
8242
+ if (raw === void 0 || raw.trim() === "") return fallback;
8243
+ const parsed = Number.parseInt(raw, 10);
8244
+ if (!Number.isFinite(parsed) || parsed < 1) return fallback;
8245
+ return Math.min(parsed, max);
8246
+ }
8247
+ function resolveScrollTuning(env = process.env) {
8248
+ return {
8249
+ wheelLines: readPositiveInt(env.NOLO_TUI_WHEEL_LINES, WHEEL_SCROLL_LINES, 50),
8250
+ maxLinesPerTick: readPositiveInt(
8251
+ env.NOLO_TUI_SCROLL_MAX_STEP,
8252
+ DEFAULT_SCROLL_MAX_LINES_PER_TICK,
8253
+ 100
8254
+ )
8255
+ };
8256
+ }
8257
+ var defaultTickTimer = {
8258
+ every(ms, fn) {
8259
+ const handle = setInterval(fn, ms);
8260
+ handle.unref?.();
8261
+ return () => clearInterval(handle);
8262
+ }
8263
+ };
8264
+ function createScrollAnimator(deps) {
8265
+ const { wheelLines, maxLinesPerTick } = resolveScrollTuning(
8266
+ deps.env ?? process.env
8267
+ );
8268
+ const timer = deps.tickTimer ?? defaultTickTimer;
8269
+ const history = deps.history;
8270
+ let goal = null;
8271
+ let intent = null;
8272
+ let stopTicker = null;
8273
+ const metrics = () => computeScrollMetrics(
8274
+ history,
8275
+ deps.output,
8276
+ deps.getInputLines(),
8277
+ deps.getReservedRows?.() ?? 0
8278
+ );
8279
+ const stop = () => {
8280
+ if (stopTicker) {
8281
+ stopTicker();
8282
+ stopTicker = null;
8283
+ }
8284
+ goal = null;
8285
+ intent = null;
8286
+ };
8287
+ const settle = (maxScrollTop) => {
8288
+ if (intent === "down" && history.scrollTop >= maxScrollTop) {
8289
+ history.followBottom = true;
8290
+ }
8291
+ stop();
8292
+ };
8293
+ const tick = () => {
8294
+ if (goal === null) {
8295
+ stop();
8296
+ return;
8297
+ }
8298
+ const { maxScrollTop } = metrics();
8299
+ if (goal > maxScrollTop) goal = maxScrollTop;
8300
+ const delta = goal - history.scrollTop;
8301
+ if (delta === 0) {
8302
+ settle(maxScrollTop);
8303
+ return;
8304
+ }
8305
+ const step = Math.sign(delta) * Math.min(Math.abs(delta), maxLinesPerTick);
8306
+ history.scrollTop += step;
8307
+ deps.onPaint();
8308
+ if (history.scrollTop === goal) {
8309
+ settle(maxScrollTop);
8310
+ }
8311
+ };
8312
+ const ensureTicker = () => {
8313
+ if (!stopTicker) {
8314
+ stopTicker = timer.every(SCROLL_ANIMATION_TICK_MS, tick);
8315
+ }
8316
+ };
8317
+ return {
8318
+ /**
8319
+ * 一条滚轮报告:折算为目标位置并保证推进器在跑。
8320
+ * followBottom 先退出(与 applyScrollAction 的 wheel 分支一致)。
8321
+ */
8322
+ wheel(direction) {
8323
+ const isOpposing = intent !== null && intent !== direction;
8324
+ const base = isOpposing ? history.scrollTop : goal ?? history.scrollTop;
8325
+ const next = direction === "up" ? base - wheelLines : base + wheelLines;
8326
+ goal = Math.max(0, next);
8327
+ intent = direction;
8328
+ if (goal === history.scrollTop) {
8329
+ stop();
8330
+ return;
8331
+ }
8332
+ history.followBottom = false;
8333
+ ensureTicker();
8334
+ },
8335
+ /** 外部直接改了 scrollTop(键盘滚动、选区拖拽自动滚动)前调用,避免两套写入打架。 */
8336
+ cancel() {
8337
+ stop();
8338
+ },
8339
+ isAnimating() {
8340
+ return goal !== null;
8341
+ }
8218
8342
  };
8219
8343
  }
8220
8344
 
@@ -10053,6 +10177,15 @@ async function runTuiWorkspace(options) {
10053
10177
  onRecordsPolled: (records) => runCompletionWatcher.observe(records)
10054
10178
  });
10055
10179
  const history = createTurnHistory();
10180
+ let handleTranscriptScroll = (action) => {
10181
+ applyScrollAction(
10182
+ history,
10183
+ action,
10184
+ output,
10185
+ fixedInput.getInputLines(),
10186
+ dialogHost.getReservedRows()
10187
+ );
10188
+ };
10056
10189
  const dialogHost = createDialogHost({
10057
10190
  composer: {
10058
10191
  pause: () => fixedInput.pause(),
@@ -10073,13 +10206,7 @@ async function runTuiWorkspace(options) {
10073
10206
  fixedInput.repaint(buffer, cursorPos);
10074
10207
  },
10075
10208
  onTranscriptScroll: (action) => {
10076
- applyScrollAction(
10077
- history,
10078
- action,
10079
- output,
10080
- fixedInput.getInputLines(),
10081
- dialogHost.getReservedRows()
10082
- );
10209
+ handleTranscriptScroll(action);
10083
10210
  },
10084
10211
  output,
10085
10212
  // The decoder-drain hook is only bound once the interactive raw-mode
@@ -10096,7 +10223,8 @@ async function runTuiWorkspace(options) {
10096
10223
  renderHistoryToOutput,
10097
10224
  renderHistoryUnderDialog,
10098
10225
  scheduleRender,
10099
- flushPendingRender
10226
+ flushPendingRender,
10227
+ paintImmediate
10100
10228
  } = createTuiRender({
10101
10229
  output,
10102
10230
  history,
@@ -10112,6 +10240,28 @@ async function runTuiWorkspace(options) {
10112
10240
  },
10113
10241
  getReservedRows: () => dialogHost.getReservedRows()
10114
10242
  });
10243
+ const scrollAnimator = createScrollAnimator({
10244
+ history,
10245
+ output,
10246
+ getInputLines: () => fixedInput.getInputLines(),
10247
+ getReservedRows: () => dialogHost.getReservedRows(),
10248
+ onPaint: () => paintImmediate(),
10249
+ env: effectiveEnv
10250
+ });
10251
+ handleTranscriptScroll = (action) => {
10252
+ if (action === "wheel-up" || action === "wheel-down") {
10253
+ scrollAnimator.wheel(action === "wheel-up" ? "up" : "down");
10254
+ return;
10255
+ }
10256
+ scrollAnimator.cancel();
10257
+ applyScrollAction(
10258
+ history,
10259
+ action,
10260
+ output,
10261
+ fixedInput.getInputLines(),
10262
+ dialogHost.getReservedRows()
10263
+ );
10264
+ };
10115
10265
  const refreshGitStatus = () => {
10116
10266
  if ((options.env?.NOLO_CLI_GIT_STATUS ?? process.env.NOLO_CLI_GIT_STATUS) === "0") return;
10117
10267
  void detectGitStatusAsync(state.cwd).then((gitStatus) => {
@@ -10433,6 +10583,7 @@ async function runTuiWorkspace(options) {
10433
10583
  if (done) return;
10434
10584
  done = true;
10435
10585
  sessionEnded = true;
10586
+ scrollAnimator.cancel();
10436
10587
  if (resizeTimer !== null) {
10437
10588
  clearTimeout(resizeTimer);
10438
10589
  resizeTimer = null;
@@ -10561,6 +10712,7 @@ ${err.message}` : ""}`
10561
10712
  const startAutoScroll = (direction, mouseX) => {
10562
10713
  autoScrollDirection = direction;
10563
10714
  lastDragMouseX = mouseX;
10715
+ scrollAnimator.cancel();
10564
10716
  if (autoScrollTimer) return;
10565
10717
  autoScrollTimer = setInterval(() => {
10566
10718
  if (!selectionState.dragging || !selectionState.anchor || fixedInput.isPaused()) {
@@ -10771,9 +10923,9 @@ ${merged}` : merged;
10771
10923
  if (mouseEvent) {
10772
10924
  if (fixedInput.isPaused()) return;
10773
10925
  if (mouseEvent.kind === "wheel") {
10774
- const scrollAction2 = mouseEvent.wheelDirection === "down" ? "wheel-down" : "wheel-up";
10775
- applyScrollAction(history, scrollAction2, output, fixedInput.getInputLines());
10776
- scheduleRender();
10926
+ scrollAnimator.wheel(
10927
+ mouseEvent.wheelDirection === "down" ? "down" : "up"
10928
+ );
10777
10929
  return;
10778
10930
  }
10779
10931
  const tty = output;
@@ -10793,6 +10945,7 @@ ${merged}` : merged;
10793
10945
  const screenCol = mouseEvent.x - 1;
10794
10946
  if (mouseEvent.kind === "press" && mouseEvent.button === "left") {
10795
10947
  stopAutoScroll();
10948
+ scrollAnimator.cancel();
10796
10949
  if (screenRow < visibleHeight && screenCol < contentWidth) {
10797
10950
  const hit = hitTestHistory(
10798
10951
  history,
@@ -10872,6 +11025,7 @@ ${merged}` : merged;
10872
11025
  const scrollAction = parseScrollAction(sequence);
10873
11026
  if (scrollAction) {
10874
11027
  if (fixedInput.isPaused()) return;
11028
+ scrollAnimator.cancel();
10875
11029
  applyScrollAction(history, scrollAction, output, fixedInput.getInputLines());
10876
11030
  paintFrame(buffer);
10877
11031
  return;
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-NO42UD73.js";
3
+ } from "./chunk-747NDZ5B.js";
4
4
  import {
5
5
  generateRequestBody,
6
6
  mergeReferences,
7
7
  performFetchRequest,
8
8
  sanitizeOutboundBody
9
- } from "./chunk-7KELZLC2.js";
9
+ } from "./chunk-5BJ6YU5G.js";
10
10
  import "./chunk-EDKF7RX4.js";
11
11
  import "./chunk-HS7MLR74.js";
12
12
  import {
13
13
  findToolExecutor,
14
14
  getToolResultErrorData
15
- } from "./chunk-CQ2OZMLQ.js";
15
+ } from "./chunk-V6J56AWD.js";
16
16
  import "./chunk-5XTOKQLW.js";
17
17
  import "./chunk-NF64D32W.js";
18
18
  import "./chunk-3L2WKC3W.js";
19
19
  import "./chunk-NTW5GWDM.js";
20
- import "./chunk-3BLB7QKO.js";
20
+ import "./chunk-N2COMZCD.js";
21
21
  import "./chunk-KQHGZWSV.js";
22
22
  import "./chunk-2PGGC63K.js";
23
23
  import "./chunk-MBOEV4L2.js";
@@ -28,41 +28,41 @@ import "./chunk-FZGV4FGK.js";
28
28
  import "./chunk-MEYIRKDN.js";
29
29
  import "./chunk-63W5N6P3.js";
30
30
  import "./chunk-VF4K2QE6.js";
31
- import "./chunk-GSXDRMDO.js";
32
- import "./chunk-DWYSDNOH.js";
33
- import "./chunk-N6HLMLKE.js";
31
+ import "./chunk-W7YUBKTY.js";
32
+ import "./chunk-OUZQS7HJ.js";
33
+ import "./chunk-B2BF4MPL.js";
34
34
  import "./chunk-ZJ7UHBJS.js";
35
35
  import {
36
36
  updateTokensAction
37
- } from "./chunk-TBHAHL33.js";
37
+ } from "./chunk-VTTBOV4G.js";
38
38
  import "./chunk-EVBFYPDC.js";
39
39
  import "./chunk-HQUORJTM.js";
40
40
  import "./chunk-YYLHWIW6.js";
41
41
  import "./chunk-AGGIDPCZ.js";
42
- import "./chunk-F44FAXP2.js";
42
+ import "./chunk-PBD6MZSF.js";
43
43
  import "./chunk-4NJEIGBQ.js";
44
44
  import "./chunk-5RGU3J7P.js";
45
45
  import "./chunk-6YTOJY35.js";
46
46
  import "./chunk-M76ECQRD.js";
47
47
  import "./chunk-YDH3FDFQ.js";
48
- import "./chunk-E3YVTQWT.js";
49
- import "./chunk-ZRSJ3JEH.js";
48
+ import "./chunk-RW76G3YN.js";
49
+ import "./chunk-AJF6YRN7.js";
50
50
  import "./chunk-AETZ7AD6.js";
51
51
  import "./chunk-KHCLMKZZ.js";
52
- import "./chunk-QEFJJS2I.js";
52
+ import "./chunk-CTYGL4ST.js";
53
53
  import "./chunk-XTJTN3RW.js";
54
- import "./chunk-QEW2MFDQ.js";
55
- import "./chunk-RDBARW6T.js";
54
+ import "./chunk-ZW22L5ES.js";
55
+ import "./chunk-VLQRD7ZJ.js";
56
56
  import "./chunk-RJ2SAFB5.js";
57
57
  import "./chunk-CJCJF5XB.js";
58
- import "./chunk-5ZYA4JJ3.js";
58
+ import "./chunk-Q6FPSY5O.js";
59
59
  import "./chunk-Z4QSJILV.js";
60
- import "./chunk-LJKICKVC.js";
60
+ import "./chunk-SQDGTW2T.js";
61
61
  import "./chunk-PSCNXBYA.js";
62
62
  import "./chunk-BYXBJQAS.js";
63
63
  import {
64
64
  getApiEndpoint
65
- } from "./chunk-MMZ6ZTVO.js";
65
+ } from "./chunk-TQC77XVE.js";
66
66
  import "./chunk-DWLEOOGR.js";
67
67
  import "./chunk-3JQ2NRYU.js";
68
68
  import "./chunk-ONXOABJR.js";
@@ -73,8 +73,8 @@ import {
73
73
  canonicalizeToolName
74
74
  } from "./chunk-O6OSWFZQ.js";
75
75
  import "./chunk-BYEJ7K2Z.js";
76
- import "./chunk-FKFMIBTT.js";
77
- import "./chunk-22BTGNSP.js";
76
+ import "./chunk-6IT5ECCC.js";
77
+ import "./chunk-5YIL5WDC.js";
78
78
  import "./chunk-JX5PJCWS.js";
79
79
  import {
80
80
  selectCurrentServer
@@ -11,25 +11,25 @@ import {
11
11
  import "./chunk-CTCW7U7N.js";
12
12
  import "./chunk-SPAQ4PVV.js";
13
13
  import "./chunk-KQHGZWSV.js";
14
- import "./chunk-3ROJR3TG.js";
15
- import "./chunk-7A3RRUCQ.js";
14
+ import "./chunk-H5X7CHZ7.js";
15
+ import "./chunk-PGX53HOY.js";
16
16
  import "./chunk-ZNFJWEN4.js";
17
- import "./chunk-XOKOSO35.js";
17
+ import "./chunk-Y7PULBIA.js";
18
18
  import "./chunk-2QDDKFG5.js";
19
19
  import "./chunk-N7J63Q6C.js";
20
- import "./chunk-QEFJJS2I.js";
20
+ import "./chunk-CTYGL4ST.js";
21
21
  import "./chunk-XTJTN3RW.js";
22
- import "./chunk-QEW2MFDQ.js";
23
- import "./chunk-RDBARW6T.js";
22
+ import "./chunk-ZW22L5ES.js";
23
+ import "./chunk-VLQRD7ZJ.js";
24
24
  import "./chunk-RJ2SAFB5.js";
25
25
  import "./chunk-CJCJF5XB.js";
26
26
  import "./chunk-2MBTWINN.js";
27
- import "./chunk-5ZYA4JJ3.js";
27
+ import "./chunk-Q6FPSY5O.js";
28
28
  import "./chunk-Z4QSJILV.js";
29
- import "./chunk-LJKICKVC.js";
29
+ import "./chunk-SQDGTW2T.js";
30
30
  import "./chunk-PSCNXBYA.js";
31
31
  import "./chunk-BYXBJQAS.js";
32
- import "./chunk-MMZ6ZTVO.js";
32
+ import "./chunk-TQC77XVE.js";
33
33
  import "./chunk-DWLEOOGR.js";
34
34
  import "./chunk-3JQ2NRYU.js";
35
35
  import "./chunk-ONXOABJR.js";
@@ -47,8 +47,8 @@ import {
47
47
  resolveServerUrl
48
48
  } from "./chunk-A7GB5UGH.js";
49
49
  import "./chunk-OLZBQWZU.js";
50
- import "./chunk-FKFMIBTT.js";
51
- import "./chunk-22BTGNSP.js";
50
+ import "./chunk-6IT5ECCC.js";
51
+ import "./chunk-5YIL5WDC.js";
52
52
  import "./chunk-KX6YBIHG.js";
53
53
  import "./chunk-RVWRKFUB.js";
54
54
  import {