nolo-cli 0.75.0-alpha.1 → 0.75.0-alpha.3

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.
Files changed (55) hide show
  1. package/{_executeModel-CNEEELFV.js → _executeModel-MONX3AUM.js} +10 -10
  2. package/{agentDeleteCommand-WVO3JTH6.js → agentDeleteCommand-UAMLWTPS.js} +3 -3
  3. package/{agentEmailCommands-VX5OYTHG.js → agentEmailCommands-CS3MWA2L.js} +12 -12
  4. package/{agentListCommands-XWLQZ2ZH.js → agentListCommands-63DOSBY7.js} +3 -3
  5. package/{agentMachineCommands-IG6KJFNN.js → agentMachineCommands-XGM4IGGG.js} +4 -4
  6. package/{agentRecordCommands-V5LRQDDX.js → agentRecordCommands-24JJOYM5.js} +12 -12
  7. package/{agentRunCommand-RUUOF2DY.js → agentRunCommand-775H4KKG.js} +12 -12
  8. package/{agentRuntimeLocal-ZSUEMWRL.js → agentRuntimeLocal-XG3IDNOC.js} +3 -3
  9. package/{agentSlice-S3JFDTH4.js → agentSlice-BLCUNM5V.js} +1 -1
  10. package/{appDeleteCommands-426QK2XG.js → appDeleteCommands-TJXDMOYT.js} +3 -3
  11. package/{appDeployCommands-FIGFGXIJ.js → appDeployCommands-ECZJQAAL.js} +3 -3
  12. package/{appDeployStatusCommands-D3B235FQ.js → appDeployStatusCommands-DZKVFG3Y.js} +3 -3
  13. package/{appGetCommands-U6RZJII4.js → appGetCommands-JIT4OPUD.js} +3 -3
  14. package/{appListCommands-732PFEWM.js → appListCommands-NR2HRMDY.js} +3 -3
  15. package/{chatQueueReduxAdapter-CHJZ2O2P.js → chatQueueReduxAdapter-ROFM5SW7.js} +2 -2
  16. package/{chunk-ZNZCVXRV.js → chunk-2SFNAHL6.js} +3 -3
  17. package/{chunk-KG7ANYLN.js → chunk-3SPWIDHH.js} +2 -2
  18. package/{chunk-5WUTIRKL.js → chunk-AMDSZQCT.js} +6 -6
  19. package/{chunk-WD4SMAPR.js → chunk-BGIWMGSP.js} +2 -2
  20. package/{chunk-DDWYTB5N.js → chunk-CGRJWXTE.js} +59 -119
  21. package/{chunk-2QDDKFG5.js → chunk-CQ3WA2NE.js} +77 -0
  22. package/{chunk-CJ23A7U4.js → chunk-CUQ6PG2C.js} +14 -5
  23. package/{chunk-BNLAGFPO.js → chunk-ERD7UXVL.js} +1 -1
  24. package/{chunk-ZHIOJU46.js → chunk-G3O3PD6Q.js} +5 -5
  25. package/{chunk-RUX46F4O.js → chunk-HPF7DTOE.js} +3 -3
  26. package/{chunk-ITFKTCHH.js → chunk-MQ25G6VQ.js} +2 -2
  27. package/{chunk-PEBKIEA5.js → chunk-N7DNNV6J.js} +8 -8
  28. package/{chunk-HXAINXPQ.js → chunk-QC5LGHYP.js} +1 -1
  29. package/{chunk-D42DMWKD.js → chunk-QH6NK22I.js} +8 -8
  30. package/{chunk-NU6FRRNU.js → chunk-VBXDAIEC.js} +6 -6
  31. package/{chunk-MWV66JTV.js → chunk-VC5CX46C.js} +1 -1
  32. package/{chunk-6RUYWJXO.js → chunk-ZDONXM5U.js} +3 -3
  33. package/{contentThunks-P73Q4WUM.js → contentThunks-3BFZJFHI.js} +3 -3
  34. package/{createAgentAutomationAction-JLHVMB4X.js → createAgentAutomationAction-YCWUKLMK.js} +3 -3
  35. package/{createDialogAction-6ZKSFM5O.js → createDialogAction-VULS2PKA.js} +4 -4
  36. package/{createPageAction-MN4VOJYH.js → createPageAction-MZZLQPFE.js} +3 -3
  37. package/{dialogCommands-7FH6Z2YK.js → dialogCommands-CJCAMML3.js} +3 -3
  38. package/{dialogSlice-P2G3GRRG.js → dialogSlice-NQO5ZETL.js} +2 -2
  39. package/{docCreateCommands-GN5E5ULM.js → docCreateCommands-H65RSKT4.js} +3 -3
  40. package/{docDeleteCommands-OQWPPQME.js → docDeleteCommands-PBYGJ6CZ.js} +3 -3
  41. package/{docReadCommands-E4QK2223.js → docReadCommands-4VRYN5R5.js} +3 -3
  42. package/{docStore-GUHCPV37.js → docStore-AEJONTM4.js} +1 -1
  43. package/{docUpdateCommands-ZDJE4SI7.js → docUpdateCommands-COZG3ZDB.js} +3 -3
  44. package/{handleSendMessageAction-NLDMT3LZ.js → handleSendMessageAction-WIUO466V.js} +2 -2
  45. package/index.js +41 -41
  46. package/{machineCommands-BCCBSQQR.js → machineCommands-OBL7PFG5.js} +12 -12
  47. package/{machineWsRunDispatch-7FMVGMI6.js → machineWsRunDispatch-U2IEF5OK.js} +12 -12
  48. package/package.json +1 -1
  49. package/{readlineWorkspace-S5ZQIVWS.js → readlineWorkspace-EGTGFPH4.js} +12 -12
  50. package/{runAgentClientLoop-UANNODBO.js → runAgentClientLoop-QHL2HNAI.js} +8 -8
  51. package/{spaceCommands-GSQCO2LI.js → spaceCommands-WGXHETMT.js} +3 -3
  52. package/{streamAgentChatTurn-76WFI2YK.js → streamAgentChatTurn-CE2H23VD.js} +10 -10
  53. package/{tools-XJGU2HAF.js → tools-F25QG6XS.js} +6 -6
  54. package/{tuiSummaryLlmCaller-J5BEPLW5.js → tuiSummaryLlmCaller-3Z24VUWM.js} +2 -2
  55. package/{updateDialogTitleAction-5BHRK2XV.js → updateDialogTitleAction-Z333XUN4.js} +3 -3
