nolo-cli 0.54.0-alpha.2 → 0.61.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/README.md +3 -3
- package/{_executeModel-ANY4SIAS.js → _executeModel-CKT6RGTL.js} +58 -49
- package/{action-Q4W5JPI5.js → action-76JX3JX3.js} +9 -8
- package/{addContentAction-O25HFR37.js → addContentAction-V3NAZRTJ.js} +9 -7
- package/{addDialogAgentAction-GH7AUPPB.js → addDialogAgentAction-RZOAF46K.js} +11 -9
- package/{agentDeleteCommand-JWIKNWWI.js → agentDeleteCommand-VN7NPXQ4.js} +37 -32
- package/{agentEmailCommands-PL22BEU5.js → agentEmailCommands-F2TNAV4A.js} +73 -65
- package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-R3VQEZJR.js} +1 -1
- package/{agentListCommands-6NR7AQEK.js → agentListCommands-OSM2ANI3.js} +78 -39
- package/{agentMachineCommands-TASPU6OA.js → agentMachineCommands-MTPWYVRV.js} +38 -33
- package/{agentPullCommand-M552CYSI.js → agentPullCommand-N7L2CT7L.js} +2 -2
- package/agentRecordCommands-VWAWTVVC.js +122 -0
- package/agentRunCommand-PLZOBNVK.js +149 -0
- package/{agentRunControl-4GHHSXFZ.js → agentRunControl-WECMOO6O.js} +13 -6
- package/{agentRuntimeLocal-PCJJ56J2.js → agentRuntimeLocal-XCJLRWQE.js} +35 -28
- package/{agentSlice-KYLDUSNN.js → agentSlice-F6DOP4IW.js} +10 -9
- package/{appDeleteCommands-WLHMJAVT.js → appDeleteCommands-3BCFTRFJ.js} +37 -32
- package/{appDeployCommands-CKON7N2E.js → appDeployCommands-B4GMHCYA.js} +37 -32
- package/{appDeployStatusCommands-PXRLDASH.js → appDeployStatusCommands-4MN36WIG.js} +37 -32
- package/{appGetCommands-RAB5RM4M.js → appGetCommands-4GJIEUAX.js} +37 -32
- package/{appListCommands-GU57FB62.js → appListCommands-CHU53GSX.js} +37 -32
- package/{authCommand-QOPOEYEK.js → authCommand-WOTWLJNF.js} +38 -32
- package/{authCommands-SBQVTD6V.js → authCommands-ILTBI6JV.js} +8 -6
- package/{chatQueueReduxAdapter-5O2WLITN.js → chatQueueReduxAdapter-HNSQXNIR.js} +29 -24
- package/{chunk-WL3UOGYO.js → chunk-22BTGNSP.js} +151 -155
- package/{chunk-7CH6U3FL.js → chunk-2GRGFCF6.js} +2 -4
- package/{chunk-V4KZGLOI.js → chunk-2HPRMEEZ.js} +3059 -1079
- package/{chunk-UNZDCI3O.js → chunk-2KDR4CWE.js} +35 -4
- package/{chunk-VRZIH5JO.js → chunk-2PGGC63K.js} +1 -1
- package/{chunk-T27IEBNQ.js → chunk-2QDDKFG5.js} +74 -1
- package/{chunk-7K5VMB4Q.js → chunk-37QVS7BU.js} +21 -8
- package/{chunk-UITMHBVK.js → chunk-37XDGCY7.js} +1 -1
- package/chunk-3BLB7QKO.js +433 -0
- package/{chunk-NQ4N4IGO.js → chunk-3JQ2NRYU.js} +33 -10
- package/{chunk-UW4INMD2.js → chunk-3JWKQDA4.js} +2 -2
- package/{chunk-IKTHA3JH.js → chunk-3QGUVVX5.js} +2 -2
- package/{chunk-WHVQA7PJ.js → chunk-45YO6H7P.js} +97 -35
- package/chunk-4C4ST2YE.js +20015 -0
- package/{chunk-32I5RVMY.js → chunk-4NJEIGBQ.js} +5 -5
- package/{chunk-KUUTWU4I.js → chunk-5ZYA4JJ3.js} +90 -22
- package/chunk-6YTOJY35.js +352 -0
- package/{chunk-INXBNYCG.js → chunk-7A3RRUCQ.js} +155 -12
- package/{chunk-GV35EHNA.js → chunk-7O7KH4X5.js} +1262 -971
- package/{chunk-Y7LNKP32.js → chunk-7UF7CQ6B.js} +4 -6
- package/{chunk-2BWU4ORW.js → chunk-AQMVUA7N.js} +2 -1
- package/{chunk-LA4IDAK7.js → chunk-AVE2YR4F.js} +1056 -3591
- package/{chunk-TI5BCZCH.js → chunk-B7DXRX7F.js} +59 -121
- package/chunk-BFU6C242.js +66 -0
- package/{chunk-FA4SY4F5.js → chunk-BYEJ7K2Z.js} +1 -1
- package/chunk-BYXBJQAS.js +0 -0
- package/{chunk-IA3A5373.js → chunk-C3FZR5EC.js} +1 -1
- package/{chunk-IWUMSAQF.js → chunk-CJCJF5XB.js} +26 -3
- package/{chunk-PAHILFNT.js → chunk-CP7VIDZ7.js} +4 -4
- package/{chunk-OYNDYVSE.js → chunk-CTCW7U7N.js} +1 -1
- package/{chunk-BJLYCOZK.js → chunk-D5XKNNUV.js} +135 -795
- package/{chunk-AV6KQCM5.js → chunk-DNNSCSA2.js} +19 -14
- package/{chunk-3AOLVADY.js → chunk-DVINR3PL.js} +1 -1
- package/{chunk-NI2BS6UD.js → chunk-DWUCB2A3.js} +1 -1
- package/{chunk-AA564GBL.js → chunk-DZZL7UBV.js} +1 -1
- package/{chunk-6FGXGFAH.js → chunk-E6RGHPDR.js} +6 -4
- package/chunk-EDKF7RX4.js +30 -0
- package/{chunk-6SZ52ORL.js → chunk-ES6CVKVD.js} +24 -30
- package/{chunk-DQLYEGP7.js → chunk-FHAGENAS.js} +3 -4
- package/{chunk-56W233KG.js → chunk-FKFMIBTT.js} +5 -1
- package/{chunk-INZZJSQF.js → chunk-FZGV4FGK.js} +24 -12
- package/{chunk-D3JQPONH.js → chunk-GAL47RNP.js} +1 -1
- package/{chunk-6FQ2552G.js → chunk-HBPV76EK.js} +1085 -1150
- package/{chunk-LN3OQJGG.js → chunk-HLU5Q2GV.js} +4 -4
- package/{chunk-U2A47SVI.js → chunk-HQP7HJDL.js} +7 -7
- package/{chunk-H2G6JXTR.js → chunk-HQUORJTM.js} +1 -1
- package/{chunk-3Z3DXZBD.js → chunk-IYCUMIYS.js} +24 -20
- package/{chunk-7APQB6R6.js → chunk-JX5PJCWS.js} +8 -6
- package/{chunk-LYGNQHUW.js → chunk-JYYZCK2Z.js} +2 -4
- package/{chunk-PYKV6FSC.js → chunk-KWSQR2KK.js} +16 -31
- package/{chunk-VULELK4T.js → chunk-L7B47JXR.js} +37 -64
- package/{chunk-4NN3EK7H.js → chunk-LAFC3B2I.js} +1 -1
- package/{chunk-VRJUIUIY.js → chunk-LJKICKVC.js} +2 -2
- package/chunk-M3JEW6N6.js +193 -0
- package/chunk-MBOEV4L2.js +301 -0
- package/{chunk-QDHZCAH3.js → chunk-MMZ6ZTVO.js} +229 -74
- package/{chunk-JDSUTNYY.js → chunk-MP64VFGD.js} +2 -2
- package/{chunk-U5Z7LFZF.js → chunk-MXUDQZXQ.js} +47 -8
- package/chunk-N4G4PKQ6.js +23 -0
- package/{chunk-SVEUG45B.js → chunk-NHRQCXIQ.js} +0 -24
- package/{chunk-KXKQO4Q6.js → chunk-NTW5GWDM.js} +58 -1
- package/chunk-ONXOABJR.js +215 -0
- package/{chunk-BANYWEYY.js → chunk-OZX2IPKM.js} +8 -3
- package/{chunk-Q24S4NDF.js → chunk-P7OOB7QP.js} +1 -1
- package/{chunk-GLGD2JGY.js → chunk-PEZJEQAO.js} +7 -7
- package/{chunk-GBADO3SM.js → chunk-PQDIDWGX.js} +1 -1
- package/chunk-PSCNXBYA.js +11 -0
- package/chunk-QEFJJS2I.js +508 -0
- package/{chunk-757BGY6Y.js → chunk-QEW2MFDQ.js} +1 -1
- package/{chunk-SP3DPVBH.js → chunk-RDBARW6T.js} +8 -3
- package/{chunk-TNPCQNGQ.js → chunk-RJ2SAFB5.js} +83 -41
- package/{chunk-FGEYVPPR.js → chunk-RVWRKFUB.js} +8 -65
- package/{chunk-43CXXVJD.js → chunk-RXX4GDIH.js} +1 -1
- package/chunk-SEJ5OS6F.js +49 -0
- package/{chunk-MFI4FGHX.js → chunk-SOJM57FX.js} +5 -2
- package/{chunk-EKLRRZIN.js → chunk-SPAQ4PVV.js} +0 -5
- package/{chunk-L7NG2M6H.js → chunk-TRV2MIDW.js} +89 -74
- package/chunk-UAD2WT54.js +64 -0
- package/{chunk-RTLJUGQH.js → chunk-UZPQSVM6.js} +2 -2
- package/{chunk-3QJTD6DO.js → chunk-VMWYBIXG.js} +9 -7
- package/{chunk-ZHXJ6M7T.js → chunk-W7XHHYWM.js} +4 -0
- package/{chunk-5WADL4O7.js → chunk-XAVSS3KE.js} +21 -3
- package/{chunk-CVT7L2WZ.js → chunk-XOKOSO35.js} +13 -22
- package/{chunk-6BYAXNH5.js → chunk-XTJTN3RW.js} +57 -4
- package/{chunk-T5HJEUQN.js → chunk-YCDWJX45.js} +1 -1
- package/{chunk-MRWGHF56.js → chunk-YDH3FDFQ.js} +12 -356
- package/{chunk-H4RYESI6.js → chunk-Z4QSJILV.js} +85 -13
- package/chunk-ZJ7UHBJS.js +89 -0
- package/{chunk-O5FLGN2L.js → chunk-ZRSJ3JEH.js} +6 -2
- package/{cliExecutor-BBUVQU4L.js → cliExecutor-HG3S345O.js} +1 -1
- package/{codingSkills-BCQXRZOI.js → codingSkills-VDXQYWX4.js} +2 -2
- package/contentThunks-7YG2ZYQC.js +73 -0
- package/{cooldownCommands-GI5NNWGL.js → cooldownCommands-BSCH2W7P.js} +2 -2
- package/{createAgentAutomationAction-UJLNFFFC.js → createAgentAutomationAction-PJQSCAIO.js} +32 -26
- package/createDialogAction-SFEJX6SP.js +64 -0
- package/{createPageAction-N3IYABHV.js → createPageAction-B7WRHOQO.js} +35 -28
- package/{dbSlice-D5CNGWPD.js → dbSlice-IBVOBVMS.js} +7 -6
- package/{deleteFile-44TUM34Y.js → deleteFile-FWP2PSBG.js} +4 -3
- package/{dialogCommands-35M6RBAC.js → dialogCommands-VL2X22QC.js} +38 -33
- package/{dialogSlice-KO7ADD7H.js → dialogSlice-ANMACABO.js} +29 -24
- package/{docCreateCommands-VXHZWQ3P.js → docCreateCommands-ITLGZ5YI.js} +40 -35
- package/{docDeleteCommands-4WFAJR6A.js → docDeleteCommands-LH3YNL4C.js} +37 -32
- package/{docReadCommands-OYREEFAR.js → docReadCommands-YAJ77F36.js} +36 -31
- package/{docStore-5BU76DFK.js → docStore-D4HGHPWI.js} +9 -33
- package/{docUpdateCommands-A7QERSME.js → docUpdateCommands-DQBOMH2G.js} +40 -35
- package/{fetchMessages-KZQVBXKY.js → fetchMessages-DRABNDPZ.js} +3 -3
- package/{getPricing-HAU62AFM.js → getPricing-NM3NUTAS.js} +5 -5
- package/handleSendMessageAction-DF2OABGW.js +675 -0
- package/index.js +79 -88
- package/{lib-2ZTNRXR4.js → lib-FRRS27KN.js} +63 -28
- package/{localDialogRead-NQ33HBSI.js → localDialogRead-PUQKFI73.js} +1 -1
- package/{localRuntimeAuthority-KQDAE64E.js → localRuntimeAuthority-R5UBODT3.js} +6 -4
- package/{localRuntimeDb-PF7CFKDL.js → localRuntimeDb-P37ZTX55.js} +1 -1
- package/{machineCommands-J43U3TX5.js → machineCommands-JXDYQ5LB.js} +309 -87
- package/{machineWsRunDispatch-Z2Z6STXZ.js → machineWsRunDispatch-3QHI7JX5.js} +67 -59
- package/memberThunks-VZI6G7YZ.js +640 -0
- package/{models-4QF4BJVY.js → models-FAMINFZ7.js} +2 -2
- package/package.json +3 -2
- package/{read-RGNPI5H2.js → read-2BYWW7AA.js} +4 -3
- package/{readDocTool-6ESWKTXD.js → readDocTool-LC3A7QTB.js} +1 -1
- package/{readlineWorkspace-YRPV6JPN.js → readlineWorkspace-KVZTEAHB.js} +4609 -2698
- package/{removeDialogAgentAction-JYT73FU2.js → removeDialogAgentAction-SFYZXHNK.js} +14 -12
- package/{runAgentClientLoop-5YM5WMAY.js → runAgentClientLoop-KGTEL7ZP.js} +60 -50
- package/{runtimeDoctorCommands-JKTTN723.js → runtimeDoctorCommands-CROTMULY.js} +7 -5
- package/{setDialogExtraReferencesAction-D564LMYQ.js → setDialogExtraReferencesAction-Q32RGFTA.js} +10 -8
- package/{setPrimaryDialogAgentAction-ACY3BLYA.js → setPrimaryDialogAgentAction-BFYJHUJS.js} +14 -12
- package/{settingSlice-MKI3MNZJ.js → settingSlice-IRUU4VFB.js} +8 -7
- package/{skillDiscovery-GPUDHDTZ.js → skillDiscovery-NTRLM6KP.js} +3 -3
- package/{spaceCommands-MY26V52L.js → spaceCommands-KNAYWMCZ.js} +40 -220
- package/{streamAgentChatTurn-XV5X5TNQ.js → streamAgentChatTurn-FLYPTXKZ.js} +140 -95
- package/{switchDialogAgentAction-CJ5H6SAR.js → switchDialogAgentAction-L2KOKCGG.js} +11 -9
- package/{tableCommands-R6WFRDYF.js → tableCommands-SUNTHAYX.js} +1 -1
- package/{toolApiClient-B2MFXMEG.js → toolApiClient-VGYUB4P5.js} +4 -2
- package/{tools-MIMELA2Y.js → tools-CVLUXK6P.js} +46 -38
- package/{tuiSummaryLlmCaller-XJ5BKNNS.js → tuiSummaryLlmCaller-F3DPFFZM.js} +20 -16
- package/{updateCommands-IYKLF3JX.js → updateCommands-AJYSD73Y.js} +2 -2
- package/{updateDialogTitleAction-EIZUSWHR.js → updateDialogTitleAction-HWJIZEIV.js} +33 -27
- package/agentRecordCommands-Z64TA63M.js +0 -114
- package/agentRunCommand-4QJQLPRW.js +0 -134
- package/agentSuperviseCommands-VB6BUS5H.js +0 -640
- package/chunk-6BGAQ3KR.js +0 -7081
- package/chunk-FD36SCCD.js +0 -105
- package/chunk-J3UALFHL.js +0 -370
- package/chunk-RU5D3B22.js +0 -230
- package/chunk-YBV6QJKM.js +0 -441
- package/createDialogAction-TJCX6GUE.js +0 -58
- package/handleSendMessageAction-OSGQJQ45.js +0 -406
- package/spaceSlice-JUIXC365.js +0 -127
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
__toESM
|
|
2
|
+
__commonJS
|
|
4
3
|
} from "./chunk-4VNS5WPM.js";
|
|
5
4
|
|
|
6
5
|
// node_modules/react/cjs/react.production.js
|
|
@@ -383,8 +382,8 @@ var require_react_production = __commonJS({
|
|
|
383
382
|
exports.use = function(usable) {
|
|
384
383
|
return ReactSharedInternals.H.use(usable);
|
|
385
384
|
};
|
|
386
|
-
exports.useActionState = function(
|
|
387
|
-
return ReactSharedInternals.H.useActionState(
|
|
385
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
386
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
388
387
|
};
|
|
389
388
|
exports.useCallback = function(callback, deps) {
|
|
390
389
|
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
@@ -430,10 +429,10 @@ var require_react_production = __commonJS({
|
|
|
430
429
|
exports.useState = function(initialState) {
|
|
431
430
|
return ReactSharedInternals.H.useState(initialState);
|
|
432
431
|
};
|
|
433
|
-
exports.useSyncExternalStore = function(
|
|
432
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
434
433
|
return ReactSharedInternals.H.useSyncExternalStore(
|
|
435
|
-
|
|
436
|
-
|
|
434
|
+
subscribe,
|
|
435
|
+
getSnapshot,
|
|
437
436
|
getServerSnapshot
|
|
438
437
|
);
|
|
439
438
|
};
|
|
@@ -1335,9 +1334,9 @@ var require_react_development = __commonJS({
|
|
|
1335
1334
|
exports.use = function(usable) {
|
|
1336
1335
|
return resolveDispatcher().use(usable);
|
|
1337
1336
|
};
|
|
1338
|
-
exports.useActionState = function(
|
|
1337
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
1339
1338
|
return resolveDispatcher().useActionState(
|
|
1340
|
-
|
|
1339
|
+
action,
|
|
1341
1340
|
initialState,
|
|
1342
1341
|
permalink
|
|
1343
1342
|
);
|
|
@@ -1400,10 +1399,10 @@ var require_react_development = __commonJS({
|
|
|
1400
1399
|
exports.useState = function(initialState) {
|
|
1401
1400
|
return resolveDispatcher().useState(initialState);
|
|
1402
1401
|
};
|
|
1403
|
-
exports.useSyncExternalStore = function(
|
|
1402
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1404
1403
|
return resolveDispatcher().useSyncExternalStore(
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
subscribe,
|
|
1405
|
+
getSnapshot,
|
|
1407
1406
|
getServerSnapshot
|
|
1408
1407
|
);
|
|
1409
1408
|
};
|
|
@@ -1428,349 +1427,6 @@ var require_react = __commonJS({
|
|
|
1428
1427
|
}
|
|
1429
1428
|
});
|
|
1430
1429
|
|
|
1431
|
-
// packages/chat/dialog/dialogRuntimeTypes.ts
|
|
1432
|
-
var GLOBAL_DIALOG_RUNTIME_KEY = "__global__";
|
|
1433
|
-
|
|
1434
|
-
// packages/chat/dialog/dialogRuntimeStore.ts
|
|
1435
|
-
var import_react = __toESM(require_react());
|
|
1436
|
-
var createEmptyTokenStats = () => ({
|
|
1437
|
-
inputTokens: 0,
|
|
1438
|
-
outputTokens: 0,
|
|
1439
|
-
totalCost: 0
|
|
1440
|
-
});
|
|
1441
|
-
var createEmptyDialogRuntimeState = () => ({
|
|
1442
|
-
tokens: createEmptyTokenStats(),
|
|
1443
|
-
pendingFiles: [],
|
|
1444
|
-
activeControllers: {},
|
|
1445
|
-
pendingRawData: {},
|
|
1446
|
-
loopStopReason: null,
|
|
1447
|
-
pendingUserInputQueue: []
|
|
1448
|
-
});
|
|
1449
|
-
var activeDialogKey = null;
|
|
1450
|
-
var configError = null;
|
|
1451
|
-
var runtimeByKey = {
|
|
1452
|
-
[GLOBAL_DIALOG_RUNTIME_KEY]: createEmptyDialogRuntimeState()
|
|
1453
|
-
};
|
|
1454
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
1455
|
-
var version = 0;
|
|
1456
|
-
var notify = () => {
|
|
1457
|
-
version += 1;
|
|
1458
|
-
for (const listener of listeners) {
|
|
1459
|
-
try {
|
|
1460
|
-
listener();
|
|
1461
|
-
} catch {
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
};
|
|
1465
|
-
var action = (type, payload) => ({ type, payload });
|
|
1466
|
-
function setActiveDialogKey(key) {
|
|
1467
|
-
activeDialogKey = key;
|
|
1468
|
-
configError = null;
|
|
1469
|
-
notify();
|
|
1470
|
-
}
|
|
1471
|
-
function getActiveDialogKey() {
|
|
1472
|
-
return activeDialogKey;
|
|
1473
|
-
}
|
|
1474
|
-
function setDialogConfigError(error) {
|
|
1475
|
-
configError = error;
|
|
1476
|
-
notify();
|
|
1477
|
-
}
|
|
1478
|
-
function getDialogConfigError() {
|
|
1479
|
-
return configError;
|
|
1480
|
-
}
|
|
1481
|
-
var resolveDialogRuntimeKey = (dialogKey) => dialogKey ?? activeDialogKey ?? GLOBAL_DIALOG_RUNTIME_KEY;
|
|
1482
|
-
var ensureDialogRuntimeState = (dialogKey) => {
|
|
1483
|
-
const runtimeKey = resolveDialogRuntimeKey(dialogKey);
|
|
1484
|
-
if (!runtimeByKey[runtimeKey]) {
|
|
1485
|
-
runtimeByKey[runtimeKey] = createEmptyDialogRuntimeState();
|
|
1486
|
-
}
|
|
1487
|
-
return runtimeByKey[runtimeKey];
|
|
1488
|
-
};
|
|
1489
|
-
function resetDialogRuntimeSessionState(dialogKey) {
|
|
1490
|
-
const runtime = ensureDialogRuntimeState(dialogKey);
|
|
1491
|
-
runtime.tokens = createEmptyTokenStats();
|
|
1492
|
-
runtime.loopStopReason = null;
|
|
1493
|
-
runtime.pendingUserInputQueue = [];
|
|
1494
|
-
notify();
|
|
1495
|
-
}
|
|
1496
|
-
function addPendingFile(payload) {
|
|
1497
|
-
const targetRuntimeKey = payload.targetDialogKey ?? payload.runtimeDialogKey ?? (payload.type === "dialog" ? activeDialogKey : payload.dialogKey);
|
|
1498
|
-
const runtime = ensureDialogRuntimeState(targetRuntimeKey);
|
|
1499
|
-
if (!runtime.pendingFiles.some((f) => f.id === payload.id)) {
|
|
1500
|
-
runtime.pendingFiles.push(payload);
|
|
1501
|
-
notify();
|
|
1502
|
-
}
|
|
1503
|
-
return action("dialogRuntime/addPendingFile", payload);
|
|
1504
|
-
}
|
|
1505
|
-
function removePendingFile(fileId) {
|
|
1506
|
-
const runtime = ensureDialogRuntimeState();
|
|
1507
|
-
const fileToRemove = runtime.pendingFiles.find((f) => f.id === fileId);
|
|
1508
|
-
if (fileToRemove) {
|
|
1509
|
-
if (fileToRemove.pageKey) {
|
|
1510
|
-
delete runtime.pendingRawData[fileToRemove.pageKey];
|
|
1511
|
-
}
|
|
1512
|
-
runtime.pendingFiles = runtime.pendingFiles.filter(
|
|
1513
|
-
(file) => file.id !== fileId
|
|
1514
|
-
);
|
|
1515
|
-
notify();
|
|
1516
|
-
}
|
|
1517
|
-
return action("dialogRuntime/removePendingFile", fileId);
|
|
1518
|
-
}
|
|
1519
|
-
function clearPendingAttachments(payload) {
|
|
1520
|
-
if (payload?.all) {
|
|
1521
|
-
Object.values(runtimeByKey).forEach((runtime2) => {
|
|
1522
|
-
runtime2.pendingFiles = [];
|
|
1523
|
-
runtime2.pendingRawData = {};
|
|
1524
|
-
});
|
|
1525
|
-
notify();
|
|
1526
|
-
return action("dialogRuntime/clearPendingAttachments", payload);
|
|
1527
|
-
}
|
|
1528
|
-
const runtime = ensureDialogRuntimeState(payload?.dialogKey);
|
|
1529
|
-
runtime.pendingFiles = [];
|
|
1530
|
-
runtime.pendingRawData = {};
|
|
1531
|
-
notify();
|
|
1532
|
-
return action("dialogRuntime/clearPendingAttachments", payload);
|
|
1533
|
-
}
|
|
1534
|
-
function setLoopStopReason(payload) {
|
|
1535
|
-
const runtime = ensureDialogRuntimeState(payload.dialogKey);
|
|
1536
|
-
runtime.loopStopReason = payload.reason;
|
|
1537
|
-
notify();
|
|
1538
|
-
return action("dialogRuntime/setLoopStopReason", payload);
|
|
1539
|
-
}
|
|
1540
|
-
function clearDialogRuntimeState(payload) {
|
|
1541
|
-
delete runtimeByKey[payload.dialogKey];
|
|
1542
|
-
notify();
|
|
1543
|
-
return action("dialogRuntime/clearDialogRuntimeState", payload);
|
|
1544
|
-
}
|
|
1545
|
-
function addActiveController(payload) {
|
|
1546
|
-
const runtime = ensureDialogRuntimeState(payload.dialogKey);
|
|
1547
|
-
runtime.activeControllers[payload.messageId] = payload.controller;
|
|
1548
|
-
notify();
|
|
1549
|
-
return action("dialogRuntime/addActiveController", payload);
|
|
1550
|
-
}
|
|
1551
|
-
function removeActiveController(payload) {
|
|
1552
|
-
const normalized = typeof payload === "string" ? { messageId: payload } : payload;
|
|
1553
|
-
const runtime = ensureDialogRuntimeState(normalized.dialogKey);
|
|
1554
|
-
delete runtime.activeControllers[normalized.messageId];
|
|
1555
|
-
notify();
|
|
1556
|
-
return action("dialogRuntime/removeActiveController", normalized);
|
|
1557
|
-
}
|
|
1558
|
-
function clearActiveControllers(payload) {
|
|
1559
|
-
if (payload?.all) {
|
|
1560
|
-
Object.values(runtimeByKey).forEach((runtime2) => {
|
|
1561
|
-
runtime2.activeControllers = {};
|
|
1562
|
-
});
|
|
1563
|
-
notify();
|
|
1564
|
-
return action("dialogRuntime/clearActiveControllers", payload);
|
|
1565
|
-
}
|
|
1566
|
-
const runtime = ensureDialogRuntimeState(payload?.dialogKey);
|
|
1567
|
-
runtime.activeControllers = {};
|
|
1568
|
-
notify();
|
|
1569
|
-
return action("dialogRuntime/clearActiveControllers", payload);
|
|
1570
|
-
}
|
|
1571
|
-
function enqueueUserInput(payload) {
|
|
1572
|
-
const normalized = typeof payload === "string" ? { text: payload } : payload;
|
|
1573
|
-
const runtime = ensureDialogRuntimeState(normalized.dialogKey);
|
|
1574
|
-
runtime.pendingUserInputQueue.push(normalized.text);
|
|
1575
|
-
notify();
|
|
1576
|
-
return action("dialogRuntime/enqueueUserInput", normalized);
|
|
1577
|
-
}
|
|
1578
|
-
function dequeueUserInput(payload) {
|
|
1579
|
-
const runtime = ensureDialogRuntimeState(payload?.dialogKey);
|
|
1580
|
-
runtime.pendingUserInputQueue.shift();
|
|
1581
|
-
notify();
|
|
1582
|
-
return action("dialogRuntime/dequeueUserInput", payload);
|
|
1583
|
-
}
|
|
1584
|
-
function clearPendingUserInputQueue(payload) {
|
|
1585
|
-
if (payload?.all) {
|
|
1586
|
-
Object.values(runtimeByKey).forEach((runtime2) => {
|
|
1587
|
-
runtime2.pendingUserInputQueue = [];
|
|
1588
|
-
});
|
|
1589
|
-
notify();
|
|
1590
|
-
return action("dialogRuntime/clearPendingUserInputQueue", payload);
|
|
1591
|
-
}
|
|
1592
|
-
const runtime = ensureDialogRuntimeState(payload?.dialogKey);
|
|
1593
|
-
runtime.pendingUserInputQueue = [];
|
|
1594
|
-
notify();
|
|
1595
|
-
return action("dialogRuntime/clearPendingUserInputQueue", payload);
|
|
1596
|
-
}
|
|
1597
|
-
function tokenUsageLiveUpdate(payload) {
|
|
1598
|
-
const runtime = ensureDialogRuntimeState(payload.dialogKey);
|
|
1599
|
-
runtime.tokens.inputTokens += payload.input_tokens;
|
|
1600
|
-
runtime.tokens.outputTokens += payload.output_tokens;
|
|
1601
|
-
runtime.tokens.totalCost += payload.cost ?? 0;
|
|
1602
|
-
notify();
|
|
1603
|
-
return action("dialogRuntime/tokenUsageLiveUpdate", payload);
|
|
1604
|
-
}
|
|
1605
|
-
function addPageReferenceToRuntime(payload) {
|
|
1606
|
-
const runtime = ensureDialogRuntimeState(payload.dialogKey);
|
|
1607
|
-
runtime.pendingFiles.push(payload.reference);
|
|
1608
|
-
if (payload.rawData?.pageKey) {
|
|
1609
|
-
runtime.pendingRawData[payload.rawData.pageKey] = payload.rawData;
|
|
1610
|
-
}
|
|
1611
|
-
notify();
|
|
1612
|
-
}
|
|
1613
|
-
function applyUpdateTokensFulfilled(payload) {
|
|
1614
|
-
const runtime = runtimeByKey[payload.dialogKey];
|
|
1615
|
-
if (!runtime) return;
|
|
1616
|
-
runtime.tokens.inputTokens = Math.max(
|
|
1617
|
-
0,
|
|
1618
|
-
runtime.tokens.inputTokens - (payload.input_tokens ?? 0)
|
|
1619
|
-
);
|
|
1620
|
-
runtime.tokens.outputTokens = Math.max(
|
|
1621
|
-
0,
|
|
1622
|
-
runtime.tokens.outputTokens - (payload.output_tokens ?? 0)
|
|
1623
|
-
);
|
|
1624
|
-
runtime.tokens.totalCost = Math.max(
|
|
1625
|
-
0,
|
|
1626
|
-
runtime.tokens.totalCost - (payload.cost ?? 0)
|
|
1627
|
-
);
|
|
1628
|
-
notify();
|
|
1629
|
-
}
|
|
1630
|
-
function applyClearDialogStateRuntime() {
|
|
1631
|
-
const previousDialogKey = activeDialogKey;
|
|
1632
|
-
const previousRuntime = previousDialogKey ? runtimeByKey[previousDialogKey] : null;
|
|
1633
|
-
const globalRuntime = ensureDialogRuntimeState(GLOBAL_DIALOG_RUNTIME_KEY);
|
|
1634
|
-
if (previousRuntime) {
|
|
1635
|
-
if (previousRuntime.pendingFiles.length > 0) {
|
|
1636
|
-
globalRuntime.pendingFiles = previousRuntime.pendingFiles;
|
|
1637
|
-
previousRuntime.pendingFiles = [];
|
|
1638
|
-
}
|
|
1639
|
-
previousRuntime.pendingRawData = {};
|
|
1640
|
-
previousRuntime.pendingUserInputQueue = [];
|
|
1641
|
-
}
|
|
1642
|
-
activeDialogKey = null;
|
|
1643
|
-
configError = null;
|
|
1644
|
-
globalRuntime.pendingRawData = {};
|
|
1645
|
-
globalRuntime.pendingUserInputQueue = [];
|
|
1646
|
-
notify();
|
|
1647
|
-
}
|
|
1648
|
-
function deleteDialogRuntime(dialogKey) {
|
|
1649
|
-
delete runtimeByKey[dialogKey];
|
|
1650
|
-
notify();
|
|
1651
|
-
}
|
|
1652
|
-
function abortActiveControllers(args) {
|
|
1653
|
-
const runtimes = args?.all ? Object.values(runtimeByKey) : [ensureDialogRuntimeState(args?.dialogKey)];
|
|
1654
|
-
runtimes.forEach((runtime) => {
|
|
1655
|
-
Object.values(runtime.activeControllers).forEach(
|
|
1656
|
-
(controller) => controller.abort()
|
|
1657
|
-
);
|
|
1658
|
-
});
|
|
1659
|
-
}
|
|
1660
|
-
function getDialogRuntimeState(dialogKey) {
|
|
1661
|
-
return runtimeByKey[resolveDialogRuntimeKey(dialogKey)] ?? createEmptyDialogRuntimeState();
|
|
1662
|
-
}
|
|
1663
|
-
function getPendingFiles(dialogKey) {
|
|
1664
|
-
return getDialogRuntimeState(dialogKey).pendingFiles;
|
|
1665
|
-
}
|
|
1666
|
-
function getActiveControllers(dialogKey) {
|
|
1667
|
-
return getDialogRuntimeState(dialogKey).activeControllers;
|
|
1668
|
-
}
|
|
1669
|
-
function getPendingRawData(dialogKey) {
|
|
1670
|
-
return getDialogRuntimeState(dialogKey).pendingRawData;
|
|
1671
|
-
}
|
|
1672
|
-
function getDialogRuntimeTokens(dialogKey) {
|
|
1673
|
-
return getDialogRuntimeState(dialogKey).tokens;
|
|
1674
|
-
}
|
|
1675
|
-
function getPendingRawDataByPageKey(pageKey) {
|
|
1676
|
-
return getDialogRuntimeState().pendingRawData[pageKey];
|
|
1677
|
-
}
|
|
1678
|
-
function getPendingUserInputQueue(dialogKey) {
|
|
1679
|
-
return getDialogRuntimeState(dialogKey).pendingUserInputQueue;
|
|
1680
|
-
}
|
|
1681
|
-
function getLoopStopReason(dialogKey) {
|
|
1682
|
-
return getDialogRuntimeState(dialogKey).loopStopReason;
|
|
1683
|
-
}
|
|
1684
|
-
var selectDialogRuntimeByKey = (_state, dialogKey) => getDialogRuntimeState(dialogKey);
|
|
1685
|
-
var selectPendingFiles = (_state, dialogKey) => getPendingFiles(dialogKey);
|
|
1686
|
-
var selectActiveControllers = (_state, dialogKey) => getActiveControllers(dialogKey);
|
|
1687
|
-
var selectPendingRawData = (_state, dialogKey) => getPendingRawData(dialogKey);
|
|
1688
|
-
var selectDialogRuntimeTokens = (_state, dialogKey) => getDialogRuntimeTokens(dialogKey);
|
|
1689
|
-
var selectPendingRawDataByPageKey = (_state, pageKey) => getPendingRawDataByPageKey(pageKey);
|
|
1690
|
-
var selectPendingUserInputQueue = (_state, dialogKey) => getPendingUserInputQueue(dialogKey);
|
|
1691
|
-
var selectLoopStopReason = (_state, dialogKey) => getLoopStopReason(dialogKey);
|
|
1692
|
-
var selectCurrentDialogKey = (_state) => getActiveDialogKey();
|
|
1693
|
-
var selectConfigError = (_state) => getDialogConfigError();
|
|
1694
|
-
function subscribe(listener) {
|
|
1695
|
-
listeners.add(listener);
|
|
1696
|
-
return () => {
|
|
1697
|
-
listeners.delete(listener);
|
|
1698
|
-
};
|
|
1699
|
-
}
|
|
1700
|
-
function getSnapshot() {
|
|
1701
|
-
return version;
|
|
1702
|
-
}
|
|
1703
|
-
function usePendingFiles(dialogKey) {
|
|
1704
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1705
|
-
return getPendingFiles(dialogKey);
|
|
1706
|
-
}
|
|
1707
|
-
function useActiveControllers(dialogKey) {
|
|
1708
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1709
|
-
return getActiveControllers(dialogKey);
|
|
1710
|
-
}
|
|
1711
|
-
function usePendingUserInputQueue(dialogKey) {
|
|
1712
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1713
|
-
return getPendingUserInputQueue(dialogKey);
|
|
1714
|
-
}
|
|
1715
|
-
function useLoopStopReason(dialogKey) {
|
|
1716
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1717
|
-
return getLoopStopReason(dialogKey);
|
|
1718
|
-
}
|
|
1719
|
-
function useDialogRuntimeTokens(dialogKey) {
|
|
1720
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1721
|
-
return getDialogRuntimeTokens(dialogKey);
|
|
1722
|
-
}
|
|
1723
|
-
function useCurrentDialogKey() {
|
|
1724
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1725
|
-
return getActiveDialogKey();
|
|
1726
|
-
}
|
|
1727
|
-
function useDialogConfigError() {
|
|
1728
|
-
(0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
1729
|
-
return getDialogConfigError();
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
1430
|
export {
|
|
1733
|
-
require_react
|
|
1734
|
-
GLOBAL_DIALOG_RUNTIME_KEY,
|
|
1735
|
-
setActiveDialogKey,
|
|
1736
|
-
getActiveDialogKey,
|
|
1737
|
-
setDialogConfigError,
|
|
1738
|
-
resetDialogRuntimeSessionState,
|
|
1739
|
-
addPendingFile,
|
|
1740
|
-
removePendingFile,
|
|
1741
|
-
clearPendingAttachments,
|
|
1742
|
-
setLoopStopReason,
|
|
1743
|
-
clearDialogRuntimeState,
|
|
1744
|
-
addActiveController,
|
|
1745
|
-
removeActiveController,
|
|
1746
|
-
clearActiveControllers,
|
|
1747
|
-
enqueueUserInput,
|
|
1748
|
-
dequeueUserInput,
|
|
1749
|
-
clearPendingUserInputQueue,
|
|
1750
|
-
tokenUsageLiveUpdate,
|
|
1751
|
-
addPageReferenceToRuntime,
|
|
1752
|
-
applyUpdateTokensFulfilled,
|
|
1753
|
-
applyClearDialogStateRuntime,
|
|
1754
|
-
deleteDialogRuntime,
|
|
1755
|
-
abortActiveControllers,
|
|
1756
|
-
getDialogRuntimeTokens,
|
|
1757
|
-
getPendingUserInputQueue,
|
|
1758
|
-
getLoopStopReason,
|
|
1759
|
-
selectDialogRuntimeByKey,
|
|
1760
|
-
selectPendingFiles,
|
|
1761
|
-
selectActiveControllers,
|
|
1762
|
-
selectPendingRawData,
|
|
1763
|
-
selectDialogRuntimeTokens,
|
|
1764
|
-
selectPendingRawDataByPageKey,
|
|
1765
|
-
selectPendingUserInputQueue,
|
|
1766
|
-
selectLoopStopReason,
|
|
1767
|
-
selectCurrentDialogKey,
|
|
1768
|
-
selectConfigError,
|
|
1769
|
-
usePendingFiles,
|
|
1770
|
-
useActiveControllers,
|
|
1771
|
-
usePendingUserInputQueue,
|
|
1772
|
-
useLoopStopReason,
|
|
1773
|
-
useDialogRuntimeTokens,
|
|
1774
|
-
useCurrentDialogKey,
|
|
1775
|
-
useDialogConfigError
|
|
1431
|
+
require_react
|
|
1776
1432
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
estimateTokenCount
|
|
3
|
+
} from "./chunk-PSCNXBYA.js";
|
|
1
4
|
import {
|
|
2
5
|
compactWhitespace
|
|
3
6
|
} from "./chunk-DWLEOOGR.js";
|
|
4
7
|
import {
|
|
5
8
|
addContentAction
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RVWRKFUB.js";
|
|
7
10
|
import {
|
|
8
11
|
upload
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DNNSCSA2.js";
|
|
10
13
|
import {
|
|
11
14
|
getRuntimeServerContext
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KWSQR2KK.js";
|
|
13
16
|
import {
|
|
14
17
|
API_ENDPOINTS
|
|
15
18
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -17,14 +20,6 @@ import {
|
|
|
17
20
|
normalizeServerOrigin
|
|
18
21
|
} from "./chunk-CF7PE763.js";
|
|
19
22
|
|
|
20
|
-
// packages/ai/context/tokenUtils.ts
|
|
21
|
-
var estimateTokenCount = (text) => {
|
|
22
|
-
if (!text) return 0;
|
|
23
|
-
const chineseChars = (text.match(/[\u4e00-\u9fa5\u3400-\u4dbf]/g) || []).length;
|
|
24
|
-
const otherChars = text.length - chineseChars;
|
|
25
|
-
return Math.ceil(chineseChars * 1.5 + otherChars * 0.25);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
23
|
// packages/core/chat/messageContentSerialize.ts
|
|
29
24
|
var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
|
|
30
25
|
if (typeof content === "string") {
|
|
@@ -708,10 +703,79 @@ function clipCompactText(value, max, ellipsis = "...") {
|
|
|
708
703
|
return `${compact.slice(0, max - ellipsis.length)}${ellipsis}`;
|
|
709
704
|
}
|
|
710
705
|
|
|
706
|
+
// packages/ai/token/providerCallTiming.ts
|
|
707
|
+
var defaultNow = () => {
|
|
708
|
+
const perf = globalThis.performance;
|
|
709
|
+
return typeof perf?.now === "function" ? perf.now() : Date.now();
|
|
710
|
+
};
|
|
711
|
+
var normalizeTimingMs = (value) => {
|
|
712
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
713
|
+
return void 0;
|
|
714
|
+
}
|
|
715
|
+
return Math.round(value);
|
|
716
|
+
};
|
|
717
|
+
var createProviderCallTimingTracker = (now = defaultNow) => ({
|
|
718
|
+
startMonotonicMs: now(),
|
|
719
|
+
now
|
|
720
|
+
});
|
|
721
|
+
var observeMeaningfulProviderResponseAt = (tracker, observedAt) => {
|
|
722
|
+
if (!tracker || tracker.firstMeaningfulMonotonicMs !== void 0) return;
|
|
723
|
+
tracker.firstMeaningfulMonotonicMs = observedAt;
|
|
724
|
+
};
|
|
725
|
+
var observeMeaningfulProviderResponse = (tracker) => {
|
|
726
|
+
if (!tracker) return;
|
|
727
|
+
observeMeaningfulProviderResponseAt(tracker, tracker.now());
|
|
728
|
+
};
|
|
729
|
+
var finalizeProviderCallTiming = (tracker) => {
|
|
730
|
+
if (!tracker) return {};
|
|
731
|
+
const callDurationMs = normalizeTimingMs(
|
|
732
|
+
Math.max(0, tracker.now() - tracker.startMonotonicMs)
|
|
733
|
+
);
|
|
734
|
+
const firstOutputMs = tracker.firstMeaningfulMonotonicMs !== void 0 ? normalizeTimingMs(
|
|
735
|
+
Math.max(0, tracker.firstMeaningfulMonotonicMs - tracker.startMonotonicMs)
|
|
736
|
+
) : void 0;
|
|
737
|
+
return {
|
|
738
|
+
...firstOutputMs !== void 0 ? { firstOutputMs } : {},
|
|
739
|
+
...callDurationMs !== void 0 ? { callDurationMs } : {}
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
var withProviderCallTimingFields = (usage, timing) => {
|
|
743
|
+
if (!usage || typeof usage !== "object") return usage;
|
|
744
|
+
return {
|
|
745
|
+
...usage,
|
|
746
|
+
...timing.firstOutputMs !== void 0 ? { firstOutputMs: timing.firstOutputMs } : {},
|
|
747
|
+
...timing.callDurationMs !== void 0 ? { callDurationMs: timing.callDurationMs } : {}
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
var isMeaningfulChatCompletionOutput = (delta) => {
|
|
751
|
+
if (!delta || typeof delta !== "object") return false;
|
|
752
|
+
const d = delta;
|
|
753
|
+
if (typeof d.content === "string" && d.content) return true;
|
|
754
|
+
if (typeof d.reasoning_content === "string" && d.reasoning_content) return true;
|
|
755
|
+
if (typeof d.reasoning === "string" && d.reasoning) return true;
|
|
756
|
+
return Array.isArray(d.tool_calls) && d.tool_calls.length > 0;
|
|
757
|
+
};
|
|
758
|
+
var isMeaningfulResponsesOutput = (event) => {
|
|
759
|
+
if (!event || typeof event !== "object") return false;
|
|
760
|
+
const e = event;
|
|
761
|
+
const type = typeof e.type === "string" ? e.type : "";
|
|
762
|
+
if (type.startsWith("response.") && type.endsWith(".delta")) {
|
|
763
|
+
const delta = e.delta;
|
|
764
|
+
if (typeof delta === "string" && delta.length > 0) return true;
|
|
765
|
+
if (delta && typeof delta === "object" && typeof delta.text === "string" && delta.text) {
|
|
766
|
+
return true;
|
|
767
|
+
}
|
|
768
|
+
return false;
|
|
769
|
+
}
|
|
770
|
+
if (type === "response.output_item.added" || type === "response.output_item.done") {
|
|
771
|
+
return e.item?.type === "function_call";
|
|
772
|
+
}
|
|
773
|
+
return false;
|
|
774
|
+
};
|
|
775
|
+
|
|
711
776
|
export {
|
|
712
777
|
clipCompactText,
|
|
713
778
|
planContextUsage,
|
|
714
|
-
estimateTokenCount,
|
|
715
779
|
buildDatabaseFileContentUrl,
|
|
716
780
|
serializeMessageContent,
|
|
717
781
|
normalizeAssistantContentBuffer,
|
|
@@ -723,5 +787,13 @@ export {
|
|
|
723
787
|
formatFileOperationsFromMessages,
|
|
724
788
|
formatMessagesForSummaryWithTruncation,
|
|
725
789
|
buildCompactionMetricsFromPlan,
|
|
726
|
-
formatCompactionMetricsLog
|
|
790
|
+
formatCompactionMetricsLog,
|
|
791
|
+
normalizeTimingMs,
|
|
792
|
+
createProviderCallTimingTracker,
|
|
793
|
+
observeMeaningfulProviderResponseAt,
|
|
794
|
+
observeMeaningfulProviderResponse,
|
|
795
|
+
finalizeProviderCallTiming,
|
|
796
|
+
withProviderCallTimingFields,
|
|
797
|
+
isMeaningfulChatCompletionOutput,
|
|
798
|
+
isMeaningfulResponsesOutput
|
|
727
799
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_react
|
|
3
|
+
} from "./chunk-YDH3FDFQ.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeSpaceId
|
|
6
|
+
} from "./chunk-UAD2WT54.js";
|
|
7
|
+
import {
|
|
8
|
+
__toESM
|
|
9
|
+
} from "./chunk-4VNS5WPM.js";
|
|
10
|
+
|
|
11
|
+
// packages/create/space/spaceCurrentStore.ts
|
|
12
|
+
var import_react = __toESM(require_react(), 1);
|
|
13
|
+
var VIEW_MODE_STORAGE_KEY = "nolo-space-view-mode";
|
|
14
|
+
var readStoredViewMode = () => {
|
|
15
|
+
try {
|
|
16
|
+
if (typeof window === "undefined") return "all";
|
|
17
|
+
return window.localStorage.getItem(VIEW_MODE_STORAGE_KEY) === "categories" ? "categories" : "all";
|
|
18
|
+
} catch {
|
|
19
|
+
return "all";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var writeStoredViewMode = (mode) => {
|
|
23
|
+
try {
|
|
24
|
+
if (typeof window === "undefined") return;
|
|
25
|
+
window.localStorage.setItem(VIEW_MODE_STORAGE_KEY, mode);
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var createInitialState = () => ({
|
|
30
|
+
currentSpaceId: null,
|
|
31
|
+
currentSpace: null,
|
|
32
|
+
viewMode: readStoredViewMode()
|
|
33
|
+
});
|
|
34
|
+
var state = createInitialState();
|
|
35
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
36
|
+
var version = 0;
|
|
37
|
+
var notify = () => {
|
|
38
|
+
version += 1;
|
|
39
|
+
for (const listener of listeners) {
|
|
40
|
+
try {
|
|
41
|
+
listener();
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
function getCurrentSpaceId() {
|
|
47
|
+
return state.viewMode === "all" ? null : state.currentSpaceId;
|
|
48
|
+
}
|
|
49
|
+
function getCurrentSpaceIdRaw() {
|
|
50
|
+
return state.currentSpaceId;
|
|
51
|
+
}
|
|
52
|
+
function getCurrentSpaceRaw() {
|
|
53
|
+
return state.currentSpace;
|
|
54
|
+
}
|
|
55
|
+
function getViewMode() {
|
|
56
|
+
return state.viewMode;
|
|
57
|
+
}
|
|
58
|
+
function setViewMode(mode) {
|
|
59
|
+
if (state.viewMode === mode) return;
|
|
60
|
+
state = { ...state, viewMode: mode };
|
|
61
|
+
writeStoredViewMode(mode);
|
|
62
|
+
notify();
|
|
63
|
+
}
|
|
64
|
+
function setCurrentSpace(space) {
|
|
65
|
+
state = { ...state, currentSpace: space };
|
|
66
|
+
notify();
|
|
67
|
+
}
|
|
68
|
+
function setCurrentSpaceBoth(spaceId, space) {
|
|
69
|
+
state = { ...state, currentSpaceId: spaceId, currentSpace: space };
|
|
70
|
+
notify();
|
|
71
|
+
}
|
|
72
|
+
function updateCurrentSpaceIfMatch(spaceId, space) {
|
|
73
|
+
const currentId = state.currentSpaceId;
|
|
74
|
+
if (currentId && normalizeSpaceId(currentId) === normalizeSpaceId(spaceId)) {
|
|
75
|
+
state = { ...state, currentSpace: space };
|
|
76
|
+
notify();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
getCurrentSpaceId,
|
|
82
|
+
getCurrentSpaceIdRaw,
|
|
83
|
+
getCurrentSpaceRaw,
|
|
84
|
+
getViewMode,
|
|
85
|
+
setViewMode,
|
|
86
|
+
setCurrentSpace,
|
|
87
|
+
setCurrentSpaceBoth,
|
|
88
|
+
updateCurrentSpaceIfMatch
|
|
89
|
+
};
|
|
@@ -77,7 +77,11 @@ var TOOL_PACKS = {
|
|
|
77
77
|
"globFiles",
|
|
78
78
|
"execShell",
|
|
79
79
|
"launchProcess",
|
|
80
|
-
"listProcesses"
|
|
80
|
+
"listProcesses",
|
|
81
|
+
"taskWait",
|
|
82
|
+
"taskLogs",
|
|
83
|
+
"taskStop",
|
|
84
|
+
"tasks"
|
|
81
85
|
],
|
|
82
86
|
// 表格读写。唯一真相源——app-builder 能力包与 table object skill 都从这里取,
|
|
83
87
|
// 以前两边各抄一份,改一个忘另一个就会静默不同步。
|
|
@@ -267,7 +271,7 @@ function resolveEffectiveEnabledPacks(args) {
|
|
|
267
271
|
...base,
|
|
268
272
|
...base.length === 0 ? args.emptyFallbackPacks ?? [] : [],
|
|
269
273
|
...args.hostPacks ?? [],
|
|
270
|
-
...ALWAYS_ON_PACK_IDS
|
|
274
|
+
...args.includeAlwaysOnPacks === false ? [] : ALWAYS_ON_PACK_IDS
|
|
271
275
|
])
|
|
272
276
|
];
|
|
273
277
|
}
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
compileCodingEffectiveTools,
|
|
18
18
|
resolveCodingBuiltinSlug,
|
|
19
19
|
resolveCodingEffectiveTools
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-DZZL7UBV.js";
|
|
21
|
+
import "./chunk-ZRSJ3JEH.js";
|
|
22
22
|
import "./chunk-EY7V7REW.js";
|
|
23
23
|
import "./chunk-O6OSWFZQ.js";
|
|
24
24
|
import "./chunk-UZ6XXCVR.js";
|