nolo-cli 0.151.0-alpha.3 → 0.152.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.
Files changed (63) hide show
  1. package/{_executeModel-T7ANHTUW.js → _executeModel-4KHFMQT4.js} +15 -15
  2. package/{agentDeleteCommand-4L5KCKFY.js → agentDeleteCommand-EKFV5FC7.js} +15 -15
  3. package/{agentEmailCommands-2IMMIRO2.js → agentEmailCommands-MNV3MUH5.js} +17 -17
  4. package/{agentListCommands-TWFLUYIZ.js → agentListCommands-E6FYKXC3.js} +6 -6
  5. package/{agentMachineCommands-KIWXWT6L.js → agentMachineCommands-2GFUU7GF.js} +7 -7
  6. package/{agentRecordCommands-727NPCRW.js → agentRecordCommands-LPHHTEPM.js} +16 -16
  7. package/{agentRunCommand-JASIG3FZ.js → agentRunCommand-JSPW7W32.js} +17 -17
  8. package/{agentRuntimeLocal-KKSQJMTE.js → agentRuntimeLocal-ARS4TV77.js} +6 -6
  9. package/{agentSlice-SLV57QGU.js → agentSlice-IP4DZNNV.js} +1 -1
  10. package/{appDeleteCommands-4PL4KYRN.js → appDeleteCommands-JHTLKQSX.js} +6 -6
  11. package/{appDeployCommands-EEEXCEB6.js → appDeployCommands-5V26M2KA.js} +6 -6
  12. package/{appDeployStatusCommands-35ZX7T66.js → appDeployStatusCommands-SBSPS627.js} +6 -6
  13. package/{appGetCommands-WFCHXJWF.js → appGetCommands-NKPD2L45.js} +6 -6
  14. package/{appListCommands-XY2U6DPF.js → appListCommands-ZOGRZFYY.js} +6 -6
  15. package/{chunk-BPMPOFWP.js → chunk-4PXHOOFA.js} +784 -3
  16. package/{chunk-PKZKOVA5.js → chunk-64PFYIAY.js} +19 -13
  17. package/{chunk-BJEZC5RA.js → chunk-6LIKQYG4.js} +3 -3
  18. package/{chunk-CYJWI3NH.js → chunk-AHYBQP3M.js} +3 -3
  19. package/{chunk-AUIJZACN.js → chunk-BNDETALN.js} +76 -38
  20. package/{chunk-6CCFTVBP.js → chunk-DTODXBHK.js} +103 -1
  21. package/{chunk-LGN377P3.js → chunk-DYYMIUN4.js} +2 -2
  22. package/{chunk-ROCUB2H2.js → chunk-EHFS4XZO.js} +2 -2
  23. package/{chunk-3SZA4U64.js → chunk-HL3O3PCQ.js} +1 -1
  24. package/{chunk-UOKFKFPO.js → chunk-HSJPKBLC.js} +1 -1
  25. package/{chunk-TTH4HOJD.js → chunk-I5V3V2H4.js} +13 -11
  26. package/{chunk-I2XLRXVX.js → chunk-JWTSWUPS.js} +3 -3
  27. package/{chunk-626KHJNX.js → chunk-KMM2X7LP.js} +2 -2
  28. package/{chunk-DFDXM2Y4.js → chunk-LC23WBCU.js} +3 -3
  29. package/{chunk-V4EE3D54.js → chunk-MZHOLWW5.js} +2 -2
  30. package/{chunk-AJ3G7X2K.js → chunk-OFVFQYIE.js} +1 -1
  31. package/{chunk-U5ICMAFV.js → chunk-PFBIXTFB.js} +24 -105
  32. package/{chunk-U5GPBQDG.js → chunk-PMYAE4OZ.js} +1 -1
  33. package/{chunk-3T4ZG6AC.js → chunk-PPU323UE.js} +27 -22
  34. package/{chunk-IK2TSJQA.js → chunk-RQ6E3G5L.js} +1 -1
  35. package/{chunk-RN2GPWN6.js → chunk-T5BHHWA5.js} +2 -2
  36. package/{chunk-PIDUNDFS.js → chunk-VNP54NZL.js} +9 -7
  37. package/{chunk-AG7MCDLR.js → chunk-XCA6HQGS.js} +2 -2
  38. package/{chunk-VWW6O2TL.js → chunk-XTWDF6RU.js} +10 -10
  39. package/{commandRegistry-NBLZEMCW.js → commandRegistry-VBALU4Q4.js} +40 -40
  40. package/{contentThunks-6AIWNSGO.js → contentThunks-HPY2QNWZ.js} +5 -5
  41. package/{createAgentAutomationAction-4BUS65DZ.js → createAgentAutomationAction-6ADGPGY6.js} +5 -5
  42. package/{createDialogAction-QAIKSCG4.js → createDialogAction-6ABMSEW2.js} +6 -6
  43. package/{createPageAction-DXCZ334C.js → createPageAction-OC4NNRPC.js} +5 -5
  44. package/{dialogCommands-YZLSJB6X.js → dialogCommands-EIGBRSQP.js} +6 -6
  45. package/{dialogSlice-PVUSMKFW.js → dialogSlice-SI45KJOH.js} +4 -4
  46. package/{docCreateCommands-JB2RRMRJ.js → docCreateCommands-3JDBBMU5.js} +6 -6
  47. package/{docDeleteCommands-AQENULNM.js → docDeleteCommands-5M6C7UUB.js} +6 -6
  48. package/{docReadCommands-DYD25YLQ.js → docReadCommands-DUB57F6V.js} +6 -6
  49. package/{docStore-CSEBEMKP.js → docStore-L43MDEK4.js} +1 -1
  50. package/{docUpdateCommands-3GVS23QL.js → docUpdateCommands-WF7MAMPK.js} +6 -6
  51. package/{handleSendMessageAction-G2TLYGC4.js → handleSendMessageAction-BSMU7SVS.js} +9 -9
  52. package/index.js +4 -4
  53. package/{localRuntimeAdapter-B4TAYYA7.js → localRuntimeAdapter-N5PDR26F.js} +15 -15
  54. package/{machineCommands-6OBFD3XF.js → machineCommands-TMXJKZCE.js} +16 -16
  55. package/{machineWsRunDispatch-OO7N3O3Y.js → machineWsRunDispatch-25H63KEH.js} +16 -16
  56. package/package.json +1 -1
  57. package/{readlineWorkspace-UIQN7JUR.js → readlineWorkspace-BS7WVCL2.js} +202 -57
  58. package/{runAgentClientLoop-GS3SGG37.js → runAgentClientLoop-BVKRI4SY.js} +13 -13
  59. package/{spaceCommands-ZR5BR3GX.js → spaceCommands-5EWREUWS.js} +6 -6
  60. package/{streamAgentChatTurn-4XYC33KE.js → streamAgentChatTurn-B4VFUV52.js} +16 -16
  61. package/{tools-P77EE7Q4.js → tools-5WYAUKMK.js} +9 -9
  62. package/{tuiSummaryLlmCaller-BM3VSTBU.js → tuiSummaryLlmCaller-PPU7YDBG.js} +45 -23
  63. package/{updateDialogTitleAction-CIANVPZC.js → updateDialogTitleAction-YJHDKHFX.js} +5 -5
