nolo-cli 0.16.0-alpha.13 → 0.16.0-alpha.15

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 (66) hide show
  1. package/{_executeModel-Y43RS7DI.js → _executeModel-UU2JO5OB.js} +15 -15
  2. package/{agentDeleteCommand-PBIUC4FT.js → agentDeleteCommand-L6JRXPYK.js} +10 -10
  3. package/{agentEmailCommands-AJFG5HBG.js → agentEmailCommands-FE3GY3T5.js} +17 -17
  4. package/{agentListCommands-N64PHBXM.js → agentListCommands-ZWSAIC4W.js} +11 -11
  5. package/{agentMachineCommands-2ACKQSTE.js → agentMachineCommands-VWQ2GZBY.js} +10 -10
  6. package/{agentRecordCommands-RQTFDKKJ.js → agentRecordCommands-PYVZMRZM.js} +17 -17
  7. package/{agentRunCommand-FAHV33ML.js → agentRunCommand-3ADJ2J5U.js} +18 -18
  8. package/{agentRuntimeLocal-T6YECTNF.js → agentRuntimeLocal-LXTR6SAU.js} +7 -7
  9. package/{agentSlice-XEQOAOC6.js → agentSlice-TI6ECUGN.js} +1 -1
  10. package/{appDeleteCommands-D6B6Z4ZQ.js → appDeleteCommands-QIS37SXE.js} +11 -11
  11. package/{appDeployCommands-YMO5FK4T.js → appDeployCommands-WBHB7T5B.js} +11 -11
  12. package/{appDeployStatusCommands-EO5DWWPQ.js → appDeployStatusCommands-A3OUV6GO.js} +11 -11
  13. package/{appGetCommands-6SMZ3URQ.js → appGetCommands-LCVYIH63.js} +11 -11
  14. package/{appListCommands-RZXSWR2G.js → appListCommands-PC7QOBUO.js} +11 -11
  15. package/{chunk-KEPSRWXW.js → chunk-2OK7P5XF.js} +54 -13
  16. package/{chunk-MSA4JAOZ.js → chunk-2ZLEOGS5.js} +1 -1
  17. package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
  18. package/{chunk-VHXXRWNL.js → chunk-5QJFYG2N.js} +15 -5
  19. package/{chunk-F3UOACU4.js → chunk-64IEIMN4.js} +1 -1
  20. package/{chunk-QSJNZQFD.js → chunk-6IGLIDDE.js} +20 -8
  21. package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
  22. package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
  23. package/{chunk-N3IKEYV7.js → chunk-BOBNE3XT.js} +2 -2
  24. package/{chunk-COIZN2AL.js → chunk-ECGTEOC2.js} +3 -3
  25. package/{chunk-6KBBMW4D.js → chunk-FTNTMGXT.js} +1 -1
  26. package/{chunk-SPHXTAG6.js → chunk-GFPESFS6.js} +2 -2
  27. package/{chunk-EPCM5E6C.js → chunk-GM37ZF7R.js} +2 -2
  28. package/{chunk-A7O4KKLZ.js → chunk-HGDFFA6T.js} +2 -2
  29. package/{chunk-C4MMO7W4.js → chunk-NZBK3ZET.js} +1 -1
  30. package/{chunk-JTMNCCWF.js → chunk-OSIJVBXP.js} +2 -2
  31. package/{chunk-OVBVEXZ7.js → chunk-PFW2ZEON.js} +53 -1
  32. package/{chunk-MDNZEE6B.js → chunk-Q6B6XJBG.js} +15 -6
  33. package/{chunk-GPELDE6I.js → chunk-SOW2GCA5.js} +1 -1
  34. package/{chunk-BE3IKV5X.js → chunk-TUWPYUVR.js} +7 -7
  35. package/{chunk-A3S7ITGN.js → chunk-U3DCTSPN.js} +18 -13
  36. package/{chunk-TSGUTKW2.js → chunk-URVWRKFU.js} +91 -17
  37. package/{chunk-PFAN32FJ.js → chunk-UUDRNDC7.js} +1 -1
  38. package/{chunk-IQJOXIYF.js → chunk-W63ZTRQU.js} +3 -3
  39. package/{chunk-6IZTYSJK.js → chunk-W6OKITU6.js} +41 -12
  40. package/{chunk-PU4LXVAC.js → chunk-XG7CSGP3.js} +1 -1
  41. package/{chunk-XRSPI6CP.js → chunk-YZXEEGKV.js} +1 -1
  42. package/{chunk-RIF3XLXK.js → chunk-ZDDHKIWB.js} +8 -4
  43. package/{createAgentAutomationAction-G5ZEEBMB.js → createAgentAutomationAction-N4ZB7VX2.js} +3 -3
  44. package/{createDialogAction-3EJL6XK6.js → createDialogAction-KF6HXCCZ.js} +4 -4
  45. package/{createPageAction-FIUQXAI4.js → createPageAction-FXWSJONZ.js} +3 -3
  46. package/{dialogCommands-DFY5HJ6M.js → dialogCommands-ULS6HV5V.js} +11 -11
  47. package/{dialogSlice-H24LGUPG.js → dialogSlice-K32QLYS7.js} +3 -3
  48. package/{docCreateCommands-5L76YTI2.js → docCreateCommands-RZTRTRU4.js} +10 -10
  49. package/{docDeleteCommands-3GASP3VR.js → docDeleteCommands-FU36A663.js} +11 -11
  50. package/{docReadCommands-ALA77AZM.js → docReadCommands-IX4JXD4X.js} +10 -10
  51. package/{docStore-EFEUV2FP.js → docStore-L6HBNJ3R.js} +4 -4
  52. package/{docUpdateCommands-6AZGXE5M.js → docUpdateCommands-W4OCR55Z.js} +10 -10
  53. package/{handleSendMessageAction-PMKHJZGP.js → handleSendMessageAction-MFKKZXV7.js} +3 -3
  54. package/index.js +40 -40
  55. package/{machineCommands-U3N22344.js → machineCommands-4MFLZERH.js} +16 -16
  56. package/{machineWsRunDispatch-BGYPVQPM.js → machineWsRunDispatch-AAHRNKIR.js} +16 -16
  57. package/package.json +1 -1
  58. package/{readlineWorkspace-HWYYQ2KL.js → readlineWorkspace-7OPITHTN.js} +28 -21
  59. package/{runAgentClientLoop-3NESZLYZ.js → runAgentClientLoop-HRWV7KE2.js} +11 -11
  60. package/{setPrimaryDialogAgentAction-IIVDCY5C.js → setPrimaryDialogAgentAction-57GRIGX5.js} +16 -8
  61. package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
  62. package/{spaceCommands-AB2D7A2R.js → spaceCommands-GMMQTMHK.js} +10 -10
  63. package/{spaceSlice-YBORJR2H.js → spaceSlice-V2P5TTQU.js} +3 -3
  64. package/{streamAgentChatTurn-XAPKGQ6M.js → streamAgentChatTurn-ZANOYOUR.js} +62 -42
  65. package/{tools-RXIDHJ2C.js → tools-YHZP6NXU.js} +7 -7
  66. package/{updateDialogTitleAction-S7AG3P44.js → updateDialogTitleAction-IKTPGPPE.js} +3 -3
