nolo-cli 0.115.0-alpha.1 → 0.116.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-RQXGTKAT.js → _executeModel-BPUR2QYH.js} +15 -14
- package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-S2NRBCWW.js} +1 -1
- package/{agentDeleteCommand-S4GW4PKE.js → agentDeleteCommand-MNAA6MIG.js} +2 -2
- package/{agentEmailCommands-M26R6BO4.js → agentEmailCommands-SK34WJKU.js} +14 -14
- package/{agentListCommands-3YRR3FOM.js → agentListCommands-I26MKI4T.js} +2 -2
- package/{agentMachineCommands-ZFEQOZG3.js → agentMachineCommands-M6QDR6P3.js} +3 -3
- package/{agentRecordCommands-LZ4G5INZ.js → agentRecordCommands-HTHLO2MM.js} +14 -14
- package/{agentRunCommand-GOP4T77I.js → agentRunCommand-IAIRCMTH.js} +14 -14
- package/{agentRuntimeLocal-FXCNGFFT.js → agentRuntimeLocal-3WTYYIT2.js} +2 -2
- package/{agentSlice-PKMID4S2.js → agentSlice-TVP3HINW.js} +1 -1
- package/{appDeleteCommands-2LIWMMJP.js → appDeleteCommands-SB5TNLKY.js} +2 -2
- package/{appDeployCommands-WOTKY2LM.js → appDeployCommands-2IPKZINV.js} +2 -2
- package/{appDeployStatusCommands-6QQWIFCK.js → appDeployStatusCommands-K63TFUID.js} +2 -2
- package/{appGetCommands-Z4RHYUKS.js → appGetCommands-VU2SLNEH.js} +2 -2
- package/{appListCommands-SOBFAS4W.js → appListCommands-S3T4DJ36.js} +2 -2
- package/{chatQueueReduxAdapter-KMULSV7M.js → chatQueueReduxAdapter-TWIYKVIZ.js} +3 -3
- package/{chunk-2MMIOYAF.js → chunk-3BGIKIPF.js} +12 -12
- package/{chunk-SQCF7OWL.js → chunk-3IUWIAHP.js} +1 -1
- package/{chunk-SWM3OJR7.js → chunk-3VUWPRFW.js} +5 -4
- package/{chunk-RB3EETRZ.js → chunk-52Q2IW2X.js} +429 -53
- package/{chunk-TUBKLG3S.js → chunk-5MEYHVIB.js} +1 -1
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-X767IQBD.js → chunk-DD6XE56O.js} +9 -62
- package/{chunk-KEQNY22P.js → chunk-FP76KI2Y.js} +54 -11
- package/{chunk-VLTIYV3X.js → chunk-HYJFRTLW.js} +1 -1
- package/{chunk-6P47Q5OH.js → chunk-KAUSRTO6.js} +2 -2
- package/{chunk-5F3OZ7L2.js → chunk-LMREEBWT.js} +35 -5
- package/{chunk-ANFQ4KPL.js → chunk-MZYBSTMH.js} +2 -2
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-22CGS5BQ.js → chunk-PMAIQX7A.js} +2 -2
- package/{chunk-NGEWETHC.js → chunk-RPJUFEGR.js} +3 -3
- package/{chunk-LZLZNZ4H.js → chunk-U4OKDZFH.js} +1 -1
- package/{chunk-DE7R7ZAP.js → chunk-UDVH2P4A.js} +3 -3
- package/{chunk-QTGQ2LTL.js → chunk-UEVXFHQB.js} +1 -1
- package/{chunk-Q4U2WKQY.js → chunk-XP3VVAPG.js} +90 -14
- package/{chunk-SBDFSHSS.js → chunk-Z2PV6O2T.js} +9 -0
- package/{contentThunks-EHSBUA4D.js → contentThunks-JYWI7G7I.js} +4 -4
- package/{createAgentAutomationAction-G2MK4LVL.js → createAgentAutomationAction-Z4SUJ54Y.js} +4 -4
- package/{createDialogAction-JH7ZCV5Z.js → createDialogAction-RCHFLVJ2.js} +5 -5
- package/{createPageAction-SRPNANEQ.js → createPageAction-YK2253XQ.js} +4 -4
- package/{dialogCommands-JCDHSPHY.js → dialogCommands-X4UOZQWX.js} +2 -2
- package/{dialogSlice-YUPGRKPA.js → dialogSlice-IVTWLCE2.js} +9 -3
- package/{docCreateCommands-HDV5VRAK.js → docCreateCommands-VD6TGHG4.js} +2 -2
- package/{docDeleteCommands-77BE7WA3.js → docDeleteCommands-OT3R2G4W.js} +2 -2
- package/{docReadCommands-4Z7DUAHQ.js → docReadCommands-2G7BIXSH.js} +2 -2
- package/{docStore-F3LR3M6Z.js → docStore-UENKCCDX.js} +1 -1
- package/{docUpdateCommands-L45KOOSF.js → docUpdateCommands-45MVJKZA.js} +2 -2
- package/{handleSendMessageAction-GCKW2H7N.js → handleSendMessageAction-LM2J4HC3.js} +40 -6
- package/index.js +41 -41
- package/{machineCommands-N3XF6SYH.js → machineCommands-6N6MQIE6.js} +14 -14
- package/{machineWsRunDispatch-UJX7MT2Z.js → machineWsRunDispatch-7MFKVQCR.js} +14 -14
- package/package.json +1 -1
- package/{readlineWorkspace-FFZEUHR4.js → readlineWorkspace-JWBON5CX.js} +34 -16
- package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-W66BJ7CF.js} +1 -1
- package/{runAgentClientLoop-UGNX7QRL.js → runAgentClientLoop-TA4SSPHE.js} +12 -12
- package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-2ALKG3WA.js} +2 -2
- package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-TQZB55F6.js} +1 -1
- package/{spaceCommands-TCEN2CRN.js → spaceCommands-6NSAXB7D.js} +2 -2
- package/{streamAgentChatTurn-DKVJJ2BL.js → streamAgentChatTurn-X5ENGUIS.js} +76 -18
- package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-3KI72HHS.js} +1 -1
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-G3M73RTB.js} +2 -2
- package/{tools-IHD7PL23.js → tools-XRQR7ZZR.js} +9 -9
- package/{updateDialogTitleAction-QKUFUNTO.js → updateDialogTitleAction-ESUUD3GT.js} +4 -4
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
wrapTextToLines,
|
|
73
73
|
wrapTranscriptLine,
|
|
74
74
|
wrapTranscriptLineWithLayout
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FP76KI2Y.js";
|
|
76
76
|
import "./chunk-S7Z2HMCN.js";
|
|
77
77
|
import "./chunk-V7E4PXQD.js";
|
|
78
78
|
import "./chunk-ESHYE7WU.js";
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
readTimestamp,
|
|
99
99
|
setCliLocale,
|
|
100
100
|
t
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-LMREEBWT.js";
|
|
102
102
|
import "./chunk-Z5625XML.js";
|
|
103
103
|
import "./chunk-EADNWBAZ.js";
|
|
104
104
|
import "./chunk-SH43IESU.js";
|
|
@@ -136,12 +136,12 @@ import "./chunk-ATNTHIZI.js";
|
|
|
136
136
|
import "./chunk-JEXVIMYZ.js";
|
|
137
137
|
import {
|
|
138
138
|
prepareTools
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-KAUSRTO6.js";
|
|
140
140
|
import {
|
|
141
141
|
buildResponseGuidelines
|
|
142
142
|
} from "./chunk-EOARMOVD.js";
|
|
143
143
|
import "./chunk-HS7MLR74.js";
|
|
144
|
-
import "./chunk-
|
|
144
|
+
import "./chunk-3BGIKIPF.js";
|
|
145
145
|
import "./chunk-5UTFL4QJ.js";
|
|
146
146
|
import "./chunk-NF64D32W.js";
|
|
147
147
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -162,29 +162,29 @@ import "./chunk-J4MOO56S.js";
|
|
|
162
162
|
import "./chunk-6Z7MY3V7.js";
|
|
163
163
|
import "./chunk-EYAQT56M.js";
|
|
164
164
|
import "./chunk-VIDPVFP3.js";
|
|
165
|
-
import "./chunk-
|
|
166
|
-
import "./chunk-
|
|
165
|
+
import "./chunk-HYJFRTLW.js";
|
|
166
|
+
import "./chunk-UEVXFHQB.js";
|
|
167
167
|
import "./chunk-BMQ2MJUK.js";
|
|
168
168
|
import "./chunk-N4G4PKQ6.js";
|
|
169
169
|
import "./chunk-6GFOD3TK.js";
|
|
170
170
|
import "./chunk-MEYIRKDN.js";
|
|
171
171
|
import "./chunk-63W5N6P3.js";
|
|
172
172
|
import "./chunk-VF4K2QE6.js";
|
|
173
|
-
import "./chunk-
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-
|
|
173
|
+
import "./chunk-PMAIQX7A.js";
|
|
174
|
+
import "./chunk-MZYBSTMH.js";
|
|
175
|
+
import "./chunk-3IUWIAHP.js";
|
|
176
176
|
import "./chunk-ZJ7UHBJS.js";
|
|
177
177
|
import {
|
|
178
178
|
extractReferenceKeysFromMessage
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-XP3VVAPG.js";
|
|
180
180
|
import "./chunk-MC4XLIJ7.js";
|
|
181
181
|
import "./chunk-3BMYXEUW.js";
|
|
182
182
|
import "./chunk-YYLHWIW6.js";
|
|
183
183
|
import "./chunk-AGGIDPCZ.js";
|
|
184
|
-
import "./chunk-
|
|
184
|
+
import "./chunk-UDVH2P4A.js";
|
|
185
185
|
import "./chunk-BFDFRLLQ.js";
|
|
186
186
|
import "./chunk-5RGU3J7P.js";
|
|
187
|
-
import "./chunk-
|
|
187
|
+
import "./chunk-6D2JFXLY.js";
|
|
188
188
|
import "./chunk-M76ECQRD.js";
|
|
189
189
|
import "./chunk-YDH3FDFQ.js";
|
|
190
190
|
import "./chunk-URMS4XY2.js";
|
|
@@ -207,7 +207,7 @@ import {
|
|
|
207
207
|
formatToolOverflowMarker,
|
|
208
208
|
getProcessRegistry,
|
|
209
209
|
readCommandActionGatePayload
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-52Q2IW2X.js";
|
|
211
211
|
import "./chunk-H4AHY5BU.js";
|
|
212
212
|
import "./chunk-FV3JEYR3.js";
|
|
213
213
|
import "./chunk-GMZLP5DV.js";
|
|
@@ -221,7 +221,7 @@ import {
|
|
|
221
221
|
buildIdentityBlock,
|
|
222
222
|
buildRuntimeGuidanceBlocks,
|
|
223
223
|
resolveToolGuidedSections
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-Z2PV6O2T.js";
|
|
225
225
|
import "./chunk-PUOC4YRO.js";
|
|
226
226
|
import "./chunk-HCT7U36O.js";
|
|
227
227
|
import {
|
|
@@ -7921,8 +7921,19 @@ function resolveChatSendDecision(input) {
|
|
|
7921
7921
|
}
|
|
7922
7922
|
return { kind: "compact-dialog" };
|
|
7923
7923
|
}
|
|
7924
|
-
|
|
7925
|
-
|
|
7924
|
+
const hasContent = Boolean(trimmed) || input.imagePreviewCount > 0 || input.pendingFileCount > 0;
|
|
7925
|
+
const hasActiveTurn = input.hasActiveTurn ?? (input.isLoopRunning || input.isSendPending);
|
|
7926
|
+
if (!hasContent) {
|
|
7927
|
+
return { kind: "noop", reason: "empty-input" };
|
|
7928
|
+
}
|
|
7929
|
+
if (input.isSendPending && !input.isLoopRunning && !hasActiveTurn) {
|
|
7930
|
+
return { kind: "stale-send" };
|
|
7931
|
+
}
|
|
7932
|
+
if (input.isSendPending) {
|
|
7933
|
+
return { kind: "noop", reason: "already-sending" };
|
|
7934
|
+
}
|
|
7935
|
+
if (input.isSendBlocked) {
|
|
7936
|
+
return { kind: "noop", reason: "blocked" };
|
|
7926
7937
|
}
|
|
7927
7938
|
if (!input.canMultiImg && input.imagePreviewCount > 1) {
|
|
7928
7939
|
return { kind: "multi-image-blocked" };
|
|
@@ -8074,6 +8085,11 @@ function createChatQueueTuiBinding(runTurn) {
|
|
|
8074
8085
|
const clear = () => {
|
|
8075
8086
|
runtime.send({ type: "clear" });
|
|
8076
8087
|
};
|
|
8088
|
+
const recoverStaleRunning = () => {
|
|
8089
|
+
if (!runtime.getState().running) return false;
|
|
8090
|
+
runtime.send({ type: "turn-end", ok: true, aborted: false });
|
|
8091
|
+
return true;
|
|
8092
|
+
};
|
|
8077
8093
|
const getStatus = () => projectChatQueueStatus({ state: runtime.getState() });
|
|
8078
8094
|
const queueLength = () => runtime.getState().queue.length;
|
|
8079
8095
|
const dispose = () => {
|
|
@@ -8090,6 +8106,7 @@ function createChatQueueTuiBinding(runTurn) {
|
|
|
8090
8106
|
preemptForStop,
|
|
8091
8107
|
snapshotAndClearQueue,
|
|
8092
8108
|
clear,
|
|
8109
|
+
recoverStaleRunning,
|
|
8093
8110
|
getStatus,
|
|
8094
8111
|
queueLength,
|
|
8095
8112
|
dispose
|
|
@@ -11906,6 +11923,7 @@ ${merged}` : merged;
|
|
|
11906
11923
|
return;
|
|
11907
11924
|
}
|
|
11908
11925
|
}
|
|
11926
|
+
chatQueueBinding?.recoverStaleRunning();
|
|
11909
11927
|
busy = startsChatTurn;
|
|
11910
11928
|
bumpDraftEpoch();
|
|
11911
11929
|
buffer = "";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAgentContexts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5MEYHVIB.js";
|
|
4
4
|
import {
|
|
5
5
|
generateRequestBody,
|
|
6
6
|
mergeReferences,
|
|
7
7
|
performFetchRequest,
|
|
8
8
|
sanitizeOutboundBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3VUWPRFW.js";
|
|
10
10
|
import "./chunk-EOARMOVD.js";
|
|
11
11
|
import "./chunk-HS7MLR74.js";
|
|
12
12
|
import {
|
|
13
13
|
findToolExecutor,
|
|
14
14
|
getToolResultErrorData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3BGIKIPF.js";
|
|
16
16
|
import "./chunk-5UTFL4QJ.js";
|
|
17
17
|
import "./chunk-NF64D32W.js";
|
|
18
18
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -21,35 +21,35 @@ import "./chunk-CWQINZEA.js";
|
|
|
21
21
|
import "./chunk-KQHGZWSV.js";
|
|
22
22
|
import "./chunk-J4MOO56S.js";
|
|
23
23
|
import "./chunk-6Z7MY3V7.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-HYJFRTLW.js";
|
|
25
|
+
import "./chunk-UEVXFHQB.js";
|
|
26
26
|
import "./chunk-N4G4PKQ6.js";
|
|
27
27
|
import "./chunk-6GFOD3TK.js";
|
|
28
28
|
import "./chunk-MEYIRKDN.js";
|
|
29
29
|
import "./chunk-63W5N6P3.js";
|
|
30
30
|
import "./chunk-VF4K2QE6.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-PMAIQX7A.js";
|
|
32
|
+
import "./chunk-MZYBSTMH.js";
|
|
33
|
+
import "./chunk-3IUWIAHP.js";
|
|
34
34
|
import "./chunk-ZJ7UHBJS.js";
|
|
35
35
|
import {
|
|
36
36
|
updateTokensAction
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XP3VVAPG.js";
|
|
38
38
|
import "./chunk-MC4XLIJ7.js";
|
|
39
39
|
import "./chunk-3BMYXEUW.js";
|
|
40
40
|
import "./chunk-YYLHWIW6.js";
|
|
41
41
|
import "./chunk-AGGIDPCZ.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-UDVH2P4A.js";
|
|
43
43
|
import "./chunk-BFDFRLLQ.js";
|
|
44
44
|
import "./chunk-5RGU3J7P.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-6D2JFXLY.js";
|
|
46
46
|
import "./chunk-M76ECQRD.js";
|
|
47
47
|
import "./chunk-YDH3FDFQ.js";
|
|
48
48
|
import "./chunk-LVIFM7VW.js";
|
|
49
49
|
import "./chunk-GIVFXPWK.js";
|
|
50
50
|
import "./chunk-Q554LLSI.js";
|
|
51
51
|
import "./chunk-KHCLMKZZ.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-Z2PV6O2T.js";
|
|
53
53
|
import "./chunk-PUOC4YRO.js";
|
|
54
54
|
import "./chunk-HCT7U36O.js";
|
|
55
55
|
import "./chunk-FDTR4QJ6.js";
|
package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-2ALKG3WA.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setDialogExtraReferencesAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UEVXFHQB.js";
|
|
4
|
+
import "./chunk-6D2JFXLY.js";
|
|
5
5
|
import "./chunk-M76ECQRD.js";
|
|
6
6
|
import "./chunk-YDH3FDFQ.js";
|
|
7
7
|
import "./chunk-VRTTFDBM.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import "./chunk-3AMA42ZI.js";
|
|
12
12
|
import "./chunk-SV5IJK6K.js";
|
|
13
13
|
import "./chunk-KQHGZWSV.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-52Q2IW2X.js";
|
|
15
15
|
import "./chunk-H4AHY5BU.js";
|
|
16
16
|
import "./chunk-FV3JEYR3.js";
|
|
17
17
|
import "./chunk-GMZLP5DV.js";
|
|
@@ -20,7 +20,7 @@ import "./chunk-4MK3I7Y4.js";
|
|
|
20
20
|
import "./chunk-CQ3WA2NE.js";
|
|
21
21
|
import "./chunk-5ZUL4CUO.js";
|
|
22
22
|
import "./chunk-N7J63Q6C.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-Z2PV6O2T.js";
|
|
24
24
|
import "./chunk-PUOC4YRO.js";
|
|
25
25
|
import "./chunk-HCT7U36O.js";
|
|
26
26
|
import "./chunk-FDTR4QJ6.js";
|
|
@@ -11,16 +11,15 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
filterAndCleanMessages,
|
|
13
13
|
handleToolCalls,
|
|
14
|
-
parseApiError,
|
|
15
14
|
persistToolMessages,
|
|
16
15
|
readStreamChunk,
|
|
17
16
|
sendOpenAICompletionsRequest,
|
|
18
17
|
updateTotalUsage
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DD6XE56O.js";
|
|
20
19
|
import "./chunk-JEXVIMYZ.js";
|
|
21
20
|
import {
|
|
22
21
|
prepareTools
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KAUSRTO6.js";
|
|
24
23
|
import {
|
|
25
24
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
26
25
|
buildInvalidToolCallSelfHealResult,
|
|
@@ -38,7 +37,7 @@ import {
|
|
|
38
37
|
sanitizeOutboundResponsesInput,
|
|
39
38
|
selectResponsesConversationState,
|
|
40
39
|
updateResponsesConversationState
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-3VUWPRFW.js";
|
|
42
41
|
import "./chunk-EOARMOVD.js";
|
|
43
42
|
import "./chunk-HS7MLR74.js";
|
|
44
43
|
import {
|
|
@@ -46,7 +45,7 @@ import {
|
|
|
46
45
|
getAllToolRuns,
|
|
47
46
|
resolveAgentRecommendedSkillNames,
|
|
48
47
|
resolveAgentRequiredPackIds
|
|
49
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-3BGIKIPF.js";
|
|
50
49
|
import "./chunk-5UTFL4QJ.js";
|
|
51
50
|
import "./chunk-NF64D32W.js";
|
|
52
51
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -67,8 +66,12 @@ import {
|
|
|
67
66
|
} from "./chunk-VIDPVFP3.js";
|
|
68
67
|
import {
|
|
69
68
|
resolveToolBaseUrl
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import "./chunk-
|
|
69
|
+
} from "./chunk-HYJFRTLW.js";
|
|
70
|
+
import "./chunk-UEVXFHQB.js";
|
|
71
|
+
import {
|
|
72
|
+
isContextOverflowText,
|
|
73
|
+
parseApiError
|
|
74
|
+
} from "./chunk-OCZKATRC.js";
|
|
72
75
|
import {
|
|
73
76
|
waitForAbortableDelay
|
|
74
77
|
} from "./chunk-N4G4PKQ6.js";
|
|
@@ -80,11 +83,11 @@ import "./chunk-63W5N6P3.js";
|
|
|
80
83
|
import "./chunk-VF4K2QE6.js";
|
|
81
84
|
import {
|
|
82
85
|
getDocState
|
|
83
|
-
} from "./chunk-
|
|
84
|
-
import "./chunk-
|
|
86
|
+
} from "./chunk-PMAIQX7A.js";
|
|
87
|
+
import "./chunk-MZYBSTMH.js";
|
|
85
88
|
import {
|
|
86
89
|
getTableState
|
|
87
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-3IUWIAHP.js";
|
|
88
91
|
import {
|
|
89
92
|
getCurrentSpaceId,
|
|
90
93
|
getCurrentSpaceIdRaw,
|
|
@@ -109,12 +112,12 @@ import {
|
|
|
109
112
|
shouldBlockForGptPro,
|
|
110
113
|
updateTokens,
|
|
111
114
|
updateToolMessage
|
|
112
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-XP3VVAPG.js";
|
|
113
116
|
import "./chunk-MC4XLIJ7.js";
|
|
114
117
|
import "./chunk-3BMYXEUW.js";
|
|
115
118
|
import "./chunk-YYLHWIW6.js";
|
|
116
119
|
import "./chunk-AGGIDPCZ.js";
|
|
117
|
-
import "./chunk-
|
|
120
|
+
import "./chunk-UDVH2P4A.js";
|
|
118
121
|
import {
|
|
119
122
|
createCliChatTurnStream,
|
|
120
123
|
getCliChatSession,
|
|
@@ -123,14 +126,17 @@ import {
|
|
|
123
126
|
import "./chunk-5RGU3J7P.js";
|
|
124
127
|
import {
|
|
125
128
|
addActiveController,
|
|
129
|
+
claimDialogTurnPhase,
|
|
130
|
+
clearDialogTurnPhase,
|
|
126
131
|
clearPendingUserInputQueue,
|
|
127
132
|
dequeueUserInput,
|
|
128
133
|
removeActiveController,
|
|
129
134
|
selectActiveControllers,
|
|
130
135
|
selectPendingFiles,
|
|
131
136
|
selectPendingUserInputQueue,
|
|
137
|
+
setDialogTurnPhase,
|
|
132
138
|
tokenUsageLiveUpdate
|
|
133
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-6D2JFXLY.js";
|
|
134
140
|
import "./chunk-M76ECQRD.js";
|
|
135
141
|
import "./chunk-YDH3FDFQ.js";
|
|
136
142
|
import "./chunk-LVIFM7VW.js";
|
|
@@ -157,7 +163,7 @@ import {
|
|
|
157
163
|
import "./chunk-CQ3WA2NE.js";
|
|
158
164
|
import "./chunk-5ZUL4CUO.js";
|
|
159
165
|
import "./chunk-N7J63Q6C.js";
|
|
160
|
-
import "./chunk-
|
|
166
|
+
import "./chunk-Z2PV6O2T.js";
|
|
161
167
|
import {
|
|
162
168
|
extractImagePartsFromResponseOutput,
|
|
163
169
|
extractTextFromResponseOutput,
|
|
@@ -2420,6 +2426,7 @@ function normalizeDesktopAgentRuntimeTurnError(data) {
|
|
|
2420
2426
|
async function* runDesktopAgentRuntimeTurnStream({
|
|
2421
2427
|
fetchImpl = fetch,
|
|
2422
2428
|
signal,
|
|
2429
|
+
noEventWatchdogMs,
|
|
2423
2430
|
...args
|
|
2424
2431
|
}) {
|
|
2425
2432
|
try {
|
|
@@ -2476,7 +2483,13 @@ async function* runDesktopAgentRuntimeTurnStream({
|
|
|
2476
2483
|
yield { type: "error", error: "The operation was aborted." };
|
|
2477
2484
|
return;
|
|
2478
2485
|
}
|
|
2479
|
-
const { done, value } = await readStreamChunk(reader, {
|
|
2486
|
+
const { done, value } = await readStreamChunk(reader, {
|
|
2487
|
+
signal,
|
|
2488
|
+
...noEventWatchdogMs && noEventWatchdogMs > 0 ? {
|
|
2489
|
+
timeoutMs: noEventWatchdogMs,
|
|
2490
|
+
timeoutErrorMessage: `Desktop turn stream stalled: no event within ${noEventWatchdogMs}ms`
|
|
2491
|
+
} : {}
|
|
2492
|
+
});
|
|
2480
2493
|
if (done) break;
|
|
2481
2494
|
buffer += decoder.decode(value, { stream: true });
|
|
2482
2495
|
const lines = buffer.split("\n");
|
|
@@ -3050,6 +3063,28 @@ function hasInlineExecutedToolCalls(result) {
|
|
|
3050
3063
|
const output = result?.output;
|
|
3051
3064
|
return Array.isArray(output) && output.some((b) => b?.type === "toolCall" && b?.result != null);
|
|
3052
3065
|
}
|
|
3066
|
+
var COMPACTION_TIMEOUT_PATTERN = /compaction[^\n]{0,40}(timed\s*out|timeout|deadline)|(timed\s*out|timeout|deadline)[^\n]{0,40}compaction|summary[^\n]{0,30}(timed\s*out|timeout)/i;
|
|
3067
|
+
var DESKTOP_SSE_NO_EVENT_WATCHDOG_MS = 20 * 60 * 1e3;
|
|
3068
|
+
function classifyLocalTurnStreamError(errorText) {
|
|
3069
|
+
const text = typeof errorText === "string" ? errorText : "";
|
|
3070
|
+
if (COMPACTION_TIMEOUT_PATTERN.test(text)) {
|
|
3071
|
+
return {
|
|
3072
|
+
kind: "compaction_timeout",
|
|
3073
|
+
retryable: true,
|
|
3074
|
+
summary: "\u5386\u53F2\u538B\u7F29\u8D85\u65F6",
|
|
3075
|
+
actionHint: "\u5386\u53F2\u538B\u7F29\u672A\u80FD\u5728\u65F6\u9650\u5185\u5B8C\u6210\uFF0C\u672C\u56DE\u5408\u5DF2\u505C\u6B62\u3002\u4F60\u7684\u6D88\u606F\u4E0E\u9644\u4EF6\u5747\u5DF2\u4FDD\u7559\uFF1B\u53EF\u91CD\u8BD5\u3001\u5F00\u542F\u65B0\u5BF9\u8BDD\uFF0C\u6216\u5207\u6362\u5230\u66F4\u5927\u7A97\u53E3\u7684\u6A21\u578B\u3002\uFF08\u8D85\u65F6\u540E\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u540C\u4E00\u4ED8\u8D39\u8BF7\u6C42\u3002\uFF09"
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3078
|
+
if (isContextOverflowText(text)) {
|
|
3079
|
+
return {
|
|
3080
|
+
kind: "context_overflow",
|
|
3081
|
+
retryable: true,
|
|
3082
|
+
summary: "\u4E0A\u4E0B\u6587\u8FC7\u957F",
|
|
3083
|
+
actionHint: "\u5F53\u524D\u4E0A\u4E0B\u6587\u8D85\u51FA\u6A21\u578B\u7A97\u53E3\u3002\u53EF\u81EA\u52A8\u538B\u7F29\u5E76\u91CD\u8BD5\u3001\u5F00\u542F\u65B0\u5BF9\u8BDD\uFF0C\u6216\u5207\u6362\u5230\u66F4\u5927\u7A97\u53E3\u7684\u6A21\u578B\u3002"
|
|
3084
|
+
};
|
|
3085
|
+
}
|
|
3086
|
+
return { kind: "generic", retryable: true, summary: "", actionHint: "" };
|
|
3087
|
+
}
|
|
3053
3088
|
function createRemoteToolEventHandlers(opts) {
|
|
3054
3089
|
const { dialogId, dispatch, messageMetadata } = opts;
|
|
3055
3090
|
const activeToolMessages = /* @__PURE__ */ new Map();
|
|
@@ -3184,6 +3219,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3184
3219
|
thunkApi.signal.addEventListener("abort", onAbort);
|
|
3185
3220
|
let loopKey = null;
|
|
3186
3221
|
let runtimeDialogKey = explicitDialogKey ?? null;
|
|
3222
|
+
let turnPhaseTurnId = null;
|
|
3187
3223
|
let remoteTransientMessageId = null;
|
|
3188
3224
|
let remoteTransientMessageFinalized = false;
|
|
3189
3225
|
let modelRequestStarted = false;
|
|
@@ -3741,6 +3777,8 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3741
3777
|
const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
|
|
3742
3778
|
loopKey = `loop:${dialogId}`;
|
|
3743
3779
|
dispatch(addActiveController({ messageId: loopKey, controller: loopController, dialogKey }));
|
|
3780
|
+
turnPhaseTurnId = `turn-phase:${dialogId}:${Date.now().toString(36)}:${Math.random().toString(36).slice(2, 8)}`;
|
|
3781
|
+
claimDialogTurnPhase({ dialogKey, turnId: turnPhaseTurnId });
|
|
3744
3782
|
let currentContent = "";
|
|
3745
3783
|
const assistantSegments = [];
|
|
3746
3784
|
let assistantMessageKeys = null;
|
|
@@ -3813,7 +3851,18 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3813
3851
|
workspaceToolsHint: runtimeOptions?.workspaceToolsHint === true,
|
|
3814
3852
|
agentConfigSnapshot: agentConfig,
|
|
3815
3853
|
dialogMessages: selectAllMsgs(getState(), dialogId),
|
|
3816
|
-
signal: loopController.signal
|
|
3854
|
+
signal: loopController.signal,
|
|
3855
|
+
// SSE 传输层兜底(review 修复 4):此前本调用方从不传
|
|
3856
|
+
// noEventWatchdogMs,watchdog 永远关闭——「已有安全网」只是
|
|
3857
|
+
// 错觉,挂起点若在 provider.complete 之外(resolveProvider /
|
|
3858
|
+
// adapter 内部,runtime 没有任何 deadline)就会无限静默。
|
|
3859
|
+
// 量级必须大于 runtime 自己的 idle 窗(默认 10 分钟无新输出
|
|
3860
|
+
// 才放弃,见 localLoop.DEFAULT_LLM_REQUEST_TIMEOUT_MS),
|
|
3861
|
+
// 否则一个健康的慢思考轮次会被客户端提前判死,用户拿到的是
|
|
3862
|
+
// 未分类的 "stream stalled" 而不是 runtime 的
|
|
3863
|
+
// LLM_REQUEST_TIMEOUT 可操作文案。取 2× = 20 分钟:
|
|
3864
|
+
// 只兜「runtime 完全没 deadline」的真悬挂。
|
|
3865
|
+
noEventWatchdogMs: DESKTOP_SSE_NO_EVENT_WATCHDOG_MS
|
|
3817
3866
|
});
|
|
3818
3867
|
for await (const event of eventStream) {
|
|
3819
3868
|
if (loopController.signal.aborted || thunkApi.signal.aborted) {
|
|
@@ -3886,6 +3935,9 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3886
3935
|
dispatch(messageStreaming(toolResultMsg));
|
|
3887
3936
|
}
|
|
3888
3937
|
}
|
|
3938
|
+
} else if (event.type === "status") {
|
|
3939
|
+
const phase = event.phase === "validating-context" ? "validating" : event.phase;
|
|
3940
|
+
setDialogTurnPhase({ phase, dialogKey, turnId: turnPhaseTurnId ?? void 0 });
|
|
3889
3941
|
} else if (event.type === "done") {
|
|
3890
3942
|
streamResult = event.result;
|
|
3891
3943
|
} else if (event.type === "error") {
|
|
@@ -4017,8 +4069,12 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
4017
4069
|
setLoopStopReason("error");
|
|
4018
4070
|
};
|
|
4019
4071
|
if (streamError) {
|
|
4020
|
-
|
|
4021
|
-
|
|
4072
|
+
const info = classifyLocalTurnStreamError(streamError);
|
|
4073
|
+
const finalError = info.actionHint ? `${streamError}
|
|
4074
|
+
|
|
4075
|
+
${info.actionHint}` : streamError;
|
|
4076
|
+
await finalizeDesktopTurnOnError(finalError);
|
|
4077
|
+
return rejectWithValue(finalError);
|
|
4022
4078
|
}
|
|
4023
4079
|
if (!streamResult) {
|
|
4024
4080
|
const message = "Local turn stream closed unexpectedly without result";
|
|
@@ -4984,6 +5040,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
4984
5040
|
error?.message || "An unexpected error occurred in streamAgentChatTurn."
|
|
4985
5041
|
);
|
|
4986
5042
|
} finally {
|
|
5043
|
+
clearDialogTurnPhase({ dialogKey: runtimeDialogKey ?? void 0, turnId: turnPhaseTurnId ?? void 0 });
|
|
4987
5044
|
if (loopKey && runtimeDialogKey) {
|
|
4988
5045
|
dispatch(removeActiveController({ messageId: loopKey, dialogKey: runtimeDialogKey }));
|
|
4989
5046
|
} else if (loopKey) {
|
|
@@ -5003,5 +5060,6 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
5003
5060
|
}
|
|
5004
5061
|
};
|
|
5005
5062
|
export {
|
|
5063
|
+
classifyLocalTurnStreamError,
|
|
5006
5064
|
streamAgentChatTurnHandler
|
|
5007
5065
|
};
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
getToolRequestContext,
|
|
8
8
|
resolveToolApiBaseUrl,
|
|
9
9
|
resolveToolBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-HYJFRTLW.js";
|
|
11
|
+
import "./chunk-6D2JFXLY.js";
|
|
12
12
|
import "./chunk-YDH3FDFQ.js";
|
|
13
13
|
import "./chunk-DWLEOOGR.js";
|
|
14
14
|
import "./chunk-QSJ3HFEF.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
toolQueryFunc,
|
|
9
9
|
toolQueryFunctionSchema,
|
|
10
10
|
toolRegistry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3BGIKIPF.js";
|
|
12
12
|
import "./chunk-5UTFL4QJ.js";
|
|
13
13
|
import "./chunk-NF64D32W.js";
|
|
14
14
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -17,26 +17,26 @@ import "./chunk-CWQINZEA.js";
|
|
|
17
17
|
import "./chunk-KQHGZWSV.js";
|
|
18
18
|
import "./chunk-J4MOO56S.js";
|
|
19
19
|
import "./chunk-6Z7MY3V7.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-HYJFRTLW.js";
|
|
21
|
+
import "./chunk-UEVXFHQB.js";
|
|
22
22
|
import "./chunk-N4G4PKQ6.js";
|
|
23
23
|
import "./chunk-6GFOD3TK.js";
|
|
24
24
|
import "./chunk-MEYIRKDN.js";
|
|
25
25
|
import "./chunk-63W5N6P3.js";
|
|
26
26
|
import "./chunk-VF4K2QE6.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-PMAIQX7A.js";
|
|
28
|
+
import "./chunk-MZYBSTMH.js";
|
|
29
|
+
import "./chunk-3IUWIAHP.js";
|
|
30
30
|
import "./chunk-ZJ7UHBJS.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-XP3VVAPG.js";
|
|
32
32
|
import "./chunk-MC4XLIJ7.js";
|
|
33
33
|
import "./chunk-3BMYXEUW.js";
|
|
34
34
|
import "./chunk-YYLHWIW6.js";
|
|
35
35
|
import "./chunk-AGGIDPCZ.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-UDVH2P4A.js";
|
|
37
37
|
import "./chunk-BFDFRLLQ.js";
|
|
38
38
|
import "./chunk-5RGU3J7P.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-6D2JFXLY.js";
|
|
40
40
|
import "./chunk-M76ECQRD.js";
|
|
41
41
|
import "./chunk-YDH3FDFQ.js";
|
|
42
42
|
import "./chunk-LVIFM7VW.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3IUWIAHP.js";
|
|
4
4
|
import "./chunk-ZJ7UHBJS.js";
|
|
5
5
|
import {
|
|
6
6
|
isAssistantToolStub,
|
|
7
7
|
selectAllMsgs
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XP3VVAPG.js";
|
|
9
9
|
import {
|
|
10
10
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
11
11
|
BUILTIN_TITLE_LLM_CONFIG
|
|
@@ -15,10 +15,10 @@ import "./chunk-YYLHWIW6.js";
|
|
|
15
15
|
import "./chunk-AGGIDPCZ.js";
|
|
16
16
|
import {
|
|
17
17
|
runLlm
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UDVH2P4A.js";
|
|
19
19
|
import "./chunk-BFDFRLLQ.js";
|
|
20
20
|
import "./chunk-5RGU3J7P.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-6D2JFXLY.js";
|
|
22
22
|
import {
|
|
23
23
|
require_date_fns
|
|
24
24
|
} from "./chunk-M76ECQRD.js";
|