nolo-cli 0.171.0-alpha.1 → 0.172.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-YJW2HPFY.js → _executeModel-PVY4AXG4.js} +18 -18
- package/{agentDeleteCommand-O3EG3HS4.js → agentDeleteCommand-QYNICESQ.js} +20 -19
- package/{agentEmailCommands-AIWZNMRW.js → agentEmailCommands-QEJHRESH.js} +22 -21
- package/{agentListCommands-377PQ6K4.js → agentListCommands-MGMBNFAS.js} +14 -13
- package/{agentMachineCommands-TYL7KKSL.js → agentMachineCommands-SKOAHGVC.js} +11 -10
- package/{agentRecordCommands-YPRND72K.js → agentRecordCommands-2NVWBDQN.js} +21 -20
- package/{agentRunCommand-T7AQKKH5.js → agentRunCommand-2LHV37FZ.js} +22 -21
- package/{agentRuntimeLocal-7ZE2ZQAL.js → agentRuntimeLocal-K3777H5R.js} +10 -9
- package/{agentSlice-BHH2DZKN.js → agentSlice-QMOFHPJR.js} +1 -1
- package/{appDeleteCommands-LHOX4HM3.js → appDeleteCommands-3HZNWZ2V.js} +10 -9
- package/{appDeployCommands-A6CQQTI3.js → appDeployCommands-Q5BIBQE2.js} +10 -9
- package/{appDeployStatusCommands-7TTNQODL.js → appDeployStatusCommands-ZZFFVM3W.js} +10 -9
- package/{appGetCommands-22F4E37N.js → appGetCommands-7AAOXZQK.js} +10 -9
- package/{appListCommands-WCDOJUVV.js → appListCommands-H76IX2X5.js} +10 -9
- package/{chunk-Q7UPF643.js → chunk-2FAQDT6E.js} +1 -1
- package/chunk-2WZXXAQD.js +57 -0
- package/{chunk-BJWOOJX5.js → chunk-3XUE7WJA.js} +27 -23
- package/{chunk-7MBN2JZ5.js → chunk-54YLFF7P.js} +3 -3
- package/{chunk-CEYUVQYU.js → chunk-7OQ7IDU3.js} +13 -11
- package/{chunk-O3FUFEUI.js → chunk-7TBARDLF.js} +1 -46
- package/{chunk-SC5TDLTP.js → chunk-BE42X662.js} +4 -4
- package/{chunk-XHR22EKE.js → chunk-BKCR2JHG.js} +48 -3
- package/{chunk-EPMWJ7X7.js → chunk-CFLYUFMA.js} +8 -8
- package/{chunk-MIME4XKU.js → chunk-DNQ55DHN.js} +11 -11
- package/{chunk-X2Q5GT5J.js → chunk-EK3LIELB.js} +2 -2
- package/{chunk-AUGBRK3P.js → chunk-HBUKJB3W.js} +9 -2
- package/{chunk-JHXY4H3P.js → chunk-I33CJERI.js} +2 -57
- package/{chunk-K2NTGYVK.js → chunk-ISMHFI2Y.js} +1 -1
- package/{chunk-UPC23AAN.js → chunk-JCILHZJZ.js} +4 -4
- package/{chunk-AGAB26VE.js → chunk-JIGBVOHH.js} +10 -10
- package/{chunk-C2OYZYJ7.js → chunk-KUA3PPFK.js} +3 -3
- package/{chunk-6OYC7NDH.js → chunk-ME7N4YHG.js} +44 -55
- package/{chunk-P4V35AFD.js → chunk-MOOQN57G.js} +2 -2
- package/{chunk-BQSW7453.js → chunk-MTAWQNSU.js} +1 -1
- package/{chunk-22FIHMYU.js → chunk-PPR6G2U2.js} +2 -2
- package/{chunk-7L2HZQNN.js → chunk-SHPY7A3P.js} +101 -2
- package/{chunk-7CDMXZJA.js → chunk-TI7ZIWYR.js} +3 -3
- package/{chunk-ZJ66I757.js → chunk-UMVEB5QT.js} +9 -9
- package/{chunk-DWQD3JTX.js → chunk-UU4TLYRZ.js} +1 -1
- package/{chunk-WPOSH6PA.js → chunk-VAQ3EGPC.js} +2 -2
- package/{chunk-6OC2YMGH.js → chunk-XBJIESNS.js} +1 -1
- package/{chunk-UIVOLTFM.js → chunk-XUZQCRSA.js} +2 -2
- package/{chunk-72T5DXRH.js → chunk-YEOFTC2H.js} +8 -2
- package/{commandRegistry-EAPXP4BC.js → commandRegistry-D3V6AB3G.js} +40 -40
- package/{contentThunks-SJAKJV4V.js → contentThunks-P2GNXUKN.js} +6 -6
- package/{createAgentAutomationAction-IBSAZBSP.js → createAgentAutomationAction-PQA43W2W.js} +6 -6
- package/{createDialogAction-MQDTLASD.js → createDialogAction-ITOZ5TAM.js} +7 -7
- package/{createPageAction-EOPBBQMH.js → createPageAction-IKB3LOMU.js} +6 -6
- package/{dialogCommands-SV4M5HAV.js → dialogCommands-IZAQB6GY.js} +10 -9
- package/{dialogSlice-6CC3YDDL.js → dialogSlice-Y6WIZWTC.js} +5 -5
- package/{docCreateCommands-UC2CPMH7.js → docCreateCommands-U25MRSOL.js} +10 -9
- package/{docDeleteCommands-SRPTGMZ2.js → docDeleteCommands-F46A6FJZ.js} +10 -9
- package/{docReadCommands-U3TDUPOY.js → docReadCommands-DITPVWA3.js} +10 -9
- package/{docStore-RSBDE3UH.js → docStore-HRNZKKVS.js} +1 -1
- package/{docUpdateCommands-G5J5UKGP.js → docUpdateCommands-O447KO7Z.js} +10 -9
- package/{handleSendMessageAction-EM43KNSP.js → handleSendMessageAction-4OVVUVJ4.js} +13 -12
- package/index.js +4 -4
- package/{localRuntimeAdapter-N5WDXYSY.js → localRuntimeAdapter-CL3QW3OJ.js} +20 -19
- package/{machineCommands-L34XTTLG.js → machineCommands-T3VQCFHT.js} +21 -20
- package/{machineWsRunDispatch-IKI7FGKI.js → machineWsRunDispatch-IGX4UK4C.js} +21 -20
- package/package.json +1 -1
- package/{readlineWorkspace-ZANIHEDR.js → readlineWorkspace-3IZBF57U.js} +23 -22
- package/{runAgentClientLoop-HPF2WFFQ.js → runAgentClientLoop-RUBF4JIP.js} +16 -16
- package/{spaceCommands-6KPBWGGE.js → spaceCommands-FSATGIKW.js} +10 -9
- package/{streamAgentChatTurn-3SNWCCK2.js → streamAgentChatTurn-N7UJ6FFK.js} +23 -22
- package/{tools-7SMCO2GW.js → tools-Z7EJ6KIM.js} +11 -11
- package/{tuiSummaryLlmCaller-H6WX54WY.js → tuiSummaryLlmCaller-ZETARZOH.js} +10 -4
- package/{updateDialogTitleAction-XIMLNROU.js → updateDialogTitleAction-CEFNJE4T.js} +6 -6
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getModelContextWindow,
|
|
6
6
|
normalizeTimingMs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BKCR2JHG.js";
|
|
8
8
|
import {
|
|
9
9
|
BUILTIN_NOLO_AGENT_KEY
|
|
10
10
|
} from "./chunk-LOEO7LRC.js";
|
|
@@ -28,49 +28,6 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
asOptionalTrimmedString
|
|
30
30
|
} from "./chunk-G3SUCT4W.js";
|
|
31
|
-
import {
|
|
32
|
-
asTrimmedLowercaseString
|
|
33
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
34
|
-
|
|
35
|
-
// packages/agent-runtime/serverProxyPolicy.ts
|
|
36
|
-
var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
|
|
37
|
-
"antigravity",
|
|
38
|
-
"xai",
|
|
39
|
-
"chatgpt",
|
|
40
|
-
"claude",
|
|
41
|
-
"cursor"
|
|
42
|
-
]);
|
|
43
|
-
function isGoogleFamilyProvider(provider) {
|
|
44
|
-
const normalized = asTrimmedLowercaseString(provider);
|
|
45
|
-
return normalized === "google" || normalized.startsWith("google-");
|
|
46
|
-
}
|
|
47
|
-
function isOAuthApiKeyRef(value) {
|
|
48
|
-
const ref = asTrimmedLowercaseString(value);
|
|
49
|
-
return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
|
|
50
|
-
}
|
|
51
|
-
function shouldUseServerProxy(agentConfig, requestProvider) {
|
|
52
|
-
const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
|
|
53
|
-
if (isGoogleFamilyProvider(effectiveProvider)) {
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
return !!agentConfig.useServerProxy;
|
|
63
|
-
}
|
|
64
|
-
var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
|
|
65
|
-
function isRemoteCustomEndpoint(url) {
|
|
66
|
-
if (typeof url !== "string") return false;
|
|
67
|
-
try {
|
|
68
|
-
const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
|
|
69
|
-
return !LOCAL_HOSTS.has(host);
|
|
70
|
-
} catch {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
31
|
|
|
75
32
|
// packages/agent-runtime/devin/devinChannelWindows.ts
|
|
76
33
|
var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
|
|
@@ -420,8 +377,6 @@ var extractReferenceKeysFromMessage = (msg) => {
|
|
|
420
377
|
export {
|
|
421
378
|
DEFAULT_AUTO_EXECUTION_PROFILE,
|
|
422
379
|
resolveAutoExecutionProfile,
|
|
423
|
-
isOAuthApiKeyRef,
|
|
424
|
-
shouldUseServerProxy,
|
|
425
380
|
readCacheReadInputTokens,
|
|
426
381
|
readCacheCreationInputTokens,
|
|
427
382
|
devinChannelContextWindow,
|
|
@@ -11,12 +11,15 @@ import {
|
|
|
11
11
|
} from "./chunk-JLR5NWP2.js";
|
|
12
12
|
import {
|
|
13
13
|
isOAuthApiKeyRef
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BKCR2JHG.js";
|
|
15
15
|
import {
|
|
16
16
|
isOwnedAgentKey,
|
|
17
17
|
ownedAgentKey,
|
|
18
18
|
publicAgentKey
|
|
19
19
|
} from "./chunk-M2EJHDJP.js";
|
|
20
|
+
import {
|
|
21
|
+
getModelAbility
|
|
22
|
+
} from "./chunk-HLAL63BZ.js";
|
|
20
23
|
import {
|
|
21
24
|
isSubscriptionEndpoint,
|
|
22
25
|
isSubscriptionOAuthCredential
|
|
@@ -24,9 +27,6 @@ import {
|
|
|
24
27
|
import {
|
|
25
28
|
isAntigravityOAuthAgent
|
|
26
29
|
} from "./chunk-TSCI6X6C.js";
|
|
27
|
-
import {
|
|
28
|
-
getModelAbility
|
|
29
|
-
} from "./chunk-HLAL63BZ.js";
|
|
30
30
|
|
|
31
31
|
// packages/ai/agent/agentBilling.ts
|
|
32
32
|
function resolveBillingSource(candidate) {
|
|
@@ -1,15 +1,58 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokenCount
|
|
3
3
|
} from "./chunk-PSCNXBYA.js";
|
|
4
|
-
import {
|
|
5
|
-
MODEL_LOOKUP_MAP
|
|
6
|
-
} from "./chunk-GC64WGMD.js";
|
|
7
4
|
import {
|
|
8
5
|
ALL_MODELS
|
|
9
6
|
} from "./chunk-HLAL63BZ.js";
|
|
7
|
+
import {
|
|
8
|
+
MODEL_LOOKUP_MAP
|
|
9
|
+
} from "./chunk-GC64WGMD.js";
|
|
10
10
|
import {
|
|
11
11
|
isPlatformManagedProvider
|
|
12
12
|
} from "./chunk-5KTQVMCX.js";
|
|
13
|
+
import {
|
|
14
|
+
asTrimmedLowercaseString
|
|
15
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
16
|
+
|
|
17
|
+
// packages/agent-runtime/serverProxyPolicy.ts
|
|
18
|
+
var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
|
|
19
|
+
"antigravity",
|
|
20
|
+
"xai",
|
|
21
|
+
"chatgpt",
|
|
22
|
+
"claude",
|
|
23
|
+
"cursor"
|
|
24
|
+
]);
|
|
25
|
+
function isGoogleFamilyProvider(provider) {
|
|
26
|
+
const normalized = asTrimmedLowercaseString(provider);
|
|
27
|
+
return normalized === "google" || normalized.startsWith("google-");
|
|
28
|
+
}
|
|
29
|
+
function isOAuthApiKeyRef(value) {
|
|
30
|
+
const ref = asTrimmedLowercaseString(value);
|
|
31
|
+
return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
|
|
32
|
+
}
|
|
33
|
+
function shouldUseServerProxy(agentConfig, requestProvider) {
|
|
34
|
+
const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
|
|
35
|
+
if (isGoogleFamilyProvider(effectiveProvider)) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return !!agentConfig.useServerProxy;
|
|
45
|
+
}
|
|
46
|
+
var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
|
|
47
|
+
function isRemoteCustomEndpoint(url) {
|
|
48
|
+
if (typeof url !== "string") return false;
|
|
49
|
+
try {
|
|
50
|
+
const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
|
|
51
|
+
return !LOCAL_HOSTS.has(host);
|
|
52
|
+
} catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
13
56
|
|
|
14
57
|
// packages/core/chat/messageContentSerialize.ts
|
|
15
58
|
var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
|
|
@@ -1019,6 +1062,8 @@ export {
|
|
|
1019
1062
|
findModelContextWindow,
|
|
1020
1063
|
getModelContextWindow,
|
|
1021
1064
|
getModelInfo,
|
|
1065
|
+
isOAuthApiKeyRef,
|
|
1066
|
+
shouldUseServerProxy,
|
|
1022
1067
|
sha256Hex,
|
|
1023
1068
|
serializeMessageContent,
|
|
1024
1069
|
resolveCompressionTriggerRatio,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EK3LIELB.js";
|
|
11
11
|
import {
|
|
12
12
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
13
|
getAllToolRuns,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
selectSpaceContextLevel,
|
|
21
21
|
selectUserTonePreset,
|
|
22
22
|
uiCardFallback
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MOOQN57G.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveToolBaseUrl
|
|
26
26
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -32,15 +32,15 @@ import {
|
|
|
32
32
|
} from "./chunk-TDNAAXUQ.js";
|
|
33
33
|
import {
|
|
34
34
|
getDocState
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VAQ3EGPC.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-MTAWQNSU.js";
|
|
39
39
|
import {
|
|
40
40
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
41
41
|
buildPersonalizationDialogPolicyContext,
|
|
42
42
|
selectAllMsgs
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-DNQ55DHN.js";
|
|
44
44
|
import {
|
|
45
45
|
getCurrentSpaceIdRaw,
|
|
46
46
|
getViewMode
|
|
@@ -69,18 +69,18 @@ import {
|
|
|
69
69
|
} from "./chunk-WXOKJP3W.js";
|
|
70
70
|
import {
|
|
71
71
|
projectToolMessageContent
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-2WZXXAQD.js";
|
|
73
73
|
import {
|
|
74
74
|
attachmentKind,
|
|
75
75
|
normalizeAttachmentPart
|
|
76
76
|
} from "./chunk-WJZOQR2J.js";
|
|
77
77
|
import {
|
|
78
78
|
extractReferenceKeysFromMessage
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-7TBARDLF.js";
|
|
80
80
|
import {
|
|
81
81
|
getModelContextWindow,
|
|
82
82
|
planContextUsage
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-BKCR2JHG.js";
|
|
84
84
|
import {
|
|
85
85
|
asRecordOrEmpty
|
|
86
86
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-QYPE3TS3.js";
|
|
12
12
|
import {
|
|
13
13
|
runLlm
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-54YLFF7P.js";
|
|
15
15
|
import {
|
|
16
16
|
getApproxPricePerImage
|
|
17
17
|
} from "./chunk-4JH2UMJR.js";
|
|
@@ -101,10 +101,9 @@ import {
|
|
|
101
101
|
asOptionalJsonRecord,
|
|
102
102
|
devinChannelContextWindow,
|
|
103
103
|
extractReferenceKeysFromMessage,
|
|
104
|
-
isOAuthApiKeyRef,
|
|
105
104
|
normalizeUsage,
|
|
106
105
|
resolveAutoExecutionProfile
|
|
107
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-7TBARDLF.js";
|
|
108
107
|
import {
|
|
109
108
|
isDevinOAuthAgent
|
|
110
109
|
} from "./chunk-5ZUL4CUO.js";
|
|
@@ -119,9 +118,10 @@ import {
|
|
|
119
118
|
formatFileOperationsFromMessages,
|
|
120
119
|
formatMessagesForSummaryWithTruncation,
|
|
121
120
|
getModelInfo,
|
|
121
|
+
isOAuthApiKeyRef,
|
|
122
122
|
planCompression,
|
|
123
123
|
serializeMessageContent
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-BKCR2JHG.js";
|
|
125
125
|
import {
|
|
126
126
|
asRecordOrEmpty
|
|
127
127
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -11062,7 +11062,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
11062
11062
|
runtimeOptions: args.runtimeOptions
|
|
11063
11063
|
});
|
|
11064
11064
|
if (agentKeyToUse) {
|
|
11065
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
11065
|
+
const { streamAgentChatTurn } = await import("./agentSlice-QMOFHPJR.js");
|
|
11066
11066
|
await dispatch(
|
|
11067
11067
|
streamAgentChatTurn({
|
|
11068
11068
|
agentKey: agentKeyToUse,
|
|
@@ -13879,7 +13879,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13879
13879
|
}
|
|
13880
13880
|
if (isCurrentDialog) {
|
|
13881
13881
|
await thunkApi.dispatch(resetMsgs());
|
|
13882
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
13882
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-Y6WIZWTC.js");
|
|
13883
13883
|
dispatch(clearPendingAttachments2());
|
|
13884
13884
|
}
|
|
13885
13885
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -13887,15 +13887,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13887
13887
|
|
|
13888
13888
|
// packages/chat/dialog/dialogSlice.ts
|
|
13889
13889
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
13890
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
13890
|
+
const { createDialogAction } = await import("./createDialogAction-ITOZ5TAM.js");
|
|
13891
13891
|
return createDialogAction(args, thunkApi);
|
|
13892
13892
|
};
|
|
13893
13893
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
13894
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
13894
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-PQA43W2W.js");
|
|
13895
13895
|
return createAgentAutomationAction(args, thunkApi);
|
|
13896
13896
|
};
|
|
13897
13897
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
13898
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
13898
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-CEFNJE4T.js");
|
|
13899
13899
|
return updateDialogTitleAction(args, thunkApi);
|
|
13900
13900
|
};
|
|
13901
13901
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -13919,7 +13919,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
13919
13919
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
13920
13920
|
};
|
|
13921
13921
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
13922
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
13922
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-4OVVUVJ4.js");
|
|
13923
13923
|
return handleSendMessageAction(args, thunkApi);
|
|
13924
13924
|
};
|
|
13925
13925
|
function clearDialogState() {
|
|
@@ -13932,7 +13932,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
13932
13932
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
13933
13933
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
13934
13934
|
try {
|
|
13935
|
-
const { createDocState } = await import("./docStore-
|
|
13935
|
+
const { createDocState } = await import("./docStore-HRNZKKVS.js");
|
|
13936
13936
|
const pageKey = await createDocState(
|
|
13937
13937
|
{ slateData, title },
|
|
13938
13938
|
{ dispatch, getState }
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MOOQN57G.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-AGIM7IMJ.js";
|
|
22
22
|
import {
|
|
23
23
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DNQ55DHN.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentImageInputSupport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I33CJERI.js";
|
|
4
|
+
import {
|
|
5
|
+
TOOL_HAD_IMAGES,
|
|
6
|
+
hadToolImages
|
|
7
|
+
} from "./chunk-SHPY7A3P.js";
|
|
4
8
|
import {
|
|
5
9
|
asOptionalFiniteNumber
|
|
6
10
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -375,6 +379,10 @@ function sanitizeChatMessage(value) {
|
|
|
375
379
|
};
|
|
376
380
|
const toolCallId = asOptionalTrimmedString(value.tool_call_id) ?? asOptionalTrimmedString(value.toolCallId);
|
|
377
381
|
if (toolCallId) message.tool_call_id = toolCallId;
|
|
382
|
+
const metadata = isRecord(value.tool_result_metadata) ? value.tool_result_metadata : value.metadata;
|
|
383
|
+
if (role === "tool" && (hadToolImages(value) || isRecord(metadata) && metadata[TOOL_HAD_IMAGES] === true)) {
|
|
384
|
+
message.tool_result_metadata = { [TOOL_HAD_IMAGES]: true };
|
|
385
|
+
}
|
|
378
386
|
const toolCalls = sanitizeToolCalls(value.tool_calls);
|
|
379
387
|
if (toolCalls) message.tool_calls = toolCalls;
|
|
380
388
|
if (typeof value.reasoning_content === "string" && value.reasoning_content) {
|
|
@@ -427,7 +435,6 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
|
|
|
427
435
|
export {
|
|
428
436
|
extractImageUrlsFromMessages,
|
|
429
437
|
hasImageInRuntimeMessages,
|
|
430
|
-
IMAGE_OMITTED_PLACEHOLDER,
|
|
431
438
|
stripImagePartsFromMessages,
|
|
432
439
|
stripImagePartsForTextOnlyAgent,
|
|
433
440
|
resolveAgentRuntimeConfigFromRecord,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentCallPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XBJIESNS.js";
|
|
4
4
|
import {
|
|
5
5
|
SUBSCRIPTION_OAUTH_PROVIDERS
|
|
6
6
|
} from "./chunk-OQ3DOBYB.js";
|
|
@@ -94,61 +94,6 @@ var resolveAgentImageInputSupport = (agent) => {
|
|
|
94
94
|
return true;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
// packages/ai/agent/toolOutputPolicy.ts
|
|
98
|
-
var MAX_IN_TURN_TOOL_CONTENT_CHARS = 4e3;
|
|
99
|
-
var DEFAULT_TOOL_OUTPUT_PROFILE = {
|
|
100
|
-
maxChars: MAX_IN_TURN_TOOL_CONTENT_CHARS,
|
|
101
|
-
headRatio: 0.5
|
|
102
|
-
};
|
|
103
|
-
var TOOL_OUTPUT_PROFILES = {
|
|
104
|
-
readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
105
|
-
read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
106
|
-
readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
107
|
-
globFiles: { maxChars: 2800, headRatio: 0.85 },
|
|
108
|
-
execShell: { maxChars: 4e3, headRatio: 0.35 },
|
|
109
|
-
runCommand: { maxChars: 4e3, headRatio: 0.35 },
|
|
110
|
-
launchProcess: { maxChars: 2800, headRatio: 0.35 },
|
|
111
|
-
editFile: { maxChars: 1200, headRatio: 0.62 },
|
|
112
|
-
writeFile: { maxChars: 1e3, headRatio: 0.62 },
|
|
113
|
-
readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 },
|
|
114
|
-
// loadSkill 内联的是文档正文(SKILL.md 全文),与 readFile 同类,不该因为工具名未登记就退回
|
|
115
|
-
// DEFAULT 的 4000。历史事故(nolo-plan omitted middle)正是 headRatio 0.5 掐掉中段,把
|
|
116
|
-
// 「MUST / 禁止」所在的中段静默省略。取 4800(与 readFile 同级),不激进放大;headRatio 同 DEFAULT。
|
|
117
|
-
loadSkill: { maxChars: 4800, headRatio: 0.5 }
|
|
118
|
-
};
|
|
119
|
-
function resolveToolOutputProfile(toolName) {
|
|
120
|
-
return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
|
|
121
|
-
}
|
|
122
|
-
function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
|
|
123
|
-
const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
|
|
124
|
-
return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
|
|
125
|
-
}
|
|
126
|
-
function projectToolMessageContent(input) {
|
|
127
|
-
const { content, toolName } = input;
|
|
128
|
-
const maxChars = resolveToolOutputProfile(toolName).maxChars;
|
|
129
|
-
if (content.length <= maxChars) return content;
|
|
130
|
-
return clipToolText(
|
|
131
|
-
content,
|
|
132
|
-
maxChars,
|
|
133
|
-
resolveToolOutputProfile(toolName).headRatio,
|
|
134
|
-
`
|
|
135
|
-
\u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
|
|
139
|
-
const normalized = content.replace(/\r\n/g, "\n").trim();
|
|
140
|
-
if (normalized.length <= maxChars) return normalized;
|
|
141
|
-
if (maxChars <= marker.length + 2) return normalized.slice(0, maxChars);
|
|
142
|
-
const available = maxChars - marker.length;
|
|
143
|
-
const headChars = Math.max(1, Math.floor(available * headRatio));
|
|
144
|
-
const tailChars = Math.max(1, available - headChars);
|
|
145
|
-
return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
97
|
export {
|
|
149
|
-
resolveAgentImageInputSupport
|
|
150
|
-
resolveToolOutputProfile,
|
|
151
|
-
resolveHistoricalToolContentCap,
|
|
152
|
-
projectToolMessageContent,
|
|
153
|
-
clipToolText
|
|
98
|
+
resolveAgentImageInputSupport
|
|
154
99
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EK3LIELB.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-54YLFF7P.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillGuidancePromptBlock
|
|
12
12
|
} from "./chunk-3LNVSFTH.js";
|
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
resolveReasoningReplayOptions,
|
|
33
33
|
shouldStripReasoningContentForOutbound,
|
|
34
34
|
stablePromptCacheKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-SHPY7A3P.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveAgentCallPlan,
|
|
38
38
|
resolveClientWire
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XBJIESNS.js";
|
|
40
40
|
import {
|
|
41
41
|
createFileCredentialBroker
|
|
42
42
|
} from "./chunk-76YUTLOT.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PPR6G2U2.js";
|
|
9
9
|
import {
|
|
10
10
|
CONFIRMATION_INPUT_KEYS,
|
|
11
11
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
performFetchRequest,
|
|
15
15
|
sanitizeOutboundMessages,
|
|
16
16
|
stripModelToolArgs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JCILHZJZ.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UMVEB5QT.js";
|
|
22
22
|
import {
|
|
23
23
|
classifyApiError,
|
|
24
24
|
classifyGenerationError,
|
|
25
25
|
extractErrorDiagnostics
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EK3LIELB.js";
|
|
27
27
|
import {
|
|
28
28
|
createSSEParser,
|
|
29
29
|
createToolRunId,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
toolRunSetPending,
|
|
33
33
|
toolRunStarted,
|
|
34
34
|
toolRunSucceeded
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MOOQN57G.js";
|
|
36
36
|
import {
|
|
37
37
|
getPublicImageAgentMode
|
|
38
38
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -42,10 +42,10 @@ import {
|
|
|
42
42
|
messageStreaming,
|
|
43
43
|
toolResultNeedsUserConfirmation,
|
|
44
44
|
updateToolMessage
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-DNQ55DHN.js";
|
|
46
46
|
import {
|
|
47
47
|
streamAgentChatTurn
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-54YLFF7P.js";
|
|
49
49
|
import {
|
|
50
50
|
getCurrentSpaceId
|
|
51
51
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -85,13 +85,13 @@ import {
|
|
|
85
85
|
} from "./chunk-56GBUMO5.js";
|
|
86
86
|
import {
|
|
87
87
|
normalizeChatCompletionsBodyForProvider
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-SHPY7A3P.js";
|
|
89
89
|
import {
|
|
90
90
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-7TBARDLF.js";
|
|
92
92
|
import {
|
|
93
93
|
getModelInfo
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-BKCR2JHG.js";
|
|
95
95
|
import {
|
|
96
96
|
isAbortError
|
|
97
97
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3XUE7WJA.js";
|
|
5
5
|
import {
|
|
6
6
|
t
|
|
7
7
|
} from "./chunk-TDX2L4W2.js";
|
|
8
8
|
import {
|
|
9
9
|
clipMultilineText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MOOQN57G.js";
|
|
11
11
|
import {
|
|
12
12
|
runLocalAgentTurn
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ME7N4YHG.js";
|
|
14
14
|
import {
|
|
15
15
|
applyToolSurfaceConstraints
|
|
16
16
|
} from "./chunk-6J227QXV.js";
|