@@ -48,7 +48,7 @@ var setPrimaryDialogAgentAction = async (agentId, thunkApi) => {
48
48
  if (!currentDialogKey) {
49
49
  throw new Error("No current dialog selected");
50
50
  }
51
- if (!agentId || typeof agentId !== "string") {
51
+ if (typeof agentId !== "string") {
52
52
  throw new Error("No valid agent ID provided");
53
53
  }
54
54
  const dialogConfig = selectById(
@@ -62,16 +62,24 @@ var setPrimaryDialogAgentAction = async (agentId, thunkApi) => {
62
62
  if (currentPrimaryAgentId && currentPrimaryAgentId !== agentId) {
63
63
  await cleanupCliSessionForDialog({ dispatch, getState }, dialogConfig);
64
64
  }
65
+ const changes = agentId ? {
66
+ agentMode: "fixed",
67
+ primaryAgentKey: agentId,
68
+ cybots: replacePrimaryDialogAgentId(
69
+ dialogConfig.cybots || [],
70
+ agentId
71
+ ),
72
+ updatedAt: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date())
73
+ } : {
74
+ agentMode: "auto",
75
+ primaryAgentKey: void 0,
76
+ cybots: [],
77
+ updatedAt: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date())
78
+ };
65
79
  return await dispatch(
66
80
  patch({
67
81
  dbKey: currentDialogKey,
68
- changes: {
69
- cybots: replacePrimaryDialogAgentId(
70
- dialogConfig.cybots || [],
71
- agentId
72
- ),
73
- updatedAt: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date())
74
- }
82
+ changes
75
83
  })
76
84
  ).unwrap();
77
85
  };
