nolo-cli 0.12.0-alpha.3 → 0.12.0-alpha.4
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-DYX65HE6.js → _executeModel-L4JM5R23.js} +10 -10
- package/{agentEmailCommands-4EWEJIW3.js → agentEmailCommands-32ZZ4VSU.js} +9 -9
- package/{agentMachineCommands-23GPUVUG.js → agentMachineCommands-EHFBWQ2U.js} +3 -3
- package/{agentRecordCommands-5MST6OCG.js → agentRecordCommands-DSMDSFMJ.js} +9 -9
- package/{agentRunCommand-ZZCK5KS5.js → agentRunCommand-MEVHCOMH.js} +9 -9
- package/{agentSlice-5M6DF3VW.js → agentSlice-Y3NABOKT.js} +1 -1
- package/{chunk-SG4IHGHL.js → chunk-324SDMXK.js} +1 -1
- package/{chunk-3Q64BA2C.js → chunk-74D2NYOA.js} +3 -3
- package/{chunk-APQE7WBO.js → chunk-A4QALINN.js} +1 -1
- package/{chunk-OPHV7MFH.js → chunk-B54KNGXI.js} +2 -2
- package/{chunk-2VKA626C.js → chunk-DFGCBRIA.js} +11 -6
- package/{chunk-S4G3EZ3V.js → chunk-FMT767NK.js} +8 -8
- package/{chunk-Q37VOO7A.js → chunk-G5S6HMHH.js} +5 -5
- package/{chunk-OQIFEHJ3.js → chunk-MCXQFHBX.js} +11 -7
- package/{chunk-RSEUHW6T.js → chunk-MQRZ5QUH.js} +1 -1
- package/{chunk-7NGAIE2Y.js → chunk-QY4QCWDL.js} +2 -2
- package/{chunk-YDCZVUFP.js → chunk-RQSOAMPJ.js} +16 -0
- package/{chunk-XIOEEGEC.js → chunk-TNQJQ6HM.js} +13 -7
- package/{chunk-MHB7ECF2.js → chunk-TVQEB7RV.js} +1 -1
- package/{chunk-QZOLL5LS.js → chunk-TZS6YZTS.js} +13 -9
- package/{chunk-JK757FQM.js → chunk-YC2MRILU.js} +1 -1
- package/{createAgentAutomationAction-2Y6J7DVC.js → createAgentAutomationAction-YWC4P6JX.js} +2 -2
- package/{createDialogAction-HZR3DAFH.js → createDialogAction-IQP745JA.js} +3 -3
- package/{createPageAction-WIKKXHEK.js → createPageAction-T4RZCJKF.js} +2 -2
- package/{dialogSlice-FFRARUSK.js → dialogSlice-QR7SDOEV.js} +2 -2
- package/{docStore-7JP3KJMP.js → docStore-Y43RC35L.js} +3 -3
- package/{handleSendMessageAction-RTW7SKG4.js → handleSendMessageAction-L7L463O4.js} +2 -2
- package/index.js +15 -15
- package/{machineCommands-YA4W37PB.js → machineCommands-KJZXH2FO.js} +10 -10
- package/{machineWsRunDispatch-WEL6YC2V.js → machineWsRunDispatch-V4HBAZY6.js} +9 -9
- package/package.json +1 -1
- package/{readlineWorkspace-4L25GLAW.js → readlineWorkspace-LRPVHBM3.js} +18 -9
- package/{runAgentClientLoop-OJWWFGUK.js → runAgentClientLoop-DXNOTYXP.js} +8 -8
- package/{spaceSlice-2IORSGIG.js → spaceSlice-PSAREO5S.js} +2 -2
- package/{streamAgentChatTurn-EZ2HPJK6.js → streamAgentChatTurn-54CNCH2V.js} +205 -11
- package/{tools-QZNJVUVP.js → tools-SIU3JFHL.js} +6 -6
- package/{updateDialogTitleAction-HRVW3WRJ.js → updateDialogTitleAction-3VT7R3GN.js} +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAgentContexts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TVQEB7RV.js";
|
|
4
4
|
import {
|
|
5
5
|
filterAndCleanMessages,
|
|
6
6
|
sendOpenAICompletionsRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G5S6HMHH.js";
|
|
8
8
|
import "./chunk-JEXVIMYZ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-YC2MRILU.js";
|
|
10
10
|
import {
|
|
11
11
|
generateRequestBody,
|
|
12
12
|
mergeReferences,
|
|
13
13
|
performFetchRequest
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DFGCBRIA.js";
|
|
15
15
|
import "./chunk-4GBNEA5B.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-TZS6YZTS.js";
|
|
17
|
+
import "./chunk-RQSOAMPJ.js";
|
|
18
18
|
import "./chunk-OOIN7HSO.js";
|
|
19
19
|
import "./chunk-KQHGZWSV.js";
|
|
20
20
|
import "./chunk-VIDPVFP3.js";
|
|
@@ -23,19 +23,19 @@ import "./chunk-3LY4F7SV.js";
|
|
|
23
23
|
import "./chunk-VP4WJWKW.js";
|
|
24
24
|
import "./chunk-63W5N6P3.js";
|
|
25
25
|
import "./chunk-VF4K2QE6.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-QY4QCWDL.js";
|
|
27
|
+
import "./chunk-324SDMXK.js";
|
|
28
28
|
import "./chunk-VC6OZXO5.js";
|
|
29
29
|
import {
|
|
30
30
|
selectAllMsgs,
|
|
31
31
|
selectCurrentDialogConfig,
|
|
32
32
|
updateTokensAction
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FMT767NK.js";
|
|
34
34
|
import "./chunk-V2J635L5.js";
|
|
35
35
|
import "./chunk-MRC4Q34M.js";
|
|
36
36
|
import "./chunk-MTU75CZ2.js";
|
|
37
37
|
import "./chunk-CWMSB67P.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-74D2NYOA.js";
|
|
39
39
|
import "./chunk-6LMFFG3K.js";
|
|
40
40
|
import "./chunk-Z4NR32XR.js";
|
|
41
41
|
import "./chunk-M76ECQRD.js";
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./chunk-3QAF2LTL.js";
|
|
9
9
|
import {
|
|
10
10
|
runAgentCreateCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-A4QALINN.js";
|
|
12
|
+
import "./chunk-MCXQFHBX.js";
|
|
13
13
|
import "./chunk-TOILAPLH.js";
|
|
14
14
|
import "./chunk-CMKUBIGW.js";
|
|
15
15
|
import "./chunk-JBTJAPUF.js";
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
} from "./chunk-VHBWHNVT.js";
|
|
27
27
|
import "./chunk-UG3WOFU6.js";
|
|
28
28
|
import "./chunk-ATNTHIZI.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-YC2MRILU.js";
|
|
30
30
|
import "./chunk-4GBNEA5B.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-TZS6YZTS.js";
|
|
32
|
+
import "./chunk-RQSOAMPJ.js";
|
|
33
33
|
import "./chunk-OOIN7HSO.js";
|
|
34
34
|
import "./chunk-KQHGZWSV.js";
|
|
35
35
|
import "./chunk-IVAOVLM7.js";
|
|
@@ -37,16 +37,16 @@ import "./chunk-3LY4F7SV.js";
|
|
|
37
37
|
import "./chunk-VP4WJWKW.js";
|
|
38
38
|
import "./chunk-63W5N6P3.js";
|
|
39
39
|
import "./chunk-VF4K2QE6.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-QY4QCWDL.js";
|
|
41
|
+
import "./chunk-324SDMXK.js";
|
|
42
42
|
import "./chunk-VC6OZXO5.js";
|
|
43
43
|
import "./chunk-OWOHNGCN.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-FMT767NK.js";
|
|
45
45
|
import "./chunk-V2J635L5.js";
|
|
46
46
|
import "./chunk-MRC4Q34M.js";
|
|
47
47
|
import "./chunk-MTU75CZ2.js";
|
|
48
48
|
import "./chunk-CWMSB67P.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-74D2NYOA.js";
|
|
50
50
|
import "./chunk-6LMFFG3K.js";
|
|
51
51
|
import "./chunk-Z4NR32XR.js";
|
|
52
52
|
import "./chunk-M76ECQRD.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveConnectorWebSocketTarget
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MQRZ5QUH.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-W4NVOSFF.js";
|
|
@@ -13,7 +13,7 @@ import "./chunk-XRFEX5ZP.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveCliAgentKeyInput
|
|
15
15
|
} from "./chunk-VHBWHNVT.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-RQSOAMPJ.js";
|
|
17
17
|
import "./chunk-RNYKVIND.js";
|
|
18
18
|
import "./chunk-ZNFJWEN4.js";
|
|
19
19
|
import "./chunk-ZR4VHQ5D.js";
|
|
@@ -75,7 +75,7 @@ async function defaultExecuteCli(provider, prompt, options) {
|
|
|
75
75
|
return executeCli(provider, prompt, options);
|
|
76
76
|
}
|
|
77
77
|
async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
|
|
78
|
-
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-
|
|
78
|
+
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-V4HBAZY6.js");
|
|
79
79
|
return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
|
|
80
80
|
}
|
|
81
81
|
async function detectLaunchableMachineInfo() {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
runAgentCreateCommand,
|
|
3
3
|
runAgentReadCommand,
|
|
4
4
|
runAgentUpdateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-A4QALINN.js";
|
|
6
|
+
import "./chunk-MCXQFHBX.js";
|
|
7
7
|
import "./chunk-TOILAPLH.js";
|
|
8
8
|
import "./chunk-CMKUBIGW.js";
|
|
9
9
|
import "./chunk-JBTJAPUF.js";
|
|
@@ -13,10 +13,10 @@ import "./chunk-XRFEX5ZP.js";
|
|
|
13
13
|
import "./chunk-VHBWHNVT.js";
|
|
14
14
|
import "./chunk-UG3WOFU6.js";
|
|
15
15
|
import "./chunk-ATNTHIZI.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-YC2MRILU.js";
|
|
17
17
|
import "./chunk-4GBNEA5B.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TZS6YZTS.js";
|
|
19
|
+
import "./chunk-RQSOAMPJ.js";
|
|
20
20
|
import "./chunk-OOIN7HSO.js";
|
|
21
21
|
import "./chunk-KQHGZWSV.js";
|
|
22
22
|
import "./chunk-IVAOVLM7.js";
|
|
@@ -24,16 +24,16 @@ import "./chunk-3LY4F7SV.js";
|
|
|
24
24
|
import "./chunk-VP4WJWKW.js";
|
|
25
25
|
import "./chunk-63W5N6P3.js";
|
|
26
26
|
import "./chunk-VF4K2QE6.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-QY4QCWDL.js";
|
|
28
|
+
import "./chunk-324SDMXK.js";
|
|
29
29
|
import "./chunk-VC6OZXO5.js";
|
|
30
30
|
import "./chunk-OWOHNGCN.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-FMT767NK.js";
|
|
32
32
|
import "./chunk-V2J635L5.js";
|
|
33
33
|
import "./chunk-MRC4Q34M.js";
|
|
34
34
|
import "./chunk-MTU75CZ2.js";
|
|
35
35
|
import "./chunk-CWMSB67P.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-74D2NYOA.js";
|
|
37
37
|
import "./chunk-6LMFFG3K.js";
|
|
38
38
|
import "./chunk-Z4NR32XR.js";
|
|
39
39
|
import "./chunk-M76ECQRD.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
prependSubjectDialogMarker,
|
|
7
7
|
resolveWorkflowReference,
|
|
8
8
|
runAgentRunCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TNQJQ6HM.js";
|
|
10
10
|
import {
|
|
11
11
|
parseAgentRunArgs
|
|
12
12
|
} from "./chunk-3QAF2LTL.js";
|
|
13
13
|
import "./chunk-6HYVJV7B.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-MCXQFHBX.js";
|
|
15
15
|
import "./chunk-TOILAPLH.js";
|
|
16
16
|
import "./chunk-CMKUBIGW.js";
|
|
17
17
|
import "./chunk-JBTJAPUF.js";
|
|
@@ -23,10 +23,10 @@ import "./chunk-LTRXGFMS.js";
|
|
|
23
23
|
import "./chunk-UG3WOFU6.js";
|
|
24
24
|
import "./chunk-ATNTHIZI.js";
|
|
25
25
|
import "./chunk-JEXVIMYZ.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-YC2MRILU.js";
|
|
27
27
|
import "./chunk-4GBNEA5B.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-TZS6YZTS.js";
|
|
29
|
+
import "./chunk-RQSOAMPJ.js";
|
|
30
30
|
import "./chunk-OOIN7HSO.js";
|
|
31
31
|
import "./chunk-KQHGZWSV.js";
|
|
32
32
|
import "./chunk-IVAOVLM7.js";
|
|
@@ -34,16 +34,16 @@ import "./chunk-3LY4F7SV.js";
|
|
|
34
34
|
import "./chunk-VP4WJWKW.js";
|
|
35
35
|
import "./chunk-63W5N6P3.js";
|
|
36
36
|
import "./chunk-VF4K2QE6.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-QY4QCWDL.js";
|
|
38
|
+
import "./chunk-324SDMXK.js";
|
|
39
39
|
import "./chunk-VC6OZXO5.js";
|
|
40
40
|
import "./chunk-OWOHNGCN.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-FMT767NK.js";
|
|
42
42
|
import "./chunk-V2J635L5.js";
|
|
43
43
|
import "./chunk-MRC4Q34M.js";
|
|
44
44
|
import "./chunk-MTU75CZ2.js";
|
|
45
45
|
import "./chunk-CWMSB67P.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-74D2NYOA.js";
|
|
47
47
|
import "./chunk-6LMFFG3K.js";
|
|
48
48
|
import "./chunk-Z4NR32XR.js";
|
|
49
49
|
import "./chunk-M76ECQRD.js";
|
|
@@ -300,7 +300,7 @@ var slice = createSliceWithThunks({
|
|
|
300
300
|
const overrides = {};
|
|
301
301
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
302
302
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
303
|
-
const { _executeModel } = await import("./_executeModel-
|
|
303
|
+
const { _executeModel } = await import("./_executeModel-L4JM5R23.js");
|
|
304
304
|
return _executeModel(
|
|
305
305
|
{
|
|
306
306
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -321,7 +321,7 @@ var slice = createSliceWithThunks({
|
|
|
321
321
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
322
322
|
*/
|
|
323
323
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
324
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
324
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-DXNOTYXP.js");
|
|
325
325
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
326
326
|
{
|
|
327
327
|
agentKey: args.agentKey,
|
|
@@ -337,7 +337,7 @@ var slice = createSliceWithThunks({
|
|
|
337
337
|
* 聊天轮次流式 Agent 调用
|
|
338
338
|
*/
|
|
339
339
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
340
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
340
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-54CNCH2V.js");
|
|
341
341
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
342
342
|
}),
|
|
343
343
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MCXQFHBX.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TZS6YZTS.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
10
|
} from "./chunk-JCU2JDCV.js";
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
clipMultilineText,
|
|
7
7
|
fetchAndSerializeTable,
|
|
8
8
|
waitForAbortableDelay
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TZS6YZTS.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
createDrainExhaustedResponse,
|
|
12
|
+
isCoreDrainingBody,
|
|
12
13
|
isGatewayHttpStatus,
|
|
13
14
|
normalizeNonNegativeMs,
|
|
14
15
|
parseRetryAfterHeaderMs
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RQSOAMPJ.js";
|
|
16
17
|
import {
|
|
17
18
|
slateToSimplifiedMarkdown
|
|
18
19
|
} from "./chunk-IVAOVLM7.js";
|
|
@@ -25,10 +26,10 @@ import {
|
|
|
25
26
|
import {
|
|
26
27
|
fetchAndCacheMessages,
|
|
27
28
|
shouldUseServerProxy
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-FMT767NK.js";
|
|
29
30
|
import {
|
|
30
31
|
fetchServerSyncedCredential
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-74D2NYOA.js";
|
|
32
33
|
import {
|
|
33
34
|
buildCurrentTimeBlock,
|
|
34
35
|
buildIdentityBlock,
|
|
@@ -1521,7 +1522,7 @@ var performServerProxyFetchWithRetry = async ({
|
|
|
1521
1522
|
try {
|
|
1522
1523
|
const response = await execute();
|
|
1523
1524
|
const responseBody = response.status === 503 ? await readRetryableResponseBody(response) : null;
|
|
1524
|
-
const isCoreDraining = response.status === 503 && responseBody
|
|
1525
|
+
const isCoreDraining = response.status === 503 && isCoreDrainingBody(responseBody);
|
|
1525
1526
|
const maxStatusRetries = isCoreDraining ? MAX_SERVER_DRAIN_STATUS_RETRIES : MAX_STATUS_RETRIES;
|
|
1526
1527
|
if (statusRetries < maxStatusRetries && isGatewayHttpStatus(response.status)) {
|
|
1527
1528
|
statusRetries += 1;
|
|
@@ -1535,6 +1536,10 @@ var performServerProxyFetchWithRetry = async ({
|
|
|
1535
1536
|
await waitForServerProxyRetry(retryAfterMs, signal);
|
|
1536
1537
|
continue;
|
|
1537
1538
|
}
|
|
1539
|
+
if (isCoreDraining) {
|
|
1540
|
+
console.warn(`${logPrefix} core_draining \u91CD\u8BD5\u8017\u5C3D\uFF0C\u8FD4\u56DE\u53CB\u597D\u63D0\u793A`);
|
|
1541
|
+
return createDrainExhaustedResponse(response);
|
|
1542
|
+
}
|
|
1538
1543
|
return response;
|
|
1539
1544
|
} catch (error) {
|
|
1540
1545
|
if (networkRetries < MAX_SERVER_PROXY_RETRIES && isRetryableServerProxyFetchError(error)) {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
deleteServerSyncedCredential,
|
|
17
17
|
runLlm
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-74D2NYOA.js";
|
|
19
19
|
import {
|
|
20
20
|
cleanupCliSessionForDialog
|
|
21
21
|
} from "./chunk-6LMFFG3K.js";
|
|
@@ -10484,7 +10484,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
10484
10484
|
runtimeOptions: args.runtimeOptions
|
|
10485
10485
|
});
|
|
10486
10486
|
if (agentKeyToUse) {
|
|
10487
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
10487
|
+
const { streamAgentChatTurn } = await import("./agentSlice-Y3NABOKT.js");
|
|
10488
10488
|
await dispatch(
|
|
10489
10489
|
streamAgentChatTurn({
|
|
10490
10490
|
agentKey: agentKeyToUse,
|
|
@@ -13195,7 +13195,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13195
13195
|
}
|
|
13196
13196
|
if (isCurrentDialog) {
|
|
13197
13197
|
await thunkApi.dispatch(resetMsgs());
|
|
13198
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
13198
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-QR7SDOEV.js");
|
|
13199
13199
|
dispatch(clearPendingAttachments2());
|
|
13200
13200
|
clearWorkflow();
|
|
13201
13201
|
}
|
|
@@ -13204,15 +13204,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13204
13204
|
|
|
13205
13205
|
// packages/chat/dialog/dialogSlice.ts
|
|
13206
13206
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
13207
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
13207
|
+
const { createDialogAction } = await import("./createDialogAction-IQP745JA.js");
|
|
13208
13208
|
return createDialogAction(args, thunkApi);
|
|
13209
13209
|
};
|
|
13210
13210
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
13211
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
13211
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-YWC4P6JX.js");
|
|
13212
13212
|
return createAgentAutomationAction(args, thunkApi);
|
|
13213
13213
|
};
|
|
13214
13214
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
13215
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
13215
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-3VT7R3GN.js");
|
|
13216
13216
|
return updateDialogTitleAction(args, thunkApi);
|
|
13217
13217
|
};
|
|
13218
13218
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -13232,7 +13232,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
13232
13232
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
13233
13233
|
};
|
|
13234
13234
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
13235
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
13235
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-L7L463O4.js");
|
|
13236
13236
|
return handleSendMessageAction(args, thunkApi);
|
|
13237
13237
|
};
|
|
13238
13238
|
function clearDialogState() {
|
|
@@ -13245,7 +13245,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
13245
13245
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
13246
13246
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
13247
13247
|
try {
|
|
13248
|
-
const { createDocState } = await import("./docStore-
|
|
13248
|
+
const { createDocState } = await import("./docStore-Y43RC35L.js");
|
|
13249
13249
|
const pageKey = await createDocState(
|
|
13250
13250
|
{ slateData, title },
|
|
13251
13251
|
{ dispatch, getState }
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-JEXVIMYZ.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareTools
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YC2MRILU.js";
|
|
7
7
|
import {
|
|
8
8
|
performFetchRequest
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DFGCBRIA.js";
|
|
10
10
|
import {
|
|
11
11
|
createSSEParser,
|
|
12
12
|
createToolRunId,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
toolRunSetPending,
|
|
18
18
|
toolRunStarted,
|
|
19
19
|
toolRunSucceeded
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TZS6YZTS.js";
|
|
21
21
|
import {
|
|
22
22
|
getPublicImageAgentMode
|
|
23
23
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
messageStreaming,
|
|
28
28
|
selectCurrentSpaceId,
|
|
29
29
|
updateToolMessage
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FMT767NK.js";
|
|
31
31
|
import {
|
|
32
32
|
streamAgentChatTurn
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-74D2NYOA.js";
|
|
34
34
|
import {
|
|
35
35
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
36
36
|
} from "./chunk-JCU2JDCV.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-ATNTHIZI.js";
|
|
28
28
|
import {
|
|
29
29
|
prepareTools
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YC2MRILU.js";
|
|
31
31
|
import {
|
|
32
32
|
getAntigravityUserAgent,
|
|
33
33
|
isAntigravityOAuthAgent,
|
|
@@ -49,24 +49,25 @@ import {
|
|
|
49
49
|
readXPostFunctionSchema,
|
|
50
50
|
readXhsProfileFunc,
|
|
51
51
|
readXhsProfileFunctionSchema
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-TZS6YZTS.js";
|
|
53
53
|
import {
|
|
54
|
-
|
|
54
|
+
createDrainExhaustedResponse,
|
|
55
|
+
isCoreDrainingBody,
|
|
55
56
|
normalizeNonNegativeMs,
|
|
56
57
|
parseRetryAfterHeaderMs
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-RQSOAMPJ.js";
|
|
58
59
|
import {
|
|
59
60
|
normalizeDialogTitle
|
|
60
61
|
} from "./chunk-OWOHNGCN.js";
|
|
61
62
|
import {
|
|
62
63
|
prepareTokenUsageData
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-FMT767NK.js";
|
|
64
65
|
import {
|
|
65
66
|
BUILTIN_TITLE_LLM_CONFIG
|
|
66
67
|
} from "./chunk-V2J635L5.js";
|
|
67
68
|
import {
|
|
68
69
|
fetchServerSyncedCredential
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-74D2NYOA.js";
|
|
70
71
|
import {
|
|
71
72
|
buildAgentRuntimeDialogWritePlan,
|
|
72
73
|
buildLocalWorkspaceOpenAiTools,
|
|
@@ -1023,7 +1024,7 @@ async function isCoreDrainingResponse(response) {
|
|
|
1023
1024
|
if (response.status !== 503) return false;
|
|
1024
1025
|
try {
|
|
1025
1026
|
const body = await response.clone().json();
|
|
1026
|
-
return body
|
|
1027
|
+
return isCoreDrainingBody(body);
|
|
1027
1028
|
} catch {
|
|
1028
1029
|
return false;
|
|
1029
1030
|
}
|
|
@@ -1050,6 +1051,9 @@ async function fetchWithTransientRetry(fetchImpl, input, init, options = {}) {
|
|
|
1050
1051
|
await (options.sleep ?? defaultSleep)(delayMs);
|
|
1051
1052
|
continue;
|
|
1052
1053
|
}
|
|
1054
|
+
if (coreDraining) {
|
|
1055
|
+
return createDrainExhaustedResponse(response);
|
|
1056
|
+
}
|
|
1053
1057
|
}
|
|
1054
1058
|
return response;
|
|
1055
1059
|
} catch (error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FMT767NK.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-T4RZCJKF.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// packages/core/drainReason.ts
|
|
2
2
|
var CORE_DRAIN_REASON = "core_draining";
|
|
3
|
+
var DRAIN_EXHAUSTED_USER_MESSAGE = "\u670D\u52A1\u6B63\u5728\u91CD\u542F\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5";
|
|
4
|
+
function isCoreDrainingBody(body) {
|
|
5
|
+
return typeof body === "object" && body !== null && body.reason === CORE_DRAIN_REASON;
|
|
6
|
+
}
|
|
7
|
+
function createDrainExhaustedResponse(original) {
|
|
8
|
+
const retryAfter = original.headers.get("Retry-After");
|
|
9
|
+
const headers = { "Content-Type": "text/plain; charset=utf-8" };
|
|
10
|
+
if (retryAfter) headers["Retry-After"] = retryAfter;
|
|
11
|
+
return new Response(DRAIN_EXHAUSTED_USER_MESSAGE, {
|
|
12
|
+
status: 503,
|
|
13
|
+
headers
|
|
14
|
+
});
|
|
15
|
+
}
|
|
3
16
|
|
|
4
17
|
// packages/core/retryAfterMs.ts
|
|
5
18
|
function normalizeNonNegativeMs(value, fallbackMs) {
|
|
@@ -28,6 +41,9 @@ function isGatewayHttpStatus(status) {
|
|
|
28
41
|
|
|
29
42
|
export {
|
|
30
43
|
CORE_DRAIN_REASON,
|
|
44
|
+
DRAIN_EXHAUSTED_USER_MESSAGE,
|
|
45
|
+
isCoreDrainingBody,
|
|
46
|
+
createDrainExhaustedResponse,
|
|
31
47
|
normalizeNonNegativeMs,
|
|
32
48
|
parseRetryAfterHeaderMs,
|
|
33
49
|
isGatewayHttpStatus
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isBuiltinNoloAgentRef,
|
|
19
19
|
t,
|
|
20
20
|
toolLabel
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MCXQFHBX.js";
|
|
22
22
|
import {
|
|
23
23
|
CliProviderQuotaError
|
|
24
24
|
} from "./chunk-CMKUBIGW.js";
|
|
@@ -48,14 +48,14 @@ import {
|
|
|
48
48
|
formatStatusRunCard,
|
|
49
49
|
formatStopRunCard,
|
|
50
50
|
isAgentRunTerminalStatus
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-TZS6YZTS.js";
|
|
52
52
|
import {
|
|
53
53
|
isGatewayHttpStatus
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-RQSOAMPJ.js";
|
|
55
55
|
import {
|
|
56
56
|
buildMemorySubjectsForAgent,
|
|
57
57
|
resolveAgentMemoryPolicy
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-324SDMXK.js";
|
|
59
59
|
import {
|
|
60
60
|
parseExternalSkillMarkdown,
|
|
61
61
|
parseSkillDocProtocol
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
API_REPORTED_COST_MULTIPLIER,
|
|
65
65
|
normalizeUsage,
|
|
66
66
|
parseUiAskChoiceContent
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-FMT767NK.js";
|
|
68
68
|
import {
|
|
69
69
|
buildSkillDiscoveryContextBlock
|
|
70
70
|
} from "./chunk-45JUQTYY.js";
|
|
@@ -151,6 +151,12 @@ var INTENT_PROVIDER = "deepseek";
|
|
|
151
151
|
var QUICK_CHAT_INTENT_TIMEOUT_MS = 4e3;
|
|
152
152
|
var SHORT_GREETING_MAX_LENGTH = 20;
|
|
153
153
|
var SHORT_GREETING_PATTERN = /^(?:hi|hello|hey|hiya|yo|sup|howdy|嗨|哈喽|哈囉|你好|您好|在吗|在嘛|喂|早上好|中午好|下午好|晚上好|拜拜|再见|谢谢|thanks|thx|ok|好的|收到|了解)[!.。,、~~]?$/iu;
|
|
154
|
+
var VALID_QUICK_CHAT_SKILLS = /* @__PURE__ */ new Set([
|
|
155
|
+
"table",
|
|
156
|
+
"doc",
|
|
157
|
+
"code",
|
|
158
|
+
"pagebuilder"
|
|
159
|
+
]);
|
|
154
160
|
function isShortGreeting(text) {
|
|
155
161
|
const trimmed = text.trim();
|
|
156
162
|
if (!trimmed) return false;
|
|
@@ -210,7 +216,7 @@ ${agentList}
|
|
|
210
216
|
- \u666E\u901A\u95EE\u7B54/\u7EAF\u95F2\u804A/\u5EFA\u5E94\u7528 \u2192 skills \u4E3A []
|
|
211
217
|
|
|
212
218
|
\u53EA\u8F93\u51FA JSON\uFF0C\u4E0D\u8981\u8F93\u51FA\u5176\u4ED6\u5185\u5BB9\uFF1A
|
|
213
|
-
{"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "needsWorkspace": <true \u6216 false>, "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F
|
|
219
|
+
{"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "needsWorkspace": <true \u6216 false>, "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F ${[...VALID_QUICK_CHAT_SKILLS].map((s) => `"${s}"`).join(" | ")}\uFF0C\u672A\u547D\u4E2D\u7ED9 []>}`;
|
|
214
220
|
}
|
|
215
221
|
function parseQuickChatIntentResult(content, tierAgents) {
|
|
216
222
|
try {
|
|
@@ -227,7 +233,7 @@ function parseQuickChatIntentResult(content, tierAgents) {
|
|
|
227
233
|
let skills;
|
|
228
234
|
if (Array.isArray(rawSkills)) {
|
|
229
235
|
const filtered = [...new Set(rawSkills)].filter(
|
|
230
|
-
(s) =>
|
|
236
|
+
(s) => typeof s === "string" && VALID_QUICK_CHAT_SKILLS.has(s)
|
|
231
237
|
);
|
|
232
238
|
if (filtered.length > 0) skills = filtered;
|
|
233
239
|
}
|