nolo-cli 0.8.0-alpha.11 → 0.8.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-GPU2276G.js → _executeModel-EBU7YBDV.js} +26 -22
- package/{action-PAXRPJJF.js → action-SQGI5JY5.js} +5 -4
- package/{addContentAction-CZVWF3QZ.js → addContentAction-ZX2PUS3X.js} +4 -3
- package/{addDialogAgentAction-CCIDTPHC.js → addDialogAgentAction-ULADQX2Q.js} +3 -2
- package/{agentDeleteCommand-4ZZFM6AT.js → agentDeleteCommand-GNVYHOGZ.js} +11 -8
- package/{agentEmailCommands-C4FIVQYV.js → agentEmailCommands-IC52LATA.js} +29 -25
- package/{agentListCommands-VQAKVNEX.js → agentListCommands-FM4OWXYT.js} +12 -9
- package/{agentMachineCommands-ONFDXZUQ.js → agentMachineCommands-SFWC6KN4.js} +11 -8
- package/{agentRecordCommands-QANUGHLK.js → agentRecordCommands-VLMLWLCM.js} +29 -25
- package/{agentRunCommand-A3OSRB5Q.js → agentRunCommand-D2PVHUGR.js} +30 -25
- package/{agentRuntimeLocal-62ZB2ODP.js → agentRuntimeLocal-XL5PLRJV.js} +16 -12
- package/{agentSlice-GCGLVR2N.js → agentSlice-IIC7AISR.js} +5 -4
- package/{chunk-YOUZDXU7.js → chunk-3N55DSXH.js} +21 -17
- package/chunk-4ZDM73SD.js +34 -0
- package/{chunk-TDIQFT2F.js → chunk-5CS33IBL.js} +1 -1
- package/{chunk-IYQV26RA.js → chunk-6A3LI5TZ.js} +2 -2
- package/{chunk-VEJLAVTC.js → chunk-6CBN7GGH.js} +2 -2
- package/{chunk-BSTNFPHD.js → chunk-6XKX2N2E.js} +1 -1
- package/{chunk-7OC5VCLW.js → chunk-7EPLXPTM.js} +4 -4
- package/{chunk-GCMRDRCQ.js → chunk-7IPLJUYC.js} +1 -1
- package/{chunk-53DNV5AT.js → chunk-7U4TQSWU.js} +3 -3
- package/{chunk-GGUO4FKF.js → chunk-7XN726FS.js} +41 -19
- package/{chunk-I3D64LRJ.js → chunk-BKPVTIEK.js} +4 -4
- package/{chunk-7YLKNMOM.js → chunk-DAB7DRXD.js} +6 -6
- package/{chunk-LM25IZBJ.js → chunk-DG7AAAR3.js} +1 -1
- package/{chunk-F6QQI5YI.js → chunk-DGFWICQJ.js} +1 -1
- package/chunk-DSNONPGW.js +386 -0
- package/{chunk-LAWBMYBC.js → chunk-FE2TZO7Z.js} +2 -2
- package/{chunk-R2HXWML7.js → chunk-HLM6MG7F.js} +19 -20
- package/chunk-I42VC5KR.js +15 -0
- package/{chunk-J5KV47ZW.js → chunk-IBJC3GOP.js} +2 -2
- package/chunk-JEXVIMYZ.js +55 -0
- package/{chunk-6B7G54GE.js → chunk-KH4OXCBK.js} +5 -5
- package/{chunk-SYOF5TAS.js → chunk-MXLQWBVM.js} +36 -95
- package/chunk-OPZYGHUC.js +89 -0
- package/{chunk-J4576WMJ.js → chunk-PCWC3JTN.js} +1 -1
- package/{chunk-HEIIIZBX.js → chunk-Q2YZULBH.js} +1 -1
- package/{chunk-KB7YFGL6.js → chunk-Q3K5K4KS.js} +1 -1
- package/{chunk-IAXBCTTE.js → chunk-QO4YO77G.js} +2 -2
- package/{chunk-GGXABIPP.js → chunk-RJKDVL4L.js} +2 -2
- package/{chunk-CJH2VTEU.js → chunk-RLCFUU46.js} +3 -3
- package/{chunk-2UZXR7WO.js → chunk-SACYB45H.js} +19 -378
- package/{chunk-PN7AFLOK.js → chunk-SH2CFQOH.js} +3 -13
- package/{chunk-XBIUN5CR.js → chunk-TWPGVS2U.js} +2 -2
- package/{chunk-G5H7RNFL.js → chunk-V2AISYMA.js} +2 -2
- package/{chunk-TZNCFAUP.js → chunk-XOH46MRF.js} +8 -15
- package/{chunk-CQAHS7YO.js → chunk-YDESHYQC.js} +56 -12
- package/{chunk-AUGHVUFE.js → chunk-YYUCRDOK.js} +1 -1
- package/{chunk-H2RMRZJE.js → chunk-ZDXZSXYQ.js} +1 -1
- package/{chunk-NXZGF7F7.js → chunk-ZQ2UM4KG.js} +1 -1
- package/{chunk-QR5IPGT3.js → chunk-ZRS4MX3R.js} +170 -176
- package/{createAgentAutomationAction-537X433B.js → createAgentAutomationAction-GNRYFKTT.js} +12 -10
- package/{createDialogAction-YUD4RKBS.js → createDialogAction-Q4ISCARO.js} +15 -13
- package/{createPageAction-KJMFHL4C.js → createPageAction-7YCAZPK3.js} +13 -11
- package/{dbSlice-C4UJLRZP.js → dbSlice-TO2TSMWM.js} +3 -2
- package/{dialogCommands-H74KJKHC.js → dialogCommands-DWSE4PMW.js} +13 -10
- package/{dialogSlice-ETSD4YWS.js → dialogSlice-5KZA46HM.js} +12 -10
- package/{docCreateCommands-ADUSU34K.js → docCreateCommands-UFJL5PUM.js} +12 -9
- package/{docDeleteCommands-ZXV3S5OS.js → docDeleteCommands-XHEIBAB2.js} +13 -10
- package/{docReadCommands-YYYI6LT7.js → docReadCommands-PEDIC2CW.js} +12 -9
- package/{docStore-ZBF5DDKR.js → docStore-M7K7QFVS.js} +13 -11
- package/{docUpdateCommands-7MGJ3BYA.js → docUpdateCommands-WBRODQ7P.js} +12 -9
- package/{fetchMessages-JOCYIFKL.js → fetchMessages-U6ZHN56A.js} +3 -2
- package/{handleSendMessageAction-MGKI62Y6.js → handleSendMessageAction-SEV4YIPL.js} +12 -10
- package/index.js +40 -36
- package/{localDialogRead-D3BELSTF.js → localDialogRead-Z5UTAJPU.js} +1 -1
- package/{machineCommands-RMTMN7VQ.js → machineCommands-T4DN3MOU.js} +28 -24
- package/{machineWsRunDispatch-UIP355FN.js → machineWsRunDispatch-QRIIT2AK.js} +28 -24
- package/package.json +1 -1
- package/{readlineWorkspace-CRNQRZ6D.js → readlineWorkspace-DXOTOVHL.js} +163 -31
- package/{removeDialogAgentAction-CXLST3N6.js → removeDialogAgentAction-3MUQGFZX.js} +5 -4
- package/{runAgentClientLoop-2S334SGA.js → runAgentClientLoop-UEQEP3XG.js} +21 -19
- package/{setDialogExtraReferencesAction-LP6VYGU7.js → setDialogExtraReferencesAction-MXHX2HPK.js} +3 -2
- package/{setPrimaryDialogAgentAction-D3GGH23T.js → setPrimaryDialogAgentAction-7DLDZHDT.js} +5 -4
- package/{settingSlice-J4I3Z5H7.js → settingSlice-PNLASZGI.js} +4 -3
- package/{spaceCommands-NDEWMFZJ.js → spaceCommands-ORSFAWEY.js} +11 -8
- package/{spaceSlice-RLB6RTHO.js → spaceSlice-HOMW64JA.js} +12 -10
- package/{streamAgentChatTurn-Y2TTYPBD.js → streamAgentChatTurn-REWDBIL3.js} +28 -26
- package/{tools-YZYLY2ZQ.js → tools-L4UQS5VW.js} +19 -17
- package/tuiSummaryLlmCaller-JSI4GL6W.js +78 -0
- package/{understanding-HCSFPE7R.js → understanding-YH4X3XU6.js} +3 -2
- package/{updateDialogTitleAction-LQV6QLBW.js → updateDialogTitleAction-CKLNP73H.js} +14 -11
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BUILTIN_SUMMARY_LLM_CONFIG,
|
|
3
|
+
buildBuiltinSummaryContent
|
|
4
|
+
} from "./chunk-4ZDM73SD.js";
|
|
1
5
|
import {
|
|
2
6
|
authRoutes
|
|
3
7
|
} from "./chunk-MRC4Q34M.js";
|
|
4
8
|
import {
|
|
5
9
|
buildDialogAttachmentPlan,
|
|
6
10
|
extractFileContentIds
|
|
7
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PCWC3JTN.js";
|
|
8
12
|
import {
|
|
9
13
|
getApproxPricePerImage
|
|
10
14
|
} from "./chunk-CWMSB67P.js";
|
|
11
15
|
import {
|
|
12
16
|
deleteServerSyncedCredential,
|
|
13
17
|
runLlm
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DAB7DRXD.js";
|
|
15
19
|
import {
|
|
16
20
|
cleanupCliSessionForDialog
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6A3LI5TZ.js";
|
|
18
22
|
import {
|
|
19
23
|
getDialogAgentIds,
|
|
20
24
|
getPrimaryDialogAgentId
|
|
@@ -24,13 +28,13 @@ import {
|
|
|
24
28
|
} from "./chunk-M76ECQRD.js";
|
|
25
29
|
import {
|
|
26
30
|
fetchMessages
|
|
27
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YYUCRDOK.js";
|
|
28
32
|
import {
|
|
29
33
|
UNCATEGORIZED_ID,
|
|
30
34
|
addContentAction,
|
|
31
35
|
checkSpaceMembership,
|
|
32
36
|
localSpaceAuthorityPatchStamp
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ZDXZSXYQ.js";
|
|
34
38
|
import {
|
|
35
39
|
createSpaceKey,
|
|
36
40
|
normalizeSpaceId
|
|
@@ -45,7 +49,7 @@ import {
|
|
|
45
49
|
} from "./chunk-572EKYLF.js";
|
|
46
50
|
import {
|
|
47
51
|
createFileCredentialBroker
|
|
48
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-5CS33IBL.js";
|
|
49
53
|
import {
|
|
50
54
|
extractCustomId,
|
|
51
55
|
extractUserId
|
|
@@ -76,7 +80,7 @@ import {
|
|
|
76
80
|
selectRemoteServer,
|
|
77
81
|
selectRemoteServers,
|
|
78
82
|
selectRemoteSyncServers
|
|
79
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-6CBN7GGH.js";
|
|
80
84
|
import {
|
|
81
85
|
patch,
|
|
82
86
|
read,
|
|
@@ -89,7 +93,7 @@ import {
|
|
|
89
93
|
uploadFileAction,
|
|
90
94
|
upsertSSREntity,
|
|
91
95
|
write
|
|
92
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-V2AISYMA.js";
|
|
93
97
|
import {
|
|
94
98
|
resolveFileCategory
|
|
95
99
|
} from "./chunk-AZPCASRE.js";
|
|
@@ -100,8 +104,6 @@ import {
|
|
|
100
104
|
DB_PREFIX,
|
|
101
105
|
SEPARATOR,
|
|
102
106
|
TYPE_STORAGE_PREFIXES,
|
|
103
|
-
asNonEmptyStringArray,
|
|
104
|
-
asTrimmedNonEmptyStringArray,
|
|
105
107
|
buildDialogAgentListIndexDeleteOps,
|
|
106
108
|
createDialogMessageKeyAndId,
|
|
107
109
|
createKey,
|
|
@@ -123,7 +125,11 @@ import {
|
|
|
123
125
|
splitKey,
|
|
124
126
|
toTrimmedString,
|
|
125
127
|
ulid
|
|
126
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-SH2CFQOH.js";
|
|
129
|
+
import {
|
|
130
|
+
asNonEmptyStringArray,
|
|
131
|
+
asTrimmedNonEmptyStringArray
|
|
132
|
+
} from "./chunk-I42VC5KR.js";
|
|
127
133
|
import {
|
|
128
134
|
asOptionalFiniteNumber
|
|
129
135
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -12345,35 +12351,6 @@ var fetchAndCacheMessages = async (options) => {
|
|
|
12345
12351
|
return remotePromise;
|
|
12346
12352
|
};
|
|
12347
12353
|
|
|
12348
|
-
// packages/chat/dialog/actions/builtinDialogLlm.ts
|
|
12349
|
-
var BASE_BUILTIN_DIALOG_LLM_CONFIG = {
|
|
12350
|
-
apiSource: "platform",
|
|
12351
|
-
useServerProxy: true
|
|
12352
|
-
};
|
|
12353
|
-
var BUILTIN_TITLE_LLM_CONFIG = {
|
|
12354
|
-
...BASE_BUILTIN_DIALOG_LLM_CONFIG,
|
|
12355
|
-
provider: "deepseek",
|
|
12356
|
-
id: "builtin-dialog-title-llm",
|
|
12357
|
-
name: "Builtin Dialog Title LLM",
|
|
12358
|
-
model: "deepseek-v4-flash",
|
|
12359
|
-
prompt: "You are a title generator for chat history. \u4F60\u53EA\u505A\u4E00\u4EF6\u4E8B\uFF1A\u6839\u636E\u5BF9\u8BDD\u5185\u5BB9\u8F93\u51FA\u6700\u7EC8\u6807\u9898\u3002\u786C\u6027\u89C4\u5219\uFF1A1) \u53EA\u8F93\u51FA\u6807\u9898\u8FD9\u4E00\u884C\uFF1B\u4E25\u7981\u8F93\u51FA\u63A8\u7406\u3001\u5206\u6790\u3001\u6B65\u9AA4\u3001\u89E3\u91CA\u3001\u524D\u8A00\u3001\u540E\u8BB0\u3001\u7FFB\u8BD1\u3001\u81F4\u6B49\u6216\u4EFB\u4F55\u989D\u5916\u8BF4\u660E\u30022) \u4E0D\u8981\u56DE\u7B54\u7528\u6237\u8BF7\u6C42\uFF0C\u4E0D\u8981\u5199\u6458\u8981\uFF0C\u53EA\u7ED9\u6807\u9898\u7ED3\u679C\u30023) \u6807\u9898\u5C3D\u91CF\u77ED\uFF1A\u901A\u5E38 2-5 \u4E2A\u8BCD\uFF0C\u82F1\u6587\u4E0D\u8D85\u8FC7 6 \u4E2A\u8BCD\u30024) \u4F7F\u7528\u5BF9\u8BDD\u4E3B\u8BED\u8A00\uFF1B\u6DF7\u5408\u8BED\u8A00\u65F6\u4F18\u5148\u7528\u6237\u4E3B\u8981\u8BED\u8A00\u30025) \u4F18\u5148\u590D\u7528\u5BF9\u8BDD\u4E2D\u7684\u5177\u4F53\u4E3B\u9898\u8BCD\uFF0C\u907F\u514D issue\u3001help\u3001discussion\u3001analysis\u3001update \u8FD9\u7C7B\u7A7A\u6CDB\u8BCD\u30026) \u5FFD\u7565 tool JSON\u3001\u51FD\u6570\u540D\u3001branch label\u3001agent \u540D\u3001\u7CFB\u7EDF\u6307\u4EE4\u548C\u7F16\u6392\u75D5\u8FF9\uFF08\u5982 GPT\u3001Claude\u3001Gemini\uFF09\uFF1B\u6807\u9898\u8981\u843D\u5728\u7528\u6237\u771F\u6B63\u8BA8\u8BBA\u7684\u5BF9\u8C61\u6216\u51B3\u7B56\u4E0A\u30027) \u66F4\u504F\u597D\u201C\u5BF9\u8C61 + \u52A8\u4F5C/\u5224\u65AD\u201D\u7684\u77ED\u6807\u9898\uFF0C\u4F8B\u5982\u201CAI \u90AE\u4EF6\u52A9\u624B\u53D6\u820D\u201D\u201C\u4E1C\u4EAC\u56DB\u65E5\u6162\u65C5\u884C\u201D\u201C\u91CD\u590D\u6263\u8D39\u9000\u6B3E\u201D\u30028) \u7EAF\u6587\u672C\uFF0C\u4E0D\u8981\u9879\u76EE\u7B26\u53F7\u3001\u7F16\u53F7\u3001markdown\u3001emoji\u3002\u6700\u7EC8\u53EA\u8FD4\u56DE\u6807\u9898\u6587\u672C\u3002 Output only the title text."
|
|
12360
|
-
};
|
|
12361
|
-
var BUILTIN_SUMMARY_LLM_CONFIG = {
|
|
12362
|
-
...BASE_BUILTIN_DIALOG_LLM_CONFIG,
|
|
12363
|
-
provider: "deepseek",
|
|
12364
|
-
id: "builtin-dialog-summary-llm",
|
|
12365
|
-
name: "Builtin Dialog Summary LLM",
|
|
12366
|
-
model: "deepseek-v4-pro",
|
|
12367
|
-
prompt: "\u4F60\u662F\u4E00\u4E2A\u4E13\u4E1A\u7684\u5BF9\u8BDD\u8BB0\u5FC6\u52A9\u7406\u3002\u8BF7\u57FA\u4E8E\u3010\u73B0\u6709\u8BB0\u5FC6\u3011\u548C\u3010\u65B0\u589E\u5BF9\u8BDD\u3011\uFF0C\u8F93\u51FA\u4E00\u4EFD\u66F4\u65B0\u540E\u7684\u5BF9\u8BDD\u8BB0\u5FC6\u6863\u6848\u3002\u4E25\u683C\u53EA\u8F93\u51FA\u4E0B\u9762\u4E24\u90E8\u5206\uFF0C\u6807\u9898\u5FC5\u987B\u5B8C\u5168\u4E00\u81F4\uFF1A\n\u5173\u952E\u4E8B\u5B9E\u6863\u6848\n- ...\n\u5BF9\u8BDD\u5267\u60C5\u6458\u8981\n- ...\n\u8981\u6C42\uFF1A1) \u4F7F\u7528\u5BF9\u8BDD\u4E3B\u8BED\u8A00\uFF1B\u6DF7\u5408\u8BED\u8A00\u65F6\u4F18\u5148\u8DDF\u968F\u7528\u6237\u4E3B\u8981\u8BED\u8A00\uFF0C\u4E13\u6709\u540D\u8BCD\u4FDD\u7559\u539F\u6587\u30022) \u5173\u952E\u4E8B\u5B9E\u6863\u6848\u53EA\u4FDD\u7559\u4E4B\u540E\u7EE7\u7EED\u5BF9\u8BDD\u4ECD\u6709\u4EF7\u503C\u7684\u4FE1\u606F\uFF0C\u4F8B\u5982\u7528\u6237\u504F\u597D\u3001\u76EE\u6807\u3001\u7EA6\u675F\u3001\u6280\u672F\u6808\u3001\u786E\u5B9A\u7684\u6587\u4EF6\u540D/\u53D8\u91CF\u540D\u3001\u6838\u5FC3\u51B3\u7B56\u3001\u5F85\u529E\u4E8B\u9879\u30023) \u5BF9\u8BDD\u5267\u60C5\u6458\u8981\u5148\u6781\u7B80\u6982\u62EC\u65E7\u4E0A\u4E0B\u6587\uFF0C\u518D\u66F4\u8BE6\u7EC6\u8BB0\u5F55\u6700\u8FD1\u65B0\u589E\u7684\u8FDB\u5C55\u3001\u5206\u6B67\u3001\u7ED3\u8BBA\u548C\u4E0B\u4E00\u6B65\u30024) \u5FFD\u7565\u5BD2\u6684\u3001\u91CD\u590D\u5C1D\u8BD5\u3001\u5DF2\u653E\u5F03\u65B9\u6848\u548C\u65E0\u4EF7\u503C\u5E9F\u8BDD\u30025) \u4E0D\u8981\u7F16\u9020\u672A\u51FA\u73B0\u7684\u4FE1\u606F\uFF0C\u4E0D\u8981\u8F93\u51FA\u5F00\u573A\u767D\u3001\u7ED3\u675F\u8BED\u3001markdown \u4EE3\u7801\u5757\u6216\u989D\u5916\u7AE0\u8282\u3002"
|
|
12368
|
-
};
|
|
12369
|
-
var buildBuiltinSummaryContent = (previousSummary, messagesText) => `
|
|
12370
|
-
\u3010\u73B0\u6709\u8BB0\u5FC6\u3011\uFF1A
|
|
12371
|
-
${previousSummary || "(\u65E0)"}
|
|
12372
|
-
|
|
12373
|
-
\u3010\u65B0\u589E\u5BF9\u8BDD\u3011\uFF1A
|
|
12374
|
-
${messagesText}
|
|
12375
|
-
`.trim();
|
|
12376
|
-
|
|
12377
12354
|
// packages/app/utils/imageUtils.ts
|
|
12378
12355
|
var import_browser_image_compression = __toESM(require_browser_image_compression());
|
|
12379
12356
|
var BYTES_PER_MB = 1024 * 1024;
|
|
@@ -12679,32 +12656,32 @@ var planContextUsage = (params) => {
|
|
|
12679
12656
|
const { contextWindow, summaryTokens, recentLoad } = params;
|
|
12680
12657
|
const safeWindowLimit = Math.floor(contextWindow * SAFE_BUFFER_RATIO);
|
|
12681
12658
|
const iq = CACHE_FIRST_RETENTION_STRENGTH;
|
|
12682
|
-
const
|
|
12683
|
-
const isSmallWindow = contextWindow <=
|
|
12659
|
+
const isLargeWindow = contextWindow >= 512e3;
|
|
12660
|
+
const isSmallWindow = contextWindow <= 64e3;
|
|
12684
12661
|
let baseHistoryRatio;
|
|
12685
|
-
if (
|
|
12662
|
+
if (isLargeWindow) {
|
|
12686
12663
|
baseHistoryRatio = 0.8 + 0.2 * iq;
|
|
12687
12664
|
} else if (isSmallWindow) {
|
|
12688
|
-
baseHistoryRatio = 0.35 + 0.
|
|
12665
|
+
baseHistoryRatio = 0.35 + 0.3 * iq;
|
|
12689
12666
|
} else {
|
|
12690
|
-
baseHistoryRatio = 0.
|
|
12667
|
+
baseHistoryRatio = 0.55 + 0.3 * iq;
|
|
12691
12668
|
}
|
|
12692
12669
|
let historyRatio = baseHistoryRatio;
|
|
12693
12670
|
switch (recentLoad) {
|
|
12694
12671
|
case "light": {
|
|
12695
|
-
const maxRatio =
|
|
12672
|
+
const maxRatio = isLargeWindow ? 1 : isSmallWindow ? 0.75 : 0.85;
|
|
12696
12673
|
historyRatio = clamp(historyRatio * 1.05, 0.3, maxRatio);
|
|
12697
12674
|
break;
|
|
12698
12675
|
}
|
|
12699
12676
|
case "heavy": {
|
|
12700
|
-
const maxRatio =
|
|
12701
|
-
const multiplier =
|
|
12677
|
+
const maxRatio = isLargeWindow ? 0.98 : isSmallWindow ? 0.7 : 0.8;
|
|
12678
|
+
const multiplier = isLargeWindow ? 0.98 : isSmallWindow ? 0.9 : 0.9;
|
|
12702
12679
|
historyRatio = clamp(historyRatio * multiplier, 0.3, maxRatio);
|
|
12703
12680
|
break;
|
|
12704
12681
|
}
|
|
12705
12682
|
case "medium":
|
|
12706
12683
|
default: {
|
|
12707
|
-
const maxRatio =
|
|
12684
|
+
const maxRatio = isLargeWindow ? 1 : isSmallWindow ? 0.75 : 0.85;
|
|
12708
12685
|
historyRatio = clamp(historyRatio, 0.3, maxRatio);
|
|
12709
12686
|
break;
|
|
12710
12687
|
}
|
|
@@ -12713,7 +12690,7 @@ var planContextUsage = (params) => {
|
|
|
12713
12690
|
0,
|
|
12714
12691
|
Math.floor(safeWindowLimit * historyRatio)
|
|
12715
12692
|
);
|
|
12716
|
-
const minRawRatio =
|
|
12693
|
+
const minRawRatio = isSmallWindow ? 0.5 : isLargeWindow ? 0.2 : 0.3;
|
|
12717
12694
|
const rawMessageBudget = Math.max(
|
|
12718
12695
|
Math.floor(historyBudget * minRawRatio),
|
|
12719
12696
|
historyBudget - summaryTokens,
|
|
@@ -12736,6 +12713,122 @@ var planContextUsage = (params) => {
|
|
|
12736
12713
|
return { historyBudget, rawMessageBudget, minTailTokens };
|
|
12737
12714
|
};
|
|
12738
12715
|
|
|
12716
|
+
// packages/ai/context/planCompression.ts
|
|
12717
|
+
var MIN_COMPRESS_COUNT = 5;
|
|
12718
|
+
var ACTIVE_SUMMARY_TAIL_KEEP_COUNT = 2;
|
|
12719
|
+
var getMessageTokenCount = (msg) => {
|
|
12720
|
+
if (msg.usage?.completion_tokens) {
|
|
12721
|
+
return msg.usage.completion_tokens;
|
|
12722
|
+
}
|
|
12723
|
+
const content = serializeMessageContent(msg.content) || "";
|
|
12724
|
+
return estimateTokenCount(content);
|
|
12725
|
+
};
|
|
12726
|
+
var hasOpenEndedToolCall = (msg) => !!msg && Array.isArray(msg.tool_calls) && msg.tool_calls.length > 0;
|
|
12727
|
+
var isActiveSummaryWorthDoing = (pendingTokens, contextWindow) => {
|
|
12728
|
+
const minTokens = Math.min(
|
|
12729
|
+
4e4,
|
|
12730
|
+
Math.max(1e4, Math.floor(contextWindow * 0.05))
|
|
12731
|
+
);
|
|
12732
|
+
return pendingTokens >= minTokens;
|
|
12733
|
+
};
|
|
12734
|
+
var classifyConversationLoad = (msgs) => {
|
|
12735
|
+
const N = 20;
|
|
12736
|
+
if (!Array.isArray(msgs) || msgs.length === 0) return "light";
|
|
12737
|
+
const tail = msgs.slice(-N);
|
|
12738
|
+
const tokenSamples = tail.map(getMessageTokenCount);
|
|
12739
|
+
if (tokenSamples.length === 0) return "light";
|
|
12740
|
+
const sum = tokenSamples.reduce((acc, v) => acc + v, 0);
|
|
12741
|
+
const avg = sum / tokenSamples.length;
|
|
12742
|
+
const sorted = [...tokenSamples].sort((a, b) => a - b);
|
|
12743
|
+
const p95 = sorted[Math.floor((sorted.length - 1) * 0.95)];
|
|
12744
|
+
if (p95 < 200 && avg < 120) {
|
|
12745
|
+
return "light";
|
|
12746
|
+
}
|
|
12747
|
+
if (p95 > 2e3 || avg > 1200) {
|
|
12748
|
+
return "heavy";
|
|
12749
|
+
}
|
|
12750
|
+
return "medium";
|
|
12751
|
+
};
|
|
12752
|
+
var emptyPlan = (startIndex) => ({
|
|
12753
|
+
shouldCompress: false,
|
|
12754
|
+
compressCount: 0,
|
|
12755
|
+
msgsToCompress: [],
|
|
12756
|
+
msgsToKeep: [],
|
|
12757
|
+
newSummarizedBeforeId: void 0,
|
|
12758
|
+
startIndex
|
|
12759
|
+
});
|
|
12760
|
+
function planCompression(input) {
|
|
12761
|
+
const {
|
|
12762
|
+
allMsgs,
|
|
12763
|
+
summarizedBeforeId,
|
|
12764
|
+
summary,
|
|
12765
|
+
contextWindow,
|
|
12766
|
+
force = false,
|
|
12767
|
+
reason
|
|
12768
|
+
} = input;
|
|
12769
|
+
let startIndex = 0;
|
|
12770
|
+
if (summarizedBeforeId) {
|
|
12771
|
+
const found = allMsgs.findIndex((m) => m.id === summarizedBeforeId);
|
|
12772
|
+
if (found !== -1) {
|
|
12773
|
+
startIndex = found + 1;
|
|
12774
|
+
}
|
|
12775
|
+
}
|
|
12776
|
+
const pendingMsgs = allMsgs.slice(startIndex);
|
|
12777
|
+
if (pendingMsgs.length === 0) {
|
|
12778
|
+
return emptyPlan(startIndex);
|
|
12779
|
+
}
|
|
12780
|
+
const summaryTokens = estimateTokenCount(summary || "");
|
|
12781
|
+
const pendingTokens = pendingMsgs.reduce(
|
|
12782
|
+
(sum, msg) => sum + getMessageTokenCount(msg),
|
|
12783
|
+
0
|
|
12784
|
+
);
|
|
12785
|
+
const totalUsed = summaryTokens + pendingTokens;
|
|
12786
|
+
const adjustedSummaryTokens = Math.max(summaryTokens, 1e3);
|
|
12787
|
+
const recentLoad = classifyConversationLoad(pendingMsgs);
|
|
12788
|
+
const { historyBudget, rawMessageBudget } = planContextUsage({
|
|
12789
|
+
contextWindow,
|
|
12790
|
+
summaryTokens: adjustedSummaryTokens,
|
|
12791
|
+
recentLoad
|
|
12792
|
+
});
|
|
12793
|
+
const shouldRunActiveSummary = force && reason === "manual" && !hasOpenEndedToolCall(pendingMsgs[pendingMsgs.length - 1]) && isActiveSummaryWorthDoing(pendingTokens, contextWindow);
|
|
12794
|
+
if (totalUsed < historyBudget && !shouldRunActiveSummary) {
|
|
12795
|
+
return emptyPlan(startIndex);
|
|
12796
|
+
}
|
|
12797
|
+
let tokensToKeep = 0;
|
|
12798
|
+
let keepCount = 0;
|
|
12799
|
+
for (let i = pendingMsgs.length - 1; i >= 0; i--) {
|
|
12800
|
+
const t2 = getMessageTokenCount(pendingMsgs[i]);
|
|
12801
|
+
if (tokensToKeep + t2 > rawMessageBudget) break;
|
|
12802
|
+
tokensToKeep += t2;
|
|
12803
|
+
keepCount++;
|
|
12804
|
+
}
|
|
12805
|
+
let compressCount = shouldRunActiveSummary && totalUsed < historyBudget ? Math.max(0, pendingMsgs.length - ACTIVE_SUMMARY_TAIL_KEEP_COUNT) : pendingMsgs.length - keepCount;
|
|
12806
|
+
while (compressCount > 0 && compressCount < pendingMsgs.length && pendingMsgs[compressCount].role === "tool") {
|
|
12807
|
+
compressCount--;
|
|
12808
|
+
}
|
|
12809
|
+
if (compressCount > 0) {
|
|
12810
|
+
const lastCompressed = pendingMsgs[compressCount - 1];
|
|
12811
|
+
const hasToolCalls = Array.isArray(lastCompressed.tool_calls) && lastCompressed.tool_calls.length > 0;
|
|
12812
|
+
if (hasToolCalls) {
|
|
12813
|
+
compressCount--;
|
|
12814
|
+
}
|
|
12815
|
+
}
|
|
12816
|
+
if (compressCount < MIN_COMPRESS_COUNT) {
|
|
12817
|
+
return emptyPlan(startIndex);
|
|
12818
|
+
}
|
|
12819
|
+
const msgsToCompress = pendingMsgs.slice(0, compressCount);
|
|
12820
|
+
const msgsToKeep = pendingMsgs.slice(compressCount);
|
|
12821
|
+
const newSummarizedBeforeId = msgsToCompress[msgsToCompress.length - 1].id;
|
|
12822
|
+
return {
|
|
12823
|
+
shouldCompress: true,
|
|
12824
|
+
compressCount,
|
|
12825
|
+
msgsToCompress,
|
|
12826
|
+
msgsToKeep,
|
|
12827
|
+
newSummarizedBeforeId,
|
|
12828
|
+
startIndex
|
|
12829
|
+
};
|
|
12830
|
+
}
|
|
12831
|
+
|
|
12739
12832
|
// packages/chat/messages/parseJsonRecord.ts
|
|
12740
12833
|
function asOptionalJsonRecord(value) {
|
|
12741
12834
|
if (typeof value === "string") {
|
|
@@ -12826,15 +12919,6 @@ var extractReferenceKeysFromMessage = (msg) => {
|
|
|
12826
12919
|
};
|
|
12827
12920
|
|
|
12828
12921
|
// packages/chat/dialog/actions/updateDialogSummaryAction.ts
|
|
12829
|
-
var MIN_COMPRESS_COUNT = 5;
|
|
12830
|
-
var ACTIVE_SUMMARY_TAIL_KEEP_COUNT = 2;
|
|
12831
|
-
var getMessageTokenCount = (msg) => {
|
|
12832
|
-
if (msg.usage?.completion_tokens) {
|
|
12833
|
-
return msg.usage.completion_tokens;
|
|
12834
|
-
}
|
|
12835
|
-
const content = serializeMessageContent(msg.content) || "";
|
|
12836
|
-
return estimateTokenCount(content);
|
|
12837
|
-
};
|
|
12838
12922
|
var getMessagesForDialogFromState = (state3, dialogId) => {
|
|
12839
12923
|
const msgsState = state3.message.dialogStateById[dialogId]?.msgs;
|
|
12840
12924
|
if (!msgsState || !msgsState.ids) return [];
|
|
@@ -12847,45 +12931,6 @@ var formatMessagesForSummary = (msgs) => msgs.map((m) => {
|
|
|
12847
12931
|
const content = serializeMessageContent(m.content) || "[\u975E\u6587\u672C\u5185\u5BB9]";
|
|
12848
12932
|
return `${m.role}: ${content}`;
|
|
12849
12933
|
}).join("\n");
|
|
12850
|
-
var findMessageIndexById = (msgs, id) => id ? msgs.findIndex((m) => m.id === id) : -1;
|
|
12851
|
-
var hasOpenEndedToolCall = (msg) => !!msg && Array.isArray(msg.tool_calls) && msg.tool_calls.length > 0;
|
|
12852
|
-
var buildPreviousSummaryWithProactive = (dialogConfig, shouldConsumeProactive) => {
|
|
12853
|
-
const base = dialogConfig.summary || "";
|
|
12854
|
-
const proactive = shouldConsumeProactive ? dialogConfig.proactiveSummary || "" : "";
|
|
12855
|
-
if (!base && !proactive) return "";
|
|
12856
|
-
if (!proactive) return base;
|
|
12857
|
-
if (!base) return `\u3010\u4E3B\u52A8\u5DE5\u4F5C\u6458\u8981\u3011
|
|
12858
|
-
${proactive}`;
|
|
12859
|
-
return `${base}
|
|
12860
|
-
|
|
12861
|
-
\u3010\u4E3B\u52A8\u5DE5\u4F5C\u6458\u8981\u3011
|
|
12862
|
-
${proactive}`;
|
|
12863
|
-
};
|
|
12864
|
-
var isActiveSummaryWorthDoing = (pendingTokens, contextWindow) => {
|
|
12865
|
-
const minTokens = Math.min(
|
|
12866
|
-
4e4,
|
|
12867
|
-
Math.max(1e4, Math.floor(contextWindow * 0.05))
|
|
12868
|
-
);
|
|
12869
|
-
return pendingTokens >= minTokens;
|
|
12870
|
-
};
|
|
12871
|
-
var classifyConversationLoad = (msgs) => {
|
|
12872
|
-
const N = 20;
|
|
12873
|
-
if (!Array.isArray(msgs) || msgs.length === 0) return "light";
|
|
12874
|
-
const tail = msgs.slice(-N);
|
|
12875
|
-
const tokenSamples = tail.map(getMessageTokenCount);
|
|
12876
|
-
if (tokenSamples.length === 0) return "light";
|
|
12877
|
-
const sum = tokenSamples.reduce((acc, v) => acc + v, 0);
|
|
12878
|
-
const avg = sum / tokenSamples.length;
|
|
12879
|
-
const sorted = [...tokenSamples].sort((a, b) => a - b);
|
|
12880
|
-
const p95 = sorted[Math.floor((sorted.length - 1) * 0.95)];
|
|
12881
|
-
if (p95 < 200 && avg < 120) {
|
|
12882
|
-
return "light";
|
|
12883
|
-
}
|
|
12884
|
-
if (p95 > 2e3 || avg > 1200) {
|
|
12885
|
-
return "heavy";
|
|
12886
|
-
}
|
|
12887
|
-
return "medium";
|
|
12888
|
-
};
|
|
12889
12934
|
var summarizingDialogs = /* @__PURE__ */ new Set();
|
|
12890
12935
|
var updateDialogSummaryAction = async (args, thunkApi) => {
|
|
12891
12936
|
const { dialogKey, preFetchedMessages, force = false } = args;
|
|
@@ -12906,69 +12951,23 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
|
|
|
12906
12951
|
}
|
|
12907
12952
|
}
|
|
12908
12953
|
const allMsgs = preFetchedMessages || getMessagesForDialogFromState(state3, dialogId);
|
|
12909
|
-
const
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
if (found !== -1) {
|
|
12914
|
-
startIndex = found + 1;
|
|
12915
|
-
}
|
|
12916
|
-
}
|
|
12917
|
-
const pendingMsgs = allMsgs.slice(startIndex);
|
|
12918
|
-
if (pendingMsgs.length === 0) return;
|
|
12919
|
-
const summaryTokens = estimateTokenCount(dialogConfig.summary || "");
|
|
12920
|
-
const pendingTokens = pendingMsgs.reduce((sum, msg) => sum + getMessageTokenCount(msg), 0);
|
|
12921
|
-
const totalUsed = summaryTokens + pendingTokens;
|
|
12922
|
-
const adjustedSummaryTokens = Math.max(summaryTokens, 1e3);
|
|
12923
|
-
const recentLoad = classifyConversationLoad(pendingMsgs);
|
|
12924
|
-
const { historyBudget, rawMessageBudget } = planContextUsage({
|
|
12954
|
+
const plan = planCompression({
|
|
12955
|
+
allMsgs,
|
|
12956
|
+
summarizedBeforeId: dialogConfig.summarizedBeforeId,
|
|
12957
|
+
summary: dialogConfig.summary || "",
|
|
12925
12958
|
contextWindow,
|
|
12926
|
-
|
|
12927
|
-
|
|
12959
|
+
force,
|
|
12960
|
+
reason: args.reason
|
|
12928
12961
|
});
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
return;
|
|
12932
|
-
}
|
|
12933
|
-
let tokensToKeep = 0;
|
|
12934
|
-
let keepCount = 0;
|
|
12935
|
-
for (let i = pendingMsgs.length - 1; i >= 0; i--) {
|
|
12936
|
-
const t2 = getMessageTokenCount(pendingMsgs[i]);
|
|
12937
|
-
if (tokensToKeep + t2 > rawMessageBudget) break;
|
|
12938
|
-
tokensToKeep += t2;
|
|
12939
|
-
keepCount++;
|
|
12940
|
-
}
|
|
12941
|
-
let compressCount = shouldRunActiveSummary && totalUsed < historyBudget ? Math.max(0, pendingMsgs.length - ACTIVE_SUMMARY_TAIL_KEEP_COUNT) : pendingMsgs.length - keepCount;
|
|
12942
|
-
while (compressCount > 0 && compressCount < pendingMsgs.length && pendingMsgs[compressCount].role === "tool") {
|
|
12943
|
-
compressCount--;
|
|
12944
|
-
}
|
|
12945
|
-
if (compressCount > 0) {
|
|
12946
|
-
const lastCompressed = pendingMsgs[compressCount - 1];
|
|
12947
|
-
const hasToolCalls = Array.isArray(lastCompressed.tool_calls) && lastCompressed.tool_calls.length > 0;
|
|
12948
|
-
if (hasToolCalls) {
|
|
12949
|
-
compressCount--;
|
|
12950
|
-
}
|
|
12951
|
-
}
|
|
12952
|
-
if (compressCount < MIN_COMPRESS_COUNT) {
|
|
12953
|
-
return;
|
|
12954
|
-
}
|
|
12955
|
-
const msgsToCompress = pendingMsgs.slice(0, compressCount);
|
|
12956
|
-
const newSummarizedBeforeId = msgsToCompress[msgsToCompress.length - 1].id;
|
|
12962
|
+
if (!plan.shouldCompress) return;
|
|
12963
|
+
const { msgsToCompress, newSummarizedBeforeId } = plan;
|
|
12957
12964
|
const extractedKeys = new Set(dialogConfig.referenceKeys || []);
|
|
12958
12965
|
for (const msg of msgsToCompress) {
|
|
12959
12966
|
for (const key of extractReferenceKeysFromMessage(msg)) {
|
|
12960
12967
|
extractedKeys.add(key);
|
|
12961
12968
|
}
|
|
12962
12969
|
}
|
|
12963
|
-
const
|
|
12964
|
-
allMsgs,
|
|
12965
|
-
dialogConfig.proactiveSummaryBeforeId
|
|
12966
|
-
);
|
|
12967
|
-
const shouldConsumeProactive = !!dialogConfig.proactiveSummary && proactiveBeforeIndex !== -1 && proactiveBeforeIndex < startIndex + compressCount;
|
|
12968
|
-
const previousSummary = buildPreviousSummaryWithProactive(
|
|
12969
|
-
dialogConfig,
|
|
12970
|
-
shouldConsumeProactive
|
|
12971
|
-
);
|
|
12970
|
+
const previousSummary = dialogConfig.summary || "";
|
|
12972
12971
|
const messagesText = formatMessagesForSummary(msgsToCompress);
|
|
12973
12972
|
const promptContent = buildBuiltinSummaryContent(
|
|
12974
12973
|
previousSummary,
|
|
@@ -12992,16 +12991,12 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
|
|
|
12992
12991
|
summarizedBeforeId: newSummarizedBeforeId,
|
|
12993
12992
|
referenceKeys: Array.from(extractedKeys),
|
|
12994
12993
|
compressionCount: currentCount + 1,
|
|
12995
|
-
summaryPending: false
|
|
12994
|
+
summaryPending: false
|
|
12996
12995
|
// Explicitly clear pending flag
|
|
12997
|
-
...shouldConsumeProactive ? {
|
|
12998
|
-
proactiveSummary: "",
|
|
12999
|
-
proactiveSummaryBeforeId: void 0
|
|
13000
|
-
} : {}
|
|
13001
12996
|
}
|
|
13002
12997
|
})
|
|
13003
12998
|
).unwrap();
|
|
13004
|
-
console.log(`[ContextCompression] Compressed ${compressCount} messages. New summary len: ${newSummary.length}`);
|
|
12999
|
+
console.log(`[ContextCompression] Compressed ${plan.compressCount} messages. New summary len: ${newSummary.length}`);
|
|
13005
13000
|
}
|
|
13006
13001
|
} catch (err) {
|
|
13007
13002
|
console.error("[ContextCompression] Failed:", err);
|
|
@@ -14039,7 +14034,7 @@ async function captureUnderstandingFromCompletedUiTurn(input) {
|
|
|
14039
14034
|
if (!input.agentKey) return;
|
|
14040
14035
|
const latestUserInput = getLatestUserInputFromMessages(input.messages);
|
|
14041
14036
|
if (!latestUserInput) return;
|
|
14042
|
-
const { captureUnderstandingMemoryFromDialog } = await import("./understanding-
|
|
14037
|
+
const { captureUnderstandingMemoryFromDialog } = await import("./understanding-YH4X3XU6.js");
|
|
14043
14038
|
await captureUnderstandingMemoryFromDialog({
|
|
14044
14039
|
db: input.db,
|
|
14045
14040
|
userId: selectIdentityUserId(input.state),
|
|
@@ -14949,9 +14944,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
14949
14944
|
dbKey: dialogKey,
|
|
14950
14945
|
changes: {
|
|
14951
14946
|
summary: null,
|
|
14952
|
-
summarizedBeforeId: null
|
|
14953
|
-
proactiveSummary: null,
|
|
14954
|
-
proactiveSummaryBeforeId: null
|
|
14947
|
+
summarizedBeforeId: null
|
|
14955
14948
|
}
|
|
14956
14949
|
})
|
|
14957
14950
|
).unwrap();
|
|
@@ -14966,7 +14959,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
14966
14959
|
runtimeOptions: args.runtimeOptions
|
|
14967
14960
|
});
|
|
14968
14961
|
if (agentKeyToUse) {
|
|
14969
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
14962
|
+
const { streamAgentChatTurn } = await import("./agentSlice-IIC7AISR.js");
|
|
14970
14963
|
await dispatch(
|
|
14971
14964
|
streamAgentChatTurn({
|
|
14972
14965
|
agentKey: agentKeyToUse,
|
|
@@ -17574,7 +17567,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
17574
17567
|
}
|
|
17575
17568
|
if (isCurrentDialog) {
|
|
17576
17569
|
await thunkApi.dispatch(resetMsgs());
|
|
17577
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
17570
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-5KZA46HM.js");
|
|
17578
17571
|
dispatch(clearPendingAttachments2());
|
|
17579
17572
|
clearWorkflow();
|
|
17580
17573
|
}
|
|
@@ -17583,35 +17576,35 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
17583
17576
|
|
|
17584
17577
|
// packages/chat/dialog/dialogSlice.ts
|
|
17585
17578
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
17586
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
17579
|
+
const { createDialogAction } = await import("./createDialogAction-Q4ISCARO.js");
|
|
17587
17580
|
return createDialogAction(args, thunkApi);
|
|
17588
17581
|
};
|
|
17589
17582
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
17590
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
17583
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-GNRYFKTT.js");
|
|
17591
17584
|
return createAgentAutomationAction(args, thunkApi);
|
|
17592
17585
|
};
|
|
17593
17586
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
17594
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
17587
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-CKLNP73H.js");
|
|
17595
17588
|
return updateDialogTitleAction(args, thunkApi);
|
|
17596
17589
|
};
|
|
17597
17590
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
17598
|
-
const { addDialogAgentAction } = await import("./addDialogAgentAction-
|
|
17591
|
+
const { addDialogAgentAction } = await import("./addDialogAgentAction-ULADQX2Q.js");
|
|
17599
17592
|
return addDialogAgentAction(args, thunkApi);
|
|
17600
17593
|
};
|
|
17601
17594
|
var runRemoveDialogAgentAction = async (args, thunkApi) => {
|
|
17602
|
-
const { removeDialogAgentAction } = await import("./removeDialogAgentAction-
|
|
17595
|
+
const { removeDialogAgentAction } = await import("./removeDialogAgentAction-3MUQGFZX.js");
|
|
17603
17596
|
return removeDialogAgentAction(args, thunkApi);
|
|
17604
17597
|
};
|
|
17605
17598
|
var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
|
|
17606
|
-
const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-
|
|
17599
|
+
const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-7DLDZHDT.js");
|
|
17607
17600
|
return setPrimaryDialogAgentAction(args, thunkApi);
|
|
17608
17601
|
};
|
|
17609
17602
|
var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
17610
|
-
const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-
|
|
17603
|
+
const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-MXHX2HPK.js");
|
|
17611
17604
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
17612
17605
|
};
|
|
17613
17606
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
17614
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
17607
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-SEV4YIPL.js");
|
|
17615
17608
|
return handleSendMessageAction(args, thunkApi);
|
|
17616
17609
|
};
|
|
17617
17610
|
function clearDialogState() {
|
|
@@ -17624,7 +17617,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
17624
17617
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
17625
17618
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
17626
17619
|
try {
|
|
17627
|
-
const { createDocState } = await import("./docStore-
|
|
17620
|
+
const { createDocState } = await import("./docStore-M7K7QFVS.js");
|
|
17628
17621
|
const pageKey = await createDocState(
|
|
17629
17622
|
{ slateData, title },
|
|
17630
17623
|
{ dispatch, getState }
|
|
@@ -23764,7 +23757,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
|
|
|
23764
23757
|
const spaceKey = createSpaceKey.space(spaceId);
|
|
23765
23758
|
const readSpace = async (dbKey) => {
|
|
23766
23759
|
try {
|
|
23767
|
-
const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-
|
|
23760
|
+
const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-TO2TSMWM.js");
|
|
23768
23761
|
if (fresh) {
|
|
23769
23762
|
return await dispatch(readAndWait2(dbKey)).unwrap();
|
|
23770
23763
|
}
|
|
@@ -24554,7 +24547,6 @@ var selectViewMode = createSelector(
|
|
|
24554
24547
|
var spaceSlice_default = spaceSlice.reducer;
|
|
24555
24548
|
|
|
24556
24549
|
export {
|
|
24557
|
-
BUILTIN_TITLE_LLM_CONFIG,
|
|
24558
24550
|
instance,
|
|
24559
24551
|
initReactI18next,
|
|
24560
24552
|
i18nBaseConfig,
|
|
@@ -24562,10 +24554,12 @@ export {
|
|
|
24562
24554
|
fetchAndCacheMessages,
|
|
24563
24555
|
buildDatabaseFileContentUrl,
|
|
24564
24556
|
serializeMessageContent,
|
|
24557
|
+
DEFAULT_CONTEXT_WINDOW,
|
|
24565
24558
|
getModelContextWindow,
|
|
24566
24559
|
getModelInfo,
|
|
24567
24560
|
estimateTokenCount,
|
|
24568
24561
|
planContextUsage,
|
|
24562
|
+
planCompression,
|
|
24569
24563
|
extractReferenceKeysFromMessage,
|
|
24570
24564
|
normalizeAppRouteId,
|
|
24571
24565
|
uiAskChoiceFunctionSchema,
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRS4MX3R.js";
|
|
4
|
+
import "./chunk-4ZDM73SD.js";
|
|
4
5
|
import "./chunk-MRC4Q34M.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-PCWC3JTN.js";
|
|
6
7
|
import "./chunk-CWMSB67P.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-DAB7DRXD.js";
|
|
9
|
+
import "./chunk-6A3LI5TZ.js";
|
|
9
10
|
import "./chunk-Z4NR32XR.js";
|
|
10
11
|
import "./chunk-M76ECQRD.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-YYUCRDOK.js";
|
|
13
|
+
import "./chunk-ZDXZSXYQ.js";
|
|
13
14
|
import "./chunk-UAD2WT54.js";
|
|
14
15
|
import "./chunk-USZMK5UT.js";
|
|
15
16
|
import "./chunk-5MMAK75Q.js";
|
|
16
17
|
import "./chunk-572EKYLF.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5CS33IBL.js";
|
|
18
19
|
import "./chunk-JZPBVBIY.js";
|
|
19
20
|
import "./chunk-BR2WP3DF.js";
|
|
20
21
|
import "./chunk-DFFIZ25G.js";
|
|
21
22
|
import "./chunk-3ASDTTEI.js";
|
|
22
23
|
import "./chunk-DWLEOOGR.js";
|
|
23
24
|
import "./chunk-HNMXYYJR.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-6CBN7GGH.js";
|
|
25
26
|
import "./chunk-Y5GCAMGP.js";
|
|
26
27
|
import {
|
|
27
28
|
write
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-V2AISYMA.js";
|
|
29
30
|
import "./chunk-AZPCASRE.js";
|
|
30
31
|
import "./chunk-2EISRLRC.js";
|
|
31
32
|
import "./chunk-KX6YBIHG.js";
|
|
@@ -33,7 +34,8 @@ import {
|
|
|
33
34
|
buildAgentAutomationOwnerIndexValue,
|
|
34
35
|
createAgentAutomationKey,
|
|
35
36
|
createAgentAutomationOwnerIndexKey
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-SH2CFQOH.js";
|
|
38
|
+
import "./chunk-I42VC5KR.js";
|
|
37
39
|
import "./chunk-WWC7I6TA.js";
|
|
38
40
|
import "./chunk-QSJ3HFEF.js";
|
|
39
41
|
import "./chunk-ELRRLDWI.js";
|