nolo-cli 0.147.0-alpha.2 → 0.148.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-3OCR5R5P.js → _executeModel-NFJAMAGJ.js} +29 -28
- package/{action-3ZOODRBC.js → action-GI44T4DR.js} +6 -6
- package/{addContentAction-IJHG2ZV7.js → addContentAction-B2DRF7P6.js} +5 -5
- package/{addDialogAgentAction-RLPSTAQ2.js → addDialogAgentAction-2P2FLTLD.js} +4 -4
- package/{agentDeleteCommand-6OGADD24.js → agentDeleteCommand-7IDWF6E3.js} +14 -13
- package/{agentEmailCommands-OAPYGNYC.js → agentEmailCommands-4KW33JII.js} +31 -30
- package/{agentListCommands-FRJZOOEG.js → agentListCommands-IW3GQVUP.js} +16 -15
- package/{agentMachineCommands-OWLOV5WO.js → agentMachineCommands-CMQR4RQ4.js} +14 -13
- package/{agentProviderCommands-TWB6E5WD.js → agentProviderCommands-YK2BIIXZ.js} +1 -1
- package/{agentRecordCommands-BW7HM6VH.js → agentRecordCommands-4YBSYPIY.js} +31 -30
- package/{agentRunCommand-O2F3NU2H.js → agentRunCommand-5MU5X5OT.js} +31 -30
- package/{agentRuntimeLocal-QQCDFR7B.js → agentRuntimeLocal-AK2QVJHY.js} +12 -11
- package/{agentSlice-ZOCKW66S.js → agentSlice-OZ33K224.js} +5 -5
- package/{appDeleteCommands-OGKQC2AM.js → appDeleteCommands-N3XEVVYC.js} +15 -14
- package/{appDeployCommands-Y2FV4JML.js → appDeployCommands-AWFIXYVW.js} +15 -14
- package/{appDeployStatusCommands-FNML5SUV.js → appDeployStatusCommands-CZRON2FO.js} +15 -14
- package/{appGetCommands-4FOY7W5E.js → appGetCommands-XQIUY4TD.js} +15 -14
- package/{appListCommands-E5SF6SIY.js → appListCommands-NNG4H36Y.js} +15 -14
- package/{chatQueueReduxAdapter-DFZ6QB4K.js → chatQueueReduxAdapter-HVHA2HPM.js} +11 -11
- package/{chunk-OXGHM2WW.js → chunk-2JMMBU6V.js} +27 -257
- package/{chunk-T76D3OYX.js → chunk-3SV7RM24.js} +1 -1
- package/{chunk-PZ3HKBET.js → chunk-42Z3EMC4.js} +19 -19
- package/{chunk-O7WXJIUI.js → chunk-4H22P2JV.js} +11 -9
- package/{chunk-BCJPO6SE.js → chunk-523WHFSL.js} +10 -10
- package/{chunk-M2YBIBBS.js → chunk-5TEEECZM.js} +1 -1
- package/{chunk-Z7IZQF56.js → chunk-6FGTMQCL.js} +1 -1
- package/{chunk-ETZWFV6M.js → chunk-7CHC4W22.js} +1 -1
- package/{chunk-ZSPC3ZTC.js → chunk-AKG5W4LG.js} +1 -1
- package/{chunk-CCOXTK3I.js → chunk-ALFH24P3.js} +26 -0
- package/{chunk-7NANRWL4.js → chunk-ALGORS6Y.js} +1 -1
- package/chunk-BKWMNZ2X.js +411 -0
- package/{chunk-HNRASX3X.js → chunk-CPUFH46E.js} +1 -1
- package/{chunk-GMVELWJG.js → chunk-CU3QB4HW.js} +2 -2
- package/{chunk-KRC6GI2Q.js → chunk-DCFPQW22.js} +2 -2
- package/{chunk-LQ6P2MFG.js → chunk-DIXLJWCD.js} +14 -14
- package/{chunk-2EE5UD3N.js → chunk-DY7ANLKG.js} +1 -1
- package/{chunk-36HTQWBD.js → chunk-FWQEKRTD.js} +3 -3
- package/{chunk-I44MDY73.js → chunk-GOH6RW6F.js} +3 -3
- package/chunk-HUFPWXFW.js +1716 -0
- package/{chunk-QALRKMHF.js → chunk-HYZIYH2H.js} +5 -5
- package/{chunk-EFZKILX6.js → chunk-IAESIMK7.js} +1 -1
- package/{chunk-JQ4LUB5I.js → chunk-IAG4FHOJ.js} +1 -1
- package/{chunk-HLUYTEBY.js → chunk-K2CSUCHJ.js} +1 -1
- package/{chunk-UC3Q7X3J.js → chunk-LPVCRQMM.js} +5 -5
- package/{chunk-QJLEMM2V.js → chunk-O2OWEFII.js} +1 -1
- package/{chunk-724HIKHT.js → chunk-OHOVNO7I.js} +4 -127
- package/{chunk-NU4DCNMR.js → chunk-P4BX6FFU.js} +4 -571
- package/{chunk-P4CRULYJ.js → chunk-PCVVZ2MH.js} +3 -3
- package/chunk-PQWU42UQ.js +132 -0
- package/{chunk-27VHPPII.js → chunk-QU5A4LYX.js} +6 -6
- package/{chunk-QIH323EV.js → chunk-QXGPFY6J.js} +1 -1
- package/{chunk-B7ANJQWZ.js → chunk-RSEEDUMS.js} +2 -2
- package/{chunk-ELYEQNUI.js → chunk-RYZINGPM.js} +3 -3
- package/{chunk-AATZZAZE.js → chunk-SLLGJZDT.js} +1 -1
- package/{chunk-3IYMTWYZ.js → chunk-SONWNI3L.js} +2 -2
- package/chunk-T767MPHB.js +681 -0
- package/{chunk-2B74TU77.js → chunk-T7F46O36.js} +3 -3
- package/{chunk-BJUDYFV5.js → chunk-UQNS32WZ.js} +1 -1
- package/{chunk-AUXHZ2M5.js → chunk-WIWM4FE3.js} +1 -1
- package/{chunk-BFLSOVHN.js → chunk-WRMKCKZ3.js} +16 -14
- package/{chunk-YU2THNST.js → chunk-XISEYOGH.js} +1 -1
- package/{chunk-JORF7I7F.js → chunk-YUWMM4US.js} +3 -3
- package/{chunk-D76D3RTR.js → chunk-Z4CSIXYP.js} +2 -2
- package/{commandRegistry-OPVCVVOQ.js → commandRegistry-YOEQUA7T.js} +42 -42
- package/{contentThunks-IWXWFN6P.js → contentThunks-AK2F3KNC.js} +12 -12
- package/{createAgentAutomationAction-ROWX5ZPK.js → createAgentAutomationAction-5EJL6ROU.js} +12 -12
- package/{createDialogAction-WLVAITHA.js → createDialogAction-F5WEWA47.js} +13 -13
- package/{createPageAction-DAJL6GES.js → createPageAction-75ELC64R.js} +12 -12
- package/{dbSlice-HFPIJT5P.js → dbSlice-DQ32LYTJ.js} +4 -4
- package/{deleteFile-UEAD5A5Z.js → deleteFile-NX6QHCWZ.js} +2 -2
- package/{dialogCommands-KSPH6QOU.js → dialogCommands-G7YBVAMC.js} +15 -14
- package/{dialogSlice-WW75BKLO.js → dialogSlice-KSXPGJB2.js} +11 -11
- package/{docCreateCommands-B64BLZVJ.js → docCreateCommands-ZSLGVBZT.js} +14 -13
- package/{docDeleteCommands-UX2GXKUT.js → docDeleteCommands-5N4GVZBG.js} +15 -14
- package/{docReadCommands-5A6GF3XL.js → docReadCommands-YJSAA7AV.js} +14 -13
- package/{docStore-2SADZYLX.js → docStore-AROBVRCR.js} +5 -5
- package/{docUpdateCommands-UTBGZPSR.js → docUpdateCommands-WEMLSW6W.js} +14 -13
- package/{handleSendMessageAction-2M57WHLO.js → handleSendMessageAction-EGNWHAUB.js} +229 -45
- package/index.js +3 -3
- package/{machineCommands-7JUTOZP2.js → machineCommands-ARZYKGGE.js} +30 -29
- package/{machineWsRunDispatch-6EETR3RV.js → machineWsRunDispatch-I7F4L532.js} +30 -29
- package/{memberThunks-SKFZ37VS.js → memberThunks-5ZXPR63F.js} +5 -5
- package/package.json +1 -1
- package/{providerPresetApply-XTEXOH7X.js → providerPresetApply-DD6NGWW6.js} +1 -1
- package/{providerRegistry-ADYDSLKR.js → providerRegistry-XDRLMYGJ.js} +1 -1
- package/{read-IEJLLUXY.js → read-EPTJRAEF.js} +2 -2
- package/{readDocTool-4SPYCP2Y.js → readDocTool-W4NDXNEX.js} +1 -1
- package/{readlineWorkspace-LBLAGNGM.js → readlineWorkspace-3XOFVARF.js} +34 -33
- package/{removeDialogAgentAction-R4RTGM2S.js → removeDialogAgentAction-OSYNZRX7.js} +6 -6
- package/{runAgentClientLoop-RPEULJFS.js → runAgentClientLoop-UMF7VZYZ.js} +30 -28
- package/{setDialogExtraReferencesAction-NU2VZ7JZ.js → setDialogExtraReferencesAction-M32UYNCG.js} +5 -5
- package/{setPrimaryDialogAgentAction-VUY2FRVL.js → setPrimaryDialogAgentAction-WZ7KI3YA.js} +6 -6
- package/{settingSlice-CNE75ISY.js → settingSlice-Q6EKL7EQ.js} +5 -5
- package/{spaceCommands-HZUAGZXH.js → spaceCommands-UJOVU4XI.js} +14 -13
- package/{streamAgentChatTurn-D5POCPVX.js → streamAgentChatTurn-GYGMYOSM.js} +71 -1268
- package/{switchDialogAgentAction-JC27CP72.js → switchDialogAgentAction-GMR7WN3P.js} +4 -4
- package/{tools-I6D2B2G6.js → tools-DU4JXVAV.js} +21 -21
- package/{tuiSummaryLlmCaller-RVW6CJSK.js → tuiSummaryLlmCaller-3YFNHCTW.js} +7 -7
- package/{updateDialogTitleAction-7YZ7FNAK.js → updateDialogTitleAction-4U5W4AMH.js} +12 -12
- package/chunk-BJ3KD73I.js +0 -155
- package/chunk-JK5XW3NO.js +0 -108
- package/chunk-YYKMFBK7.js +0 -306
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
loadFileFromIndexedDb,
|
|
3
3
|
removeAction,
|
|
4
4
|
saveFileToIndexedDb
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7CHC4W22.js";
|
|
6
6
|
import {
|
|
7
7
|
fileKey,
|
|
8
8
|
getFileIdFromKey,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readAction,
|
|
13
13
|
readRequestManager,
|
|
14
14
|
resolveAgentReadServers
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IAESIMK7.js";
|
|
16
16
|
import {
|
|
17
17
|
asyncThunkCreator,
|
|
18
18
|
buildCreateSlice,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
shouldReplaceLocalWithRemoteRecord,
|
|
33
33
|
shouldReplicateLocalRecord,
|
|
34
34
|
uploadToCurrentServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WIWM4FE3.js";
|
|
36
36
|
import {
|
|
37
37
|
fetchFromClientDb,
|
|
38
38
|
fetchFromServer,
|
|
@@ -712,7 +712,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
712
712
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
713
713
|
read: create.asyncThunk(
|
|
714
714
|
async (payload, thunkApi) => {
|
|
715
|
-
const { readAction: readAction2 } = await import("./read-
|
|
715
|
+
const { readAction: readAction2 } = await import("./read-EPTJRAEF.js");
|
|
716
716
|
return readAction2(payload, thunkApi);
|
|
717
717
|
},
|
|
718
718
|
{
|
|
@@ -786,7 +786,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
786
786
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
787
787
|
share: create.asyncThunk(
|
|
788
788
|
async (config, thunkApi) => {
|
|
789
|
-
const { shareResourceAction } = await import("./action-
|
|
789
|
+
const { shareResourceAction } = await import("./action-GI44T4DR.js");
|
|
790
790
|
return shareResourceAction(config, thunkApi);
|
|
791
791
|
}
|
|
792
792
|
),
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HYZIYH2H.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgentKey,
|
|
17
17
|
toTrimmedString
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
asyncThunkCreator,
|
|
21
21
|
buildCreateSlice,
|
|
22
22
|
getRuntimeServerContext
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WIWM4FE3.js";
|
|
24
24
|
import {
|
|
25
25
|
asTrimmedString
|
|
26
26
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
|
|
|
304
304
|
const overrides = {};
|
|
305
305
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
306
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
307
|
+
const { _executeModel } = await import("./_executeModel-NFJAMAGJ.js");
|
|
308
308
|
return _executeModel(
|
|
309
309
|
{
|
|
310
310
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
|
|
|
325
325
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
326
|
*/
|
|
327
327
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
328
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-UMF7VZYZ.js");
|
|
329
329
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
330
|
{
|
|
331
331
|
agentKey: args.agentKey,
|
|
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
|
|
|
341
341
|
* 聊天轮次流式 Agent 调用
|
|
342
342
|
*/
|
|
343
343
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
344
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-GYGMYOSM.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -2,18 +2,14 @@ import {
|
|
|
2
2
|
isDevinOAuthAgent
|
|
3
3
|
} from "./chunk-5ZUL4CUO.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
resolveAgentImageInputSupport
|
|
6
|
+
} from "./chunk-PQWU42UQ.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./chunk-3BXNTXYI.js";
|
|
8
|
+
getModelContextWindow
|
|
9
|
+
} from "./chunk-AKG5W4LG.js";
|
|
11
10
|
import {
|
|
12
11
|
asOptionalFiniteNumber
|
|
13
12
|
} from "./chunk-WWC7I6TA.js";
|
|
14
|
-
import {
|
|
15
|
-
asTrimmedLowercaseString
|
|
16
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
17
13
|
import {
|
|
18
14
|
isRecord
|
|
19
15
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -24,73 +20,6 @@ import {
|
|
|
24
20
|
asOptionalTrimmedString
|
|
25
21
|
} from "./chunk-G3SUCT4W.js";
|
|
26
22
|
|
|
27
|
-
// packages/ai/llm/agentCapabilities.ts
|
|
28
|
-
var ANTIGRAVITY_EFFORT_SUFFIXES = [
|
|
29
|
-
"-tiered",
|
|
30
|
-
"-extra-low",
|
|
31
|
-
"-low",
|
|
32
|
-
"-medium",
|
|
33
|
-
"-high"
|
|
34
|
-
];
|
|
35
|
-
function stripEffortSuffix(model) {
|
|
36
|
-
for (const suffix of ANTIGRAVITY_EFFORT_SUFFIXES) {
|
|
37
|
-
if (model.endsWith(suffix) && model.length > suffix.length) {
|
|
38
|
-
return model.slice(0, -suffix.length);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return model;
|
|
42
|
-
}
|
|
43
|
-
function stripPreviewSuffix(model) {
|
|
44
|
-
const suffix = "-preview";
|
|
45
|
-
if (model.endsWith(suffix) && model.length > suffix.length) {
|
|
46
|
-
return model.slice(0, -suffix.length);
|
|
47
|
-
}
|
|
48
|
-
return model;
|
|
49
|
-
}
|
|
50
|
-
var lookupKnownModelVision = (provider, model) => {
|
|
51
|
-
if (!model) return void 0;
|
|
52
|
-
const candidates = [model];
|
|
53
|
-
const strippedEffort = stripEffortSuffix(model);
|
|
54
|
-
if (strippedEffort !== model) candidates.push(strippedEffort);
|
|
55
|
-
const strippedPreview = stripPreviewSuffix(model);
|
|
56
|
-
if (strippedPreview !== model) candidates.push(strippedPreview);
|
|
57
|
-
for (const candidate of candidates) {
|
|
58
|
-
if (provider && provider !== "custom") {
|
|
59
|
-
const direct = findModelConfig(provider, candidate);
|
|
60
|
-
if (direct && typeof direct.hasVision === "boolean") return direct.hasVision;
|
|
61
|
-
}
|
|
62
|
-
const detected = getProviderByModelName(candidate);
|
|
63
|
-
if (detected) {
|
|
64
|
-
const found = findModelConfig(detected, candidate)?.hasVision;
|
|
65
|
-
if (found !== void 0) return found;
|
|
66
|
-
}
|
|
67
|
-
if (candidate.includes("/")) {
|
|
68
|
-
const slash = candidate.indexOf("/");
|
|
69
|
-
const modelProvider = candidate.slice(0, slash).toLowerCase();
|
|
70
|
-
const modelName = candidate.slice(slash + 1);
|
|
71
|
-
const nested = findModelConfig(modelProvider, modelName);
|
|
72
|
-
if (nested && typeof nested.hasVision === "boolean") return nested.hasVision;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return void 0;
|
|
76
|
-
};
|
|
77
|
-
var resolveAgentImageInputSupport = (agent) => {
|
|
78
|
-
if (!agent) return true;
|
|
79
|
-
const provider = asTrimmedLowercaseString(agent.provider) || null;
|
|
80
|
-
const model = asOptionalTrimmedString(agent.model) ?? "";
|
|
81
|
-
const catalogHasVision = lookupKnownModelVision(
|
|
82
|
-
provider,
|
|
83
|
-
model
|
|
84
|
-
);
|
|
85
|
-
if (catalogHasVision !== void 0) {
|
|
86
|
-
return catalogHasVision;
|
|
87
|
-
}
|
|
88
|
-
if (typeof agent.hasVision === "boolean") {
|
|
89
|
-
return agent.hasVision;
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
23
|
// packages/ai/agent/imagePreprocessing.ts
|
|
95
24
|
function extractImageUrlsFromMessages(messages) {
|
|
96
25
|
const urls = [];
|
|
@@ -239,53 +168,6 @@ function resolveAgentRuntimeConfigFromRecord(key, record) {
|
|
|
239
168
|
};
|
|
240
169
|
}
|
|
241
170
|
|
|
242
|
-
// packages/ai/agent/toolOutputPolicy.ts
|
|
243
|
-
var MAX_IN_TURN_TOOL_CONTENT_CHARS = 4e3;
|
|
244
|
-
var DEFAULT_TOOL_OUTPUT_PROFILE = {
|
|
245
|
-
maxChars: MAX_IN_TURN_TOOL_CONTENT_CHARS,
|
|
246
|
-
headRatio: 0.5
|
|
247
|
-
};
|
|
248
|
-
var TOOL_OUTPUT_PROFILES = {
|
|
249
|
-
readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
250
|
-
read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
251
|
-
readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
252
|
-
globFiles: { maxChars: 2800, headRatio: 0.85 },
|
|
253
|
-
execShell: { maxChars: 4e3, headRatio: 0.35 },
|
|
254
|
-
runCommand: { maxChars: 4e3, headRatio: 0.35 },
|
|
255
|
-
launchProcess: { maxChars: 2800, headRatio: 0.35 },
|
|
256
|
-
editFile: { maxChars: 2800, headRatio: 0.62 },
|
|
257
|
-
writeFile: { maxChars: 2400, headRatio: 0.62 },
|
|
258
|
-
readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 }
|
|
259
|
-
};
|
|
260
|
-
function resolveToolOutputProfile(toolName) {
|
|
261
|
-
return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
|
|
262
|
-
}
|
|
263
|
-
function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
|
|
264
|
-
const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
|
|
265
|
-
return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
|
|
266
|
-
}
|
|
267
|
-
function projectToolMessageContent(input) {
|
|
268
|
-
const { content, toolName } = input;
|
|
269
|
-
const maxChars = resolveToolOutputProfile(toolName).maxChars;
|
|
270
|
-
if (content.length <= maxChars) return content;
|
|
271
|
-
return clipToolText(
|
|
272
|
-
content,
|
|
273
|
-
maxChars,
|
|
274
|
-
resolveToolOutputProfile(toolName).headRatio,
|
|
275
|
-
`
|
|
276
|
-
\u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
|
|
280
|
-
const normalized = content.replace(/\r\n/g, "\n").trim();
|
|
281
|
-
if (normalized.length <= maxChars) return normalized;
|
|
282
|
-
if (maxChars <= marker.length + 2) return normalized.slice(0, maxChars);
|
|
283
|
-
const available = maxChars - marker.length;
|
|
284
|
-
const headChars = Math.max(1, Math.floor(available * headRatio));
|
|
285
|
-
const tailChars = Math.max(1, available - headChars);
|
|
286
|
-
return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
171
|
// packages/agent-runtime/desktopRequestSnapshot.ts
|
|
290
172
|
var DESKTOP_AGENT_CONFIG_SNAPSHOT_STRING_FIELDS = [
|
|
291
173
|
"name",
|
|
@@ -565,11 +447,6 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
|
|
|
565
447
|
}
|
|
566
448
|
|
|
567
449
|
export {
|
|
568
|
-
resolveToolOutputProfile,
|
|
569
|
-
resolveHistoricalToolContentCap,
|
|
570
|
-
projectToolMessageContent,
|
|
571
|
-
clipToolText,
|
|
572
|
-
resolveAgentImageInputSupport,
|
|
573
450
|
hasImageInRuntimeMessages,
|
|
574
451
|
stripImagePartsFromMessages,
|
|
575
452
|
stripImagePartsForTextOnlyAgent,
|