nolo-cli 0.259.0-alpha.1 → 0.261.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
- package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
- package/agentRecordCommands-DYMHWTID.js +210 -0
- package/agentRun-QVFG3CI4.js +250 -0
- package/agentRunCommand-YV4V5HSL.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
- package/appConfigCommands-ZUXQLE7L.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
- package/appMigrateCommands-JAPOLYSW.js +230 -0
- package/appSourceCommands-TLXPWXUH.js +279 -0
- package/authCommand-AU3GZBZ2.js +65 -0
- package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
- package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
- package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
- package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
- package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
- package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
- package/chunk-35JIFLIG.js +30 -0
- package/{chunk-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
- package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
- package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
- package/chunk-4IVMDQBA.js +261 -0
- package/chunk-4Y6CZ2N4.js +82 -0
- package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
- package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
- package/chunk-72VWN4VK.js +51 -0
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-A4O76A6V.js +432 -0
- package/chunk-AMNZPQCY.js +635 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -6
- package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
- package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
- package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
- package/{chunk-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/chunk-D3ONA3FP.js +762 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- package/chunk-DLXL4NSL.js +1179 -0
- package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
- package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
- package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
- package/{chunk-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
- package/chunk-ER6NTALN.js +34 -0
- package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
- package/chunk-EUHMI5KG.js +101 -0
- package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
- package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/chunk-FP46RAJQ.js +58 -0
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
- package/chunk-GF4LYNNZ.js +25 -0
- package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
- package/chunk-HAZ6UVH4.js +368 -0
- package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
- package/chunk-IV6VUVLJ.js +88 -0
- package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
- package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
- package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
- package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
- package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
- package/chunk-LHCIIUCX.js +222 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
- package/chunk-LUTSMSIL.js +425 -0
- package/chunk-LXP53WGF.js +168 -0
- package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
- package/chunk-MDAYRIP7.js +1889 -0
- package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
- package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
- package/chunk-MRACVEPZ.js +7 -0
- package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
- package/chunk-NLS7F5DW.js +1697 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
- package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
- package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
- package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
- package/chunk-RF576RYE.js +117 -0
- package/chunk-RI7SXDJW.js +1317 -0
- package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
- package/chunk-SJFL32RD.js +356 -0
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
- package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
- package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
- package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
- package/chunk-ULPU4C43.js +1710 -0
- package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
- package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
- package/chunk-VOO3YQQP.js +17157 -0
- package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/chunk-WEEB2JKA.js +443 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
- package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
- package/chunk-XT6C2QZW.js +46 -0
- package/chunk-XUDXQT7R.js +790 -0
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
- package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
- package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
- package/cloudAutomationCommands-2WQUGQSW.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-DSBL3X3A.js +172 -0
- package/createDialogAction-OHFUHC53.js +86 -0
- package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
- package/deleteDbKey-DRXKWJX5.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
- package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.js} +68 -59
- package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-DHGWURJZ.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
- package/index.js +36 -22
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-ZMU22RQJ.js +198 -0
- package/localAutomationRuntime-MU5FGJ3V.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
- package/localRuntimeAuthority-LDXMEDO5.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-VBKV3FFE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
- package/mcpLocalManageCommands-USETIMHB.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.js} +25 -34
- package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
- package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
- package/package.json +3 -3
- package/parityCommands-LYDLWSLK.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.js} +49 -45
- package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
- package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
- package/{read-KG6INYUT.js → read-SPSQ6NLR.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-TNNDO635.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
- package/spacePruneCommand-2ITUFYBM.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
- package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.js} +11 -15
- package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
- package/workContext-ZAW6VXT7.js +18 -0
- package/workContextQueryProjection-CACY5VFE.js +23 -0
- package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
- package/agentFavoriteCommands-7LOP3HUD.js +0 -186
- package/agentRecordCommands-TPE7NSZ6.js +0 -194
- package/agentRunCommand-DMVGBPLI.js +0 -232
- package/authCommand-V6EOMZX6.js +0 -79
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BZMDWGQQ.js +0 -47
- package/chunk-GAHJLSDO.js +0 -107
- package/chunk-GYX6XTAI.js +0 -84
- package/chunk-HNUWUO75.js +0 -93
- package/chunk-HSBHS6KT.js +0 -33401
- package/chunk-KG27JIG4.js +0 -136
- package/chunk-OB4FBZXJ.js +0 -364
- package/chunk-OKH74FML.js +0 -3746
- package/chunk-OLZBQWZU.js +0 -6
- package/chunk-OOV5JN25.js +0 -1317
- package/chunk-OQFOE4SJ.js +0 -405
- package/chunk-PXYBUFDB.js +0 -53
- package/chunk-R3FZHW4Q.js +0 -103
- package/chunk-R3MV2GII.js +0 -106
- package/chunk-SCAC3NM5.js +0 -11751
- package/chunk-SR4FE5VD.js +0 -9
- package/chunk-SYTHYBMI.js +0 -3558
- package/chunk-UKZX3NHN.js +0 -48
- package/chunk-UVLYNWIE.js +0 -74
- package/chunk-VQX5JJNI.js +0 -861
- package/chunk-X4O7FJF5.js +0 -160
- package/chunk-YJPK35HB.js +0 -175
- package/chunk-YNIYE47Z.js +0 -105
- package/chunk-Z4PCXPUE.js +0 -127
- package/chunk-ZR5IVL4N.js +0 -862
- package/chunk-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
- package/createDialogAction-ZAJERW62.js +0 -82
- package/deleteFile-ECU6FU5C.js +0 -55
- package/dialogNotifyCommand-IASQGEMW.js +0 -36
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-TBVOYOAH.js +0 -209
- package/markdownToSlate-PXYAIBVL.js +0 -8
- package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
- package/webapi-QVV65DQF.js +0 -2487
- package/workContext-Y3ADAPZU.js +0 -14
- package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
- package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
- package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
|
@@ -1,153 +1,81 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ACCOUNT_POLICY_KEYS,
|
|
3
|
+
CHAT_UI_PREFERENCE_KEYS,
|
|
2
4
|
SYSTEM_DEFAULT_AGENT_ID,
|
|
5
|
+
USER_PREFERENCE_KEYS,
|
|
6
|
+
bindUserPreferencesSession,
|
|
7
|
+
getUserPreferencesStore,
|
|
3
8
|
hasOwn,
|
|
4
|
-
normalizeAgentUpdateFieldList,
|
|
5
9
|
normalizeAuthorityHomeServerSetting,
|
|
6
10
|
normalizeDefaultAgentIdSetting,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
normalizeTonePresetSetting,
|
|
10
|
-
normalizeUiPlugins,
|
|
11
|
+
normalizeEnabledPromptSkills,
|
|
12
|
+
normalizeEnabledSkills,
|
|
11
13
|
omitKeys,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
pickUserPreferences,
|
|
15
|
+
preferenceSessionFromSnapshot
|
|
16
|
+
} from "./chunk-WEEB2JKA.js";
|
|
14
17
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
normalizeEnabledSkills
|
|
18
|
-
} from "./chunk-R3FZHW4Q.js";
|
|
18
|
+
createAsyncThunk
|
|
19
|
+
} from "./chunk-AMNZPQCY.js";
|
|
19
20
|
import {
|
|
20
21
|
patch,
|
|
21
22
|
readAndWait,
|
|
23
|
+
selectById,
|
|
22
24
|
toTimestampMs,
|
|
23
|
-
|
|
25
|
+
upsertAction,
|
|
26
|
+
upsertSSREntity,
|
|
24
27
|
write
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-U5PSCTMR.js";
|
|
26
29
|
import "./chunk-3PVYUPXK.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import
|
|
29
|
-
require_react
|
|
30
|
-
} from "./chunk-RD3QLZQV.js";
|
|
31
|
-
import "./chunk-7BIJFGKS.js";
|
|
30
|
+
import "./chunk-J22PFCQN.js";
|
|
31
|
+
import "./chunk-Q5IXZF3S.js";
|
|
32
32
|
import {
|
|
33
33
|
getRuntimeServerContext
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import
|
|
36
|
-
createAction,
|
|
37
|
-
createAsyncThunk
|
|
38
|
-
} from "./chunk-ZTHAJU3O.js";
|
|
39
|
-
import {
|
|
40
|
-
fetchFromServer
|
|
41
|
-
} from "./chunk-HDKMVYNJ.js";
|
|
42
|
-
import "./chunk-YJPK35HB.js";
|
|
34
|
+
} from "./chunk-MPWQI36J.js";
|
|
35
|
+
import "./chunk-SJFL32RD.js";
|
|
43
36
|
import "./chunk-UEILX4EV.js";
|
|
44
|
-
import "./chunk-QQ56R7KS.js";
|
|
45
37
|
import {
|
|
38
|
+
getRuntimeServerSnapshot,
|
|
39
|
+
getRuntimeServerStore,
|
|
46
40
|
getSessionGenerationForState,
|
|
47
41
|
getSessionSnapshotForState,
|
|
48
42
|
selectIdentityUserId
|
|
49
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-SWJRX4M5.js";
|
|
44
|
+
import {
|
|
45
|
+
fetchFromServer
|
|
46
|
+
} from "./chunk-FNLT7NKG.js";
|
|
47
|
+
import "./chunk-MRACVEPZ.js";
|
|
48
|
+
import "./chunk-QQ56R7KS.js";
|
|
50
49
|
import {
|
|
51
50
|
asRecordOrEmpty
|
|
52
51
|
} from "./chunk-KX6YBIHG.js";
|
|
53
52
|
import "./chunk-7DPNBQSV.js";
|
|
54
53
|
import "./chunk-OW765XBU.js";
|
|
55
54
|
import "./chunk-BV3FLP2L.js";
|
|
56
|
-
import
|
|
57
|
-
|
|
58
|
-
} from "./chunk-EUGTFFO6.js";
|
|
59
|
-
import "./chunk-5P3PPQVP.js";
|
|
55
|
+
import "./chunk-EUGTFFO6.js";
|
|
56
|
+
import "./chunk-ZQAADXSF.js";
|
|
60
57
|
import {
|
|
61
58
|
createUserKey,
|
|
62
59
|
createUserPreferenceKey
|
|
63
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-DLXL4NSL.js";
|
|
64
61
|
import {
|
|
65
62
|
ulid
|
|
66
63
|
} from "./chunk-OJKUU3LP.js";
|
|
67
64
|
import "./chunk-YZMNK53S.js";
|
|
68
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-YRPIUIEQ.js";
|
|
69
66
|
import "./chunk-M2EJHDJP.js";
|
|
70
67
|
import "./chunk-I42VC5KR.js";
|
|
71
|
-
import "./chunk-U6VC4MU4.js";
|
|
72
|
-
import "./chunk-LCBAMY2M.js";
|
|
73
68
|
import "./chunk-3EUW3WEO.js";
|
|
74
69
|
import "./chunk-WWC7I6TA.js";
|
|
70
|
+
import "./chunk-U6VC4MU4.js";
|
|
75
71
|
import "./chunk-KUG52IAP.js";
|
|
72
|
+
import "./chunk-JKVOKKMQ.js";
|
|
73
|
+
import "./chunk-IV6VUVLJ.js";
|
|
76
74
|
import "./chunk-G3SUCT4W.js";
|
|
77
75
|
import "./chunk-4SN6J65J.js";
|
|
78
76
|
import "./chunk-CF7PE763.js";
|
|
79
77
|
import "./chunk-QSJ3HFEF.js";
|
|
80
|
-
import
|
|
81
|
-
__toESM
|
|
82
|
-
} from "./chunk-U67V476Y.js";
|
|
83
|
-
|
|
84
|
-
// packages/app/settings/accountChatDisplayOwner.ts
|
|
85
|
-
var import_react = __toESM(require_react());
|
|
86
|
-
var ACCOUNT_CHAT_DISPLAY_PREFERENCE_KEYS = [
|
|
87
|
-
"showThinking",
|
|
88
|
-
"showScrollToTopButton",
|
|
89
|
-
"showScrollToBottomButton",
|
|
90
|
-
"showNewFileDiff",
|
|
91
|
-
"showShellTreeOutput"
|
|
92
|
-
];
|
|
93
|
-
var DEFAULT_ACCOUNT_CHAT_DISPLAY_PREFERENCES = Object.freeze({
|
|
94
|
-
showThinking: true,
|
|
95
|
-
showScrollToTopButton: false,
|
|
96
|
-
showScrollToBottomButton: false,
|
|
97
|
-
showNewFileDiff: false,
|
|
98
|
-
showShellTreeOutput: false
|
|
99
|
-
});
|
|
100
|
-
var createAccountChatDisplayOwner = () => {
|
|
101
|
-
let accountId = null;
|
|
102
|
-
let snapshot = DEFAULT_ACCOUNT_CHAT_DISPLAY_PREFERENCES;
|
|
103
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
104
|
-
const emit = () => listeners.forEach((listener) => listener());
|
|
105
|
-
return {
|
|
106
|
-
getAccountId: () => accountId,
|
|
107
|
-
getSnapshot: () => snapshot,
|
|
108
|
-
subscribe: (listener) => {
|
|
109
|
-
listeners.add(listener);
|
|
110
|
-
return () => {
|
|
111
|
-
listeners.delete(listener);
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
setAccount: (nextAccountId) => {
|
|
115
|
-
if (accountId === nextAccountId) return;
|
|
116
|
-
accountId = nextAccountId;
|
|
117
|
-
snapshot = DEFAULT_ACCOUNT_CHAT_DISPLAY_PREFERENCES;
|
|
118
|
-
emit();
|
|
119
|
-
},
|
|
120
|
-
updateForAccount: (expectedAccountId, changes) => {
|
|
121
|
-
if (!expectedAccountId || expectedAccountId !== accountId) return false;
|
|
122
|
-
const next = { ...snapshot, ...changes };
|
|
123
|
-
if (ACCOUNT_CHAT_DISPLAY_PREFERENCE_KEYS.every((key) => next[key] === snapshot[key])) return true;
|
|
124
|
-
snapshot = Object.freeze(next);
|
|
125
|
-
emit();
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
var owners = /* @__PURE__ */ new WeakMap();
|
|
131
|
-
function getAccountChatDisplayOwner(getState) {
|
|
132
|
-
let owner = owners.get(getState);
|
|
133
|
-
if (!owner) {
|
|
134
|
-
owner = createAccountChatDisplayOwner();
|
|
135
|
-
owners.set(getState, owner);
|
|
136
|
-
}
|
|
137
|
-
return owner;
|
|
138
|
-
}
|
|
139
|
-
function pickAccountChatDisplayPreferences(value) {
|
|
140
|
-
const result = {};
|
|
141
|
-
for (const key of ACCOUNT_CHAT_DISPLAY_PREFERENCE_KEYS) {
|
|
142
|
-
if (typeof value[key] === "boolean") result[key] = value[key];
|
|
143
|
-
}
|
|
144
|
-
return result;
|
|
145
|
-
}
|
|
146
|
-
var omitAccountChatDisplayPreferences = (value) => {
|
|
147
|
-
const rest = { ...value };
|
|
148
|
-
for (const key of ACCOUNT_CHAT_DISPLAY_PREFERENCE_KEYS) delete rest[key];
|
|
149
|
-
return rest;
|
|
150
|
-
};
|
|
78
|
+
import "./chunk-U67V476Y.js";
|
|
151
79
|
|
|
152
80
|
// packages/database/userPreferenceRegister.ts
|
|
153
81
|
var USER_PREFERENCE_NAMES = {
|
|
@@ -199,17 +127,16 @@ var buildDefaultAgentPreferenceRegisterRecord = ({
|
|
|
199
127
|
});
|
|
200
128
|
|
|
201
129
|
// packages/app/settings/settingActions.ts
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var publishUiPlugins = createAction("settings/_publishUiPlugins");
|
|
130
|
+
function updateSettingsState(getState, changes) {
|
|
131
|
+
const owner = getRuntimeServerStore(getState);
|
|
132
|
+
if (!owner) throw new Error("Settings writes require a bound runtime server store");
|
|
133
|
+
owner.update({
|
|
134
|
+
...changes.currentServer !== void 0 ? { currentServer: changes.currentServer } : {},
|
|
135
|
+
...changes.syncServers !== void 0 ? { syncServers: changes.syncServers } : {},
|
|
136
|
+
...changes.isAutoSync !== void 0 ? { isAutoSync: changes.isAutoSync } : {},
|
|
137
|
+
...Object.hasOwn(changes, "userAuthorityRegistry") ? { userAuthorityRegistry: changes.userAuthorityRegistry } : {}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
213
140
|
|
|
214
141
|
// packages/app/settings/accountSettingsWriteQueue.ts
|
|
215
142
|
var queues = /* @__PURE__ */ new WeakMap();
|
|
@@ -252,7 +179,6 @@ function stripRetiredSettingsFields(record) {
|
|
|
252
179
|
var getDefaultSettingDbActionThunks = () => ({
|
|
253
180
|
readAndWait,
|
|
254
181
|
patch,
|
|
255
|
-
upsert,
|
|
256
182
|
write
|
|
257
183
|
});
|
|
258
184
|
var settingDbActionThunksOverrideKey = Symbol.for(
|
|
@@ -271,140 +197,43 @@ var withSettingsRecordSchema = (changes) => ({
|
|
|
271
197
|
});
|
|
272
198
|
|
|
273
199
|
// packages/app/settings/settingPersistence.ts
|
|
200
|
+
var LEGACY_DEVICE_SETTING_FIELDS = [
|
|
201
|
+
"themeName",
|
|
202
|
+
"themeMode",
|
|
203
|
+
"isDark",
|
|
204
|
+
"density",
|
|
205
|
+
"fontPreset",
|
|
206
|
+
"sidebarWidth",
|
|
207
|
+
"headerHeight",
|
|
208
|
+
"deleteShortcut",
|
|
209
|
+
"desktopChromeConnectorEnabled"
|
|
210
|
+
];
|
|
274
211
|
var normalizeSettingChanges = (changes) => {
|
|
275
212
|
let normalizedChanges = omitKeys(stripRetiredSettingsFields(changes), [
|
|
276
|
-
//
|
|
213
|
+
// 本地意图世代只活在本地:既不能从服务端 record 写回,也不能写云。
|
|
277
214
|
"localIntentEpoch",
|
|
215
|
+
"defaultSpaceId",
|
|
216
|
+
...USER_PREFERENCE_KEYS,
|
|
278
217
|
// 每个键的本地意图世代同理:纯本地判据,不入云端 record、不被远端回灌。
|
|
279
218
|
"localIntentKeyEpochs",
|
|
280
219
|
// 权威回显世代同理:纯本地世代标记,不入云端 record、不被远端回灌。
|
|
281
220
|
"serverAuthorityEchoSeq",
|
|
282
221
|
// 写失败状态同样是纯本地 observability:绝不进入云端 settings record。
|
|
283
222
|
"lastWriteFailure",
|
|
284
|
-
// uiPlugins
|
|
223
|
+
// 已退役的 uiPlugins 及其本地归属标记:静默忽略,兼容旧账号云端记录。
|
|
224
|
+
"uiPlugins",
|
|
285
225
|
"uiPluginsOwnerAccountId",
|
|
286
226
|
"uiPluginsGeneration",
|
|
287
|
-
|
|
288
|
-
"themeName",
|
|
289
|
-
"themeMode",
|
|
290
|
-
"isDark",
|
|
291
|
-
"density",
|
|
292
|
-
"fontPreset"
|
|
227
|
+
...LEGACY_DEVICE_SETTING_FIELDS
|
|
293
228
|
]);
|
|
294
|
-
if (hasOwn(normalizedChanges, "defaultAgentId")) {
|
|
295
|
-
normalizedChanges = {
|
|
296
|
-
...normalizedChanges,
|
|
297
|
-
defaultAgentId: normalizeDefaultAgentIdSetting(
|
|
298
|
-
normalizedChanges.defaultAgentId
|
|
299
|
-
)
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
if (hasOwn(normalizedChanges, "defaultSpaceId")) {
|
|
303
|
-
normalizedChanges = omitKeys(normalizedChanges, [
|
|
304
|
-
"defaultSpaceId"
|
|
305
|
-
]);
|
|
306
|
-
}
|
|
307
|
-
if (hasOwn(normalizedChanges, "userTonePreset")) {
|
|
308
|
-
normalizedChanges = {
|
|
309
|
-
...normalizedChanges,
|
|
310
|
-
userTonePreset: normalizeTonePresetSetting(
|
|
311
|
-
normalizedChanges.userTonePreset
|
|
312
|
-
)
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
if (hasOwn(normalizedChanges, "knowledgeCaptureLevel")) {
|
|
316
|
-
normalizedChanges = {
|
|
317
|
-
...normalizedChanges,
|
|
318
|
-
knowledgeCaptureLevel: normalizePolicyLevelSetting(
|
|
319
|
-
normalizedChanges.knowledgeCaptureLevel,
|
|
320
|
-
DEFAULT_USER_PREFERENCE_PROFILE.knowledgeCaptureLevel
|
|
321
|
-
)
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
if (hasOwn(normalizedChanges, "spaceContextLevel")) {
|
|
325
|
-
normalizedChanges = {
|
|
326
|
-
...normalizedChanges,
|
|
327
|
-
spaceContextLevel: normalizePolicyLevelSetting(
|
|
328
|
-
normalizedChanges.spaceContextLevel,
|
|
329
|
-
DEFAULT_USER_PREFERENCE_PROFILE.spaceContextLevel
|
|
330
|
-
)
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
if (hasOwn(normalizedChanges, "autoApproveSelfUpdateFields")) {
|
|
334
|
-
normalizedChanges = {
|
|
335
|
-
...normalizedChanges,
|
|
336
|
-
autoApproveSelfUpdateFields: normalizeAgentUpdateFieldList(
|
|
337
|
-
normalizedChanges.autoApproveSelfUpdateFields
|
|
338
|
-
)
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
if (hasOwn(normalizedChanges, "systemBuiltinSkills")) {
|
|
342
|
-
normalizedChanges = {
|
|
343
|
-
...normalizedChanges,
|
|
344
|
-
systemBuiltinSkills: normalizeSystemBuiltinSkills(
|
|
345
|
-
normalizedChanges.systemBuiltinSkills,
|
|
346
|
-
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
347
|
-
)
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
if (hasOwn(normalizedChanges, "uiPlugins")) {
|
|
351
|
-
normalizedChanges = {
|
|
352
|
-
...normalizedChanges,
|
|
353
|
-
uiPlugins: normalizeUiPlugins(normalizedChanges.uiPlugins)
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
if (hasOwn(normalizedChanges, "enabledPromptSkills")) {
|
|
357
|
-
normalizedChanges = {
|
|
358
|
-
...normalizedChanges,
|
|
359
|
-
enabledPromptSkills: normalizeEnabledPromptSkills(
|
|
360
|
-
normalizedChanges.enabledPromptSkills
|
|
361
|
-
)
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
if (hasOwn(normalizedChanges, "enabledSkills")) {
|
|
365
|
-
normalizedChanges = {
|
|
366
|
-
...normalizedChanges,
|
|
367
|
-
enabledSkills: normalizeEnabledSkills(
|
|
368
|
-
normalizedChanges.enabledSkills
|
|
369
|
-
)
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
229
|
return normalizedChanges;
|
|
373
230
|
};
|
|
374
|
-
var LOCAL_APPEARANCE_KEY_NAMES = [
|
|
375
|
-
"themeName",
|
|
376
|
-
"themeMode",
|
|
377
|
-
"isDark",
|
|
378
|
-
"density",
|
|
379
|
-
"fontPreset"
|
|
380
|
-
];
|
|
381
|
-
var GUEST_UPDATABLE_KEY_NAMES = [
|
|
382
|
-
"sidebarWidth"
|
|
383
|
-
];
|
|
384
|
-
var LOCAL_FIRST_APPEARANCE_KEYS = Object.freeze(
|
|
385
|
-
Object.fromEntries(
|
|
386
|
-
LOCAL_APPEARANCE_KEY_NAMES.map((key) => [key, true])
|
|
387
|
-
)
|
|
388
|
-
);
|
|
389
|
-
var GUEST_UPDATABLE_KEYS = Object.freeze(
|
|
390
|
-
Object.fromEntries(
|
|
391
|
-
GUEST_UPDATABLE_KEY_NAMES.map((key) => [key, true])
|
|
392
|
-
)
|
|
393
|
-
);
|
|
394
|
-
var isGuestUpdatableKey = (key) => key in GUEST_UPDATABLE_KEYS;
|
|
395
|
-
var isLocalFirstAppearanceChange = (changes) => {
|
|
396
|
-
const keys = Object.keys(changes);
|
|
397
|
-
if (keys.length === 0) return false;
|
|
398
|
-
return keys.every(
|
|
399
|
-
(key) => isGuestUpdatableKey(key)
|
|
400
|
-
);
|
|
401
|
-
};
|
|
402
231
|
var stripRegisterBackedFieldsFromSettingsWrite = (changes) => {
|
|
403
232
|
return omitKeys(stripRetiredSettingsFields(changes), [
|
|
404
233
|
"autoApproveCredits",
|
|
405
234
|
"defaultSpaceId",
|
|
406
235
|
"userAuthorityRegistry",
|
|
407
|
-
...
|
|
236
|
+
...LEGACY_DEVICE_SETTING_FIELDS
|
|
408
237
|
]);
|
|
409
238
|
};
|
|
410
239
|
var sanitizeStoredSettingsRecord = (settingsRecord) => {
|
|
@@ -416,10 +245,11 @@ var sanitizeStoredSettingsRecord = (settingsRecord) => {
|
|
|
416
245
|
"autoApproveCredits",
|
|
417
246
|
"defaultSpaceId",
|
|
418
247
|
"schemaVersion",
|
|
419
|
-
//
|
|
248
|
+
// 已退役的 uiPlugins 与归属标记:远端 record 里的同名键一律静默丢弃。
|
|
249
|
+
"uiPlugins",
|
|
420
250
|
"uiPluginsOwnerAccountId",
|
|
421
251
|
"uiPluginsGeneration",
|
|
422
|
-
...
|
|
252
|
+
...LEGACY_DEVICE_SETTING_FIELDS
|
|
423
253
|
]);
|
|
424
254
|
return Object.keys(sanitizedSettings).length > 0 ? sanitizedSettings : null;
|
|
425
255
|
};
|
|
@@ -444,10 +274,6 @@ var hydrateStoredSettings = ({
|
|
|
444
274
|
const hydratedSettings = {
|
|
445
275
|
...baseSettings,
|
|
446
276
|
enabledPromptSkills: resolvedEnabledPromptSkills,
|
|
447
|
-
// UI 插件启用状态**无条件**归一化:记录里没有该键(旧记录 / 另一个从未开启过
|
|
448
|
-
// 插件的账号)也必须显式回落到全 absent,否则 Redux 会保留上一个账号的启用
|
|
449
|
-
// 状态——这正是跨账号泄漏的入口。
|
|
450
|
-
uiPlugins: normalizeUiPlugins(record.uiPlugins),
|
|
451
277
|
...hasRecordEnabledSkills ? { enabledSkills: normalizeEnabledSkills(record.enabledSkills) } : {},
|
|
452
278
|
// 服务端独占字段:只读回显(缺失时沿用初始值 0,非法值按 0)
|
|
453
279
|
...hasOwn(record, "autoApproveCredits") ? { autoApproveCredits: typeof record.autoApproveCredits === "number" && Number.isFinite(record.autoApproveCredits) && record.autoApproveCredits >= 0 ? record.autoApproveCredits : 0 } : {},
|
|
@@ -478,8 +304,12 @@ var buildSettingsPersistencePlan = ({
|
|
|
478
304
|
changes,
|
|
479
305
|
previousDefaultAgentRecord
|
|
480
306
|
}) => {
|
|
481
|
-
const
|
|
482
|
-
const
|
|
307
|
+
const preferences = pickUserPreferences(changes);
|
|
308
|
+
const normalizedChanges = { ...normalizeSettingChanges(changes), ...preferences };
|
|
309
|
+
const persistedChanges = {
|
|
310
|
+
...stripRegisterBackedFieldsFromSettingsWrite(normalizedChanges),
|
|
311
|
+
...preferences
|
|
312
|
+
};
|
|
483
313
|
const previousDefaultAgentId = normalizeDefaultAgentIdSetting(currentSettings.defaultAgentId) ?? SYSTEM_DEFAULT_AGENT_ID;
|
|
484
314
|
const nextDefaultAgentId = normalizeDefaultAgentIdSetting(normalizedChanges.defaultAgentId) ?? null;
|
|
485
315
|
const previousDefaultAgentValue = readUserPreferenceRegisterValue(
|
|
@@ -507,7 +337,7 @@ var buildSettingsPersistencePlan = ({
|
|
|
507
337
|
};
|
|
508
338
|
};
|
|
509
339
|
var getCachedDefaultAgentRegisterRecord = (getState, registerKey) => {
|
|
510
|
-
const record = getState()
|
|
340
|
+
const record = selectById(getState(), registerKey);
|
|
511
341
|
if (!record || typeof record !== "object") return null;
|
|
512
342
|
return record;
|
|
513
343
|
};
|
|
@@ -545,15 +375,9 @@ var SETTINGS_RECONCILE_DEADLINE_MS = 3e3;
|
|
|
545
375
|
var delaySettingsWriteRetry = (ms) => new Promise((resolve) => {
|
|
546
376
|
setTimeout(resolve, ms);
|
|
547
377
|
});
|
|
548
|
-
var readLocalIntentEpoch = (getState) => {
|
|
549
|
-
const value = getState()?.settings?.localIntentEpoch;
|
|
550
|
-
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
551
|
-
};
|
|
552
378
|
var readLocalIntentKeyEpoch = (getState, key) => {
|
|
553
|
-
const epochs = getState()
|
|
554
|
-
|
|
555
|
-
const value = epochs[key];
|
|
556
|
-
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
379
|
+
const epochs = getUserPreferencesStore(getState).getRuntimeSnapshot().localIntentKeyEpochs;
|
|
380
|
+
return Object.hasOwn(epochs, key) ? epochs[key] : 0;
|
|
557
381
|
};
|
|
558
382
|
var isLocalIntentSupersededForKeys = (getState, intentEpoch, keys) => keys.some((key) => readLocalIntentKeyEpoch(getState, key) > intentEpoch);
|
|
559
383
|
var SettingsWriteSupersededError = class extends Error {
|
|
@@ -566,7 +390,7 @@ var isSettingsWriteSupersededError = (error) => error instanceof SettingsWriteSu
|
|
|
566
390
|
var reconcileDeadlineOverride = null;
|
|
567
391
|
var reconcileDeadlineMs = () => reconcileDeadlineOverride ?? SETTINGS_RECONCILE_DEADLINE_MS;
|
|
568
392
|
var readSettingsAuthorityServer = (getState, accountId) => {
|
|
569
|
-
const registry = getState()
|
|
393
|
+
const registry = getRuntimeServerSnapshot(getState()).userAuthorityRegistry;
|
|
570
394
|
if (!registry || typeof registry !== "object") return null;
|
|
571
395
|
const value = registry[accountId];
|
|
572
396
|
if (typeof value !== "string") return null;
|
|
@@ -671,9 +495,9 @@ var describeSettingsWriteFailure = async ({
|
|
|
671
495
|
reconciliation: "unavailable"
|
|
672
496
|
};
|
|
673
497
|
}
|
|
674
|
-
const localSettings = getState()
|
|
675
|
-
const owner =
|
|
676
|
-
const localValues = owner.
|
|
498
|
+
const localSettings = getRuntimeServerSnapshot(getState());
|
|
499
|
+
const owner = getUserPreferencesStore(getState);
|
|
500
|
+
const localValues = owner.getSession()?.accountId === accountId ? { ...localSettings, ...owner.getSnapshot() } : localSettings;
|
|
677
501
|
const unresolvedKeys = persistedKeys.filter((key) => !isSameSettingValue(localValues[key], serverRecord[key])).sort();
|
|
678
502
|
return {
|
|
679
503
|
...base,
|
|
@@ -683,36 +507,29 @@ var describeSettingsWriteFailure = async ({
|
|
|
683
507
|
};
|
|
684
508
|
|
|
685
509
|
// packages/app/settings/settingThunks.ts
|
|
686
|
-
var
|
|
687
|
-
const value = getState()?.settings?.serverAuthorityEchoSeq;
|
|
688
|
-
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
689
|
-
};
|
|
690
|
-
var readUiPluginIntentSnapshot = (getState) => {
|
|
691
|
-
const state = getState()?.settings;
|
|
692
|
-
return {
|
|
693
|
-
value: state?.uiPlugins,
|
|
694
|
-
ownerAccountId: state?.uiPluginsOwnerAccountId ?? null,
|
|
695
|
-
generation: state?.uiPluginsGeneration
|
|
696
|
-
};
|
|
697
|
-
};
|
|
698
|
-
var isSameUiPluginIntent = (a, b) => a.value === b.value && a.ownerAccountId === b.ownerAccountId && a.generation === b.generation;
|
|
699
|
-
var latestChatHydrations = /* @__PURE__ */ new WeakMap();
|
|
510
|
+
var latestSettingsHydrations = /* @__PURE__ */ new WeakMap();
|
|
700
511
|
var getSettings = createAsyncThunk("settings/getSettings", async (_, { dispatch, getState }) => {
|
|
701
512
|
const userId = selectIdentityUserId(getState());
|
|
702
513
|
if (!userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle") return null;
|
|
703
514
|
const session = getSessionGenerationForState(getState());
|
|
704
515
|
const hydration = {};
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
const
|
|
708
|
-
const
|
|
516
|
+
latestSettingsHydrations.set(getState, hydration);
|
|
517
|
+
const preferenceOwner = getUserPreferencesStore(getState);
|
|
518
|
+
const preferenceSession = { accountId: userId, generation: session };
|
|
519
|
+
const startRuntime = preferenceOwner.getRuntimeSnapshot();
|
|
520
|
+
const startLocalIntentEpoch = startRuntime.localIntentEpoch;
|
|
709
521
|
const settingsKey = createUserKey.settings(userId);
|
|
710
522
|
const authorityHomeKey = createUserPreferenceKey.authorityHome(userId);
|
|
711
523
|
const [settingsRecord, authorityHomeRecord] = await Promise.all([
|
|
712
524
|
dispatch(getSettingDbActionThunks().readAndWait(settingsKey)).unwrap().catch(() => null),
|
|
713
525
|
dispatch(getSettingDbActionThunks().readAndWait(authorityHomeKey)).unwrap().catch(() => null)
|
|
714
526
|
]);
|
|
715
|
-
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session ||
|
|
527
|
+
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session || latestSettingsHydrations.get(getState) !== hydration) return null;
|
|
528
|
+
preferenceOwner.setSession(preferenceSession);
|
|
529
|
+
if (settingsRecord && typeof settingsRecord === "object") {
|
|
530
|
+
const preferences = Object.fromEntries(Object.entries(pickUserPreferences(settingsRecord)).filter(([key]) => readLocalIntentKeyEpoch(getState, key) <= startLocalIntentEpoch));
|
|
531
|
+
preferenceOwner.hydrate(preferenceSession, preferences);
|
|
532
|
+
}
|
|
716
533
|
const authorityHomeServer = readUserPreferenceRegisterValue(
|
|
717
534
|
authorityHomeRecord,
|
|
718
535
|
USER_PREFERENCE_NAMES.AUTHORITY_HOME
|
|
@@ -723,86 +540,64 @@ var getSettings = createAsyncThunk("settings/getSettings", async (_, { dispatch,
|
|
|
723
540
|
authorityHomeServer
|
|
724
541
|
});
|
|
725
542
|
if (hydrated) {
|
|
726
|
-
const normalizedPayload = normalizeSettingChanges(
|
|
727
|
-
hydrated
|
|
728
|
-
);
|
|
729
|
-
const { currentServer: _ignored, ...settingsToApply } = normalizedPayload;
|
|
730
|
-
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session || latestChatHydrations.get(getState) !== hydration) return null;
|
|
731
|
-
const intentChanged = readLocalIntentEpoch(getState) !== startLocalIntentEpoch;
|
|
732
|
-
const echoChanged = readServerAuthorityEchoSeq(getState) !== startAuthorityEchoSeq;
|
|
733
|
-
const authoritative = pickServerAuthoritativeSettings(hydrated);
|
|
734
543
|
const {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
);
|
|
744
|
-
if (
|
|
745
|
-
|
|
746
|
-
}
|
|
747
|
-
if (!intentChanged) {
|
|
748
|
-
Object.assign(applied, preferenceFields);
|
|
749
|
-
}
|
|
750
|
-
if (!echoChanged && hasOwn(authoritative, "autoApproveCredits")) {
|
|
751
|
-
applied.autoApproveCredits = authoritative.autoApproveCredits;
|
|
544
|
+
currentServer: _ignored,
|
|
545
|
+
autoApproveCredits: _credits,
|
|
546
|
+
userAuthorityRegistry: _registry,
|
|
547
|
+
...settingsToApply
|
|
548
|
+
} = normalizeSettingChanges(hydrated);
|
|
549
|
+
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session || latestSettingsHydrations.get(getState) !== hydration) return null;
|
|
550
|
+
const runtime = preferenceOwner.getRuntimeSnapshot();
|
|
551
|
+
const intentChanged = runtime.localIntentEpoch !== startLocalIntentEpoch;
|
|
552
|
+
const authoritative = pickServerAuthoritativeSettings(hydrated);
|
|
553
|
+
if (authoritative.autoApproveCredits !== void 0) {
|
|
554
|
+
preferenceOwner.hydrateAutoApproveCredits(authoritative.autoApproveCredits, startRuntime.serverAuthorityEchoSeq);
|
|
752
555
|
}
|
|
556
|
+
const applied = intentChanged ? {} : settingsToApply;
|
|
753
557
|
if (hasOwn(authoritative, "userAuthorityRegistry")) {
|
|
754
558
|
applied.userAuthorityRegistry = authoritative.userAuthorityRegistry;
|
|
755
559
|
}
|
|
756
|
-
if (
|
|
757
|
-
|
|
758
|
-
dispatch(updateSettingsState(applied));
|
|
759
|
-
}
|
|
760
|
-
return null;
|
|
761
|
-
}
|
|
762
|
-
const owner = getAccountChatDisplayOwner(getState);
|
|
763
|
-
owner.setAccount(userId);
|
|
764
|
-
owner.updateForAccount(userId, pickAccountChatDisplayPreferences(preferenceFields));
|
|
765
|
-
dispatch(updateSettingsState(omitAccountChatDisplayPreferences(applied)));
|
|
560
|
+
if (Object.keys(applied).length > 0) updateSettingsState(getState, applied);
|
|
561
|
+
if (intentChanged) return null;
|
|
766
562
|
}
|
|
767
563
|
return hydrated;
|
|
768
564
|
});
|
|
565
|
+
var persistSettingsRecord = createAsyncThunk(
|
|
566
|
+
"settings/persistSettingsRecord",
|
|
567
|
+
async (config, thunkApi) => {
|
|
568
|
+
const record = await upsertAction(config, thunkApi);
|
|
569
|
+
if (record && record.dbKey && Object.keys(record).length > 0) {
|
|
570
|
+
thunkApi.dispatch(upsertSSREntity(record));
|
|
571
|
+
}
|
|
572
|
+
return record;
|
|
573
|
+
}
|
|
574
|
+
);
|
|
769
575
|
var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges", async (changes, { dispatch, getState }) => {
|
|
770
576
|
const session = getSessionGenerationForState(getState());
|
|
771
|
-
const
|
|
772
|
-
const
|
|
577
|
+
const owner = getUserPreferencesStore(getState);
|
|
578
|
+
const currentSettings = { defaultAgentId: owner.getSnapshot().defaultAgentId };
|
|
773
579
|
const previousDefaultAgentId = normalizeDefaultAgentIdSetting(currentSettings.defaultAgentId) ?? SYSTEM_DEFAULT_AGENT_ID;
|
|
774
580
|
const userId = selectIdentityUserId(getState());
|
|
775
|
-
if (
|
|
776
|
-
if (!userId) {
|
|
777
|
-
const hasAppearanceChanges = Object.keys(normalizedChanges).length > 0;
|
|
778
|
-
if (hasAppearanceChanges) {
|
|
779
|
-
if (!isLocalFirstAppearanceChange(normalizedChanges)) {
|
|
780
|
-
throw new Error("User not found for persisting settings.");
|
|
781
|
-
}
|
|
782
|
-
} else {
|
|
783
|
-
throw new Error("User not found for persisting settings.");
|
|
784
|
-
}
|
|
785
|
-
dispatch(bumpLocalIntentEpoch({ keys: Object.keys(normalizedChanges) }));
|
|
786
|
-
dispatch(updateSettingsState(normalizedChanges));
|
|
787
|
-
return normalizedChanges;
|
|
788
|
-
}
|
|
581
|
+
if (!userId) throw new Error("User not found for persisting settings.");
|
|
789
582
|
const persistencePlan = buildSettingsPersistencePlan({
|
|
790
583
|
userId,
|
|
791
584
|
currentSettings,
|
|
792
|
-
changes
|
|
585
|
+
changes,
|
|
793
586
|
previousDefaultAgentRecord: null
|
|
794
587
|
});
|
|
588
|
+
const { normalizedChanges } = persistencePlan;
|
|
589
|
+
if (Object.keys(normalizedChanges).length === 0) return normalizedChanges;
|
|
590
|
+
const identity = getSessionSnapshotForState(getState());
|
|
591
|
+
if (identity && identity.transition !== "idle") throw new Error("Account session is changing.");
|
|
795
592
|
if (selectIdentityUserId(getState()) !== userId) return {};
|
|
796
|
-
const owner = getAccountChatDisplayOwner(getState);
|
|
797
593
|
const intentKeys = Object.keys(normalizedChanges);
|
|
798
|
-
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
dispatch(publishUiPlugins({ value: persistencePlan.normalizedChanges.uiPlugins, accountId: userId, generation: session }));
|
|
594
|
+
const intentEpoch = owner.bumpLocalIntentEpoch(intentKeys);
|
|
595
|
+
const preferenceSession = { accountId: userId, generation: session };
|
|
596
|
+
if (selectIdentityUserId(getState()) === userId && getSessionGenerationForState(getState()) === session && (!getSessionSnapshotForState(getState()) || getSessionSnapshotForState(getState())?.transition === "idle")) {
|
|
597
|
+
owner.setSession(preferenceSession);
|
|
598
|
+
owner.applyLocalPatch(preferenceSession, normalizedChanges);
|
|
804
599
|
}
|
|
805
|
-
|
|
600
|
+
updateSettingsState(getState, normalizedChanges);
|
|
806
601
|
const isSameAccountSession = () => (!getSessionSnapshotForState(getState()) || getSessionSnapshotForState(getState())?.transition === "idle") && selectIdentityUserId(getState()) === userId && getSessionGenerationForState(getState()) === session;
|
|
807
602
|
const isSupersededKey = (key) => readLocalIntentKeyEpoch(getState, key) > intentEpoch;
|
|
808
603
|
const resolveEffectiveWrite = () => {
|
|
@@ -846,7 +641,7 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
846
641
|
}
|
|
847
642
|
if (persistencePlan.settingsPatch && Object.keys(effectiveAfterAwait.effectiveChanges).length > 0) {
|
|
848
643
|
await dispatch(
|
|
849
|
-
getSettingDbActionThunks().
|
|
644
|
+
(getSettingDbActionThunks().persistSettingsRecord ?? persistSettingsRecord)({
|
|
850
645
|
dbKey: persistencePlan.settingsPatch.dbKey,
|
|
851
646
|
data: effectiveAfterAwait.effectiveChanges
|
|
852
647
|
})
|
|
@@ -856,7 +651,7 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
856
651
|
};
|
|
857
652
|
const settleSettingsWriteFailureAfterSuccess = (effective) => {
|
|
858
653
|
if (!isSameAccountSession()) return;
|
|
859
|
-
const existing =
|
|
654
|
+
const existing = owner.getRuntimeSnapshot().lastWriteFailure;
|
|
860
655
|
if (!existing) return;
|
|
861
656
|
const next = resolveSettingsWriteFailureAfterSuccess({
|
|
862
657
|
failure: existing,
|
|
@@ -865,7 +660,7 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
865
660
|
persistedKeys: effective.effectivePersistedKeys
|
|
866
661
|
});
|
|
867
662
|
if (next === existing) return;
|
|
868
|
-
|
|
663
|
+
owner.recordSettingsWriteFailure(next);
|
|
869
664
|
};
|
|
870
665
|
await enqueueAccountSettingsWrite(getState, userId, async () => {
|
|
871
666
|
let firstFailureAt = 0;
|
|
@@ -901,182 +696,60 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
901
696
|
);
|
|
902
697
|
const ownedKeys = failure.keys.filter((key) => ownedAfterReconcile.has(key));
|
|
903
698
|
if (ownedKeys.length === 0) return;
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
})
|
|
912
|
-
);
|
|
699
|
+
owner.recordSettingsWriteFailure({
|
|
700
|
+
...failure,
|
|
701
|
+
keys: ownedKeys,
|
|
702
|
+
unresolvedKeys: failure.unresolvedKeys.filter(
|
|
703
|
+
(key) => ownedAfterReconcile.has(key)
|
|
704
|
+
)
|
|
705
|
+
});
|
|
913
706
|
throw retryError;
|
|
914
707
|
}
|
|
915
708
|
}
|
|
916
709
|
});
|
|
917
710
|
return persistencePlan.normalizedChanges;
|
|
918
711
|
});
|
|
712
|
+
function bindUserPreferencesToSettings(store, core, allowLocalIdentity = false) {
|
|
713
|
+
const owner = getUserPreferencesStore(store.getState);
|
|
714
|
+
const readSession = () => {
|
|
715
|
+
const snapshot = core?.getSnapshot() ?? getSessionSnapshotForState(store.getState());
|
|
716
|
+
if (snapshot) return preferenceSessionFromSnapshot(snapshot);
|
|
717
|
+
const accountId = allowLocalIdentity ? selectIdentityUserId(store.getState()) : void 0;
|
|
718
|
+
return accountId ? { accountId, generation: void 0 } : null;
|
|
719
|
+
};
|
|
720
|
+
owner.bindPersistence((patch2, expected) => {
|
|
721
|
+
const current = readSession();
|
|
722
|
+
if (!current || current.accountId !== expected.accountId || current.generation !== expected.generation) {
|
|
723
|
+
throw new Error("Account session is changing.");
|
|
724
|
+
}
|
|
725
|
+
return store.dispatch(persistSettingsChanges(patch2)).unwrap();
|
|
726
|
+
});
|
|
727
|
+
if (core?.subscribe) {
|
|
728
|
+
return bindUserPreferencesSession(owner, { getSnapshot: () => core.getSnapshot(), subscribe: core.subscribe.bind(core) });
|
|
729
|
+
}
|
|
730
|
+
owner.setSession(readSession());
|
|
731
|
+
return () => owner.setSession(null);
|
|
732
|
+
}
|
|
919
733
|
var setAccountChatDisplayPreferences = createAsyncThunk(
|
|
920
734
|
"settings/setAccountChatDisplayPreferences",
|
|
921
|
-
async (changes, { dispatch
|
|
922
|
-
const userId = selectIdentityUserId(getState());
|
|
923
|
-
if (!userId) throw new Error("User not found for persisting settings.");
|
|
924
|
-
const owner = getAccountChatDisplayOwner(getState);
|
|
925
|
-
owner.setAccount(userId);
|
|
926
|
-
return dispatch(persistSettingsChanges({
|
|
927
|
-
...owner.getSnapshot(),
|
|
928
|
-
...pickAccountChatDisplayPreferences(changes)
|
|
929
|
-
})).unwrap();
|
|
930
|
-
}
|
|
735
|
+
async (changes, { dispatch }) => dispatch(persistSettingsChanges(changes)).unwrap()
|
|
931
736
|
);
|
|
932
737
|
var setSettings = createAsyncThunk(
|
|
933
738
|
"settings/setSettings",
|
|
934
739
|
async (changes, { dispatch }) => {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
740
|
+
if (USER_PREFERENCE_KEYS.some((key) => !ACCOUNT_POLICY_KEYS.some((policyKey) => policyKey === key) && hasOwn(changes, key))) {
|
|
741
|
+
if (CHAT_UI_PREFERENCE_KEYS.some((key) => hasOwn(changes, key))) {
|
|
742
|
+
throw new Error("Chat display preferences must use setAccountChatDisplayPreferences.");
|
|
743
|
+
}
|
|
744
|
+
throw new Error("User preferences must use userPreferencesStore.");
|
|
938
745
|
}
|
|
939
746
|
return dispatch(persistSettingsChanges(changes)).unwrap();
|
|
940
747
|
}
|
|
941
748
|
);
|
|
942
|
-
var setSidebarWidth = createAsyncThunk(
|
|
943
|
-
"settings/setSidebarWidth",
|
|
944
|
-
async (sidebarWidth, { dispatch }) => dispatch(setSettings({ sidebarWidth })).unwrap()
|
|
945
|
-
);
|
|
946
|
-
var toggleEnableReadCurrentSpace = createAsyncThunk(
|
|
947
|
-
"settings/toggleEnableReadCurrentSpace",
|
|
948
|
-
async (_, { dispatch, getState }) => {
|
|
949
|
-
const current = getState().settings.enableReadCurrentSpace;
|
|
950
|
-
return dispatch(
|
|
951
|
-
setSettings({
|
|
952
|
-
enableReadCurrentSpace: !current,
|
|
953
|
-
spaceContextLevel: current ? 1 : DEFAULT_USER_PREFERENCE_PROFILE.spaceContextLevel
|
|
954
|
-
})
|
|
955
|
-
).unwrap();
|
|
956
|
-
}
|
|
957
|
-
);
|
|
958
|
-
var setEditorDefaultMode = createAsyncThunk(
|
|
959
|
-
"settings/setEditorDefaultMode",
|
|
960
|
-
async (mode, { dispatch }) => dispatch(setSettings({ editorDefaultMode: mode })).unwrap()
|
|
961
|
-
);
|
|
962
|
-
var setEditorLightCodeTheme = createAsyncThunk(
|
|
963
|
-
"settings/setEditorLightCodeTheme",
|
|
964
|
-
async (theme, { dispatch }) => dispatch(setSettings({ editorLightCodeTheme: theme })).unwrap()
|
|
965
|
-
);
|
|
966
|
-
var setEditorDarkCodeTheme = createAsyncThunk(
|
|
967
|
-
"settings/setEditorDarkCodeTheme",
|
|
968
|
-
async (theme, { dispatch }) => dispatch(setSettings({ editorDarkCodeTheme: theme })).unwrap()
|
|
969
|
-
);
|
|
970
|
-
var setEditorCodeTheme = createAsyncThunk(
|
|
971
|
-
"settings/setEditorCodeTheme",
|
|
972
|
-
async (theme, { dispatch }) => dispatch(
|
|
973
|
-
setSettings({
|
|
974
|
-
editorLightCodeTheme: theme,
|
|
975
|
-
editorDarkCodeTheme: theme
|
|
976
|
-
})
|
|
977
|
-
).unwrap()
|
|
978
|
-
);
|
|
979
|
-
var toggleEditorWordCount = createAsyncThunk(
|
|
980
|
-
"settings/toggleEditorWordCount",
|
|
981
|
-
async (_, { dispatch, getState }) => {
|
|
982
|
-
const current = getState().settings.editorWordCountEnabled;
|
|
983
|
-
return dispatch(setSettings({ editorWordCountEnabled: !current })).unwrap();
|
|
984
|
-
}
|
|
985
|
-
);
|
|
986
|
-
var toggleEditorShortcut = createAsyncThunk(
|
|
987
|
-
"settings/toggleEditorShortcut",
|
|
988
|
-
async (key, { dispatch, getState }) => {
|
|
989
|
-
const currentShortcuts = getState().settings.editorShortcuts;
|
|
990
|
-
const newShortcuts = {
|
|
991
|
-
...currentShortcuts,
|
|
992
|
-
[key]: !currentShortcuts[key]
|
|
993
|
-
};
|
|
994
|
-
return dispatch(setSettings({ editorShortcuts: newShortcuts })).unwrap();
|
|
995
|
-
}
|
|
996
|
-
);
|
|
997
|
-
var setEditorFontSize = createAsyncThunk(
|
|
998
|
-
"settings/setEditorFontSize",
|
|
999
|
-
async (fontSize, { dispatch }) => dispatch(setSettings({ editorFontSize: fontSize })).unwrap()
|
|
1000
|
-
);
|
|
1001
|
-
var toggleEditorAutoSave = createAsyncThunk(
|
|
1002
|
-
"settings/toggleEditorAutoSave",
|
|
1003
|
-
async (_, { dispatch, getState }) => {
|
|
1004
|
-
const current = getState().settings.editorAutoSave;
|
|
1005
|
-
return dispatch(setSettings({ editorAutoSave: !current })).unwrap();
|
|
1006
|
-
}
|
|
1007
|
-
);
|
|
1008
|
-
var setEditorAutoSaveInterval = createAsyncThunk(
|
|
1009
|
-
"settings/setEditorAutoSaveInterval",
|
|
1010
|
-
async (interval, { dispatch }) => dispatch(setSettings({ editorAutoSaveInterval: interval })).unwrap()
|
|
1011
|
-
);
|
|
1012
|
-
var setGlobalPrompt = createAsyncThunk(
|
|
1013
|
-
"settings/setGlobalPrompt",
|
|
1014
|
-
async (prompt, { dispatch }) => dispatch(setSettings({ globalPrompt: prompt })).unwrap()
|
|
1015
|
-
);
|
|
1016
|
-
var setUserTonePreset = createAsyncThunk(
|
|
1017
|
-
"settings/setUserTonePreset",
|
|
1018
|
-
async (tone, { dispatch }) => dispatch(setSettings({ userTonePreset: tone })).unwrap()
|
|
1019
|
-
);
|
|
1020
|
-
var setKnowledgeCaptureLevel = createAsyncThunk(
|
|
1021
|
-
"settings/setKnowledgeCaptureLevel",
|
|
1022
|
-
async (level, { dispatch }) => dispatch(setSettings({ knowledgeCaptureLevel: level })).unwrap()
|
|
1023
|
-
);
|
|
1024
|
-
var setSpaceContextLevel = createAsyncThunk(
|
|
1025
|
-
"settings/setSpaceContextLevel",
|
|
1026
|
-
async (level, { dispatch }) => dispatch(
|
|
1027
|
-
setSettings({
|
|
1028
|
-
spaceContextLevel: level,
|
|
1029
|
-
enableReadCurrentSpace: level > 1
|
|
1030
|
-
})
|
|
1031
|
-
).unwrap()
|
|
1032
|
-
);
|
|
1033
|
-
var setAiRecentContentLimit = createAsyncThunk(
|
|
1034
|
-
"settings/setAiRecentContentLimit",
|
|
1035
|
-
async (limit, { dispatch }) => dispatch(setSettings({ aiRecentContentLimit: limit })).unwrap()
|
|
1036
|
-
);
|
|
1037
|
-
var setMaxExecutionTime = createAsyncThunk(
|
|
1038
|
-
"settings/setMaxExecutionTime",
|
|
1039
|
-
async (time, { dispatch }) => dispatch(setSettings({ maxExecutionTime: time })).unwrap()
|
|
1040
|
-
);
|
|
1041
|
-
var setDefaultAgentId = createAsyncThunk(
|
|
1042
|
-
"settings/setDefaultAgentId",
|
|
1043
|
-
async (agentId, { dispatch }) => dispatch(
|
|
1044
|
-
setSettings({
|
|
1045
|
-
defaultAgentId: resolveDefaultAgentIdSetting(agentId)
|
|
1046
|
-
})
|
|
1047
|
-
).unwrap()
|
|
1048
|
-
);
|
|
1049
|
-
var setUiPluginState = createAsyncThunk(
|
|
1050
|
-
"settings/setUiPluginState",
|
|
1051
|
-
async ({ id, value, session }, { dispatch, getState }) => {
|
|
1052
|
-
const current = getSessionSnapshotForState(getState());
|
|
1053
|
-
if (!session || session.transition !== "idle" || current?.transition !== "idle" || current.activeAccountId !== session.activeAccountId || current.sessionGeneration !== session.sessionGeneration) throw new Error("Session changed; reopen plugin configuration.");
|
|
1054
|
-
const state = getState().settings;
|
|
1055
|
-
if (state.uiPluginsOwnerAccountId !== current.activeAccountId || state.uiPluginsGeneration !== current.sessionGeneration) throw new Error("Plugin settings are not hydrated for this session.");
|
|
1056
|
-
await dispatch(setSettings({ uiPlugins: { ...state.uiPlugins, [id]: value } })).unwrap();
|
|
1057
|
-
}
|
|
1058
|
-
);
|
|
1059
749
|
export {
|
|
750
|
+
bindUserPreferencesToSettings,
|
|
1060
751
|
getSettings,
|
|
752
|
+
persistSettingsRecord,
|
|
1061
753
|
setAccountChatDisplayPreferences,
|
|
1062
|
-
|
|
1063
|
-
setDefaultAgentId,
|
|
1064
|
-
setEditorAutoSaveInterval,
|
|
1065
|
-
setEditorCodeTheme,
|
|
1066
|
-
setEditorDarkCodeTheme,
|
|
1067
|
-
setEditorDefaultMode,
|
|
1068
|
-
setEditorFontSize,
|
|
1069
|
-
setEditorLightCodeTheme,
|
|
1070
|
-
setGlobalPrompt,
|
|
1071
|
-
setKnowledgeCaptureLevel,
|
|
1072
|
-
setMaxExecutionTime,
|
|
1073
|
-
setSettings,
|
|
1074
|
-
setSidebarWidth,
|
|
1075
|
-
setSpaceContextLevel,
|
|
1076
|
-
setUiPluginState,
|
|
1077
|
-
setUserTonePreset,
|
|
1078
|
-
toggleEditorAutoSave,
|
|
1079
|
-
toggleEditorShortcut,
|
|
1080
|
-
toggleEditorWordCount,
|
|
1081
|
-
toggleEnableReadCurrentSpace
|
|
754
|
+
setSettings
|
|
1082
755
|
};
|