nolo-cli 0.251.0-alpha.1 → 0.252.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.
- package/{_executeModel-55PHWQWB.js → _executeModel-RXHY2BDR.js} +47 -47
- package/{action-WZTKEF5H.js → action-4MADDU52.js} +5 -5
- package/{addContentAction-LBVAQUF7.js → addContentAction-F4XO3VRF.js} +8 -8
- package/{addDialogAgentAction-6WAUSUSZ.js → addDialogAgentAction-NSCVHTZJ.js} +7 -7
- package/{agentDeleteCommand-KEO3KDK3.js → agentDeleteCommand-EJAI2VTH.js} +69 -68
- package/{agentEmailCommands-RWJQQRNT.js → agentEmailCommands-YBKHZMMZ.js} +69 -68
- package/{agentListCommands-L3TLPLNH.js → agentListCommands-M2KYLAOB.js} +226 -39
- package/{agentMachineCommands-EZWWXWDH.js → agentMachineCommands-GLY6NJWZ.js} +31 -29
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentRecordCommands-7W2CGHJJ.js → agentRecordCommands-JANPX6XI.js} +68 -67
- package/{agentRunCommand-POL6B6BO.js → agentRunCommand-TNLAXLUU.js} +68 -67
- package/{agentRunControl-FKSXBUAF.js → agentRunControl-KNNDEEDI.js} +8 -6
- package/{agentRuntimeLocal-WSHWNIMF.js → agentRuntimeLocal-EOW6FFXL.js} +26 -25
- package/{agentSlice-3G2YLTA4.js → agentSlice-PVFGBJXB.js} +8 -8
- package/{appDeleteCommands-DZZQCVYH.js → appDeleteCommands-3VCRRWUX.js} +33 -31
- package/{appDeployCommands-NJJBVNH5.js → appDeployCommands-XN6IEMYK.js} +33 -31
- package/{appDeployStatusCommands-GBOAFEYG.js → appDeployStatusCommands-ZSJJXMVR.js} +33 -31
- package/{appGetCommands-GOOKYMKO.js → appGetCommands-DJ7YQCEE.js} +33 -31
- package/{appListCommands-OBCGUG3S.js → appListCommands-4KU5CV5H.js} +33 -31
- package/{authCommand-77CRN332.js → authCommand-5DC3ES4Q.js} +12 -12
- package/{builtinSkillRegistry-PFTTFPWW.js → builtinSkillRegistry-PQWEXSFW.js} +1 -1
- package/{chromeOpsCommands-6RLEBBJJ.js → chromeOpsCommands-AA555ANS.js} +1 -1
- package/{chunk-LOXR4TQN.js → chunk-25GCVHBZ.js} +2 -2
- package/{chunk-A55E2OCP.js → chunk-26KL6533.js} +639 -125
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/{chunk-CUYFRVJF.js → chunk-2HF6DINU.js} +6 -6
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/{chunk-GMWZRXRM.js → chunk-3272HU62.js} +1 -1
- package/{chunk-43VT5PLM.js → chunk-3LL5HRIJ.js} +1 -1
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-T4V6C3J3.js → chunk-52M4RYVP.js} +1 -1
- package/{chunk-OQCAHPDQ.js → chunk-5QEOTC35.js} +4 -4
- package/{chunk-R7D5SRAZ.js → chunk-5UYDG6HP.js} +17 -0
- package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-UCMUXZJV.js → chunk-7XO73H5X.js} +111 -1
- package/{chunk-222CJNC2.js → chunk-BLBGVSLB.js} +3 -3
- package/{chunk-ZM5AZTQG.js → chunk-BTQU2PRC.js} +19 -7
- package/{chunk-QJ5YDTEF.js → chunk-BVCCRSGK.js} +42 -24
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/chunk-CGSIW2KI.js +594 -0
- package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
- package/{chunk-Q5KZ6F55.js → chunk-CSTCYYCR.js} +19 -17
- package/{chunk-D3E5MYXO.js → chunk-CYGFNMCH.js} +1 -1
- package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-MTS5DCL2.js → chunk-EG3JTV7H.js} +2 -2
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-D35TOEMM.js → chunk-EPBEZKYK.js} +137 -53
- package/{chunk-KJDN2YRH.js → chunk-EQJK6LSN.js} +4 -4
- package/{chunk-N3SEV3CG.js → chunk-F6GZFIGR.js} +79 -30
- package/{chunk-6UNJ6JGR.js → chunk-FJPVVLP3.js} +4 -4
- package/{chunk-L5HV76QT.js → chunk-FRC2DNTN.js} +1 -1
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-IFJ6OTI6.js → chunk-GJ4UTSAW.js} +33 -11
- package/{chunk-ZKKJZBNO.js → chunk-GUFTHWDO.js} +10 -10
- package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
- package/{chunk-W2N4OAKM.js → chunk-IQXMWBI6.js} +3 -3
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-PLS2MJVW.js → chunk-J4KLOLYP.js} +4 -4
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-CDIRKCPD.js → chunk-JX2IG37T.js} +153 -153
- package/{chunk-TGKAUEV3.js → chunk-K7RWY7JH.js} +14 -11
- package/{chunk-5IKKSJYX.js → chunk-KHYSFS3W.js} +76 -2
- package/{chunk-K5CIMK3R.js → chunk-KO6JNZCF.js} +115 -57
- package/{chunk-XJSEST7D.js → chunk-KQBGXCKM.js} +3 -3
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-HD5EKSLF.js → chunk-MDWHMQON.js} +3 -3
- package/{chunk-X337N4D6.js → chunk-MOAVLCCM.js} +4 -4
- package/{chunk-OARYOLF3.js → chunk-N2MDL5AZ.js} +12 -12
- package/{chunk-ZSRR6HCH.js → chunk-N2ZAY2DK.js} +1 -1
- package/{chunk-X3OZ655T.js → chunk-N7UXTVAR.js} +2 -2
- package/{chunk-KGOBJAWC.js → chunk-NJDOID7N.js} +207 -94
- package/{chunk-NTNX77FI.js → chunk-NRWZHHOB.js} +6 -6
- package/{chunk-3ZWJVKFB.js → chunk-NWZRCUHM.js} +84 -40
- package/{chunk-HQLCYPL4.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-IZWGO2ZS.js → chunk-OMIXG25B.js} +1 -1
- package/{chunk-CJ2BP6V7.js → chunk-OOV5JN25.js} +2 -2
- package/{chunk-3KWJPTVP.js → chunk-OQOXDQLB.js} +4 -4
- package/{chunk-LXKK7QFI.js → chunk-OTNPEE4G.js} +54 -24
- package/{chunk-LMMRWGGJ.js → chunk-OTOPQXP5.js} +2 -2
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
- package/{chunk-WZPG63Q4.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-SLUZ6FBJ.js → chunk-Q5M27DUE.js} +1 -1
- package/{chunk-XC5RPSXK.js → chunk-QV32GSVO.js} +2 -2
- package/{chunk-WQDTSK5U.js → chunk-REINTCQF.js} +8 -2
- package/{chunk-IXAGRTAR.js → chunk-SBBSUBY3.js} +1 -1
- package/{chunk-MTM4LRVG.js → chunk-SCY2O7CU.js} +2 -2
- package/{chunk-FAFDIQJG.js → chunk-U3ZK2MXG.js} +3 -3
- package/{chunk-PKMDYRAM.js → chunk-UDQZ5JT7.js} +175 -241
- package/{chunk-UR4ZMRV3.js → chunk-UGHNYYOE.js} +2 -2
- package/{chunk-KZVRPCOR.js → chunk-UTFTXJU3.js} +4 -4
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-U2OWDHDE.js → chunk-VH7AQEEF.js} +2 -2
- package/{chunk-QLGL43SI.js → chunk-VZWYP7LD.js} +2 -2
- package/{chunk-6XVPMGXK.js → chunk-W4S5FQWQ.js} +10 -4
- package/{chunk-KRAPKTAS.js → chunk-WJOC3AEM.js} +2 -2
- package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
- package/{chunk-JUYI2D7J.js → chunk-WNIBQBOR.js} +1 -1
- package/{chunk-BQ4CZEVZ.js → chunk-YWLMUFZ5.js} +1 -1
- package/{chunk-CD64YXRB.js → chunk-Z47UZT27.js} +1 -1
- package/{chunk-75TXQ4GY.js → chunk-ZMWDHPNG.js} +15 -29
- package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
- package/{cliAgentConfigHelpers-N6LTB7UY.js → cliAgentConfigHelpers-FKBPFPKR.js} +6 -6
- package/{cliLocalAgentRecordReader-NFNGYOOW.js → cliLocalAgentRecordReader-OHAC4JTY.js} +30 -29
- package/{commandRegistry-OM5DU4DS.js → commandRegistry-YQMAXCLP.js} +81 -81
- package/{contentThunks-7URM43ET.js → contentThunks-GSMUNWBA.js} +20 -20
- package/{cooldownCommands-JEEV75B7.js → cooldownCommands-PT5L4LNB.js} +3 -3
- package/{createAgentAutomationAction-GGEXIKMC.js → createAgentAutomationAction-RMADR4LG.js} +20 -20
- package/{createDialogAction-IXXEMFRQ.js → createDialogAction-CM5CBQVH.js} +21 -21
- package/{createPageAction-IXIVLIOO.js → createPageAction-JMGVMCTH.js} +21 -21
- package/{db-J5KE7XRI.js → db-VR74ADGC.js} +5 -1
- package/{dbSlice-IE4ADINL.js → dbSlice-Q637QR4L.js} +7 -7
- package/{deleteFile-ZCQESEEQ.js → deleteFile-TP6MKFUX.js} +10 -5
- package/{dialogCommands-RPBHOZB6.js → dialogCommands-ULWP5ASX.js} +35 -33
- package/{dialogNotifyCommand-ECKI5MMA.js → dialogNotifyCommand-JKYVSR6K.js} +7 -7
- package/{dialogSlice-5FQB2TNN.js → dialogSlice-ARQKXXTD.js} +18 -18
- package/{docCreateCommands-XJ2X57DW.js → docCreateCommands-ZJFHCZV4.js} +32 -30
- package/{docDeleteCommands-45WGFFEB.js → docDeleteCommands-LY5MF2BI.js} +33 -31
- package/{docReadCommands-LRRVDS46.js → docReadCommands-4X2DHCNZ.js} +32 -30
- package/{docStore-SUAVM24F.js → docStore-QWRVKIRI.js} +8 -8
- package/{docUpdateCommands-QUYX6BVR.js → docUpdateCommands-5TIT7DAJ.js} +32 -30
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-FDIWBQUB.js → handleSendMessageAction-TVR55KVT.js} +36 -36
- package/{hostCredentialCreate-CEXQHYT4.js → hostCredentialCreate-SIRXPUFR.js} +68 -67
- package/index.js +8 -8
- package/{localDialogRead-USDZXKIL.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-O3JBRK6S.js → localRuntimeAdapter-VRB5EDDZ.js} +67 -66
- package/{machineCommands-I3YA7TNC.js → machineCommands-MG3BB6XM.js} +68 -67
- package/{machineWsRunDispatch-E5CIE2OJ.js → machineWsRunDispatch-3TOO3NCU.js} +68 -67
- package/{mcpLocalAuthorizeCommand-K5J2VMG6.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +6 -6
- package/{memberThunks-T7EAZE6A.js → memberThunks-IGYRMEQC.js} +9 -9
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-A7E65AZO.js → projectArchive-Q46BYZQ6.js} +21 -21
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-MPPXZHAO.js} +10 -5
- package/{readDocTool-N7RVFQEE.js → readDocTool-PKZ35PCR.js} +1 -1
- package/{readlineWorkspace-2O65NBFG.js → readlineWorkspace-RBH6PSE7.js} +613 -209
- package/{removeDialogAgentAction-GRT72HLK.js → removeDialogAgentAction-H6S7VLNA.js} +9 -9
- package/{runAgentClientLoop-NWCZIXCG.js → runAgentClientLoop-WZJ4HXOH.js} +44 -44
- package/{runtimeDoctorCommands-26HYHFTK.js → runtimeDoctorCommands-QGZSKNSE.js} +5 -5
- package/{secretCommands-XR72SHLK.js → secretCommands-BXAQEOES.js} +2 -2
- package/{setDialogExtraReferencesAction-CBG3X46B.js → setDialogExtraReferencesAction-CARUTAWS.js} +8 -8
- package/{setPrimaryDialogAgentAction-EWTDZOAX.js → setPrimaryDialogAgentAction-VRV56MLG.js} +9 -9
- package/{settingThunks-X4PT66J2.js → settingThunks-4FC4HXGN.js} +7 -7
- package/{spaceCommands-EVSNTGRS.js → spaceCommands-27Z5JAU3.js} +31 -29
- package/{streamAgentChatTurn-SYP3OEM5.js → streamAgentChatTurn-JKMBFM2O.js} +57 -53
- package/{switchDialogAgentAction-YHPZ7K6E.js → switchDialogAgentAction-O236K6HB.js} +7 -7
- package/{tableCommands-44GC4N6J.js → tableCommands-C3P2HHKK.js} +2 -2
- package/{tools-2AO2SK4L.js → tools-4RFLNHUW.js} +37 -37
- package/{tuiRestart-HBQDF4AE.js → tuiRestart-GF4DGAAN.js} +7 -7
- package/{tuiSummaryLlmCaller-Q2PNR63K.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
- package/{updateCommands-6SI7NWVC.js → updateCommands-BZ4YDHNM.js} +3 -3
- package/{updateDialogTitleAction-MWVMBIPZ.js → updateDialogTitleAction-F3ONQM3N.js} +20 -20
- package/{usageCommand-D44AOTMH.js → usageCommand-XVJ7ZUTM.js} +1 -1
- package/{usageRebuildCommand-IRIMKDI5.js → usageRebuildCommand-NK6S3D4J.js} +2 -2
- package/{windowsSelfUpdate-BJIJKKIS.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
- package/{chunk-YHNUDTU4.js → chunk-VYRTLHIT.js} +3 -3
- package/{dialogUsageCommand-TBIA2QAF.js → dialogUsageCommand-IHAXS7DW.js} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAuthGuidanceState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4YPH5KRA.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchCiStatus,
|
|
6
6
|
summarizeLatest
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getRestartBlocker,
|
|
10
10
|
hasRestartBlockingRuns
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WNIBQBOR.js";
|
|
12
12
|
import {
|
|
13
13
|
runAnthropicOAuthLogin,
|
|
14
14
|
runCursorOAuthLogin,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
runXaiOAuthDeviceCode,
|
|
17
17
|
runXaiOAuthLogin,
|
|
18
18
|
syncCredentialToServer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5QEOTC35.js";
|
|
20
20
|
import {
|
|
21
21
|
createAccountSessionCore,
|
|
22
22
|
createDeviceAuthorizationProtocol,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
listRemoteAgents,
|
|
32
32
|
listRemoteAgentsAcrossServers,
|
|
33
33
|
normalizeListedAgent
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BLBGVSLB.js";
|
|
35
35
|
import {
|
|
36
36
|
runCloudflareOAuthLogin
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3272HU62.js";
|
|
38
38
|
import {
|
|
39
39
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
40
40
|
MAX_URL_LENGTH,
|
|
@@ -112,8 +112,9 @@ import {
|
|
|
112
112
|
themeColorSequence,
|
|
113
113
|
themeText,
|
|
114
114
|
toolRowDetailLine,
|
|
115
|
-
tuiRenderThemeFingerprint
|
|
116
|
-
|
|
115
|
+
tuiRenderThemeFingerprint,
|
|
116
|
+
userBubbleSurfaceBackgroundSequence
|
|
117
|
+
} from "./chunk-F6GZFIGR.js";
|
|
117
118
|
import "./chunk-6QDYSCPW.js";
|
|
118
119
|
import "./chunk-GAHJLSDO.js";
|
|
119
120
|
import {
|
|
@@ -137,7 +138,7 @@ import {
|
|
|
137
138
|
renderNoticeElements,
|
|
138
139
|
resolveNoticeTitle,
|
|
139
140
|
setTurnNoticeMeta
|
|
140
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-NJDOID7N.js";
|
|
141
142
|
import {
|
|
142
143
|
createHostApprovalCardQueue,
|
|
143
144
|
formatApprovalRemaining,
|
|
@@ -169,8 +170,8 @@ import {
|
|
|
169
170
|
wrapTextToLines,
|
|
170
171
|
wrapTranscriptLine,
|
|
171
172
|
wrapTranscriptLineWithLayout
|
|
172
|
-
} from "./chunk-
|
|
173
|
-
import "./chunk-
|
|
173
|
+
} from "./chunk-QV32GSVO.js";
|
|
174
|
+
import "./chunk-GIXWVN2W.js";
|
|
174
175
|
import {
|
|
175
176
|
DIALOG_NOTIFY_SOURCE,
|
|
176
177
|
ensureDialogNotifyDir,
|
|
@@ -182,8 +183,8 @@ import {
|
|
|
182
183
|
resolveDialogNotifyRoot,
|
|
183
184
|
writeAck,
|
|
184
185
|
writeLease
|
|
185
|
-
} from "./chunk-
|
|
186
|
-
import "./chunk-
|
|
186
|
+
} from "./chunk-CYGFNMCH.js";
|
|
187
|
+
import "./chunk-PENRYZ4D.js";
|
|
187
188
|
import "./chunk-U6RD332P.js";
|
|
188
189
|
import "./chunk-WOAZVUSN.js";
|
|
189
190
|
import "./chunk-VIWDGTDA.js";
|
|
@@ -198,10 +199,10 @@ import "./chunk-324FWHUA.js";
|
|
|
198
199
|
import {
|
|
199
200
|
defaultPromptReader,
|
|
200
201
|
setSecret
|
|
201
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-52M4RYVP.js";
|
|
202
203
|
import {
|
|
203
204
|
createTuiSummaryLlmCaller
|
|
204
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-OB4FBZXJ.js";
|
|
205
206
|
import "./chunk-OYUMJMC5.js";
|
|
206
207
|
import "./chunk-R7XWZDOH.js";
|
|
207
208
|
import "./chunk-S73EPYNC.js";
|
|
@@ -213,29 +214,28 @@ import {
|
|
|
213
214
|
} from "./chunk-PRJ473FK.js";
|
|
214
215
|
import "./chunk-BMQ2MJUK.js";
|
|
215
216
|
import "./chunk-ATNTHIZI.js";
|
|
216
|
-
import "./chunk-
|
|
217
|
+
import "./chunk-UGHNYYOE.js";
|
|
217
218
|
import "./chunk-JEXVIMYZ.js";
|
|
218
219
|
import {
|
|
219
220
|
prepareTools
|
|
220
|
-
} from "./chunk-
|
|
221
|
-
import "./chunk-
|
|
222
|
-
import "./chunk-
|
|
223
|
-
import "./chunk-
|
|
224
|
-
import "./chunk-AMWMV56B.js";
|
|
221
|
+
} from "./chunk-EPBEZKYK.js";
|
|
222
|
+
import "./chunk-KZ4A7EIV.js";
|
|
223
|
+
import "./chunk-NWZRCUHM.js";
|
|
224
|
+
import "./chunk-HF4C5WIU.js";
|
|
225
225
|
import "./chunk-MVOZ22RZ.js";
|
|
226
226
|
import "./chunk-VZCBYCHV.js";
|
|
227
|
-
import "./chunk-
|
|
227
|
+
import "./chunk-GUFTHWDO.js";
|
|
228
228
|
import "./chunk-NF64D32W.js";
|
|
229
229
|
import "./chunk-WMMKHEGQ.js";
|
|
230
230
|
import "./chunk-WDWZPASX.js";
|
|
231
|
-
import "./chunk-
|
|
232
|
-
import "./chunk-
|
|
231
|
+
import "./chunk-U3ZK2MXG.js";
|
|
232
|
+
import "./chunk-WJOC3AEM.js";
|
|
233
233
|
import "./chunk-VF4K2QE6.js";
|
|
234
|
-
import "./chunk-
|
|
235
|
-
import "./chunk-
|
|
236
|
-
import "./chunk-
|
|
237
|
-
import "./chunk-
|
|
238
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-3LL5HRIJ.js";
|
|
235
|
+
import "./chunk-Z47UZT27.js";
|
|
236
|
+
import "./chunk-KQBGXCKM.js";
|
|
237
|
+
import "./chunk-MOAVLCCM.js";
|
|
238
|
+
import "./chunk-K7RWY7JH.js";
|
|
239
239
|
import {
|
|
240
240
|
createChatQueueRuntime,
|
|
241
241
|
createTurnRequest,
|
|
@@ -243,28 +243,28 @@ import {
|
|
|
243
243
|
historyTokensBeforeLatestAssistant,
|
|
244
244
|
initialChatQueueState,
|
|
245
245
|
normalizeRunCompletionShape
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-26KL6533.js";
|
|
247
247
|
import "./chunk-TZXPT53C.js";
|
|
248
248
|
import "./chunk-BUDVRYES.js";
|
|
249
249
|
import {
|
|
250
250
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
251
251
|
BUILTIN_SUMMARY_LLM_CONFIG
|
|
252
252
|
} from "./chunk-523DITKR.js";
|
|
253
|
-
import "./chunk-
|
|
254
|
-
import "./chunk-
|
|
253
|
+
import "./chunk-BVCCRSGK.js";
|
|
254
|
+
import "./chunk-SBBSUBY3.js";
|
|
255
255
|
import "./chunk-BYXBJQAS.js";
|
|
256
|
-
import "./chunk-
|
|
256
|
+
import "./chunk-MDWHMQON.js";
|
|
257
257
|
import {
|
|
258
258
|
getActiveDialogAgentId
|
|
259
259
|
} from "./chunk-5RGU3J7P.js";
|
|
260
260
|
import "./chunk-UVLYNWIE.js";
|
|
261
261
|
import "./chunk-YNIYE47Z.js";
|
|
262
|
-
import "./chunk-
|
|
263
|
-
import "./chunk-
|
|
262
|
+
import "./chunk-SCY2O7CU.js";
|
|
263
|
+
import "./chunk-VZWYP7LD.js";
|
|
264
264
|
import "./chunk-UAD2WT54.js";
|
|
265
|
-
import "./chunk-
|
|
265
|
+
import "./chunk-GJ4UTSAW.js";
|
|
266
266
|
import "./chunk-3PVYUPXK.js";
|
|
267
|
-
import "./chunk-
|
|
267
|
+
import "./chunk-N7UXTVAR.js";
|
|
268
268
|
import {
|
|
269
269
|
getDefaultCliLocalRuntimeDb
|
|
270
270
|
} from "./chunk-7RYODZDD.js";
|
|
@@ -274,23 +274,24 @@ import {
|
|
|
274
274
|
normalizeDialogRecord,
|
|
275
275
|
readDialogSnapshot,
|
|
276
276
|
sortDialogs
|
|
277
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-NRWZHHOB.js";
|
|
278
278
|
import "./chunk-ID4G2MAR.js";
|
|
279
279
|
import {
|
|
280
280
|
listUserRecordsFromServers,
|
|
281
281
|
readLiveDbRecordAfterTombstoneMerge
|
|
282
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-YWLMUFZ5.js";
|
|
283
283
|
import "./chunk-Y5GCAMGP.js";
|
|
284
284
|
import {
|
|
285
285
|
loadLocalRunChildDialogIds
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-N2ZAY2DK.js";
|
|
287
287
|
import "./chunk-LKZPX6YH.js";
|
|
288
288
|
import {
|
|
289
289
|
deleteDbRecord,
|
|
290
290
|
queryUserRecords,
|
|
291
291
|
readDbRecord
|
|
292
|
-
} from "./chunk-
|
|
293
|
-
import "./chunk-
|
|
292
|
+
} from "./chunk-EQJK6LSN.js";
|
|
293
|
+
import "./chunk-CGSIW2KI.js";
|
|
294
|
+
import "./chunk-AMWMV56B.js";
|
|
294
295
|
import "./chunk-DXWGFL2Z.js";
|
|
295
296
|
import "./chunk-3L2WKC3W.js";
|
|
296
297
|
import {
|
|
@@ -303,7 +304,7 @@ import {
|
|
|
303
304
|
listRunRecordsAsync,
|
|
304
305
|
readRunRecord,
|
|
305
306
|
runAgentStopCommand
|
|
306
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-7XO73H5X.js";
|
|
307
308
|
import {
|
|
308
309
|
clipText,
|
|
309
310
|
formatDuration,
|
|
@@ -319,11 +320,11 @@ import "./chunk-KQHEGELM.js";
|
|
|
319
320
|
import "./chunk-QYPE3TS3.js";
|
|
320
321
|
import "./chunk-U35UUM5K.js";
|
|
321
322
|
import "./chunk-RD3QLZQV.js";
|
|
322
|
-
import "./chunk-
|
|
323
|
-
import "./chunk-
|
|
323
|
+
import "./chunk-BTQU2PRC.js";
|
|
324
|
+
import "./chunk-REINTCQF.js";
|
|
324
325
|
import "./chunk-UEILX4EV.js";
|
|
325
|
-
import "./chunk-
|
|
326
|
-
import "./chunk-
|
|
326
|
+
import "./chunk-W4S5FQWQ.js";
|
|
327
|
+
import "./chunk-VYRTLHIT.js";
|
|
327
328
|
import {
|
|
328
329
|
isExternalSessionKind
|
|
329
330
|
} from "./chunk-YJPK35HB.js";
|
|
@@ -345,10 +346,10 @@ import "./chunk-CVMMWN6P.js";
|
|
|
345
346
|
import "./chunk-GLKOYSRU.js";
|
|
346
347
|
import {
|
|
347
348
|
readDialogMessageRecords
|
|
348
|
-
} from "./chunk-
|
|
349
|
-
import "./chunk-
|
|
349
|
+
} from "./chunk-OQOXDQLB.js";
|
|
350
|
+
import "./chunk-D3WOFN6N.js";
|
|
350
351
|
import "./chunk-JP2BH4NC.js";
|
|
351
|
-
import "./chunk-
|
|
352
|
+
import "./chunk-64ACTEAE.js";
|
|
352
353
|
import {
|
|
353
354
|
RUN_WAKE_CHANNEL_ENV,
|
|
354
355
|
buildLoadSkillExecutor,
|
|
@@ -366,20 +367,20 @@ import {
|
|
|
366
367
|
runTaskStop,
|
|
367
368
|
saveCliPendingUserMessages,
|
|
368
369
|
validateStoredSummary
|
|
369
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-UDQZ5JT7.js";
|
|
370
371
|
import "./chunk-ZNFJWEN4.js";
|
|
371
372
|
import "./chunk-LHCGKAFO.js";
|
|
372
|
-
import "./chunk-
|
|
373
|
-
import "./chunk-
|
|
373
|
+
import "./chunk-OOV5JN25.js";
|
|
374
|
+
import "./chunk-2E4BYAUE.js";
|
|
374
375
|
import "./chunk-AL3TYDIF.js";
|
|
375
376
|
import "./chunk-CHOZJMJS.js";
|
|
376
|
-
import "./chunk-
|
|
377
|
+
import "./chunk-PIVTQRX6.js";
|
|
377
378
|
import "./chunk-HNUWUO75.js";
|
|
378
379
|
import "./chunk-DMPZMYH4.js";
|
|
379
|
-
import "./chunk-
|
|
380
|
+
import "./chunk-OTOPQXP5.js";
|
|
380
381
|
import "./chunk-BYXBJQAS.js";
|
|
381
|
-
import "./chunk-
|
|
382
|
-
import "./chunk-
|
|
382
|
+
import "./chunk-BZLGPM5B.js";
|
|
383
|
+
import "./chunk-WLHUANWZ.js";
|
|
383
384
|
import "./chunk-56GBUMO5.js";
|
|
384
385
|
import {
|
|
385
386
|
TOOL_GUIDED_SECTION_ORDER,
|
|
@@ -388,24 +389,24 @@ import {
|
|
|
388
389
|
buildRuntimeGuidanceBlocks,
|
|
389
390
|
resolveResponseGuidelines,
|
|
390
391
|
resolveToolGuidedSections
|
|
391
|
-
} from "./chunk-
|
|
392
|
-
import "./chunk-
|
|
392
|
+
} from "./chunk-OTNPEE4G.js";
|
|
393
|
+
import "./chunk-ZMXO5G3E.js";
|
|
393
394
|
import {
|
|
394
395
|
classifyFailureSubclass,
|
|
395
396
|
formatQuotaSummary
|
|
396
|
-
} from "./chunk-
|
|
397
|
-
import "./chunk-
|
|
397
|
+
} from "./chunk-LS5KAVFQ.js";
|
|
398
|
+
import "./chunk-FXEPZKNJ.js";
|
|
398
399
|
import "./chunk-X4O7FJF5.js";
|
|
399
400
|
import "./chunk-TLE77UJ5.js";
|
|
400
401
|
import {
|
|
401
402
|
scrubSecrets
|
|
402
|
-
} from "./chunk-
|
|
403
|
+
} from "./chunk-JX2IG37T.js";
|
|
403
404
|
import "./chunk-KXOPLLFP.js";
|
|
404
|
-
import "./chunk-
|
|
405
|
+
import "./chunk-DNNPARJK.js";
|
|
405
406
|
import "./chunk-2MBTWINN.js";
|
|
406
407
|
import {
|
|
407
408
|
extractReferenceKeysFromMessage
|
|
408
|
-
} from "./chunk-
|
|
409
|
+
} from "./chunk-CIAV4WK2.js";
|
|
409
410
|
import "./chunk-5ZUL4CUO.js";
|
|
410
411
|
import {
|
|
411
412
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -422,7 +423,7 @@ import {
|
|
|
422
423
|
planCompression,
|
|
423
424
|
runSummaryWithContract,
|
|
424
425
|
serializeMessageContent
|
|
425
|
-
} from "./chunk-
|
|
426
|
+
} from "./chunk-2FZVXOFX.js";
|
|
426
427
|
import "./chunk-H57T64RA.js";
|
|
427
428
|
import "./chunk-UKZX3NHN.js";
|
|
428
429
|
import {
|
|
@@ -442,13 +443,14 @@ import {
|
|
|
442
443
|
import {
|
|
443
444
|
estimateTokenCount
|
|
444
445
|
} from "./chunk-PSCNXBYA.js";
|
|
446
|
+
import "./chunk-IVK2KT3H.js";
|
|
445
447
|
import {
|
|
446
448
|
compactWhitespace
|
|
447
449
|
} from "./chunk-DWLEOOGR.js";
|
|
448
|
-
import "./chunk-OW765XBU.js";
|
|
449
450
|
import {
|
|
450
451
|
isAbortError
|
|
451
452
|
} from "./chunk-7DPNBQSV.js";
|
|
453
|
+
import "./chunk-OW765XBU.js";
|
|
452
454
|
import {
|
|
453
455
|
buildMemoryOverlayLayer,
|
|
454
456
|
buildMemoryUseGuidanceLayer,
|
|
@@ -471,7 +473,7 @@ import {
|
|
|
471
473
|
import {
|
|
472
474
|
expandEnabledPacks,
|
|
473
475
|
listBuiltinSkills
|
|
474
|
-
} from "./chunk-
|
|
476
|
+
} from "./chunk-ZMWDHPNG.js";
|
|
475
477
|
import "./chunk-EUGTFFO6.js";
|
|
476
478
|
import {
|
|
477
479
|
parseExternalSkillMarkdown
|
|
@@ -483,14 +485,14 @@ import "./chunk-OJKUU3LP.js";
|
|
|
483
485
|
import "./chunk-YZMNK53S.js";
|
|
484
486
|
import {
|
|
485
487
|
resolveLocalUserId
|
|
486
|
-
} from "./chunk-
|
|
488
|
+
} from "./chunk-OMIXG25B.js";
|
|
487
489
|
import {
|
|
488
490
|
CURRENT_OPERATOR_USER_ID,
|
|
489
491
|
NOLO_DEFAULT_AGENT_KEY,
|
|
490
492
|
resolveCliAgentKeyInput
|
|
491
493
|
} from "./chunk-BR3GT6MR.js";
|
|
492
494
|
import "./chunk-JCQ3WCQ3.js";
|
|
493
|
-
import "./chunk-
|
|
495
|
+
import "./chunk-UUCYUN6Y.js";
|
|
494
496
|
import {
|
|
495
497
|
canonicalizeToolNames
|
|
496
498
|
} from "./chunk-YLAHYLDQ.js";
|
|
@@ -506,7 +508,7 @@ import {
|
|
|
506
508
|
parsePublicAgentId
|
|
507
509
|
} from "./chunk-M2EJHDJP.js";
|
|
508
510
|
import "./chunk-I42VC5KR.js";
|
|
509
|
-
import "./chunk-
|
|
511
|
+
import "./chunk-P4R5KXU7.js";
|
|
510
512
|
import "./chunk-VIDPVFP3.js";
|
|
511
513
|
import "./chunk-4JH2UMJR.js";
|
|
512
514
|
import "./chunk-U6VC4MU4.js";
|
|
@@ -521,7 +523,7 @@ import {
|
|
|
521
523
|
getCliInstallChannel,
|
|
522
524
|
probeCliUpdate,
|
|
523
525
|
runSelfUpdateDetailed
|
|
524
|
-
} from "./chunk-
|
|
526
|
+
} from "./chunk-EG3JTV7H.js";
|
|
525
527
|
import {
|
|
526
528
|
parseUserIdFromAuthToken,
|
|
527
529
|
resolveAuthToken,
|
|
@@ -550,7 +552,7 @@ import {
|
|
|
550
552
|
resolveDefaultSpawn,
|
|
551
553
|
spawnProcess
|
|
552
554
|
} from "./chunk-4O22PGNQ.js";
|
|
553
|
-
import "./chunk-
|
|
555
|
+
import "./chunk-FRC2DNTN.js";
|
|
554
556
|
import {
|
|
555
557
|
dailyWelcomeTip,
|
|
556
558
|
getCliLocale,
|
|
@@ -560,19 +562,19 @@ import {
|
|
|
560
562
|
t,
|
|
561
563
|
toolFamilyOf,
|
|
562
564
|
toolLabelVariants
|
|
563
|
-
} from "./chunk-
|
|
564
|
-
import "./chunk-
|
|
565
|
-
import "./chunk-
|
|
565
|
+
} from "./chunk-5UYDG6HP.js";
|
|
566
|
+
import "./chunk-EJQE5HB7.js";
|
|
567
|
+
import "./chunk-6SOWMEAY.js";
|
|
566
568
|
import {
|
|
567
569
|
toErrorMessage
|
|
568
570
|
} from "./chunk-HNMXYYJR.js";
|
|
569
571
|
import {
|
|
570
572
|
resolvePlatformAuthToken
|
|
571
|
-
} from "./chunk-
|
|
572
|
-
import "./chunk-
|
|
573
|
+
} from "./chunk-LVZVSLKO.js";
|
|
574
|
+
import "./chunk-2JHGUL5K.js";
|
|
573
575
|
import "./chunk-3EUW3WEO.js";
|
|
574
576
|
import "./chunk-WWC7I6TA.js";
|
|
575
|
-
import "./chunk-
|
|
577
|
+
import "./chunk-OKH74FML.js";
|
|
576
578
|
import "./chunk-JRTNUU5Z.js";
|
|
577
579
|
import {
|
|
578
580
|
isRecord
|
|
@@ -586,7 +588,7 @@ import {
|
|
|
586
588
|
} from "./chunk-CF7PE763.js";
|
|
587
589
|
import {
|
|
588
590
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
|
|
589
|
-
} from "./chunk-
|
|
591
|
+
} from "./chunk-JPXACKSW.js";
|
|
590
592
|
import {
|
|
591
593
|
asTrimmedLowercaseString
|
|
592
594
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1915,19 +1917,48 @@ function autoScrollStepForTicks(ticks) {
|
|
|
1915
1917
|
if (ticks >= 8) return 3;
|
|
1916
1918
|
return 1;
|
|
1917
1919
|
}
|
|
1918
|
-
function
|
|
1919
|
-
if (totalLines <= visibleHeight) return
|
|
1920
|
+
function computeScrollbarGeometry(visibleHeight, totalLines, scrollTop) {
|
|
1921
|
+
if (visibleHeight <= 0 || totalLines <= visibleHeight) return null;
|
|
1920
1922
|
const trackHeight = visibleHeight;
|
|
1921
1923
|
const thumbSize = Math.max(
|
|
1922
1924
|
1,
|
|
1923
1925
|
Math.floor(visibleHeight * visibleHeight / totalLines)
|
|
1924
1926
|
);
|
|
1925
1927
|
const maxScrollTop = totalLines - visibleHeight;
|
|
1928
|
+
const clampedScrollTop = Math.max(0, Math.min(maxScrollTop, scrollTop));
|
|
1926
1929
|
const thumbTop = Math.floor(
|
|
1927
|
-
|
|
1930
|
+
clampedScrollTop / maxScrollTop * (trackHeight - thumbSize)
|
|
1928
1931
|
);
|
|
1929
|
-
|
|
1930
|
-
|
|
1932
|
+
return {
|
|
1933
|
+
trackHeight,
|
|
1934
|
+
thumbSize,
|
|
1935
|
+
thumbTop,
|
|
1936
|
+
thumbBottom: thumbTop + thumbSize,
|
|
1937
|
+
maxScrollTop
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
function isScrollbarColumnHit(screenCol, columns, marginRight = 0) {
|
|
1941
|
+
if (columns <= 0) return false;
|
|
1942
|
+
const firstHitCol = Math.max(0, columns - 1 - Math.max(0, marginRight));
|
|
1943
|
+
return screenCol >= firstHitCol && screenCol < columns;
|
|
1944
|
+
}
|
|
1945
|
+
function scrollTopFromScrollbarDrag(rowIndex, grabOffset, visibleHeight, totalLines) {
|
|
1946
|
+
const geom = computeScrollbarGeometry(visibleHeight, totalLines, 0);
|
|
1947
|
+
if (!geom) return 0;
|
|
1948
|
+
const movableTrack = geom.trackHeight - geom.thumbSize;
|
|
1949
|
+
if (movableTrack <= 0) {
|
|
1950
|
+
return rowIndex <= 0 ? 0 : geom.maxScrollTop;
|
|
1951
|
+
}
|
|
1952
|
+
const desiredThumbTop = Math.max(
|
|
1953
|
+
0,
|
|
1954
|
+
Math.min(movableTrack, rowIndex - grabOffset)
|
|
1955
|
+
);
|
|
1956
|
+
return Math.round(desiredThumbTop / movableTrack * geom.maxScrollTop);
|
|
1957
|
+
}
|
|
1958
|
+
function renderScrollbarRow(rowIndex, visibleHeight, totalLines, scrollTop) {
|
|
1959
|
+
const geom = computeScrollbarGeometry(visibleHeight, totalLines, scrollTop);
|
|
1960
|
+
if (!geom) return " ";
|
|
1961
|
+
if (rowIndex >= geom.thumbTop && rowIndex < geom.thumbBottom) {
|
|
1931
1962
|
return "\u2588";
|
|
1932
1963
|
}
|
|
1933
1964
|
return "\u2502";
|
|
@@ -2687,10 +2718,11 @@ function styleAssistantTurn(content, colorEnabled, state = assistantLayoutState(
|
|
|
2687
2718
|
Object.assign(state, { anchored, inToolBlock });
|
|
2688
2719
|
return styledLines.join("\n");
|
|
2689
2720
|
}
|
|
2721
|
+
var USER_BUBBLE_RIGHT_PAD = 2;
|
|
2690
2722
|
function gutterForRole(role, colorEnabled) {
|
|
2691
2723
|
if (role === "user") {
|
|
2692
2724
|
const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
|
|
2693
|
-
const prefix = colorEnabled ? `${accentSeq}\x1B[1m\
|
|
2725
|
+
const prefix = colorEnabled ? `${accentSeq}\x1B[1m\u258C \x1B[0m` : "\u258C ";
|
|
2694
2726
|
return { prefix, prefixWidth: 3 };
|
|
2695
2727
|
}
|
|
2696
2728
|
if (role === "local") {
|
|
@@ -2731,9 +2763,10 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command, stat
|
|
|
2731
2763
|
if (role === "user") {
|
|
2732
2764
|
const logicalLines = content.split("\n");
|
|
2733
2765
|
const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
|
|
2734
|
-
const
|
|
2735
|
-
const
|
|
2736
|
-
const
|
|
2766
|
+
const surfaceSeq = colorEnabled ? userBubbleSurfaceBackgroundSequence() : "";
|
|
2767
|
+
const firstPrefix = colorEnabled ? `${accentSeq}\x1B[1m\u258C \x1B[0m` : "\u258C ";
|
|
2768
|
+
const multilinePrefix = colorEnabled ? `${accentSeq}\x1B[1m\u258C \x1B[0m` : "\u258C ";
|
|
2769
|
+
const hangingIndent = colorEnabled ? `${accentSeq}\x1B[1m\u258C \x1B[0m` : "\u258C ";
|
|
2737
2770
|
const boldOn = colorEnabled ? "\x1B[1m" : "";
|
|
2738
2771
|
const boldOff = colorEnabled ? "\x1B[22m" : "";
|
|
2739
2772
|
const fgOff = colorEnabled ? "\x1B[39m" : "";
|
|
@@ -2766,7 +2799,23 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command, stat
|
|
|
2766
2799
|
}
|
|
2767
2800
|
lineSourceStart += line.length + 1;
|
|
2768
2801
|
}
|
|
2769
|
-
|
|
2802
|
+
const baseRows = rows2.length > 0 ? rows2 : [{ rendered: firstPrefix, sourceStart: 0, sourceEnd: 0, prefixWidth: 3 }];
|
|
2803
|
+
if (!surfaceSeq) return baseRows;
|
|
2804
|
+
let maxRowWidth = 0;
|
|
2805
|
+
for (const row of baseRows) {
|
|
2806
|
+
const width = visibleWidth(row.rendered);
|
|
2807
|
+
if (width > maxRowWidth) maxRowWidth = width;
|
|
2808
|
+
}
|
|
2809
|
+
const bubbleWidth = Math.min(contentWidth, maxRowWidth + USER_BUBBLE_RIGHT_PAD);
|
|
2810
|
+
return baseRows.map((row) => ({
|
|
2811
|
+
...row,
|
|
2812
|
+
rendered: renderSurfaceLine({
|
|
2813
|
+
text: row.rendered,
|
|
2814
|
+
surface: surfaceSeq,
|
|
2815
|
+
padTo: bubbleWidth
|
|
2816
|
+
}),
|
|
2817
|
+
compactSurface: true
|
|
2818
|
+
}));
|
|
2770
2819
|
}
|
|
2771
2820
|
if (role === "local") {
|
|
2772
2821
|
const dimSeq = colorEnabled ? "\x1B[2m" : "";
|
|
@@ -2918,6 +2967,7 @@ function layoutLayoutRowEqual(a, b) {
|
|
|
2918
2967
|
if (a.prefixWidth !== b.prefixWidth) return false;
|
|
2919
2968
|
if ((a.softWrapped ?? false) !== (b.softWrapped ?? false)) return false;
|
|
2920
2969
|
if ((a.softWrapJoiner ?? "") !== (b.softWrapJoiner ?? "")) return false;
|
|
2970
|
+
if ((a.compactSurface ?? false) !== (b.compactSurface ?? false)) return false;
|
|
2921
2971
|
const ma = a.sourceMapping;
|
|
2922
2972
|
const mb = b.sourceMapping;
|
|
2923
2973
|
if (ma || mb) {
|
|
@@ -3115,7 +3165,8 @@ function countTurnLines(role, content, contentWidth, command, options) {
|
|
|
3115
3165
|
}
|
|
3116
3166
|
function turnSeparatorRows(prevRole, role) {
|
|
3117
3167
|
if (prevRole === null) return 0;
|
|
3118
|
-
if (role === "user"
|
|
3168
|
+
if (role === "user") return 2;
|
|
3169
|
+
if (role === "local") return 1;
|
|
3119
3170
|
if (role === "assistant") {
|
|
3120
3171
|
return prevRole === "user" || prevRole === "local" ? 1 : 0;
|
|
3121
3172
|
}
|
|
@@ -3317,16 +3368,18 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3317
3368
|
const themeFingerprint = tuiRenderThemeFingerprint(colorEnabled);
|
|
3318
3369
|
const graphicsEnabled = history.graphicsEnabled === true;
|
|
3319
3370
|
const { entries, totalLines: finalizedLines } = buildTurnOffsets(history, contentWidth);
|
|
3371
|
+
let currentLayoutRows = [];
|
|
3320
3372
|
let currentLines = [];
|
|
3321
3373
|
let currentStart = -1;
|
|
3322
3374
|
if (history.currentRole !== null && history.currentContent) {
|
|
3323
|
-
|
|
3375
|
+
currentLayoutRows = computeStreamingTurnLayoutRows(
|
|
3324
3376
|
history.currentRole,
|
|
3325
3377
|
history.currentContent,
|
|
3326
3378
|
contentWidth,
|
|
3327
3379
|
colorEnabled,
|
|
3328
3380
|
themeFingerprint
|
|
3329
3381
|
);
|
|
3382
|
+
currentLines = currentLayoutRows.map((r) => r.rendered);
|
|
3330
3383
|
const sep = currentTurnSeparator(history);
|
|
3331
3384
|
currentStart = finalizedLines + sep;
|
|
3332
3385
|
}
|
|
@@ -3344,6 +3397,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3344
3397
|
const winStart = history.scrollTop;
|
|
3345
3398
|
const winEnd = Math.min(totalLines, winStart + visibleHeight);
|
|
3346
3399
|
let visibleLines = new Array(visibleHeight).fill("");
|
|
3400
|
+
const visibleCompactSurface = new Array(visibleHeight).fill(false);
|
|
3347
3401
|
const visibleImages = [];
|
|
3348
3402
|
for (let i = 0; i < entries.length; i++) {
|
|
3349
3403
|
const entry = entries[i];
|
|
@@ -3351,6 +3405,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3351
3405
|
const sepRow = entry.startRow - s;
|
|
3352
3406
|
if (sepRow >= winStart && sepRow < winEnd) {
|
|
3353
3407
|
visibleLines[sepRow - winStart] = "";
|
|
3408
|
+
visibleCompactSurface[sepRow - winStart] = false;
|
|
3354
3409
|
}
|
|
3355
3410
|
}
|
|
3356
3411
|
const turnStart = entry.startRow;
|
|
@@ -3376,6 +3431,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3376
3431
|
const interEnd = Math.min(turnEnd, winEnd);
|
|
3377
3432
|
for (let r = interStart; r < interEnd; r++) {
|
|
3378
3433
|
visibleLines[r - winStart] = lines[r - turnStart] ?? "";
|
|
3434
|
+
visibleCompactSurface[r - winStart] = layoutRows[r - turnStart]?.compactSurface === true;
|
|
3379
3435
|
}
|
|
3380
3436
|
if (options?.onVisibleImages) {
|
|
3381
3437
|
collectVisibleImageRows(layoutRows, i, turnStart, winStart, winEnd, visibleImages);
|
|
@@ -3387,6 +3443,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3387
3443
|
const sepRow = currentStart - s;
|
|
3388
3444
|
if (sepRow >= winStart && sepRow < winEnd) {
|
|
3389
3445
|
visibleLines[sepRow - winStart] = "";
|
|
3446
|
+
visibleCompactSurface[sepRow - winStart] = false;
|
|
3390
3447
|
}
|
|
3391
3448
|
}
|
|
3392
3449
|
const currentEnd = currentStart + currentLines.length;
|
|
@@ -3395,6 +3452,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3395
3452
|
const interEnd = Math.min(currentEnd, winEnd);
|
|
3396
3453
|
for (let r = interStart; r < interEnd; r++) {
|
|
3397
3454
|
visibleLines[r - winStart] = currentLines[r - currentStart] ?? "";
|
|
3455
|
+
visibleCompactSurface[r - winStart] = currentLayoutRows[r - currentStart]?.compactSurface === true;
|
|
3398
3456
|
}
|
|
3399
3457
|
}
|
|
3400
3458
|
}
|
|
@@ -3411,30 +3469,49 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3411
3469
|
const isGeometryCompatible = prevBuffer !== void 0 && prevBuffer.rows === rows && prevBuffer.columns === columns && prevBuffer.inputLines === inputLines && (prevBuffer.topReservedRows ?? 0) === getTopReservedRows(output) && (prevBuffer.reservedRows ?? 0) === reservedRows && prevBuffer.lines.length === visibleHeight;
|
|
3412
3470
|
const prevLines = isGeometryCompatible ? prevBuffer.lines : void 0;
|
|
3413
3471
|
const outsideRows = /* @__PURE__ */ new Map();
|
|
3414
|
-
const
|
|
3415
|
-
if (row >= winStart && row < winEnd)
|
|
3416
|
-
|
|
3472
|
+
const transcriptRowInfo = (row) => {
|
|
3473
|
+
if (row >= winStart && row < winEnd) {
|
|
3474
|
+
return {
|
|
3475
|
+
line: visibleLines[row - winStart] ?? "",
|
|
3476
|
+
compactSurface: visibleCompactSurface[row - winStart] === true
|
|
3477
|
+
};
|
|
3478
|
+
}
|
|
3479
|
+
if (currentStart >= 0 && row >= currentStart) {
|
|
3480
|
+
const layoutRow2 = currentLayoutRows[row - currentStart];
|
|
3481
|
+
return {
|
|
3482
|
+
line: currentLines[row - currentStart] ?? "",
|
|
3483
|
+
compactSurface: layoutRow2?.compactSurface === true
|
|
3484
|
+
};
|
|
3485
|
+
}
|
|
3417
3486
|
const index = entries.findIndex((entry) => row >= entry.startRow && row < entry.startRow + entry.lineCount);
|
|
3418
|
-
if (index < 0) return "";
|
|
3419
|
-
let
|
|
3420
|
-
if (!
|
|
3421
|
-
|
|
3422
|
-
outsideRows.set(index,
|
|
3487
|
+
if (index < 0) return { line: "", compactSurface: false };
|
|
3488
|
+
let layoutRows = outsideRows.get(index);
|
|
3489
|
+
if (!layoutRows) {
|
|
3490
|
+
layoutRows = getTurnLayoutRows(history.turns[index], contentWidth, colorEnabled, themeFingerprint, graphicsEnabled);
|
|
3491
|
+
outsideRows.set(index, layoutRows);
|
|
3423
3492
|
}
|
|
3424
|
-
|
|
3493
|
+
const layoutRow = layoutRows[row - entries[index].startRow];
|
|
3494
|
+
return {
|
|
3495
|
+
line: layoutRow?.rendered ?? "",
|
|
3496
|
+
compactSurface: layoutRow?.compactSurface === true
|
|
3497
|
+
};
|
|
3425
3498
|
};
|
|
3426
|
-
const surfaceOf = (line) => colorEnabled ? line.match(/\x1b\[(?:48;2;[0-9;]+|100)m/)?.[0] ?? "" : "";
|
|
3427
|
-
const rowSurfaces = visibleLines.map(
|
|
3499
|
+
const surfaceOf = (line, compactSurface) => colorEnabled && !compactSurface ? line.match(/\x1b\[(?:48;2;[0-9;]+|100)m/)?.[0] ?? "" : "";
|
|
3500
|
+
const rowSurfaces = visibleLines.map(
|
|
3501
|
+
(line, i) => surfaceOf(line, visibleCompactSurface[i] === true)
|
|
3502
|
+
);
|
|
3428
3503
|
for (let start = 0; colorEnabled && start < winEnd - winStart; start++) {
|
|
3429
3504
|
if (stripAnsi(visibleLines[start] ?? "").trim()) continue;
|
|
3430
3505
|
let end = start;
|
|
3431
3506
|
while (end < winEnd - winStart && !stripAnsi(visibleLines[end] ?? "").trim()) end++;
|
|
3432
3507
|
let before = winStart + start - 1;
|
|
3433
|
-
while (before >= 0 && !stripAnsi(
|
|
3508
|
+
while (before >= 0 && !stripAnsi(transcriptRowInfo(before).line).trim()) before--;
|
|
3434
3509
|
let after = winStart + end;
|
|
3435
|
-
while (after < totalLines && !stripAnsi(
|
|
3436
|
-
const
|
|
3437
|
-
const
|
|
3510
|
+
while (after < totalLines && !stripAnsi(transcriptRowInfo(after).line).trim()) after++;
|
|
3511
|
+
const beforeInfo = before >= 0 ? transcriptRowInfo(before) : null;
|
|
3512
|
+
const afterInfo = after < totalLines ? transcriptRowInfo(after) : null;
|
|
3513
|
+
const preceding = beforeInfo ? surfaceOf(beforeInfo.line, beforeInfo.compactSurface) : "";
|
|
3514
|
+
const following = afterInfo ? surfaceOf(afterInfo.line, afterInfo.compactSurface) : "";
|
|
3438
3515
|
if (preceding && following) rowSurfaces.fill(preceding, start, end);
|
|
3439
3516
|
start = end - 1;
|
|
3440
3517
|
}
|
|
@@ -6279,8 +6356,9 @@ function describeBrowserApproval(action, target) {
|
|
|
6279
6356
|
// packages/cli/tui/hostApprovalCard.ts
|
|
6280
6357
|
var SELECT_ALLOW = /* @__PURE__ */ new Set(["\x1B[C", "\x1BOC"]);
|
|
6281
6358
|
var SELECT_CANCEL = /* @__PURE__ */ new Set(["\x1B[D", "\x1BOD"]);
|
|
6282
|
-
var ENTER = /* @__PURE__ */ new Set(["\r", "\n"]);
|
|
6283
6359
|
var ESCAPE_KEYS = /* @__PURE__ */ new Set(["\x1B", "\x1B\x1B", "\x1B[27~"]);
|
|
6360
|
+
var PAGE_UP = "\x1B[5~";
|
|
6361
|
+
var PAGE_DOWN = "\x1B[6~";
|
|
6284
6362
|
var FALLBACK_COLUMNS = 80;
|
|
6285
6363
|
var LABEL_COLUMN = 9;
|
|
6286
6364
|
var CONTENT_INDENT = LABEL_COLUMN + 1;
|
|
@@ -6403,38 +6481,52 @@ function renderHostApprovalCardLines(card, opts) {
|
|
|
6403
6481
|
const isMcp = card.actionLabel === "callMcpTool";
|
|
6404
6482
|
const copy = describeBrowserApproval(card.actionLabel, safeApprovalSingleLineText(card.target));
|
|
6405
6483
|
const detail = safeApprovalMultilineText(card.summary);
|
|
6406
|
-
const heading = isMcp ? "
|
|
6407
|
-
const impact = isMcp ? "
|
|
6484
|
+
const heading = isMcp ? t("hostApprovalMcpHeading") : copy.action;
|
|
6485
|
+
const impact = isMcp ? t("hostApprovalMcpImpact") : copy.impact;
|
|
6408
6486
|
const browserParts = !isMcp ? [
|
|
6409
6487
|
safeApprovalSingleLineText(card.browser),
|
|
6410
6488
|
safeApprovalSingleLineText(card.tabId) ? `tab ${safeApprovalSingleLineText(card.tabId)}` : ""
|
|
6411
6489
|
].filter(Boolean) : [];
|
|
6412
|
-
const
|
|
6413
|
-
const actionRows = displayWidth(actionBar) <= columns - 1 ? [actionBar] : [
|
|
6414
|
-
...wrapProseLine("\u276F Cancel (Enter)", columns - 2).map((line) => ` ${line}`),
|
|
6415
|
-
...wrapProseLine("Allow once (\u2192 then Enter)", columns - 4).map((line) => ` ${line}`)
|
|
6416
|
-
];
|
|
6417
|
-
const lines = [
|
|
6418
|
-
renderDialogRule(columns, false),
|
|
6490
|
+
const body = [
|
|
6419
6491
|
...wrapProseLine(heading, columns - 2).map((line) => ` ${line}`),
|
|
6420
6492
|
"",
|
|
6421
|
-
...fieldRows("target", isMcp ? safeApprovalSingleLineText(card.target) || "
|
|
6422
|
-
...fieldRows(isMcp ? "scope" : "site", safeApprovalSingleLineText(card.origin) || (isMcp ? "
|
|
6493
|
+
...fieldRows("target", isMcp ? safeApprovalSingleLineText(card.target) || t("hostApprovalUnknownTool") : copy.target, contentWidth),
|
|
6494
|
+
...fieldRows(isMcp ? "scope" : "site", safeApprovalSingleLineText(card.origin) || (isMcp ? t("hostApprovalUnknownScope") : "Unknown site"), contentWidth),
|
|
6423
6495
|
...browserParts.length ? fieldRows("browser", browserParts.join(" \xB7 "), contentWidth) : [],
|
|
6424
6496
|
...wrapProseLine(impact, contentWidth).map((row, index) => `${index === 0 ? ` ${"impact".padEnd(LABEL_COLUMN, " ")}` : " ".repeat(CONTENT_INDENT)}${row}`),
|
|
6425
|
-
...detail ? ["", ...detailRows(detail, contentWidth)] : []
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6497
|
+
...detail ? ["", ...detailRows(detail, contentWidth)] : []
|
|
6498
|
+
];
|
|
6499
|
+
const footer = expired ? [
|
|
6500
|
+
...fieldRows("expired", "This action was not run and will not be retried.", contentWidth),
|
|
6501
|
+
...fieldRows("keys", "disabled", contentWidth)
|
|
6502
|
+
] : [
|
|
6503
|
+
...fieldRows("expires", `${formatApprovalRemaining(card.expiresAt, opts.now)} left`, contentWidth),
|
|
6504
|
+
...wrapProseLine(t("hostApprovalKeys"), columns - 2).map((line) => ` ${line}`)
|
|
6505
|
+
];
|
|
6506
|
+
const rule = renderDialogRule(columns, false);
|
|
6507
|
+
const bodyBudget = (opts.rows ?? Infinity) - footer.length - (expired ? 0 : 2) - 2;
|
|
6508
|
+
let visibleBody = body;
|
|
6509
|
+
if (body.length > bodyBudget) {
|
|
6510
|
+
const pageSize = bodyBudget - 1;
|
|
6511
|
+
if (pageSize < 1) throw new Error("approval frame does not fit");
|
|
6512
|
+
const start = Math.min(opts.scroll ?? 0, body.length - pageSize);
|
|
6513
|
+
const end = start + pageSize;
|
|
6514
|
+
opts.onScroll?.(start);
|
|
6515
|
+
visibleBody = [
|
|
6516
|
+
...body.slice(start, end),
|
|
6517
|
+
` PgUp/PgDn ${start + 1}\u2013${end}/${body.length}`
|
|
6518
|
+
];
|
|
6519
|
+
} else {
|
|
6520
|
+
opts.onScroll?.(0);
|
|
6521
|
+
}
|
|
6522
|
+
return [
|
|
6523
|
+
...[rule, ...visibleBody].map((line) => clipCardLine(line, columns)),
|
|
6524
|
+
...!expired ? [
|
|
6525
|
+
renderDialogRow({ label: `[1] ${t("hostApprovalCancel")}`, focused: !opts.allowFocused }, opts.colorEnabled ?? false),
|
|
6526
|
+
renderDialogRow({ label: `[2] ${t("hostApprovalAllowOnce")}`, focused: !!opts.allowFocused }, opts.colorEnabled ?? false)
|
|
6527
|
+
] : [],
|
|
6528
|
+
...[...footer, rule].map((line) => clipCardLine(line, columns))
|
|
6436
6529
|
];
|
|
6437
|
-
return lines.map((line) => clipCardLine(line, columns));
|
|
6438
6530
|
}
|
|
6439
6531
|
function createInlineHostApprovalPrompt(args) {
|
|
6440
6532
|
const now = args.now ?? Date.now;
|
|
@@ -6449,84 +6541,148 @@ function createInlineHostApprovalPrompt(args) {
|
|
|
6449
6541
|
if (!active) return;
|
|
6450
6542
|
const finishing = active;
|
|
6451
6543
|
active = null;
|
|
6544
|
+
finishing.finish(decision);
|
|
6452
6545
|
try {
|
|
6453
6546
|
args.write(`${note}
|
|
6454
6547
|
`);
|
|
6455
6548
|
} catch {
|
|
6456
|
-
} finally {
|
|
6457
|
-
finishing.finish(decision);
|
|
6458
6549
|
}
|
|
6459
6550
|
};
|
|
6460
|
-
const presentOne = (card, context
|
|
6551
|
+
const presentOne = (card, context, anchor) => new Promise((resolve4) => {
|
|
6461
6552
|
if (disposed || context.signal?.aborted) {
|
|
6462
6553
|
resolve4(disposed ? "deny" : "cancelled");
|
|
6463
6554
|
return;
|
|
6464
6555
|
}
|
|
6556
|
+
const expiresAt = Math.min(card.expiresAt, context.expiresAt ?? Infinity);
|
|
6557
|
+
if (expiresAt <= now()) {
|
|
6558
|
+
resolve4("expired");
|
|
6559
|
+
return;
|
|
6560
|
+
}
|
|
6465
6561
|
const abort = () => settle(context.signal?.reason === "expired" ? "expired" : "cancelled", "\u2716 approval ended \u2014 the action was not run");
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6562
|
+
let scroll = 0;
|
|
6563
|
+
const render = (rows) => {
|
|
6564
|
+
const lines = renderHostApprovalCardLines({ ...card, expiresAt }, {
|
|
6565
|
+
now: now(),
|
|
6566
|
+
columns: columns(),
|
|
6567
|
+
allowFocused: current.allowSelected,
|
|
6568
|
+
colorEnabled: rows !== void 0 && args.colorEnabled,
|
|
6569
|
+
rows,
|
|
6570
|
+
scroll,
|
|
6571
|
+
onScroll: (start) => {
|
|
6572
|
+
scroll = start;
|
|
6573
|
+
}
|
|
6574
|
+
});
|
|
6575
|
+
return lines.join("\n");
|
|
6576
|
+
};
|
|
6577
|
+
const output = args.output;
|
|
6578
|
+
const availableRows = () => anchor.bottomRow() - getTopReservedRows(output);
|
|
6579
|
+
const painter = anchor && output && outputIsTty(output) ? createDialogFramePainter({
|
|
6580
|
+
output,
|
|
6581
|
+
render: () => render(availableRows()),
|
|
6582
|
+
bottomAnchored: anchor.bottomAnchored,
|
|
6583
|
+
resolveBottomRow: anchor.bottomRow,
|
|
6584
|
+
session: anchor.session
|
|
6585
|
+
}) : void 0;
|
|
6586
|
+
const failPaint = () => settle("unavailable", "\u2716 approval could not be shown (terminal too short or repaint failed) \u2014 the action was not run");
|
|
6587
|
+
const repaint = () => {
|
|
6588
|
+
if (active !== current) return;
|
|
6589
|
+
if (expiresAt <= now()) {
|
|
6590
|
+
settle("expired", "\u231B approval expired \u2014 the action was not run");
|
|
6591
|
+
return;
|
|
6592
|
+
}
|
|
6593
|
+
try {
|
|
6594
|
+
painter?.paint();
|
|
6595
|
+
} catch {
|
|
6596
|
+
failPaint();
|
|
6597
|
+
}
|
|
6598
|
+
};
|
|
6599
|
+
const current = {
|
|
6600
|
+
expiresAt,
|
|
6601
|
+
allowSelected: false,
|
|
6602
|
+
repaint,
|
|
6603
|
+
interactive: Boolean(painter),
|
|
6604
|
+
page(delta) {
|
|
6605
|
+
if (!painter) return false;
|
|
6606
|
+
scroll = Math.max(0, scroll + delta * Math.max(1, Math.floor(availableRows() / 3)));
|
|
6607
|
+
repaint();
|
|
6608
|
+
return true;
|
|
6609
|
+
},
|
|
6610
|
+
finish(result) {
|
|
6611
|
+
context.signal?.removeEventListener("abort", abort);
|
|
6612
|
+
try {
|
|
6613
|
+
painter?.clear();
|
|
6614
|
+
} catch {
|
|
6615
|
+
} finally {
|
|
6616
|
+
resolve4(result);
|
|
6617
|
+
}
|
|
6618
|
+
}
|
|
6619
|
+
};
|
|
6620
|
+
active = current;
|
|
6470
6621
|
context.signal?.addEventListener("abort", abort, { once: true });
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6622
|
+
anchor?.registerForegroundRepaint?.(repaint);
|
|
6623
|
+
if (painter) repaint();
|
|
6624
|
+
else {
|
|
6625
|
+
try {
|
|
6626
|
+
args.write(`${render()}
|
|
6474
6627
|
`);
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6628
|
+
} catch {
|
|
6629
|
+
failPaint();
|
|
6630
|
+
}
|
|
6478
6631
|
}
|
|
6479
6632
|
});
|
|
6480
6633
|
return {
|
|
6481
6634
|
awaitHostApproval: (card, context = {}) => {
|
|
6482
6635
|
const signal = context.signal ? AbortSignal.any([context.signal, shutdown.signal]) : shutdown.signal;
|
|
6483
|
-
return queue.present(card, (next, lifetime = {}) => args.dialogHost ? args.dialogHost.
|
|
6636
|
+
return queue.present(card, (next, lifetime = {}) => args.dialogHost ? args.dialogHost.run((anchor) => presentOne(next, lifetime, anchor), {
|
|
6484
6637
|
signal: lifetime.signal,
|
|
6485
6638
|
cancelled: () => "cancelled"
|
|
6486
6639
|
}) : presentOne(next, lifetime), { ...context, signal });
|
|
6487
6640
|
},
|
|
6488
6641
|
isActive: () => active !== null,
|
|
6489
6642
|
handleKey(sequence, context) {
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
const
|
|
6493
|
-
const
|
|
6494
|
-
const
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6643
|
+
const current = active;
|
|
6644
|
+
if (!current || disposed) return false;
|
|
6645
|
+
const confirm = isSubmit(sequence);
|
|
6646
|
+
const allow = isArrowDown(sequence) || SELECT_ALLOW.has(sequence);
|
|
6647
|
+
const cancel = isArrowUp(sequence) || SELECT_CANCEL.has(sequence);
|
|
6648
|
+
const escape = ESCAPE_KEYS.has(sequence);
|
|
6649
|
+
const digit = sequence === "1" || sequence === "2";
|
|
6650
|
+
const page = sequence === PAGE_UP || sequence === PAGE_DOWN;
|
|
6651
|
+
const setFocus = (allowFocused) => {
|
|
6652
|
+
if (current.allowSelected === allowFocused) return;
|
|
6653
|
+
if (current.interactive) {
|
|
6654
|
+
current.allowSelected = allowFocused;
|
|
6655
|
+
current.repaint();
|
|
6656
|
+
return;
|
|
6502
6657
|
}
|
|
6658
|
+
try {
|
|
6659
|
+
args.write(` ${allowFocused ? t("hostApprovalAllowOnce") : t("hostApprovalCancel")} \xB7 ${t("hostApprovalConfirmHint")}
|
|
6660
|
+
`);
|
|
6661
|
+
current.allowSelected = allowFocused;
|
|
6662
|
+
} catch {
|
|
6663
|
+
current.allowSelected = false;
|
|
6664
|
+
}
|
|
6665
|
+
};
|
|
6666
|
+
if (page && current.page(sequence === PAGE_UP ? -1 : 1)) return true;
|
|
6667
|
+
if (!context.draftEmpty || escape && context.busy || !(confirm || allow || cancel || escape || digit)) {
|
|
6668
|
+
setFocus(false);
|
|
6503
6669
|
return false;
|
|
6504
6670
|
}
|
|
6505
|
-
if (
|
|
6506
|
-
active.allowSelected = false;
|
|
6507
|
-
return false;
|
|
6508
|
-
}
|
|
6509
|
-
if (active.card.expiresAt <= now()) {
|
|
6671
|
+
if (current.expiresAt <= now()) {
|
|
6510
6672
|
settle("expired", "\u231B approval expired \u2014 the action was not run");
|
|
6511
6673
|
return true;
|
|
6512
6674
|
}
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
try {
|
|
6517
|
-
args.write(selectAllow ? " Allow once selected \xB7 Enter confirms \xB7 \u2190 selects Cancel\n" : " Cancel selected \xB7 Enter cancels\n");
|
|
6518
|
-
active.allowSelected = selectAllow;
|
|
6519
|
-
} catch {
|
|
6520
|
-
settle("deny", "\u2716 selection could not be shown \u2014 the action was not run");
|
|
6521
|
-
}
|
|
6522
|
-
}
|
|
6675
|
+
const mayApprove = !context.busy || context.canApproveDuringTurn === true;
|
|
6676
|
+
if (allow || cancel) {
|
|
6677
|
+
setFocus(allow && mayApprove);
|
|
6523
6678
|
return true;
|
|
6524
6679
|
}
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
);
|
|
6680
|
+
if (!mayApprove && sequence === "2") {
|
|
6681
|
+
setFocus(false);
|
|
6682
|
+
return true;
|
|
6683
|
+
}
|
|
6684
|
+
const approved = mayApprove && (sequence === "2" || confirm && current.allowSelected);
|
|
6685
|
+
settle(approved ? "allow_once" : "deny", approved ? "\u2714 allowed once (this action only)" : "\u2716 denied");
|
|
6530
6686
|
return true;
|
|
6531
6687
|
},
|
|
6532
6688
|
dispose() {
|
|
@@ -7778,7 +7934,7 @@ function renderWakeMessage(elements, count) {
|
|
|
7778
7934
|
return [
|
|
7779
7935
|
`<background_run_completion count="${count}">`,
|
|
7780
7936
|
...elements,
|
|
7781
|
-
`\u6709 resultFile \u65F6\u7528 readFile\uFF1B\u672C\u5730\u7F3A\u5931\u5373\u65E0\u7ED3\u8BBA\uFF0C\u4E0D\u8BFB\u65E5\u5FD7\u3002\u7EC8\u6001\u53EA\u8868\u793A run \u7ED3\u675F\uFF0C\u4E0D\u8BC1\u660E\u4EA4\u4ED8\u3001\u6D4B\u8BD5\u3001\u5BA1\u67E5\u3001\u7528\u6237\u9A8C\u6536\u6216\u5408\u5165\u53D1\u5E03\u3002\u6B63\u6587\u662F\u6267\u884C\u8005\u62A5\u544A\uFF1Bruntime acceptance \u4EC5\u4E3A\u8FD0\u884C\u65F6\u89C2\u6D4B\uFF0Cunknown \u4FDD\u6301\u672A\u77E5\u3002continuedFrom \u4EC5\u4E3A\u7EED\u8DD1\u5173\u8054\uFF0C\u4E0D\u7EE7\u627F\u65E7\u7248\u672C APPROVE\uFF1B\u7ED3\u5408\u5F53\u524D\u5B8C\u6574\u7ED3\u679C\u6838\u5BF9\u8303\u56F4\u3001\u963B\u788D\u4E0E\u8BC1\u636E\u3002`,
|
|
7937
|
+
`\u6709 resultFile \u65F6\u7528 readFile \u5148\u8BFB\u5934\u90E8\u7ED3\u8BBA\uFF08\u5982 lines:"1-60"\uFF09\uFF0C\u6709\u5F02\u5E38\u3001\u7F3A\u53E3\u3001\u9AD8\u98CE\u9669\u51B3\u7B56\u6216\u672A\u8986\u5B8C\u65F6\u518D\u6309\u533A\u95F4\u7EED\u8BFB\uFF1B\u672C\u5730\u7F3A\u5931\u5373\u65E0\u7ED3\u8BBA\uFF0C\u4E0D\u8BFB\u65E5\u5FD7\u3002\u7EC8\u6001\u53EA\u8868\u793A run \u7ED3\u675F\uFF0C\u4E0D\u8BC1\u660E\u4EA4\u4ED8\u3001\u6D4B\u8BD5\u3001\u5BA1\u67E5\u3001\u7528\u6237\u9A8C\u6536\u6216\u5408\u5165\u53D1\u5E03\u3002\u6B63\u6587\u662F\u6267\u884C\u8005\u62A5\u544A\uFF1Bruntime acceptance \u4EC5\u4E3A\u8FD0\u884C\u65F6\u89C2\u6D4B\uFF0Cunknown \u4FDD\u6301\u672A\u77E5\u3002continuedFrom \u4EC5\u4E3A\u7EED\u8DD1\u5173\u8054\uFF0C\u4E0D\u7EE7\u627F\u65E7\u7248\u672C APPROVE\uFF1B\u7ED3\u5408\u5F53\u524D\u5B8C\u6574\u7ED3\u679C\u6838\u5BF9\u8303\u56F4\u3001\u963B\u788D\u4E0E\u8BC1\u636E\u3002`,
|
|
7782
7938
|
`</background_run_completion>`
|
|
7783
7939
|
].join("\n");
|
|
7784
7940
|
}
|
|
@@ -11381,6 +11537,45 @@ function splitProbeInput(buffer) {
|
|
|
11381
11537
|
function isTerminalDevice(stream) {
|
|
11382
11538
|
return stream instanceof ReadStream;
|
|
11383
11539
|
}
|
|
11540
|
+
function readGsettingsValue(raw) {
|
|
11541
|
+
return (raw ?? "").trim().replace(/^'([\s\S]*)'$/, "$1").trim().toLowerCase();
|
|
11542
|
+
}
|
|
11543
|
+
var readGsettingsKey = (schema, key) => {
|
|
11544
|
+
try {
|
|
11545
|
+
return execFileSync("gsettings", ["get", schema, key], {
|
|
11546
|
+
encoding: "utf8",
|
|
11547
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
11548
|
+
timeout: 200
|
|
11549
|
+
}).trim();
|
|
11550
|
+
} catch {
|
|
11551
|
+
return null;
|
|
11552
|
+
}
|
|
11553
|
+
};
|
|
11554
|
+
function parseGnomeColorScheme(value) {
|
|
11555
|
+
const scheme = readGsettingsValue(value ?? null);
|
|
11556
|
+
if (scheme === "prefer-dark") return "dark";
|
|
11557
|
+
if (scheme === "prefer-light" || scheme === "default") return "light";
|
|
11558
|
+
return null;
|
|
11559
|
+
}
|
|
11560
|
+
function isPtyxisTerminal(env = process.env) {
|
|
11561
|
+
return Boolean(
|
|
11562
|
+
(env.PTYXIS_VERSION ?? "").trim() || (env.PTYXIS_PROFILE ?? "").trim()
|
|
11563
|
+
);
|
|
11564
|
+
}
|
|
11565
|
+
var ptyxisCanvasCache = null;
|
|
11566
|
+
function resetPtyxisCanvasCache() {
|
|
11567
|
+
ptyxisCanvasCache = null;
|
|
11568
|
+
}
|
|
11569
|
+
function detectPtyxisCanvasBrightness(env = process.env, read = readGsettingsKey) {
|
|
11570
|
+
if (ptyxisCanvasCache) return ptyxisCanvasCache.value;
|
|
11571
|
+
if (!isPtyxisTerminal(env)) return null;
|
|
11572
|
+
const style = readGsettingsValue(read("org.gnome.Ptyxis", "interface-style"));
|
|
11573
|
+
const value = style === "light" ? "light" : style === "dark" ? "dark" : parseGnomeColorScheme(
|
|
11574
|
+
read("org.gnome.desktop.interface", "color-scheme")
|
|
11575
|
+
);
|
|
11576
|
+
ptyxisCanvasCache = { value };
|
|
11577
|
+
return value;
|
|
11578
|
+
}
|
|
11384
11579
|
async function probeTerminalBackground(args = {}) {
|
|
11385
11580
|
const stdin = args.stdin ?? process.stdin;
|
|
11386
11581
|
const stdout = args.stdout ?? process.stdout;
|
|
@@ -11430,9 +11625,16 @@ async function probeTerminalBackground(args = {}) {
|
|
|
11430
11625
|
});
|
|
11431
11626
|
}
|
|
11432
11627
|
async function detectTerminalBackground(args = {}) {
|
|
11628
|
+
const hostCanvas = args.trustHostCanvas ? detectPtyxisCanvasBrightness(
|
|
11629
|
+
args.env ?? process.env,
|
|
11630
|
+
args.readGsettings ?? readGsettingsKey
|
|
11631
|
+
) : null;
|
|
11632
|
+
if (hostCanvas) return { brightness: hostCanvas, hex: "", trustedCanvas: true };
|
|
11433
11633
|
const r = await probeTerminalBackground(args);
|
|
11434
11634
|
if (r || !args.allowSystemFallback) return r;
|
|
11435
|
-
const brightness = detectSystemBrightness(process.env, {
|
|
11635
|
+
const brightness = detectSystemBrightness(args.env ?? process.env, {
|
|
11636
|
+
allowSubprocess: true
|
|
11637
|
+
});
|
|
11436
11638
|
return brightness ? { brightness, hex: "" } : null;
|
|
11437
11639
|
}
|
|
11438
11640
|
function detectSystemBrightness(env = process.env, options = {}) {
|
|
@@ -11463,6 +11665,8 @@ function detectSystemBrightness(env = process.env, options = {}) {
|
|
|
11463
11665
|
timeout: 200
|
|
11464
11666
|
}
|
|
11465
11667
|
).trim();
|
|
11668
|
+
const scheme = parseGnomeColorScheme(out);
|
|
11669
|
+
if (scheme) return scheme;
|
|
11466
11670
|
const val = out.toLowerCase();
|
|
11467
11671
|
if (/(?:^|[\s\-_:])dark(?:$|[\s\-_:])/i.test(val)) return "dark";
|
|
11468
11672
|
if (/(?:^|[\s\-_:])light(?:$|[\s\-_:])/i.test(val)) return "light";
|
|
@@ -13847,6 +14051,7 @@ function createNoopFixedInput() {
|
|
|
13847
14051
|
},
|
|
13848
14052
|
disable() {
|
|
13849
14053
|
},
|
|
14054
|
+
isDisabled: () => true,
|
|
13850
14055
|
getInputLines: () => 1,
|
|
13851
14056
|
isPaused: () => false,
|
|
13852
14057
|
setMouseEnabled() {
|
|
@@ -13862,7 +14067,9 @@ function createFixedInput(output, config) {
|
|
|
13862
14067
|
const getColumns = () => output.columns ?? 80;
|
|
13863
14068
|
let inputLines = 1;
|
|
13864
14069
|
let paused = false;
|
|
14070
|
+
let disabled = false;
|
|
13865
14071
|
const write = (seq) => {
|
|
14072
|
+
if (disabled) return;
|
|
13866
14073
|
output.write(seq);
|
|
13867
14074
|
};
|
|
13868
14075
|
let lastScrollBottom = -1;
|
|
@@ -14075,6 +14282,7 @@ function createFixedInput(output, config) {
|
|
|
14075
14282
|
return { text, lines, cursorCol, cursorRow: headerRows + cursorRow };
|
|
14076
14283
|
};
|
|
14077
14284
|
const repaintAt = (buffer, cursorPos, force = false) => {
|
|
14285
|
+
if (disabled) return;
|
|
14078
14286
|
const { text, lines, cursorCol, cursorRow } = renderInputArea(buffer, cursorPos);
|
|
14079
14287
|
let linesChanged = false;
|
|
14080
14288
|
if (lines !== inputLines) {
|
|
@@ -14145,6 +14353,7 @@ function createFixedInput(output, config) {
|
|
|
14145
14353
|
return {
|
|
14146
14354
|
active: true,
|
|
14147
14355
|
init() {
|
|
14356
|
+
if (disabled) return;
|
|
14148
14357
|
invalidateComposerCache();
|
|
14149
14358
|
saveCursor();
|
|
14150
14359
|
setScrollRegion(inputLines);
|
|
@@ -14172,6 +14381,7 @@ function createFixedInput(output, config) {
|
|
|
14172
14381
|
resetCursorStyle();
|
|
14173
14382
|
},
|
|
14174
14383
|
resumeFromSubprocess() {
|
|
14384
|
+
if (disabled) return;
|
|
14175
14385
|
paused = false;
|
|
14176
14386
|
invalidateComposerCache();
|
|
14177
14387
|
resetHistoryFrameDiffCache(output);
|
|
@@ -14184,6 +14394,7 @@ function createFixedInput(output, config) {
|
|
|
14184
14394
|
`);
|
|
14185
14395
|
},
|
|
14186
14396
|
resumeFromDialog() {
|
|
14397
|
+
if (disabled) return;
|
|
14187
14398
|
paused = false;
|
|
14188
14399
|
invalidateComposerCache();
|
|
14189
14400
|
resetHistoryFrameDiffCache(output);
|
|
@@ -14201,7 +14412,9 @@ function createFixedInput(output, config) {
|
|
|
14201
14412
|
resetScrollRegion();
|
|
14202
14413
|
resetCursorStyle();
|
|
14203
14414
|
leaveAltScreen(output);
|
|
14415
|
+
disabled = true;
|
|
14204
14416
|
},
|
|
14417
|
+
isDisabled: () => disabled,
|
|
14205
14418
|
getInputLines: () => inputLines,
|
|
14206
14419
|
isPaused: () => paused,
|
|
14207
14420
|
setMouseEnabled(enabled) {
|
|
@@ -14214,6 +14427,7 @@ function createFixedInput(output, config) {
|
|
|
14214
14427
|
},
|
|
14215
14428
|
isMouseEnabled: () => mouseEnabled,
|
|
14216
14429
|
setAltScreenEnabled(enabled) {
|
|
14430
|
+
if (disabled) return;
|
|
14217
14431
|
if (enabled) {
|
|
14218
14432
|
enterAltScreen(output);
|
|
14219
14433
|
} else {
|
|
@@ -15348,7 +15562,7 @@ async function runOneAgentTurn(ctx, inputMsg, imageUrls, actionGateHandler, conf
|
|
|
15348
15562
|
if (!approved) return false;
|
|
15349
15563
|
const commandText = typeof request.command === "string" ? request.command : "";
|
|
15350
15564
|
if (commandText) {
|
|
15351
|
-
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-
|
|
15565
|
+
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-SIRXPUFR.js");
|
|
15352
15566
|
const hostResult = await runApprovedCredentialCommand({
|
|
15353
15567
|
commandText,
|
|
15354
15568
|
approvalEventId: request.id,
|
|
@@ -16496,16 +16710,30 @@ function createTuiRender(host) {
|
|
|
16496
16710
|
let renderScheduled = false;
|
|
16497
16711
|
let renderTimer = null;
|
|
16498
16712
|
let syncingLayout = false;
|
|
16713
|
+
let closed = false;
|
|
16714
|
+
const close = () => {
|
|
16715
|
+
closed = true;
|
|
16716
|
+
if (renderTimer !== null) {
|
|
16717
|
+
clearTimeout(renderTimer);
|
|
16718
|
+
renderTimer = null;
|
|
16719
|
+
}
|
|
16720
|
+
renderScheduled = false;
|
|
16721
|
+
};
|
|
16499
16722
|
const flushPendingRender = () => {
|
|
16500
16723
|
if (renderTimer !== null) {
|
|
16501
16724
|
clearTimeout(renderTimer);
|
|
16502
16725
|
renderTimer = null;
|
|
16503
16726
|
}
|
|
16727
|
+
if (closed) {
|
|
16728
|
+
renderScheduled = false;
|
|
16729
|
+
return;
|
|
16730
|
+
}
|
|
16504
16731
|
if (!renderScheduled) return;
|
|
16505
16732
|
renderScheduled = false;
|
|
16506
16733
|
paintSyncedFrame();
|
|
16507
16734
|
};
|
|
16508
16735
|
const paintSyncedFrame = () => {
|
|
16736
|
+
if (closed) return;
|
|
16509
16737
|
if (host.fixedInput.isPaused()) {
|
|
16510
16738
|
host.imageRenderer?.suspend();
|
|
16511
16739
|
return;
|
|
@@ -16520,7 +16748,7 @@ function createTuiRender(host) {
|
|
|
16520
16748
|
}
|
|
16521
16749
|
};
|
|
16522
16750
|
const scheduleRender = () => {
|
|
16523
|
-
if (renderScheduled) return;
|
|
16751
|
+
if (closed || renderScheduled) return;
|
|
16524
16752
|
renderScheduled = true;
|
|
16525
16753
|
renderTimer = setTimeout(() => {
|
|
16526
16754
|
renderScheduled = false;
|
|
@@ -16529,7 +16757,7 @@ function createTuiRender(host) {
|
|
|
16529
16757
|
}, RENDER_THROTTLE_MS);
|
|
16530
16758
|
};
|
|
16531
16759
|
const renderHistoryCore = (withImages) => {
|
|
16532
|
-
if (syncingLayout) return;
|
|
16760
|
+
if (closed || syncingLayout) return;
|
|
16533
16761
|
syncingLayout = true;
|
|
16534
16762
|
try {
|
|
16535
16763
|
const reservedRows = host.getReservedRows?.() ?? 0;
|
|
@@ -16549,6 +16777,7 @@ function createTuiRender(host) {
|
|
|
16549
16777
|
}
|
|
16550
16778
|
};
|
|
16551
16779
|
const renderHistoryToOutput = () => {
|
|
16780
|
+
if (closed) return;
|
|
16552
16781
|
if (host.fixedInput.isPaused()) {
|
|
16553
16782
|
host.imageRenderer?.suspend();
|
|
16554
16783
|
return;
|
|
@@ -16557,6 +16786,7 @@ function createTuiRender(host) {
|
|
|
16557
16786
|
renderHistoryCore(true);
|
|
16558
16787
|
};
|
|
16559
16788
|
const renderHistoryUnderDialog = () => {
|
|
16789
|
+
if (closed) return;
|
|
16560
16790
|
host.imageRenderer?.suspend();
|
|
16561
16791
|
renderHistoryCore(false);
|
|
16562
16792
|
};
|
|
@@ -16565,6 +16795,9 @@ function createTuiRender(host) {
|
|
|
16565
16795
|
renderHistoryUnderDialog,
|
|
16566
16796
|
scheduleRender,
|
|
16567
16797
|
flushPendingRender,
|
|
16798
|
+
// 会话收尾:取消防抖定时器并关死全部渲染入口。幂等,交给 workspace 的
|
|
16799
|
+
// 唯一退出汇聚点调用;调用之后本集群不再向 output 写任何字节。
|
|
16800
|
+
close,
|
|
16568
16801
|
// 立即绘制一帧同步帧(BSU/ESU + 光标隐藏)。流式路径走 33ms 节流的
|
|
16569
16802
|
// scheduleRender;平滑滚动推进器按 16ms 自己的节奏调用这里,避免被节流
|
|
16570
16803
|
// 抹平成"每 33ms 一跳"。
|
|
@@ -16991,10 +17224,12 @@ function createTuiImageRenderer(options) {
|
|
|
16991
17224
|
import { randomInt } from "node:crypto";
|
|
16992
17225
|
|
|
16993
17226
|
// packages/cli/tui/tuiScrollAnimation.ts
|
|
16994
|
-
var VELOCITY_WINDOW_MS =
|
|
17227
|
+
var VELOCITY_WINDOW_MS = 240;
|
|
16995
17228
|
var VELOCITY_SLOW_COUNT = 3;
|
|
16996
|
-
var VELOCITY_GAIN_PER_REPORT = 0.
|
|
16997
|
-
var VELOCITY_MAX_GAIN =
|
|
17229
|
+
var VELOCITY_GAIN_PER_REPORT = 0.65;
|
|
17230
|
+
var VELOCITY_MAX_GAIN = 8;
|
|
17231
|
+
var VELOCITY_CADENCE_SEPARATION_MS = 12;
|
|
17232
|
+
var VELOCITY_CADENCE_PULSE_WEIGHT = 3;
|
|
16998
17233
|
function velocityGain(recentCount) {
|
|
16999
17234
|
if (recentCount <= VELOCITY_SLOW_COUNT) return 1;
|
|
17000
17235
|
return Math.min(
|
|
@@ -17050,9 +17285,12 @@ function createScrollAnimator(deps) {
|
|
|
17050
17285
|
fractionalLines = 0;
|
|
17051
17286
|
recentDirection = direction;
|
|
17052
17287
|
}
|
|
17053
|
-
recentReports = recentReports.filter((
|
|
17054
|
-
recentReports.
|
|
17055
|
-
|
|
17288
|
+
recentReports = recentReports.filter((entry) => t3 - entry.ts < VELOCITY_WINDOW_MS);
|
|
17289
|
+
const lastEntry = recentReports.at(-1);
|
|
17290
|
+
const weight = lastEntry !== void 0 && t3 - lastEntry.ts >= VELOCITY_CADENCE_SEPARATION_MS ? VELOCITY_CADENCE_PULSE_WEIGHT : 1;
|
|
17291
|
+
recentReports.push({ ts: t3, weight });
|
|
17292
|
+
const pulsedCount = recentReports.reduce((sum, entry) => sum + entry.weight, 0);
|
|
17293
|
+
fractionalLines += velocityGain(pulsedCount);
|
|
17056
17294
|
const whole = Math.floor(fractionalLines);
|
|
17057
17295
|
fractionalLines -= whole;
|
|
17058
17296
|
return whole;
|
|
@@ -17475,7 +17713,7 @@ async function compactDialog(options) {
|
|
|
17475
17713
|
fetchImpl,
|
|
17476
17714
|
agentRef: getActiveDialogAgentId(current) ?? void 0,
|
|
17477
17715
|
loadAdapter: async () => {
|
|
17478
|
-
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-
|
|
17716
|
+
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-VRB5EDDZ.js");
|
|
17479
17717
|
return createCliLocalRuntimeAdapter2({ env: { ...options.env ?? {}, AUTH_TOKEN: options.authToken, NOLO_SERVER: options.serverUrl }, fetchImpl });
|
|
17480
17718
|
}
|
|
17481
17719
|
}) : void 0);
|
|
@@ -18564,10 +18802,12 @@ async function runSubmittedSlashLine(line, host, actionGateHandler, confirmDestr
|
|
|
18564
18802
|
emitCommandOutput(lines.join("\n"), line);
|
|
18565
18803
|
}
|
|
18566
18804
|
if (result.action?.type === "theme-refresh") {
|
|
18805
|
+
resetPtyxisCanvasCache();
|
|
18567
18806
|
const detected = await detectTerminalBackground({
|
|
18568
18807
|
stdin: input,
|
|
18569
18808
|
stdout: output,
|
|
18570
|
-
allowSystemFallback: true
|
|
18809
|
+
allowSystemFallback: true,
|
|
18810
|
+
trustHostCanvas: true
|
|
18571
18811
|
});
|
|
18572
18812
|
if (detected && applyDetectedBackground(detected)) {
|
|
18573
18813
|
emitCommandOutput(t("themeRefreshed", detected.brightness));
|
|
@@ -19129,6 +19369,7 @@ async function runTuiWorkspace(options) {
|
|
|
19129
19369
|
);
|
|
19130
19370
|
setActiveThemeMode(startupThemeMode);
|
|
19131
19371
|
const accountSessionRuntime = createTuiAccountSessionRuntime(options.env ?? process.env);
|
|
19372
|
+
let cleanupTitle = null;
|
|
19132
19373
|
try {
|
|
19133
19374
|
const runtimeEnv = options.env ?? process.env;
|
|
19134
19375
|
initCliLocale(runtimeEnv);
|
|
@@ -19183,7 +19424,8 @@ async function runTuiWorkspace(options) {
|
|
|
19183
19424
|
stdin: input,
|
|
19184
19425
|
stdout: output,
|
|
19185
19426
|
allowSystemFallback: startupThemeMode !== "terminal",
|
|
19186
|
-
preserveInput: true
|
|
19427
|
+
preserveInput: true,
|
|
19428
|
+
trustHostCanvas: true
|
|
19187
19429
|
});
|
|
19188
19430
|
if (detected) applyDetectedBackground(detected);
|
|
19189
19431
|
let sawOsc11Reply = Boolean(detected?.hex);
|
|
@@ -19232,8 +19474,18 @@ async function runTuiWorkspace(options) {
|
|
|
19232
19474
|
let lastProtocolReport = "";
|
|
19233
19475
|
const titleEnv = options.env ?? process.env;
|
|
19234
19476
|
const titleEnabled = output.isTTY === true && !["0", "false"].includes((titleEnv.NOLO_TUI_TITLE ?? "").trim().toLowerCase());
|
|
19477
|
+
const TITLE_SPINNER_INTERVAL_MS = 200;
|
|
19478
|
+
let titleFrameIndex = 0;
|
|
19479
|
+
let titleAnimTimer = null;
|
|
19480
|
+
const stopTitleAnimation = () => {
|
|
19481
|
+
if (titleAnimTimer !== null) {
|
|
19482
|
+
clearInterval(titleAnimTimer);
|
|
19483
|
+
titleAnimTimer = null;
|
|
19484
|
+
}
|
|
19485
|
+
};
|
|
19235
19486
|
let titleRestored = false;
|
|
19236
19487
|
const restoreTitle = () => {
|
|
19488
|
+
stopTitleAnimation();
|
|
19237
19489
|
if (titleRestored) return;
|
|
19238
19490
|
titleRestored = true;
|
|
19239
19491
|
if (titleEnabled) {
|
|
@@ -19244,6 +19496,7 @@ async function runTuiWorkspace(options) {
|
|
|
19244
19496
|
}
|
|
19245
19497
|
if (restoreWindowTitle === restoreTitle) restoreWindowTitle = null;
|
|
19246
19498
|
};
|
|
19499
|
+
cleanupTitle = restoreTitle;
|
|
19247
19500
|
if (titleEnabled) {
|
|
19248
19501
|
output.write("\x1B[22;0t");
|
|
19249
19502
|
restoreWindowTitle = restoreTitle;
|
|
@@ -19259,14 +19512,30 @@ async function runTuiWorkspace(options) {
|
|
|
19259
19512
|
}
|
|
19260
19513
|
if (!titleEnabled) return;
|
|
19261
19514
|
const phase = terminalStatus.state;
|
|
19515
|
+
const isWorking = phase !== "blocked" && phase !== "error" && (phase === "working" || backgroundWorking);
|
|
19516
|
+
if (!isWorking) {
|
|
19517
|
+
stopTitleAnimation();
|
|
19518
|
+
titleFrameIndex = 0;
|
|
19519
|
+
} else if (titleAnimTimer === null) {
|
|
19520
|
+
titleAnimTimer = setInterval(() => {
|
|
19521
|
+
titleFrameIndex = (titleFrameIndex + 1) % ACTIVITY_FRAMES.length;
|
|
19522
|
+
syncWindowTitle();
|
|
19523
|
+
}, TITLE_SPINNER_INTERVAL_MS);
|
|
19524
|
+
titleAnimTimer.unref?.();
|
|
19525
|
+
}
|
|
19262
19526
|
const rawDialogLabel = state.dialogLabel?.trim();
|
|
19263
19527
|
const rawLabel = !rawDialogLabel || rawDialogLabel === "new" ? basename(state.cwd) || "Nolo" : rawDialogLabel;
|
|
19264
19528
|
const label = stripAnsi(rawLabel).replace(/[\x00-\x1f\x7f-\x9f]+/g, " ");
|
|
19265
|
-
const
|
|
19529
|
+
const frame = ACTIVITY_FRAMES[titleFrameIndex % ACTIVITY_FRAMES.length];
|
|
19530
|
+
const suffix = phase === "blocked" ? " \xB7 \u9700\u63A5\u7BA1 \u2014 Nolo" : phase === "error" ? " \xB7 \u5931\u8D25\u9700\u5904\u7406 \u2014 Nolo" : isWorking ? ` \xB7 ${frame} \u601D\u8003\u4E2D \u2014 Nolo` : label === "Nolo" ? "" : " \u2014 Nolo";
|
|
19266
19531
|
const currentTitle = takeDisplayWidth(label, 80 - displayWidth(suffix)).prefix + suffix;
|
|
19267
19532
|
if (currentTitle === lastSentTitle) return;
|
|
19268
19533
|
lastSentTitle = currentTitle;
|
|
19269
|
-
|
|
19534
|
+
try {
|
|
19535
|
+
output.write(buildWindowTitle(currentTitle));
|
|
19536
|
+
} catch {
|
|
19537
|
+
stopTitleAnimation();
|
|
19538
|
+
}
|
|
19270
19539
|
};
|
|
19271
19540
|
const reportTerminalStatus = (report) => {
|
|
19272
19541
|
const wasWaiting = terminalStatus.state === "blocked";
|
|
@@ -19463,7 +19732,8 @@ async function runTuiWorkspace(options) {
|
|
|
19463
19732
|
renderHistoryUnderDialog,
|
|
19464
19733
|
scheduleRender,
|
|
19465
19734
|
flushPendingRender,
|
|
19466
|
-
paintImmediate
|
|
19735
|
+
paintImmediate,
|
|
19736
|
+
close: closeRender
|
|
19467
19737
|
} = createTuiRender({
|
|
19468
19738
|
output,
|
|
19469
19739
|
history,
|
|
@@ -19697,6 +19967,7 @@ async function runTuiWorkspace(options) {
|
|
|
19697
19967
|
let hostApprovalPrompt = null;
|
|
19698
19968
|
let unregisterHostApprovalRenderer = null;
|
|
19699
19969
|
let draftEpoch = 0;
|
|
19970
|
+
let clipboardReadsInFlight = 0;
|
|
19700
19971
|
const bumpDraftEpoch = () => {
|
|
19701
19972
|
draftEpoch += 1;
|
|
19702
19973
|
};
|
|
@@ -19821,6 +20092,14 @@ async function runTuiWorkspace(options) {
|
|
|
19821
20092
|
return true;
|
|
19822
20093
|
};
|
|
19823
20094
|
const readAndApplyClipboard = async (source) => {
|
|
20095
|
+
clipboardReadsInFlight += 1;
|
|
20096
|
+
try {
|
|
20097
|
+
return await applyClipboardPaste(source);
|
|
20098
|
+
} finally {
|
|
20099
|
+
clipboardReadsInFlight -= 1;
|
|
20100
|
+
}
|
|
20101
|
+
};
|
|
20102
|
+
const applyClipboardPaste = async (source) => {
|
|
19824
20103
|
const snapshot = { epoch: draftEpoch, sessionEnded };
|
|
19825
20104
|
const outcome = await resolveClipboardPaste({
|
|
19826
20105
|
readImage: () => readImage({ env: options.env ?? process.env }),
|
|
@@ -20141,6 +20420,24 @@ ${lines}` : lines;
|
|
|
20141
20420
|
)
|
|
20142
20421
|
);
|
|
20143
20422
|
};
|
|
20423
|
+
const DIRECT_IMAGE_COPY_RE = /^\/images\s+(?:copy\s+)?(\d+)$/;
|
|
20424
|
+
const copyConversationImagePathByIndex = async (targetIndex, emit) => {
|
|
20425
|
+
const target = collectConversationImageArtifacts(history.turns).find(
|
|
20426
|
+
(item) => item.artifactIndex === targetIndex
|
|
20427
|
+
);
|
|
20428
|
+
if (!target) {
|
|
20429
|
+
emit(themeText(`\xB7 \u672A\u627E\u5230\u56FE\u7247\u4EA7\u7269 #${targetIndex}\u3002`, "muted", resolveCliColorEnabled()));
|
|
20430
|
+
return;
|
|
20431
|
+
}
|
|
20432
|
+
const result = await copyImagePath(target.path, writeClipboard2);
|
|
20433
|
+
emit(
|
|
20434
|
+
themeText(
|
|
20435
|
+
`${result.ok ? "\xB7" : "!"} ${result.message}`,
|
|
20436
|
+
result.ok ? "muted" : "warning",
|
|
20437
|
+
resolveCliColorEnabled()
|
|
20438
|
+
)
|
|
20439
|
+
);
|
|
20440
|
+
};
|
|
20144
20441
|
const manageDraftImages = async () => {
|
|
20145
20442
|
while (true) {
|
|
20146
20443
|
const images = state.attachedImages;
|
|
@@ -20247,17 +20544,9 @@ ${lines}` : lines;
|
|
|
20247
20544
|
renderHistoryToOutput();
|
|
20248
20545
|
return false;
|
|
20249
20546
|
}
|
|
20250
|
-
const directImageMatch =
|
|
20547
|
+
const directImageMatch = DIRECT_IMAGE_COPY_RE.exec(line.trim());
|
|
20251
20548
|
if (directImageMatch) {
|
|
20252
|
-
|
|
20253
|
-
const target = collectConversationImageArtifacts(history.turns).find(
|
|
20254
|
-
(item) => item.artifactIndex === targetIndex
|
|
20255
|
-
);
|
|
20256
|
-
if (!target) {
|
|
20257
|
-
emitCommandOutput(themeText(`\xB7 \u672A\u627E\u5230\u56FE\u7247\u4EA7\u7269 #${targetIndex}\u3002`, "muted", resolveCliColorEnabled()));
|
|
20258
|
-
} else {
|
|
20259
|
-
await copyImagePathWithFeedback(target.path);
|
|
20260
|
-
}
|
|
20549
|
+
await copyConversationImagePathByIndex(Number(directImageMatch[1]), emitCommandOutput);
|
|
20261
20550
|
return false;
|
|
20262
20551
|
}
|
|
20263
20552
|
if (line.trim() === "/images") {
|
|
@@ -20498,6 +20787,7 @@ ${lines}` : lines;
|
|
|
20498
20787
|
hostApprovalPrompt = null;
|
|
20499
20788
|
childShellApprovals.close();
|
|
20500
20789
|
sessionEnded = true;
|
|
20790
|
+
closeRender();
|
|
20501
20791
|
scrollAnimator.cancel();
|
|
20502
20792
|
if (resizeTimer !== null) {
|
|
20503
20793
|
clearTimeout(resizeTimer);
|
|
@@ -20571,7 +20861,7 @@ ${lines}` : lines;
|
|
|
20571
20861
|
onApprove: createSnapshotGuardedApproval("local", () => state.permissionGrants, approveLocalConfirms),
|
|
20572
20862
|
onApproved: async (approvedGate) => {
|
|
20573
20863
|
if (approvedGate.kind !== "confirm") return null;
|
|
20574
|
-
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-
|
|
20864
|
+
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-SIRXPUFR.js");
|
|
20575
20865
|
const hostResult = await executeApprovedCredentialCreate({
|
|
20576
20866
|
gate: approvedGate,
|
|
20577
20867
|
approvalGateId: approvedGate.id,
|
|
@@ -20757,6 +21047,7 @@ ${err.message}` : ""}`)
|
|
|
20757
21047
|
}
|
|
20758
21048
|
};
|
|
20759
21049
|
let autoScrollDirection = "up";
|
|
21050
|
+
let scrollbarDrag = null;
|
|
20760
21051
|
const autoScrollStep = () => autoScrollStepForTicks(++autoScrollTicks);
|
|
20761
21052
|
const startAutoScroll = (direction, mouseX) => {
|
|
20762
21053
|
autoScrollDirection = direction;
|
|
@@ -20980,10 +21271,12 @@ ${err.message}` : ""}`)
|
|
|
20980
21271
|
}
|
|
20981
21272
|
if (res.action?.type === "theme-refresh") {
|
|
20982
21273
|
state = res.nextState;
|
|
21274
|
+
resetPtyxisCanvasCache();
|
|
20983
21275
|
const detected2 = await detectTerminalBackground({
|
|
20984
21276
|
stdin: input,
|
|
20985
21277
|
stdout: output,
|
|
20986
|
-
allowSystemFallback: true
|
|
21278
|
+
allowSystemFallback: true,
|
|
21279
|
+
trustHostCanvas: true
|
|
20987
21280
|
});
|
|
20988
21281
|
let refreshMsg = "";
|
|
20989
21282
|
if (detected2 && applyDetectedBackground(detected2)) {
|
|
@@ -21081,8 +21374,9 @@ ${hint}` : hint;
|
|
|
21081
21374
|
if (done) return;
|
|
21082
21375
|
const approvalOwnsKeyboard = hostApprovalPrompt?.isActive() ?? false;
|
|
21083
21376
|
if (approvalOwnsKeyboard && hostApprovalPrompt?.handleKey(sequence, {
|
|
21084
|
-
draftEmpty: buffer.length === 0,
|
|
21085
|
-
busy
|
|
21377
|
+
draftEmpty: buffer.length === 0 && state.attachedImages.length === 0 && !preparingImageSubmission && !pendingPasteImagePromise && clipboardReadsInFlight === 0,
|
|
21378
|
+
busy,
|
|
21379
|
+
canApproveDuringTurn: activeTurnAbort !== null && !activeTurnAbort.signal.aborted
|
|
21086
21380
|
})) return;
|
|
21087
21381
|
if (!approvalOwnsKeyboard && secretInputCoordinator.isActive()) {
|
|
21088
21382
|
secretInputCoordinator.handleToken(sequence);
|
|
@@ -21173,16 +21467,44 @@ ${hint}` : hint;
|
|
|
21173
21467
|
getTopReservedRows(output)
|
|
21174
21468
|
)
|
|
21175
21469
|
);
|
|
21176
|
-
const { contentWidth, marginLeft } = resolveHistoryLayoutGeometry(columns);
|
|
21470
|
+
const { contentWidth, marginLeft, marginRight } = resolveHistoryLayoutGeometry(columns);
|
|
21177
21471
|
const screenRow = mouseEvent.y - 1 - getTopReservedRows(output);
|
|
21178
21472
|
const screenCol = mouseEvent.x - 1;
|
|
21179
21473
|
const hitContentCol = screenCol - marginLeft;
|
|
21180
21474
|
const contentCol = Math.max(0, Math.min(contentWidth, screenCol - marginLeft));
|
|
21181
21475
|
if (mouseEvent.kind === "press" && mouseEvent.button === "left") {
|
|
21476
|
+
scrollbarDrag = null;
|
|
21182
21477
|
if (screenRow < 0) return;
|
|
21183
21478
|
stopAutoScroll();
|
|
21184
21479
|
clearSelectionCopyFeedback();
|
|
21185
21480
|
scrollAnimator.cancel();
|
|
21481
|
+
if (!mouseEvent.ctrl && screenRow < visibleHeight && isScrollbarColumnHit(screenCol, columns, marginRight)) {
|
|
21482
|
+
const { totalLines } = getAllTurnEntries(history, contentWidth);
|
|
21483
|
+
const geom = computeScrollbarGeometry(
|
|
21484
|
+
visibleHeight,
|
|
21485
|
+
totalLines,
|
|
21486
|
+
history.scrollTop
|
|
21487
|
+
);
|
|
21488
|
+
if (geom) {
|
|
21489
|
+
clearSelection();
|
|
21490
|
+
if (screenRow >= geom.thumbTop && screenRow < geom.thumbBottom) {
|
|
21491
|
+
scrollbarDrag = { grabOffset: screenRow - geom.thumbTop };
|
|
21492
|
+
} else {
|
|
21493
|
+
const grabOffset = Math.floor(geom.thumbSize / 2);
|
|
21494
|
+
scrollbarDrag = { grabOffset };
|
|
21495
|
+
const nextTop = scrollTopFromScrollbarDrag(
|
|
21496
|
+
screenRow,
|
|
21497
|
+
grabOffset,
|
|
21498
|
+
visibleHeight,
|
|
21499
|
+
totalLines
|
|
21500
|
+
);
|
|
21501
|
+
history.scrollTop = nextTop;
|
|
21502
|
+
history.followBottom = nextTop >= geom.maxScrollTop;
|
|
21503
|
+
}
|
|
21504
|
+
paintFrame(buffer);
|
|
21505
|
+
return;
|
|
21506
|
+
}
|
|
21507
|
+
}
|
|
21186
21508
|
if (mouseEvent.ctrl && screenRow < visibleHeight && hitContentCol >= 0 && hitContentCol < contentWidth && openVisibleUrlAtScreen(
|
|
21187
21509
|
history,
|
|
21188
21510
|
contentWidth,
|
|
@@ -21220,6 +21542,27 @@ ${hint}` : hint;
|
|
|
21220
21542
|
return;
|
|
21221
21543
|
}
|
|
21222
21544
|
if (mouseEvent.kind === "drag" && mouseEvent.button === "left") {
|
|
21545
|
+
if (scrollbarDrag) {
|
|
21546
|
+
const { totalLines } = getAllTurnEntries(history, contentWidth);
|
|
21547
|
+
const geom = computeScrollbarGeometry(
|
|
21548
|
+
visibleHeight,
|
|
21549
|
+
totalLines,
|
|
21550
|
+
history.scrollTop
|
|
21551
|
+
);
|
|
21552
|
+
if (geom) {
|
|
21553
|
+
const clampedRow2 = Math.max(0, Math.min(visibleHeight - 1, screenRow));
|
|
21554
|
+
const nextTop = scrollTopFromScrollbarDrag(
|
|
21555
|
+
clampedRow2,
|
|
21556
|
+
scrollbarDrag.grabOffset,
|
|
21557
|
+
visibleHeight,
|
|
21558
|
+
totalLines
|
|
21559
|
+
);
|
|
21560
|
+
history.scrollTop = nextTop;
|
|
21561
|
+
history.followBottom = nextTop >= geom.maxScrollTop;
|
|
21562
|
+
paintFrame(buffer);
|
|
21563
|
+
}
|
|
21564
|
+
return;
|
|
21565
|
+
}
|
|
21223
21566
|
if (!selectionState.anchor) return;
|
|
21224
21567
|
selectionState.dragging = true;
|
|
21225
21568
|
lastDragMouseX = mouseEvent.x;
|
|
@@ -21247,6 +21590,28 @@ ${hint}` : hint;
|
|
|
21247
21590
|
}
|
|
21248
21591
|
if (mouseEvent.kind === "release") {
|
|
21249
21592
|
stopAutoScroll();
|
|
21593
|
+
if (scrollbarDrag) {
|
|
21594
|
+
const { totalLines } = getAllTurnEntries(history, contentWidth);
|
|
21595
|
+
const geom = computeScrollbarGeometry(
|
|
21596
|
+
visibleHeight,
|
|
21597
|
+
totalLines,
|
|
21598
|
+
history.scrollTop
|
|
21599
|
+
);
|
|
21600
|
+
if (geom) {
|
|
21601
|
+
const clampedRow = Math.max(0, Math.min(visibleHeight - 1, screenRow));
|
|
21602
|
+
const nextTop = scrollTopFromScrollbarDrag(
|
|
21603
|
+
clampedRow,
|
|
21604
|
+
scrollbarDrag.grabOffset,
|
|
21605
|
+
visibleHeight,
|
|
21606
|
+
totalLines
|
|
21607
|
+
);
|
|
21608
|
+
history.scrollTop = nextTop;
|
|
21609
|
+
history.followBottom = nextTop >= geom.maxScrollTop;
|
|
21610
|
+
}
|
|
21611
|
+
scrollbarDrag = null;
|
|
21612
|
+
paintFrame(buffer);
|
|
21613
|
+
return;
|
|
21614
|
+
}
|
|
21250
21615
|
if (selectionState.dragging && selectionState.anchor) {
|
|
21251
21616
|
const clampedRow = Math.max(0, Math.min(visibleHeight - 1, screenRow));
|
|
21252
21617
|
const releaseHit = hitTestHistory(
|
|
@@ -21445,6 +21810,28 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21445
21810
|
await handleBusyLocalSlash(submittedText, busySlashCommand);
|
|
21446
21811
|
return;
|
|
21447
21812
|
}
|
|
21813
|
+
const busyDirectImage = DIRECT_IMAGE_COPY_RE.exec(trimmedText.trim());
|
|
21814
|
+
if (busyDirectImage) {
|
|
21815
|
+
const targetIndex = Number(busyDirectImage[1]);
|
|
21816
|
+
recordWorkspaceInputHistory(expandedSubmitForHistory);
|
|
21817
|
+
bumpDraftEpoch();
|
|
21818
|
+
buffer = "";
|
|
21819
|
+
cursorPos = 0;
|
|
21820
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
21821
|
+
await copyConversationImagePathByIndex(targetIndex, (text) => printStreamSafeNotice(text, { dim: false }));
|
|
21822
|
+
return;
|
|
21823
|
+
}
|
|
21824
|
+
if (trimmedText.trim() === "/images") {
|
|
21825
|
+
printStreamSafeNotice(
|
|
21826
|
+
themeText(
|
|
21827
|
+
"! \u4EFB\u52A1\u4ECD\u5728\u6267\u884C\uFF1A`/images` \u83DC\u5355\u8981\u7B49\u672C\u8F6E\u7ED3\u675F\u540E\u518D\u7528\uFF1B\u73B0\u5728\u53EF\u7528 `/images <\u5E8F\u53F7>` \u590D\u5236\u8DEF\u5F84\u3002",
|
|
21828
|
+
"warning",
|
|
21829
|
+
resolveCliColorEnabled()
|
|
21830
|
+
),
|
|
21831
|
+
{ dim: false }
|
|
21832
|
+
);
|
|
21833
|
+
return;
|
|
21834
|
+
}
|
|
21448
21835
|
const { actionGateHandler, confirmDestructiveAction } = buildInteractiveTurnHandlers();
|
|
21449
21836
|
const binding = ensureChatQueueBinding(turnCtx, actionGateHandler, confirmDestructiveAction);
|
|
21450
21837
|
const busyImages = detectSubmittedImagePaths(submittedText, state.cwd);
|
|
@@ -21622,12 +22009,25 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21622
22009
|
{
|
|
21623
22010
|
onOsc11Background: (bg) => {
|
|
21624
22011
|
sawOsc11Reply = true;
|
|
22012
|
+
if (isPtyxisTerminal()) return;
|
|
21625
22013
|
startOsc11AutoThemePoll();
|
|
21626
22014
|
applyLiveTerminalBackground(bg);
|
|
21627
22015
|
},
|
|
21628
22016
|
onColorSchemeReport: (scheme) => {
|
|
22017
|
+
if (isPtyxisTerminal()) {
|
|
22018
|
+
resetPtyxisCanvasCache();
|
|
22019
|
+
void detectTerminalBackground({
|
|
22020
|
+
stdin: input,
|
|
22021
|
+
stdout: output,
|
|
22022
|
+
allowSystemFallback: true,
|
|
22023
|
+
trustHostCanvas: true
|
|
22024
|
+
}).then((next) => {
|
|
22025
|
+
if (next) applyLiveTerminalBackground(next);
|
|
22026
|
+
});
|
|
22027
|
+
return;
|
|
22028
|
+
}
|
|
21629
22029
|
if (!sawOsc11Reply) {
|
|
21630
|
-
applyLiveTerminalBackground({ brightness: scheme, hex: "" });
|
|
22030
|
+
applyLiveTerminalBackground({ brightness: scheme, hex: "", trustedCanvas: true });
|
|
21631
22031
|
}
|
|
21632
22032
|
if (!sessionEnded && !done && fixedInput.active && !fixedInput.isPaused()) {
|
|
21633
22033
|
output.write(OSC11_QUERY);
|
|
@@ -21655,6 +22055,8 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21655
22055
|
composerDecoderDrain = () => onData.destroy();
|
|
21656
22056
|
hostApprovalPrompt = createInlineHostApprovalPrompt({
|
|
21657
22057
|
dialogHost,
|
|
22058
|
+
output,
|
|
22059
|
+
colorEnabled: resolveCliColorEnabled(),
|
|
21658
22060
|
write: (text) => {
|
|
21659
22061
|
emitCommandOutput(text.replace(/\n$/, ""));
|
|
21660
22062
|
},
|
|
@@ -21672,7 +22074,7 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21672
22074
|
input.once("close", finish);
|
|
21673
22075
|
if (history.turns.length) renderHistoryToOutput();
|
|
21674
22076
|
fixedInput.repaint(buffer, cursorPos);
|
|
21675
|
-
if (!sawOsc11Reply && isTerminalDevice(input)) requestTerminalBackgroundQuery();
|
|
22077
|
+
if (!sawOsc11Reply && isTerminalDevice(input) && !isPtyxisTerminal()) requestTerminalBackgroundQuery();
|
|
21676
22078
|
refreshGitStatus();
|
|
21677
22079
|
refreshCiStatus();
|
|
21678
22080
|
await new Promise((resolve4) => {
|
|
@@ -21743,6 +22145,7 @@ ${renderStatusLine(state)}
|
|
|
21743
22145
|
}
|
|
21744
22146
|
childShellApprovals.close();
|
|
21745
22147
|
sessionEnded = true;
|
|
22148
|
+
closeRender();
|
|
21746
22149
|
runRegistryPoller.dispose();
|
|
21747
22150
|
idleHeapReleaser.cancel();
|
|
21748
22151
|
runCompletionWatcher.dispose();
|
|
@@ -21751,6 +22154,7 @@ ${renderStatusLine(state)}
|
|
|
21751
22154
|
rl.close();
|
|
21752
22155
|
}
|
|
21753
22156
|
} finally {
|
|
22157
|
+
cleanupTitle?.();
|
|
21754
22158
|
accountSessionRuntime.dispose();
|
|
21755
22159
|
}
|
|
21756
22160
|
}
|