nolo-cli 0.177.0-alpha.3 → 0.178.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-V4F6LXUR.js → _executeModel-ZP6M2EWK.js} +14 -14
- package/{agentDeleteCommand-ZW6A5N5R.js → agentDeleteCommand-7TH3MY5U.js} +16 -16
- package/{agentEmailCommands-PSWCVDBS.js → agentEmailCommands-LVSCPVGC.js} +18 -18
- package/{agentListCommands-NYYOKQ2U.js → agentListCommands-67HVR7KB.js} +7 -7
- package/{agentMachineCommands-3QKXW7CS.js → agentMachineCommands-36IZWYUV.js} +8 -8
- package/{agentRecordCommands-WVMYMRVI.js → agentRecordCommands-4AIFNXVY.js} +17 -17
- package/{agentRunCommand-VT7XPW4E.js → agentRunCommand-3B224VOA.js} +18 -18
- package/{agentRuntimeLocal-OIEOKQ26.js → agentRuntimeLocal-I4J6XDO7.js} +7 -7
- package/{agentSlice-QNH6SH4J.js → agentSlice-XYVD7VDW.js} +1 -1
- package/{appDeleteCommands-DJBT6TXH.js → appDeleteCommands-VBI7C4IO.js} +7 -7
- package/{appDeployCommands-PO2OTNLX.js → appDeployCommands-FYUG5XWE.js} +7 -7
- package/{appDeployStatusCommands-I65SVQFQ.js → appDeployStatusCommands-TYHJOMUA.js} +7 -7
- package/{appGetCommands-NBSDDOG4.js → appGetCommands-HINYK5UT.js} +7 -7
- package/{appListCommands-NUDI4I6D.js → appListCommands-NWDNQT4A.js} +7 -7
- package/{authCommand-R2VRZLJY.js → authCommand-UIF5UTYV.js} +3 -3
- package/{chunk-33A622FT.js → chunk-CIM3IW2X.js} +1 -1
- package/{chunk-XEAOB5YS.js → chunk-CR5WXQX7.js} +2 -2
- package/{chunk-3TPHYXLU.js → chunk-CUVJE3L5.js} +2 -2
- package/{chunk-KYAMW3AY.js → chunk-E2BESSAW.js} +8 -5
- package/{chunk-PSJXWKPQ.js → chunk-EEEBL4MX.js} +8 -8
- package/{chunk-QABYIMXP.js → chunk-FSTHTTI6.js} +2 -2
- package/{chunk-KVCFBIRU.js → chunk-GPA3EA3Q.js} +8 -8
- package/{chunk-SLSWIH7D.js → chunk-IAOVXFL7.js} +2 -2
- package/{chunk-OD6ENIKN.js → chunk-IU4FJDRU.js} +3 -3
- package/{chunk-AEZBL2MY.js → chunk-JDCX5RWD.js} +3 -3
- package/{chunk-NCBXTFBP.js → chunk-KMSMIOOL.js} +11 -9
- package/{chunk-OEVWFVSS.js → chunk-L7PTHI3I.js} +3 -3
- package/{chunk-45QG4FAQ.js → chunk-LM7VJUSD.js} +1 -1
- package/{chunk-STT5PIQ5.js → chunk-LOCHKPC4.js} +21 -21
- package/{chunk-SDONLCYB.js → chunk-LRXTGAZ4.js} +5 -5
- package/{chunk-NS3FGNV6.js → chunk-LY4HX6OD.js} +9 -9
- package/{chunk-32Z3HRB4.js → chunk-M7ZURZLR.js} +2 -2
- package/{chunk-XWKEZYHG.js → chunk-NQKFBJD4.js} +1 -1
- package/{chunk-SOY7VHZN.js → chunk-P2BGRAW7.js} +5 -3
- package/{chunk-KZMDDWPY.js → chunk-PP4TMS3T.js} +3 -3
- package/{chunk-UVOA25PV.js → chunk-UTZF3X4Z.js} +2 -2
- package/{chunk-3QTBKJPI.js → chunk-UVPKOBVG.js} +9 -8
- package/{chunk-G3Y3E6JT.js → chunk-X7YSFSY3.js} +3 -3
- package/{chunk-D6QFFZVF.js → chunk-YO776XHS.js} +6 -6
- package/{chunk-VYQMMIBR.js → chunk-YOXGSXOV.js} +8 -8
- package/{commandRegistry-QST6FMJ6.js → commandRegistry-YGDYRIAX.js} +47 -47
- package/{contentThunks-BMJI3JJA.js → contentThunks-WNBEFSCD.js} +3 -3
- package/{createAgentAutomationAction-VC3PLYUE.js → createAgentAutomationAction-NTL5ST3J.js} +3 -3
- package/{createDialogAction-VAB5FNNF.js → createDialogAction-JWGDTE6S.js} +4 -4
- package/{createPageAction-QECNYENN.js → createPageAction-FPM5RD4C.js} +3 -3
- package/{dialogCommands-PQPI2B4F.js → dialogCommands-D4MNLDBH.js} +7 -7
- package/{dialogSlice-JOMW24BQ.js → dialogSlice-QVQO4JCU.js} +2 -2
- package/{docCreateCommands-K4KZUG7I.js → docCreateCommands-765YJTNP.js} +7 -7
- package/{docDeleteCommands-S53LJIXM.js → docDeleteCommands-G5U77546.js} +7 -7
- package/{docReadCommands-ACBGMNCO.js → docReadCommands-5YU7WGGT.js} +7 -7
- package/{docStore-4KT7EHZO.js → docStore-VN2HSHLZ.js} +1 -1
- package/{docUpdateCommands-LL7IVHSL.js → docUpdateCommands-H2AHPZRW.js} +7 -7
- package/{handleSendMessageAction-OGUIPOMS.js → handleSendMessageAction-DMXH4YLX.js} +8 -8
- package/index.js +4 -4
- package/{localRuntimeAdapter-ZCRX2PAA.js → localRuntimeAdapter-CQH4RFZC.js} +16 -16
- package/{machineCommands-KYLK4EMZ.js → machineCommands-TVCJZ5K5.js} +17 -17
- package/{machineWsRunDispatch-5QYFBWBB.js → machineWsRunDispatch-663CSUA3.js} +17 -17
- package/package.json +1 -1
- package/{readlineWorkspace-PWT6GHCI.js → readlineWorkspace-C3FPP5KC.js} +18 -18
- package/{runAgentClientLoop-RDYMQTSB.js → runAgentClientLoop-J3CTCBSI.js} +12 -12
- package/{spaceCommands-HKDI3T3V.js → spaceCommands-2ESFYAZG.js} +7 -7
- package/{streamAgentChatTurn-UOBJLR2V.js → streamAgentChatTurn-Z4DGKLGP.js} +16 -16
- package/{tools-B55PB6ML.js → tools-A2L3DK2Y.js} +7 -7
- package/{tuiSummaryLlmCaller-H2CLON2B.js → tuiSummaryLlmCaller-A6T54UJ3.js} +4 -4
- package/{updateDialogTitleAction-NPNSXH5Z.js → updateDialogTitleAction-WM5YYYFZ.js} +3 -3
|
@@ -18,23 +18,23 @@ import "./chunk-RPZNVBA5.js";
|
|
|
18
18
|
import "./chunk-NBTY7YJF.js";
|
|
19
19
|
import "./chunk-VF4K2QE6.js";
|
|
20
20
|
import "./chunk-UAD2WT54.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-UVPKOBVG.js";
|
|
22
|
+
import "./chunk-KMSMIOOL.js";
|
|
23
23
|
import "./chunk-ZNFJWEN4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-YO776XHS.js";
|
|
25
25
|
import "./chunk-HNUWUO75.js";
|
|
26
26
|
import "./chunk-CHOZJMJS.js";
|
|
27
27
|
import "./chunk-PWTNI4N7.js";
|
|
28
28
|
import "./chunk-HIVDQPQR.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CR5WXQX7.js";
|
|
30
30
|
import "./chunk-2WZXXAQD.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-P2BGRAW7.js";
|
|
32
32
|
import "./chunk-G6OOUQWJ.js";
|
|
33
33
|
import "./chunk-56GBUMO5.js";
|
|
34
34
|
import "./chunk-WJZOQR2J.js";
|
|
35
35
|
import "./chunk-ZEOR6XPJ.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-JDCX5RWD.js";
|
|
37
|
+
import "./chunk-E2BESSAW.js";
|
|
38
38
|
import "./chunk-2GRXE3YJ.js";
|
|
39
39
|
import "./chunk-JLR5NWP2.js";
|
|
40
40
|
import "./chunk-XAFCJN32.js";
|
|
@@ -18,23 +18,23 @@ import "./chunk-RPZNVBA5.js";
|
|
|
18
18
|
import "./chunk-NBTY7YJF.js";
|
|
19
19
|
import "./chunk-VF4K2QE6.js";
|
|
20
20
|
import "./chunk-UAD2WT54.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-UVPKOBVG.js";
|
|
22
|
+
import "./chunk-KMSMIOOL.js";
|
|
23
23
|
import "./chunk-ZNFJWEN4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-YO776XHS.js";
|
|
25
25
|
import "./chunk-HNUWUO75.js";
|
|
26
26
|
import "./chunk-CHOZJMJS.js";
|
|
27
27
|
import "./chunk-PWTNI4N7.js";
|
|
28
28
|
import "./chunk-HIVDQPQR.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CR5WXQX7.js";
|
|
30
30
|
import "./chunk-2WZXXAQD.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-P2BGRAW7.js";
|
|
32
32
|
import "./chunk-G6OOUQWJ.js";
|
|
33
33
|
import "./chunk-56GBUMO5.js";
|
|
34
34
|
import "./chunk-WJZOQR2J.js";
|
|
35
35
|
import "./chunk-ZEOR6XPJ.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-JDCX5RWD.js";
|
|
37
|
+
import "./chunk-E2BESSAW.js";
|
|
38
38
|
import "./chunk-2GRXE3YJ.js";
|
|
39
39
|
import "./chunk-JLR5NWP2.js";
|
|
40
40
|
import "./chunk-XAFCJN32.js";
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
detectLocalDevinCredentials,
|
|
66
66
|
extractDevinToken,
|
|
67
67
|
fetchAntigravityCloudCodeCompletion
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-KMSMIOOL.js";
|
|
69
69
|
import "./chunk-HNUWUO75.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-P2BGRAW7.js";
|
|
71
|
+
import "./chunk-E2BESSAW.js";
|
|
72
72
|
import "./chunk-XAFCJN32.js";
|
|
73
73
|
import "./chunk-5ZUL4CUO.js";
|
|
74
74
|
import "./chunk-UKZX3NHN.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentImageInputSupport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P2BGRAW7.js";
|
|
4
4
|
import {
|
|
5
5
|
TOOL_HAD_IMAGES,
|
|
6
6
|
hadToolImages
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E2BESSAW.js";
|
|
8
8
|
import {
|
|
9
9
|
asOptionalFiniteNumber
|
|
10
10
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -333,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
333
333
|
).unwrap();
|
|
334
334
|
if (dbSpaceId) {
|
|
335
335
|
try {
|
|
336
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
336
|
+
const { updateContentTitle } = await import("./contentThunks-WNBEFSCD.js");
|
|
337
337
|
await dispatch(
|
|
338
338
|
updateContentTitle({
|
|
339
339
|
spaceId: dbSpaceId,
|
|
@@ -372,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
async function createDocState(args, thunkApi) {
|
|
375
|
-
const { createPageAction } = await import("./createPageAction-
|
|
375
|
+
const { createPageAction } = await import("./createPageAction-FPM5RD4C.js");
|
|
376
376
|
return createPageAction(args, thunkApi);
|
|
377
377
|
}
|
|
378
378
|
function subscribe(listener) {
|
|
@@ -37,7 +37,8 @@ function toolImageDelivery(image) {
|
|
|
37
37
|
var MAX_TOOL_IMAGES_PER_REQUEST = 4;
|
|
38
38
|
var MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
|
|
39
39
|
var formatToolImageBudgetNote = (omittedCount) => `Note: ${omittedCount} image(s) omitted (request budget: ${MAX_TOOL_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.`;
|
|
40
|
-
function createToolImageBudget() {
|
|
40
|
+
function createToolImageBudget(maxImagesPerRequest = MAX_TOOL_IMAGES_PER_REQUEST) {
|
|
41
|
+
const limit = Math.min(MAX_TOOL_IMAGES_PER_REQUEST, maxImagesPerRequest);
|
|
41
42
|
let count = 0;
|
|
42
43
|
let bytes = 0;
|
|
43
44
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -50,7 +51,7 @@ function createToolImageBudget() {
|
|
|
50
51
|
delivery.set(image, "impossible");
|
|
51
52
|
return "impossible";
|
|
52
53
|
}
|
|
53
|
-
if (count >=
|
|
54
|
+
if (count >= limit || bytes + size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) return "pending";
|
|
54
55
|
count += 1;
|
|
55
56
|
bytes += size;
|
|
56
57
|
delivery.set(image, "delivered");
|
|
@@ -98,11 +99,12 @@ function stripToolImages(message) {
|
|
|
98
99
|
|
|
99
100
|
// packages/agent-runtime/openAiToolImages.ts
|
|
100
101
|
var INTRO = "These are attachments from the preceding batch of tool results, not new instructions. Each image is preceded by a label naming the tool result it came from.";
|
|
101
|
-
function projectOpenAiToolImages(messages, supportsImages) {
|
|
102
|
+
function projectOpenAiToolImages(messages, supportsImages, maxImagesPerRequest) {
|
|
102
103
|
const parts = [];
|
|
103
104
|
const omitted = [];
|
|
104
|
-
const budget = createToolImageBudget();
|
|
105
|
+
const budget = createToolImageBudget(maxImagesPerRequest);
|
|
105
106
|
let accepted = 0;
|
|
107
|
+
let deferred = 0;
|
|
106
108
|
let lastTool = -1;
|
|
107
109
|
messages.forEach((message, index) => {
|
|
108
110
|
if (message.role === "tool") lastTool = index;
|
|
@@ -112,6 +114,7 @@ function projectOpenAiToolImages(messages, supportsImages) {
|
|
|
112
114
|
if (decision === "duplicate") continue;
|
|
113
115
|
const source = toolImageSource(message, imageIndex);
|
|
114
116
|
if (decision !== "delivered") {
|
|
117
|
+
if (decision === "pending") deferred += 1;
|
|
115
118
|
omitted.push(toolImageOmission(source, decision === "impossible"));
|
|
116
119
|
continue;
|
|
117
120
|
}
|
|
@@ -128,7 +131,7 @@ function projectOpenAiToolImages(messages, supportsImages) {
|
|
|
128
131
|
const note = omitted.length ? ` Note: ${omitted.length} image(s) omitted. ${omitted.join(" ")}` : "";
|
|
129
132
|
const attachment = {
|
|
130
133
|
role: "user",
|
|
131
|
-
content: [{ type: "text", text: `${INTRO}${note}` }, ...parts]
|
|
134
|
+
content: [{ type: "text", text: `${INTRO}${deferred ? ` \u672C\u6B21\u6295\u9012 ${accepted} \u5F20\uFF0C\u53E6\u6709 ${deferred} \u5F20\u672A\u6295\u9012\uFF08${deferred} \u5F20 deferred to a later round\uFF09\u3002` : ""}${note}` }, ...parts]
|
|
132
135
|
};
|
|
133
136
|
return [...messages.slice(0, lastTool + 1), attachment, ...messages.slice(lastTool + 1)];
|
|
134
137
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IAOVXFL7.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-IU4FJDRU.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GPA3EA3Q.js";
|
|
22
22
|
import {
|
|
23
23
|
classifyApiError,
|
|
24
24
|
classifyGenerationError,
|
|
25
25
|
extractErrorDiagnostics
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UTZF3X4Z.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-FSTHTTI6.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-YOXGSXOV.js";
|
|
46
46
|
import {
|
|
47
47
|
streamAgentChatTurn
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-PP4TMS3T.js";
|
|
49
49
|
import {
|
|
50
50
|
getCurrentSpaceId
|
|
51
51
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
} from "./chunk-56GBUMO5.js";
|
|
86
86
|
import {
|
|
87
87
|
normalizeChatCompletionsBodyForProvider
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-JDCX5RWD.js";
|
|
89
89
|
import {
|
|
90
90
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
91
91
|
} from "./chunk-T7HBI3WZ.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-VYNMQ6HW.js";
|
|
9
9
|
import {
|
|
10
10
|
fetchAndCacheTableRows
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LM7VJUSD.js";
|
|
12
12
|
import {
|
|
13
13
|
require_react
|
|
14
14
|
} from "./chunk-YDH3FDFQ.js";
|
|
@@ -521,7 +521,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
521
521
|
if (!executionInput) {
|
|
522
522
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
523
523
|
}
|
|
524
|
-
const { findToolExecutor } = await import("./tools-
|
|
524
|
+
const { findToolExecutor } = await import("./tools-A2L3DK2Y.js");
|
|
525
525
|
const { executor } = findToolExecutor(run.toolName);
|
|
526
526
|
toolRunStarted({
|
|
527
527
|
id: run.id,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toolRunUpdated,
|
|
21
21
|
uiCardFallback,
|
|
22
22
|
waitForAbortableDelay
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FSTHTTI6.js";
|
|
24
24
|
import {
|
|
25
25
|
isGatewayHttpStatus
|
|
26
26
|
} from "./chunk-NF64D32W.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./chunk-VF4K2QE6.js";
|
|
65
65
|
import {
|
|
66
66
|
createDocState
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-CUVJE3L5.js";
|
|
68
68
|
import {
|
|
69
69
|
addMemberSpace,
|
|
70
70
|
fetchAuthoritativeRemoteSpace,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
} from "./chunk-BAWAKW7X.js";
|
|
80
80
|
import {
|
|
81
81
|
createDialogAction
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-M7ZURZLR.js";
|
|
83
83
|
import {
|
|
84
84
|
setDialogExtraReferencesAction
|
|
85
85
|
} from "./chunk-IF7V3CBU.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
updateContentCategory,
|
|
103
103
|
updateContentTitle,
|
|
104
104
|
writeStoredCollapsedCategories
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-LM7VJUSD.js";
|
|
106
106
|
import {
|
|
107
107
|
buildDatabaseFileContentUrl,
|
|
108
108
|
deleteDialog,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
selectMsgById,
|
|
116
116
|
uiAskChoiceFunc,
|
|
117
117
|
uiAskChoiceFunctionSchema
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-YOXGSXOV.js";
|
|
119
119
|
import {
|
|
120
120
|
buildMediaToolConfirmation,
|
|
121
121
|
normalizeMediaConfirmExecutionRevision
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
runLlm,
|
|
127
127
|
streamAgentChatTurn,
|
|
128
128
|
updateAgent
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-PP4TMS3T.js";
|
|
130
130
|
import {
|
|
131
131
|
getCurrentSpaceId,
|
|
132
132
|
getCurrentSpaceIdRaw,
|
|
@@ -3882,7 +3882,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
3882
3882
|
const deletedDialogIds = [];
|
|
3883
3883
|
const deletedDialogKeys = [];
|
|
3884
3884
|
const failures = [];
|
|
3885
|
-
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-
|
|
3885
|
+
const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-QVQO4JCU.js");
|
|
3886
3886
|
for (const target of targets) {
|
|
3887
3887
|
try {
|
|
3888
3888
|
await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
|
|
@@ -18563,7 +18563,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
18563
18563
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
18564
18564
|
};
|
|
18565
18565
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
18566
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
18566
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-VN2HSHLZ.js");
|
|
18567
18567
|
if (getDocState().pageKey === id) {
|
|
18568
18568
|
applyExternalDocUpdate({
|
|
18569
18569
|
slateData: finalSlateData,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTZF3X4Z.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PP4TMS3T.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillGuidancePromptBlock
|
|
12
12
|
} from "./chunk-3LNVSFTH.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveReasoningReplayOptions,
|
|
33
33
|
shouldStripReasoningContentForOutbound,
|
|
34
34
|
stablePromptCacheKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JDCX5RWD.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveAgentCallPlan,
|
|
38
38
|
resolveClientWire
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
hadToolImages,
|
|
8
8
|
projectOpenAiToolImages,
|
|
9
9
|
toolImages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E2BESSAW.js";
|
|
11
11
|
import {
|
|
12
12
|
getModelContextWindow
|
|
13
13
|
} from "./chunk-7ZGMQZ5D.js";
|
|
@@ -99,7 +99,7 @@ var toResponsesTools = (tools) => {
|
|
|
99
99
|
};
|
|
100
100
|
var convertMessagesToResponsesInput = (messages, options) => {
|
|
101
101
|
const input = [];
|
|
102
|
-
const imageBudget = createToolImageBudget();
|
|
102
|
+
const imageBudget = createToolImageBudget(options?.maxImagesPerRequest);
|
|
103
103
|
let acceptedImages = 0;
|
|
104
104
|
for (const message of messages) {
|
|
105
105
|
if (!message?.role) continue;
|
|
@@ -1101,7 +1101,7 @@ function findAgentStatePairingIssues(messages) {
|
|
|
1101
1101
|
return issues;
|
|
1102
1102
|
}
|
|
1103
1103
|
function toOpenAiCompatibleMessages(messages, options) {
|
|
1104
|
-
return projectOpenAiToolImages(messages, options?.supportsToolImages === true).map(
|
|
1104
|
+
return projectOpenAiToolImages(messages, options?.supportsToolImages === true, options?.maxImagesPerRequest).map(
|
|
1105
1105
|
(message) => preserveAgentStateFields(message, {
|
|
1106
1106
|
role: message.role,
|
|
1107
1107
|
content: message.content ?? ""
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HNUWUO75.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveToolImagePolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P2BGRAW7.js";
|
|
7
7
|
import {
|
|
8
8
|
projectOpenAiToolImages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-E2BESSAW.js";
|
|
10
10
|
import {
|
|
11
11
|
getAntigravityUserAgent,
|
|
12
12
|
readAntigravityProjectId,
|
|
@@ -203,7 +203,8 @@ function convertOpenAiMessagesToGemini(messages, options) {
|
|
|
203
203
|
);
|
|
204
204
|
const effectiveMessages = projectOpenAiToolImages(
|
|
205
205
|
sanitizedMessages,
|
|
206
|
-
options.supportsToolImages === true
|
|
206
|
+
options.supportsToolImages === true,
|
|
207
|
+
options.maxImagesPerRequest
|
|
207
208
|
);
|
|
208
209
|
const contents = [];
|
|
209
210
|
const systemTexts = [];
|
|
@@ -640,16 +641,17 @@ function shouldUseGeminiNativeToolRoute(provider, model, tools, isImageModel) {
|
|
|
640
641
|
return provider === "google" && !isImageModel(model) && isGemini3Model(model) && Array.isArray(tools) && tools.length > 0;
|
|
641
642
|
}
|
|
642
643
|
function buildGeminiGenerateContentRequest(args) {
|
|
643
|
-
const
|
|
644
|
+
const toolImagePolicy = resolveToolImagePolicy(args.toolImagePolicy ?? {
|
|
644
645
|
routeKind: "gemini-native",
|
|
645
646
|
hasVision: args.supportsToolImages,
|
|
646
647
|
legacySupportsToolImages: args.supportsToolImages ?? false
|
|
647
|
-
})
|
|
648
|
+
});
|
|
648
649
|
const { contents, systemTexts } = convertOpenAiMessagesToGemini(
|
|
649
650
|
args.messages,
|
|
650
651
|
{
|
|
651
652
|
attachSkipThoughtSignature: args.attachSkipThoughtSignature,
|
|
652
|
-
supportsToolImages
|
|
653
|
+
supportsToolImages: toolImagePolicy.supportsToolImages,
|
|
654
|
+
maxImagesPerRequest: toolImagePolicy.maxImagesPerRequest
|
|
653
655
|
}
|
|
654
656
|
);
|
|
655
657
|
const request = { contents };
|
|
@@ -691,15 +693,15 @@ function buildCloudCodeAssistPayload(args) {
|
|
|
691
693
|
const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
|
|
692
694
|
const quirks = resolveGeminiModelQuirks(model);
|
|
693
695
|
const isClaude = quirks.isClaudeCrossModel;
|
|
694
|
-
const
|
|
696
|
+
const toolImagePolicy = resolveToolImagePolicy({
|
|
695
697
|
...args.agentConfig,
|
|
696
698
|
routeKind: "antigravity",
|
|
697
699
|
model,
|
|
698
700
|
hasVision: args.agentConfig.hasVision
|
|
699
|
-
})
|
|
701
|
+
});
|
|
700
702
|
const { contents, systemTexts } = convertOpenAiMessagesToGemini(rawMessages, {
|
|
701
703
|
attachSkipThoughtSignature: quirks.allowsThoughtSignatureSentinel,
|
|
702
|
-
|
|
704
|
+
...toolImagePolicy
|
|
703
705
|
});
|
|
704
706
|
if (contents.length === 0) {
|
|
705
707
|
throw new Error("Antigravity Cloud Code Assist request has no user/model contents.");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UTZF3X4Z.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YOXGSXOV.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
extractReasoningFromResponseOutput,
|
|
13
13
|
extractTextFromResponseOutput,
|
|
14
14
|
extractToolCallsFromResponseOutput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JDCX5RWD.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
inlineImageUrlsForCustomProvider,
|
|
66
66
|
prepareTools
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-IAOVXFL7.js";
|
|
68
68
|
import {
|
|
69
69
|
getServerProviderSecret
|
|
70
70
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
resolveCliLocalRuntimeKeyCapability,
|
|
87
87
|
resolveCliLocalSpawnDispatch,
|
|
88
88
|
resolveStartAgentRunCwd
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-GPA3EA3Q.js";
|
|
90
90
|
import {
|
|
91
91
|
deriveCredentialGroup,
|
|
92
92
|
deriveCustomProviderCredentialGroup
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
} from "./chunk-KFHREHUQ.js";
|
|
98
98
|
import {
|
|
99
99
|
resolveAgentRequiredPackIds
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FSTHTTI6.js";
|
|
101
101
|
import {
|
|
102
102
|
applyBuiltinAgentRuntimeOverride,
|
|
103
103
|
applyTokenUsageToDayStats,
|
|
@@ -106,14 +106,14 @@ import {
|
|
|
106
106
|
resolveBuiltinPlatformAgentConfig,
|
|
107
107
|
runKeyed,
|
|
108
108
|
validateAskChoiceInput
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-YOXGSXOV.js";
|
|
110
110
|
import {
|
|
111
111
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
112
112
|
BUILTIN_TITLE_LLM_CONFIG
|
|
113
113
|
} from "./chunk-523DITKR.js";
|
|
114
114
|
import {
|
|
115
115
|
fetchServerSyncedCredential
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-PP4TMS3T.js";
|
|
117
117
|
import {
|
|
118
118
|
isTombstoneRecord
|
|
119
119
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
runExecShellGates,
|
|
171
171
|
validateConfiguredRootExecutionLease,
|
|
172
172
|
verifyOwnerRouteAck
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-UVPKOBVG.js";
|
|
174
174
|
import {
|
|
175
175
|
accumulateGeminiChunks,
|
|
176
176
|
buildGeminiGenerateContentRequest,
|
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
resolveAntigravityFinishReason,
|
|
183
183
|
resolveGeminiModelQuirks,
|
|
184
184
|
shouldUseGeminiNativeToolRoute
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-KMSMIOOL.js";
|
|
186
186
|
import {
|
|
187
187
|
PlatformStreamInterruptedError,
|
|
188
188
|
buildPlatformChatCompletionRequest,
|
|
@@ -193,27 +193,27 @@ import {
|
|
|
193
193
|
readPlatformChatSseCompletion,
|
|
194
194
|
resolvePlatformChatProviderConfig,
|
|
195
195
|
shouldUsePlatformChatProvider
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-YO776XHS.js";
|
|
197
197
|
import {
|
|
198
198
|
readSseDataValues,
|
|
199
199
|
readSseFrames
|
|
200
200
|
} from "./chunk-HNUWUO75.js";
|
|
201
201
|
import {
|
|
202
202
|
resolveAgentRuntimeConfigFromRecord
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-CR5WXQX7.js";
|
|
204
204
|
import {
|
|
205
205
|
resolveHistoricalToolContentCap
|
|
206
206
|
} from "./chunk-2WZXXAQD.js";
|
|
207
207
|
import {
|
|
208
208
|
resolveToolImagePolicy
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-P2BGRAW7.js";
|
|
210
210
|
import {
|
|
211
211
|
collectStablePromptPrefix,
|
|
212
212
|
convertMessagesToResponsesInput,
|
|
213
213
|
findAgentStatePairingIssues,
|
|
214
214
|
stablePromptCacheKey,
|
|
215
215
|
toResponsesTools
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-JDCX5RWD.js";
|
|
217
217
|
import {
|
|
218
218
|
EMPTY_TOOL_RESULT_TEXT,
|
|
219
219
|
createToolImageBudget,
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
toolImageOmission,
|
|
223
223
|
toolImageSource,
|
|
224
224
|
toolImages
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-E2BESSAW.js";
|
|
226
226
|
import {
|
|
227
227
|
buildNoloWorkspaceOpenAiTools,
|
|
228
228
|
filterClientNoloWorkspaceToolNames,
|
|
@@ -796,7 +796,7 @@ function buildAnthropicMessagesBody(args) {
|
|
|
796
796
|
system.push({ type: "text", text: args.agentConfig.prompt.trim() });
|
|
797
797
|
}
|
|
798
798
|
const messages = [];
|
|
799
|
-
const imageBudget = createToolImageBudget();
|
|
799
|
+
const imageBudget = createToolImageBudget(resolveToolImagePolicy({ ...args.agentConfig, routeKind: "anthropic" }).maxImagesPerRequest);
|
|
800
800
|
for (const raw of rawMessages) {
|
|
801
801
|
if (!raw || typeof raw !== "object") continue;
|
|
802
802
|
const message = raw;
|
|
@@ -2446,7 +2446,7 @@ function collectInstructions(messages, agentPrompt) {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
function convertMessagesToCodexInput(messages, supportsToolImages = false) {
|
|
2448
2448
|
const normalizedToolImages = typeof supportsToolImages === "boolean" ? supportsToolImages : supportsToolImages.supportsToolImages === true;
|
|
2449
|
-
return convertMessagesToResponsesInput(messages, { supportsToolImages: normalizedToolImages }).map((item) => {
|
|
2449
|
+
return convertMessagesToResponsesInput(messages, { supportsToolImages: normalizedToolImages, maxImagesPerRequest: typeof supportsToolImages === "boolean" ? void 0 : supportsToolImages.maxImagesPerRequest }).map((item) => {
|
|
2450
2450
|
if (item.type !== "reasoning") return item;
|
|
2451
2451
|
return {
|
|
2452
2452
|
type: "reasoning",
|
|
@@ -2468,7 +2468,7 @@ function buildCodexRequestBody(args, identity = createCodexRequestIdentity(), se
|
|
|
2468
2468
|
model: typeof args.openAiBody.model === "string" ? args.openAiBody.model : args.agentConfig.model,
|
|
2469
2469
|
routeKind: "codex/responses",
|
|
2470
2470
|
legacySupportsToolImages: false
|
|
2471
|
-
})
|
|
2471
|
+
}));
|
|
2472
2472
|
const instructions = collectInstructions(rawMessages, args.agentConfig.prompt);
|
|
2473
2473
|
const stableInstructions = collectStablePromptPrefix(rawMessages, args.agentConfig.prompt);
|
|
2474
2474
|
const model = asOptionalTrimmedString(args.openAiBody.model) ?? asOptionalTrimmedString(args.agentConfig.model) ?? "gpt-5.5";
|
|
@@ -2999,14 +2999,14 @@ function buildGeminiCustomNativeProvider(p) {
|
|
|
2999
2999
|
return { ok: true, mimeType: image.headers.get("content-type") ?? "application/octet-stream", bytes: new Uint8Array(await image.arrayBuffer()) };
|
|
3000
3000
|
}
|
|
3001
3001
|
});
|
|
3002
|
-
const
|
|
3002
|
+
const toolImagePolicy = {
|
|
3003
3003
|
routeKind: "gemini-native",
|
|
3004
3004
|
...agentConfig,
|
|
3005
3005
|
provider: agentConfig.provider ?? "google",
|
|
3006
3006
|
model,
|
|
3007
3007
|
hasVision: agentConfig.hasVision
|
|
3008
|
-
}
|
|
3009
|
-
const body = buildGeminiGenerateContentRequest({ messages: inlineResult.messages, tools, maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0, temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0, attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel,
|
|
3008
|
+
};
|
|
3009
|
+
const body = buildGeminiGenerateContentRequest({ messages: inlineResult.messages, tools, maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0, temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0, attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel, toolImagePolicy });
|
|
3010
3010
|
log("provider.request.start", { agentKey: agentConfig.key, transport, requestUrl: nativeEndpoint, model, messageCount: messages.length, toolCount: tools.length, requestedToolNames });
|
|
3011
3011
|
const response = await fetchImpl(nativeEndpoint, { method: "POST", headers: { "Content-Type": "application/json", ...customNativeAuthHeaders("gemini", apiKey, apiKeyHeader), ...buildProviderSessionHeaders({ endpoint, sessionId: options?.dialogId ?? fallbackSessionId }) }, body: JSON.stringify(body), signal: options?.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(options.timeoutMs ?? 12e4)]) : AbortSignal.timeout(options?.timeoutMs ?? 12e4) });
|
|
3012
3012
|
if (!response.ok) {
|
|
@@ -3549,20 +3549,20 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
3549
3549
|
model: providerConfig.model,
|
|
3550
3550
|
complete: async (messages, options) => {
|
|
3551
3551
|
const model = providerConfig.model;
|
|
3552
|
-
const
|
|
3552
|
+
const toolImagePolicy = {
|
|
3553
3553
|
routeKind: "gemini-native",
|
|
3554
3554
|
provider: providerConfig.usageProvider ?? providerConfig.provider,
|
|
3555
3555
|
model: providerConfig.model,
|
|
3556
3556
|
customProviderUrl: providerConfig.endpoint,
|
|
3557
3557
|
hasVision: agentConfig.hasVision
|
|
3558
|
-
}
|
|
3558
|
+
};
|
|
3559
3559
|
const requestBody = buildGeminiGenerateContentRequest({
|
|
3560
3560
|
messages,
|
|
3561
3561
|
tools,
|
|
3562
3562
|
maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0,
|
|
3563
3563
|
temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0,
|
|
3564
3564
|
attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel,
|
|
3565
|
-
|
|
3565
|
+
toolImagePolicy
|
|
3566
3566
|
});
|
|
3567
3567
|
const url = `https://generativelanguage.googleapis.com/v1beta/models/${model}:streamGenerateContent?alt=sse`;
|
|
3568
3568
|
logLocalRuntimeDiagnostic("provider.request.start", {
|