@@ -9,7 +9,7 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-IK2TSJQA.js";
12
+ } from "./chunk-RQ6E3G5L.js";
13
13
  import {
14
14
  getReadableCliDb
15
15
  } from "./chunk-P5QACQDK.js";
@@ -27,7 +27,7 @@ import {
27
27
  resolveBoundMachineId,
28
28
  resolveFileWriteGateEnabled,
29
29
  resolveLocalUserId
30
- } from "./chunk-PKZKOVA5.js";
30
+ } from "./chunk-64PFYIAY.js";
31
31
  import {
32
32
  clearCredentialAvailability,
33
33
  readCredentialEntry,
@@ -72,14 +72,14 @@ import {
72
72
  } from "./chunk-BMQ2MJUK.js";
73
73
  import {
74
74
  resolveCliLocalRuntimeKeyCapability
75
- } from "./chunk-3T4ZG6AC.js";
75
+ } from "./chunk-PPU323UE.js";
76
76
  import {
77
77
  isTransientFetchError
78
78
  } from "./chunk-I2ZMGXXF.js";
79
79
  import {
80
80
  parseUiCard,
81
81
  uiCardFallback
82
- } from "./chunk-ROCUB2H2.js";
82
+ } from "./chunk-EHFS4XZO.js";
83
83
  import {
84
84
  isGatewayHttpStatus
85
85
  } from "./chunk-NF64D32W.js";
