nolo-cli 0.250.0-alpha.1 → 0.252.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/{_executeModel-F4MT6OPO.js → _executeModel-D6G3B45S.js} +51 -51
- package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
- package/{addContentAction-MLI6GOBV.js → addContentAction-MB22YIDV.js} +6 -6
- package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
- package/{agentDeleteCommand-DBCRHB4S.js → agentDeleteCommand-YCWDGJSF.js} +87 -82
- package/{agentEmailCommands-T4PAJ4KG.js → agentEmailCommands-DTWD5FWC.js} +87 -82
- package/{agentListCommands-5ULWKQ3E.js → agentListCommands-JTOONLYL.js} +233 -46
- package/{agentMachineCommands-65QUOCEY.js → agentMachineCommands-25X7OTLQ.js} +38 -36
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
- package/{agentRecordCommands-EKANS3A5.js → agentRecordCommands-SXE3WV2X.js} +86 -81
- package/{agentRunCommand-336PXBRJ.js → agentRunCommand-QSIED54S.js} +87 -82
- package/{agentRunControl-QMWTWV7C.js → agentRunControl-KNNDEEDI.js} +8 -6
- package/{agentRuntimeLocal-KKXJOBD3.js → agentRuntimeLocal-HVJJMB4W.js} +32 -31
- package/{agentSlice-FWYXP332.js → agentSlice-NBUJJVRI.js} +7 -7
- package/{appDeleteCommands-ERJK367V.js → appDeleteCommands-YU6TT6VN.js} +39 -37
- package/{appDeployCommands-LUV6QKQJ.js → appDeployCommands-4DEIX7YP.js} +39 -37
- package/{appDeployStatusCommands-WW7IYQD4.js → appDeployStatusCommands-3VKS6GBQ.js} +39 -37
- package/{appGetCommands-G7XYYSFO.js → appGetCommands-22FNNROT.js} +39 -37
- package/{appListCommands-4RXCIDNI.js → appListCommands-FVGMLHVU.js} +39 -37
- package/{authCommand-3C3RN4OU.js → authCommand-5DC3ES4Q.js} +15 -15
- package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
- package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-AA555ANS.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/chunk-2GAUJDA5.js +594 -0
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
- package/{chunk-W4G25PVP.js → chunk-2PB653F5.js} +196 -253
- package/{chunk-UF6J7NXV.js → chunk-3272HU62.js} +1 -1
- package/chunk-3A5NNQCN.js +64 -0
- package/{chunk-7IQA2VJF.js → chunk-3N3JPQBQ.js} +210 -56
- package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-ADOOL3PG.js → chunk-52M4RYVP.js} +1 -1
- package/{chunk-U7OMQLRE.js → chunk-5IN2NBDX.js} +9 -9
- package/{chunk-BAH3BAUZ.js → chunk-5QEOTC35.js} +5 -5
- package/{chunk-E5RYFR7E.js → chunk-5UYDG6HP.js} +19 -0
- package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
- package/{chunk-YWNCRUBZ.js → chunk-7XO73H5X.js} +116 -6
- package/{chunk-SMEX763N.js → chunk-7ZOVFB2H.js} +100 -43
- package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
- package/{chunk-ZKMS73DK.js → chunk-A6VIMCWI.js} +3 -3
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
- package/{chunk-HZDK56EK.js → chunk-CO2NXG2J.js} +32 -10
- package/{chunk-OHUYN3YU.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-VV5IS3ES.js → chunk-DU3DJYVA.js} +5 -5
- package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
- package/{chunk-73PZD7JZ.js → chunk-EG3JTV7H.js} +2 -2
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
- package/{chunk-TMRJGSK2.js → chunk-FRC2DNTN.js} +1 -1
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-I3J7HO3U.js → chunk-FZI2P64R.js} +137 -53
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-XHG7QROB.js → chunk-GO7UC5VH.js} +5 -5
- package/{chunk-RDBDHGU7.js → chunk-GVH2IP2M.js} +5 -5
- package/{chunk-AXZ5DDLB.js → chunk-GWS2X7TX.js} +235 -120
- package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
- package/{chunk-ATRU65OK.js → chunk-HMREADP6.js} +21 -19
- package/chunk-HZD5HXUO.js +405 -0
- package/{chunk-VHMPJGT4.js → chunk-ITCOQAHS.js} +3 -3
- package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-FFFKAOJN.js → chunk-JAYPSNGR.js} +1 -1
- package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
- package/{chunk-3IVFGQIM.js → chunk-JF5QT3YY.js} +2 -2
- package/{chunk-V4IYI3SB.js → chunk-JKALGWDL.js} +2 -2
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HEIIOJGN.js → chunk-LAQC5FAP.js} +4 -4
- package/{chunk-I3OW5RAX.js → chunk-LNIA5JVX.js} +8 -8
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-SHDJLJWV.js → chunk-N2ZAY2DK.js} +1 -1
- package/{chunk-WEZ27JA7.js → chunk-NMXGIRSG.js} +1 -1
- package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
- package/{chunk-ARFCL53U.js → chunk-NPUHKEOB.js} +4 -4
- package/{chunk-32WTED6G.js → chunk-O6LPLIRS.js} +94 -83
- package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-UPOW5HTG.js → chunk-OMIXG25B.js} +2 -2
- package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-OKKA4BCM.js → chunk-P6HMEKLL.js} +114 -56
- package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
- package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
- package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
- package/{chunk-6TVYUQRM.js → chunk-QV32GSVO.js} +2 -2
- package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
- package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
- package/{chunk-JFRJEPFI.js → chunk-SMZFWEMX.js} +1 -1
- package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
- package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
- package/{chunk-OLGFIQN2.js → chunk-T4VVQHSE.js} +1 -1
- package/{chunk-6QL3SUEK.js → chunk-TDI7ARZO.js} +3 -3
- package/{chunk-X6LYQDN5.js → chunk-TDLZA6LJ.js} +13 -10
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-WMKA2DPK.js → chunk-TTUIM3PJ.js} +4 -4
- package/{chunk-RHBD22LV.js → chunk-TTWNTFTO.js} +39 -4
- package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
- package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-BVEDT6DM.js → chunk-VH7AQEEF.js} +3 -3
- package/{chunk-PGDM7AM2.js → chunk-WAOHK3NJ.js} +9 -9
- package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
- package/{chunk-ZTWDSOXD.js → chunk-WNIBQBOR.js} +1 -1
- package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
- package/{chunk-AKWA6PCE.js → chunk-YQYYYATY.js} +45 -27
- package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
- package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
- package/{chunk-YQO5UKHP.js → chunk-ZNOXY73P.js} +632 -124
- package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-FKBPFPKR.js} +7 -7
- package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
- package/{cliLocalAgentRecordReader-R4CLUHYO.js → cliLocalAgentRecordReader-DWU3LBO2.js} +36 -35
- package/{commandRegistry-UIZRI4JV.js → commandRegistry-7FVATZS2.js} +74 -74
- package/{contentThunks-ZQSZA4GH.js → contentThunks-25XCB7VY.js} +20 -20
- package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-PT5L4LNB.js} +3 -3
- package/{createAgentAutomationAction-RQE4F6PR.js → createAgentAutomationAction-FC5RI2LW.js} +20 -20
- package/{createDialogAction-JDSMQ34U.js → createDialogAction-IL3ISSQQ.js} +21 -21
- package/{createPageAction-VLF6XCYO.js → createPageAction-RVYBEYZV.js} +23 -23
- package/{db-CMUTP3W5.js → db-JMGVD4TB.js} +4 -2
- package/{dbSlice-656PMWR2.js → dbSlice-WG3ZG6PZ.js} +5 -5
- package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
- package/{dialogCommands-PLM7ZFWH.js → dialogCommands-VUJISJZF.js} +48 -42
- package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-JKYVSR6K.js} +8 -8
- package/{dialogSlice-63DD2ER2.js → dialogSlice-UMP55UAW.js} +18 -18
- package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-IHAXS7DW.js} +5 -5
- package/{docCreateCommands-BST5DO7L.js → docCreateCommands-S46F6GKP.js} +38 -36
- package/{docDeleteCommands-YE6G2SO4.js → docDeleteCommands-LJG4NK6J.js} +39 -37
- package/{docReadCommands-M6T35U3G.js → docReadCommands-YPAYGHNM.js} +38 -36
- package/{docStore-7QNJWRJ2.js → docStore-VK3MVJ5Q.js} +6 -6
- package/{docUpdateCommands-6DFWGPVG.js → docUpdateCommands-MPTM6267.js} +38 -36
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-FCEFFAV4.js → handleSendMessageAction-VPKVNKBU.js} +83 -41
- package/{hostCredentialCreate-YEWCAMZN.js → hostCredentialCreate-K56HWPNY.js} +86 -81
- package/index.js +23 -11
- package/{localDialogRead-CIOTQM5T.js → localDialogRead-NXILOV3T.js} +1 -1
- package/{localRuntimeAdapter-Z22ZOZRY.js → localRuntimeAdapter-KVU72FWT.js} +84 -79
- package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
- package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
- package/{machineCommands-PT5OJ36V.js → machineCommands-C3O5RKNJ.js} +85 -80
- package/{machineWsRunDispatch-DQVNBSVE.js → machineWsRunDispatch-ZLART7ZA.js} +85 -80
- package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
- package/{mcpLocalAuthorizeCommand-GO6AYT63.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +15 -11
- package/{memberThunks-JFYC4Z5L.js → memberThunks-7DNR6DRD.js} +7 -7
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +2 -1
- package/{projectArchive-4XUC5SLF.js → projectArchive-UBJFYRL7.js} +23 -23
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
- package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
- package/{readlineWorkspace-7U5QM3OM.js → readlineWorkspace-TSIYF7C6.js} +655 -248
- package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
- package/{runAgentClientLoop-7D7UCAS2.js → runAgentClientLoop-YAHGOWXN.js} +48 -48
- package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-QGZSKNSE.js} +14 -11
- package/{secretCommands-2FEMRUFM.js → secretCommands-BXAQEOES.js} +2 -2
- package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
- package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
- package/{settingThunks-IHXUF276.js → settingThunks-YQNG5L6K.js} +5 -5
- package/{spaceCommands-WCLD36WH.js → spaceCommands-P644AAZZ.js} +37 -35
- package/{streamAgentChatTurn-DVTOINT3.js → streamAgentChatTurn-5CSYAUAY.js} +81 -77
- package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
- package/{tools-BOPINT5S.js → tools-UZ3CDIR2.js} +38 -38
- package/{tuiRestart-5F2APN66.js → tuiRestart-GF4DGAAN.js} +7 -7
- package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +13 -13
- package/{updateCommands-FBYA5WVG.js → updateCommands-BZ4YDHNM.js} +3 -3
- package/{updateDialogTitleAction-S76PUCLQ.js → updateDialogTitleAction-53XCCDK2.js} +20 -20
- package/{usageCommand-L4OFWXEU.js → usageCommand-XVJ7ZUTM.js} +2 -2
- package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-NK6S3D4J.js} +3 -3
- package/{windowsSelfUpdate-M4V77OUB.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-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveAuthGuidanceState
|
|
3
|
+
} from "./chunk-4YPH5KRA.js";
|
|
1
4
|
import {
|
|
2
5
|
fetchCiStatus,
|
|
3
6
|
summarizeLatest
|
|
4
7
|
} from "./chunk-U5LOKQ2R.js";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
getRestartBlocker,
|
|
10
|
+
hasRestartBlockingRuns
|
|
11
|
+
} from "./chunk-WNIBQBOR.js";
|
|
8
12
|
import {
|
|
9
13
|
runAnthropicOAuthLogin,
|
|
10
14
|
runCursorOAuthLogin,
|
|
@@ -12,7 +16,7 @@ import {
|
|
|
12
16
|
runXaiOAuthDeviceCode,
|
|
13
17
|
runXaiOAuthLogin,
|
|
14
18
|
syncCredentialToServer
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5QEOTC35.js";
|
|
16
20
|
import {
|
|
17
21
|
createAccountSessionCore,
|
|
18
22
|
createDeviceAuthorizationProtocol,
|
|
@@ -20,17 +24,17 @@ import {
|
|
|
20
24
|
parseStoredTokenEntries,
|
|
21
25
|
parseUserToken,
|
|
22
26
|
saveTokenLogin
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EFM2IPZR.js";
|
|
24
28
|
import {
|
|
25
29
|
listFavoriteAgentIdsAcrossServers,
|
|
26
30
|
listLocalCachedAgents,
|
|
27
31
|
listRemoteAgents,
|
|
28
32
|
listRemoteAgentsAcrossServers,
|
|
29
33
|
normalizeListedAgent
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2LANL4B5.js";
|
|
31
35
|
import {
|
|
32
36
|
runCloudflareOAuthLogin
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3272HU62.js";
|
|
34
38
|
import {
|
|
35
39
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
36
40
|
MAX_URL_LENGTH,
|
|
@@ -108,8 +112,9 @@ import {
|
|
|
108
112
|
themeColorSequence,
|
|
109
113
|
themeText,
|
|
110
114
|
toolRowDetailLine,
|
|
111
|
-
tuiRenderThemeFingerprint
|
|
112
|
-
|
|
115
|
+
tuiRenderThemeFingerprint,
|
|
116
|
+
userBubbleSurfaceBackgroundSequence
|
|
117
|
+
} from "./chunk-7ZOVFB2H.js";
|
|
113
118
|
import "./chunk-6QDYSCPW.js";
|
|
114
119
|
import "./chunk-GAHJLSDO.js";
|
|
115
120
|
import {
|
|
@@ -117,7 +122,7 @@ import {
|
|
|
117
122
|
} from "./chunk-P27E22MA.js";
|
|
118
123
|
import {
|
|
119
124
|
getReadableCliDb
|
|
120
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-SSZHE2RK.js";
|
|
121
126
|
import {
|
|
122
127
|
buildCliNoticeText,
|
|
123
128
|
buildNoticeTasksFromRuns,
|
|
@@ -133,12 +138,12 @@ import {
|
|
|
133
138
|
renderNoticeElements,
|
|
134
139
|
resolveNoticeTitle,
|
|
135
140
|
setTurnNoticeMeta
|
|
136
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-GWS2X7TX.js";
|
|
137
142
|
import {
|
|
138
143
|
createHostApprovalCardQueue,
|
|
139
144
|
formatApprovalRemaining,
|
|
140
145
|
registerHostApprovalRenderer
|
|
141
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-NMXGIRSG.js";
|
|
142
147
|
import "./chunk-FE7G6DSP.js";
|
|
143
148
|
import {
|
|
144
149
|
ANSI_ESCAPE_REGEX,
|
|
@@ -165,23 +170,8 @@ import {
|
|
|
165
170
|
wrapTextToLines,
|
|
166
171
|
wrapTranscriptLine,
|
|
167
172
|
wrapTranscriptLineWithLayout
|
|
168
|
-
} from "./chunk-
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-VTHWBTRE.js";
|
|
171
|
-
import "./chunk-U6RD332P.js";
|
|
172
|
-
import "./chunk-WOAZVUSN.js";
|
|
173
|
-
import {
|
|
174
|
-
getRestartBlocker,
|
|
175
|
-
hasRestartBlockingRuns
|
|
176
|
-
} from "./chunk-ZTWDSOXD.js";
|
|
177
|
-
import "./chunk-4D4QD7FT.js";
|
|
178
|
-
import "./chunk-PVFYPUIM.js";
|
|
179
|
-
import "./chunk-53W5BXLN.js";
|
|
180
|
-
import "./chunk-QHEN7NZ7.js";
|
|
181
|
-
import "./chunk-IIRJ4P4I.js";
|
|
182
|
-
import "./chunk-C5A54QS7.js";
|
|
183
|
-
import "./chunk-6RSNVJGO.js";
|
|
184
|
-
import "./chunk-324FWHUA.js";
|
|
173
|
+
} from "./chunk-QV32GSVO.js";
|
|
174
|
+
import "./chunk-GIXWVN2W.js";
|
|
185
175
|
import {
|
|
186
176
|
DIALOG_NOTIFY_SOURCE,
|
|
187
177
|
ensureDialogNotifyDir,
|
|
@@ -193,48 +183,59 @@ import {
|
|
|
193
183
|
resolveDialogNotifyRoot,
|
|
194
184
|
writeAck,
|
|
195
185
|
writeLease
|
|
196
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-CYGFNMCH.js";
|
|
187
|
+
import "./chunk-PENRYZ4D.js";
|
|
188
|
+
import "./chunk-U6RD332P.js";
|
|
189
|
+
import "./chunk-WOAZVUSN.js";
|
|
190
|
+
import "./chunk-VIWDGTDA.js";
|
|
191
|
+
import "./chunk-4D4QD7FT.js";
|
|
192
|
+
import "./chunk-PVFYPUIM.js";
|
|
193
|
+
import "./chunk-53W5BXLN.js";
|
|
194
|
+
import "./chunk-QHEN7NZ7.js";
|
|
195
|
+
import "./chunk-IIRJ4P4I.js";
|
|
196
|
+
import "./chunk-C5A54QS7.js";
|
|
197
|
+
import "./chunk-6RSNVJGO.js";
|
|
198
|
+
import "./chunk-324FWHUA.js";
|
|
197
199
|
import {
|
|
198
200
|
defaultPromptReader,
|
|
199
201
|
setSecret
|
|
200
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-52M4RYVP.js";
|
|
201
203
|
import {
|
|
202
204
|
createTuiSummaryLlmCaller
|
|
203
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-OB4FBZXJ.js";
|
|
204
206
|
import "./chunk-OYUMJMC5.js";
|
|
205
207
|
import "./chunk-R7XWZDOH.js";
|
|
206
208
|
import "./chunk-S73EPYNC.js";
|
|
207
209
|
import "./chunk-ZEZC7IIM.js";
|
|
208
|
-
import "./chunk-VIWDGTDA.js";
|
|
209
|
-
import "./chunk-ATNTHIZI.js";
|
|
210
|
-
import "./chunk-JEXVIMYZ.js";
|
|
211
|
-
import {
|
|
212
|
-
prepareTools
|
|
213
|
-
} from "./chunk-I3J7HO3U.js";
|
|
214
|
-
import "./chunk-HS7MLR74.js";
|
|
215
|
-
import "./chunk-7IQA2VJF.js";
|
|
216
|
-
import "./chunk-KHVTT4WW.js";
|
|
217
|
-
import "./chunk-AMWMV56B.js";
|
|
218
|
-
import "./chunk-MVOZ22RZ.js";
|
|
219
|
-
import "./chunk-WDWZPASX.js";
|
|
220
|
-
import "./chunk-VZCBYCHV.js";
|
|
221
|
-
import "./chunk-JFRJEPFI.js";
|
|
222
210
|
import {
|
|
223
211
|
formatSkillSlashReference,
|
|
224
212
|
parseSkillSlashReference,
|
|
225
213
|
resolveSkillSlashUserPrompt
|
|
226
214
|
} from "./chunk-PRJ473FK.js";
|
|
227
215
|
import "./chunk-BMQ2MJUK.js";
|
|
228
|
-
import "./chunk-
|
|
229
|
-
import "./chunk-
|
|
216
|
+
import "./chunk-ATNTHIZI.js";
|
|
217
|
+
import "./chunk-A5F6DYP2.js";
|
|
218
|
+
import "./chunk-JEXVIMYZ.js";
|
|
219
|
+
import {
|
|
220
|
+
prepareTools
|
|
221
|
+
} from "./chunk-FZI2P64R.js";
|
|
222
|
+
import "./chunk-KZ4A7EIV.js";
|
|
223
|
+
import "./chunk-3N3JPQBQ.js";
|
|
224
|
+
import "./chunk-HF4C5WIU.js";
|
|
225
|
+
import "./chunk-MVOZ22RZ.js";
|
|
226
|
+
import "./chunk-VZCBYCHV.js";
|
|
227
|
+
import "./chunk-WAOHK3NJ.js";
|
|
230
228
|
import "./chunk-NF64D32W.js";
|
|
231
229
|
import "./chunk-WMMKHEGQ.js";
|
|
232
|
-
import "./chunk-
|
|
230
|
+
import "./chunk-WDWZPASX.js";
|
|
231
|
+
import "./chunk-A6VIMCWI.js";
|
|
232
|
+
import "./chunk-SMZFWEMX.js";
|
|
233
233
|
import "./chunk-VF4K2QE6.js";
|
|
234
|
-
import "./chunk-
|
|
235
|
-
import "./chunk-
|
|
236
|
-
import "./chunk-
|
|
237
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-T4VVQHSE.js";
|
|
235
|
+
import "./chunk-F6Q64KRV.js";
|
|
236
|
+
import "./chunk-SMCKJJXI.js";
|
|
237
|
+
import "./chunk-ITCOQAHS.js";
|
|
238
|
+
import "./chunk-TDLZA6LJ.js";
|
|
238
239
|
import {
|
|
239
240
|
createChatQueueRuntime,
|
|
240
241
|
createTurnRequest,
|
|
@@ -242,50 +243,55 @@ import {
|
|
|
242
243
|
historyTokensBeforeLatestAssistant,
|
|
243
244
|
initialChatQueueState,
|
|
244
245
|
normalizeRunCompletionShape
|
|
245
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-ZNOXY73P.js";
|
|
246
247
|
import "./chunk-TZXPT53C.js";
|
|
247
248
|
import "./chunk-BUDVRYES.js";
|
|
248
249
|
import {
|
|
249
250
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
250
251
|
BUILTIN_SUMMARY_LLM_CONFIG
|
|
251
252
|
} from "./chunk-523DITKR.js";
|
|
252
|
-
import "./chunk-
|
|
253
|
-
import "./chunk-
|
|
253
|
+
import "./chunk-YQYYYATY.js";
|
|
254
|
+
import "./chunk-JAYPSNGR.js";
|
|
254
255
|
import "./chunk-BYXBJQAS.js";
|
|
255
|
-
import "./chunk-
|
|
256
|
+
import "./chunk-NPUHKEOB.js";
|
|
256
257
|
import {
|
|
257
258
|
getActiveDialogAgentId
|
|
258
259
|
} from "./chunk-5RGU3J7P.js";
|
|
259
260
|
import "./chunk-UVLYNWIE.js";
|
|
260
261
|
import "./chunk-YNIYE47Z.js";
|
|
261
|
-
import "./chunk-
|
|
262
|
+
import "./chunk-NNUIVAC2.js";
|
|
263
|
+
import "./chunk-JKALGWDL.js";
|
|
262
264
|
import "./chunk-UAD2WT54.js";
|
|
263
|
-
import "./chunk-
|
|
265
|
+
import "./chunk-CO2NXG2J.js";
|
|
264
266
|
import "./chunk-3PVYUPXK.js";
|
|
265
|
-
import "./chunk-
|
|
267
|
+
import "./chunk-UI3Z3HDK.js";
|
|
268
|
+
import {
|
|
269
|
+
getDefaultCliLocalRuntimeDb
|
|
270
|
+
} from "./chunk-7RYODZDD.js";
|
|
266
271
|
import "./chunk-HXER7YJF.js";
|
|
267
272
|
import {
|
|
268
273
|
isHiddenFromDialogList,
|
|
269
274
|
normalizeDialogRecord,
|
|
270
275
|
readDialogSnapshot,
|
|
271
276
|
sortDialogs
|
|
272
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-LNIA5JVX.js";
|
|
273
278
|
import "./chunk-ID4G2MAR.js";
|
|
274
279
|
import {
|
|
275
280
|
listUserRecordsFromServers,
|
|
276
281
|
readLiveDbRecordAfterTombstoneMerge
|
|
277
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-ITMBFT35.js";
|
|
278
283
|
import "./chunk-Y5GCAMGP.js";
|
|
279
284
|
import {
|
|
280
285
|
loadLocalRunChildDialogIds
|
|
281
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-N2ZAY2DK.js";
|
|
282
287
|
import "./chunk-LKZPX6YH.js";
|
|
283
288
|
import {
|
|
284
289
|
deleteDbRecord,
|
|
285
290
|
queryUserRecords,
|
|
286
291
|
readDbRecord
|
|
287
|
-
} from "./chunk-
|
|
288
|
-
import "./chunk-
|
|
292
|
+
} from "./chunk-QMKWSKWA.js";
|
|
293
|
+
import "./chunk-2GAUJDA5.js";
|
|
294
|
+
import "./chunk-AMWMV56B.js";
|
|
289
295
|
import "./chunk-DXWGFL2Z.js";
|
|
290
296
|
import "./chunk-3L2WKC3W.js";
|
|
291
297
|
import {
|
|
@@ -298,7 +304,7 @@ import {
|
|
|
298
304
|
listRunRecordsAsync,
|
|
299
305
|
readRunRecord,
|
|
300
306
|
runAgentStopCommand
|
|
301
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-7XO73H5X.js";
|
|
302
308
|
import {
|
|
303
309
|
clipText,
|
|
304
310
|
formatDuration,
|
|
@@ -314,12 +320,10 @@ import "./chunk-KQHEGELM.js";
|
|
|
314
320
|
import "./chunk-QYPE3TS3.js";
|
|
315
321
|
import "./chunk-U35UUM5K.js";
|
|
316
322
|
import "./chunk-RD3QLZQV.js";
|
|
317
|
-
import "./chunk-
|
|
318
|
-
import "./chunk-
|
|
323
|
+
import "./chunk-U7BP25PE.js";
|
|
324
|
+
import "./chunk-ZMFA2TLE.js";
|
|
319
325
|
import "./chunk-UEILX4EV.js";
|
|
320
|
-
import "./chunk-
|
|
321
|
-
import "./chunk-MTM4LRVG.js";
|
|
322
|
-
import "./chunk-6XVPMGXK.js";
|
|
326
|
+
import "./chunk-YB5D2GK4.js";
|
|
323
327
|
import "./chunk-YHNUDTU4.js";
|
|
324
328
|
import {
|
|
325
329
|
isExternalSessionKind
|
|
@@ -332,20 +336,20 @@ import {
|
|
|
332
336
|
discoverSkills
|
|
333
337
|
} from "./chunk-UHW6SCVK.js";
|
|
334
338
|
import "./chunk-GBWGPTA7.js";
|
|
335
|
-
import "./chunk-
|
|
336
|
-
import "./chunk-
|
|
337
|
-
import "./chunk-
|
|
339
|
+
import "./chunk-HZD5HXUO.js";
|
|
340
|
+
import "./chunk-TRRXYFTR.js";
|
|
341
|
+
import "./chunk-LUPZLKXL.js";
|
|
342
|
+
import "./chunk-3A5NNQCN.js";
|
|
343
|
+
import "./chunk-R3MV2GII.js";
|
|
344
|
+
import "./chunk-SQL7YNED.js";
|
|
338
345
|
import "./chunk-CVMMWN6P.js";
|
|
339
|
-
import {
|
|
340
|
-
getDefaultCliLocalRuntimeDb
|
|
341
|
-
} from "./chunk-BFKJ2RS3.js";
|
|
342
346
|
import "./chunk-GLKOYSRU.js";
|
|
343
347
|
import {
|
|
344
348
|
readDialogMessageRecords
|
|
345
|
-
} from "./chunk-
|
|
346
|
-
import "./chunk-
|
|
349
|
+
} from "./chunk-LAQC5FAP.js";
|
|
350
|
+
import "./chunk-D3WOFN6N.js";
|
|
347
351
|
import "./chunk-JP2BH4NC.js";
|
|
348
|
-
import "./chunk-
|
|
352
|
+
import "./chunk-64ACTEAE.js";
|
|
349
353
|
import {
|
|
350
354
|
RUN_WAKE_CHANNEL_ENV,
|
|
351
355
|
buildLoadSkillExecutor,
|
|
@@ -363,17 +367,20 @@ import {
|
|
|
363
367
|
runTaskStop,
|
|
364
368
|
saveCliPendingUserMessages,
|
|
365
369
|
validateStoredSummary
|
|
366
|
-
} from "./chunk-
|
|
367
|
-
import "./chunk-LHCGKAFO.js";
|
|
370
|
+
} from "./chunk-2PB653F5.js";
|
|
368
371
|
import "./chunk-ZNFJWEN4.js";
|
|
369
|
-
import "./chunk-
|
|
370
|
-
import "./chunk-
|
|
372
|
+
import "./chunk-LHCGKAFO.js";
|
|
373
|
+
import "./chunk-OOV5JN25.js";
|
|
374
|
+
import "./chunk-2E4BYAUE.js";
|
|
371
375
|
import "./chunk-AL3TYDIF.js";
|
|
372
|
-
import "./chunk-EDT65EUE.js";
|
|
373
|
-
import "./chunk-HNUWUO75.js";
|
|
374
376
|
import "./chunk-CHOZJMJS.js";
|
|
375
|
-
import "./chunk-
|
|
376
|
-
import "./chunk-
|
|
377
|
+
import "./chunk-PIVTQRX6.js";
|
|
378
|
+
import "./chunk-HNUWUO75.js";
|
|
379
|
+
import "./chunk-DMPZMYH4.js";
|
|
380
|
+
import "./chunk-TTUIM3PJ.js";
|
|
381
|
+
import "./chunk-BYXBJQAS.js";
|
|
382
|
+
import "./chunk-BZLGPM5B.js";
|
|
383
|
+
import "./chunk-WLHUANWZ.js";
|
|
377
384
|
import "./chunk-56GBUMO5.js";
|
|
378
385
|
import {
|
|
379
386
|
TOOL_GUIDED_SECTION_ORDER,
|
|
@@ -382,27 +389,24 @@ import {
|
|
|
382
389
|
buildRuntimeGuidanceBlocks,
|
|
383
390
|
resolveResponseGuidelines,
|
|
384
391
|
resolveToolGuidedSections
|
|
385
|
-
} from "./chunk-
|
|
386
|
-
import "./chunk-
|
|
387
|
-
import "./chunk-KXOPLLFP.js";
|
|
392
|
+
} from "./chunk-4HAOOY6G.js";
|
|
393
|
+
import "./chunk-ZMXO5G3E.js";
|
|
388
394
|
import {
|
|
389
395
|
classifyFailureSubclass,
|
|
390
396
|
formatQuotaSummary
|
|
391
|
-
} from "./chunk-
|
|
392
|
-
import "./chunk-
|
|
397
|
+
} from "./chunk-LS5KAVFQ.js";
|
|
398
|
+
import "./chunk-FXEPZKNJ.js";
|
|
393
399
|
import "./chunk-X4O7FJF5.js";
|
|
394
|
-
import "./chunk-DMPZMYH4.js";
|
|
395
|
-
import "./chunk-BYXBJQAS.js";
|
|
396
|
-
import "./chunk-SX6AWTNK.js";
|
|
397
400
|
import "./chunk-TLE77UJ5.js";
|
|
398
401
|
import {
|
|
399
402
|
scrubSecrets
|
|
400
|
-
} from "./chunk-
|
|
401
|
-
import "./chunk-
|
|
403
|
+
} from "./chunk-6HL6E7ZD.js";
|
|
404
|
+
import "./chunk-KXOPLLFP.js";
|
|
405
|
+
import "./chunk-DNNPARJK.js";
|
|
402
406
|
import "./chunk-2MBTWINN.js";
|
|
403
407
|
import {
|
|
404
408
|
extractReferenceKeysFromMessage
|
|
405
|
-
} from "./chunk-
|
|
409
|
+
} from "./chunk-CIAV4WK2.js";
|
|
406
410
|
import "./chunk-5ZUL4CUO.js";
|
|
407
411
|
import {
|
|
408
412
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -419,16 +423,16 @@ import {
|
|
|
419
423
|
planCompression,
|
|
420
424
|
runSummaryWithContract,
|
|
421
425
|
serializeMessageContent
|
|
422
|
-
} from "./chunk-
|
|
426
|
+
} from "./chunk-2FZVXOFX.js";
|
|
423
427
|
import "./chunk-H57T64RA.js";
|
|
424
428
|
import "./chunk-UKZX3NHN.js";
|
|
425
|
-
import "./chunk-SR4FE5VD.js";
|
|
426
429
|
import {
|
|
427
430
|
clipCompactText
|
|
428
431
|
} from "./chunk-5MMAK75Q.js";
|
|
432
|
+
import "./chunk-SR4FE5VD.js";
|
|
429
433
|
import "./chunk-USGHJSGO.js";
|
|
430
|
-
import "./chunk-E6A5NHDH.js";
|
|
431
434
|
import "./chunk-KX6YBIHG.js";
|
|
435
|
+
import "./chunk-E6A5NHDH.js";
|
|
432
436
|
import {
|
|
433
437
|
formatToolOverflowMarker,
|
|
434
438
|
getProcessRegistry
|
|
@@ -439,6 +443,7 @@ import {
|
|
|
439
443
|
import {
|
|
440
444
|
estimateTokenCount
|
|
441
445
|
} from "./chunk-PSCNXBYA.js";
|
|
446
|
+
import "./chunk-IVK2KT3H.js";
|
|
442
447
|
import {
|
|
443
448
|
compactWhitespace
|
|
444
449
|
} from "./chunk-DWLEOOGR.js";
|
|
@@ -480,14 +485,14 @@ import "./chunk-OJKUU3LP.js";
|
|
|
480
485
|
import "./chunk-YZMNK53S.js";
|
|
481
486
|
import {
|
|
482
487
|
resolveLocalUserId
|
|
483
|
-
} from "./chunk-
|
|
488
|
+
} from "./chunk-OMIXG25B.js";
|
|
484
489
|
import {
|
|
485
490
|
CURRENT_OPERATOR_USER_ID,
|
|
486
491
|
NOLO_DEFAULT_AGENT_KEY,
|
|
487
492
|
resolveCliAgentKeyInput
|
|
488
493
|
} from "./chunk-BR3GT6MR.js";
|
|
489
|
-
import "./chunk-
|
|
490
|
-
import "./chunk-
|
|
494
|
+
import "./chunk-JCQ3WCQ3.js";
|
|
495
|
+
import "./chunk-UUCYUN6Y.js";
|
|
491
496
|
import {
|
|
492
497
|
canonicalizeToolNames
|
|
493
498
|
} from "./chunk-YLAHYLDQ.js";
|
|
@@ -503,21 +508,22 @@ import {
|
|
|
503
508
|
parsePublicAgentId
|
|
504
509
|
} from "./chunk-M2EJHDJP.js";
|
|
505
510
|
import "./chunk-I42VC5KR.js";
|
|
506
|
-
import "./chunk-
|
|
511
|
+
import "./chunk-P4R5KXU7.js";
|
|
507
512
|
import "./chunk-VIDPVFP3.js";
|
|
508
513
|
import "./chunk-4JH2UMJR.js";
|
|
509
514
|
import "./chunk-U6VC4MU4.js";
|
|
515
|
+
import "./chunk-XRGBJHZX.js";
|
|
510
516
|
import {
|
|
511
517
|
getDiagnostics,
|
|
512
518
|
getProcessRingBuffer,
|
|
513
519
|
resolveDefaultLogPath
|
|
514
|
-
} from "./chunk-
|
|
520
|
+
} from "./chunk-EYLGAEB4.js";
|
|
515
521
|
import {
|
|
516
522
|
checkForCliUpdate,
|
|
517
523
|
getCliInstallChannel,
|
|
518
524
|
probeCliUpdate,
|
|
519
525
|
runSelfUpdateDetailed
|
|
520
|
-
} from "./chunk-
|
|
526
|
+
} from "./chunk-EG3JTV7H.js";
|
|
521
527
|
import {
|
|
522
528
|
parseUserIdFromAuthToken,
|
|
523
529
|
resolveAuthToken,
|
|
@@ -546,7 +552,7 @@ import {
|
|
|
546
552
|
resolveDefaultSpawn,
|
|
547
553
|
spawnProcess
|
|
548
554
|
} from "./chunk-4O22PGNQ.js";
|
|
549
|
-
import "./chunk-
|
|
555
|
+
import "./chunk-FRC2DNTN.js";
|
|
550
556
|
import {
|
|
551
557
|
dailyWelcomeTip,
|
|
552
558
|
getCliLocale,
|
|
@@ -556,19 +562,19 @@ import {
|
|
|
556
562
|
t,
|
|
557
563
|
toolFamilyOf,
|
|
558
564
|
toolLabelVariants
|
|
559
|
-
} from "./chunk-
|
|
560
|
-
import "./chunk-
|
|
561
|
-
import "./chunk-
|
|
565
|
+
} from "./chunk-5UYDG6HP.js";
|
|
566
|
+
import "./chunk-EJQE5HB7.js";
|
|
567
|
+
import "./chunk-6SOWMEAY.js";
|
|
562
568
|
import {
|
|
563
569
|
toErrorMessage
|
|
564
570
|
} from "./chunk-HNMXYYJR.js";
|
|
565
571
|
import {
|
|
566
572
|
resolvePlatformAuthToken
|
|
567
|
-
} from "./chunk-
|
|
568
|
-
import "./chunk-
|
|
573
|
+
} from "./chunk-LVZVSLKO.js";
|
|
574
|
+
import "./chunk-2JHGUL5K.js";
|
|
569
575
|
import "./chunk-3EUW3WEO.js";
|
|
570
576
|
import "./chunk-WWC7I6TA.js";
|
|
571
|
-
import "./chunk-
|
|
577
|
+
import "./chunk-OKH74FML.js";
|
|
572
578
|
import "./chunk-JRTNUU5Z.js";
|
|
573
579
|
import {
|
|
574
580
|
isRecord
|
|
@@ -582,7 +588,7 @@ import {
|
|
|
582
588
|
} from "./chunk-CF7PE763.js";
|
|
583
589
|
import {
|
|
584
590
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
|
|
585
|
-
} from "./chunk-
|
|
591
|
+
} from "./chunk-JPXACKSW.js";
|
|
586
592
|
import {
|
|
587
593
|
asTrimmedLowercaseString
|
|
588
594
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1911,19 +1917,48 @@ function autoScrollStepForTicks(ticks) {
|
|
|
1911
1917
|
if (ticks >= 8) return 3;
|
|
1912
1918
|
return 1;
|
|
1913
1919
|
}
|
|
1914
|
-
function
|
|
1915
|
-
if (totalLines <= visibleHeight) return
|
|
1920
|
+
function computeScrollbarGeometry(visibleHeight, totalLines, scrollTop) {
|
|
1921
|
+
if (visibleHeight <= 0 || totalLines <= visibleHeight) return null;
|
|
1916
1922
|
const trackHeight = visibleHeight;
|
|
1917
1923
|
const thumbSize = Math.max(
|
|
1918
1924
|
1,
|
|
1919
1925
|
Math.floor(visibleHeight * visibleHeight / totalLines)
|
|
1920
1926
|
);
|
|
1921
1927
|
const maxScrollTop = totalLines - visibleHeight;
|
|
1928
|
+
const clampedScrollTop = Math.max(0, Math.min(maxScrollTop, scrollTop));
|
|
1922
1929
|
const thumbTop = Math.floor(
|
|
1923
|
-
|
|
1930
|
+
clampedScrollTop / maxScrollTop * (trackHeight - thumbSize)
|
|
1924
1931
|
);
|
|
1925
|
-
|
|
1926
|
-
|
|
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) {
|
|
1927
1962
|
return "\u2588";
|
|
1928
1963
|
}
|
|
1929
1964
|
return "\u2502";
|
|
@@ -2683,10 +2718,11 @@ function styleAssistantTurn(content, colorEnabled, state = assistantLayoutState(
|
|
|
2683
2718
|
Object.assign(state, { anchored, inToolBlock });
|
|
2684
2719
|
return styledLines.join("\n");
|
|
2685
2720
|
}
|
|
2721
|
+
var USER_BUBBLE_RIGHT_PAD = 2;
|
|
2686
2722
|
function gutterForRole(role, colorEnabled) {
|
|
2687
2723
|
if (role === "user") {
|
|
2688
2724
|
const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
|
|
2689
|
-
const prefix = colorEnabled ? `${accentSeq}\x1B[1m\
|
|
2725
|
+
const prefix = colorEnabled ? `${accentSeq}\x1B[1m\u258C \x1B[0m` : "\u258C ";
|
|
2690
2726
|
return { prefix, prefixWidth: 3 };
|
|
2691
2727
|
}
|
|
2692
2728
|
if (role === "local") {
|
|
@@ -2727,9 +2763,10 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command, stat
|
|
|
2727
2763
|
if (role === "user") {
|
|
2728
2764
|
const logicalLines = content.split("\n");
|
|
2729
2765
|
const accentSeq = colorEnabled ? themeColorSequence("accent") : "";
|
|
2730
|
-
const
|
|
2731
|
-
const
|
|
2732
|
-
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 ";
|
|
2733
2770
|
const boldOn = colorEnabled ? "\x1B[1m" : "";
|
|
2734
2771
|
const boldOff = colorEnabled ? "\x1B[22m" : "";
|
|
2735
2772
|
const fgOff = colorEnabled ? "\x1B[39m" : "";
|
|
@@ -2762,7 +2799,23 @@ function layoutTextRows(role, content, contentWidth, colorEnabled, command, stat
|
|
|
2762
2799
|
}
|
|
2763
2800
|
lineSourceStart += line.length + 1;
|
|
2764
2801
|
}
|
|
2765
|
-
|
|
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
|
+
}));
|
|
2766
2819
|
}
|
|
2767
2820
|
if (role === "local") {
|
|
2768
2821
|
const dimSeq = colorEnabled ? "\x1B[2m" : "";
|
|
@@ -2914,6 +2967,7 @@ function layoutLayoutRowEqual(a, b) {
|
|
|
2914
2967
|
if (a.prefixWidth !== b.prefixWidth) return false;
|
|
2915
2968
|
if ((a.softWrapped ?? false) !== (b.softWrapped ?? false)) return false;
|
|
2916
2969
|
if ((a.softWrapJoiner ?? "") !== (b.softWrapJoiner ?? "")) return false;
|
|
2970
|
+
if ((a.compactSurface ?? false) !== (b.compactSurface ?? false)) return false;
|
|
2917
2971
|
const ma = a.sourceMapping;
|
|
2918
2972
|
const mb = b.sourceMapping;
|
|
2919
2973
|
if (ma || mb) {
|
|
@@ -3111,7 +3165,8 @@ function countTurnLines(role, content, contentWidth, command, options) {
|
|
|
3111
3165
|
}
|
|
3112
3166
|
function turnSeparatorRows(prevRole, role) {
|
|
3113
3167
|
if (prevRole === null) return 0;
|
|
3114
|
-
if (role === "user"
|
|
3168
|
+
if (role === "user") return 2;
|
|
3169
|
+
if (role === "local") return 1;
|
|
3115
3170
|
if (role === "assistant") {
|
|
3116
3171
|
return prevRole === "user" || prevRole === "local" ? 1 : 0;
|
|
3117
3172
|
}
|
|
@@ -3313,16 +3368,18 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3313
3368
|
const themeFingerprint = tuiRenderThemeFingerprint(colorEnabled);
|
|
3314
3369
|
const graphicsEnabled = history.graphicsEnabled === true;
|
|
3315
3370
|
const { entries, totalLines: finalizedLines } = buildTurnOffsets(history, contentWidth);
|
|
3371
|
+
let currentLayoutRows = [];
|
|
3316
3372
|
let currentLines = [];
|
|
3317
3373
|
let currentStart = -1;
|
|
3318
3374
|
if (history.currentRole !== null && history.currentContent) {
|
|
3319
|
-
|
|
3375
|
+
currentLayoutRows = computeStreamingTurnLayoutRows(
|
|
3320
3376
|
history.currentRole,
|
|
3321
3377
|
history.currentContent,
|
|
3322
3378
|
contentWidth,
|
|
3323
3379
|
colorEnabled,
|
|
3324
3380
|
themeFingerprint
|
|
3325
3381
|
);
|
|
3382
|
+
currentLines = currentLayoutRows.map((r) => r.rendered);
|
|
3326
3383
|
const sep = currentTurnSeparator(history);
|
|
3327
3384
|
currentStart = finalizedLines + sep;
|
|
3328
3385
|
}
|
|
@@ -3340,6 +3397,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3340
3397
|
const winStart = history.scrollTop;
|
|
3341
3398
|
const winEnd = Math.min(totalLines, winStart + visibleHeight);
|
|
3342
3399
|
let visibleLines = new Array(visibleHeight).fill("");
|
|
3400
|
+
const visibleCompactSurface = new Array(visibleHeight).fill(false);
|
|
3343
3401
|
const visibleImages = [];
|
|
3344
3402
|
for (let i = 0; i < entries.length; i++) {
|
|
3345
3403
|
const entry = entries[i];
|
|
@@ -3347,6 +3405,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3347
3405
|
const sepRow = entry.startRow - s;
|
|
3348
3406
|
if (sepRow >= winStart && sepRow < winEnd) {
|
|
3349
3407
|
visibleLines[sepRow - winStart] = "";
|
|
3408
|
+
visibleCompactSurface[sepRow - winStart] = false;
|
|
3350
3409
|
}
|
|
3351
3410
|
}
|
|
3352
3411
|
const turnStart = entry.startRow;
|
|
@@ -3372,6 +3431,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3372
3431
|
const interEnd = Math.min(turnEnd, winEnd);
|
|
3373
3432
|
for (let r = interStart; r < interEnd; r++) {
|
|
3374
3433
|
visibleLines[r - winStart] = lines[r - turnStart] ?? "";
|
|
3434
|
+
visibleCompactSurface[r - winStart] = layoutRows[r - turnStart]?.compactSurface === true;
|
|
3375
3435
|
}
|
|
3376
3436
|
if (options?.onVisibleImages) {
|
|
3377
3437
|
collectVisibleImageRows(layoutRows, i, turnStart, winStart, winEnd, visibleImages);
|
|
@@ -3383,6 +3443,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3383
3443
|
const sepRow = currentStart - s;
|
|
3384
3444
|
if (sepRow >= winStart && sepRow < winEnd) {
|
|
3385
3445
|
visibleLines[sepRow - winStart] = "";
|
|
3446
|
+
visibleCompactSurface[sepRow - winStart] = false;
|
|
3386
3447
|
}
|
|
3387
3448
|
}
|
|
3388
3449
|
const currentEnd = currentStart + currentLines.length;
|
|
@@ -3391,6 +3452,7 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3391
3452
|
const interEnd = Math.min(currentEnd, winEnd);
|
|
3392
3453
|
for (let r = interStart; r < interEnd; r++) {
|
|
3393
3454
|
visibleLines[r - winStart] = currentLines[r - currentStart] ?? "";
|
|
3455
|
+
visibleCompactSurface[r - winStart] = currentLayoutRows[r - currentStart]?.compactSurface === true;
|
|
3394
3456
|
}
|
|
3395
3457
|
}
|
|
3396
3458
|
}
|
|
@@ -3407,30 +3469,49 @@ function renderHistory(output, history, inputLines, selection, reservedRows = 0,
|
|
|
3407
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;
|
|
3408
3470
|
const prevLines = isGeometryCompatible ? prevBuffer.lines : void 0;
|
|
3409
3471
|
const outsideRows = /* @__PURE__ */ new Map();
|
|
3410
|
-
const
|
|
3411
|
-
if (row >= winStart && row < winEnd)
|
|
3412
|
-
|
|
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
|
+
}
|
|
3413
3486
|
const index = entries.findIndex((entry) => row >= entry.startRow && row < entry.startRow + entry.lineCount);
|
|
3414
|
-
if (index < 0) return "";
|
|
3415
|
-
let
|
|
3416
|
-
if (!
|
|
3417
|
-
|
|
3418
|
-
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);
|
|
3419
3492
|
}
|
|
3420
|
-
|
|
3493
|
+
const layoutRow = layoutRows[row - entries[index].startRow];
|
|
3494
|
+
return {
|
|
3495
|
+
line: layoutRow?.rendered ?? "",
|
|
3496
|
+
compactSurface: layoutRow?.compactSurface === true
|
|
3497
|
+
};
|
|
3421
3498
|
};
|
|
3422
|
-
const surfaceOf = (line) => colorEnabled ? line.match(/\x1b\[(?:48;2;[0-9;]+|100)m/)?.[0] ?? "" : "";
|
|
3423
|
-
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
|
+
);
|
|
3424
3503
|
for (let start = 0; colorEnabled && start < winEnd - winStart; start++) {
|
|
3425
3504
|
if (stripAnsi(visibleLines[start] ?? "").trim()) continue;
|
|
3426
3505
|
let end = start;
|
|
3427
3506
|
while (end < winEnd - winStart && !stripAnsi(visibleLines[end] ?? "").trim()) end++;
|
|
3428
3507
|
let before = winStart + start - 1;
|
|
3429
|
-
while (before >= 0 && !stripAnsi(
|
|
3508
|
+
while (before >= 0 && !stripAnsi(transcriptRowInfo(before).line).trim()) before--;
|
|
3430
3509
|
let after = winStart + end;
|
|
3431
|
-
while (after < totalLines && !stripAnsi(
|
|
3432
|
-
const
|
|
3433
|
-
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) : "";
|
|
3434
3515
|
if (preceding && following) rowSurfaces.fill(preceding, start, end);
|
|
3435
3516
|
start = end - 1;
|
|
3436
3517
|
}
|
|
@@ -6255,7 +6336,6 @@ async function runSecretInputDialog(args) {
|
|
|
6255
6336
|
|
|
6256
6337
|
// packages/cli/client/browserApprovalCopy.ts
|
|
6257
6338
|
var actions = /* @__PURE__ */ new Map([
|
|
6258
|
-
["click", "Click a control"],
|
|
6259
6339
|
["type", "Enter text"],
|
|
6260
6340
|
["press", "Press a key"],
|
|
6261
6341
|
["set_select_value", "Select an option"],
|
|
@@ -6266,7 +6346,7 @@ function describeBrowserApproval(action, target) {
|
|
|
6266
6346
|
const isScript = action === "eval_script";
|
|
6267
6347
|
const label = actions.get(action);
|
|
6268
6348
|
return {
|
|
6269
|
-
action: label ? `${label} (${action})` : "Unknown browser action",
|
|
6349
|
+
action: action === "click" ? "Allow Nolo to click this control?" : label ? `${label} (${action})` : "Unknown browser action",
|
|
6270
6350
|
target: isScript ? "Script in the target tab" : target || "Unknown control",
|
|
6271
6351
|
impact: isScript ? "May read or modify the page and cause changes outside the page." : "May modify the page or cause changes outside the page.",
|
|
6272
6352
|
detailLabel: isScript ? "Script preview" : "Details"
|
|
@@ -6276,8 +6356,9 @@ function describeBrowserApproval(action, target) {
|
|
|
6276
6356
|
// packages/cli/tui/hostApprovalCard.ts
|
|
6277
6357
|
var SELECT_ALLOW = /* @__PURE__ */ new Set(["\x1B[C", "\x1BOC"]);
|
|
6278
6358
|
var SELECT_CANCEL = /* @__PURE__ */ new Set(["\x1B[D", "\x1BOD"]);
|
|
6279
|
-
var ENTER = /* @__PURE__ */ new Set(["\r", "\n"]);
|
|
6280
6359
|
var ESCAPE_KEYS = /* @__PURE__ */ new Set(["\x1B", "\x1B\x1B", "\x1B[27~"]);
|
|
6360
|
+
var PAGE_UP = "\x1B[5~";
|
|
6361
|
+
var PAGE_DOWN = "\x1B[6~";
|
|
6281
6362
|
var FALLBACK_COLUMNS = 80;
|
|
6282
6363
|
var LABEL_COLUMN = 9;
|
|
6283
6364
|
var CONTENT_INDENT = LABEL_COLUMN + 1;
|
|
@@ -6400,38 +6481,52 @@ function renderHostApprovalCardLines(card, opts) {
|
|
|
6400
6481
|
const isMcp = card.actionLabel === "callMcpTool";
|
|
6401
6482
|
const copy = describeBrowserApproval(card.actionLabel, safeApprovalSingleLineText(card.target));
|
|
6402
6483
|
const detail = safeApprovalMultilineText(card.summary);
|
|
6403
|
-
const heading = isMcp ? "
|
|
6404
|
-
const impact = isMcp ? "
|
|
6484
|
+
const heading = isMcp ? t("hostApprovalMcpHeading") : copy.action;
|
|
6485
|
+
const impact = isMcp ? t("hostApprovalMcpImpact") : copy.impact;
|
|
6405
6486
|
const browserParts = !isMcp ? [
|
|
6406
6487
|
safeApprovalSingleLineText(card.browser),
|
|
6407
6488
|
safeApprovalSingleLineText(card.tabId) ? `tab ${safeApprovalSingleLineText(card.tabId)}` : ""
|
|
6408
6489
|
].filter(Boolean) : [];
|
|
6409
|
-
const
|
|
6410
|
-
const actionRows = displayWidth(actionBar) <= columns - 1 ? [actionBar] : [
|
|
6411
|
-
...wrapProseLine("\u276F Cancel (Enter)", columns - 2).map((line) => ` ${line}`),
|
|
6412
|
-
...wrapProseLine("Allow once (\u2192 then Enter)", columns - 4).map((line) => ` ${line}`)
|
|
6413
|
-
];
|
|
6414
|
-
const lines = [
|
|
6415
|
-
renderDialogRule(columns, false),
|
|
6490
|
+
const body = [
|
|
6416
6491
|
...wrapProseLine(heading, columns - 2).map((line) => ` ${line}`),
|
|
6417
6492
|
"",
|
|
6418
|
-
...fieldRows("target", isMcp ? safeApprovalSingleLineText(card.target) || "
|
|
6419
|
-
...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),
|
|
6420
6495
|
...browserParts.length ? fieldRows("browser", browserParts.join(" \xB7 "), contentWidth) : [],
|
|
6421
6496
|
...wrapProseLine(impact, contentWidth).map((row, index) => `${index === 0 ? ` ${"impact".padEnd(LABEL_COLUMN, " ")}` : " ".repeat(CONTENT_INDENT)}${row}`),
|
|
6422
|
-
...detail ? ["", ...detailRows(detail, contentWidth)] : []
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
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))
|
|
6433
6529
|
];
|
|
6434
|
-
return lines.map((line) => clipCardLine(line, columns));
|
|
6435
6530
|
}
|
|
6436
6531
|
function createInlineHostApprovalPrompt(args) {
|
|
6437
6532
|
const now = args.now ?? Date.now;
|
|
@@ -6446,84 +6541,148 @@ function createInlineHostApprovalPrompt(args) {
|
|
|
6446
6541
|
if (!active) return;
|
|
6447
6542
|
const finishing = active;
|
|
6448
6543
|
active = null;
|
|
6544
|
+
finishing.finish(decision);
|
|
6449
6545
|
try {
|
|
6450
6546
|
args.write(`${note}
|
|
6451
6547
|
`);
|
|
6452
6548
|
} catch {
|
|
6453
|
-
} finally {
|
|
6454
|
-
finishing.finish(decision);
|
|
6455
6549
|
}
|
|
6456
6550
|
};
|
|
6457
|
-
const presentOne = (card, context
|
|
6551
|
+
const presentOne = (card, context, anchor) => new Promise((resolve4) => {
|
|
6458
6552
|
if (disposed || context.signal?.aborted) {
|
|
6459
6553
|
resolve4(disposed ? "deny" : "cancelled");
|
|
6460
6554
|
return;
|
|
6461
6555
|
}
|
|
6556
|
+
const expiresAt = Math.min(card.expiresAt, context.expiresAt ?? Infinity);
|
|
6557
|
+
if (expiresAt <= now()) {
|
|
6558
|
+
resolve4("expired");
|
|
6559
|
+
return;
|
|
6560
|
+
}
|
|
6462
6561
|
const abort = () => settle(context.signal?.reason === "expired" ? "expired" : "cancelled", "\u2716 approval ended \u2014 the action was not run");
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
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;
|
|
6467
6621
|
context.signal?.addEventListener("abort", abort, { once: true });
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6622
|
+
anchor?.registerForegroundRepaint?.(repaint);
|
|
6623
|
+
if (painter) repaint();
|
|
6624
|
+
else {
|
|
6625
|
+
try {
|
|
6626
|
+
args.write(`${render()}
|
|
6471
6627
|
`);
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6628
|
+
} catch {
|
|
6629
|
+
failPaint();
|
|
6630
|
+
}
|
|
6475
6631
|
}
|
|
6476
6632
|
});
|
|
6477
6633
|
return {
|
|
6478
6634
|
awaitHostApproval: (card, context = {}) => {
|
|
6479
6635
|
const signal = context.signal ? AbortSignal.any([context.signal, shutdown.signal]) : shutdown.signal;
|
|
6480
|
-
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), {
|
|
6481
6637
|
signal: lifetime.signal,
|
|
6482
6638
|
cancelled: () => "cancelled"
|
|
6483
6639
|
}) : presentOne(next, lifetime), { ...context, signal });
|
|
6484
6640
|
},
|
|
6485
6641
|
isActive: () => active !== null,
|
|
6486
6642
|
handleKey(sequence, context) {
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
const
|
|
6490
|
-
const
|
|
6491
|
-
const
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
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;
|
|
6499
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);
|
|
6500
6669
|
return false;
|
|
6501
6670
|
}
|
|
6502
|
-
if (
|
|
6503
|
-
active.allowSelected = false;
|
|
6504
|
-
return false;
|
|
6505
|
-
}
|
|
6506
|
-
if (active.card.expiresAt <= now()) {
|
|
6671
|
+
if (current.expiresAt <= now()) {
|
|
6507
6672
|
settle("expired", "\u231B approval expired \u2014 the action was not run");
|
|
6508
6673
|
return true;
|
|
6509
6674
|
}
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
try {
|
|
6514
|
-
args.write(selectAllow ? " Allow once selected \xB7 Enter confirms \xB7 \u2190 selects Cancel\n" : " Cancel selected \xB7 Enter cancels\n");
|
|
6515
|
-
active.allowSelected = selectAllow;
|
|
6516
|
-
} catch {
|
|
6517
|
-
settle("deny", "\u2716 selection could not be shown \u2014 the action was not run");
|
|
6518
|
-
}
|
|
6519
|
-
}
|
|
6675
|
+
const mayApprove = !context.busy || context.canApproveDuringTurn === true;
|
|
6676
|
+
if (allow || cancel) {
|
|
6677
|
+
setFocus(allow && mayApprove);
|
|
6520
6678
|
return true;
|
|
6521
6679
|
}
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
);
|
|
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");
|
|
6527
6686
|
return true;
|
|
6528
6687
|
},
|
|
6529
6688
|
dispose() {
|
|
@@ -7775,7 +7934,7 @@ function renderWakeMessage(elements, count) {
|
|
|
7775
7934
|
return [
|
|
7776
7935
|
`<background_run_completion count="${count}">`,
|
|
7777
7936
|
...elements,
|
|
7778
|
-
`\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`,
|
|
7779
7938
|
`</background_run_completion>`
|
|
7780
7939
|
].join("\n");
|
|
7781
7940
|
}
|
|
@@ -11378,6 +11537,45 @@ function splitProbeInput(buffer) {
|
|
|
11378
11537
|
function isTerminalDevice(stream) {
|
|
11379
11538
|
return stream instanceof ReadStream;
|
|
11380
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
|
+
}
|
|
11381
11579
|
async function probeTerminalBackground(args = {}) {
|
|
11382
11580
|
const stdin = args.stdin ?? process.stdin;
|
|
11383
11581
|
const stdout = args.stdout ?? process.stdout;
|
|
@@ -11427,9 +11625,16 @@ async function probeTerminalBackground(args = {}) {
|
|
|
11427
11625
|
});
|
|
11428
11626
|
}
|
|
11429
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 };
|
|
11430
11633
|
const r = await probeTerminalBackground(args);
|
|
11431
11634
|
if (r || !args.allowSystemFallback) return r;
|
|
11432
|
-
const brightness = detectSystemBrightness(process.env, {
|
|
11635
|
+
const brightness = detectSystemBrightness(args.env ?? process.env, {
|
|
11636
|
+
allowSubprocess: true
|
|
11637
|
+
});
|
|
11433
11638
|
return brightness ? { brightness, hex: "" } : null;
|
|
11434
11639
|
}
|
|
11435
11640
|
function detectSystemBrightness(env = process.env, options = {}) {
|
|
@@ -11460,6 +11665,8 @@ function detectSystemBrightness(env = process.env, options = {}) {
|
|
|
11460
11665
|
timeout: 200
|
|
11461
11666
|
}
|
|
11462
11667
|
).trim();
|
|
11668
|
+
const scheme = parseGnomeColorScheme(out);
|
|
11669
|
+
if (scheme) return scheme;
|
|
11463
11670
|
const val = out.toLowerCase();
|
|
11464
11671
|
if (/(?:^|[\s\-_:])dark(?:$|[\s\-_:])/i.test(val)) return "dark";
|
|
11465
11672
|
if (/(?:^|[\s\-_:])light(?:$|[\s\-_:])/i.test(val)) return "light";
|
|
@@ -13844,6 +14051,7 @@ function createNoopFixedInput() {
|
|
|
13844
14051
|
},
|
|
13845
14052
|
disable() {
|
|
13846
14053
|
},
|
|
14054
|
+
isDisabled: () => true,
|
|
13847
14055
|
getInputLines: () => 1,
|
|
13848
14056
|
isPaused: () => false,
|
|
13849
14057
|
setMouseEnabled() {
|
|
@@ -13859,7 +14067,9 @@ function createFixedInput(output, config) {
|
|
|
13859
14067
|
const getColumns = () => output.columns ?? 80;
|
|
13860
14068
|
let inputLines = 1;
|
|
13861
14069
|
let paused = false;
|
|
14070
|
+
let disabled = false;
|
|
13862
14071
|
const write = (seq) => {
|
|
14072
|
+
if (disabled) return;
|
|
13863
14073
|
output.write(seq);
|
|
13864
14074
|
};
|
|
13865
14075
|
let lastScrollBottom = -1;
|
|
@@ -14072,6 +14282,7 @@ function createFixedInput(output, config) {
|
|
|
14072
14282
|
return { text, lines, cursorCol, cursorRow: headerRows + cursorRow };
|
|
14073
14283
|
};
|
|
14074
14284
|
const repaintAt = (buffer, cursorPos, force = false) => {
|
|
14285
|
+
if (disabled) return;
|
|
14075
14286
|
const { text, lines, cursorCol, cursorRow } = renderInputArea(buffer, cursorPos);
|
|
14076
14287
|
let linesChanged = false;
|
|
14077
14288
|
if (lines !== inputLines) {
|
|
@@ -14142,6 +14353,7 @@ function createFixedInput(output, config) {
|
|
|
14142
14353
|
return {
|
|
14143
14354
|
active: true,
|
|
14144
14355
|
init() {
|
|
14356
|
+
if (disabled) return;
|
|
14145
14357
|
invalidateComposerCache();
|
|
14146
14358
|
saveCursor();
|
|
14147
14359
|
setScrollRegion(inputLines);
|
|
@@ -14169,6 +14381,7 @@ function createFixedInput(output, config) {
|
|
|
14169
14381
|
resetCursorStyle();
|
|
14170
14382
|
},
|
|
14171
14383
|
resumeFromSubprocess() {
|
|
14384
|
+
if (disabled) return;
|
|
14172
14385
|
paused = false;
|
|
14173
14386
|
invalidateComposerCache();
|
|
14174
14387
|
resetHistoryFrameDiffCache(output);
|
|
@@ -14181,6 +14394,7 @@ function createFixedInput(output, config) {
|
|
|
14181
14394
|
`);
|
|
14182
14395
|
},
|
|
14183
14396
|
resumeFromDialog() {
|
|
14397
|
+
if (disabled) return;
|
|
14184
14398
|
paused = false;
|
|
14185
14399
|
invalidateComposerCache();
|
|
14186
14400
|
resetHistoryFrameDiffCache(output);
|
|
@@ -14198,7 +14412,9 @@ function createFixedInput(output, config) {
|
|
|
14198
14412
|
resetScrollRegion();
|
|
14199
14413
|
resetCursorStyle();
|
|
14200
14414
|
leaveAltScreen(output);
|
|
14415
|
+
disabled = true;
|
|
14201
14416
|
},
|
|
14417
|
+
isDisabled: () => disabled,
|
|
14202
14418
|
getInputLines: () => inputLines,
|
|
14203
14419
|
isPaused: () => paused,
|
|
14204
14420
|
setMouseEnabled(enabled) {
|
|
@@ -14211,6 +14427,7 @@ function createFixedInput(output, config) {
|
|
|
14211
14427
|
},
|
|
14212
14428
|
isMouseEnabled: () => mouseEnabled,
|
|
14213
14429
|
setAltScreenEnabled(enabled) {
|
|
14430
|
+
if (disabled) return;
|
|
14214
14431
|
if (enabled) {
|
|
14215
14432
|
enterAltScreen(output);
|
|
14216
14433
|
} else {
|
|
@@ -15345,7 +15562,7 @@ async function runOneAgentTurn(ctx, inputMsg, imageUrls, actionGateHandler, conf
|
|
|
15345
15562
|
if (!approved) return false;
|
|
15346
15563
|
const commandText = typeof request.command === "string" ? request.command : "";
|
|
15347
15564
|
if (commandText) {
|
|
15348
|
-
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-
|
|
15565
|
+
const { runApprovedCredentialCommand } = await import("./hostCredentialCreate-K56HWPNY.js");
|
|
15349
15566
|
const hostResult = await runApprovedCredentialCommand({
|
|
15350
15567
|
commandText,
|
|
15351
15568
|
approvalEventId: request.id,
|
|
@@ -16493,16 +16710,30 @@ function createTuiRender(host) {
|
|
|
16493
16710
|
let renderScheduled = false;
|
|
16494
16711
|
let renderTimer = null;
|
|
16495
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
|
+
};
|
|
16496
16722
|
const flushPendingRender = () => {
|
|
16497
16723
|
if (renderTimer !== null) {
|
|
16498
16724
|
clearTimeout(renderTimer);
|
|
16499
16725
|
renderTimer = null;
|
|
16500
16726
|
}
|
|
16727
|
+
if (closed) {
|
|
16728
|
+
renderScheduled = false;
|
|
16729
|
+
return;
|
|
16730
|
+
}
|
|
16501
16731
|
if (!renderScheduled) return;
|
|
16502
16732
|
renderScheduled = false;
|
|
16503
16733
|
paintSyncedFrame();
|
|
16504
16734
|
};
|
|
16505
16735
|
const paintSyncedFrame = () => {
|
|
16736
|
+
if (closed) return;
|
|
16506
16737
|
if (host.fixedInput.isPaused()) {
|
|
16507
16738
|
host.imageRenderer?.suspend();
|
|
16508
16739
|
return;
|
|
@@ -16517,7 +16748,7 @@ function createTuiRender(host) {
|
|
|
16517
16748
|
}
|
|
16518
16749
|
};
|
|
16519
16750
|
const scheduleRender = () => {
|
|
16520
|
-
if (renderScheduled) return;
|
|
16751
|
+
if (closed || renderScheduled) return;
|
|
16521
16752
|
renderScheduled = true;
|
|
16522
16753
|
renderTimer = setTimeout(() => {
|
|
16523
16754
|
renderScheduled = false;
|
|
@@ -16526,7 +16757,7 @@ function createTuiRender(host) {
|
|
|
16526
16757
|
}, RENDER_THROTTLE_MS);
|
|
16527
16758
|
};
|
|
16528
16759
|
const renderHistoryCore = (withImages) => {
|
|
16529
|
-
if (syncingLayout) return;
|
|
16760
|
+
if (closed || syncingLayout) return;
|
|
16530
16761
|
syncingLayout = true;
|
|
16531
16762
|
try {
|
|
16532
16763
|
const reservedRows = host.getReservedRows?.() ?? 0;
|
|
@@ -16546,6 +16777,7 @@ function createTuiRender(host) {
|
|
|
16546
16777
|
}
|
|
16547
16778
|
};
|
|
16548
16779
|
const renderHistoryToOutput = () => {
|
|
16780
|
+
if (closed) return;
|
|
16549
16781
|
if (host.fixedInput.isPaused()) {
|
|
16550
16782
|
host.imageRenderer?.suspend();
|
|
16551
16783
|
return;
|
|
@@ -16554,6 +16786,7 @@ function createTuiRender(host) {
|
|
|
16554
16786
|
renderHistoryCore(true);
|
|
16555
16787
|
};
|
|
16556
16788
|
const renderHistoryUnderDialog = () => {
|
|
16789
|
+
if (closed) return;
|
|
16557
16790
|
host.imageRenderer?.suspend();
|
|
16558
16791
|
renderHistoryCore(false);
|
|
16559
16792
|
};
|
|
@@ -16562,6 +16795,9 @@ function createTuiRender(host) {
|
|
|
16562
16795
|
renderHistoryUnderDialog,
|
|
16563
16796
|
scheduleRender,
|
|
16564
16797
|
flushPendingRender,
|
|
16798
|
+
// 会话收尾:取消防抖定时器并关死全部渲染入口。幂等,交给 workspace 的
|
|
16799
|
+
// 唯一退出汇聚点调用;调用之后本集群不再向 output 写任何字节。
|
|
16800
|
+
close,
|
|
16565
16801
|
// 立即绘制一帧同步帧(BSU/ESU + 光标隐藏)。流式路径走 33ms 节流的
|
|
16566
16802
|
// scheduleRender;平滑滚动推进器按 16ms 自己的节奏调用这里,避免被节流
|
|
16567
16803
|
// 抹平成"每 33ms 一跳"。
|
|
@@ -16988,10 +17224,12 @@ function createTuiImageRenderer(options) {
|
|
|
16988
17224
|
import { randomInt } from "node:crypto";
|
|
16989
17225
|
|
|
16990
17226
|
// packages/cli/tui/tuiScrollAnimation.ts
|
|
16991
|
-
var VELOCITY_WINDOW_MS =
|
|
17227
|
+
var VELOCITY_WINDOW_MS = 240;
|
|
16992
17228
|
var VELOCITY_SLOW_COUNT = 3;
|
|
16993
|
-
var VELOCITY_GAIN_PER_REPORT = 0.
|
|
16994
|
-
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;
|
|
16995
17233
|
function velocityGain(recentCount) {
|
|
16996
17234
|
if (recentCount <= VELOCITY_SLOW_COUNT) return 1;
|
|
16997
17235
|
return Math.min(
|
|
@@ -17047,9 +17285,12 @@ function createScrollAnimator(deps) {
|
|
|
17047
17285
|
fractionalLines = 0;
|
|
17048
17286
|
recentDirection = direction;
|
|
17049
17287
|
}
|
|
17050
|
-
recentReports = recentReports.filter((
|
|
17051
|
-
recentReports.
|
|
17052
|
-
|
|
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);
|
|
17053
17294
|
const whole = Math.floor(fractionalLines);
|
|
17054
17295
|
fractionalLines -= whole;
|
|
17055
17296
|
return whole;
|
|
@@ -17472,7 +17713,7 @@ async function compactDialog(options) {
|
|
|
17472
17713
|
fetchImpl,
|
|
17473
17714
|
agentRef: getActiveDialogAgentId(current) ?? void 0,
|
|
17474
17715
|
loadAdapter: async () => {
|
|
17475
|
-
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-
|
|
17716
|
+
const { createCliLocalRuntimeAdapter: createCliLocalRuntimeAdapter2 } = await import("./localRuntimeAdapter-KVU72FWT.js");
|
|
17476
17717
|
return createCliLocalRuntimeAdapter2({ env: { ...options.env ?? {}, AUTH_TOKEN: options.authToken, NOLO_SERVER: options.serverUrl }, fetchImpl });
|
|
17477
17718
|
}
|
|
17478
17719
|
}) : void 0);
|
|
@@ -18561,10 +18802,12 @@ async function runSubmittedSlashLine(line, host, actionGateHandler, confirmDestr
|
|
|
18561
18802
|
emitCommandOutput(lines.join("\n"), line);
|
|
18562
18803
|
}
|
|
18563
18804
|
if (result.action?.type === "theme-refresh") {
|
|
18805
|
+
resetPtyxisCanvasCache();
|
|
18564
18806
|
const detected = await detectTerminalBackground({
|
|
18565
18807
|
stdin: input,
|
|
18566
18808
|
stdout: output,
|
|
18567
|
-
allowSystemFallback: true
|
|
18809
|
+
allowSystemFallback: true,
|
|
18810
|
+
trustHostCanvas: true
|
|
18568
18811
|
});
|
|
18569
18812
|
if (detected && applyDetectedBackground(detected)) {
|
|
18570
18813
|
emitCommandOutput(t("themeRefreshed", detected.brightness));
|
|
@@ -19126,6 +19369,7 @@ async function runTuiWorkspace(options) {
|
|
|
19126
19369
|
);
|
|
19127
19370
|
setActiveThemeMode(startupThemeMode);
|
|
19128
19371
|
const accountSessionRuntime = createTuiAccountSessionRuntime(options.env ?? process.env);
|
|
19372
|
+
let cleanupTitle = null;
|
|
19129
19373
|
try {
|
|
19130
19374
|
const runtimeEnv = options.env ?? process.env;
|
|
19131
19375
|
initCliLocale(runtimeEnv);
|
|
@@ -19180,7 +19424,8 @@ async function runTuiWorkspace(options) {
|
|
|
19180
19424
|
stdin: input,
|
|
19181
19425
|
stdout: output,
|
|
19182
19426
|
allowSystemFallback: startupThemeMode !== "terminal",
|
|
19183
|
-
preserveInput: true
|
|
19427
|
+
preserveInput: true,
|
|
19428
|
+
trustHostCanvas: true
|
|
19184
19429
|
});
|
|
19185
19430
|
if (detected) applyDetectedBackground(detected);
|
|
19186
19431
|
let sawOsc11Reply = Boolean(detected?.hex);
|
|
@@ -19229,8 +19474,18 @@ async function runTuiWorkspace(options) {
|
|
|
19229
19474
|
let lastProtocolReport = "";
|
|
19230
19475
|
const titleEnv = options.env ?? process.env;
|
|
19231
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
|
+
};
|
|
19232
19486
|
let titleRestored = false;
|
|
19233
19487
|
const restoreTitle = () => {
|
|
19488
|
+
stopTitleAnimation();
|
|
19234
19489
|
if (titleRestored) return;
|
|
19235
19490
|
titleRestored = true;
|
|
19236
19491
|
if (titleEnabled) {
|
|
@@ -19241,6 +19496,7 @@ async function runTuiWorkspace(options) {
|
|
|
19241
19496
|
}
|
|
19242
19497
|
if (restoreWindowTitle === restoreTitle) restoreWindowTitle = null;
|
|
19243
19498
|
};
|
|
19499
|
+
cleanupTitle = restoreTitle;
|
|
19244
19500
|
if (titleEnabled) {
|
|
19245
19501
|
output.write("\x1B[22;0t");
|
|
19246
19502
|
restoreWindowTitle = restoreTitle;
|
|
@@ -19256,14 +19512,30 @@ async function runTuiWorkspace(options) {
|
|
|
19256
19512
|
}
|
|
19257
19513
|
if (!titleEnabled) return;
|
|
19258
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
|
+
}
|
|
19259
19526
|
const rawDialogLabel = state.dialogLabel?.trim();
|
|
19260
19527
|
const rawLabel = !rawDialogLabel || rawDialogLabel === "new" ? basename(state.cwd) || "Nolo" : rawDialogLabel;
|
|
19261
19528
|
const label = stripAnsi(rawLabel).replace(/[\x00-\x1f\x7f-\x9f]+/g, " ");
|
|
19262
|
-
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";
|
|
19263
19531
|
const currentTitle = takeDisplayWidth(label, 80 - displayWidth(suffix)).prefix + suffix;
|
|
19264
19532
|
if (currentTitle === lastSentTitle) return;
|
|
19265
19533
|
lastSentTitle = currentTitle;
|
|
19266
|
-
|
|
19534
|
+
try {
|
|
19535
|
+
output.write(buildWindowTitle(currentTitle));
|
|
19536
|
+
} catch {
|
|
19537
|
+
stopTitleAnimation();
|
|
19538
|
+
}
|
|
19267
19539
|
};
|
|
19268
19540
|
const reportTerminalStatus = (report) => {
|
|
19269
19541
|
const wasWaiting = terminalStatus.state === "blocked";
|
|
@@ -19460,7 +19732,8 @@ async function runTuiWorkspace(options) {
|
|
|
19460
19732
|
renderHistoryUnderDialog,
|
|
19461
19733
|
scheduleRender,
|
|
19462
19734
|
flushPendingRender,
|
|
19463
|
-
paintImmediate
|
|
19735
|
+
paintImmediate,
|
|
19736
|
+
close: closeRender
|
|
19464
19737
|
} = createTuiRender({
|
|
19465
19738
|
output,
|
|
19466
19739
|
history,
|
|
@@ -19694,6 +19967,7 @@ async function runTuiWorkspace(options) {
|
|
|
19694
19967
|
let hostApprovalPrompt = null;
|
|
19695
19968
|
let unregisterHostApprovalRenderer = null;
|
|
19696
19969
|
let draftEpoch = 0;
|
|
19970
|
+
let clipboardReadsInFlight = 0;
|
|
19697
19971
|
const bumpDraftEpoch = () => {
|
|
19698
19972
|
draftEpoch += 1;
|
|
19699
19973
|
};
|
|
@@ -19818,6 +20092,14 @@ async function runTuiWorkspace(options) {
|
|
|
19818
20092
|
return true;
|
|
19819
20093
|
};
|
|
19820
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) => {
|
|
19821
20103
|
const snapshot = { epoch: draftEpoch, sessionEnded };
|
|
19822
20104
|
const outcome = await resolveClipboardPaste({
|
|
19823
20105
|
readImage: () => readImage({ env: options.env ?? process.env }),
|
|
@@ -20138,6 +20420,24 @@ ${lines}` : lines;
|
|
|
20138
20420
|
)
|
|
20139
20421
|
);
|
|
20140
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
|
+
};
|
|
20141
20441
|
const manageDraftImages = async () => {
|
|
20142
20442
|
while (true) {
|
|
20143
20443
|
const images = state.attachedImages;
|
|
@@ -20244,17 +20544,9 @@ ${lines}` : lines;
|
|
|
20244
20544
|
renderHistoryToOutput();
|
|
20245
20545
|
return false;
|
|
20246
20546
|
}
|
|
20247
|
-
const directImageMatch =
|
|
20547
|
+
const directImageMatch = DIRECT_IMAGE_COPY_RE.exec(line.trim());
|
|
20248
20548
|
if (directImageMatch) {
|
|
20249
|
-
|
|
20250
|
-
const target = collectConversationImageArtifacts(history.turns).find(
|
|
20251
|
-
(item) => item.artifactIndex === targetIndex
|
|
20252
|
-
);
|
|
20253
|
-
if (!target) {
|
|
20254
|
-
emitCommandOutput(themeText(`\xB7 \u672A\u627E\u5230\u56FE\u7247\u4EA7\u7269 #${targetIndex}\u3002`, "muted", resolveCliColorEnabled()));
|
|
20255
|
-
} else {
|
|
20256
|
-
await copyImagePathWithFeedback(target.path);
|
|
20257
|
-
}
|
|
20549
|
+
await copyConversationImagePathByIndex(Number(directImageMatch[1]), emitCommandOutput);
|
|
20258
20550
|
return false;
|
|
20259
20551
|
}
|
|
20260
20552
|
if (line.trim() === "/images") {
|
|
@@ -20495,6 +20787,7 @@ ${lines}` : lines;
|
|
|
20495
20787
|
hostApprovalPrompt = null;
|
|
20496
20788
|
childShellApprovals.close();
|
|
20497
20789
|
sessionEnded = true;
|
|
20790
|
+
closeRender();
|
|
20498
20791
|
scrollAnimator.cancel();
|
|
20499
20792
|
if (resizeTimer !== null) {
|
|
20500
20793
|
clearTimeout(resizeTimer);
|
|
@@ -20568,7 +20861,7 @@ ${lines}` : lines;
|
|
|
20568
20861
|
onApprove: createSnapshotGuardedApproval("local", () => state.permissionGrants, approveLocalConfirms),
|
|
20569
20862
|
onApproved: async (approvedGate) => {
|
|
20570
20863
|
if (approvedGate.kind !== "confirm") return null;
|
|
20571
|
-
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-
|
|
20864
|
+
const { executeApprovedCredentialCreate } = await import("./hostCredentialCreate-K56HWPNY.js");
|
|
20572
20865
|
const hostResult = await executeApprovedCredentialCreate({
|
|
20573
20866
|
gate: approvedGate,
|
|
20574
20867
|
approvalGateId: approvedGate.id,
|
|
@@ -20754,6 +21047,7 @@ ${err.message}` : ""}`)
|
|
|
20754
21047
|
}
|
|
20755
21048
|
};
|
|
20756
21049
|
let autoScrollDirection = "up";
|
|
21050
|
+
let scrollbarDrag = null;
|
|
20757
21051
|
const autoScrollStep = () => autoScrollStepForTicks(++autoScrollTicks);
|
|
20758
21052
|
const startAutoScroll = (direction, mouseX) => {
|
|
20759
21053
|
autoScrollDirection = direction;
|
|
@@ -20977,10 +21271,12 @@ ${err.message}` : ""}`)
|
|
|
20977
21271
|
}
|
|
20978
21272
|
if (res.action?.type === "theme-refresh") {
|
|
20979
21273
|
state = res.nextState;
|
|
21274
|
+
resetPtyxisCanvasCache();
|
|
20980
21275
|
const detected2 = await detectTerminalBackground({
|
|
20981
21276
|
stdin: input,
|
|
20982
21277
|
stdout: output,
|
|
20983
|
-
allowSystemFallback: true
|
|
21278
|
+
allowSystemFallback: true,
|
|
21279
|
+
trustHostCanvas: true
|
|
20984
21280
|
});
|
|
20985
21281
|
let refreshMsg = "";
|
|
20986
21282
|
if (detected2 && applyDetectedBackground(detected2)) {
|
|
@@ -21078,8 +21374,9 @@ ${hint}` : hint;
|
|
|
21078
21374
|
if (done) return;
|
|
21079
21375
|
const approvalOwnsKeyboard = hostApprovalPrompt?.isActive() ?? false;
|
|
21080
21376
|
if (approvalOwnsKeyboard && hostApprovalPrompt?.handleKey(sequence, {
|
|
21081
|
-
draftEmpty: buffer.length === 0,
|
|
21082
|
-
busy
|
|
21377
|
+
draftEmpty: buffer.length === 0 && state.attachedImages.length === 0 && !preparingImageSubmission && !pendingPasteImagePromise && clipboardReadsInFlight === 0,
|
|
21378
|
+
busy,
|
|
21379
|
+
canApproveDuringTurn: activeTurnAbort !== null && !activeTurnAbort.signal.aborted
|
|
21083
21380
|
})) return;
|
|
21084
21381
|
if (!approvalOwnsKeyboard && secretInputCoordinator.isActive()) {
|
|
21085
21382
|
secretInputCoordinator.handleToken(sequence);
|
|
@@ -21170,16 +21467,44 @@ ${hint}` : hint;
|
|
|
21170
21467
|
getTopReservedRows(output)
|
|
21171
21468
|
)
|
|
21172
21469
|
);
|
|
21173
|
-
const { contentWidth, marginLeft } = resolveHistoryLayoutGeometry(columns);
|
|
21470
|
+
const { contentWidth, marginLeft, marginRight } = resolveHistoryLayoutGeometry(columns);
|
|
21174
21471
|
const screenRow = mouseEvent.y - 1 - getTopReservedRows(output);
|
|
21175
21472
|
const screenCol = mouseEvent.x - 1;
|
|
21176
21473
|
const hitContentCol = screenCol - marginLeft;
|
|
21177
21474
|
const contentCol = Math.max(0, Math.min(contentWidth, screenCol - marginLeft));
|
|
21178
21475
|
if (mouseEvent.kind === "press" && mouseEvent.button === "left") {
|
|
21476
|
+
scrollbarDrag = null;
|
|
21179
21477
|
if (screenRow < 0) return;
|
|
21180
21478
|
stopAutoScroll();
|
|
21181
21479
|
clearSelectionCopyFeedback();
|
|
21182
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
|
+
}
|
|
21183
21508
|
if (mouseEvent.ctrl && screenRow < visibleHeight && hitContentCol >= 0 && hitContentCol < contentWidth && openVisibleUrlAtScreen(
|
|
21184
21509
|
history,
|
|
21185
21510
|
contentWidth,
|
|
@@ -21217,6 +21542,27 @@ ${hint}` : hint;
|
|
|
21217
21542
|
return;
|
|
21218
21543
|
}
|
|
21219
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
|
+
}
|
|
21220
21566
|
if (!selectionState.anchor) return;
|
|
21221
21567
|
selectionState.dragging = true;
|
|
21222
21568
|
lastDragMouseX = mouseEvent.x;
|
|
@@ -21244,6 +21590,28 @@ ${hint}` : hint;
|
|
|
21244
21590
|
}
|
|
21245
21591
|
if (mouseEvent.kind === "release") {
|
|
21246
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
|
+
}
|
|
21247
21615
|
if (selectionState.dragging && selectionState.anchor) {
|
|
21248
21616
|
const clampedRow = Math.max(0, Math.min(visibleHeight - 1, screenRow));
|
|
21249
21617
|
const releaseHit = hitTestHistory(
|
|
@@ -21442,6 +21810,28 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21442
21810
|
await handleBusyLocalSlash(submittedText, busySlashCommand);
|
|
21443
21811
|
return;
|
|
21444
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
|
+
}
|
|
21445
21835
|
const { actionGateHandler, confirmDestructiveAction } = buildInteractiveTurnHandlers();
|
|
21446
21836
|
const binding = ensureChatQueueBinding(turnCtx, actionGateHandler, confirmDestructiveAction);
|
|
21447
21837
|
const busyImages = detectSubmittedImagePaths(submittedText, state.cwd);
|
|
@@ -21619,12 +22009,25 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21619
22009
|
{
|
|
21620
22010
|
onOsc11Background: (bg) => {
|
|
21621
22011
|
sawOsc11Reply = true;
|
|
22012
|
+
if (isPtyxisTerminal()) return;
|
|
21622
22013
|
startOsc11AutoThemePoll();
|
|
21623
22014
|
applyLiveTerminalBackground(bg);
|
|
21624
22015
|
},
|
|
21625
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
|
+
}
|
|
21626
22029
|
if (!sawOsc11Reply) {
|
|
21627
|
-
applyLiveTerminalBackground({ brightness: scheme, hex: "" });
|
|
22030
|
+
applyLiveTerminalBackground({ brightness: scheme, hex: "", trustedCanvas: true });
|
|
21628
22031
|
}
|
|
21629
22032
|
if (!sessionEnded && !done && fixedInput.active && !fixedInput.isPaused()) {
|
|
21630
22033
|
output.write(OSC11_QUERY);
|
|
@@ -21652,6 +22055,8 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21652
22055
|
composerDecoderDrain = () => onData.destroy();
|
|
21653
22056
|
hostApprovalPrompt = createInlineHostApprovalPrompt({
|
|
21654
22057
|
dialogHost,
|
|
22058
|
+
output,
|
|
22059
|
+
colorEnabled: resolveCliColorEnabled(),
|
|
21655
22060
|
write: (text) => {
|
|
21656
22061
|
emitCommandOutput(text.replace(/\n$/, ""));
|
|
21657
22062
|
},
|
|
@@ -21669,7 +22074,7 @@ ${themeText(`! ${error instanceof Error ? error.message : String(error)}`, "dang
|
|
|
21669
22074
|
input.once("close", finish);
|
|
21670
22075
|
if (history.turns.length) renderHistoryToOutput();
|
|
21671
22076
|
fixedInput.repaint(buffer, cursorPos);
|
|
21672
|
-
if (!sawOsc11Reply && isTerminalDevice(input)) requestTerminalBackgroundQuery();
|
|
22077
|
+
if (!sawOsc11Reply && isTerminalDevice(input) && !isPtyxisTerminal()) requestTerminalBackgroundQuery();
|
|
21673
22078
|
refreshGitStatus();
|
|
21674
22079
|
refreshCiStatus();
|
|
21675
22080
|
await new Promise((resolve4) => {
|
|
@@ -21740,6 +22145,7 @@ ${renderStatusLine(state)}
|
|
|
21740
22145
|
}
|
|
21741
22146
|
childShellApprovals.close();
|
|
21742
22147
|
sessionEnded = true;
|
|
22148
|
+
closeRender();
|
|
21743
22149
|
runRegistryPoller.dispose();
|
|
21744
22150
|
idleHeapReleaser.cancel();
|
|
21745
22151
|
runCompletionWatcher.dispose();
|
|
@@ -21748,6 +22154,7 @@ ${renderStatusLine(state)}
|
|
|
21748
22154
|
rl.close();
|
|
21749
22155
|
}
|
|
21750
22156
|
} finally {
|
|
22157
|
+
cleanupTitle?.();
|
|
21751
22158
|
accountSessionRuntime.dispose();
|
|
21752
22159
|
}
|
|
21753
22160
|
}
|