nolo-cli 0.14.0 → 0.16.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-TURRLTZ2.js → _executeModel-QAUS6B7J.js} +24 -24
- package/{action-N3KXFO5V.js → action-GUOZYYGN.js} +4 -4
- package/{addContentAction-4Z762DMR.js → addContentAction-QDGHGUBH.js} +3 -3
- package/{addDialogAgentAction-FALLEKPR.js → addDialogAgentAction-Z4YCYZIV.js} +2 -2
- package/{agentDeleteCommand-AZDVM4HQ.js → agentDeleteCommand-365DMKHW.js} +20 -20
- package/{agentEmailCommands-M4AHOEZ3.js → agentEmailCommands-TQMXL36I.js} +38 -38
- package/{agentGrantCommands-B4MB23VQ.js → agentGrantCommands-JNDE4RWR.js} +2 -2
- package/{agentListCommands-OJLOXSKL.js → agentListCommands-6B5X4RC6.js} +22 -22
- package/{agentMachineCommands-NPMM4Z53.js → agentMachineCommands-LOEARB6V.js} +20 -20
- package/{agentPullCommand-KRBRIFIY.js → agentPullCommand-6HWUT3SW.js} +2 -2
- package/{agentRecordCommands-RVUH7XLZ.js → agentRecordCommands-DCH2WBL2.js} +33 -33
- package/{agentRunCommand-F6W2WKKZ.js → agentRunCommand-SGMH67WT.js} +35 -35
- package/{agentRunControl-IX4F5W2C.js → agentRunControl-6ADXVYMR.js} +2 -2
- package/{agentRuntimeLocal-DSUBT77I.js → agentRuntimeLocal-YSYZ33ER.js} +11 -11
- package/{agentSlice-PCEL26Z7.js → agentSlice-IVE735EV.js} +3 -3
- package/appDeleteCommands-6QYOO3JB.js +124 -0
- package/appDeployCommands-WTCT6XO6.js +163 -0
- package/appDeployStatusCommands-CGWGZJKB.js +144 -0
- package/appGetCommands-O4OCAMRW.js +119 -0
- package/appListCommands-UENFP4XY.js +122 -0
- package/{authCommand-66ME4KZX.js → authCommand-YFTR3347.js} +5 -5
- package/{authCommands-GH5T6RYV.js → authCommands-YXGOXNBZ.js} +3 -3
- package/{chunk-3B2LFO6R.js → browser-image-compression-MFDTD7K6.js} +4 -518
- package/{chunk-5R73BS7Y.js → chunk-4NLUNENX.js} +5 -5
- package/chunk-4QQFLN5C.js +552 -0
- package/{chunk-LNSRTNH7.js → chunk-6565R2TI.js} +20 -16
- package/{chunk-VQFY3VXW.js → chunk-6MHDWKOT.js} +3 -2
- package/{chunk-5NBHQD4D.js → chunk-A7GB5UGH.js} +1 -1
- package/{chunk-MYE5X27Y.js → chunk-BFRVXJJJ.js} +43 -16
- package/{chunk-XIDYAII4.js → chunk-E237VE6U.js} +7 -140
- package/{chunk-IYGQF62W.js → chunk-EMXI3N3Z.js} +3 -3
- package/{chunk-PYAJ6ZSK.js → chunk-G2MKOQCB.js} +1 -1
- package/chunk-GFUIQ4RY.js +136 -0
- package/{chunk-RZALKBP4.js → chunk-GRTFNYLR.js} +2 -2
- package/{chunk-KTFJUPDW.js → chunk-HRQCKQA5.js} +31 -31
- package/chunk-I66RU7P7.js +107 -0
- package/{chunk-OIMX7MM4.js → chunk-ISYE6GZB.js} +1 -1
- package/{chunk-4UUJFFMK.js → chunk-J55UHASN.js} +1 -1
- package/{chunk-V6VXDXGY.js → chunk-JS33TCQ3.js} +2 -2
- package/{chunk-7JJCGV7N.js → chunk-K6EUAOW3.js} +1 -1
- package/{chunk-OHEKYYJF.js → chunk-KMQPSTMJ.js} +6 -6
- package/{chunk-3WGLLTK4.js → chunk-LSFAWXKC.js} +100 -3
- package/{chunk-4ON5AV72.js → chunk-MYMMNKYL.js} +1 -1
- package/{chunk-BHK5ZAW7.js → chunk-N5424GSW.js} +1 -1
- package/{chunk-7LAIOHOL.js → chunk-O53CP2QR.js} +3 -3
- package/{chunk-IMZ7AFIJ.js → chunk-OQMPU2ML.js} +4 -4
- package/{chunk-NZFWHBW5.js → chunk-QLFCNUVQ.js} +496 -442
- package/{chunk-TQCONXQ3.js → chunk-QZVGMD5F.js} +1 -1
- package/{chunk-UW3WOIWJ.js → chunk-RKM3K52F.js} +1 -1
- package/{chunk-TLNEQI2R.js → chunk-RSYUDGGZ.js} +9 -9
- package/{chunk-A5V7UEZJ.js → chunk-SFXYKGK2.js} +3 -3
- package/{chunk-S5UACFUP.js → chunk-TTGAVETO.js} +10 -2
- package/{chunk-BOJVWKNA.js → chunk-U7LEGLEB.js} +1 -1
- package/{chunk-R5AOLZZV.js → chunk-VE6XMVKG.js} +203 -45
- package/{chunk-NJVPXLRY.js → chunk-VPTJB4HM.js} +1 -1
- package/{chunk-PB2DHBEQ.js → chunk-WA6KZL5V.js} +25 -6
- package/{chunk-T3X232L6.js → chunk-WNLPAOIT.js} +1 -1
- package/{chunk-E6KIDMTW.js → chunk-WPN6RMDF.js} +9 -9
- package/{chunk-NFPO7274.js → chunk-WRN5EQT7.js} +1 -1
- package/{chunk-3FCSMQAC.js → chunk-XVP3C2KY.js} +1 -1
- package/{chunk-33K5FKRL.js → chunk-YC3DJILJ.js} +111 -40
- package/{chunk-TYRTLSGX.js → chunk-YNHQIXX5.js} +833 -5746
- package/{chunk-4F4FJPFM.js → chunk-YYIRR6QC.js} +98 -209
- package/{chunk-7TN6V43T.js → chunk-Z24FGIU2.js} +2 -2
- package/{cliEnvHelpers-VYC2OPTB.js → cliEnvHelpers-ZXNMX7VV.js} +1 -1
- package/{createAgentAutomationAction-VLNDOHSP.js → createAgentAutomationAction-TS6NNZ4X.js} +9 -9
- package/{createDialogAction-6WYTS62Z.js → createDialogAction-5HVQ33EX.js} +10 -10
- package/{createPageAction-YKHOC3LW.js → createPageAction-4F3ZGQJD.js} +9 -9
- package/{dbSlice-7Q23HSWH.js → dbSlice-OP6UPXKA.js} +2 -2
- package/{dialogCommands-BQDGLVMO.js → dialogCommands-ZL6L24BS.js} +16 -16
- package/{dialogSlice-2A2JOFZW.js → dialogSlice-FAWUQDJW.js} +9 -9
- package/{docCreateCommands-K2MPMXYF.js → docCreateCommands-LYROQTFH.js} +22 -20
- package/{docDeleteCommands-NBAARB77.js → docDeleteCommands-6TWGTZNR.js} +21 -19
- package/{docReadCommands-S3MO5RPS.js → docReadCommands-PRULNF26.js} +20 -18
- package/{docStore-JJP5PUR7.js → docStore-2UHVWLTV.js} +10 -10
- package/{docUpdateCommands-EHEI7FCE.js → docUpdateCommands-NNYYWJBI.js} +21 -19
- package/{handleSendMessageAction-UAXTF73I.js → handleSendMessageAction-LJPUYNOH.js} +15 -11
- package/index.js +109 -78
- package/{machineCommands-BQ46IS5M.js → machineCommands-JQPEQFSE.js} +36 -36
- package/{machineWsRunDispatch-R33NXNNI.js → machineWsRunDispatch-FFFNWVEW.js} +32 -32
- package/{memoryCommands-AFMES3LN.js → memoryCommands-EBMICQR6.js} +1 -1
- package/package.json +1 -1
- package/{read-SIWMJRHC.js → read-HXHAZBKH.js} +1 -1
- package/{readDocTool-TCYJY4PP.js → readDocTool-VPBDTO4G.js} +1 -1
- package/{readlineWorkspace-KBG4DKLX.js → readlineWorkspace-QSXHSBHA.js} +211 -105
- package/{removeDialogAgentAction-WKHZT6VJ.js → removeDialogAgentAction-HUFVN35S.js} +4 -4
- package/{runAgentClientLoop-MUV5YIRK.js → runAgentClientLoop-A75BUU6D.js} +19 -19
- package/{runtimeDoctorCommands-QNF3J3UV.js → runtimeDoctorCommands-THIHX2SY.js} +1 -1
- package/{setDialogExtraReferencesAction-GCI5QU6E.js → setDialogExtraReferencesAction-2VLGWQKG.js} +2 -2
- package/{setPrimaryDialogAgentAction-NRO57AS6.js → setPrimaryDialogAgentAction-VB4UV2CC.js} +4 -4
- package/{settingSlice-FTWZ5ZHT.js → settingSlice-7JYPQNAC.js} +3 -3
- package/{spaceCommands-4R63UST3.js → spaceCommands-4LE45GB7.js} +21 -21
- package/{spaceSlice-VTC3QXP3.js → spaceSlice-444MFUP6.js} +11 -9
- package/{streamAgentChatTurn-43N7BNV2.js → streamAgentChatTurn-DJAE7USZ.js} +42 -39
- package/{tableCommands-E4SQWDOX.js → tableCommands-3P7MJ3PF.js} +4 -4
- package/{tools-PX6PEJLE.js → tools-YB6LXSVN.js} +14 -14
- package/{tuiSummaryLlmCaller-2D65LKWM.js → tuiSummaryLlmCaller-QQL3JA5I.js} +3 -3
- package/{updateCommands-XZDOOYFH.js → updateCommands-XTW55TOT.js} +2 -2
- package/{updateDialogTitleAction-NPQZWAKG.js → updateDialogTitleAction-6HGFBM64.js} +9 -9
- package/{chunk-3QAF2LTL.js → chunk-DZ3XJVET.js} +3 -3
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
requireTokenUser
|
|
3
|
+
} from "./chunk-E237VE6U.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveServerUrl
|
|
6
|
+
} from "./chunk-A7GB5UGH.js";
|
|
7
|
+
|
|
8
|
+
// packages/cli/cliApiClient.ts
|
|
9
|
+
var CliApiError = class extends Error {
|
|
10
|
+
code;
|
|
11
|
+
status;
|
|
12
|
+
constructor(message, code, status) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.status = status;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
async function cliApiRequest(args) {
|
|
19
|
+
const method = args.method ?? "POST";
|
|
20
|
+
let url = `${args.serverUrl.replace(/\/$/, "")}${args.path}`;
|
|
21
|
+
if (args.query) {
|
|
22
|
+
const params = new URLSearchParams(args.query);
|
|
23
|
+
url += `?${params.toString()}`;
|
|
24
|
+
}
|
|
25
|
+
const headers = {
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
Authorization: `Bearer ${args.authToken}`
|
|
28
|
+
};
|
|
29
|
+
const init = { method, headers };
|
|
30
|
+
if (args.body !== void 0 && args.body !== null && method !== "GET") {
|
|
31
|
+
init.body = JSON.stringify(args.body);
|
|
32
|
+
}
|
|
33
|
+
let response;
|
|
34
|
+
try {
|
|
35
|
+
response = await fetch(url, init);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
throw new CliApiError(`\u8BF7\u6C42\u5931\u8D25: ${error.message}`, "NETWORK_ERROR", 0);
|
|
38
|
+
}
|
|
39
|
+
let data;
|
|
40
|
+
try {
|
|
41
|
+
data = await response.json();
|
|
42
|
+
} catch {
|
|
43
|
+
throw new CliApiError(
|
|
44
|
+
`\u670D\u52A1\u7AEF\u8FD4\u56DE\u975E JSON \u54CD\u5E94 (HTTP ${response.status})`,
|
|
45
|
+
"INVALID_RESPONSE",
|
|
46
|
+
response.status
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (!response.ok || data.success !== true) {
|
|
50
|
+
const errorObj = data.error ?? {};
|
|
51
|
+
const message = errorObj.message || data.message || `\u8BF7\u6C42\u5931\u8D25 (HTTP ${response.status})`;
|
|
52
|
+
const code = errorObj.code || `HTTP_${response.status}`;
|
|
53
|
+
throw new CliApiError(message, code, response.status);
|
|
54
|
+
}
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
function printCliError(error) {
|
|
58
|
+
if (error instanceof CliApiError) {
|
|
59
|
+
process.stderr.write(`\u9519\u8BEF [${error.code}]: ${error.message}
|
|
60
|
+
`);
|
|
61
|
+
} else if (error instanceof Error) {
|
|
62
|
+
process.stderr.write(`\u9519\u8BEF: ${error.message}
|
|
63
|
+
`);
|
|
64
|
+
} else {
|
|
65
|
+
process.stderr.write(`\u9519\u8BEF: ${String(error)}
|
|
66
|
+
`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function resolveCliContext(args, env) {
|
|
70
|
+
const serverUrl = resolveServerUrl(args, env);
|
|
71
|
+
const { authToken, userId } = requireTokenUser(args, env, false);
|
|
72
|
+
return { serverUrl, authToken, userId };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// packages/cli/cliOutputHelpers.ts
|
|
76
|
+
function pickDefined(obj) {
|
|
77
|
+
const result = {};
|
|
78
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
79
|
+
if (value !== void 0 && value !== null) result[key] = value;
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
function formatFields(fields, indent = "") {
|
|
84
|
+
const maxKeyLen = fields.reduce((max, [k]) => Math.max(max, k.length), 0);
|
|
85
|
+
const lines = fields.map(([key, value]) => {
|
|
86
|
+
const display = value === void 0 || value === null ? "-" : String(value);
|
|
87
|
+
return `${indent}${key.padEnd(maxKeyLen)}: ${display}`;
|
|
88
|
+
});
|
|
89
|
+
return lines.join("\n");
|
|
90
|
+
}
|
|
91
|
+
function outputResult(data, shouldOutputJson, formatter, output = process.stdout) {
|
|
92
|
+
if (shouldOutputJson) {
|
|
93
|
+
output.write(`${JSON.stringify(data, null, 2)}
|
|
94
|
+
`);
|
|
95
|
+
} else {
|
|
96
|
+
formatter();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
cliApiRequest,
|
|
102
|
+
printCliError,
|
|
103
|
+
resolveCliContext,
|
|
104
|
+
pickDefined,
|
|
105
|
+
formatFields,
|
|
106
|
+
outputResult
|
|
107
|
+
};
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
loadProfileConfig,
|
|
13
13
|
saveDefaultProfile
|
|
14
14
|
} from "./chunk-ROWQEJRP.js";
|
|
15
|
+
import {
|
|
16
|
+
resolveAuthTokenFromEnv
|
|
17
|
+
} from "./chunk-A7GB5UGH.js";
|
|
18
|
+
import {
|
|
19
|
+
DEFAULT_NOLO_SERVER_URL
|
|
20
|
+
} from "./chunk-OLZBQWZU.js";
|
|
15
21
|
import {
|
|
16
22
|
createMemoryKey,
|
|
17
23
|
createMemoryOwnerIndexKey,
|
|
@@ -24,12 +30,6 @@ import {
|
|
|
24
30
|
import {
|
|
25
31
|
asTrimmedString
|
|
26
32
|
} from "./chunk-3EUW3WEO.js";
|
|
27
|
-
import {
|
|
28
|
-
resolveAuthTokenFromEnv
|
|
29
|
-
} from "./chunk-5NBHQD4D.js";
|
|
30
|
-
import {
|
|
31
|
-
DEFAULT_NOLO_SERVER_URL
|
|
32
|
-
} from "./chunk-OLZBQWZU.js";
|
|
33
33
|
import {
|
|
34
34
|
normalizeServerOrigin
|
|
35
35
|
} from "./chunk-CF7PE763.js";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
// packages/agent-runtime/
|
|
2
|
-
var OPEN_TAG = "<think>";
|
|
3
|
-
var CLOSE_TAG = "</think>";
|
|
1
|
+
// packages/agent-runtime/tagPrefixMatch.ts
|
|
4
2
|
function longestTagPrefixLength(buffer, tag) {
|
|
5
3
|
const max = Math.min(buffer.length, tag.length - 1);
|
|
6
4
|
for (let len = max; len > 0; len--) {
|
|
@@ -10,6 +8,10 @@ function longestTagPrefixLength(buffer, tag) {
|
|
|
10
8
|
}
|
|
11
9
|
return 0;
|
|
12
10
|
}
|
|
11
|
+
|
|
12
|
+
// packages/agent-runtime/thinkTagParser.ts
|
|
13
|
+
var OPEN_TAG = "<think>";
|
|
14
|
+
var CLOSE_TAG = "</think>";
|
|
13
15
|
function extractThinkContent(content) {
|
|
14
16
|
const regex = new RegExp(`${OPEN_TAG}([\\s\\S]*?)${CLOSE_TAG}`, "g");
|
|
15
17
|
const matches = [...content.matchAll(regex)];
|
|
@@ -81,6 +83,98 @@ function flushThinkParser(state) {
|
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
// packages/agent-runtime/toolCallTextParser.ts
|
|
87
|
+
var OPEN_TAG2 = "<tool_call>";
|
|
88
|
+
var CLOSE_TAG2 = "</tool_call>";
|
|
89
|
+
function createToolCallTextParserState() {
|
|
90
|
+
return { mode: "content", buffer: "" };
|
|
91
|
+
}
|
|
92
|
+
function processToolCallTextChunk(chunk, state) {
|
|
93
|
+
let visible = "";
|
|
94
|
+
let toolCallTexts = [];
|
|
95
|
+
let { mode, buffer } = state;
|
|
96
|
+
buffer += chunk;
|
|
97
|
+
while (true) {
|
|
98
|
+
if (mode === "content") {
|
|
99
|
+
const idx = buffer.indexOf(OPEN_TAG2);
|
|
100
|
+
if (idx === -1) {
|
|
101
|
+
const keep = longestTagPrefixLength(buffer, OPEN_TAG2);
|
|
102
|
+
visible += buffer.slice(0, buffer.length - keep);
|
|
103
|
+
buffer = buffer.slice(buffer.length - keep);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
visible += buffer.slice(0, idx);
|
|
107
|
+
buffer = buffer.slice(idx + OPEN_TAG2.length);
|
|
108
|
+
mode = "toolcall";
|
|
109
|
+
} else {
|
|
110
|
+
const idx = buffer.indexOf(CLOSE_TAG2);
|
|
111
|
+
if (idx === -1) {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
toolCallTexts.push(buffer.slice(0, idx));
|
|
115
|
+
buffer = buffer.slice(idx + CLOSE_TAG2.length);
|
|
116
|
+
mode = "content";
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
content: visible,
|
|
121
|
+
toolCallTexts,
|
|
122
|
+
state: { mode, buffer }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function flushToolCallTextParser(state) {
|
|
126
|
+
const { mode, buffer } = state;
|
|
127
|
+
if (mode === "toolcall") {
|
|
128
|
+
const keep = longestTagPrefixLength(buffer, CLOSE_TAG2);
|
|
129
|
+
const text = buffer.slice(0, buffer.length - keep);
|
|
130
|
+
return {
|
|
131
|
+
content: "",
|
|
132
|
+
toolCallTexts: text ? [text] : [],
|
|
133
|
+
state: { mode: "content", buffer: "" }
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
content: buffer,
|
|
138
|
+
toolCallTexts: [],
|
|
139
|
+
state: { mode: "content", buffer: "" }
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function tryParseToolCallText(text) {
|
|
143
|
+
const trimmed = text.trim();
|
|
144
|
+
if (!trimmed) return null;
|
|
145
|
+
try {
|
|
146
|
+
const parsed = JSON.parse(trimmed);
|
|
147
|
+
if (typeof parsed === "object" && parsed !== null && typeof parsed.name === "string") {
|
|
148
|
+
return {
|
|
149
|
+
name: parsed.name,
|
|
150
|
+
arguments: typeof parsed.arguments === "string" ? parsed.arguments : JSON.stringify(parsed.arguments ?? {})
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
} catch {
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
function processContentChunkWithToolCallStripping(chunk, state, onToolCall) {
|
|
158
|
+
const stripped = processToolCallTextChunk(chunk, state);
|
|
159
|
+
for (const text of stripped.toolCallTexts) {
|
|
160
|
+
const parsedTc = tryParseToolCallText(text);
|
|
161
|
+
if (parsedTc) {
|
|
162
|
+
onToolCall(parsedTc.name, parsedTc.arguments);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return { cleanedContent: stripped.content, state: stripped.state };
|
|
166
|
+
}
|
|
167
|
+
function flushToolCallTextParserIntoCallback(state, onToolCall) {
|
|
168
|
+
const flushed = flushToolCallTextParser(state);
|
|
169
|
+
for (const text of flushed.toolCallTexts) {
|
|
170
|
+
const parsedTc = tryParseToolCallText(text);
|
|
171
|
+
if (parsedTc) {
|
|
172
|
+
onToolCall(parsedTc.name, parsedTc.arguments);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return { residualContent: flushed.content, state: flushed.state };
|
|
176
|
+
}
|
|
177
|
+
|
|
84
178
|
// packages/agent-runtime/toolCallAccumulator.ts
|
|
85
179
|
function createToolCallAccumulator() {
|
|
86
180
|
return { slots: [] };
|
|
@@ -141,6 +235,9 @@ export {
|
|
|
141
235
|
createThinkParserState,
|
|
142
236
|
processThinkChunk,
|
|
143
237
|
flushThinkParser,
|
|
238
|
+
createToolCallTextParserState,
|
|
239
|
+
processContentChunkWithToolCallStripping,
|
|
240
|
+
flushToolCallTextParserIntoCallback,
|
|
144
241
|
createToolCallAccumulator,
|
|
145
242
|
accumulateToolCallDelta,
|
|
146
243
|
finalizeAccumulatedToolCalls
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YNHQIXX5.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
patch,
|
|
15
15
|
readAndWait
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SFXYKGK2.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-4F3ZGQJD.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SFXYKGK2.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgentKey,
|
|
17
17
|
toTrimmedString
|
|
@@ -300,7 +300,7 @@ var slice = createSliceWithThunks({
|
|
|
300
300
|
const overrides = {};
|
|
301
301
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
302
302
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
303
|
-
const { _executeModel } = await import("./_executeModel-
|
|
303
|
+
const { _executeModel } = await import("./_executeModel-QAUS6B7J.js");
|
|
304
304
|
return _executeModel(
|
|
305
305
|
{
|
|
306
306
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -321,7 +321,7 @@ var slice = createSliceWithThunks({
|
|
|
321
321
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
322
322
|
*/
|
|
323
323
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
324
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
324
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-A75BUU6D.js");
|
|
325
325
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
326
326
|
{
|
|
327
327
|
agentKey: args.agentKey,
|
|
@@ -337,7 +337,7 @@ var slice = createSliceWithThunks({
|
|
|
337
337
|
* 聊天轮次流式 Agent 调用
|
|
338
338
|
*/
|
|
339
339
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
340
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
340
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-DJAE7USZ.js");
|
|
341
341
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
342
342
|
}),
|
|
343
343
|
/**
|