@@ -91,11 +91,11 @@ import {
91
91
  chooseMemoryOwners,
92
92
  loadMemoryCandidatesFromDb,
93
93
  resolveAgentMemoryPolicy
94
- } from "./chunk-AG7MCDLR.js";
94
+ } from "./chunk-XCA6HQGS.js";
95
95
  import {
96
96
  API_REPORTED_COST_MULTIPLIER,
97
97
  parseUiAskChoiceContent
98
- } from "./chunk-U5ICMAFV.js";
98
+ } from "./chunk-PFBIXTFB.js";
99
99
  import {
100
100
  isOAuthApiKeyRef
101
101
  } from "./chunk-UKZX3NHN.js";
@@ -107,11 +107,11 @@ import {
107
107
  LOCAL_AGENT_CONFIG_MISSING_CODE,
108
108
  LOCAL_TURN_ABORTED_CODE,
109
109
  readActionGate
110
- } from "./chunk-AUIJZACN.js";
110
+ } from "./chunk-BNDETALN.js";
111
111
  import {
112
112
  devinChannelContextWindow,
113
113
  resolveAgentRuntimeConfigFromRecord
114
- } from "./chunk-UOKFKFPO.js";
114
+ } from "./chunk-HSJPKBLC.js";
115
115
  import {
116
116
  isDevinOAuthAgent
117
117
  } from "./chunk-5ZUL4CUO.js";
@@ -137,10 +137,10 @@ import {
137
137
  } from "./chunk-3MZAGMYY.js";
138
138
  import {
139
139
  normalizeUsage
140
- } from "./chunk-6CCFTVBP.js";
140
+ } from "./chunk-DTODXBHK.js";
141
141
  import {
142
142
  findModelContextWindow
143
- } from "./chunk-BPMPOFWP.js";
143
+ } from "./chunk-4PXHOOFA.js";
144
144
  import {
145
145
  clipCompactText
146
146
  } from "./chunk-5MMAK75Q.js";
@@ -11245,7 +11245,7 @@ function isBalanceExhaustedError(error) {
11245
11245
 
11246
11246
  // packages/cli/client/agentRun.ts
11247
11247
  async function loadRunLocalAgentTurn() {
11248
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-KKSQJMTE.js");
11248
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-ARS4TV77.js");
11249
11249
  return runLocalAgentTurn;
11250
11250
  }
11251
11251
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -16065,8 +16065,10 @@ export {
16065
16065
  resolveAgentContextWindow,
16066
16066
  platformCreditsFromUsage,
16067
16067
  formatCreditsChip,
16068
+ formatTokenCount,
16068
16069
  resolveAuthorityTurnCount,
16069
16070
  computeBaselineContextTokens,
16071
+ resolveContextUsage,
16070
16072
  renderTokenStatus,
16071
16073
  COLLAPSED_PASTE_PLACEHOLDER_RE,
16072
16074
  shouldCollapsePaste,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-PKZKOVA5.js";
4
+ } from "./chunk-64PFYIAY.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-SW4S4XYB.js";
8
8
  import {
9
9
  clipMultilineText
10
- } from "./chunk-ROCUB2H2.js";
10
+ } from "./chunk-EHFS4XZO.js";
11
11
  import {
12
12
  runLocalAgentTurn
13
- } from "./chunk-AUIJZACN.js";
13
+ } from "./chunk-BNDETALN.js";
14
14
  import {
15
15
  applyToolSurfaceConstraints
16
16
  } from "./chunk-QLQ573SU.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-6AIWNSGO.js");
336
+ const { updateContentTitle } = await import("./contentThunks-HPY2QNWZ.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-DXCZ334C.js");
375
+ const { createPageAction } = await import("./createPageAction-OC4NNRPC.js");
376
376
  return createPageAction(args, thunkApi);
377
377
  }
