nolo-cli 0.149.0-alpha.1 → 0.151.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-OW3H7ICR.js → _executeModel-XHAFJ2MM.js} +134 -91
- package/accountResolver-7RYB4D2P.js +300 -0
- package/action-SXJD5N5R.js +23 -0
- package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
- package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
- package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-DPUUS56Z.js} +181 -93
- package/{agentEmailCommands-A6XBQZBN.js → agentEmailCommands-V4P5EFLP.js} +132 -112
- package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
- package/agentListCommands-TWFLUYIZ.js +802 -0
- package/{agentMachineCommands-DQPUIMAC.js → agentMachineCommands-MELPAZZI.js} +58 -62
- package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
- package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
- package/agentRecordCommands-FSWSSQIO.js +154 -0
- package/agentRunCommand-GDBJVOAT.js +183 -0
- package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
- package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
- package/{agentSlice-O4RUQUMT.js → agentSlice-YO2ZLJMD.js} +23 -16
- package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
- package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
- package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
- package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
- package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
- package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
- package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
- package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
- package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
- package/chromeOpsCommands-3Z34RKSE.js +472 -0
- package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
- package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
- package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
- package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
- package/chunk-3PVYUPXK.js +40 -0
- package/chunk-3SZA4U64.js +1192 -0
- package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
- package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
- package/chunk-4LCOCOR5.js +50 -0
- package/chunk-4YRTZIVN.js +871 -0
- package/chunk-556RW72X.js +14110 -0
- package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
- package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
- package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
- package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
- package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
- package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
- package/chunk-6MJNEXUU.js +614 -0
- package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
- package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
- package/chunk-6QDYSCPW.js +223 -0
- package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
- package/chunk-7DPNBQSV.js +9 -0
- package/chunk-7MOXKPHC.js +119 -0
- package/{chunk-ZUEK6A6C.js → chunk-7XKL25PW.js} +1973 -754
- package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
- package/{chunk-YAQJJDC2.js → chunk-AOCM7HPT.js} +214 -51
- package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
- package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
- package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
- package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
- package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
- package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
- package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
- package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
- package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
- package/{chunk-ATLTFRYJ.js → chunk-ES633ZS5.js} +280 -98
- package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
- package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
- package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
- package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
- package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
- package/chunk-FJMRBOPO.js +11507 -0
- package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
- package/chunk-G6OOUQWJ.js +417 -0
- package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
- package/chunk-GKXCHNTE.js +15 -0
- package/{chunk-TXH4IWJL.js → chunk-GQN2WLAI.js} +20 -11
- package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
- package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
- package/{chunk-MST6R3E4.js → chunk-HKX3ULQB.js} +34 -22
- package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
- package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
- package/chunk-I42VC5KR.js +15 -0
- package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
- package/chunk-IA7TRNNR.js +11 -0
- package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
- package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
- package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
- package/chunk-IT3ZZRJE.js +12 -0
- package/{chunk-TZZ2WRBL.js → chunk-IZ7OJB6K.js} +20 -16
- package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
- package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
- package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
- package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
- package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
- package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
- package/{chunk-UASIEDKM.js → chunk-LTRUTOHX.js} +36 -31
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
- package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
- package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
- package/{chunk-DXHL7G2L.js → chunk-PCKVQXYV.js} +274 -93
- package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
- package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
- package/{chunk-BIDGLJQ3.js → chunk-PLXDDGBK.js} +45 -8
- package/chunk-PWTNI4N7.js +47 -0
- package/chunk-QFEW2ULV.js +42 -0
- package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
- package/chunk-QQ56R7KS.js +88 -0
- package/chunk-QYPE3TS3.js +43 -0
- package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
- package/chunk-RVWMAFIT.js +134 -0
- package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
- package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
- package/{chunk-HTVYCXBP.js → chunk-SMENBO3M.js} +354 -120
- package/{chunk-OMRJYNCI.js → chunk-SSFDFOVT.js} +26 -31
- package/chunk-SW4S4XYB.js +1794 -0
- package/{chunk-TB3MIBRC.js → chunk-T6X3D7NB.js} +572 -430
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
- package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
- package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
- package/chunk-UEILX4EV.js +15 -0
- package/chunk-UHTDNB5Y.js +140 -0
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
- package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
- package/chunk-UUPR3TD7.js +53 -0
- package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
- package/chunk-VHGD6FHV.js +116 -0
- package/chunk-VIWDGTDA.js +8 -0
- package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
- package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
- package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
- package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
- package/chunk-WD4XYDYC.js +567 -0
- package/chunk-WJZOQR2J.js +151 -0
- package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
- package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
- package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
- package/chunk-XRUSXPCQ.js +514 -0
- package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
- package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
- package/{chunk-ID7LNBWR.js → chunk-Y2DXOPSO.js} +1920 -644
- package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
- package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
- package/chunk-YVPQATSC.js +709 -0
- package/{chunk-3DAVPNFT.js → chunk-Z7OJUX6S.js} +122 -107
- package/chunk-ZEZC7IIM.js +126 -0
- package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
- package/chunk-ZIWPQEFU.js +165 -0
- package/chunk-ZKZ5X2HS.js +7012 -0
- package/chunk-ZRAU6T47.js +56 -0
- package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
- package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
- package/{commandRegistry-2KBOXZQC.js → commandRegistry-XN7C5GHO.js} +183 -107
- package/contentThunks-5L7YQI3S.js +84 -0
- package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
- package/{createAgentAutomationAction-5UGTB26P.js → createAgentAutomationAction-QOPOLCRK.js} +53 -44
- package/createDialogAction-MZ66VY5Q.js +76 -0
- package/{createPageAction-CDLDKPRM.js → createPageAction-VQDJIXMY.js} +65 -54
- package/cursorProvider-YGGNMVWX.js +6123 -0
- package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
- package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
- package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
- package/dialogCommands-YZLSJB6X.js +113 -0
- package/{dialogSlice-N3YB65G5.js → dialogSlice-6RODVYCK.js} +53 -39
- package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
- package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
- package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
- package/{docStore-E3CEOV5Q.js → docStore-ZZA3OPM5.js} +25 -16
- package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
- package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
- package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
- package/{handleSendMessageAction-DQAD5ERJ.js → handleSendMessageAction-DVG5U26T.js} +422 -118
- package/index.js +11 -7
- package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
- package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
- package/localRuntimeAdapter-HXRHFKRC.js +244 -0
- package/localRuntimeAuthority-JDAD7CB6.js +16 -0
- package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
- package/{machineCommands-HAP75VSG.js → machineCommands-5KBF4RCC.js} +503 -161
- package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
- package/machineWsRunDispatch-4OQDEDOR.js +169 -0
- package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
- package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
- package/package.json +1 -1
- package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
- package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
- package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
- package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
- package/{readlineWorkspace-7BC66QSX.js → readlineWorkspace-RIE62QVZ.js} +5022 -921
- package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
- package/{runAgentClientLoop-6E6UC3CE.js → runAgentClientLoop-KLUUXBZS.js} +154 -97
- package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
- package/secretCommands-ZXZRLR3R.js +700 -0
- package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
- package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
- package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
- package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
- package/{streamAgentChatTurn-3UXPYFNX.js → streamAgentChatTurn-MN2SSPGA.js} +309 -165
- package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
- package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
- package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
- package/tools-W2MOLERY.js +124 -0
- package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
- package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
- package/{updateDialogTitleAction-UPFV7TDT.js → updateDialogTitleAction-Z4JX6REN.js} +102 -57
- package/workloadLifecycle-36DXRZKU.js +320 -0
- package/action-GI44T4DR.js +0 -31
- package/agentListCommands-IW3GQVUP.js +0 -427
- package/agentRecordCommands-VCA76W6B.js +0 -134
- package/agentRunCommand-YNLDKVR7.js +0 -161
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-TJRMXMYA.js +0 -186
- package/chromeOpsCommands-IXRLN57H.js +0 -289
- package/chunk-36KZDDO5.js +0 -2415
- package/chunk-ACQD6YI2.js +0 -25363
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-CYSYR67N.js +0 -93
- package/chunk-JBTJAPUF.js +0 -35
- package/chunk-K2CSUCHJ.js +0 -620
- package/chunk-LTRXGFMS.js +0 -83
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-OCZKATRC.js +0 -129
- package/chunk-OTGFTBLI.js +0 -13
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-PZZTFEKK.js +0 -34
- package/chunk-URMS4XY2.js +0 -10
- package/chunk-UV6VISQJ.js +0 -20
- package/chunk-VJVNU77E.js +0 -83
- package/chunk-XYJSY4KG.js +0 -13807
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/contentThunks-BDIQRZR6.js +0 -73
- package/createDialogAction-B7VGVEVU.js +0 -66
- package/dialogCommands-G7YBVAMC.js +0 -102
- package/levelLazyShim-GZBKODGI.js +0 -7
- package/machineWsRunDispatch-L32G7C4P.js +0 -149
- package/serverStoreFactory-YMXDF4NI.js +0 -20
- package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
- package/settingSlice-Q6EKL7EQ.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-MKYDMWA4.js +0 -111
- package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
- package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
- package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
- package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
|
@@ -203,6 +203,13 @@ function accumulateToolCallDelta(accumulator, deltas) {
|
|
|
203
203
|
const deltaId = typeof delta.id === "string" && delta.id ? delta.id : "";
|
|
204
204
|
const wireIndex = typeof delta.index === "number" ? delta.index : void 0;
|
|
205
205
|
const current = accumulator.slots[resolveSlot(accumulator, deltaId, wireIndex)];
|
|
206
|
+
if (typeof delta.thought_signature === "string") {
|
|
207
|
+
current.thought_signature = delta.thought_signature;
|
|
208
|
+
}
|
|
209
|
+
const signature = delta.extra_content?.google?.thought_signature;
|
|
210
|
+
if (typeof signature === "string") {
|
|
211
|
+
current.extra_content = { google: { thought_signature: signature } };
|
|
212
|
+
}
|
|
206
213
|
const fn = delta.function;
|
|
207
214
|
if (fn && typeof fn === "object") {
|
|
208
215
|
const functionDelta = fn;
|
|
@@ -220,7 +227,9 @@ function accumulateToolCallDelta(accumulator, deltas) {
|
|
|
220
227
|
}
|
|
221
228
|
}
|
|
222
229
|
function finalizeAccumulatedToolCalls(accumulator) {
|
|
223
|
-
return accumulator.slots.filter((slot) => slot.function.name).map(({ id, type, function: fn }) => ({
|
|
230
|
+
return accumulator.slots.filter((slot) => slot.function.name).map(({ id, type, function: fn, thought_signature, extra_content }) => ({
|
|
231
|
+
...thought_signature !== void 0 ? { thought_signature } : {},
|
|
232
|
+
...extra_content ? { extra_content } : {},
|
|
224
233
|
id,
|
|
225
234
|
type,
|
|
226
235
|
function: {
|
|
@@ -10,6 +10,9 @@ var CLI_PROVIDER_VALUES = [
|
|
|
10
10
|
"grok",
|
|
11
11
|
"kimi"
|
|
12
12
|
];
|
|
13
|
+
function isCliProvider(value) {
|
|
14
|
+
return typeof value === "string" && CLI_PROVIDER_VALUES.includes(value);
|
|
15
|
+
}
|
|
13
16
|
var CLI_PROVIDER_DISPLAY_LABELS = {
|
|
14
17
|
copilot: "GitHub Copilot CLI\uFF08gh copilot\uFF09",
|
|
15
18
|
gemini: "Gemini CLI\uFF08gemini\uFF09",
|
|
@@ -27,5 +30,6 @@ var CLI_PROVIDER_OPTIONS = CLI_PROVIDER_VALUES.map((value) => ({
|
|
|
27
30
|
}));
|
|
28
31
|
|
|
29
32
|
export {
|
|
30
|
-
CLI_PROVIDER_VALUES
|
|
33
|
+
CLI_PROVIDER_VALUES,
|
|
34
|
+
isCliProvider
|
|
31
35
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
asNonEmptyStringArray
|
|
3
|
+
} from "./chunk-I42VC5KR.js";
|
|
1
4
|
import {
|
|
2
5
|
asOptionalFiniteNumber
|
|
3
6
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -2395,17 +2398,6 @@ function toTrimmedString(value) {
|
|
|
2395
2398
|
return typeof value === "string" ? value.trim() : value == null ? "" : String(value).trim();
|
|
2396
2399
|
}
|
|
2397
2400
|
|
|
2398
|
-
// packages/core/stringArray.ts
|
|
2399
|
-
function asNonEmptyStringArray(value) {
|
|
2400
|
-
if (!Array.isArray(value)) return [];
|
|
2401
|
-
return value.filter(
|
|
2402
|
-
(item) => typeof item === "string" && !!item.trim()
|
|
2403
|
-
);
|
|
2404
|
-
}
|
|
2405
|
-
function asTrimmedNonEmptyStringArray(value) {
|
|
2406
|
-
return asNonEmptyStringArray(value).map((item) => item.trim());
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
2401
|
// packages/database/utils/ulid.ts
|
|
2410
2402
|
import { monotonicFactory } from "ulid";
|
|
2411
2403
|
var prng = () => Math.random();
|
|
@@ -2617,6 +2609,7 @@ var createDialogMessageKeyAndId = (dialogId, ulidFn = ulid) => {
|
|
|
2617
2609
|
const messageId = ulidFn();
|
|
2618
2610
|
return { key: dialogMessageKey(dialogId, messageId), messageId };
|
|
2619
2611
|
};
|
|
2612
|
+
var dialogMessagePrefix = (dialogId) => createKey2("dialog" /* DIALOG */, dialogId, "msg");
|
|
2620
2613
|
var dialogMessageRange = (dialogId) => ({
|
|
2621
2614
|
start: createKey2("dialog" /* DIALOG */, dialogId, "msg", ""),
|
|
2622
2615
|
end: createKey2("dialog" /* DIALOG */, dialogId, "msg", "\uFFFF")
|
|
@@ -2717,8 +2710,9 @@ var metaKey = Object.assign(
|
|
|
2717
2710
|
var DB_PREFIX = {
|
|
2718
2711
|
USER: "user:"
|
|
2719
2712
|
};
|
|
2713
|
+
var USER_SETTINGS_KEY_SUFFIX = `${SEPARATOR2}settings`;
|
|
2720
2714
|
var createUserKey = {
|
|
2721
|
-
settings: (userId) =>
|
|
2715
|
+
settings: (userId) => `${userId}${USER_SETTINGS_KEY_SUFFIX}`,
|
|
2722
2716
|
profile: (userId) => createKey(userId, "profile")
|
|
2723
2717
|
};
|
|
2724
2718
|
var createUserPreferenceKey = {
|
|
@@ -2763,6 +2757,22 @@ var createTokenKey = {
|
|
|
2763
2757
|
record: (0, import_rambda.curry)(
|
|
2764
2758
|
(userId, timestamp) => createKey("token", userId, timestamp.toString())
|
|
2765
2759
|
),
|
|
2760
|
+
/**
|
|
2761
|
+
* 单次计费记录:`token/<user>/<timestamp>/<chargeId>`。
|
|
2762
|
+
*
|
|
2763
|
+
* 与 `record` 的唯一区别是把「本次计费自己的唯一 id」作为额外一段拼在末尾
|
|
2764
|
+
* —— 同一用户同一毫秒内的两笔合法计费因此各占一个 key,不再互相覆盖,
|
|
2765
|
+
* 也不会共用同一个账本 txId / 幂等键(`token-<tokenKey>` / `token:<tokenKey>`)
|
|
2766
|
+
* 而被账本判为 duplicate 静默漏扣。
|
|
2767
|
+
*
|
|
2768
|
+
* 兼容性:timestamp 仍是第二段且保持首位排序,因此
|
|
2769
|
+
* - `rangeOfUser(userId)`(usage/统计等读取路径用的全前缀范围)照常覆盖;
|
|
2770
|
+
* - `range(userId, ts)` 的 `token/<user>/<ts>` … `token/<user>/<ts+1d>`
|
|
2771
|
+
* 区间同样覆盖新 key(`<ts>-xxx` > `<ts>` 且 < `<ts+1>`),历史数据
|
|
2772
|
+
* 与新数据可以在同一区间里混扫。
|
|
2773
|
+
* 幂等键的稳定性由调用方决定:需要「重试同一笔」时传稳定的 chargeId。
|
|
2774
|
+
*/
|
|
2775
|
+
recordForCharge: (userId, timestamp, chargeId) => createKey("token", userId, timestamp.toString(), encodeURIComponent(chargeId)),
|
|
2766
2776
|
/** Server provider-call record: retry-stable even when the retry clock changes. */
|
|
2767
2777
|
recordForStableCall: (userId, callId) => createKey("token", userId, "call", encodeURIComponent(callId)),
|
|
2768
2778
|
/** Server provider-call failure audit record: preserved separately from retry success in a collision-free namespace. */
|
|
@@ -2787,6 +2797,16 @@ var createTokenStatsKey = Object.assign(
|
|
|
2787
2797
|
})
|
|
2788
2798
|
}
|
|
2789
2799
|
);
|
|
2800
|
+
var createTokenStatsAppliedKey = Object.assign(
|
|
2801
|
+
(userId, chargeKey) => createKey("token", "charge-stats", userId, encodeURIComponent(chargeKey)),
|
|
2802
|
+
{
|
|
2803
|
+
/** 某个用户的全部计费幂等标记范围:token-charge-stats-<userId>-* */
|
|
2804
|
+
rangeOfUser: (userId) => ({
|
|
2805
|
+
start: createKey("token", "charge-stats", userId, ""),
|
|
2806
|
+
end: createKey("token", "charge-stats", userId, "\uFFFF")
|
|
2807
|
+
})
|
|
2808
|
+
}
|
|
2809
|
+
);
|
|
2790
2810
|
var DIALOG_AGENT_LIST_INDEX_PREFIX = "dialogidx";
|
|
2791
2811
|
var DIALOG_LIST_TIMESTAMP_MAX = 9999999999999;
|
|
2792
2812
|
function parseDialogUpdatedAtMs(value) {
|
|
@@ -3179,8 +3199,6 @@ var sanitizeShareData = (data) => {
|
|
|
3179
3199
|
export {
|
|
3180
3200
|
ulid,
|
|
3181
3201
|
toTrimmedString,
|
|
3182
|
-
asNonEmptyStringArray,
|
|
3183
|
-
asTrimmedNonEmptyStringArray,
|
|
3184
3202
|
toNonEmptyString,
|
|
3185
3203
|
extractAgentInfo,
|
|
3186
3204
|
extractCoverImage,
|
|
@@ -3192,6 +3210,7 @@ export {
|
|
|
3192
3210
|
createDialogKey,
|
|
3193
3211
|
dialogMessageKey,
|
|
3194
3212
|
createDialogMessageKeyAndId,
|
|
3213
|
+
dialogMessagePrefix,
|
|
3195
3214
|
dialogMessageRange,
|
|
3196
3215
|
SEPARATOR2 as SEPARATOR,
|
|
3197
3216
|
createKey,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
escapeStringRegexp
|
|
3
|
+
} from "./chunk-IA7TRNNR.js";
|
|
1
4
|
import {
|
|
2
5
|
asTrimmedString
|
|
3
6
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -6360,6 +6363,8 @@ function fromMarkdown(value, encoding, options) {
|
|
|
6360
6363
|
}
|
|
6361
6364
|
function compiler(options) {
|
|
6362
6365
|
const config = {
|
|
6366
|
+
afterExit: [],
|
|
6367
|
+
beforeEnter: [],
|
|
6363
6368
|
transforms: [],
|
|
6364
6369
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
6365
6370
|
enter: {
|
|
@@ -6463,7 +6468,8 @@ function compiler(options) {
|
|
|
6463
6468
|
function compile(events) {
|
|
6464
6469
|
let tree = {
|
|
6465
6470
|
type: "root",
|
|
6466
|
-
children: []
|
|
6471
|
+
children: [],
|
|
6472
|
+
position: void 0
|
|
6467
6473
|
};
|
|
6468
6474
|
const context = {
|
|
6469
6475
|
stack: [tree],
|
|
@@ -6476,24 +6482,40 @@ function compiler(options) {
|
|
|
6476
6482
|
data
|
|
6477
6483
|
};
|
|
6478
6484
|
const listStack = [];
|
|
6485
|
+
const prepared = [];
|
|
6479
6486
|
let index2 = -1;
|
|
6480
6487
|
while (++index2 < events.length) {
|
|
6488
|
+
prepared.push(events[index2]);
|
|
6481
6489
|
if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
|
|
6482
6490
|
if (events[index2][0] === "enter") {
|
|
6483
|
-
listStack.push(
|
|
6491
|
+
listStack.push(prepared.length - 1);
|
|
6484
6492
|
} else {
|
|
6485
6493
|
const tail = listStack.pop();
|
|
6486
|
-
|
|
6494
|
+
prepareList(prepared, tail);
|
|
6487
6495
|
}
|
|
6488
6496
|
}
|
|
6489
6497
|
}
|
|
6498
|
+
events = prepared;
|
|
6490
6499
|
index2 = -1;
|
|
6491
6500
|
while (++index2 < events.length) {
|
|
6492
6501
|
const handler = config[events[index2][0]];
|
|
6502
|
+
if (events[index2][0] === "enter" && config.beforeEnter.length > 0) {
|
|
6503
|
+
callListeners(config.beforeEnter, {
|
|
6504
|
+
...context,
|
|
6505
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
6506
|
+
}, events[index2][1]);
|
|
6507
|
+
}
|
|
6493
6508
|
if (own2.call(handler, events[index2][1].type)) {
|
|
6494
|
-
handler[events[index2][1].type].call(
|
|
6509
|
+
handler[events[index2][1].type].call({
|
|
6510
|
+
...context,
|
|
6511
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
6512
|
+
}, events[index2][1]);
|
|
6513
|
+
}
|
|
6514
|
+
if (events[index2][0] === "exit" && config.afterExit.length > 0) {
|
|
6515
|
+
callListeners(config.afterExit, {
|
|
6516
|
+
...context,
|
|
6495
6517
|
sliceSerialize: events[index2][2].sliceSerialize
|
|
6496
|
-
},
|
|
6518
|
+
}, events[index2][1]);
|
|
6497
6519
|
}
|
|
6498
6520
|
}
|
|
6499
6521
|
if (context.tokenStack.length > 0) {
|
|
@@ -6519,7 +6541,14 @@ function compiler(options) {
|
|
|
6519
6541
|
}
|
|
6520
6542
|
return tree;
|
|
6521
6543
|
}
|
|
6522
|
-
function
|
|
6544
|
+
function callListeners(listeners, context, token) {
|
|
6545
|
+
let index2 = -1;
|
|
6546
|
+
while (++index2 < listeners.length) {
|
|
6547
|
+
listeners[index2].call(context, token);
|
|
6548
|
+
}
|
|
6549
|
+
}
|
|
6550
|
+
function prepareList(events, start) {
|
|
6551
|
+
const end = events.length - 1;
|
|
6523
6552
|
let index2 = start - 1;
|
|
6524
6553
|
let containerBalance = -1;
|
|
6525
6554
|
let listSpread = false;
|
|
@@ -6527,7 +6556,8 @@ function compiler(options) {
|
|
|
6527
6556
|
let lineIndex;
|
|
6528
6557
|
let firstBlankLineIndex;
|
|
6529
6558
|
let atMarker;
|
|
6530
|
-
|
|
6559
|
+
const insertions = [];
|
|
6560
|
+
while (++index2 <= end) {
|
|
6531
6561
|
const event = events[index2];
|
|
6532
6562
|
switch (event[1].type) {
|
|
6533
6563
|
case "listUnordered":
|
|
@@ -6584,9 +6614,10 @@ function compiler(options) {
|
|
|
6584
6614
|
listItem2._spread = true;
|
|
6585
6615
|
}
|
|
6586
6616
|
listItem2.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6617
|
+
insertions.push({
|
|
6618
|
+
at: lineIndex || index2,
|
|
6619
|
+
event: ["exit", listItem2, event[2]]
|
|
6620
|
+
});
|
|
6590
6621
|
}
|
|
6591
6622
|
if (event[1].type === "listItemPrefix") {
|
|
6592
6623
|
const item = {
|
|
@@ -6597,16 +6628,25 @@ function compiler(options) {
|
|
|
6597
6628
|
end: void 0
|
|
6598
6629
|
};
|
|
6599
6630
|
listItem2 = item;
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6631
|
+
insertions.push({
|
|
6632
|
+
at: index2,
|
|
6633
|
+
event: ["enter", item, event[2]]
|
|
6634
|
+
});
|
|
6603
6635
|
firstBlankLineIndex = void 0;
|
|
6604
6636
|
atMarker = true;
|
|
6605
6637
|
}
|
|
6606
6638
|
}
|
|
6607
6639
|
}
|
|
6640
|
+
const listEvents = events.splice(start);
|
|
6641
|
+
let insertion = 0;
|
|
6642
|
+
index2 = -1;
|
|
6643
|
+
while (++index2 < listEvents.length) {
|
|
6644
|
+
while (insertion < insertions.length && insertions[insertion].at === start + index2) {
|
|
6645
|
+
events.push(insertions[insertion++].event);
|
|
6646
|
+
}
|
|
6647
|
+
events.push(listEvents[index2]);
|
|
6648
|
+
}
|
|
6608
6649
|
events[start][1]._spread = listSpread;
|
|
6609
|
-
return length;
|
|
6610
6650
|
}
|
|
6611
6651
|
function opener(create, and) {
|
|
6612
6652
|
return open;
|
|
@@ -6648,7 +6688,8 @@ function compiler(options) {
|
|
|
6648
6688
|
start: token.start,
|
|
6649
6689
|
end: token.end
|
|
6650
6690
|
}) + "): it\u2019s not open");
|
|
6651
|
-
}
|
|
6691
|
+
}
|
|
6692
|
+
if (open[0].type !== token.type) {
|
|
6652
6693
|
if (onExitError) {
|
|
6653
6694
|
onExitError.call(this, token, open[0]);
|
|
6654
6695
|
} else {
|
|
@@ -6884,7 +6925,8 @@ function compiler(options) {
|
|
|
6884
6925
|
function blockQuote2() {
|
|
6885
6926
|
return {
|
|
6886
6927
|
type: "blockquote",
|
|
6887
|
-
children: []
|
|
6928
|
+
children: [],
|
|
6929
|
+
position: void 0
|
|
6888
6930
|
};
|
|
6889
6931
|
}
|
|
6890
6932
|
function codeFlow() {
|
|
@@ -6892,13 +6934,15 @@ function compiler(options) {
|
|
|
6892
6934
|
type: "code",
|
|
6893
6935
|
lang: null,
|
|
6894
6936
|
meta: null,
|
|
6895
|
-
value: ""
|
|
6937
|
+
value: "",
|
|
6938
|
+
position: void 0
|
|
6896
6939
|
};
|
|
6897
6940
|
}
|
|
6898
6941
|
function codeText2() {
|
|
6899
6942
|
return {
|
|
6900
6943
|
type: "inlineCode",
|
|
6901
|
-
value: ""
|
|
6944
|
+
value: "",
|
|
6945
|
+
position: void 0
|
|
6902
6946
|
};
|
|
6903
6947
|
}
|
|
6904
6948
|
function definition2() {
|
|
@@ -6907,13 +6951,15 @@ function compiler(options) {
|
|
|
6907
6951
|
identifier: "",
|
|
6908
6952
|
label: null,
|
|
6909
6953
|
title: null,
|
|
6910
|
-
url: ""
|
|
6954
|
+
url: "",
|
|
6955
|
+
position: void 0
|
|
6911
6956
|
};
|
|
6912
6957
|
}
|
|
6913
6958
|
function emphasis() {
|
|
6914
6959
|
return {
|
|
6915
6960
|
type: "emphasis",
|
|
6916
|
-
children: []
|
|
6961
|
+
children: [],
|
|
6962
|
+
position: void 0
|
|
6917
6963
|
};
|
|
6918
6964
|
}
|
|
6919
6965
|
function heading() {
|
|
@@ -6921,18 +6967,21 @@ function compiler(options) {
|
|
|
6921
6967
|
type: "heading",
|
|
6922
6968
|
// @ts-expect-error `depth` will be set later.
|
|
6923
6969
|
depth: 0,
|
|
6924
|
-
children: []
|
|
6970
|
+
children: [],
|
|
6971
|
+
position: void 0
|
|
6925
6972
|
};
|
|
6926
6973
|
}
|
|
6927
6974
|
function hardBreak() {
|
|
6928
6975
|
return {
|
|
6929
|
-
type: "break"
|
|
6976
|
+
type: "break",
|
|
6977
|
+
position: void 0
|
|
6930
6978
|
};
|
|
6931
6979
|
}
|
|
6932
6980
|
function html() {
|
|
6933
6981
|
return {
|
|
6934
6982
|
type: "html",
|
|
6935
|
-
value: ""
|
|
6983
|
+
value: "",
|
|
6984
|
+
position: void 0
|
|
6936
6985
|
};
|
|
6937
6986
|
}
|
|
6938
6987
|
function image() {
|
|
@@ -6940,7 +6989,8 @@ function compiler(options) {
|
|
|
6940
6989
|
type: "image",
|
|
6941
6990
|
title: null,
|
|
6942
6991
|
url: "",
|
|
6943
|
-
alt: null
|
|
6992
|
+
alt: null,
|
|
6993
|
+
position: void 0
|
|
6944
6994
|
};
|
|
6945
6995
|
}
|
|
6946
6996
|
function link() {
|
|
@@ -6948,7 +6998,8 @@ function compiler(options) {
|
|
|
6948
6998
|
type: "link",
|
|
6949
6999
|
title: null,
|
|
6950
7000
|
url: "",
|
|
6951
|
-
children: []
|
|
7001
|
+
children: [],
|
|
7002
|
+
position: void 0
|
|
6952
7003
|
};
|
|
6953
7004
|
}
|
|
6954
7005
|
function list2(token) {
|
|
@@ -6957,7 +7008,8 @@ function compiler(options) {
|
|
|
6957
7008
|
ordered: token.type === "listOrdered",
|
|
6958
7009
|
start: null,
|
|
6959
7010
|
spread: token._spread,
|
|
6960
|
-
children: []
|
|
7011
|
+
children: [],
|
|
7012
|
+
position: void 0
|
|
6961
7013
|
};
|
|
6962
7014
|
}
|
|
6963
7015
|
function listItem(token) {
|
|
@@ -6965,30 +7017,35 @@ function compiler(options) {
|
|
|
6965
7017
|
type: "listItem",
|
|
6966
7018
|
spread: token._spread,
|
|
6967
7019
|
checked: null,
|
|
6968
|
-
children: []
|
|
7020
|
+
children: [],
|
|
7021
|
+
position: void 0
|
|
6969
7022
|
};
|
|
6970
7023
|
}
|
|
6971
7024
|
function paragraph() {
|
|
6972
7025
|
return {
|
|
6973
7026
|
type: "paragraph",
|
|
6974
|
-
children: []
|
|
7027
|
+
children: [],
|
|
7028
|
+
position: void 0
|
|
6975
7029
|
};
|
|
6976
7030
|
}
|
|
6977
7031
|
function strong() {
|
|
6978
7032
|
return {
|
|
6979
7033
|
type: "strong",
|
|
6980
|
-
children: []
|
|
7034
|
+
children: [],
|
|
7035
|
+
position: void 0
|
|
6981
7036
|
};
|
|
6982
7037
|
}
|
|
6983
7038
|
function text4() {
|
|
6984
7039
|
return {
|
|
6985
7040
|
type: "text",
|
|
6986
|
-
value: ""
|
|
7041
|
+
value: "",
|
|
7042
|
+
position: void 0
|
|
6987
7043
|
};
|
|
6988
7044
|
}
|
|
6989
7045
|
function thematicBreak2() {
|
|
6990
7046
|
return {
|
|
6991
|
-
type: "thematicBreak"
|
|
7047
|
+
type: "thematicBreak",
|
|
7048
|
+
position: void 0
|
|
6992
7049
|
};
|
|
6993
7050
|
}
|
|
6994
7051
|
}
|
|
@@ -7029,6 +7086,14 @@ function extension(combined, extension2) {
|
|
|
7029
7086
|
}
|
|
7030
7087
|
break;
|
|
7031
7088
|
}
|
|
7089
|
+
case "afterExit":
|
|
7090
|
+
case "beforeEnter": {
|
|
7091
|
+
const right = extension2[key];
|
|
7092
|
+
if (right) {
|
|
7093
|
+
combined[key].push(right);
|
|
7094
|
+
}
|
|
7095
|
+
break;
|
|
7096
|
+
}
|
|
7032
7097
|
case "enter":
|
|
7033
7098
|
case "exit": {
|
|
7034
7099
|
const right = extension2[key];
|
|
@@ -7050,12 +7115,11 @@ function defaultOnError(left, right) {
|
|
|
7050
7115
|
start: right.start,
|
|
7051
7116
|
end: right.end
|
|
7052
7117
|
}) + ") is open");
|
|
7053
|
-
} else {
|
|
7054
|
-
throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
|
|
7055
|
-
start: right.start,
|
|
7056
|
-
end: right.end
|
|
7057
|
-
}) + ") is still open");
|
|
7058
7118
|
}
|
|
7119
|
+
throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
|
|
7120
|
+
start: right.start,
|
|
7121
|
+
end: right.end
|
|
7122
|
+
}) + ") is still open");
|
|
7059
7123
|
}
|
|
7060
7124
|
|
|
7061
7125
|
// node_modules/ccount/index.js
|
|
@@ -7077,14 +7141,6 @@ function ccount(value, character) {
|
|
|
7077
7141
|
function ok() {
|
|
7078
7142
|
}
|
|
7079
7143
|
|
|
7080
|
-
// node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js
|
|
7081
|
-
function escapeStringRegexp(string3) {
|
|
7082
|
-
if (typeof string3 !== "string") {
|
|
7083
|
-
throw new TypeError("Expected a string");
|
|
7084
|
-
}
|
|
7085
|
-
return string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
7086
|
-
}
|
|
7087
|
-
|
|
7088
7144
|
// node_modules/unist-util-is/lib/index.js
|
|
7089
7145
|
var convert = (
|
|
7090
7146
|
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
@@ -7320,15 +7376,12 @@ function findAndReplace(tree, list2, options) {
|
|
|
7320
7376
|
find.lastIndex = position2 + 1;
|
|
7321
7377
|
} else {
|
|
7322
7378
|
if (start !== position2) {
|
|
7323
|
-
|
|
7324
|
-
type: "text",
|
|
7325
|
-
value: node2.value.slice(start, position2)
|
|
7326
|
-
});
|
|
7379
|
+
add({ type: "text", value: node2.value.slice(start, position2) });
|
|
7327
7380
|
}
|
|
7328
7381
|
if (Array.isArray(value)) {
|
|
7329
|
-
|
|
7382
|
+
for (const child of value) add(child);
|
|
7330
7383
|
} else if (value) {
|
|
7331
|
-
|
|
7384
|
+
add(value);
|
|
7332
7385
|
}
|
|
7333
7386
|
start = position2 + match[0].length;
|
|
7334
7387
|
change = true;
|
|
@@ -7340,20 +7393,28 @@ function findAndReplace(tree, list2, options) {
|
|
|
7340
7393
|
}
|
|
7341
7394
|
if (change) {
|
|
7342
7395
|
if (start < node2.value.length) {
|
|
7343
|
-
|
|
7396
|
+
add({ type: "text", value: node2.value.slice(start) });
|
|
7344
7397
|
}
|
|
7345
7398
|
parent.children.splice(index2, 1, ...nodes);
|
|
7346
7399
|
} else {
|
|
7347
7400
|
nodes = [node2];
|
|
7348
7401
|
}
|
|
7349
7402
|
return index2 + nodes.length;
|
|
7403
|
+
function add(child) {
|
|
7404
|
+
const previous3 = nodes[nodes.length - 1];
|
|
7405
|
+
if (previous3 && previous3.type === "text" && child.type === "text") {
|
|
7406
|
+
previous3.value += child.value;
|
|
7407
|
+
} else {
|
|
7408
|
+
nodes.push(child);
|
|
7409
|
+
}
|
|
7410
|
+
}
|
|
7350
7411
|
}
|
|
7351
7412
|
}
|
|
7352
7413
|
function toPairs(tupleOrList) {
|
|
7353
|
-
const result = [];
|
|
7354
7414
|
if (!Array.isArray(tupleOrList)) {
|
|
7355
7415
|
throw new TypeError("Expected find and replace tuple or list of tuples");
|
|
7356
7416
|
}
|
|
7417
|
+
const result = [];
|
|
7357
7418
|
const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
|
|
7358
7419
|
let index2 = -1;
|
|
7359
7420
|
while (++index2 < list2.length) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compactWhitespace
|
|
3
|
+
} from "./chunk-DWLEOOGR.js";
|
|
4
|
+
|
|
5
|
+
// packages/core/clipCompactText.ts
|
|
6
|
+
function clipCompactText(value, max, ellipsis = "...") {
|
|
7
|
+
const compact = compactWhitespace(value);
|
|
8
|
+
if (compact.length <= max) return compact;
|
|
9
|
+
if (max <= ellipsis.length) return compact.slice(0, max);
|
|
10
|
+
return `${compact.slice(0, max - ellipsis.length)}${ellipsis}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
clipCompactText
|
|
15
|
+
};
|