nolo-cli 0.241.0-alpha.1 → 0.242.0-alpha.1
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.
- package/README.md +3 -5
- package/{_executeModel-UCWDB72C.js → _executeModel-IZ2MCXHO.js} +67 -67
- package/{action-24MZYW2B.js → action-VDEW6WLI.js} +9 -9
- package/{addContentAction-HEMCSSHT.js → addContentAction-7YVXHIPQ.js} +14 -14
- package/{addDialogAgentAction-SQYDOXHA.js → addDialogAgentAction-BX7B47HF.js} +17 -17
- package/{agentDeleteCommand-P7O3ACNJ.js → agentDeleteCommand-N7ELXPLD.js} +90 -90
- package/{agentEmailCommands-A5BRSYWK.js → agentEmailCommands-OFS477PV.js} +92 -92
- package/{agentListCommands-LDRCOOMO.js → agentListCommands-IQQHJSXP.js} +193 -156
- package/{agentMachineCommands-AYL53KJV.js → agentMachineCommands-NS65BEW7.js} +43 -41
- package/{agentProviderCommands-N5EA3ED2.js → agentProviderCommands-SS6M6VGY.js} +2 -2
- package/{agentRecordCommands-FICBZ57C.js → agentRecordCommands-4VE7CNLC.js} +88 -88
- package/{agentRunCommand-CTXQGDUM.js → agentRunCommand-2MUXHKNW.js} +89 -89
- package/{agentRunControl-CO6BASZF.js → agentRunControl-55GL6Q3M.js} +7 -5
- package/{agentRuntimeLocal-5YN4D5WT.js → agentRuntimeLocal-5DB2P4MU.js} +42 -35
- package/{agentSlice-DJ5D4DU4.js → agentSlice-5VTAFG43.js} +14 -14
- package/{appDeleteCommands-B4E7N7M2.js → appDeleteCommands-EDKUPHJM.js} +43 -41
- package/{appDeployCommands-E4DTXRRM.js → appDeployCommands-JO74GW4L.js} +43 -41
- package/{appDeployStatusCommands-FCNHYHZM.js → appDeployStatusCommands-U77ZUHX7.js} +43 -41
- package/{appGetCommands-4DXSQHUZ.js → appGetCommands-QCMHBYPX.js} +43 -41
- package/{appListCommands-2NN5E4F6.js → appListCommands-ZQJYEXI6.js} +43 -41
- package/{authCommand-47DR6GZT.js → authCommand-W4KXRZLI.js} +13 -13
- package/{authCommands-ZZ3L5IFM.js → authCommands-6AUYO65N.js} +3 -3
- package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +7 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-VZWAY2KR.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
- package/{chunk-7OTNBI77.js → chunk-247AAJRK.js} +1 -1
- package/{chunk-BDERPCJW.js → chunk-2N4UBHUU.js} +2 -2
- package/{chunk-3V6JT6WN.js → chunk-2T5BHLID.js} +266 -109
- package/{chunk-5TJE4QCL.js → chunk-3OQFXODL.js} +2 -2
- package/{chunk-UAOFSUG7.js → chunk-3ORFJP2Z.js} +1 -1
- package/{chunk-6XBOPKUH.js → chunk-3UNAGTBW.js} +14 -14
- package/{chunk-ZTLTDUV6.js → chunk-4F7SWSWO.js} +4 -4
- package/{chunk-LT3DMEIB.js → chunk-4UK6UBXF.js} +1 -1
- package/{chunk-H6CHPU6M.js → chunk-5GRWWUB4.js} +3 -3
- package/{chunk-TTEBPPUV.js → chunk-6326DRQY.js} +1 -1
- package/{chunk-TXFYIWAW.js → chunk-6MQWGA5F.js} +10 -10
- package/{chunk-TE2XH4KH.js → chunk-6MX6S6TE.js} +3 -3
- package/{chunk-QGMIUVBT.js → chunk-6S6CZUXK.js} +19 -19
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-6BGJHJRN.js → chunk-6XLWUNZB.js} +27 -27
- package/{chunk-BIJTI5SX.js → chunk-7AWKDRXG.js} +2 -2
- package/{chunk-YMCSR7PA.js → chunk-7GTXPS3D.js} +8 -8
- package/{chunk-G6OPRPXH.js → chunk-7HUHOCIY.js} +35 -29
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-C3GOEQJF.js → chunk-BH7CEVOH.js} +1 -1
- package/{chunk-B72AFRR2.js → chunk-C4KX626C.js} +4 -4
- package/{chunk-EW37CXCQ.js → chunk-CHYYSFFM.js} +6 -6
- package/{chunk-ZQUCJBS4.js → chunk-CJTB3OYB.js} +2 -2
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
- package/{chunk-Y5RN44VH.js → chunk-DPAIQLAL.js} +16 -16
- package/{chunk-LMZRXDWG.js → chunk-EKXPHL7M.js} +3 -3
- package/{chunk-NL7J2J5Z.js → chunk-ENYTIRIO.js} +1 -1
- package/{chunk-GCVFX6ZL.js → chunk-ER3P6MBT.js} +3 -3
- package/{chunk-NQQL2DKF.js → chunk-F4MCAOWN.js} +1 -1
- package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
- package/{chunk-2XMKW2OY.js → chunk-GES5GIAU.js} +8 -8
- package/{chunk-25OCZXSX.js → chunk-HQVNO7FH.js} +21 -21
- package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
- package/{chunk-FSIEHQNH.js → chunk-IIG3TT73.js} +42 -5
- package/{chunk-FPMPWNVQ.js → chunk-IZJFTY4R.js} +3 -3
- package/{chunk-QES2NCVM.js → chunk-J25ESVUW.js} +9 -9
- package/{chunk-ZBQ5UGYY.js → chunk-J2XZZXIH.js} +3 -3
- package/{chunk-NBB2EBQD.js → chunk-JVJ53XCH.js} +1 -1
- package/{chunk-OATIWAKN.js → chunk-KC2QVCI7.js} +1 -1
- package/{chunk-3NFWMSTA.js → chunk-KF2DWSAH.js} +5 -5
- package/{chunk-KGIIZXPL.js → chunk-KLD7K5FD.js} +7 -7
- package/{chunk-FCAMGBLY.js → chunk-KMW5CRRM.js} +464 -276
- package/{chunk-7U2TFUWW.js → chunk-LZOOUQAZ.js} +4 -4
- package/{chunk-OYHJ4TW7.js → chunk-M5EA44QU.js} +2 -2
- package/{chunk-WHO3LYDW.js → chunk-MEDPR36J.js} +2 -2
- package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-FXX6VFMV.js → chunk-ODGSLWLO.js} +63 -63
- package/{chunk-YFRJAE3R.js → chunk-OGZE6BZG.js} +12 -4
- package/{chunk-F3FQPVHE.js → chunk-OKPC4QNX.js} +2 -2
- package/{chunk-DWWUVRB5.js → chunk-ONFFUQYM.js} +1 -1
- package/{chunk-IPRPYKBP.js → chunk-P244EH4W.js} +2 -2
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-24GVXSWK.js → chunk-PK7VT4ZU.js} +2 -2
- package/{chunk-TFGGNRT6.js → chunk-QLUYDJST.js} +1 -1
- package/{chunk-NWWQY2J5.js → chunk-QUJKDFZW.js} +7 -7
- package/{chunk-IUXBKS5L.js → chunk-QXUVCIPB.js} +9 -9
- package/{chunk-DLTMAXLF.js → chunk-QYNABNNQ.js} +6 -6
- package/{chunk-EIFSCI4C.js → chunk-RGUWOMXU.js} +263 -100
- package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
- package/{chunk-7Q7MKJZN.js → chunk-SBRJOYND.js} +224 -116
- package/{chunk-ZT3DYK5T.js → chunk-SBRSXY67.js} +4 -4
- package/{chunk-UKSKCDBG.js → chunk-T3WSFTBS.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
- package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
- package/{chunk-T444ENEC.js → chunk-UQXOORR3.js} +5 -5
- package/{chunk-CT6GT2BG.js → chunk-UR7555FE.js} +13 -13
- package/{chunk-X37RQEA3.js → chunk-UWOCASVL.js} +5 -5
- package/{chunk-DIBQXNGW.js → chunk-V2V5Q6DU.js} +2 -2
- package/{chunk-LCQJH7KN.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-MDVP5TLI.js → chunk-VMWY7TUA.js} +1 -1
- package/{chunk-HNWZJI4N.js → chunk-VNALJT32.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
- package/{chunk-BWW6WRX6.js → chunk-WVOZ35E4.js} +6 -6
- package/{chunk-XAFOLWLU.js → chunk-XDNXKFWF.js} +4 -4
- package/{chunk-KOIDLCAQ.js → chunk-XLN2GD6Z.js} +4 -4
- package/{chunk-TXQVH72L.js → chunk-Y5EBOURK.js} +3 -3
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-CZLSTOVM.js → chunk-YTEY27GN.js} +2 -2
- package/{chunk-C646JEUV.js → chunk-ZCVBIIUE.js} +4 -4
- package/{chunk-UAHUJ4HH.js → chunk-ZCZLTJEW.js} +10 -37
- package/{cliAgentConfigHelpers-RFR7ZCSK.js → cliAgentConfigHelpers-6OFDHJFT.js} +4 -4
- package/{cliLocalAgentRecordReader-AJ4UKHKT.js → cliLocalAgentRecordReader-FHIMCBUK.js} +44 -38
- package/{commandRegistry-IHWZVV4G.js → commandRegistry-OKIWAJIS.js} +99 -91
- package/{contentThunks-YQRCBDKF.js → contentThunks-VF2DCU46.js} +29 -29
- package/{cooldownCommands-W67DE765.js → cooldownCommands-QL6DWGVU.js} +1 -1
- package/{createAgentAutomationAction-ERSDNR4R.js → createAgentAutomationAction-BGET7Q6K.js} +30 -30
- package/{createDialogAction-QXC7JZPE.js → createDialogAction-XYDQZETK.js} +30 -30
- package/{createPageAction-RLZ7776F.js → createPageAction-74S5RO7U.js} +34 -34
- package/{dbSlice-7M2ESEUO.js → dbSlice-FI7VNDR5.js} +13 -13
- package/{deleteFile-WO6WSSNK.js → deleteFile-GD62MPZW.js} +7 -7
- package/{dialogCommands-UIRO4QNN.js → dialogCommands-Y6DHZUAM.js} +45 -44
- package/{dialogNotifyCommand-VDUFYBZV.js → dialogNotifyCommand-MKXL4NGL.js} +7 -7
- package/{dialogSlice-A4U3C76D.js → dialogSlice-XAUKSWZ4.js} +28 -28
- package/{docCreateCommands-MHPYTJWR.js → docCreateCommands-PHDFOQBM.js} +43 -41
- package/{docDeleteCommands-VYULMBAQ.js → docDeleteCommands-OSHJM67Y.js} +44 -42
- package/{docReadCommands-FV3GGZ7V.js → docReadCommands-E6QYCFMS.js} +43 -41
- package/{docStore-AWWI72FA.js → docStore-ZZT2BEBU.js} +15 -15
- package/{docUpdateCommands-JNS3HX7F.js → docUpdateCommands-DHIOPK2C.js} +43 -41
- package/fetchMessages-TQEUZD7H.js +2 -2
- package/{getPricing-U5AR7ZHS.js → getPricing-RNRITFOP.js} +2 -2
- package/{handleSendMessageAction-WDJOUDNV.js → handleSendMessageAction-ARUU6CNF.js} +60 -60
- package/{hostCredentialCreate-H3FF2SAO.js → hostCredentialCreate-SNQT73H4.js} +88 -88
- package/index.js +8 -8
- package/keys-RWF7UCB4.js +1 -1
- package/{localRuntimeAdapter-JAQQXZJP.js → localRuntimeAdapter-MHI6Y2IZ.js} +96 -96
- package/{machineCommands-WYOFNB5I.js → machineCommands-3O6Y27R4.js} +216 -307
- package/{machineWsRunDispatch-Y7UIAZNM.js → machineWsRunDispatch-5PFLR5XC.js} +87 -87
- package/{mcpLocalAuthorizeCommand-SCYEFLRK.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +10 -10
- package/{memberThunks-DIITWU4M.js → memberThunks-TU6A6OBV.js} +17 -17
- package/package.json +1 -1
- package/{projectArchive-IZJXBW5N.js → projectArchive-X2EVXU3N.js} +34 -34
- package/{providerPresetApply-2QWXPJXZ.js → providerPresetApply-HUWNV2NI.js} +3 -3
- package/{providerRegistry-W4LCKK6V.js → providerRegistry-7FWKDKZJ.js} +3 -3
- package/{read-OBLJNMA2.js → read-QAHEQID5.js} +7 -7
- package/{readDocTool-QQZ4DAER.js → readDocTool-KG5DP6EM.js} +1 -1
- package/{readlineWorkspace-WF3SWZGR.js → readlineWorkspace-SO3APHVP.js} +482 -374
- package/{removeDialogAgentAction-HC3SOY3G.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
- package/{runAgentClientLoop-Z7V6TA3O.js → runAgentClientLoop-FLHHCOVH.js} +67 -67
- package/{secretCommands-STRAX275.js → secretCommands-36BCE3UE.js} +2 -2
- package/{setDialogExtraReferencesAction-DDZUQPY6.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
- package/{setPrimaryDialogAgentAction-EB67OMAJ.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
- package/{settingThunks-TN6GFASU.js → settingThunks-MHGGP6UE.js} +23 -23
- package/{spaceCommands-HBYQUVJI.js → spaceCommands-JH7UYE3K.js} +46 -44
- package/{streamAgentChatTurn-CM7QQXOS.js → streamAgentChatTurn-VDDA2TX6.js} +89 -89
- package/{switchDialogAgentAction-XY5TKQQE.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
- package/{tableCommands-MXFL3JIT.js → tableCommands-UONBFC7L.js} +5 -5
- package/{tools-AT6H73LD.js → tools-MIOCXKMG.js} +52 -52
- package/{tuiRestart-272SAYSK.js → tuiRestart-ET3QISZ5.js} +6 -6
- package/{tuiSummaryLlmCaller-K2OVRVHG.js → tuiSummaryLlmCaller-MSINBP3M.js} +10 -10
- package/{updateCommands-O3BOVVVN.js → updateCommands-5OYND6EF.js} +3 -3
- package/{updateDialogTitleAction-PGY4UPLH.js → updateDialogTitleAction-2L4CC4YO.js} +30 -30
- package/{usageCommand-SCF3ROV2.js → usageCommand-JTKDAG6I.js} +2 -2
- package/{usageRebuildCommand-K5WPIBA5.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
- package/{windowsSelfUpdate-WJDUZLEO.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
- package/chunk-TUSTONB3.js +0 -81
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-6X3CS6NJ.js → chunk-RH44TIHX.js} +6 -6
- package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
- package/{chunk-LN4ZVSO7.js → chunk-Y22P6ASC.js} +5 -5
- package/{chunk-DGUUOHBF.js → chunk-Y3DOUQQQ.js} +3 -3
- package/{dialogUsageCommand-SEC6UZWM.js → dialogUsageCommand-BZPKR3DW.js} +3 -3
- package/{runtimeDoctorCommands-KX6YLPWV.js → runtimeDoctorCommands-DN3I52C6.js} +2 -2
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
runXaiOAuthDeviceCode,
|
|
13
13
|
runXaiOAuthLogin,
|
|
14
14
|
syncCredentialToServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7GTXPS3D.js";
|
|
16
16
|
import {
|
|
17
17
|
createAccountSessionCore,
|
|
18
18
|
createDeviceAuthorizationProtocol,
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
parseStoredTokenEntries,
|
|
21
21
|
parseUserToken,
|
|
22
22
|
saveTokenLogin
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KC2QVCI7.js";
|
|
24
24
|
import {
|
|
25
25
|
listFavoriteAgentIdsAcrossServers,
|
|
26
26
|
listLocalCachedAgents,
|
|
27
27
|
listRemoteAgents,
|
|
28
28
|
listRemoteAgentsAcrossServers,
|
|
29
29
|
normalizeListedAgent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-EKXPHL7M.js";
|
|
31
31
|
import {
|
|
32
32
|
runCloudflareOAuthLogin
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6326DRQY.js";
|
|
34
34
|
import {
|
|
35
35
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
36
36
|
MAX_URL_LENGTH,
|
|
@@ -107,12 +107,12 @@ import {
|
|
|
107
107
|
themeText,
|
|
108
108
|
toolRowDetailLine,
|
|
109
109
|
tuiRenderThemeFingerprint
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2T5BHLID.js";
|
|
111
111
|
import "./chunk-6QDYSCPW.js";
|
|
112
112
|
import "./chunk-GAHJLSDO.js";
|
|
113
113
|
import {
|
|
114
114
|
refreshSubscriptionQuotas
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-P27E22MA.js";
|
|
116
116
|
import {
|
|
117
117
|
getReadableCliDb
|
|
118
118
|
} from "./chunk-DLT2DN4M.js";
|
|
@@ -131,12 +131,12 @@ import {
|
|
|
131
131
|
renderNoticeElements,
|
|
132
132
|
resolveNoticeTitle,
|
|
133
133
|
setTurnNoticeMeta
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-KMW5CRRM.js";
|
|
135
135
|
import {
|
|
136
136
|
createHostApprovalCardQueue,
|
|
137
137
|
formatApprovalRemaining,
|
|
138
138
|
registerHostApprovalRenderer
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-VNALJT32.js";
|
|
140
140
|
import "./chunk-2YGBI2XB.js";
|
|
141
141
|
import {
|
|
142
142
|
ANSI_ESCAPE_REGEX,
|
|
@@ -162,15 +162,15 @@ import {
|
|
|
162
162
|
wrapTextToLines,
|
|
163
163
|
wrapTranscriptLine,
|
|
164
164
|
wrapTranscriptLineWithLayout
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-KF2DWSAH.js";
|
|
166
166
|
import "./chunk-WWTSEBDF.js";
|
|
167
|
-
import "./chunk-
|
|
167
|
+
import "./chunk-VTHWBTRE.js";
|
|
168
168
|
import "./chunk-UAIHKQIA.js";
|
|
169
169
|
import "./chunk-WOAZVUSN.js";
|
|
170
170
|
import {
|
|
171
171
|
getRestartBlocker,
|
|
172
172
|
hasRestartBlockingRuns
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-T3WSFTBS.js";
|
|
174
174
|
import "./chunk-4D4QD7FT.js";
|
|
175
175
|
import "./chunk-PVFYPUIM.js";
|
|
176
176
|
import "./chunk-53W5BXLN.js";
|
|
@@ -190,17 +190,14 @@ import {
|
|
|
190
190
|
resolveDialogNotifyRoot,
|
|
191
191
|
writeAck,
|
|
192
192
|
writeLease
|
|
193
|
-
} from "./chunk-
|
|
194
|
-
import {
|
|
195
|
-
resolveLocalUserId
|
|
196
|
-
} from "./chunk-7U2TFUWW.js";
|
|
193
|
+
} from "./chunk-6MX6S6TE.js";
|
|
197
194
|
import {
|
|
198
195
|
defaultPromptReader,
|
|
199
196
|
setSecret
|
|
200
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-JVJ53XCH.js";
|
|
201
198
|
import {
|
|
202
199
|
createTuiSummaryLlmCaller
|
|
203
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-2N4UBHUU.js";
|
|
204
201
|
import "./chunk-F26GAEH3.js";
|
|
205
202
|
import "./chunk-R7XWZDOH.js";
|
|
206
203
|
import "./chunk-S73EPYNC.js";
|
|
@@ -210,33 +207,31 @@ import "./chunk-ATNTHIZI.js";
|
|
|
210
207
|
import "./chunk-JEXVIMYZ.js";
|
|
211
208
|
import {
|
|
212
209
|
prepareTools
|
|
213
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-J2XZZXIH.js";
|
|
214
211
|
import "./chunk-HS7MLR74.js";
|
|
215
|
-
import "./chunk-
|
|
216
|
-
import "./chunk-
|
|
212
|
+
import "./chunk-SBRJOYND.js";
|
|
213
|
+
import "./chunk-WVOZ35E4.js";
|
|
217
214
|
import "./chunk-AMWMV56B.js";
|
|
218
215
|
import "./chunk-MVOZ22RZ.js";
|
|
219
216
|
import "./chunk-WDWZPASX.js";
|
|
220
|
-
import "./chunk-
|
|
221
|
-
import "./chunk-
|
|
217
|
+
import "./chunk-UDT4SI37.js";
|
|
218
|
+
import "./chunk-Y5EBOURK.js";
|
|
222
219
|
import {
|
|
223
220
|
formatSkillSlashReference,
|
|
224
221
|
parseSkillSlashReference,
|
|
225
222
|
resolveSkillSlashUserPrompt
|
|
226
223
|
} from "./chunk-PRJ473FK.js";
|
|
227
224
|
import "./chunk-BMQ2MJUK.js";
|
|
228
|
-
import "./chunk-
|
|
229
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-MFXJY44K.js";
|
|
226
|
+
import "./chunk-DPAIQLAL.js";
|
|
230
227
|
import "./chunk-NF64D32W.js";
|
|
231
|
-
import "./chunk-
|
|
232
|
-
import "./chunk-
|
|
233
|
-
import "./chunk-4YFC3DWW.js";
|
|
234
|
-
import "./chunk-XAFOLWLU.js";
|
|
235
|
-
import "./chunk-UAOFSUG7.js";
|
|
228
|
+
import "./chunk-HSWEFHFS.js";
|
|
229
|
+
import "./chunk-CHYYSFFM.js";
|
|
236
230
|
import "./chunk-VF4K2QE6.js";
|
|
237
|
-
import "./chunk-
|
|
238
|
-
import "./chunk-
|
|
239
|
-
import "./chunk-
|
|
231
|
+
import "./chunk-XDNXKFWF.js";
|
|
232
|
+
import "./chunk-3ORFJP2Z.js";
|
|
233
|
+
import "./chunk-KLD7K5FD.js";
|
|
234
|
+
import "./chunk-6XLWUNZB.js";
|
|
240
235
|
import {
|
|
241
236
|
createChatQueueRuntime,
|
|
242
237
|
createTurnRequest,
|
|
@@ -244,72 +239,52 @@ import {
|
|
|
244
239
|
historyTokensBeforeLatestAssistant,
|
|
245
240
|
initialChatQueueState,
|
|
246
241
|
normalizeRunCompletionShape
|
|
247
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-ODGSLWLO.js";
|
|
248
243
|
import "./chunk-TZXPT53C.js";
|
|
249
244
|
import "./chunk-BUDVRYES.js";
|
|
250
245
|
import {
|
|
251
246
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
252
247
|
BUILTIN_SUMMARY_LLM_CONFIG
|
|
253
248
|
} from "./chunk-523DITKR.js";
|
|
254
|
-
import "./chunk-
|
|
249
|
+
import "./chunk-QYNABNNQ.js";
|
|
250
|
+
import "./chunk-ZCVBIIUE.js";
|
|
255
251
|
import "./chunk-BYXBJQAS.js";
|
|
256
|
-
import "./chunk-
|
|
257
|
-
import "./chunk-T444ENEC.js";
|
|
252
|
+
import "./chunk-UQXOORR3.js";
|
|
258
253
|
import {
|
|
259
254
|
getActiveDialogAgentId
|
|
260
255
|
} from "./chunk-5RGU3J7P.js";
|
|
261
256
|
import "./chunk-UVLYNWIE.js";
|
|
262
257
|
import "./chunk-YNIYE47Z.js";
|
|
263
|
-
import "./chunk-
|
|
264
|
-
import "./chunk-
|
|
258
|
+
import "./chunk-YTEY27GN.js";
|
|
259
|
+
import "./chunk-UAD2WT54.js";
|
|
260
|
+
import "./chunk-6MQWGA5F.js";
|
|
261
|
+
import "./chunk-3PVYUPXK.js";
|
|
262
|
+
import "./chunk-V2V5Q6DU.js";
|
|
265
263
|
import "./chunk-HXER7YJF.js";
|
|
266
264
|
import {
|
|
267
265
|
isHiddenFromDialogList,
|
|
268
|
-
loadLocalRunChildDialogIds,
|
|
269
266
|
normalizeDialogRecord,
|
|
270
267
|
readDialogSnapshot,
|
|
271
268
|
sortDialogs
|
|
272
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-ZCZLTJEW.js";
|
|
273
270
|
import "./chunk-ID4G2MAR.js";
|
|
274
271
|
import {
|
|
275
272
|
listUserRecordsFromServers,
|
|
276
273
|
readLiveDbRecordAfterTombstoneMerge
|
|
277
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-VMWY7TUA.js";
|
|
278
275
|
import "./chunk-Y5GCAMGP.js";
|
|
279
|
-
import
|
|
276
|
+
import {
|
|
277
|
+
loadLocalRunChildDialogIds
|
|
278
|
+
} from "./chunk-TOK555CQ.js";
|
|
280
279
|
import "./chunk-LKZPX6YH.js";
|
|
281
280
|
import {
|
|
282
281
|
deleteDbRecord,
|
|
283
282
|
queryUserRecords,
|
|
284
283
|
readDbRecord
|
|
285
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-J25ESVUW.js";
|
|
286
285
|
import "./chunk-YUZ2DAIH.js";
|
|
287
286
|
import "./chunk-DXWGFL2Z.js";
|
|
288
287
|
import "./chunk-3L2WKC3W.js";
|
|
289
|
-
import "./chunk-FPMPWNVQ.js";
|
|
290
|
-
import "./chunk-ZQUCJBS4.js";
|
|
291
|
-
import "./chunk-CZLSTOVM.js";
|
|
292
|
-
import "./chunk-UAD2WT54.js";
|
|
293
|
-
import "./chunk-TXFYIWAW.js";
|
|
294
|
-
import "./chunk-3PVYUPXK.js";
|
|
295
|
-
import "./chunk-DIBQXNGW.js";
|
|
296
|
-
import "./chunk-X37RQEA3.js";
|
|
297
|
-
import "./chunk-F3FQPVHE.js";
|
|
298
|
-
import "./chunk-UEILX4EV.js";
|
|
299
|
-
import "./chunk-7OTNBI77.js";
|
|
300
|
-
import "./chunk-C3GOEQJF.js";
|
|
301
|
-
import "./chunk-X7IA2B7R.js";
|
|
302
|
-
import "./chunk-PXYBUFDB.js";
|
|
303
|
-
import "./chunk-QQ56R7KS.js";
|
|
304
|
-
import "./chunk-GBWGPTA7.js";
|
|
305
|
-
import "./chunk-2BSLGODA.js";
|
|
306
|
-
import "./chunk-ZYKJBRZ3.js";
|
|
307
|
-
import "./chunk-KK3FCYZM.js";
|
|
308
|
-
import "./chunk-CVMMWN6P.js";
|
|
309
|
-
import {
|
|
310
|
-
getDefaultCliLocalRuntimeDb
|
|
311
|
-
} from "./chunk-LELADM5Q.js";
|
|
312
|
-
import "./chunk-GLKOYSRU.js";
|
|
313
288
|
import {
|
|
314
289
|
TAIL_LINES_MAX,
|
|
315
290
|
backfillRunRecordParentDialog,
|
|
@@ -320,8 +295,7 @@ import {
|
|
|
320
295
|
listRunRecordsAsync,
|
|
321
296
|
readRunRecord,
|
|
322
297
|
runAgentStopCommand
|
|
323
|
-
} from "./chunk-
|
|
324
|
-
import "./chunk-4FE3IWRE.js";
|
|
298
|
+
} from "./chunk-IIG3TT73.js";
|
|
325
299
|
import {
|
|
326
300
|
clipText,
|
|
327
301
|
formatDuration,
|
|
@@ -333,18 +307,40 @@ import {
|
|
|
333
307
|
shortAgentKey,
|
|
334
308
|
shortRunId
|
|
335
309
|
} from "./chunk-S25VJYXV.js";
|
|
336
|
-
import "./chunk-
|
|
310
|
+
import "./chunk-4YFC3DWW.js";
|
|
311
|
+
import "./chunk-QYPE3TS3.js";
|
|
312
|
+
import "./chunk-I2OYPD3Y.js";
|
|
313
|
+
import "./chunk-RD3QLZQV.js";
|
|
314
|
+
import "./chunk-UWOCASVL.js";
|
|
315
|
+
import "./chunk-OKPC4QNX.js";
|
|
316
|
+
import "./chunk-UEILX4EV.js";
|
|
317
|
+
import "./chunk-IZJFTY4R.js";
|
|
318
|
+
import "./chunk-CJTB3OYB.js";
|
|
319
|
+
import "./chunk-247AAJRK.js";
|
|
320
|
+
import "./chunk-BH7CEVOH.js";
|
|
321
|
+
import "./chunk-WBSJAIZP.js";
|
|
322
|
+
import "./chunk-QQ56R7KS.js";
|
|
323
|
+
import "./chunk-PXYBUFDB.js";
|
|
324
|
+
import {
|
|
325
|
+
buildSkillDiscoveryContextBlock,
|
|
326
|
+
buildSkillDiscoveryContextLayer,
|
|
327
|
+
discoverSkills
|
|
328
|
+
} from "./chunk-UHW6SCVK.js";
|
|
329
|
+
import "./chunk-GBWGPTA7.js";
|
|
330
|
+
import "./chunk-2BSLGODA.js";
|
|
331
|
+
import "./chunk-ZYKJBRZ3.js";
|
|
332
|
+
import "./chunk-KK3FCYZM.js";
|
|
333
|
+
import "./chunk-CVMMWN6P.js";
|
|
334
|
+
import {
|
|
335
|
+
getDefaultCliLocalRuntimeDb
|
|
336
|
+
} from "./chunk-LELADM5Q.js";
|
|
337
|
+
import "./chunk-GLKOYSRU.js";
|
|
337
338
|
import {
|
|
338
339
|
readDialogMessageRecords
|
|
339
|
-
} from "./chunk-
|
|
340
|
-
import "./chunk-
|
|
340
|
+
} from "./chunk-GES5GIAU.js";
|
|
341
|
+
import "./chunk-4UK6UBXF.js";
|
|
341
342
|
import "./chunk-JBWXPACD.js";
|
|
342
|
-
import "./chunk-
|
|
343
|
-
import {
|
|
344
|
-
CURRENT_OPERATOR_USER_ID,
|
|
345
|
-
NOLO_DEFAULT_AGENT_KEY,
|
|
346
|
-
resolveCliAgentKeyInput
|
|
347
|
-
} from "./chunk-BR3GT6MR.js";
|
|
343
|
+
import "./chunk-VCU5GV42.js";
|
|
348
344
|
import {
|
|
349
345
|
RUN_WAKE_CHANNEL_ENV,
|
|
350
346
|
buildLoadSkillExecutor,
|
|
@@ -362,17 +358,17 @@ import {
|
|
|
362
358
|
runTaskStop,
|
|
363
359
|
saveCliPendingUserMessages,
|
|
364
360
|
validateStoredSummary
|
|
365
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-RGUWOMXU.js";
|
|
366
362
|
import "./chunk-BEM6LPD2.js";
|
|
367
363
|
import "./chunk-ZNFJWEN4.js";
|
|
368
|
-
import "./chunk-
|
|
369
|
-
import "./chunk-
|
|
364
|
+
import "./chunk-3OQFXODL.js";
|
|
365
|
+
import "./chunk-ANUP75N2.js";
|
|
370
366
|
import "./chunk-AL3TYDIF.js";
|
|
371
|
-
import "./chunk-
|
|
367
|
+
import "./chunk-M5EA44QU.js";
|
|
372
368
|
import "./chunk-HNUWUO75.js";
|
|
373
369
|
import "./chunk-CHOZJMJS.js";
|
|
374
|
-
import "./chunk-
|
|
375
|
-
import "./chunk-
|
|
370
|
+
import "./chunk-SBRSXY67.js";
|
|
371
|
+
import "./chunk-ONFFUQYM.js";
|
|
376
372
|
import "./chunk-56GBUMO5.js";
|
|
377
373
|
import {
|
|
378
374
|
TOOL_GUIDED_SECTION_ORDER,
|
|
@@ -381,29 +377,28 @@ import {
|
|
|
381
377
|
buildRuntimeGuidanceBlocks,
|
|
382
378
|
resolveResponseGuidelines,
|
|
383
379
|
resolveToolGuidedSections
|
|
384
|
-
} from "./chunk-
|
|
385
|
-
import "./chunk-
|
|
386
|
-
import "./chunk-
|
|
380
|
+
} from "./chunk-ER3P6MBT.js";
|
|
381
|
+
import "./chunk-QXUVCIPB.js";
|
|
382
|
+
import "./chunk-FDZ2GBWO.js";
|
|
387
383
|
import {
|
|
388
384
|
classifyFailureSubclass,
|
|
389
385
|
formatQuotaSummary
|
|
390
386
|
} from "./chunk-QJTZ76CP.js";
|
|
391
|
-
import "./chunk-
|
|
392
|
-
import "./chunk-NQQL2DKF.js";
|
|
387
|
+
import "./chunk-F4MCAOWN.js";
|
|
393
388
|
import "./chunk-X4O7FJF5.js";
|
|
394
|
-
import "./chunk-
|
|
389
|
+
import "./chunk-DMPZMYH4.js";
|
|
395
390
|
import "./chunk-BYXBJQAS.js";
|
|
396
|
-
import "./chunk-
|
|
391
|
+
import "./chunk-P244EH4W.js";
|
|
397
392
|
import "./chunk-TLE77UJ5.js";
|
|
398
393
|
import {
|
|
399
394
|
scrubSecrets
|
|
400
395
|
} from "./chunk-WFGNWWJI.js";
|
|
401
|
-
import "./chunk-
|
|
402
|
-
import "./chunk-
|
|
396
|
+
import "./chunk-ENYTIRIO.js";
|
|
397
|
+
import "./chunk-DOK7GDRU.js";
|
|
403
398
|
import "./chunk-2MBTWINN.js";
|
|
404
399
|
import {
|
|
405
400
|
extractReferenceKeysFromMessage
|
|
406
|
-
} from "./chunk-
|
|
401
|
+
} from "./chunk-4F7SWSWO.js";
|
|
407
402
|
import "./chunk-5ZUL4CUO.js";
|
|
408
403
|
import {
|
|
409
404
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -420,7 +415,7 @@ import {
|
|
|
420
415
|
planCompression,
|
|
421
416
|
runSummaryWithContract,
|
|
422
417
|
serializeMessageContent
|
|
423
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-RH44TIHX.js";
|
|
424
419
|
import "./chunk-H57T64RA.js";
|
|
425
420
|
import "./chunk-UKZX3NHN.js";
|
|
426
421
|
import "./chunk-SR4FE5VD.js";
|
|
@@ -430,42 +425,67 @@ import {
|
|
|
430
425
|
import "./chunk-USGHJSGO.js";
|
|
431
426
|
import "./chunk-OQHIVPG4.js";
|
|
432
427
|
import "./chunk-KX6YBIHG.js";
|
|
433
|
-
import {
|
|
434
|
-
compactWhitespace
|
|
435
|
-
} from "./chunk-DWLEOOGR.js";
|
|
436
|
-
import "./chunk-OW765XBU.js";
|
|
437
|
-
import {
|
|
438
|
-
isAbortError
|
|
439
|
-
} from "./chunk-7DPNBQSV.js";
|
|
440
428
|
import {
|
|
441
429
|
formatToolOverflowMarker,
|
|
442
430
|
getProcessRegistry
|
|
443
|
-
} from "./chunk-
|
|
431
|
+
} from "./chunk-TB5KTLNB.js";
|
|
444
432
|
import {
|
|
445
433
|
isQuotaExhaustedError
|
|
446
434
|
} from "./chunk-EWQ3HGNZ.js";
|
|
447
435
|
import {
|
|
448
436
|
estimateTokenCount
|
|
449
437
|
} from "./chunk-PSCNXBYA.js";
|
|
438
|
+
import {
|
|
439
|
+
compactWhitespace
|
|
440
|
+
} from "./chunk-DWLEOOGR.js";
|
|
441
|
+
import "./chunk-OW765XBU.js";
|
|
442
|
+
import {
|
|
443
|
+
isAbortError
|
|
444
|
+
} from "./chunk-7DPNBQSV.js";
|
|
445
|
+
import {
|
|
446
|
+
buildMemoryOverlayLayer,
|
|
447
|
+
buildMemoryUseGuidanceLayer,
|
|
448
|
+
partitionScopedBlocks,
|
|
449
|
+
renderTurnContextBlocksWithScope
|
|
450
|
+
} from "./chunk-5HUO7SEX.js";
|
|
451
|
+
import {
|
|
452
|
+
buildUserResponseLanguageContext
|
|
453
|
+
} from "./chunk-YGDYYFRX.js";
|
|
454
|
+
import "./chunk-2SXN7LAY.js";
|
|
450
455
|
import {
|
|
451
456
|
createOAuthTokenStore,
|
|
452
457
|
isTokenExpired
|
|
453
458
|
} from "./chunk-G7Y4GXTY.js";
|
|
454
459
|
import "./chunk-6UBGXX2W.js";
|
|
460
|
+
import "./chunk-BV3FLP2L.js";
|
|
455
461
|
import {
|
|
456
462
|
dialogMessageRecordToAgentRuntimeMessage
|
|
457
463
|
} from "./chunk-4ZCTKB27.js";
|
|
458
464
|
import {
|
|
459
465
|
expandEnabledPacks,
|
|
460
466
|
listBuiltinSkills
|
|
461
|
-
} from "./chunk-
|
|
462
|
-
import {
|
|
463
|
-
canonicalizeToolNames
|
|
464
|
-
} from "./chunk-6OVNSQHN.js";
|
|
467
|
+
} from "./chunk-RIMFTQMC.js";
|
|
465
468
|
import {
|
|
466
469
|
parseExternalSkillMarkdown
|
|
467
|
-
} from "./chunk-
|
|
470
|
+
} from "./chunk-AETZ7AD6.js";
|
|
468
471
|
import "./chunk-ZVOL2MAJ.js";
|
|
472
|
+
import "./chunk-KHCLMKZZ.js";
|
|
473
|
+
import "./chunk-SYTHYBMI.js";
|
|
474
|
+
import "./chunk-OJKUU3LP.js";
|
|
475
|
+
import "./chunk-YZMNK53S.js";
|
|
476
|
+
import {
|
|
477
|
+
resolveLocalUserId
|
|
478
|
+
} from "./chunk-LZOOUQAZ.js";
|
|
479
|
+
import {
|
|
480
|
+
CURRENT_OPERATOR_USER_ID,
|
|
481
|
+
NOLO_DEFAULT_AGENT_KEY,
|
|
482
|
+
resolveCliAgentKeyInput
|
|
483
|
+
} from "./chunk-BR3GT6MR.js";
|
|
484
|
+
import "./chunk-NEG5LYK5.js";
|
|
485
|
+
import "./chunk-4FE3IWRE.js";
|
|
486
|
+
import {
|
|
487
|
+
canonicalizeToolNames
|
|
488
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
469
489
|
import {
|
|
470
490
|
BUILTIN_NOLO_AGENT_KEY,
|
|
471
491
|
BUILTIN_NOLO_AGENT_MODEL,
|
|
@@ -477,30 +497,11 @@ import {
|
|
|
477
497
|
extractCustomId,
|
|
478
498
|
parsePublicAgentId
|
|
479
499
|
} from "./chunk-M2EJHDJP.js";
|
|
480
|
-
import "./chunk-SYTHYBMI.js";
|
|
481
|
-
import "./chunk-OJKUU3LP.js";
|
|
482
500
|
import "./chunk-I42VC5KR.js";
|
|
483
|
-
import "./chunk-
|
|
484
|
-
import "./chunk-DGUUOHBF.js";
|
|
501
|
+
import "./chunk-Y3DOUQQQ.js";
|
|
485
502
|
import "./chunk-VIDPVFP3.js";
|
|
486
503
|
import "./chunk-4JH2UMJR.js";
|
|
487
504
|
import "./chunk-U6VC4MU4.js";
|
|
488
|
-
import {
|
|
489
|
-
buildSkillDiscoveryContextBlock,
|
|
490
|
-
buildSkillDiscoveryContextLayer,
|
|
491
|
-
discoverSkills
|
|
492
|
-
} from "./chunk-UHW6SCVK.js";
|
|
493
|
-
import {
|
|
494
|
-
buildMemoryOverlayLayer,
|
|
495
|
-
buildMemoryUseGuidanceLayer,
|
|
496
|
-
partitionScopedBlocks,
|
|
497
|
-
renderTurnContextBlocksWithScope
|
|
498
|
-
} from "./chunk-5HUO7SEX.js";
|
|
499
|
-
import {
|
|
500
|
-
buildUserResponseLanguageContext
|
|
501
|
-
} from "./chunk-YGDYYFRX.js";
|
|
502
|
-
import "./chunk-2SXN7LAY.js";
|
|
503
|
-
import "./chunk-KHCLMKZZ.js";
|
|
504
505
|
import {
|
|
505
506
|
getDiagnostics,
|
|
506
507
|
getProcessRingBuffer,
|
|
@@ -511,7 +512,7 @@ import {
|
|
|
511
512
|
getCliInstallChannel,
|
|
512
513
|
probeCliUpdate,
|
|
513
514
|
runSelfUpdateDetailed
|
|
514
|
-
} from "./chunk-
|
|
515
|
+
} from "./chunk-MEDPR36J.js";
|
|
515
516
|
import {
|
|
516
517
|
parseUserIdFromAuthToken,
|
|
517
518
|
resolveAuthToken,
|
|
@@ -540,7 +541,7 @@ import {
|
|
|
540
541
|
resolveDefaultSpawn,
|
|
541
542
|
spawnProcess
|
|
542
543
|
} from "./chunk-4O22PGNQ.js";
|
|
543
|
-
import "./chunk-
|
|
544
|
+
import "./chunk-QLUYDJST.js";
|
|
544
545
|
import {
|
|
545
546
|
dailyWelcomeTip,
|
|
546
547
|
getCliLocale,
|
|
@@ -550,23 +551,23 @@ import {
|
|
|
550
551
|
t,
|
|
551
552
|
toolIcon,
|
|
552
553
|
toolLabel
|
|
553
|
-
} from "./chunk-
|
|
554
|
+
} from "./chunk-OGZE6BZG.js";
|
|
554
555
|
import "./chunk-776CXKMX.js";
|
|
555
|
-
import "./chunk-
|
|
556
|
+
import "./chunk-Y22P6ASC.js";
|
|
557
|
+
import {
|
|
558
|
+
toErrorMessage
|
|
559
|
+
} from "./chunk-HNMXYYJR.js";
|
|
556
560
|
import {
|
|
557
561
|
resolvePlatformAuthToken
|
|
558
562
|
} from "./chunk-LMFMV5UC.js";
|
|
559
563
|
import "./chunk-XNEDFWT4.js";
|
|
560
|
-
import {
|
|
561
|
-
toErrorMessage
|
|
562
|
-
} from "./chunk-HNMXYYJR.js";
|
|
563
564
|
import "./chunk-3EUW3WEO.js";
|
|
565
|
+
import "./chunk-WWC7I6TA.js";
|
|
564
566
|
import "./chunk-OJRTTERA.js";
|
|
565
567
|
import "./chunk-JRTNUU5Z.js";
|
|
566
568
|
import {
|
|
567
569
|
isRecord
|
|
568
570
|
} from "./chunk-KUG52IAP.js";
|
|
569
|
-
import "./chunk-WWC7I6TA.js";
|
|
570
571
|
import {
|
|
571
572
|
asOptionalTrimmedString
|
|
572
573
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -1350,8 +1351,9 @@ function formatZoneStepFact(snapshot) {
|
|
|
1350
1351
|
}
|
|
1351
1352
|
return formatToolProgressFact(snapshot);
|
|
1352
1353
|
}
|
|
1354
|
+
var RUN_ZONE_FRAME_INTERVAL_MS = 80;
|
|
1353
1355
|
function runningFrame(now) {
|
|
1354
|
-
return ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"][Math.floor(now /
|
|
1356
|
+
return ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"][Math.floor(now / RUN_ZONE_FRAME_INTERVAL_MS) % 10];
|
|
1355
1357
|
}
|
|
1356
1358
|
function runZoneLeadIcon(status, carrier) {
|
|
1357
1359
|
if (!isAgentRunTerminalStatus(status)) {
|
|
@@ -1502,15 +1504,17 @@ function formatRunZoneLines(snapshots, colorEnabled, now = Date.now(), maxRows =
|
|
|
1502
1504
|
...remoteFacts
|
|
1503
1505
|
];
|
|
1504
1506
|
const tailClock = time && clock !== null ? time : null;
|
|
1507
|
+
const terminal = isAgentRunTerminalStatus(snapshot.status);
|
|
1508
|
+
const formatTitle = (text) => terminal ? text : `\x1B[1m${text}\x1B[22m`;
|
|
1505
1509
|
if (!hLayout) {
|
|
1506
1510
|
const allFacts = [...middleFacts, ...tailClock ? [tailClock] : []];
|
|
1507
1511
|
const factsPart = allFacts.length > 0 ? ` \xB7 ${allFacts.join(" \xB7 ")}` : "";
|
|
1508
1512
|
if (!colorEnabled) {
|
|
1509
1513
|
lines.push(`${icon} ${fullLabel}${factsPart}`);
|
|
1510
1514
|
} else {
|
|
1511
|
-
const coloredLabel2 =
|
|
1515
|
+
const coloredLabel2 = formatTitle(main) + (agentSuffix ? themeText(agentSuffix, "muted", true) : "");
|
|
1512
1516
|
lines.push(
|
|
1513
|
-
themeText(icon, runStatusTone(snapshot.status), true) + " " + coloredLabel2 + themeText(factsPart, hasError ? "danger" : stalled ? "warning" : "chrome")
|
|
1517
|
+
themeText(icon, runStatusTone(snapshot.status), true) + " " + coloredLabel2 + themeText(factsPart, hasError ? "danger" : stalled ? "warning" : "chrome", true)
|
|
1514
1518
|
);
|
|
1515
1519
|
}
|
|
1516
1520
|
continue;
|
|
@@ -1552,10 +1556,10 @@ function formatRunZoneLines(snapshots, colorEnabled, now = Date.now(), maxRows =
|
|
|
1552
1556
|
}
|
|
1553
1557
|
const shownMain = shownLabel.startsWith(main) ? main : shownLabel;
|
|
1554
1558
|
const shownSuffix = shownLabel.startsWith(main) ? shownLabel.slice(main.length) : "";
|
|
1555
|
-
const coloredLabel =
|
|
1559
|
+
const coloredLabel = formatTitle(shownMain) + (shownSuffix ? themeText(shownSuffix, "muted", true) : "");
|
|
1556
1560
|
const midStr = middleFacts.join(" \xB7 ");
|
|
1557
1561
|
const midTone = hasError ? "danger" : stalled ? "warning" : "chrome";
|
|
1558
|
-
const coloredRight = (midStr ? themeText(midStr, midTone) : "") + (midStr && tailClock ? " " : "") + (tailClock ? themeText(tailClock, "chrome") : "");
|
|
1562
|
+
const coloredRight = (midStr ? themeText(midStr, midTone, true) : "") + (midStr && tailClock ? " " : "") + (tailClock ? themeText(tailClock, "chrome", true) : "");
|
|
1559
1563
|
const coloredBody = `${themeText(icon, runStatusTone(snapshot.status), true)} ${coloredLabel}${gap}${coloredRight}`;
|
|
1560
1564
|
lines.push(
|
|
1561
1565
|
`${leftPad}${visibleWidth(coloredBody) > contentWidth ? fitAnsiLine(coloredBody, contentWidth) : coloredBody}`
|
|
@@ -1569,7 +1573,7 @@ function formatRunZoneLines(snapshots, colorEnabled, now = Date.now(), maxRows =
|
|
|
1569
1573
|
}
|
|
1570
1574
|
return lines;
|
|
1571
1575
|
}
|
|
1572
|
-
var PROC_ZONE_ICON = "
|
|
1576
|
+
var PROC_ZONE_ICON = "$";
|
|
1573
1577
|
var PROC_LINGER_SUCCESS_MS = 3e3;
|
|
1574
1578
|
var PROC_LINGER_FAILURE_MS = 1e4;
|
|
1575
1579
|
var PROC_LINGER_MAX_ROWS = 2;
|
|
@@ -1596,44 +1600,72 @@ function formatProcZoneLines(procs, colorEnabled, now = Date.now(), maxRows = RU
|
|
|
1596
1600
|
const lines = [];
|
|
1597
1601
|
for (const proc of shown) {
|
|
1598
1602
|
const finished = procZoneFinished(proc);
|
|
1599
|
-
const
|
|
1600
|
-
const
|
|
1601
|
-
const
|
|
1603
|
+
const isFailed = finished && (proc.status === "killed" || (proc.exitCode ?? 0) !== 0);
|
|
1604
|
+
const statusIcon = !finished && (proc.status === void 0 || proc.status === "running") ? runningFrame(now) : procZoneLeadIcon(proc);
|
|
1605
|
+
const leadPrefix = `${statusIcon} ${PROC_ZONE_ICON} `;
|
|
1602
1606
|
const startedAt = proc.startedAt;
|
|
1603
1607
|
const durationMs = proc.durationMs;
|
|
1604
1608
|
const elapsedMs = finished && typeof durationMs === "number" && Number.isFinite(durationMs) ? Math.max(0, durationMs) : typeof startedAt === "number" && Number.isFinite(startedAt) && startedAt > 0 ? Math.max(0, now - startedAt) : null;
|
|
1605
|
-
const
|
|
1606
|
-
if (elapsedMs !== null) {
|
|
1607
|
-
facts.push(t(finished ? "procZoneTook" : "runZoneFor", formatDuration(elapsedMs)));
|
|
1608
|
-
}
|
|
1609
|
+
const middleFacts = [];
|
|
1609
1610
|
if (finished) {
|
|
1610
|
-
if (proc.status
|
|
1611
|
-
|
|
1611
|
+
if (proc.status === "killed") {
|
|
1612
|
+
middleFacts.push(t("runZoneCancelled"));
|
|
1613
|
+
} else {
|
|
1614
|
+
middleFacts.push(t("procZoneExit", String(proc.exitCode ?? 0)));
|
|
1612
1615
|
}
|
|
1613
1616
|
} else {
|
|
1614
|
-
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1617
|
+
middleFacts.push(t("procZonePid", String(proc.pid)));
|
|
1618
|
+
}
|
|
1619
|
+
const title = procZoneTitle(proc);
|
|
1620
|
+
const statusTone = !finished ? "info" : isFailed ? "danger" : "success";
|
|
1621
|
+
const factTone = isFailed ? "danger" : "chrome";
|
|
1622
|
+
const formatTitle = (text) => finished ? text : `\x1B[1m${text}\x1B[22m`;
|
|
1623
|
+
if (!hLayout) {
|
|
1624
|
+
const timeFact = elapsedMs !== null ? t(finished ? "procZoneTook" : "runZoneFor", formatDuration(elapsedMs)) : null;
|
|
1625
|
+
const allFacts = [...middleFacts, ...timeFact ? [timeFact] : []];
|
|
1626
|
+
const factsPart = allFacts.length > 0 ? ` \xB7 ${allFacts.join(" \xB7 ")}` : "";
|
|
1627
|
+
if (!colorEnabled) {
|
|
1628
|
+
lines.push(`${leadPrefix}${title}${factsPart}`);
|
|
1629
|
+
} else {
|
|
1630
|
+
lines.push(
|
|
1631
|
+
themeText(statusIcon, statusTone, true) + " " + themeText(PROC_ZONE_ICON, "muted", true) + " " + formatTitle(title) + themeText(factsPart, factTone, true)
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
const { leftPad, contentWidth } = hLayout;
|
|
1637
|
+
const tailClock = elapsedMs !== null ? formatCompactClock(elapsedMs) : null;
|
|
1638
|
+
const minGap = 2;
|
|
1639
|
+
const buildRight = (facts, clockStr) => {
|
|
1640
|
+
const mid = facts.join(" \xB7 ");
|
|
1641
|
+
if (mid && clockStr) return `${mid} ${clockStr}`;
|
|
1642
|
+
return mid || clockStr || "";
|
|
1643
|
+
};
|
|
1644
|
+
while (middleFacts.length > 0 && (() => {
|
|
1645
|
+
const right = buildRight(middleFacts, tailClock);
|
|
1646
|
+
const gap2 = right ? minGap : 0;
|
|
1647
|
+
return visibleWidth(`${leadPrefix}${title}`) + gap2 + visibleWidth(right) > contentWidth;
|
|
1648
|
+
})()) {
|
|
1649
|
+
middleFacts.pop();
|
|
1650
|
+
}
|
|
1651
|
+
const rightStr = buildRight(middleFacts, tailClock);
|
|
1652
|
+
const gapAllowance = rightStr ? minGap : 0;
|
|
1653
|
+
const roomForTitle = contentWidth - visibleWidth(leadPrefix) - gapAllowance - visibleWidth(rightStr);
|
|
1654
|
+
const shownTitle = visibleWidth(title) > roomForTitle ? fitAnsiLine(title, Math.max(1, roomForTitle)) : title;
|
|
1655
|
+
const leftPlain = `${leadPrefix}${shownTitle}`;
|
|
1656
|
+
const leftWidth = visibleWidth(leftPlain);
|
|
1657
|
+
const rightWidth = visibleWidth(rightStr);
|
|
1658
|
+
const gap = rightStr && leftWidth + minGap + rightWidth <= contentWidth ? " ".repeat(contentWidth - leftWidth - rightWidth) : rightStr ? " " : "";
|
|
1631
1659
|
if (!colorEnabled) {
|
|
1632
|
-
|
|
1660
|
+
const body = rightStr ? `${leftPlain}${gap}${rightStr}` : leftPlain;
|
|
1661
|
+
lines.push(`${leftPad}${visibleWidth(body) > contentWidth ? fitAnsiLine(body, contentWidth) : body}`);
|
|
1633
1662
|
continue;
|
|
1634
1663
|
}
|
|
1664
|
+
const midStr = middleFacts.join(" \xB7 ");
|
|
1665
|
+
const coloredRight = (midStr ? themeText(midStr, factTone, true) : "") + (midStr && tailClock ? " " : "") + (tailClock ? themeText(tailClock, "chrome", true) : "");
|
|
1666
|
+
const coloredBody = `${themeText(statusIcon, statusTone, true)} ${themeText(PROC_ZONE_ICON, "muted", true)} ${formatTitle(shownTitle)}${gap}${coloredRight}`;
|
|
1635
1667
|
lines.push(
|
|
1636
|
-
leftPad
|
|
1668
|
+
`${leftPad}${visibleWidth(coloredBody) > contentWidth ? fitAnsiLine(coloredBody, contentWidth) : coloredBody}`
|
|
1637
1669
|
);
|
|
1638
1670
|
}
|
|
1639
1671
|
const hidden = procs.length - shown.length;
|
|
@@ -1711,7 +1743,7 @@ function renderDialogRule(width = DEFAULT_DIALOG_WIDTH, colorEnabled = resolveCl
|
|
|
1711
1743
|
if (paintWidth <= 0) return "";
|
|
1712
1744
|
const rule = boxGlyphs(resolveBoxCharset()).h.repeat(paintWidth);
|
|
1713
1745
|
if (!colorEnabled) return rule;
|
|
1714
|
-
return
|
|
1746
|
+
return `${themeColorSequence("chrome")}${rule}\x1B[0m`;
|
|
1715
1747
|
}
|
|
1716
1748
|
function renderDialogTitle(title, colorEnabled = resolveCliColorEnabled()) {
|
|
1717
1749
|
if (!colorEnabled) return title;
|
|
@@ -2429,6 +2461,7 @@ function applySelectionOverlay(visibleLines, history, contentWidth, scrollTop, s
|
|
|
2429
2461
|
}
|
|
2430
2462
|
|
|
2431
2463
|
// packages/cli/tui/tuiHistory.ts
|
|
2464
|
+
var PROSE_READABLE_MAX_WIDTH = 98;
|
|
2432
2465
|
var MAX_TUI_HISTORY_TURNS = 500;
|
|
2433
2466
|
var MAX_TUI_HISTORY_BYTES = 4 * 1024 * 1024;
|
|
2434
2467
|
var MAX_COMPACT_HEAD_LINES = 200;
|
|
@@ -2617,14 +2650,13 @@ function applyOutputChunkToCurrentTurn(history, chunk, kind = "assistant") {
|
|
|
2617
2650
|
appendCurrentBlock(history, kind, chunk);
|
|
2618
2651
|
return true;
|
|
2619
2652
|
}
|
|
2620
|
-
function styleAssistantTurn(content, colorEnabled) {
|
|
2653
|
+
function styleAssistantTurn(content, colorEnabled, state = assistantLayoutState()) {
|
|
2621
2654
|
content = content.split("\n").map(
|
|
2622
|
-
(line) => /\x1b\[(?:48;2;[0-9;]+|100)m/.test(line) ? line.replace(/ +(?=(?:\x1b\[[0-9;]*m)*$)/, "") : line
|
|
2655
|
+
(line) => /^[●▸✦✗]/.test(stripAnsi(line)) && /\x1b\[(?:48;2;[0-9;]+|100)m/.test(line) ? line.replace(/ +(?=(?:\x1b\[[0-9;]*m)*$)/, "") : line
|
|
2623
2656
|
).join("\n");
|
|
2624
2657
|
const highlighted = colorEnabled ? formatAssistantDisplay(content, { trimEdges: false }) : stripAnsi(formatAssistantDisplay(content, { trimEdges: false }));
|
|
2625
2658
|
const rawLines = highlighted.split("\n");
|
|
2626
|
-
let anchored =
|
|
2627
|
-
let inToolBlock = false;
|
|
2659
|
+
let { anchored, inToolBlock } = state;
|
|
2628
2660
|
const styledLines = rawLines.map((line) => {
|
|
2629
2661
|
const plain = stripAnsi(line);
|
|
2630
2662
|
if (!anchored && plain.trim().length > 0 && !plain.startsWith("[nolo]")) {
|
|
@@ -2640,6 +2672,7 @@ function styleAssistantTurn(content, colorEnabled) {
|
|
|
2640
2672
|
}
|
|
2641
2673
|
return line.startsWith("[nolo]") && colorEnabled ? themeText(line, "chrome", true) : line;
|
|
2642
2674
|
});
|
|
2675
|
+
Object.assign(state, { anchored, inToolBlock });
|
|
2643
2676
|
return styledLines.join("\n");
|
|
2644
2677
|
}
|
|
2645
2678
|
function gutterForRole(role, colorEnabled) {
|
|
@@ -2678,7 +2711,10 @@ function layoutTurnRows(role, content, contentWidth, colorEnabled, command, opti
|
|
|
2678
2711
|
});
|
|
2679
2712
|
return [...textRows, ...imageRows];
|
|
2680
2713
|
}
|
|
2681
|
-
function
|
|
2714
|
+
function assistantLayoutState() {
|
|
2715
|
+
return { anchored: false, inToolBlock: false, fenceMarker: null, inRenderedFence: false };
|
|
2716
|
+
}
|
|
2717
|
+
function layoutTextRows(role, content, contentWidth, colorEnabled, command, state = assistantLayoutState()) {
|
|
2682
2718
|
content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
2683
2719
|
if (role === "user") {
|
|
2684
2720
|
const logicalLines = content.split("\n");
|
|
@@ -2695,7 +2731,7 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command) {
|
|
|
2695
2731
|
for (let i = 0; i < logicalLines.length; i++) {
|
|
2696
2732
|
const line = logicalLines[i];
|
|
2697
2733
|
const prefix = i === 0 ? firstPrefix : multilinePrefix;
|
|
2698
|
-
const styledLine = `${prefix}${
|
|
2734
|
+
const styledLine = `${prefix}${boldOn}${line}${boldOff}${fgOff}`;
|
|
2699
2735
|
const prefixCharCount = prefix.length;
|
|
2700
2736
|
const wrappedRows = wrapTranscriptLineWithLayout(
|
|
2701
2737
|
styledLine,
|
|
@@ -2767,7 +2803,8 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command) {
|
|
|
2767
2803
|
}
|
|
2768
2804
|
return rows2.length > 0 ? rows2 : [{ rendered: "", sourceStart: 0, sourceEnd: 0, prefixWidth: 2 }];
|
|
2769
2805
|
}
|
|
2770
|
-
|
|
2806
|
+
let { inToolBlock, fenceMarker, inRenderedFence } = state;
|
|
2807
|
+
const styledEntry = styleAssistantTurn(content, colorEnabled, state);
|
|
2771
2808
|
const styledLines = styledEntry.split("\n");
|
|
2772
2809
|
const rawLines = content.split("\n");
|
|
2773
2810
|
let rawIdx = 0;
|
|
@@ -2794,9 +2831,26 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command) {
|
|
|
2794
2831
|
const rawLineLen = rawLine.length;
|
|
2795
2832
|
const sourceMapping = buildSourceMapping(rawLine, styledLine, prefixCharCount);
|
|
2796
2833
|
const listMarker = stripAnsi(styledLine).replace(/^◈ /, "").match(/^(\s*(?:\d+[.)]|[•*+-])\s+)/)?.[1];
|
|
2834
|
+
const plain = stripAnsi(styledLine).replace(/^◈ /, "");
|
|
2835
|
+
const rawPlain = stripAnsi(rawLine);
|
|
2836
|
+
const marker = rawPlain.match(/^\s*(`{3,}|~{3,})/)?.[1];
|
|
2837
|
+
const wasInFence = fenceMarker !== null;
|
|
2838
|
+
if (marker) {
|
|
2839
|
+
if (fenceMarker === null) fenceMarker = marker;
|
|
2840
|
+
else if (marker[0] === fenceMarker[0] && marker.length >= fenceMarker.length) fenceMarker = null;
|
|
2841
|
+
}
|
|
2842
|
+
const asciiFence = /^\+(?:-{24}|- [^+]+ -{4,})$/.test(plain);
|
|
2843
|
+
const renderedOpen = /^[┌╭]─/.test(plain) || asciiFence && !inRenderedFence;
|
|
2844
|
+
const renderedClose = /^[└╰]─/.test(plain) || asciiFence && inRenderedFence;
|
|
2845
|
+
if (renderedOpen && !inRenderedFence) inRenderedFence = true;
|
|
2846
|
+
if (/^[●▸✦✗]/.test(plain)) inToolBlock = true;
|
|
2847
|
+
else if (plain.trim() && !/^\s/.test(plain)) inToolBlock = false;
|
|
2848
|
+
const structural = wasInFence || marker !== void 0 || inRenderedFence || inToolBlock || /^\s*[▎│|┃┌┐└┘├┤┬┴┼╭╮╰╯]/.test(plain) || /^\s*(?:[-─━═_*]\s*){3,}$/.test(plain);
|
|
2849
|
+
const wrapWidth = structural ? contentWidth : Math.min(contentWidth, PROSE_READABLE_MAX_WIDTH);
|
|
2850
|
+
if (renderedClose) inRenderedFence = false;
|
|
2797
2851
|
const lineRows = wrapTranscriptLineWithLayout(
|
|
2798
2852
|
styledLine,
|
|
2799
|
-
|
|
2853
|
+
wrapWidth,
|
|
2800
2854
|
listMarker ? " ".repeat(prefixWidth + displayWidth(listMarker)) : "",
|
|
2801
2855
|
rawOffset,
|
|
2802
2856
|
prefixWidth,
|
|
@@ -2804,10 +2858,21 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command) {
|
|
|
2804
2858
|
sourceMapping,
|
|
2805
2859
|
rawLineLen
|
|
2806
2860
|
);
|
|
2861
|
+
if (!structural) {
|
|
2862
|
+
for (const row of lineRows) {
|
|
2863
|
+
if (!row.softWrapped) continue;
|
|
2864
|
+
const trailing = stripAnsi(row.rendered).match(/ +$/)?.[0] ?? "";
|
|
2865
|
+
if (!trailing) continue;
|
|
2866
|
+
row.rendered = row.rendered.replace(/ +(?=(?:\x1b\[[0-9;]*m)*$)/, "");
|
|
2867
|
+
row.sourceMapping = row.sourceMapping?.slice(0, -trailing.length);
|
|
2868
|
+
row.softWrapJoiner = trailing + (row.softWrapJoiner ?? "");
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2807
2871
|
rows.push(...lineRows);
|
|
2808
2872
|
rawIdx += 1;
|
|
2809
2873
|
rawOffset += rawLineLen + 1;
|
|
2810
2874
|
}
|
|
2875
|
+
Object.assign(state, { inToolBlock, fenceMarker, inRenderedFence });
|
|
2811
2876
|
return rows.length > 0 ? rows : [{ rendered: "", sourceStart: 0, sourceEnd: 0, prefixWidth: 0 }];
|
|
2812
2877
|
}
|
|
2813
2878
|
function getTurnLayoutRows(turn, contentWidth, colorEnabled, themeFingerprint, graphicsEnabled = false) {
|
|
@@ -2831,12 +2896,7 @@ function getTurnLayoutRows(turn, contentWidth, colorEnabled, themeFingerprint, g
|
|
|
2831
2896
|
});
|
|
2832
2897
|
return layoutRows;
|
|
2833
2898
|
}
|
|
2834
|
-
function renderTurnBlock(role, content, contentWidth, colorEnabled, command) {
|
|
2835
|
-
return layoutTurnRows(role, content, contentWidth, colorEnabled, command).map((r) => r.rendered);
|
|
2836
|
-
}
|
|
2837
|
-
var streamingTurnCache = null;
|
|
2838
2899
|
function resetStreamingTurnCache() {
|
|
2839
|
-
streamingTurnCache = null;
|
|
2840
2900
|
streamingLayoutCache = null;
|
|
2841
2901
|
}
|
|
2842
2902
|
var streamingLayoutCache = null;
|
|
@@ -2863,48 +2923,30 @@ function layoutRowsEqual(a, b) {
|
|
|
2863
2923
|
}
|
|
2864
2924
|
return true;
|
|
2865
2925
|
}
|
|
2866
|
-
function renderContinuationTurnRows(role, source, contentWidth, colorEnabled, sourceOffset) {
|
|
2867
|
-
const
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
const rows = [];
|
|
2875
|
-
let rawOffset = sourceOffset;
|
|
2876
|
-
for (let i = 0; i < styledLines.length; i++) {
|
|
2877
|
-
const rawLine = rawLines[i] ?? "";
|
|
2878
|
-
const styledLine = styledLines[i];
|
|
2879
|
-
const sourceMapping = pairingSafe ? buildSourceMapping(rawLine, styledLine, 0) : void 0;
|
|
2880
|
-
rows.push(
|
|
2881
|
-
...wrapTranscriptLineWithLayout(
|
|
2882
|
-
styledLine,
|
|
2883
|
-
contentWidth,
|
|
2884
|
-
"",
|
|
2885
|
-
rawOffset,
|
|
2886
|
-
0,
|
|
2887
|
-
0,
|
|
2888
|
-
sourceMapping,
|
|
2889
|
-
rawLine.length
|
|
2890
|
-
)
|
|
2891
|
-
);
|
|
2892
|
-
rawOffset += rawLine.length + 1;
|
|
2893
|
-
}
|
|
2894
|
-
return rows;
|
|
2926
|
+
function renderContinuationTurnRows(role, source, contentWidth, colorEnabled, sourceOffset, state) {
|
|
2927
|
+
const rows = layoutTextRows(role, source, contentWidth, colorEnabled, void 0, state);
|
|
2928
|
+
return rows.map((row) => ({
|
|
2929
|
+
...row,
|
|
2930
|
+
sourceStart: row.sourceStart + sourceOffset,
|
|
2931
|
+
sourceEnd: row.sourceEnd + sourceOffset,
|
|
2932
|
+
sourceMapping: row.sourceMapping?.map((offset) => offset + sourceOffset)
|
|
2933
|
+
}));
|
|
2895
2934
|
}
|
|
2896
2935
|
function rebuildStreamingLayoutCache(content, role, contentWidth, colorEnabled, themeFingerprint) {
|
|
2897
2936
|
const rows = layoutTurnRows(role, content, contentWidth, colorEnabled);
|
|
2898
2937
|
const lastNewline = content.lastIndexOf("\n");
|
|
2899
2938
|
const completeContentLength = lastNewline + 1;
|
|
2900
2939
|
const committedSource = content.slice(0, completeContentLength).slice(0, -1);
|
|
2940
|
+
const committedState = assistantLayoutState();
|
|
2941
|
+
const committedRows = completeContentLength === 0 ? [] : layoutTextRows(role, committedSource, contentWidth, colorEnabled, void 0, committedState);
|
|
2901
2942
|
streamingLayoutCache = {
|
|
2902
2943
|
role,
|
|
2903
2944
|
contentWidth,
|
|
2904
2945
|
colorEnabled,
|
|
2905
2946
|
themeFingerprint,
|
|
2906
2947
|
fullContent: content,
|
|
2907
|
-
committedRows
|
|
2948
|
+
committedRows,
|
|
2949
|
+
committedState,
|
|
2908
2950
|
completeContentLength,
|
|
2909
2951
|
pendingTail: lastNewline === -1 ? content : content.slice(lastNewline + 1),
|
|
2910
2952
|
fenceFlips: countFenceFlips(content),
|
|
@@ -2949,16 +2991,18 @@ function computeStreamingTurnLayoutRows(role, content, contentWidth, colorEnable
|
|
|
2949
2991
|
const lastNewline = newTail.lastIndexOf("\n");
|
|
2950
2992
|
const committedRows = [...cache.committedRows];
|
|
2951
2993
|
let completeContentLength = cache.completeContentLength;
|
|
2994
|
+
const committedState = { ...cache.committedState };
|
|
2952
2995
|
if (lastNewline !== -1) {
|
|
2953
2996
|
const completePart = newTail.slice(0, lastNewline + 1);
|
|
2954
2997
|
const renderSource = completePart.slice(0, -1);
|
|
2955
2998
|
committedRows.push(
|
|
2956
|
-
...completeContentLength === 0 ?
|
|
2999
|
+
...completeContentLength === 0 ? layoutTextRows(role, renderSource, contentWidth, colorEnabled, void 0, committedState) : renderContinuationTurnRows(
|
|
2957
3000
|
role,
|
|
2958
3001
|
renderSource,
|
|
2959
3002
|
contentWidth,
|
|
2960
3003
|
colorEnabled,
|
|
2961
|
-
completeContentLength
|
|
3004
|
+
completeContentLength,
|
|
3005
|
+
committedState
|
|
2962
3006
|
)
|
|
2963
3007
|
);
|
|
2964
3008
|
completeContentLength += completePart.length;
|
|
@@ -2971,7 +3015,8 @@ function computeStreamingTurnLayoutRows(role, content, contentWidth, colorEnable
|
|
|
2971
3015
|
pendingTail,
|
|
2972
3016
|
contentWidth,
|
|
2973
3017
|
colorEnabled,
|
|
2974
|
-
completeContentLength
|
|
3018
|
+
completeContentLength,
|
|
3019
|
+
{ ...committedState }
|
|
2975
3020
|
)
|
|
2976
3021
|
];
|
|
2977
3022
|
if (!cache.spliceValidated || forceValidate) {
|
|
@@ -2989,6 +3034,7 @@ function computeStreamingTurnLayoutRows(role, content, contentWidth, colorEnable
|
|
|
2989
3034
|
}
|
|
2990
3035
|
cache.fullContent = content;
|
|
2991
3036
|
cache.committedRows = committedRows;
|
|
3037
|
+
cache.committedState = committedState;
|
|
2992
3038
|
cache.completeContentLength = completeContentLength;
|
|
2993
3039
|
cache.pendingTail = pendingTail;
|
|
2994
3040
|
if (lastNewline !== -1) {
|
|
@@ -3021,6 +3067,7 @@ function isPipeRowLike(line) {
|
|
|
3021
3067
|
function isSuspiciousAppend(newTail, fenceParityEven) {
|
|
3022
3068
|
if (!fenceParityEven) return true;
|
|
3023
3069
|
if (newTail.includes("\r")) return true;
|
|
3070
|
+
if (newTail.includes("~~~") || /^#{1,6} /m.test(newTail)) return true;
|
|
3024
3071
|
if (newTail.includes("```")) return true;
|
|
3025
3072
|
if (newTail.includes("$$") || newTail.includes("\\[") || newTail.includes("\\]")) {
|
|
3026
3073
|
return true;
|
|
@@ -3043,139 +3090,14 @@ function isSuspiciousBoundary(committedLastLine, newTail) {
|
|
|
3043
3090
|
}
|
|
3044
3091
|
return polishBreathInsertsBlankBetween(committedLastLine, firstLine);
|
|
3045
3092
|
}
|
|
3046
|
-
function renderPrefixTurnBlock(role, content, contentWidth, colorEnabled) {
|
|
3047
|
-
content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
3048
|
-
if (role === "user") {
|
|
3049
|
-
return renderTurnBlock(role, content, contentWidth, colorEnabled);
|
|
3050
|
-
}
|
|
3051
|
-
const styledLines = styleAssistantTurn(content, colorEnabled).split("\n");
|
|
3052
|
-
const lines = [];
|
|
3053
|
-
for (const logicalLine of styledLines) {
|
|
3054
|
-
lines.push(...wrapTranscriptLine(logicalLine, contentWidth));
|
|
3055
|
-
}
|
|
3056
|
-
return lines;
|
|
3057
|
-
}
|
|
3058
|
-
function renderTailTurnBlock(role, content, contentWidth, colorEnabled) {
|
|
3059
|
-
content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
3060
|
-
if (role === "user") {
|
|
3061
|
-
const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
|
|
3062
|
-
const multilinePrefix = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
|
|
3063
|
-
const hangingIndent = colorEnabled ? `${accentSeq}\x1B[1m\u2503 \x1B[0m` : "\u2503 ";
|
|
3064
|
-
const boldOn = colorEnabled ? "\x1B[1m" : "";
|
|
3065
|
-
const boldOff = colorEnabled ? "\x1B[22m" : "";
|
|
3066
|
-
const fgOff = colorEnabled ? "\x1B[39m" : "";
|
|
3067
|
-
const lines = [];
|
|
3068
|
-
for (const rawLine of content.split("\n")) {
|
|
3069
|
-
const styledLine = `${multilinePrefix}${accentSeq}${boldOn}${rawLine}${boldOff}${fgOff}`;
|
|
3070
|
-
lines.push(...wrapTranscriptLine(styledLine, contentWidth, hangingIndent));
|
|
3071
|
-
}
|
|
3072
|
-
return lines;
|
|
3073
|
-
} else {
|
|
3074
|
-
const highlighted = colorEnabled ? formatAssistantDisplay(content, { trimEdges: false }) : stripAnsi(formatAssistantDisplay(content, { trimEdges: false }));
|
|
3075
|
-
const rawLines = highlighted.split("\n");
|
|
3076
|
-
const styledLines = rawLines.map((line) => {
|
|
3077
|
-
return line.startsWith("[nolo]") && colorEnabled ? themeText(line, "chrome", true) : line;
|
|
3078
|
-
});
|
|
3079
|
-
const lines = [];
|
|
3080
|
-
for (const logicalLine of styledLines) {
|
|
3081
|
-
const plain = stripAnsi(logicalLine);
|
|
3082
|
-
const anchor = plain.startsWith("\u25C8 ") ? 2 : 0;
|
|
3083
|
-
const marker = plain.replace(/^◈ /, "").match(/^(\s*(?:\d+[.)]|[•*+-])\s+)/)?.[1] ?? "";
|
|
3084
|
-
lines.push(...wrapTranscriptLine(logicalLine, contentWidth, marker ? " ".repeat(anchor + displayWidth(marker)) : ""));
|
|
3085
|
-
}
|
|
3086
|
-
return lines;
|
|
3087
|
-
}
|
|
3088
|
-
}
|
|
3089
3093
|
function getStreamingTurnLines(role, content, contentWidth, colorEnabled, themeFingerprint) {
|
|
3090
|
-
|
|
3091
|
-
let cache = streamingTurnCache;
|
|
3092
|
-
const geometryChanged = !cache || cache.role !== role || cache.contentWidth !== contentWidth || cache.colorEnabled !== colorEnabled || cache.themeFingerprint !== themeFingerprint;
|
|
3093
|
-
if (geometryChanged || !content.startsWith(cache.fullContent)) {
|
|
3094
|
-
return rebuildStreamingCache(content, role, contentWidth, colorEnabled, themeFingerprint);
|
|
3095
|
-
}
|
|
3096
|
-
if (content === cache.fullContent && cache.lastResult) {
|
|
3097
|
-
return cache.lastResult;
|
|
3098
|
-
}
|
|
3099
|
-
const suffix = content.slice(cache.fullContent.length);
|
|
3100
|
-
if (suffix === "") {
|
|
3101
|
-
return cache.lastResult ?? cache.committedLines;
|
|
3102
|
-
}
|
|
3103
|
-
const renderFull = () => {
|
|
3104
|
-
const lines = renderTurnBlock(role, content, contentWidth, colorEnabled);
|
|
3105
|
-
cache.fullContent = content;
|
|
3106
|
-
cache.fenceFlips = countFenceFlips(content);
|
|
3107
|
-
const lastNewline = content.lastIndexOf("\n");
|
|
3108
|
-
cache.completeContentLength = lastNewline + 1;
|
|
3109
|
-
cache.committedLines = lastNewline === -1 ? [] : renderTurnBlock(role, content.slice(0, lastNewline), contentWidth, colorEnabled);
|
|
3110
|
-
cache.pendingTail = content.slice(lastNewline + 1);
|
|
3111
|
-
cache.committedLastLine = lastNewline === -1 ? "" : lastLogicalLineOf(content.slice(0, lastNewline + 1));
|
|
3112
|
-
cache.lastResult = lines;
|
|
3113
|
-
return lines;
|
|
3114
|
-
};
|
|
3115
|
-
const newTail = cache.pendingTail + suffix;
|
|
3116
|
-
if (!cache.fastPathEnabled || isSuspiciousAppend(newTail, cache.fenceFlips % 2 === 0) || isSuspiciousBoundary(cache.committedLastLine, newTail)) {
|
|
3117
|
-
return renderFull();
|
|
3118
|
-
}
|
|
3119
|
-
const tailRenderer = cache.completeContentLength === 0 ? renderPrefixTurnBlock : renderTailTurnBlock;
|
|
3120
|
-
const tailLines = tailRenderer(role, newTail, contentWidth, colorEnabled);
|
|
3121
|
-
const composed = cache.completeContentLength === 0 ? tailLines : [...cache.committedLines, ...tailLines];
|
|
3122
|
-
if (!cache.spliceValidated || forceValidate) {
|
|
3123
|
-
const full = renderTurnBlock(role, content, contentWidth, colorEnabled);
|
|
3124
|
-
cache.spliceValidated = true;
|
|
3125
|
-
if (composed.length === full.length && composed.every((line, index) => line === full[index])) {
|
|
3126
|
-
commitCompletedTail(cache, content, newTail, role, contentWidth, colorEnabled);
|
|
3127
|
-
cache.lastResult = composed;
|
|
3128
|
-
return composed;
|
|
3129
|
-
}
|
|
3130
|
-
cache.fastPathEnabled = false;
|
|
3131
|
-
return renderFull();
|
|
3132
|
-
}
|
|
3133
|
-
commitCompletedTail(cache, content, newTail, role, contentWidth, colorEnabled);
|
|
3134
|
-
cache.lastResult = composed;
|
|
3135
|
-
return composed;
|
|
3094
|
+
return computeStreamingTurnLayoutRows(role, content, contentWidth, colorEnabled, themeFingerprint).map((row) => row.rendered);
|
|
3136
3095
|
}
|
|
3137
3096
|
function lastLogicalLineOf(content) {
|
|
3138
|
-
const trimmed = content.
|
|
3097
|
+
const trimmed = content.endsWith("\n") ? content.slice(0, -1) : content;
|
|
3139
3098
|
const idx = trimmed.lastIndexOf("\n");
|
|
3140
3099
|
return idx === -1 ? trimmed : trimmed.slice(idx + 1);
|
|
3141
3100
|
}
|
|
3142
|
-
function rebuildStreamingCache(content, role, contentWidth, colorEnabled, themeFingerprint) {
|
|
3143
|
-
const lines = renderTurnBlock(role, content, contentWidth, colorEnabled);
|
|
3144
|
-
const lastNewline = content.lastIndexOf("\n");
|
|
3145
|
-
streamingTurnCache = {
|
|
3146
|
-
role,
|
|
3147
|
-
contentWidth,
|
|
3148
|
-
colorEnabled,
|
|
3149
|
-
themeFingerprint,
|
|
3150
|
-
fullContent: content,
|
|
3151
|
-
// committed 渲染源剥掉段尾 \n(幽灵空行修正,见 renderFull 注释)。
|
|
3152
|
-
committedLines: lastNewline === -1 ? [] : renderTurnBlock(role, content.slice(0, lastNewline), contentWidth, colorEnabled),
|
|
3153
|
-
completeContentLength: lastNewline + 1,
|
|
3154
|
-
pendingTail: content.slice(lastNewline + 1),
|
|
3155
|
-
fenceFlips: countFenceFlips(content),
|
|
3156
|
-
committedLastLine: lastNewline === -1 ? "" : lastLogicalLineOf(content.slice(0, lastNewline + 1)),
|
|
3157
|
-
fastPathEnabled: true,
|
|
3158
|
-
spliceValidated: false,
|
|
3159
|
-
lastResult: lines
|
|
3160
|
-
};
|
|
3161
|
-
return lines;
|
|
3162
|
-
}
|
|
3163
|
-
function commitCompletedTail(cache, content, newTail, role, contentWidth, colorEnabled) {
|
|
3164
|
-
const lastNewline = newTail.lastIndexOf("\n");
|
|
3165
|
-
if (lastNewline !== -1) {
|
|
3166
|
-
const completePart = newTail.slice(0, lastNewline + 1);
|
|
3167
|
-
const renderSource = completePart.slice(0, -1);
|
|
3168
|
-
const renderer = cache.completeContentLength === 0 ? renderPrefixTurnBlock : renderTailTurnBlock;
|
|
3169
|
-
cache.committedLines.push(
|
|
3170
|
-
...renderer(role, renderSource, contentWidth, colorEnabled)
|
|
3171
|
-
);
|
|
3172
|
-
cache.completeContentLength += completePart.length;
|
|
3173
|
-
cache.fenceFlips += countFenceFlips(completePart);
|
|
3174
|
-
cache.committedLastLine = lastLogicalLineOf(completePart);
|
|
3175
|
-
cache.pendingTail = newTail.slice(lastNewline + 1);
|
|
3176
|
-
}
|
|
3177
|
-
cache.fullContent = content;
|
|
3178
|
-
}
|
|
3179
3101
|
function countTurnLines(role, content, contentWidth, command, options) {
|
|
3180
3102
|
return layoutTurnRows(role, content, contentWidth, false, command, options).length;
|
|
3181
3103
|
}
|
|
@@ -6554,7 +6476,8 @@ async function runWithInputRequiredAttention(args, body) {
|
|
|
6554
6476
|
}
|
|
6555
6477
|
|
|
6556
6478
|
// packages/cli/tui/runDock.ts
|
|
6557
|
-
var RUN_DOCK_TICK_INTERVAL_MS =
|
|
6479
|
+
var RUN_DOCK_TICK_INTERVAL_MS = RUN_ZONE_FRAME_INTERVAL_MS;
|
|
6480
|
+
var RUN_DOCK_IDLE_TICK_INTERVAL_MS = 1e3;
|
|
6558
6481
|
var RUN_DOCK_LINGER_MS = 5e3;
|
|
6559
6482
|
var RUN_DOCK_STALE_MS = 5 * 6e4;
|
|
6560
6483
|
var RUN_DOCK_MAX_ROWS = RUN_ZONE_MAX_ROWS;
|
|
@@ -6591,11 +6514,35 @@ function createRunDock(deps) {
|
|
|
6591
6514
|
const retired = /* @__PURE__ */ new Set();
|
|
6592
6515
|
let seqCounter = 0;
|
|
6593
6516
|
let timer = null;
|
|
6517
|
+
let timerMs = null;
|
|
6594
6518
|
let disposed = false;
|
|
6519
|
+
let lastIdleSignature = null;
|
|
6520
|
+
let hadActiveSpinner = false;
|
|
6521
|
+
const activeTickMs = tickIntervalMs;
|
|
6522
|
+
const idleTickMs = Math.max(tickIntervalMs, RUN_DOCK_IDLE_TICK_INTERVAL_MS);
|
|
6523
|
+
const hasActiveSpinner = (procs) => {
|
|
6524
|
+
if (procs.some((proc) => !procZoneFinished(proc))) return true;
|
|
6525
|
+
for (const entry of entries.values()) {
|
|
6526
|
+
const carrier = entry.snapshot;
|
|
6527
|
+
if (entry.snapshot.status === "running" && (!carrier.remoteTask || remoteTaskIsActive(carrier))) {
|
|
6528
|
+
return true;
|
|
6529
|
+
}
|
|
6530
|
+
}
|
|
6531
|
+
return false;
|
|
6532
|
+
};
|
|
6533
|
+
const computeIdleSignature = (at, procs) => {
|
|
6534
|
+
const ordered = orderedEntries().map((entry) => entry.snapshot);
|
|
6535
|
+
const runText = formatRunZoneLines(ordered, false, at, maxRows).join("\n");
|
|
6536
|
+
const procText = formatProcZoneLines(procs, false, at, maxRows).join("\n");
|
|
6537
|
+
return `${runText}
|
|
6538
|
+
--
|
|
6539
|
+
${procText}`;
|
|
6540
|
+
};
|
|
6595
6541
|
const stopTimer = () => {
|
|
6596
6542
|
if (timer !== null) {
|
|
6597
6543
|
clearIntervalFn(timer);
|
|
6598
6544
|
timer = null;
|
|
6545
|
+
timerMs = null;
|
|
6599
6546
|
}
|
|
6600
6547
|
};
|
|
6601
6548
|
const prune = () => {
|
|
@@ -6619,14 +6566,40 @@ function createRunDock(deps) {
|
|
|
6619
6566
|
if (entries.size === 0 && runningProcs().length === 0) stopTimer();
|
|
6620
6567
|
return changed;
|
|
6621
6568
|
};
|
|
6622
|
-
const
|
|
6623
|
-
prune();
|
|
6624
|
-
deps.onRepaint();
|
|
6625
|
-
};
|
|
6626
|
-
const ensureTimer = () => {
|
|
6569
|
+
const syncTimer = (procs = runningProcs()) => {
|
|
6627
6570
|
if (disposed) return;
|
|
6628
|
-
if (
|
|
6629
|
-
|
|
6571
|
+
if (entries.size === 0 && procs.length === 0) {
|
|
6572
|
+
stopTimer();
|
|
6573
|
+
return;
|
|
6574
|
+
}
|
|
6575
|
+
const active = hasActiveSpinner(procs);
|
|
6576
|
+
hadActiveSpinner = active;
|
|
6577
|
+
const targetMs = active ? activeTickMs : idleTickMs;
|
|
6578
|
+
if (timer !== null && timerMs === targetMs) return;
|
|
6579
|
+
stopTimer();
|
|
6580
|
+
timerMs = targetMs;
|
|
6581
|
+
timer = setIntervalFn(tick, targetMs);
|
|
6582
|
+
};
|
|
6583
|
+
const tick = () => {
|
|
6584
|
+
const pruned = prune();
|
|
6585
|
+
const procs = runningProcs();
|
|
6586
|
+
syncTimer(procs);
|
|
6587
|
+
if (entries.size === 0 && procs.length === 0) {
|
|
6588
|
+
const hadContent = pruned || lastIdleSignature !== null || hadActiveSpinner;
|
|
6589
|
+
lastIdleSignature = null;
|
|
6590
|
+
hadActiveSpinner = false;
|
|
6591
|
+
if (hadContent) deps.onRepaint();
|
|
6592
|
+
return;
|
|
6593
|
+
}
|
|
6594
|
+
if (pruned || hasActiveSpinner(procs)) {
|
|
6595
|
+
lastIdleSignature = null;
|
|
6596
|
+
deps.onRepaint();
|
|
6597
|
+
return;
|
|
6598
|
+
}
|
|
6599
|
+
const sig = computeIdleSignature(now(), procs);
|
|
6600
|
+
if (sig !== lastIdleSignature) {
|
|
6601
|
+
lastIdleSignature = sig;
|
|
6602
|
+
deps.onRepaint();
|
|
6630
6603
|
}
|
|
6631
6604
|
};
|
|
6632
6605
|
const update = (snapshot) => {
|
|
@@ -6662,20 +6635,28 @@ function createRunDock(deps) {
|
|
|
6662
6635
|
// 每次都刷新的话 linger 永远走不完,面板会一直挂着已完成的 run。
|
|
6663
6636
|
terminalAt: terminal ? prev?.terminalAt ?? at : null
|
|
6664
6637
|
});
|
|
6665
|
-
|
|
6638
|
+
const procs = runningProcs();
|
|
6639
|
+
syncTimer(procs);
|
|
6640
|
+
lastIdleSignature = hasActiveSpinner(procs) ? null : computeIdleSignature(at, procs);
|
|
6666
6641
|
deps.onRepaint();
|
|
6667
6642
|
};
|
|
6668
6643
|
const remove = (runId) => {
|
|
6669
6644
|
lastVisibleRunIds = EMPTY_VISIBLE_RUN_IDS;
|
|
6670
6645
|
if (!entries.delete(runId)) return;
|
|
6671
|
-
|
|
6646
|
+
const procs = runningProcs();
|
|
6647
|
+
syncTimer(procs);
|
|
6648
|
+
lastIdleSignature = entries.size === 0 && procs.length === 0 || hasActiveSpinner(procs) ? null : computeIdleSignature(now(), procs);
|
|
6649
|
+
if (entries.size === 0 && procs.length === 0) hadActiveSpinner = false;
|
|
6672
6650
|
deps.onRepaint();
|
|
6673
6651
|
};
|
|
6674
6652
|
const clear = () => {
|
|
6675
6653
|
lastVisibleRunIds = EMPTY_VISIBLE_RUN_IDS;
|
|
6676
6654
|
if (entries.size === 0) return;
|
|
6677
6655
|
entries.clear();
|
|
6678
|
-
|
|
6656
|
+
const procs = runningProcs();
|
|
6657
|
+
syncTimer(procs);
|
|
6658
|
+
lastIdleSignature = procs.length === 0 || hasActiveSpinner(procs) ? null : computeIdleSignature(now(), procs);
|
|
6659
|
+
if (procs.length === 0) hadActiveSpinner = false;
|
|
6679
6660
|
deps.onRepaint();
|
|
6680
6661
|
};
|
|
6681
6662
|
const orderedEntries = () => [...entries.values()].sort((a, b) => {
|
|
@@ -6699,11 +6680,15 @@ function createRunDock(deps) {
|
|
|
6699
6680
|
return b.startedAt - a.startedAt;
|
|
6700
6681
|
}).slice(0, PROC_LINGER_MAX_ROWS);
|
|
6701
6682
|
if (ordered.length === 0 && activeProcs.length === 0 && lingeringProcs.length === 0) {
|
|
6683
|
+
lastIdleSignature = null;
|
|
6684
|
+
hadActiveSpinner = false;
|
|
6685
|
+
stopTimer();
|
|
6702
6686
|
return [];
|
|
6703
6687
|
}
|
|
6704
6688
|
if (layout?.maxEntries === 0) return [];
|
|
6705
|
-
if (procs.length > 0) ensureTimer();
|
|
6706
6689
|
const at = now();
|
|
6690
|
+
syncTimer(procs);
|
|
6691
|
+
lastIdleSignature = hasActiveSpinner(procs) ? null : computeIdleSignature(at, procs);
|
|
6707
6692
|
const totalRows = layout?.maxEntries ?? Math.max(
|
|
6708
6693
|
ordered.length > 0 && activeProcs.length > 0 ? 2 : 1,
|
|
6709
6694
|
resolveRunZoneMaxRows(maxRows, layout?.rows)
|
|
@@ -6739,7 +6724,7 @@ function createRunDock(deps) {
|
|
|
6739
6724
|
getSummaryLines: (colorEnabled = false, layout) => {
|
|
6740
6725
|
prune();
|
|
6741
6726
|
const procs = runningProcs();
|
|
6742
|
-
|
|
6727
|
+
syncTimer(procs);
|
|
6743
6728
|
return formatBackgroundSummary(getRuns(), procs, colorEnabled, layout?.columns);
|
|
6744
6729
|
},
|
|
6745
6730
|
visibleRunIds: () => lastVisibleRunIds,
|
|
@@ -6747,6 +6732,8 @@ function createRunDock(deps) {
|
|
|
6747
6732
|
disposed = true;
|
|
6748
6733
|
entries.clear();
|
|
6749
6734
|
retired.clear();
|
|
6735
|
+
lastIdleSignature = null;
|
|
6736
|
+
hadActiveSpinner = false;
|
|
6750
6737
|
stopTimer();
|
|
6751
6738
|
lastVisibleRunIds = EMPTY_VISIBLE_RUN_IDS;
|
|
6752
6739
|
}
|
|
@@ -10490,7 +10477,7 @@ function handleTuiInput(input, state, historyTurns, deps) {
|
|
|
10490
10477
|
return { nextState: state, output: t("themeBrightnessSwitched", sub) };
|
|
10491
10478
|
}
|
|
10492
10479
|
if (sub === "auto" || sub === "terminal") {
|
|
10493
|
-
setActiveBrightness(null);
|
|
10480
|
+
setActiveBrightness(null, { explicit: true });
|
|
10494
10481
|
return {
|
|
10495
10482
|
nextState: state,
|
|
10496
10483
|
output: t("themeBrightnessAuto")
|
|
@@ -11197,6 +11184,12 @@ function handleTuiInput2(input, state, historyTurns, deps) {
|
|
|
11197
11184
|
import { execFileSync } from "node:child_process";
|
|
11198
11185
|
import { ReadStream } from "node:tty";
|
|
11199
11186
|
var OSC11_QUERY = "\x1B]11;?\x07";
|
|
11187
|
+
var COLOR_SCHEME_REPORT_RE = /^\x1b\[\?997;([12])n$/;
|
|
11188
|
+
function parseColorSchemeReport(sequence) {
|
|
11189
|
+
const match = sequence.match(COLOR_SCHEME_REPORT_RE);
|
|
11190
|
+
if (!match) return null;
|
|
11191
|
+
return match[1] === "1" ? "dark" : "light";
|
|
11192
|
+
}
|
|
11200
11193
|
var OSC11_REPLY_RE = /\x1b\]11;rgb:([0-9a-f]+)\/([0-9a-f]+)\/([0-9a-f]+)/i;
|
|
11201
11194
|
function componentToByte(raw) {
|
|
11202
11195
|
const value = Number.parseInt(raw, 16);
|
|
@@ -12713,7 +12706,16 @@ function classifyInternalResumeHeadGate(queue, dialogId) {
|
|
|
12713
12706
|
if (!head) return "empty-queue";
|
|
12714
12707
|
const event = head.event;
|
|
12715
12708
|
if (!event || typeof event !== "object") return "head-not-completion";
|
|
12716
|
-
|
|
12709
|
+
const kind = event.kind;
|
|
12710
|
+
if (kind === "background-task-completed") {
|
|
12711
|
+
if (!dialogId) return "head-not-this-dialog";
|
|
12712
|
+
const ownerDialogId = event.ownerDialogId ?? event.parentDialogId;
|
|
12713
|
+
if (ownerDialogId !== void 0 && ownerDialogId !== dialogId) {
|
|
12714
|
+
return "head-not-this-dialog";
|
|
12715
|
+
}
|
|
12716
|
+
return null;
|
|
12717
|
+
}
|
|
12718
|
+
if (kind !== "child-run-completed") {
|
|
12717
12719
|
return "head-not-completion";
|
|
12718
12720
|
}
|
|
12719
12721
|
const runs = event.runs;
|
|
@@ -12954,6 +12956,11 @@ To retain this unknown batch without resending and continue later messages: /pen
|
|
|
12954
12956
|
await notifyTurnEnd({ ok: true, aborted: false });
|
|
12955
12957
|
};
|
|
12956
12958
|
const notifyTurnStart = () => {
|
|
12959
|
+
const wasStopped = internalResumeStopped;
|
|
12960
|
+
internalResumeStopped = false;
|
|
12961
|
+
if (wasStopped && !recoveryBlocked && !writeError) {
|
|
12962
|
+
runtime.send({ type: "resume-drain" });
|
|
12963
|
+
}
|
|
12957
12964
|
runtime.send({ type: "turn-start" });
|
|
12958
12965
|
};
|
|
12959
12966
|
const notifyTurnEnd = async (outcome, internalDialog) => {
|
|
@@ -13619,6 +13626,7 @@ function normalizePasteNewlines(text) {
|
|
|
13619
13626
|
var altScreenOn = /* @__PURE__ */ new WeakMap();
|
|
13620
13627
|
var altScreenInvalidators = /* @__PURE__ */ new WeakMap();
|
|
13621
13628
|
var barCursorActive = /* @__PURE__ */ new WeakSet();
|
|
13629
|
+
var colorSchemeNotifyActive = /* @__PURE__ */ new WeakSet();
|
|
13622
13630
|
function notifyAltScreenInvalidators(output) {
|
|
13623
13631
|
const set = altScreenInvalidators.get(output);
|
|
13624
13632
|
if (set) {
|
|
@@ -13645,6 +13653,10 @@ function leaveAltScreen(output) {
|
|
|
13645
13653
|
barCursorActive.delete(output);
|
|
13646
13654
|
output.write("\x1B[0 q");
|
|
13647
13655
|
}
|
|
13656
|
+
if (colorSchemeNotifyActive.has(output)) {
|
|
13657
|
+
colorSchemeNotifyActive.delete(output);
|
|
13658
|
+
output.write("\x1B[?2031l");
|
|
13659
|
+
}
|
|
13648
13660
|
if (!altScreenOn.get(output)) return false;
|
|
13649
13661
|
altScreenOn.set(output, false);
|
|
13650
13662
|
resetHistoryFrameDiffCache(output);
|
|
@@ -13768,7 +13780,7 @@ function createFixedInput(output, config) {
|
|
|
13768
13780
|
bodySections.push(fitAnsiLine(actLine.replace(/\r?\n/g, " "), cols));
|
|
13769
13781
|
}
|
|
13770
13782
|
const ruleGlyph = boxGlyphs(resolveBoxCharset()).h;
|
|
13771
|
-
const rule = colorEnabled ?
|
|
13783
|
+
const rule = colorEnabled ? `${themeColorSequence("chrome")}${ruleGlyph.repeat(paintWidth)}\x1B[0m` : ruleGlyph.repeat(paintWidth);
|
|
13772
13784
|
bodySections.push(rule);
|
|
13773
13785
|
const queueLines = config.getQueueLines?.() ?? [];
|
|
13774
13786
|
for (const line of queueLines) {
|
|
@@ -13938,7 +13950,7 @@ function createFixedInput(output, config) {
|
|
|
13938
13950
|
);
|
|
13939
13951
|
if (taskEntries.length > 0) {
|
|
13940
13952
|
const ruleGlyph = boxGlyphs(resolveBoxCharset()).h;
|
|
13941
|
-
const topRule = topColorEnabled ?
|
|
13953
|
+
const topRule = topColorEnabled ? `${themeColorSequence("chrome")}${ruleGlyph.repeat(taskWidth)}\x1B[0m` : ruleGlyph.repeat(taskWidth);
|
|
13942
13954
|
taskLines.push(topRule);
|
|
13943
13955
|
}
|
|
13944
13956
|
const topText = taskLines.join("\n");
|
|
@@ -13978,6 +13990,16 @@ function createFixedInput(output, config) {
|
|
|
13978
13990
|
barCursorActive.delete(output);
|
|
13979
13991
|
write("\x1B[0 q");
|
|
13980
13992
|
};
|
|
13993
|
+
const enableColorSchemeNotify = () => {
|
|
13994
|
+
if (!config.autoThemeNotifications || colorSchemeNotifyActive.has(output)) return;
|
|
13995
|
+
colorSchemeNotifyActive.add(output);
|
|
13996
|
+
write("\x1B[?2031h");
|
|
13997
|
+
};
|
|
13998
|
+
const disableColorSchemeNotify = () => {
|
|
13999
|
+
if (!colorSchemeNotifyActive.has(output)) return;
|
|
14000
|
+
colorSchemeNotifyActive.delete(output);
|
|
14001
|
+
write("\x1B[?2031l");
|
|
14002
|
+
};
|
|
13981
14003
|
return {
|
|
13982
14004
|
active: true,
|
|
13983
14005
|
init() {
|
|
@@ -13985,6 +14007,7 @@ function createFixedInput(output, config) {
|
|
|
13985
14007
|
saveCursor();
|
|
13986
14008
|
setScrollRegion(inputLines);
|
|
13987
14009
|
enableMouse();
|
|
14010
|
+
enableColorSchemeNotify();
|
|
13988
14011
|
setBarCursor();
|
|
13989
14012
|
},
|
|
13990
14013
|
enterOutputMode(_submittedText) {
|
|
@@ -14002,6 +14025,7 @@ function createFixedInput(output, config) {
|
|
|
14002
14025
|
paused = true;
|
|
14003
14026
|
invalidateComposerCache();
|
|
14004
14027
|
disableMouse();
|
|
14028
|
+
disableColorSchemeNotify();
|
|
14005
14029
|
resetScrollRegion();
|
|
14006
14030
|
resetCursorStyle();
|
|
14007
14031
|
},
|
|
@@ -14011,6 +14035,7 @@ function createFixedInput(output, config) {
|
|
|
14011
14035
|
resetHistoryFrameDiffCache(output);
|
|
14012
14036
|
setScrollRegion(inputLines);
|
|
14013
14037
|
enableMouse();
|
|
14038
|
+
enableColorSchemeNotify();
|
|
14014
14039
|
setBarCursor();
|
|
14015
14040
|
const scrollBottom = Math.max(1, getRows() - inputLines);
|
|
14016
14041
|
write(`\x1B[${scrollBottom};1H
|
|
@@ -14023,12 +14048,14 @@ function createFixedInput(output, config) {
|
|
|
14023
14048
|
saveCursor();
|
|
14024
14049
|
setScrollRegion(inputLines);
|
|
14025
14050
|
enableMouse();
|
|
14051
|
+
enableColorSchemeNotify();
|
|
14026
14052
|
setBarCursor();
|
|
14027
14053
|
},
|
|
14028
14054
|
disable() {
|
|
14029
14055
|
setTopReservedRows(output, 0);
|
|
14030
14056
|
invalidatorSet?.delete(invalidateComposerCache);
|
|
14031
14057
|
disableMouse();
|
|
14058
|
+
disableColorSchemeNotify();
|
|
14032
14059
|
resetScrollRegion();
|
|
14033
14060
|
resetCursorStyle();
|
|
14034
14061
|
leaveAltScreen(output);
|
|
@@ -14152,6 +14179,10 @@ function splitRawInputWithTail(input, options) {
|
|
|
14152
14179
|
}
|
|
14153
14180
|
const oscEnd = parseOscEnd(input, index);
|
|
14154
14181
|
if (oscEnd !== null) {
|
|
14182
|
+
if (options?.onOsc11Background) {
|
|
14183
|
+
const bg = parseOsc11Background(input.slice(index, oscEnd));
|
|
14184
|
+
if (bg) options.onOsc11Background(bg);
|
|
14185
|
+
}
|
|
14155
14186
|
index = oscEnd;
|
|
14156
14187
|
continue;
|
|
14157
14188
|
}
|
|
@@ -14193,6 +14224,12 @@ function splitRawInputWithTail(input, options) {
|
|
|
14193
14224
|
}
|
|
14194
14225
|
const csi = readCsiSequence(input, index);
|
|
14195
14226
|
if (csi) {
|
|
14227
|
+
const scheme = parseColorSchemeReport(csi);
|
|
14228
|
+
if (scheme) {
|
|
14229
|
+
options?.onColorSchemeReport?.(scheme);
|
|
14230
|
+
index += csi.length;
|
|
14231
|
+
continue;
|
|
14232
|
+
}
|
|
14196
14233
|
tokens.push(csi);
|
|
14197
14234
|
index += csi.length;
|
|
14198
14235
|
continue;
|
|
@@ -14270,7 +14307,9 @@ function createRawInputDecoder(emitToken, options) {
|
|
|
14270
14307
|
const textToFlush = pendingBuffer;
|
|
14271
14308
|
pendingBuffer = "";
|
|
14272
14309
|
const { tokens, tail } = splitRawInputWithTail(textToFlush, {
|
|
14273
|
-
forceCompleteOpenPaste
|
|
14310
|
+
forceCompleteOpenPaste,
|
|
14311
|
+
onOsc11Background: options?.onOsc11Background,
|
|
14312
|
+
onColorSchemeReport: options?.onColorSchemeReport
|
|
14274
14313
|
});
|
|
14275
14314
|
for (const token of tokens) {
|
|
14276
14315
|
onToken(token);
|
|
@@ -14296,13 +14335,19 @@ function createRawInputDecoder(emitToken, options) {
|
|
|
14296
14335
|
PASTE_START2.length
|
|
14297
14336
|
);
|
|
14298
14337
|
if (endPos === -1) return;
|
|
14299
|
-
const { tokens, tail } = splitRawInputWithTail(pendingBuffer
|
|
14338
|
+
const { tokens, tail } = splitRawInputWithTail(pendingBuffer, {
|
|
14339
|
+
onOsc11Background: options?.onOsc11Background,
|
|
14340
|
+
onColorSchemeReport: options?.onColorSchemeReport
|
|
14341
|
+
});
|
|
14300
14342
|
pendingBuffer = tail;
|
|
14301
14343
|
for (const token of tokens) onToken(token);
|
|
14302
14344
|
if (pendingBuffer.startsWith(PASTE_START2)) return;
|
|
14303
14345
|
}
|
|
14304
14346
|
if (pendingBuffer.includes("\x1B")) {
|
|
14305
|
-
const { tokens, tail } = splitRawInputWithTail(pendingBuffer
|
|
14347
|
+
const { tokens, tail } = splitRawInputWithTail(pendingBuffer, {
|
|
14348
|
+
onOsc11Background: options?.onOsc11Background,
|
|
14349
|
+
onColorSchemeReport: options?.onColorSchemeReport
|
|
14350
|
+
});
|
|
14306
14351
|
pendingBuffer = tail;
|
|
14307
14352
|
for (const token of tokens) onToken(token);
|
|
14308
14353
|
if (pendingBuffer.startsWith(PASTE_START2)) return;
|
|
@@ -14347,6 +14392,7 @@ function createRawInputDecoder(emitToken, options) {
|
|
|
14347
14392
|
clearTimer();
|
|
14348
14393
|
pendingBuffer = "";
|
|
14349
14394
|
};
|
|
14395
|
+
decodeFn.hasPendingInput = () => pendingBuffer.length > 0;
|
|
14350
14396
|
return decodeFn;
|
|
14351
14397
|
}
|
|
14352
14398
|
|
|
@@ -15158,7 +15204,7 @@ async function runOneAgentTurn(ctx, inputMsg, imageUrls, actionGateHandler, conf
|
|
|
15158
15204
|
if (!approved) return false;
|
|
15159
15205
|
const commandText = typeof request.command === "string" ? request.command : "";
|
|
15160
15206
|
if (commandText) {
|
|
15161
|
-
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-
|
|
15207
|
+
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-SNQT73H4.js");
|
|
15162
15208
|
const hostResult = await runApprovedCredentialCommand({
|
|
15163
15209
|
commandText,
|
|
15164
15210
|
approvalEventId: request.id,
|
|
@@ -17108,7 +17154,7 @@ async function compactDialog(options) {
|
|
|
17108
17154
|
fetchImpl,
|
|
17109
17155
|
agentRef: getActiveDialogAgentId(current) ?? void 0,
|
|
17110
17156
|
loadAdapter: async () => {
|
|
17111
|
-
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-
|
|
17157
|
+
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-MHI6Y2IZ.js");
|
|
17112
17158
|
return createCliLocalRuntimeAdapter2({ env: { ...options.env ?? {}, AUTH_TOKEN: options.authToken, NOLO_SERVER: options.serverUrl }, fetchImpl });
|
|
17113
17159
|
}
|
|
17114
17160
|
}) : void 0);
|
|
@@ -18819,6 +18865,7 @@ async function runTuiWorkspace(options) {
|
|
|
18819
18865
|
preserveInput: true
|
|
18820
18866
|
});
|
|
18821
18867
|
if (detected) applyDetectedBackground(detected);
|
|
18868
|
+
let sawOsc11Reply = Boolean(detected?.hex);
|
|
18822
18869
|
const welcomeAnimEnabled = Boolean(output.isTTY) && process.env.NODE_ENV !== "test" && ((options.env ?? process.env).NOLO_CLI_NO_WELCOME_ANIM ?? "") !== "1";
|
|
18823
18870
|
const bannerColumns = output.columns;
|
|
18824
18871
|
const { contentWidth: bannerContentWidth, marginLeft: bannerMarginLeft } = typeof bannerColumns === "number" ? resolveHistoryLayoutGeometry(bannerColumns) : { contentWidth: bannerColumns ?? 80, marginLeft: 0 };
|
|
@@ -19903,7 +19950,17 @@ async function runTuiWorkspace(options) {
|
|
|
19903
19950
|
const { marginLeft } = resolveHistoryLayoutGeometry(cols);
|
|
19904
19951
|
return marginLeft > 0 ? " ".repeat(marginLeft) : "";
|
|
19905
19952
|
};
|
|
19953
|
+
const autoThemeEnabled = Boolean(output.isTTY) && (effectiveEnv.NOLO_TUI_AUTO_THEME ?? "") !== "0" && resolveCliColorEnabled();
|
|
19954
|
+
let composerHasPendingInput = () => false;
|
|
19955
|
+
let autoThemeTimer = null;
|
|
19956
|
+
const requestTerminalBackgroundQuery = () => {
|
|
19957
|
+
if (!autoThemeEnabled || sessionEnded || done) return;
|
|
19958
|
+
if (!fixedInput.active || fixedInput.isPaused() || dialogHost.isKeyboardClaimed()) return;
|
|
19959
|
+
if (composerHasPendingInput()) return;
|
|
19960
|
+
output.write(OSC11_QUERY);
|
|
19961
|
+
};
|
|
19906
19962
|
const baseFixedInput = createFixedInput(output, {
|
|
19963
|
+
autoThemeNotifications: autoThemeEnabled,
|
|
19907
19964
|
getStatusLine: (maxWidth) => {
|
|
19908
19965
|
const colorEnabled = resolveCliColorEnabled();
|
|
19909
19966
|
const isZh = getCliLocale() === "zh";
|
|
@@ -19965,13 +20022,14 @@ async function runTuiWorkspace(options) {
|
|
|
19965
20022
|
});
|
|
19966
20023
|
fixedInput = {
|
|
19967
20024
|
...baseFixedInput,
|
|
19968
|
-
repaint(draft, cursorPos2) {
|
|
20025
|
+
repaint(draft, cursorPos2, force) {
|
|
19969
20026
|
syncWindowTitle();
|
|
19970
|
-
return baseFixedInput.repaint(draft, cursorPos2);
|
|
20027
|
+
return baseFixedInput.repaint(draft, cursorPos2, force);
|
|
19971
20028
|
},
|
|
19972
20029
|
resumeFromDialog() {
|
|
19973
20030
|
baseFixedInput.resumeFromDialog();
|
|
19974
20031
|
setImmediate(() => {
|
|
20032
|
+
if (sawOsc11Reply) requestTerminalBackgroundQuery();
|
|
19975
20033
|
void runWakeHandler?.resumeAfterInputPause().catch(() => {
|
|
19976
20034
|
});
|
|
19977
20035
|
});
|
|
@@ -19979,6 +20037,7 @@ async function runTuiWorkspace(options) {
|
|
|
19979
20037
|
resumeFromSubprocess() {
|
|
19980
20038
|
baseFixedInput.resumeFromSubprocess();
|
|
19981
20039
|
setImmediate(() => {
|
|
20040
|
+
if (sawOsc11Reply) requestTerminalBackgroundQuery();
|
|
19982
20041
|
void runWakeHandler?.resumeAfterInputPause().catch(() => {
|
|
19983
20042
|
});
|
|
19984
20043
|
});
|
|
@@ -19989,15 +20048,32 @@ async function runTuiWorkspace(options) {
|
|
|
19989
20048
|
}
|
|
19990
20049
|
};
|
|
19991
20050
|
fixedInput.init();
|
|
19992
|
-
const paintFrame = (draft) => {
|
|
20051
|
+
const paintFrame = (draft, forceComposer = false) => {
|
|
19993
20052
|
output.write("\x1B[?2026h\x1B[?25l");
|
|
19994
20053
|
try {
|
|
19995
20054
|
renderHistoryToOutput();
|
|
19996
|
-
fixedInput.repaint(draft, cursorPos);
|
|
20055
|
+
fixedInput.repaint(draft, cursorPos, forceComposer);
|
|
19997
20056
|
} finally {
|
|
19998
20057
|
output.write("\x1B[?25h\x1B[?2026l");
|
|
19999
20058
|
}
|
|
20000
20059
|
};
|
|
20060
|
+
const applyLiveTerminalBackground = (bg) => {
|
|
20061
|
+
if (sessionEnded || done) return;
|
|
20062
|
+
if (!applyDetectedBackground(bg)) return;
|
|
20063
|
+
if (fixedInput.isPaused()) {
|
|
20064
|
+
if (!isRendererSuspended(output)) {
|
|
20065
|
+
paintSyncedModal();
|
|
20066
|
+
}
|
|
20067
|
+
return;
|
|
20068
|
+
}
|
|
20069
|
+
flushPendingRender();
|
|
20070
|
+
if (history.turns.length === 0 && history.currentRole === null) {
|
|
20071
|
+
repaintBanner();
|
|
20072
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos, true);
|
|
20073
|
+
return;
|
|
20074
|
+
}
|
|
20075
|
+
paintFrame(buffer, true);
|
|
20076
|
+
};
|
|
20001
20077
|
let resizeTimer = null;
|
|
20002
20078
|
const performResizePaint = () => {
|
|
20003
20079
|
if (done) return;
|
|
@@ -20043,6 +20119,10 @@ async function runTuiWorkspace(options) {
|
|
|
20043
20119
|
clearTimeout(resizeTimer);
|
|
20044
20120
|
resizeTimer = null;
|
|
20045
20121
|
}
|
|
20122
|
+
if (autoThemeTimer !== null) {
|
|
20123
|
+
clearInterval(autoThemeTimer);
|
|
20124
|
+
autoThemeTimer = null;
|
|
20125
|
+
}
|
|
20046
20126
|
clearSelectionCopyFeedback();
|
|
20047
20127
|
clearSelection();
|
|
20048
20128
|
clearTerminalAttentionProgress({ output, env: effectiveEnv });
|
|
@@ -20107,7 +20187,7 @@ async function runTuiWorkspace(options) {
|
|
|
20107
20187
|
onApprove: createSnapshotGuardedApproval("local", () => state.permissionGrants, approveLocalConfirms),
|
|
20108
20188
|
onApproved: async (approvedGate) => {
|
|
20109
20189
|
if (approvedGate.kind !== "confirm") return null;
|
|
20110
|
-
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-
|
|
20190
|
+
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-SNQT73H4.js");
|
|
20111
20191
|
const hostResult = await executeApprovedCredentialCreate({
|
|
20112
20192
|
gate: approvedGate,
|
|
20113
20193
|
approvalGateId: approvedGate.id,
|
|
@@ -21133,9 +21213,37 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21133
21213
|
cursorPos = result.cursorPos ?? buffer.length;
|
|
21134
21214
|
fixedInput.repaint(buffer, cursorPos);
|
|
21135
21215
|
};
|
|
21136
|
-
const
|
|
21137
|
-
|
|
21138
|
-
|
|
21216
|
+
const rawPollMs = Number.parseInt(effectiveEnv.NOLO_TUI_AUTO_THEME_POLL_MS ?? "", 10);
|
|
21217
|
+
const autoThemePollMs = Number.isFinite(rawPollMs) && rawPollMs >= 50 ? rawPollMs : 5e3;
|
|
21218
|
+
const startOsc11AutoThemePoll = () => {
|
|
21219
|
+
if (!autoThemeEnabled || autoThemeTimer !== null) return;
|
|
21220
|
+
autoThemeTimer = setInterval(requestTerminalBackgroundQuery, autoThemePollMs);
|
|
21221
|
+
autoThemeTimer.unref?.();
|
|
21222
|
+
};
|
|
21223
|
+
const onData = createRawInputDecoder(
|
|
21224
|
+
(token) => {
|
|
21225
|
+
void handleInputToken(token);
|
|
21226
|
+
},
|
|
21227
|
+
{
|
|
21228
|
+
onOsc11Background: (bg) => {
|
|
21229
|
+
sawOsc11Reply = true;
|
|
21230
|
+
startOsc11AutoThemePoll();
|
|
21231
|
+
applyLiveTerminalBackground(bg);
|
|
21232
|
+
},
|
|
21233
|
+
onColorSchemeReport: (scheme) => {
|
|
21234
|
+
if (!sawOsc11Reply) {
|
|
21235
|
+
applyLiveTerminalBackground({ brightness: scheme, hex: "" });
|
|
21236
|
+
}
|
|
21237
|
+
if (!sessionEnded && !done && fixedInput.active && !fixedInput.isPaused()) {
|
|
21238
|
+
output.write(OSC11_QUERY);
|
|
21239
|
+
}
|
|
21240
|
+
}
|
|
21241
|
+
}
|
|
21242
|
+
);
|
|
21243
|
+
composerHasPendingInput = () => onData.hasPendingInput();
|
|
21244
|
+
if (sawOsc11Reply) {
|
|
21245
|
+
startOsc11AutoThemePoll();
|
|
21246
|
+
}
|
|
21139
21247
|
graphicsRuntime = createTerminalGraphicsRuntime({
|
|
21140
21248
|
output,
|
|
21141
21249
|
env: effectiveEnv,
|