378
378
  function subscribe(listener) {
@@ -308,7 +308,7 @@ var slice = createSliceWithThunks({
308
308
  const overrides = {};
309
309
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
310
310
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
311
- const { _executeModel } = await import("./_executeModel-T7ANHTUW.js");
311
+ const { _executeModel } = await import("./_executeModel-4KHFMQT4.js");
312
312
  return _executeModel(
313
313
  {
314
314
  isStreaming: args.isStreaming ?? false,
@@ -329,7 +329,7 @@ var slice = createSliceWithThunks({
329
329
  * - 循环直到无工具调用或触发其他运行时停止条件
330
330
  */
331
331
  runAgent: create.asyncThunk(async (args, thunkApi) => {
332
- const { runAgentClientLoop } = await import("./runAgentClientLoop-GS3SGG37.js");
332
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-BVKRI4SY.js");
333
333
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
334
334
  {
335
335
  agentKey: args.agentKey,
@@ -345,7 +345,7 @@ var slice = createSliceWithThunks({
345
345
  * 聊天轮次流式 Agent 调用
346
346
  */
347
347
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
348
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-4XYC33KE.js");
348
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-B4VFUV52.js");
349
349
  return streamAgentChatTurnHandler(args, thunkApi);
350
350
  }),
351
351
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-3T4ZG6AC.js";
3
+ } from "./chunk-PPU323UE.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-U5ICMAFV.js";
6
+ } from "./chunk-PFBIXTFB.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-5EBLANFT.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-U5ICMAFV.js";
5
+ } from "./chunk-PFBIXTFB.js";
6
6
  import {
7
7
  getCurrentSpaceId,
8
8
  getCurrentSpaceIdRaw,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-QYPE3TS3.js";
15
15
  import {
16
16
  runLlm
17
- } from "./chunk-DFDXM2Y4.js";
17
+ } from "./chunk-LC23WBCU.js";
18
18
  import {
19
19
  getApproxPricePerImage
20
20
  } from "./chunk-4JH2UMJR.js";
@@ -101,14 +101,17 @@ import {
101
101
  REPETITION_LOOP_FALLBACK_MESSAGE,
102
102
  STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE,
103
103
  STREAM_TRUNCATED_FALLBACK_MESSAGE,
104
+ asOptionalJsonRecord,
105
+ extractReferenceKeysFromMessage,
104
106
  normalizeUsage,
105
107
  resolveAutoExecutionProfile
106
- } from "./chunk-6CCFTVBP.js";
108
+ } from "./chunk-DTODXBHK.js";
107
109
  import {
108
110
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
109
111
  DEFAULT_CONTEXT_WINDOW,
110
112
  buildCompactionMetricsFromPlan,
111
113
  buildCompactionUserContent,
114
+ computeSummarySourceMetadata,
112
115
  formatCompactionMetricsLog,
113
116
  formatFileOperationsFromMessages,
114
117
  formatMessagesForSummaryWithTruncation,
@@ -116,7 +119,7 @@ import {
116
119
  getModelInfo,
117
120
  planCompression,
118
121
  serializeMessageContent
119
- } from "./chunk-BPMPOFWP.js";
122
+ } from "./chunk-4PXHOOFA.js";
120
123
  import {
121
124
  asRecordOrEmpty
122
125
  } from "./chunk-KX6YBIHG.js";
@@ -141,10 +144,7 @@ import {
141
144
  createKey,
142
145
  createTokenKey,
143
146
  createTokenStatsKey,
144
- dialogMessageKey,
145
- isDialogRecordKey,
146
- isPageKey,
147
- isTableMetaKey
147
+ dialogMessageKey
148
148
  } from "./chunk-5EMSBTQ6.js";
149
149
  import {
150
150
  asOptionalFiniteNumber
@@ -8209,95 +8209,6 @@ function notifyCompressionFailure(error) {
8209
8209
  }
8210
8210
  }
8211
8211
 
8212
- // packages/chat/messages/parseJsonRecord.ts
8213
- function asOptionalJsonRecord(value) {
8214
- if (typeof value === "string") {
8215
- if (!value.trim()) return void 0;
8216
- try {
8217
- const parsed = JSON.parse(value);
8218
- return isRecord(parsed) ? parsed : void 0;
8219
- } catch {
8220
- return void 0;
8221
- }
8222
- }
8223
- return isRecord(value) ? value : void 0;
8224
- }
8225
-
8226
- // packages/chat/dialog/actions/extractReferenceKeys.ts
8227
- var REFERENCE_ARG_FIELDS = [
8228
- "pageKey",
8229
- "dialogKey",
8230
- "dbKey",
8231
- "docKey",
8232
- "key",
8233
- "id",
8234
- "rowDbKey",
8235
- "tableKey",
8236
- "table"
8237
- ];
8238
- var isLoadableReferenceKey = (key) => isPageKey(key) || isDialogRecordKey(key) || isTableMetaKey(key);
8239
- var extractKeysFromArgs = (args, out) => {
8240
- if (!args) return;
8241
- for (const field of REFERENCE_ARG_FIELDS) {
8242
- const value = args[field];
8243
- const key = asTrimmedString(value);
8244
- if (key && isLoadableReferenceKey(key)) {
8245
- out.add(key);
8246
- }
8247
- }
8248
- };
8249
- var extractKeysFromToolCalls = (msg, out) => {
8250
- const toolCalls = msg.tool_calls;
8251
- if (!Array.isArray(toolCalls)) return;
8252
- for (const call of toolCalls) {
8253
- const fn = call.function;
8254
- const argumentsText = asTrimmedString(fn.arguments);
8255
- if (!argumentsText) continue;
8256
- const parsed = asOptionalJsonRecord(argumentsText);
8257
- if (parsed) extractKeysFromArgs(parsed, out);
8258
- }
8259
- };
8260
- var extractKeysFromToolPayload = (toolPayload, out) => {
8261
- if (!toolPayload) return;
8262
- if (isRecord(toolPayload.input)) {
8263
- extractKeysFromArgs(
8264
- toolPayload.input,
8265
- out
8266
- );
8267
- return;
8268
- }
8269
- const rawToolCall = toolPayload.rawToolCall;
8270
- if (isRecord(rawToolCall)) {
8271
- const fn = rawToolCall.function;
8272
- if (isRecord(fn)) {
8273
- const argumentsText = asTrimmedString(fn.arguments);
8274
- if (argumentsText) {
8275
- const parsed = asOptionalJsonRecord(argumentsText);
8276
- if (parsed) extractKeysFromArgs(parsed, out);
8277
- }
8278
- }
8279
- }
8280
- };
8281
- var extractKeysFromContent = (msg, out) => {
8282
- const content = msg.content;
8283
- if (!content) return;
8284
- const parts = Array.isArray(content) ? content : [content];
8285
- for (const part of parts) {
8286
- if (!isRecord(part)) continue;
8287
- const pageKey = asTrimmedString(part.pageKey);
8288
- if (pageKey) out.add(pageKey);
8289
- const dialogKey = asTrimmedString(part.dialogKey);
8290
- if (dialogKey) out.add(dialogKey);
8291
- }
8292
- };
8293
- var extractReferenceKeysFromMessage = (msg) => {
8294
- const keys = /* @__PURE__ */ new Set();
8295
- extractKeysFromContent(msg, keys);
8296
- extractKeysFromToolCalls(msg, keys);
8297
- extractKeysFromToolPayload(msg.toolPayload, keys);
8298
- return Array.from(keys);
8299
- };
8300
-
8301
8212
  // packages/chat/dialog/actions/updateDialogSummaryAction.ts
8302
8213
  var getMessagesForDialogFromState = (state, dialogId) => {
8303
8214
  const msgsState = state.message.dialogStateById[dialogId]?.msgs;
@@ -8393,6 +8304,10 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
8393
8304
  }
8394
8305
  if (newSummary && typeof newSummary === "string" && newSummary.trim()) {
8395
8306
  const currentCount = dialogConfig.compressionCount || 0;
8307
+ const sourceMeta = await computeSummarySourceMetadata(
8308
+ allMsgs,
8309
+ newSummarizedBeforeId
8310
+ );
8396
8311
  await dispatch(
8397
8312
  patch({
8398
8313
  dbKey: dialogKey,
@@ -8400,7 +8315,12 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
8400
8315
  summary: newSummary.trim(),
8401
8316
  summarizedBeforeId: newSummarizedBeforeId,
8402
8317
  referenceKeys: Array.from(extractedKeys),
8403
- compressionCount: currentCount + 1
8318
+ compressionCount: currentCount + 1,
8319
+ ...sourceMeta ? {
8320
+ sourceHash: sourceMeta.sourceHash,
8321
+ sourceCount: sourceMeta.sourceCount,
8322
+ schemaVersion: sourceMeta.schemaVersion
8323
+ } : {}
8404
8324
  }
8405
8325
  })
8406
8326
  ).unwrap();
@@ -11006,7 +10926,7 @@ var messageSlice = createSliceWithThunks({
11006
10926
  runtimeOptions: args.runtimeOptions
11007
10927
  });
11008
10928
  if (agentKeyToUse) {
11009
- const { streamAgentChatTurn } = await import("./agentSlice-SLV57QGU.js");
10929
+ const { streamAgentChatTurn } = await import("./agentSlice-IP4DZNNV.js");
11010
10930
  await dispatch(
11011
10931
  streamAgentChatTurn({
11012
10932
  agentKey: agentKeyToUse,
@@ -13823,7 +13743,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13823
13743
  }
13824
13744
  if (isCurrentDialog) {
13825
13745
  await thunkApi.dispatch(resetMsgs());
13826
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-PVUSMKFW.js");
13746
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-SI45KJOH.js");
13827
13747
  dispatch(clearPendingAttachments2());
13828
13748
  }
13829
13749
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13831,15 +13751,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13831
13751
 
13832
13752
  // packages/chat/dialog/dialogSlice.ts
13833
13753
  var runCreateDialogAction = async (args, thunkApi) => {
13834
- const { createDialogAction } = await import("./createDialogAction-QAIKSCG4.js");
13754
+ const { createDialogAction } = await import("./createDialogAction-6ABMSEW2.js");
13835
13755
  return createDialogAction(args, thunkApi);
13836
13756
  };
13837
13757
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13838
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-4BUS65DZ.js");
13758
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-6ADGPGY6.js");
13839
13759
  return createAgentAutomationAction(args, thunkApi);
13840
13760
  };
13841
13761
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13842
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-CIANVPZC.js");
13762
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-YJHDKHFX.js");
13843
13763
  return updateDialogTitleAction(args, thunkApi);
13844
13764
  };
13845
13765
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -13863,7 +13783,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13863
13783
  return setDialogExtraReferencesAction(args, thunkApi);
13864
13784
  };
13865
13785
  var runHandleSendMessageAction = async (args, thunkApi) => {
13866
- const { handleSendMessageAction } = await import("./handleSendMessageAction-G2TLYGC4.js");
13786
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-BSMU7SVS.js");
13867
13787
  return handleSendMessageAction(args, thunkApi);
13868
13788
  };
13869
13789
  function clearDialogState() {
@@ -13876,7 +13796,7 @@ var createPageAndAddReference = createAsyncThunk(
13876
13796
  async (payload, { dispatch, getState, rejectWithValue }) => {
13877
13797
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13878
13798
  try {
13879
- const { createDocState } = await import("./docStore-CSEBEMKP.js");
13799
+ const { createDocState } = await import("./docStore-L43MDEK4.js");
13880
13800
  const pageKey = await createDocState(
13881
13801
  { slateData, title },
13882
13802
  { dispatch, getState }
@@ -14051,7 +13971,6 @@ export {
14051
13971
  isAssistantToolStub,
14052
13972
  fetchAndCacheMessages,
14053
13973
  toast,
14054
- extractReferenceKeysFromMessage,
14055
13974
  buildDatabaseFileContentUrl,
14056
13975
  normalizeAppRouteId,
14057
13976
  PERSONALIZATION_DIALOG_CATEGORY,
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-P5QACQDK.js";
7
7
  import {
8
8
  clearCliLocalRuntimePreparedAgentCache
9
- } from "./chunk-PKZKOVA5.js";
9
+ } from "./chunk-64PFYIAY.js";
10
10
  import {
11
11
  readCredentialAvailability
12
12
  } from "./chunk-6MXDOUMH.js";
@@ -20,7 +20,7 @@ import {
20
20
  toolRunUpdated,
21
21
  uiCardFallback,
22
22
  waitForAbortableDelay
23
- } from "./chunk-ROCUB2H2.js";
23
+ } from "./chunk-EHFS4XZO.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-626KHJNX.js";
67
+ } from "./chunk-KMM2X7LP.js";
68
68
  import {
69
69
  addMemberSpace,
70
70
  fetchAuthoritativeRemoteSpace,
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-ILU2NPWY.js";
80
80
  import {
81
81
  createDialogAction
82
- } from "./chunk-AG7MCDLR.js";
82
+ } from "./chunk-XCA6HQGS.js";
83
83
  import {
84
84
  setDialogExtraReferencesAction
85
85
  } from "./chunk-F32Z66T4.js";
@@ -102,7 +102,7 @@ import {
102
102
  updateContentCategory,
103
103
  updateContentTitle,
104
104
  writeStoredCollapsedCategories
105
- } from "./chunk-AJ3G7X2K.js";
105
+ } from "./chunk-OFVFQYIE.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-U5ICMAFV.js";
118
+ } from "./chunk-PFBIXTFB.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-DFDXM2Y4.js";
129
+ } from "./chunk-LC23WBCU.js";
130
130
  import {
131
131
  getCurrentSpaceId,
132
132
  getCurrentSpaceIdRaw,
@@ -3881,7 +3881,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3881
3881
  const deletedDialogIds = [];
3882
3882
  const deletedDialogKeys = [];
3883
3883
  const failures = [];
3884
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-PVUSMKFW.js");
3884
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-SI45KJOH.js");
3885
3885
  for (const target of targets) {
3886
3886
  try {
3887
3887
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4352,8 +4352,7 @@ var getCurrentPathForLog = () => typeof window !== "undefined" && typeof window.
4352
4352
  var addSpaceAction = async (input, thunkAPI) => {
4353
4353
  const {
4354
4354
  name,
4355
- description = "",
4356
- boundFolder
4355
+ description = ""
4357
4356
  } = input;
4358
4357
  const visibility = input.visibility ?? "private" /* PRIVATE */;
4359
4358
  const { dispatch, getState, extra } = thunkAPI;
@@ -4367,7 +4366,6 @@ var addSpaceAction = async (input, thunkAPI) => {
4367
4366
  id: spaceId,
4368
4367
  name,
4369
4368
  description,
4370
- boundFolder,
4371
4369
  ownerId: userId,
4372
4370
  userId,
4373
4371
  visibility,
@@ -4392,7 +4390,6 @@ var addSpaceAction = async (input, thunkAPI) => {
4392
4390
  userId,
4393
4391
  name,
4394
4392
  visibility,
4395
- boundFolder,
4396
4393
  memberSpaceCount: spaces.length,
4397
4394
  hasSpaceForActor,
4398
4395
  currentPath: getCurrentPathForLog()
@@ -5040,9 +5037,19 @@ var fetchSpaceAction = async (input, thunkAPI) => {
5040
5037
  return { spaceId, spaceData };
5041
5038
  };
5042
5039
 
5040
+ // packages/create/space/spaceSaveNormalization.ts
5041
+ function normalizeSpaceSavePatch(previous, changes) {
5042
+ const { boundFolder: _ignored, ...safeChanges } = changes;
5043
+ const hasLegacyCleanup = Object.prototype.hasOwnProperty.call(previous, "boundFolder") && (previous.boundFolder ?? null) !== null;
5044
+ return {
5045
+ changes: hasLegacyCleanup ? { ...safeChanges, boundFolder: null } : safeChanges,
5046
+ hasLegacyCleanup
5047
+ };
5048
+ }
5049
+
5043
5050
  // packages/create/space/updateSpaceAction.ts
5044
5051
  var updateSpaceAction = async (input, thunkAPI) => {
5045
- const { spaceId, name, description, visibility, boundFolder } = input;
5052
+ const { spaceId, name, description, visibility } = input;
5046
5053
  const { dispatch, getState } = thunkAPI;
5047
5054
  const state2 = getState();
5048
5055
  const userId = selectIdentityUserId(state2);
@@ -5067,34 +5074,32 @@ var updateSpaceAction = async (input, thunkAPI) => {
5067
5074
  throw new Error("\u5F53\u524D\u7528\u6237\u4E0D\u662F\u7A7A\u95F4\u6210\u5458\uFF0C\u65E0\u6CD5\u66F4\u65B0\u7A7A\u95F4\u8BBE\u7F6E\u3002");
5068
5075
  }
5069
5076
  const changes = {};
5070
- let hasChanges = false;
5071
5077
  if (name !== void 0 && name !== spaceData.name) {
5072
5078
  changes.name = name.trim();
5073
- hasChanges = true;
5074
5079
  }
5075
5080
  if (description !== void 0 && description !== spaceData.description) {
5076
5081
  changes.description = description;
5077
- hasChanges = true;
5078
5082
  }
5079
5083
  if (visibility !== void 0 && visibility !== spaceData.visibility) {
5080
5084
  changes.visibility = visibility;
5081
- hasChanges = true;
5082
- }
5083
- if (boundFolder !== void 0 && (boundFolder || void 0) !== (spaceData.boundFolder || void 0)) {
5084
- changes.boundFolder = boundFolder || void 0;
5085
- hasChanges = true;
5086
5085
  }
5086
+ const { changes: normalizedChanges, hasLegacyCleanup } = normalizeSpaceSavePatch(
5087
+ spaceData,
5088
+ changes
5089
+ );
5090
+ const hasChanges = Object.keys(changes).length > 0 || hasLegacyCleanup;
5087
5091
  if (!hasChanges) {
5088
5092
  return { updatedSpace: spaceData, spaceId };
5089
5093
  }
5090
5094
  const now = Date.now();
5091
5095
  changes.updatedAt = now;
5096
+ const patchChanges = { ...normalizedChanges, updatedAt: now };
5092
5097
  let updatedSpaceData;
5093
5098
  try {
5094
5099
  updatedSpaceData = await dispatch(
5095
5100
  patch({
5096
5101
  dbKey: spaceKey,
5097
- changes
5102
+ changes: patchChanges
5098
5103
  })
5099
5104
  ).unwrap();
5100
5105
  } catch (patchError) {
@@ -18302,7 +18307,7 @@ async function updateDocFunc(args, thunkApi) {
18302
18307
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18303
18308
  };
18304
18309
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18305
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-CSEBEMKP.js");
18310
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-L43MDEK4.js");
18306
18311
  if (getDocState().pageKey === id) {
18307
18312
  applyExternalDocUpdate({
18308
18313
  slateData: finalSlateData,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NBTY7YJF.js";
6
6
  import {
7
7
  resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-3T4ZG6AC.js";
8
+ } from "./chunk-PPU323UE.js";
9
9
  import {
10
10
  HIGH_RISK_MUTATION_TOOL_NAMES
11
11
  } from "./chunk-QLQ573SU.js";
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-ROCUB2H2.js";
5
+ } from "./chunk-EHFS4XZO.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-U5ICMAFV.js";
24
+ } from "./chunk-PFBIXTFB.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
@@ -7,7 +7,7 @@ import {
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-RN2GPWN6.js";
10
+ } from "./chunk-T5BHHWA5.js";
11
11
  import {
12
12
  UI_CARD_ENVELOPE_MAX_BYTES,
13
13
  getAllToolRuns,
@@ -20,7 +20,7 @@ import {
20
20
  selectSpaceContextLevel,
21
21
  selectUserTonePreset,
22
22
  uiCardFallback
23
- } from "./chunk-ROCUB2H2.js";
23
+ } from "./chunk-EHFS4XZO.js";
24
24
  import {
25
25
  resolveToolBaseUrl
26
26
  } from "./chunk-CBHGZRCE.js";
@@ -32,16 +32,15 @@ import {
32
32
  } from "./chunk-RSHPU4PD.js";
33
33
  import {
34
34
  getDocState
35
- } from "./chunk-626KHJNX.js";
35
+ } from "./chunk-KMM2X7LP.js";
36
36
  import {
37
37
  getTableState
38
- } from "./chunk-AJ3G7X2K.js";
38
+ } from "./chunk-OFVFQYIE.js";
39
39
  import {
40
40
  PERSONALIZATION_DIALOG_CATEGORY,
41
41
  buildPersonalizationDialogPolicyContext,
42
- extractReferenceKeysFromMessage,
43
42
  selectAllMsgs
44
- } from "./chunk-U5ICMAFV.js";
43
+ } from "./chunk-PFBIXTFB.js";
45
44
  import {
46
45
  getCurrentSpaceIdRaw,
47
46
  getViewMode
@@ -75,10 +74,13 @@ import {
75
74
  attachmentKind,
76
75
  normalizeAttachmentPart
77
76
  } from "./chunk-WJZOQR2J.js";
77
+ import {
78
+ extractReferenceKeysFromMessage
79
+ } from "./chunk-DTODXBHK.js";
78
80
  import {
79
81
  getModelContextWindow,
80
82
  planContextUsage
81
- } from "./chunk-BPMPOFWP.js";
83
+ } from "./chunk-4PXHOOFA.js";
82
84
  import {
83
85
  asRecordOrEmpty
84
86
  } from "./chunk-KX6YBIHG.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-AJ3G7X2K.js";
3
+ } from "./chunk-OFVFQYIE.js";
4
4
  import {
5
5
  format,
6
6
  prepareAndPersistMessage,
7
7
  uiAskChoiceFunc,
8
8
  uiAskChoiceFunctionSchema
9
- } from "./chunk-U5ICMAFV.js";
9
+ } from "./chunk-PFBIXTFB.js";
10
10
  import {
11
11
  formatISO
12
12
  } from "./chunk-ZRAU6T47.js";