@@ -9,7 +9,7 @@ import {
9
9
  initReactI18next,
10
10
  instance,
11
11
  toast
12
- } from "./chunk-PEBKIEA5.js";
12
+ } from "./chunk-N7DNNV6J.js";
13
13
  import {
14
14
  require_date_fns
15
15
  } from "./chunk-M76ECQRD.js";
@@ -72,7 +72,8 @@ import {
72
72
  scheduleWriteReplication
73
73
  } from "./chunk-3RAG2NAD.js";
74
74
  import {
75
- createClientLogger
75
+ createClientLogger,
76
+ isAbortError
76
77
  } from "./chunk-QOKAKDPE.js";
77
78
  import {
78
79
  selectIdentityUserId
@@ -102,6 +103,7 @@ var import_date_fns2 = __toESM(require_date_fns(), 1);
102
103
  import { ulid as ulid3 } from "ulid";
103
104
 
104
105
  // packages/render/table/fetchAndCacheTableRows.ts
106
+ var TABLE_ROWS_FETCH_TIMEOUT_MS = 5e3;
105
107
  var getRowTimestamp = (row) => {
106
108
  if (!row || typeof row !== "object") return 0;
107
109
  return asOptionalPositiveFiniteNumber(Date.parse(row.updatedAt ?? "")) ?? asOptionalPositiveFiniteNumber(Date.parse(row.createdAt ?? "")) ?? 0;
@@ -155,46 +157,63 @@ var loadLocalTableRows = async (db, tenantId, tableId) => {
155
157
  }
156
158
  return rows;
157
159
  };
158
- var fetchTableRowsFromServer = async (server, tenantId, tableId, headers) => {
159
- const res = await fetch(`${server}/rpc/listTableRows`, {
160
- method: "POST",
161
- headers,
162
- body: JSON.stringify({
163
- tenantId,
164
- tableId,
165
- includeDeleted: true,
166
- envelope: TABLE_SYNC_ENVELOPE
167
- })
168
- });
169
- if (!res.ok) {
170
- let msg = `\u52A0\u8F7D\u8868 ${tableId} \u884C\u5931\u8D25\uFF08${res.status}\uFF09`;
171
- try {
172
- const err2 = await res.json();
173
- if (err2 && typeof err2.message === "string") {
174
- msg = err2.message;
160
+ var fetchTableRowsFromServer = async (server, tenantId, tableId, headers, fetchImpl = fetch) => {
161
+ const controller = new AbortController();
162
+ const timeoutId = setTimeout(
163
+ () => controller.abort(),
164
+ TABLE_ROWS_FETCH_TIMEOUT_MS
165
+ );
166
+ try {
167
+ const res = await fetchImpl(`${server}/rpc/listTableRows`, {
168
+ method: "POST",
169
+ headers,
170
+ body: JSON.stringify({
171
+ tenantId,
172
+ tableId,
173
+ includeDeleted: true,
174
+ envelope: TABLE_SYNC_ENVELOPE
175
+ }),
176
+ signal: controller.signal
177
+ });
178
+ if (!res.ok) {
179
+ let msg = `\u52A0\u8F7D\u8868 ${tableId} \u884C\u5931\u8D25\uFF08${res.status}\uFF09`;
180
+ try {
181
+ const err2 = await res.json();
182
+ if (err2 && typeof err2.message === "string") {
183
+ msg = err2.message;
184
+ }
185
+ } catch {
175
186
  }
176
- } catch {
187
+ throw new Error(msg);
188
+ }
189
+ const data = await res.json();
190
+ if (Array.isArray(data)) {
191
+ return {
192
+ rows: data,
193
+ deletedRows: [],
194
+ tableMeta: null,
195
+ complete: false
196
+ };
197
+ }
198
+ if (!data || typeof data !== "object" || !Array.isArray(data.rows)) {
199
+ throw new Error("\u670D\u52A1\u5668\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\uFF1A\u9884\u671F\u4E3A\u6570\u7EC4");
177
200
  }
178
- throw new Error(msg);
179
- }
180
- const data = await res.json();
181
- if (Array.isArray(data)) {
182
201
  return {
183
- rows: data,
184
- deletedRows: [],
185
- tableMeta: null,
186
- complete: false
202
+ rows: data.rows,
203
+ deletedRows: Array.isArray(data.deletedRows) ? data.deletedRows : [],
204
+ tableMeta: data.tableMeta ?? null,
205
+ complete: data.complete === true
187
206
  };
207
+ } catch (err2) {
208
+ if (isAbortError(err2)) {
209
+ throw new Error(
210
+ `\u52A0\u8F7D\u8868 ${tableId} \u884C\u8D85\u65F6\uFF1A${server} \u5728 ${TABLE_ROWS_FETCH_TIMEOUT_MS / 1e3}s \u5185\u65E0\u54CD\u5E94`
211
+ );
212
+ }
213
+ throw err2;
214
+ } finally {
215
+ clearTimeout(timeoutId);
188
216
  }
189
- if (!data || typeof data !== "object" || !Array.isArray(data.rows)) {
190
- throw new Error("\u670D\u52A1\u5668\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\uFF1A\u9884\u671F\u4E3A\u6570\u7EC4");
191
- }
192
- return {
193
- rows: data.rows,
194
- deletedRows: Array.isArray(data.deletedRows) ? data.deletedRows : [],
195
- tableMeta: data.tableMeta ?? null,
196
- complete: data.complete === true
197
- };
198
217
  };
199
218
  var cacheMergedTableRows = async (db, mergedRows) => {
200
219
  if (!db) return;
@@ -252,7 +271,8 @@ var fetchAndCacheTableRows = async ({
252
271
  tenantId,
253
272
  tableId,
254
273
  token,
255
- remoteServers = []
274
+ remoteServers = [],
275
+ fetchImpl = fetch
256
276
  }) => {
257
277
  const headers = {
258
278
  "Content-Type": "application/json"
@@ -263,7 +283,7 @@ var fetchAndCacheTableRows = async ({
263
283
  const localRows = await loadLocalTableRows(db, tenantId, tableId);
264
284
  const remoteResults = await Promise.allSettled(
265
285
  remoteServers.map(
266
- (server) => fetchTableRowsFromServer(server, tenantId, tableId, headers)
286
+ (server) => fetchTableRowsFromServer(server, tenantId, tableId, headers, fetchImpl)
267
287
  )
268
288
  );
269
289
  const fulfilledRemoteSnapshots = remoteResults.filter(
@@ -367,43 +387,6 @@ function reorderColumnInMeta(meta, input, deps) {
367
387
  buildMeta(meta, reorderList(meta.columns, fromIndex, toIndex), deps.nowIso)
368
388
  );
369
389
  }
370
- function renameColumnInMeta(meta, rows, input, deps) {
371
- const { oldName } = input;
372
- const { nowIso } = deps;
373
- const newName = input.newName.trim();
374
- if (!newName) {
375
- return err("\u65B0\u7684\u5B57\u6BB5\u540D\u4E0D\u80FD\u4E3A\u7A7A");
376
- }
377
- if (!meta.columns.some((c) => c.name === oldName)) {
378
- return err(`\u5B57\u6BB5 ${oldName} \u4E0D\u5B58\u5728`);
379
- }
380
- if (meta.columns.some((c) => c.name === newName)) {
381
- return err(`\u5B57\u6BB5 ${newName} \u5DF2\u5B58\u5728`);
382
- }
383
- const newColumns = meta.columns.map(
384
- (c) => c.name === oldName ? { ...c, name: newName } : c
385
- );
386
- const rowPatches = rows.filter((row) => hasOwn(row, oldName)).map((row) => ({
387
- dbKey: row.dbKey,
388
- changes: {
389
- [newName]: row[oldName],
390
- [oldName]: null,
391
- updatedAt: nowIso
392
- }
393
- }));
394
- const newRows = rows.map((row) => {
395
- if (!hasOwn(row, oldName)) {
396
- return row;
397
- }
398
- const { [oldName]: oldValue, ...rest } = row;
399
- return { ...rest, [newName]: oldValue, updatedAt: nowIso };
400
- });
401
- return ok({
402
- ...buildMeta(meta, newColumns, nowIso),
403
- rows: newRows,
404
- rowPatches
405
- });
406
- }
407
390
  function renameColumnLabelInMeta(meta, input, deps) {
408
391
  const { columnId } = input;
409
392
  const label = input.label.trim();
@@ -1189,49 +1172,6 @@ var reorderColumn = createTableCommand(
1189
1172
  }
1190
1173
  }
1191
1174
  );
1192
- var renameColumn = createTableCommand(
1193
- "table/renameColumn",
1194
- async (args, { dispatch } = {}) => {
1195
- const { tenantId, tableId, oldName, newName } = args;
1196
- const meta = state.currentTable;
1197
- if (!meta || meta.tenantId !== tenantId || meta.tableId !== tableId) {
1198
- throw new Error("\u5F53\u524D\u6CA1\u6709\u52A0\u8F7D\u5BF9\u5E94\u7684\u8868\u5B9A\u4E49");
1199
- }
1200
- const result = renameColumnInMeta(
1201
- meta,
1202
- state.rows,
1203
- { oldName, newName },
1204
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1205
- );
1206
- if (!result.ok) {
1207
- throw new Error(result.error);
1208
- }
1209
- const { meta: nextMeta, metaChanges, rows: newRows, rowPatches } = result.value;
1210
- setState((s) => ({ ...s, error: null }));
1211
- try {
1212
- if (dispatch) {
1213
- await Promise.all(
1214
- rowPatches.map((p) => safeDispatch(dispatch, patch(p)))
1215
- );
1216
- await safeDispatch(
1217
- dispatch,
1218
- patch({ dbKey: meta.dbKey, changes: metaChanges })
1219
- );
1220
- }
1221
- setState((s) => ({
1222
- ...s,
1223
- currentTable: nextMeta,
1224
- rows: newRows,
1225
- isInitialized: true
1226
- }));
1227
- return { meta: nextMeta, rows: newRows };
1228
- } catch (e) {
1229
- const msg = e?.message || "\u91CD\u547D\u540D\u5B57\u6BB5\u5931\u8D25";
1230
- setState((s) => ({ ...s, error: msg }));
1231
- throw e;
1232
- }
1233
- }
1234
- );
1235
1175
  var renameColumnLabel = createTableCommand(
1236
1176
  "table/renameColumnLabel",
1237
1177
  async (args, { dispatch } = {}) => {
@@ -160,6 +160,82 @@ function hasParsableObjectArguments(raw) {
160
160
  return false;
161
161
  }
162
162
  }
163
+ var STRICT_JSON_STRING_TOKEN = /^"(?:[^"\\\u0000-\u001F]|\\["\\/bfnrt]|\\u[0-9A-Fa-f]{4})*"$/;
164
+ function isStrictJsonStringToken(value) {
165
+ if (!STRICT_JSON_STRING_TOKEN.test(value)) return false;
166
+ try {
167
+ return typeof JSON.parse(value) === "string";
168
+ } catch {
169
+ return false;
170
+ }
171
+ }
172
+ function closersOf(openStack) {
173
+ return openStack.slice().reverse().map((ch) => ch === "{" ? "}" : "]").join("");
174
+ }
175
+ function scanJsonForTailRepair(input) {
176
+ const stack = [];
177
+ let inString = false;
178
+ let escaped = false;
179
+ let lastCommaOutsideString = null;
180
+ for (let i = 0; i < input.length; i += 1) {
181
+ const ch = input[i];
182
+ if (inString) {
183
+ if (escaped) escaped = false;
184
+ else if (ch === "\\") escaped = true;
185
+ else if (ch === '"') inString = false;
186
+ continue;
187
+ }
188
+ if (ch === '"') {
189
+ inString = true;
190
+ continue;
191
+ }
192
+ if (ch === "{" || ch === "[") {
193
+ stack.push(ch);
194
+ continue;
195
+ }
196
+ if (ch === "}" || ch === "]") {
197
+ const open = stack.pop();
198
+ if (open !== (ch === "}" ? "{" : "[")) return null;
199
+ continue;
200
+ }
201
+ if (ch === ",") {
202
+ lastCommaOutsideString = { index: i, closers: closersOf(stack) };
203
+ continue;
204
+ }
205
+ }
206
+ return { inString, closers: closersOf(stack), lastCommaOutsideString };
207
+ }
208
+ function repairTruncatedToolArguments(raw) {
209
+ if (typeof raw !== "string") return null;
210
+ const withoutTrailingSpace = raw.replace(/\s+$/, "");
211
+ const endsWithComma = withoutTrailingSpace.endsWith(",");
212
+ const trimmed = endsWithComma ? withoutTrailingSpace.slice(0, -1).replace(/\s+$/, "") : withoutTrailingSpace;
213
+ if (trimmed === "" || trimmed.endsWith(",")) return null;
214
+ const scan = scanJsonForTailRepair(trimmed);
215
+ if (!scan || scan.inString) return null;
216
+ const lastChar = trimmed[trimmed.length - 1];
217
+ const tailIsCompleteToken = endsWithComma || lastChar === '"' || lastChar === "}" || lastChar === "]";
218
+ if (!tailIsCompleteToken) return null;
219
+ const candidates = [trimmed + scan.closers];
220
+ const lastComma = scan.lastCommaOutsideString;
221
+ if (lastComma && lastComma.index > 0) {
222
+ const tailAfterComma = trimmed.slice(lastComma.index + 1).trim();
223
+ if (isStrictJsonStringToken(tailAfterComma)) {
224
+ const head = trimmed.slice(0, lastComma.index);
225
+ candidates.push(head + lastComma.closers);
226
+ }
227
+ }
228
+ for (const candidate of candidates) {
229
+ try {
230
+ const parsed = JSON.parse(candidate);
231
+ if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) && Object.keys(parsed).length > 0) {
232
+ return candidate;
233
+ }
234
+ } catch {
235
+ }
236
+ }
237
+ return null;
238
+ }
163
239
  function downgradeUnparsableToolCalls(messages) {
164
240
  if (!Array.isArray(messages) || messages.length === 0) {
165
241
  return { messages, downgraded: 0 };
@@ -218,5 +294,6 @@ function downgradeUnparsableToolCalls(messages) {
218
294
  export {
219
295
  sanitizeForOutbound,
220
296
  hasParsableObjectArguments,
297
+ repairTruncatedToolArguments,
221
298
  downgradeUnparsableToolCalls
222
299
  };
@@ -8,7 +8,7 @@ import {
8
8
  readSseFrames,
9
9
  streamSseDataValues,
10
10
  throwIfChatCompletionStreamFailed
11
- } from "./chunk-HXAINXPQ.js";
11
+ } from "./chunk-QC5LGHYP.js";
12
12
  import {
13
13
  clipToolText,
14
14
  hasImageInRuntimeMessages,
@@ -20,8 +20,9 @@ import {
20
20
  import {
21
21
  downgradeUnparsableToolCalls,
22
22
  hasParsableObjectArguments,
23
+ repairTruncatedToolArguments,
23
24
  sanitizeForOutbound
24
- } from "./chunk-2QDDKFG5.js";
25
+ } from "./chunk-CQ3WA2NE.js";
25
26
  import {
26
27
  createThinkParserState,
27
28
  createToolCallAccumulator,
@@ -13966,9 +13967,17 @@ ${reasoningTailLog}
13966
13967
  try {
13967
13968
  const rawPoisonArguments = toolCall.function?.arguments;
13968
13969
  if (typeof rawPoisonArguments === "string" && rawPoisonArguments.trim() !== "" && !hasParsableObjectArguments(rawPoisonArguments)) {
13969
- throw new Error(
13970
- `\u6A21\u578B\u751F\u6210\u7684 tool_call arguments \u4E0D\u662F\u5408\u6CD5 JSON\uFF08\u7591\u4F3C\u4E0A\u6E38\u6D41\u5F0F\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${rawPoisonArguments.length}\uFF09\u3002\u8BF7\u91CD\u65B0\u5B8C\u6574\u8C03\u7528 ${toolName}\uFF0C\u786E\u4FDD arguments \u662F\u95ED\u5408\u7684 JSON \u5BF9\u8C61\uFF1B\u82E5\u56E0\u53C2\u6570\u8FC7\u957F\u88AB\u622A\u65AD\uFF0C\u5148\u7CBE\u7B80\u53C2\u6570\uFF08\u4E0D\u8981\u5185\u5D4C diff/\u65E5\u5FD7\u7B49\u5927\u6BB5\u6587\u672C\uFF0C\u6539\u4F20\u8DEF\u5F84\u8BA9\u5BF9\u65B9\u81EA\u884C\u8BFB\u53D6\uFF09\u518D\u91CD\u8BD5\u3002`
13971
- );
13970
+ const repairedArguments = repairTruncatedToolArguments(rawPoisonArguments);
13971
+ if (repairedArguments) {
13972
+ console.log(
13973
+ `[tool-args-repair] ${toolName}: \u8865\u5168\u88AB\u622A\u65AD\u7684 arguments\uFF08${rawPoisonArguments.length} \u2192 ${repairedArguments.length} \u5B57\u7B26\uFF0C\u5185\u5BB9\u96F6\u635F\u5931\uFF09`
13974
+ );
13975
+ toolCall.function.arguments = repairedArguments;
13976
+ } else {
13977
+ throw new Error(
13978
+ `\u6A21\u578B\u751F\u6210\u7684 tool_call arguments \u4E0D\u662F\u5408\u6CD5 JSON\uFF08\u7591\u4F3C\u4E0A\u6E38\u6D41\u5F0F\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${rawPoisonArguments.length}\uFF09\u3002\u8BF7\u91CD\u65B0\u5B8C\u6574\u8C03\u7528 ${toolName}\uFF0C\u786E\u4FDD arguments \u662F\u95ED\u5408\u7684 JSON \u5BF9\u8C61\uFF1B\u82E5\u56E0\u53C2\u6570\u8FC7\u957F\u88AB\u622A\u65AD\uFF0C\u5148\u7CBE\u7B80\u53C2\u6570\uFF08\u4E0D\u8981\u5185\u5D4C diff/\u65E5\u5FD7\u7B49\u5927\u6BB5\u6587\u672C\uFF0C\u6539\u4F20\u8DEF\u5F84\u8BA9\u5BF9\u65B9\u81EA\u884C\u8BFB\u53D6\uFF09\u518D\u91CD\u8BD5\u3002`
13979
+ );
13980
+ }
13972
13981
  }
13973
13982
  const writeTool = toolName === "writeFile" || toolName === "editFile";
13974
13983
  if (writeTool && input.onActionGate && input.fileWriteGateEnabled !== false) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-ZNZCVXRV.js";
4
+ } from "./chunk-2SFNAHL6.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-KG7ANYLN.js";
8
+ } from "./chunk-3SPWIDHH.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-ZNZCVXRV.js";
15
+ } from "./chunk-2SFNAHL6.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,7 +23,7 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-D42DMWKD.js";
26
+ } from "./chunk-QH6NK22I.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
@@ -35,10 +35,10 @@ import {
35
35
  messageStreamEnd,
36
36
  messageStreaming,
37
37
  updateToolMessage
38
- } from "./chunk-PEBKIEA5.js";
38
+ } from "./chunk-N7DNNV6J.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-6RUYWJXO.js";
41
+ } from "./chunk-ZDONXM5U.js";
42
42
  import {
43
43
  addActiveController,
44
44
  removeActiveController,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-NU6FRRNU.js";
4
+ } from "./chunk-VBXDAIEC.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-D42DMWKD.js";
7
+ } from "./chunk-QH6NK22I.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-CJ23A7U4.js";
10
+ } from "./chunk-CUQ6PG2C.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
13
  } from "./chunk-V3ZKNK5D.js";
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
326
326
  ).unwrap();
327
327
  if (dbSpaceId) {
328
328
  try {
329
- const { updateContentTitle } = await import("./contentThunks-P73Q4WUM.js");
329
+ const { updateContentTitle } = await import("./contentThunks-3BFZJFHI.js");
330
330
  await dispatch(
331
331
  updateContentTitle({
332
332
  spaceId: dbSpaceId,
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
365
365
  }
366
366
  }
367
367
  async function createDocState(args, thunkApi) {
368
- const { createPageAction } = await import("./createPageAction-MN4VOJYH.js");
368
+ const { createPageAction } = await import("./createPageAction-MZZLQPFE.js");
369
369
  return createPageAction(args, thunkApi);
370
370
  }
371
371
  function subscribe(listener) {
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-AGGIDPCZ.js";
14
14
  import {
15
15
  runLlm
16
- } from "./chunk-6RUYWJXO.js";
16
+ } from "./chunk-ZDONXM5U.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
19
  } from "./chunk-BJCWNHVU.js";
@@ -17122,7 +17122,7 @@ var messageSlice = createSliceWithThunks({
17122
17122
  runtimeOptions: args.runtimeOptions
17123
17123
  });
17124
17124
  if (agentKeyToUse) {
17125
- const { streamAgentChatTurn } = await import("./agentSlice-S3JFDTH4.js");
17125
+ const { streamAgentChatTurn } = await import("./agentSlice-BLCUNM5V.js");
17126
17126
  await dispatch(
17127
17127
  streamAgentChatTurn({
17128
17128
  agentKey: agentKeyToUse,
@@ -18255,7 +18255,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
18255
18255
  }
18256
18256
  if (isCurrentDialog) {
18257
18257
  await thunkApi.dispatch(resetMsgs());
18258
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-P2G3GRRG.js");
18258
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-NQO5ZETL.js");
18259
18259
  dispatch(clearPendingAttachments2());
18260
18260
  }
18261
18261
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -18263,15 +18263,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
18263
18263
 
18264
18264
  // packages/chat/dialog/dialogSlice.ts
18265
18265
  var runCreateDialogAction = async (args, thunkApi) => {
18266
- const { createDialogAction } = await import("./createDialogAction-6ZKSFM5O.js");
18266
+ const { createDialogAction } = await import("./createDialogAction-VULS2PKA.js");
18267
18267
  return createDialogAction(args, thunkApi);
18268
18268
  };
18269
18269
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
18270
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-JLHVMB4X.js");
18270
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-YCWUKLMK.js");
18271
18271
  return createAgentAutomationAction(args, thunkApi);
18272
18272
  };
18273
18273
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
18274
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-5BHRK2XV.js");
18274
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-Z333XUN4.js");
18275
18275
  return updateDialogTitleAction(args, thunkApi);
18276
18276
  };
18277
18277
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -18295,7 +18295,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
18295
18295
  return setDialogExtraReferencesAction(args, thunkApi);
18296
18296
  };
18297
18297
  var runHandleSendMessageAction = async (args, thunkApi) => {
18298
- const { handleSendMessageAction } = await import("./handleSendMessageAction-NLDMT3LZ.js");
18298
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-WIUO466V.js");
18299
18299
  return handleSendMessageAction(args, thunkApi);
18300
18300
  };
18301
18301
  function clearDialogState() {
@@ -18308,7 +18308,7 @@ var createPageAndAddReference = createAsyncThunk(
18308
18308
  async (payload, { dispatch, getState, rejectWithValue }) => {
18309
18309
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
18310
18310
  try {
18311
- const { createDocState } = await import("./docStore-GUHCPV37.js");
18311
+ const { createDocState } = await import("./docStore-AEJONTM4.js");
18312
18312
  const pageKey = await createDocState(
18313
18313
  { slateData, title },
18314
18314
  { dispatch, getState }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sanitizeForOutbound
3
- } from "./chunk-2QDDKFG5.js";
3
+ } from "./chunk-CQ3WA2NE.js";
4
4
  import {
5
5
  accumulateToolCallDelta,
6
6
  createThinkParserState,
@@ -81,14 +81,14 @@ import {
81
81
  } from "./chunk-VF4K2QE6.js";
82
82
  import {
83
83
  createDocState
84
- } from "./chunk-ITFKTCHH.js";
84
+ } from "./chunk-MQ25G6VQ.js";
85
85
  import {
86
86
  BUILTIN_OBJECT_SKILL_IDS,
87
87
  buildBuiltinObjectSkillConfig,
88
88
  buildBuiltinObjectSkillDbKey,
89
89
  buildBuiltinObjectSkillPageContent,
90
90
  createDialogAction
91
- } from "./chunk-WD4SMAPR.js";
91
+ } from "./chunk-BGIWMGSP.js";
92
92
  import {
93
93
  DEFAULT_COLLAPSED_CATEGORIES,
94
94
  addContentToSpace,
@@ -106,7 +106,7 @@ import {
106
106
  updateContentCategory,
107
107
  updateContentTitle,
108
108
  writeStoredCollapsedCategories
109
- } from "./chunk-DDWYTB5N.js";
109
+ } from "./chunk-CGRJWXTE.js";
110
110
  import {
111
111
  getCurrentSpaceId,
112
112
  getCurrentSpaceIdRaw,
@@ -128,14 +128,14 @@ import {
128
128
  selectMsgById,
129
129
  uiAskChoiceFunc,
130
130
  uiAskChoiceFunctionSchema
131
- } from "./chunk-PEBKIEA5.js";
131
+ } from "./chunk-N7DNNV6J.js";
132
132
  import {
133
133
  createAgent,
134
134
  deleteServerSyncedCredential,
135
135
  runLlm,
136
136
  streamAgentChatTurn,
137
137
  updateAgent
138
- } from "./chunk-6RUYWJXO.js";
138
+ } from "./chunk-ZDONXM5U.js";
139
139
  import {
140
140
  getActiveDialogKey,
141
141
  selectCurrentDialogKey,
@@ -4672,7 +4672,7 @@ async function deleteDialogsFunc(args, thunkApi) {
4672
4672
  const deletedDialogIds = [];
4673
4673
  const deletedDialogKeys = [];
4674
4674
  const failures = [];
4675
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-P2G3GRRG.js");
4675
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-NQO5ZETL.js");
4676
4676
  for (const target of targets) {
4677
4677
  try {
4678
4678
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -15546,7 +15546,7 @@ var executeToolRun = createAsyncThunk(
15546
15546
  if (!executionInput) {
15547
15547
  throw new Error(`ToolRun ${id} has no input to execute with.`);
15548
15548
  }
15549
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-XJGU2HAF.js");
15549
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-F25QG6XS.js");
15550
15550
  const { executor } = findToolExecutor2(run.toolName);
15551
15551
  toolRunStarted({
15552
15552
  id: run.id,
@@ -18053,7 +18053,7 @@ async function updateDocFunc(args, thunkApi) {
18053
18053
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18054
18054
  };
18055
18055
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18056
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-GUHCPV37.js");
18056
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-AEJONTM4.js");
18057
18057
  if (getDocState().pageKey === id) {
18058
18058
  applyExternalDocUpdate({
18059
18059
  slateData: finalSlateData,
@@ -60,7 +60,7 @@ import {
60
60
  import {
61
61
  inlineImageUrlsForCustomProvider,
62
62
  prepareTools
63
- } from "./chunk-KG7ANYLN.js";
63
+ } from "./chunk-3SPWIDHH.js";
64
64
  import {
65
65
  getServerProviderSecret
66
66
  } from "./chunk-HS7MLR74.js";
@@ -78,7 +78,7 @@ import {
78
78
  rememberMemoryFunctionSchema,
79
79
  resolveAgentRequiredPackIds,
80
80
  setTodoListFunc
81
- } from "./chunk-D42DMWKD.js";
81
+ } from "./chunk-QH6NK22I.js";
82
82
  import {
83
83
  fetchWithTransientRetry,
84
84
  isTransientFetchError
@@ -101,13 +101,13 @@ import {
101
101
  prepareTokenUsageData,
102
102
  resolveBuiltinPlatformAgentConfig,
103
103
  runKeyed
104
- } from "./chunk-PEBKIEA5.js";
104
+ } from "./chunk-N7DNNV6J.js";
105
105
  import {
106
106
  BUILTIN_TITLE_LLM_CONFIG
107
107
  } from "./chunk-EVBFYPDC.js";
108
108
  import {
109
109
  fetchServerSyncedCredential
110
- } from "./chunk-6RUYWJXO.js";
110
+ } from "./chunk-ZDONXM5U.js";
111
111
  import {
112
112
  require_date_fns
113
113
  } from "./chunk-M76ECQRD.js";
@@ -159,7 +159,7 @@ import {
159
159
  resolveOpenAiCompatibleProviderConfig,
160
160
  shouldUseGeminiNativeToolRoute,
161
161
  summarizeToolArguments
162
- } from "./chunk-CJ23A7U4.js";
162
+ } from "./chunk-CUQ6PG2C.js";
163
163
  import {
164
164
  PlatformStreamInterruptedError,
165
165
  buildPlatformChatCompletionRequest,
@@ -171,7 +171,7 @@ import {
171
171
  readSseDataValues,
172
172
  resolvePlatformChatProviderConfig,
173
173
  shouldUsePlatformChatProvider
174
- } from "./chunk-HXAINXPQ.js";
174
+ } from "./chunk-QC5LGHYP.js";
175
175
  import {
176
176
  resolveAgentRuntimeConfigFromRecord,
177
177
  resolveHistoricalToolContentCap
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-NU6FRRNU.js";
3
+ } from "./chunk-VBXDAIEC.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-RXX4GDIH.js";