@@ -3,10 +3,10 @@ import {
3
3
  discoverSkills,
4
4
  parseSkillFrontmatter,
5
5
  resolveSkillByName
6
- } from "./chunk-AS3ZQ3O2.js";
6
+ } from "./chunk-7OBMZCRD.js";
7
7
  import "./chunk-WZSRQNQG.js";
8
- import "./chunk-QLUFR47U.js";
9
- import "./chunk-KKY4B2Q2.js";
8
+ import "./chunk-AL2V7U3E.js";
9
+ import "./chunk-4PWB7JRR.js";
10
10
  import "./chunk-4VNS5WPM.js";
11
11
  export {
12
12
  buildSkillDiscoveryContextBlock,
@@ -1,34 +1,34 @@
1
1
  import {
2
2
  readLiveDbRecordAfterTombstoneMerge
3
- } from "./chunk-MSA4JAOZ.js";
3
+ } from "./chunk-2ZLEOGS5.js";
4
4
  import {
5
5
  readDbRecord,
6
6
  writeAgentRecord
7
- } from "./chunk-C4MMO7W4.js";
8
- import "./chunk-PU4LXVAC.js";
7
+ } from "./chunk-NZBK3ZET.js";
8
+ import "./chunk-XG7CSGP3.js";
9
9
  import "./chunk-VHBWHNVT.js";
10
10
  import "./chunk-KQHGZWSV.js";
11
11
  import {
12
12
  authRoutes
13
13
  } from "./chunk-MRC4Q34M.js";
14
- import "./chunk-VHXXRWNL.js";
14
+ import "./chunk-5QJFYG2N.js";
15
15
  import "./chunk-AAODAAUQ.js";
16
16
  import "./chunk-ZNFJWEN4.js";
17
17
  import "./chunk-OIQPORYI.js";
18
- import "./chunk-RIF3XLXK.js";
18
+ import "./chunk-ZDDHKIWB.js";
19
19
  import "./chunk-LSFAWXKC.js";
20
- import "./chunk-GPELDE6I.js";
20
+ import "./chunk-SOW2GCA5.js";
21
21
  import "./chunk-KFEVY3ST.js";
22
22
  import "./chunk-MUCU6ATG.js";
23
- import "./chunk-JTMNCCWF.js";
24
- import "./chunk-OVBVEXZ7.js";
23
+ import "./chunk-OSIJVBXP.js";
24
+ import "./chunk-PFW2ZEON.js";
25
25
  import "./chunk-5MMAK75Q.js";
26
26
  import "./chunk-HQPG2PIV.js";
27
27
  import "./chunk-5CS33IBL.js";
28
28
  import "./chunk-JZPBVBIY.js";
29
29
  import "./chunk-ZHXJ6M7T.js";
30
- import "./chunk-QLUFR47U.js";
31
- import "./chunk-KKY4B2Q2.js";
30
+ import "./chunk-AL2V7U3E.js";
31
+ import "./chunk-4PWB7JRR.js";
32
32
  import "./chunk-DWLEOOGR.js";
33
33
  import "./chunk-HNMXYYJR.js";
34
34
  import "./chunk-IDZTNRP2.js";
@@ -52,17 +52,17 @@ import {
52
52
  updateContentTitle,
53
53
  updateSpace,
54
54
  uploadAndAddFileToSpace
55
- } from "./chunk-KEPSRWXW.js";
55
+ } from "./chunk-2OK7P5XF.js";
56
56
  import "./chunk-XOIF2TNF.js";
57
57
  import "./chunk-MRC4Q34M.js";
58
58
  import "./chunk-MTU75CZ2.js";
59
59
  import "./chunk-CWMSB67P.js";
60
- import "./chunk-COIZN2AL.js";
60
+ import "./chunk-ECGTEOC2.js";
61
61
  import "./chunk-RPDGJO4D.js";
62
62
  import "./chunk-SOTZ6RDN.js";
63
63
  import "./chunk-Z4NR32XR.js";
64
64
  import "./chunk-M76ECQRD.js";
65
- import "./chunk-OVBVEXZ7.js";
65
+ import "./chunk-PFW2ZEON.js";
66
66
  import "./chunk-5MMAK75Q.js";
67
67
  import "./chunk-HQPG2PIV.js";
68
68
  import "./chunk-5CS33IBL.js";
@@ -17,11 +17,11 @@ import {
17
17
  sanitizeOutboundResponsesInput,
18
18
  sendOpenAICompletionsRequest,
19
19
  updateTotalUsage
20
- } from "./chunk-BE3IKV5X.js";
20
+ } from "./chunk-TUWPYUVR.js";
21
21
  import "./chunk-JEXVIMYZ.js";
22
22
  import {
23
23
  prepareTools
24
- } from "./chunk-EPCM5E6C.js";
24
+ } from "./chunk-GM37ZF7R.js";
25
25
  import {
26
26
  fetchReferenceContents,
27
27
  generateRequestBody,
@@ -35,7 +35,7 @@ import {
35
35
  resolveToolsFromKeys,
36
36
  selectResponsesConversationState,
37
37
  updateResponsesConversationState
38
- } from "./chunk-QSJNZQFD.js";
38
+ } from "./chunk-6IGLIDDE.js";
39
39
  import "./chunk-L6NVTGI7.js";
40
40
  import {
41
41
  TOOL_PACKS,
@@ -50,13 +50,13 @@ import {
50
50
  resolveEffectiveEnabledPacks,
51
51
  shouldBlockForGptPro,
52
52
  waitForAbortableDelay
53
- } from "./chunk-TSGUTKW2.js";
53
+ } from "./chunk-URVWRKFU.js";
54
54
  import "./chunk-RQSOAMPJ.js";
55
55
  import "./chunk-XJITGCTM.js";
56
56
  import "./chunk-KQHGZWSV.js";
57
57
  import {
58
58
  getDocState
59
- } from "./chunk-SPHXTAG6.js";
59
+ } from "./chunk-GFPESFS6.js";
60
60
  import {
61
61
  getFinalPrice,
62
62
  getModelPricing,
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-VP4WJWKW.js";
75
75
  import "./chunk-63W5N6P3.js";
76
76
  import "./chunk-VF4K2QE6.js";
77
- import "./chunk-MDNZEE6B.js";
77
+ import "./chunk-Q6B6XJBG.js";
78
78
  import "./chunk-VC6OZXO5.js";
79
79
  import {
80
80
  PERSONALIZATION_DIALOG_CATEGORY,
@@ -97,12 +97,12 @@ import {
97
97
  selectTableRows,
98
98
  selectViewMode,
99
99
  updateTokens
100
- } from "./chunk-KEPSRWXW.js";
100
+ } from "./chunk-2OK7P5XF.js";
101
101
  import "./chunk-XOIF2TNF.js";
102
102
  import "./chunk-MRC4Q34M.js";
103
103
  import "./chunk-MTU75CZ2.js";
104
104
  import "./chunk-CWMSB67P.js";
105
- import "./chunk-COIZN2AL.js";
105
+ import "./chunk-ECGTEOC2.js";
106
106
  import {
107
107
  createCliChatTurnStream,
108
108
  getCliChatSession,
@@ -120,9 +120,9 @@ import {
120
120
  import {
121
121
  projectToolMessageContent,
122
122
  resolveAgentImageInputSupport
123
- } from "./chunk-RIF3XLXK.js";
123
+ } from "./chunk-ZDDHKIWB.js";
124
124
  import "./chunk-LSFAWXKC.js";
125
- import "./chunk-GPELDE6I.js";
125
+ import "./chunk-SOW2GCA5.js";
126
126
  import {
127
127
  extractImagePartsFromResponseOutput,
128
128
  extractTextFromResponseOutput,
@@ -133,13 +133,13 @@ import {
133
133
  canonicalizeToolNames,
134
134
  prioritizeToolNames,
135
135
  resolveRuntimeToolSurfaceForAgent
136
- } from "./chunk-JTMNCCWF.js";
136
+ } from "./chunk-OSIJVBXP.js";
137
137
  import {
138
138
  estimateTokenCount,
139
139
  getModelContextWindow,
140
140
  getModelInfo,
141
141
  planContextUsage
142
- } from "./chunk-OVBVEXZ7.js";
142
+ } from "./chunk-PFW2ZEON.js";
143
143
  import "./chunk-5MMAK75Q.js";
144
144
  import {
145
145
  getApiEndpoint,
@@ -152,8 +152,8 @@ import "./chunk-ZHXJ6M7T.js";
152
152
  import {
153
153
  buildLinkedSpacesSection,
154
154
  buildSpaceContextLayer
155
- } from "./chunk-QLUFR47U.js";
156
- import "./chunk-KKY4B2Q2.js";
155
+ } from "./chunk-AL2V7U3E.js";
156
+ import "./chunk-4PWB7JRR.js";
157
157
  import {
158
158
  resolveToolBaseUrl
159
159
  } from "./chunk-5MIDPSSK.js";
@@ -421,10 +421,10 @@ var difference = (arrA, arrB) => {
421
421
  const exclude = new Set(arrB);
422
422
  return arrA.filter((item) => !exclude.has(item));
423
423
  };
424
- var getFullChatContextKeys = async (state, dispatch, agentConfig, userInput, dialogConfig) => {
424
+ var getFullChatContextKeys = async (state, dispatch, agentConfig, userInput, dialogConfig2) => {
425
425
  const msgs = selectAllMsgs(
426
426
  state,
427
- dialogConfig?.dbKey ? extractCustomId(dialogConfig.dbKey) : dialogConfig?.id
427
+ dialogConfig2?.dbKey ? extractCustomId(dialogConfig2.dbKey) : dialogConfig2?.id
428
428
  );
429
429
  const botInstructionKeys = /* @__PURE__ */ new Set();
430
430
  const botKnowledgeKeys = /* @__PURE__ */ new Set();
@@ -446,7 +446,7 @@ var getFullChatContextKeys = async (state, dispatch, agentConfig, userInput, dia
446
446
  }
447
447
  }
448
448
  const historyKeys = /* @__PURE__ */ new Set();
449
- const savedKeys = dialogConfig?.referenceKeys;
449
+ const savedKeys = dialogConfig2?.referenceKeys;
450
450
  if (Array.isArray(savedKeys)) {
451
451
  savedKeys.forEach((k) => historyKeys.add(k));
452
452
  }
@@ -457,7 +457,7 @@ var getFullChatContextKeys = async (state, dispatch, agentConfig, userInput, dia
457
457
  }
458
458
  };
459
459
  if (msgs && msgs.length > 0) {
460
- const summarizedBeforeId = dialogConfig?.summarizedBeforeId;
460
+ const summarizedBeforeId = dialogConfig2?.summarizedBeforeId;
461
461
  if (!summarizedBeforeId) {
462
462
  for (const msg of msgs) scanContentParts(msg);
463
463
  } else {
@@ -905,7 +905,23 @@ var sendOpenAIResponseRequest = async ({
905
905
  currentServer: selectRuntimeCurrentServer(getState()),
906
906
  signal,
907
907
  token: token ?? "",
908
- dialogId
908
+ dialogId,
909
+ onRetry: (info) => {
910
+ dispatch(
911
+ messageStreaming({
912
+ id: messageId,
913
+ dialogId,
914
+ dbKey: msgKey,
915
+ content: "",
916
+ role: "assistant",
917
+ agentKey: agentConfig.dbKey,
918
+ cybotKey: agentConfig.dbKey,
919
+ ...activeMessageMetadata ?? {},
920
+ isStreaming: true,
921
+ retryProgress: info
922
+ })
923
+ );
924
+ }
909
925
  });
910
926
  logQuickChatPerfStage(quickChatPerfStartedAt, "openai-response-fetch-response", {
911
927
  ok: response.ok,
@@ -1892,7 +1908,7 @@ var validateAccessAndBalance = (agentConfig, state) => {
1892
1908
  }
1893
1909
  return null;
1894
1910
  };
1895
- var fetchMemoryOverlayContext = async (state, agentConfig, userInput, dialogConfig) => {
1911
+ var fetchMemoryOverlayContext = async (state, agentConfig, userInput, dialogConfig2, memorySubjectId) => {
1896
1912
  const token = typeof state?.auth?.currentToken === "string" ? state.auth.currentToken : null;
1897
1913
  const currentServer = typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : null;
1898
1914
  const agentKey = asOptionalTrimmedString(agentConfig.dbKey) ?? "";
@@ -1900,7 +1916,7 @@ var fetchMemoryOverlayContext = async (state, agentConfig, userInput, dialogConf
1900
1916
  const baseUrl = resolveToolBaseUrl(currentServer);
1901
1917
  if (!baseUrl) return null;
1902
1918
  const inputText = typeof userInput === "string" ? userInput : JSON.stringify(userInput ?? "");
1903
- const spaceId = asOptionalTrimmedString(dialogConfig?.spaceId) ?? (state?.space?.viewMode === "all" ? void 0 : asOptionalTrimmedString(state?.space?.currentSpaceId));
1919
+ const spaceId = asOptionalTrimmedString(dialogConfig2?.spaceId) ?? (state?.space?.viewMode === "all" ? void 0 : asOptionalTrimmedString(state?.space?.currentSpaceId));
1904
1920
  try {
1905
1921
  const response = await fetch(`${baseUrl}/api/memory/query`, {
1906
1922
  method: "POST",
@@ -1910,6 +1926,7 @@ var fetchMemoryOverlayContext = async (state, agentConfig, userInput, dialogConf
1910
1926
  },
1911
1927
  body: JSON.stringify({
1912
1928
  agentKey,
1929
+ ...asOptionalTrimmedString(memorySubjectId) ? { memorySubjectId: asOptionalTrimmedString(memorySubjectId) } : {},
1913
1930
  userInput: inputText,
1914
1931
  ...spaceId ? { spaceId } : {}
1915
1932
  })
@@ -1921,7 +1938,7 @@ var fetchMemoryOverlayContext = async (state, agentConfig, userInput, dialogConf
1921
1938
  return null;
1922
1939
  }
1923
1940
  };
1924
- var buildStaticContexts = async (state, dispatch, agentConfig, dialogConfig, referenceContentCache) => {
1941
+ var buildStaticContexts = async (state, dispatch, agentConfig, dialogConfig2, referenceContentCache) => {
1925
1942
  const keySets = await getFullChatContextKeys(
1926
1943
  state,
1927
1944
  dispatch,
@@ -1955,7 +1972,7 @@ var buildStaticContexts = async (state, dispatch, agentConfig, dialogConfig, ref
1955
1972
  if (spaceContextLevel > 1) {
1956
1973
  const spaceLayer = await buildSpaceContextLayer({
1957
1974
  source: turnContextSource,
1958
- spaceId: dialogConfig?.spaceId,
1975
+ spaceId: dialogConfig2?.spaceId,
1959
1976
  recentContentLimit: recentLimit
1960
1977
  });
1961
1978
  spaceContext = spaceLayer ? spaceLayer.content.trim() : null;
@@ -1972,7 +1989,7 @@ var buildStaticContexts = async (state, dispatch, agentConfig, dialogConfig, ref
1972
1989
  ${linkedSection}`;
1973
1990
  }
1974
1991
  }
1975
- const dialogPolicyContext = dialogConfig?.category === PERSONALIZATION_DIALOG_CATEGORY ? buildPersonalizationDialogPolicyContext() : null;
1992
+ const dialogPolicyContext = dialogConfig2?.category === PERSONALIZATION_DIALOG_CATEGORY ? buildPersonalizationDialogPolicyContext() : null;
1976
1993
  return {
1977
1994
  botInstructionsContext: joinMapValues(botInstructionsMap),
1978
1995
  botKnowledgeContext: joinMapValues(botKnowledgeMap),
@@ -1994,11 +2011,11 @@ ${linkedSection}`;
1994
2011
  };
1995
2012
  var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runtimeOptions, referenceContentCache, dialogKey) => {
1996
2013
  let dialogSummary = null;
1997
- let dialogConfig;
2014
+ let dialogConfig2;
1998
2015
  if (dialogKey) {
1999
- dialogConfig = selectById(state, dialogKey);
2000
- if (dialogConfig?.summary) {
2001
- dialogSummary = dialogConfig.summary;
2016
+ dialogConfig2 = selectById(state, dialogKey);
2017
+ if (dialogConfig2?.summary) {
2018
+ dialogSummary = dialogConfig2.summary;
2002
2019
  }
2003
2020
  }
2004
2021
  const keySets = await getFullChatContextKeys(
@@ -2006,7 +2023,7 @@ var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runti
2006
2023
  dispatch,
2007
2024
  agentConfig,
2008
2025
  userInput,
2009
- dialogConfig
2026
+ dialogConfig2
2010
2027
  );
2011
2028
  const finalKeys = deduplicateContextKeys(keySets);
2012
2029
  const fetchReferences = (keys) => fetchReferenceContents(keys, dispatch, {
@@ -2023,7 +2040,7 @@ var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runti
2023
2040
  pendingFiles,
2024
2041
  currentInputMap
2025
2042
  );
2026
- const dialogId = dialogConfig?.id ?? null;
2043
+ const dialogId = dialogConfig2?.id ?? null;
2027
2044
  const currentDialogMessages = selectAllMsgs(state, dialogId);
2028
2045
  const currentDialogMessageIds = new Set(currentDialogMessages.map((msg) => msg.id));
2029
2046
  const currentDialogToolRuns = getAllToolRuns().filter(
@@ -2038,7 +2055,8 @@ var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runti
2038
2055
  state,
2039
2056
  agentConfig,
2040
2057
  userInput,
2041
- dialogConfig
2058
+ dialogConfig2,
2059
+ runtimeOptions?.memorySubjectId
2042
2060
  );
2043
2061
  return {
2044
2062
  currentInputContext: formattedCurrentInputContext.trim() || null,
@@ -2047,7 +2065,7 @@ var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runti
2047
2065
  appWorkingMemory,
2048
2066
  memoryOverlay,
2049
2067
  dialogSummary,
2050
- referenceKeys: dialogConfig?.referenceKeys || []
2068
+ referenceKeys: dialogConfig2?.referenceKeys || []
2051
2069
  };
2052
2070
  };
2053
2071
  var mergeContexts = (staticCtx, dynamicCtx) => ({
@@ -2822,22 +2840,22 @@ var isSimpleTextInput = (userInput) => {
2822
2840
  (part) => part && typeof part === "object" && part.type === "text" && typeof part.text === "string"
2823
2841
  );
2824
2842
  };
2825
- var canUseQuickChatEmptyDynamicContexts = (quickChatPerfStartedAt, userInput, runtimeOptions, dialogConfig, agentConfig) => {
2843
+ var canUseQuickChatEmptyDynamicContexts = (quickChatPerfStartedAt, userInput, runtimeOptions, dialogConfig2, agentConfig) => {
2826
2844
  if (!quickChatPerfStartedAt) return false;
2827
2845
  if (runtimeOptions) return false;
2828
2846
  if (agentConfig?.tools?.includes("rememberMemory")) return false;
2829
2847
  if (!isSimpleTextInput(userInput)) return false;
2830
- if (dialogConfig?.referenceKeys?.length) return false;
2848
+ if (dialogConfig2?.referenceKeys?.length) return false;
2831
2849
  return true;
2832
2850
  };
2833
2851
  var QUICK_CHAT_DIRECT_ANSWER_PATTERN = /(只回复|只输出|只回答|直接回复|直接回答|不要解释|无需解释|不用解释|简短回答|一句话)/i;
2834
2852
  var QUICK_CHAT_TOOL_INTENT_PATTERN = /(调用|转交|agent|助手|应用|网页|页面|图表|图片|生成图|画图|删除|清理|空间|商品|链接|https?:\/\/|www\.|@)/i;
2835
- var shouldDisableQuickChatToolsForDirectAnswer = (quickChatPerfStartedAt, userInput, runtimeOptions, dialogConfig) => {
2853
+ var shouldDisableQuickChatToolsForDirectAnswer = (quickChatPerfStartedAt, userInput, runtimeOptions, dialogConfig2) => {
2836
2854
  if (!canUseQuickChatEmptyDynamicContexts(
2837
2855
  quickChatPerfStartedAt,
2838
2856
  userInput,
2839
2857
  runtimeOptions,
2840
- dialogConfig,
2858
+ dialogConfig2,
2841
2859
  void 0
2842
2860
  )) {
2843
2861
  return false;
@@ -3142,11 +3160,11 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
3142
3160
  if (w2) w2.__LOOP_STOP_REASON__ = null;
3143
3161
  const userText = extractAgentRunUserText(userInput);
3144
3162
  const prompt = buildCliPrompt(agentConfig.prompt, userText);
3145
- const dialogConfig = selectDialogConfigByKey(currentState, explicitDialogKey) ?? selectCurrentDialogConfig(currentState);
3146
- if (!dialogConfig) {
3163
+ const dialogConfig2 = selectDialogConfigByKey(currentState, explicitDialogKey) ?? selectCurrentDialogConfig(currentState);
3164
+ if (!dialogConfig2) {
3147
3165
  return rejectWithValue("Dialog config not found");
3148
3166
  }
3149
- const dialogKey2 = explicitDialogKey || dialogConfig.dbKey;
3167
+ const dialogKey2 = explicitDialogKey || dialogConfig2.dbKey;
3150
3168
  if (!dialogKey2) {
3151
3169
  return rejectWithValue("\u5F53\u524D\u5BF9\u8BDD\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u53D1\u9001\u6D88\u606F\u3002");
3152
3170
  }
@@ -3226,7 +3244,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
3226
3244
  entrypoint: "chat-dialog",
3227
3245
  capabilities: ["streaming", "dialog-ui", "machine-bound-cli"]
3228
3246
  },
3229
- ...dialogConfig?.spaceId ? { spaceId: dialogConfig.spaceId } : {}
3247
+ ...dialogConfig2?.spaceId ? { spaceId: dialogConfig2.spaceId } : {}
3230
3248
  }),
3231
3249
  signal: loopController.signal
3232
3250
  });
@@ -3335,7 +3353,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
3335
3353
  usage: totalTurnUsage2 ?? void 0
3336
3354
  };
3337
3355
  }
3338
- let cliSessionId = dialogConfig.cliSessionId ?? null;
3356
+ let cliSessionId = dialogConfig2.cliSessionId ?? null;
3339
3357
  dispatch(messageStreaming({
3340
3358
  id: messageId,
3341
3359
  dialogId: dialogId2,
@@ -4033,7 +4051,9 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
4033
4051
  host: "browser",
4034
4052
  runtime: "react",
4035
4053
  entrypoint: "chat-dialog",
4036
- capabilities: ["streaming", "dialog-ui", "tool-cards"]
4054
+ capabilities: ["streaming", "dialog-ui", "tool-cards"],
4055
+ ...runtimeOptions?.memorySubjectId ? { memorySubjectId: runtimeOptions.memorySubjectId } : {},
4056
+ ...dialogConfig?.agentMode ? { dialogAgentMode: dialogConfig.agentMode } : {}
4037
4057
  },
4038
4058
  ...runtimeOptions?.quickChatReasoningEffort ? {
4039
4059
  runtimeOptions: {
@@ -11,31 +11,31 @@ import {
11
11
  toolQueryFunc,
12
12
  toolQueryFunctionSchema,
13
13
  toolRegistry
14
- } from "./chunk-TSGUTKW2.js";
14
+ } from "./chunk-URVWRKFU.js";
15
15
  import "./chunk-RQSOAMPJ.js";
16
16
  import "./chunk-XJITGCTM.js";
17
17
  import "./chunk-KQHGZWSV.js";
18
- import "./chunk-SPHXTAG6.js";
18
+ import "./chunk-GFPESFS6.js";
19
19
  import "./chunk-6N4KODMN.js";
20
20
  import "./chunk-3LY4F7SV.js";
21
21
  import "./chunk-VP4WJWKW.js";
22
22
  import "./chunk-63W5N6P3.js";
23
23
  import "./chunk-VF4K2QE6.js";
24
- import "./chunk-MDNZEE6B.js";
24
+ import "./chunk-Q6B6XJBG.js";
25
25
  import "./chunk-VC6OZXO5.js";
26
- import "./chunk-KEPSRWXW.js";
26
+ import "./chunk-2OK7P5XF.js";
27
27
  import "./chunk-XOIF2TNF.js";
28
28
  import "./chunk-MRC4Q34M.js";
29
29
  import "./chunk-MTU75CZ2.js";
30
30
  import "./chunk-CWMSB67P.js";
31
- import "./chunk-COIZN2AL.js";
31
+ import "./chunk-ECGTEOC2.js";
32
32
  import "./chunk-RPDGJO4D.js";
33
33
  import "./chunk-SOTZ6RDN.js";
34
34
  import "./chunk-Z4NR32XR.js";
35
35
  import "./chunk-M76ECQRD.js";
36
36
  import "./chunk-WZSRQNQG.js";
37
- import "./chunk-JTMNCCWF.js";
38
- import "./chunk-OVBVEXZ7.js";
37
+ import "./chunk-OSIJVBXP.js";
38
+ import "./chunk-PFW2ZEON.js";
39
39
  import "./chunk-5MMAK75Q.js";
40
40
  import "./chunk-HQPG2PIV.js";
41
41
  import "./chunk-5CS33IBL.js";
@@ -6,7 +6,7 @@ import {
6
6
  isAssistantToolStub,
7
7
  selectAllMsgs,
8
8
  updateContentTitle
9
- } from "./chunk-KEPSRWXW.js";
9
+ } from "./chunk-2OK7P5XF.js";
10
10
  import {
11
11
  BUILTIN_TITLE_LLM_CONFIG
12
12
  } from "./chunk-XOIF2TNF.js";
@@ -15,7 +15,7 @@ import "./chunk-MTU75CZ2.js";
15
15
  import "./chunk-CWMSB67P.js";
16
16
  import {
17
17
  runLlm
18
- } from "./chunk-COIZN2AL.js";
18
+ } from "./chunk-ECGTEOC2.js";
19
19
  import "./chunk-RPDGJO4D.js";
20
20
  import "./chunk-SOTZ6RDN.js";
21
21
  import "./chunk-Z4NR32XR.js";
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-M76ECQRD.js";
25
25
  import {
26
26
  serializeMessageContent
27
- } from "./chunk-OVBVEXZ7.js";
27
+ } from "./chunk-PFW2ZEON.js";
28
28
  import "./chunk-5MMAK75Q.js";
29
29
  import "./chunk-HQPG2PIV.js";
30
30
  import "./chunk-5CS33IBL.js";