nolo-cli 0.154.0-alpha.1 → 0.154.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 (163) hide show
  1. package/{_executeModel-SDGDBNX5.js → _executeModel-3HHZYHHB.js} +54 -54
  2. package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
  3. package/{action-SXJD5N5R.js → action-GPPJC5TI.js} +5 -5
  4. package/{addContentAction-65ONHX2T.js → addContentAction-XJQEJ4XW.js} +8 -8
  5. package/{addDialogAgentAction-WOLK7RB4.js → addDialogAgentAction-5WZX5CAY.js} +7 -7
  6. package/{agentDeleteCommand-W2XXF27A.js → agentDeleteCommand-ON2KVSJ5.js} +74 -75
  7. package/{agentEmailCommands-MSFGRDUZ.js → agentEmailCommands-2QPD5VP3.js} +77 -78
  8. package/{agentListCommands-G36AMSBR.js → agentListCommands-L33M3I6V.js} +35 -35
  9. package/{agentMachineCommands-YVVPDIHJ.js → agentMachineCommands-V44DPSED.js} +34 -31
  10. package/{agentProviderCommands-X2HQE6HY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-7G3DDI4L.js → agentRecordCommands-CKILCNQZ.js} +71 -72
  13. package/{agentRunCommand-ET7LIY7J.js → agentRunCommand-6IN7NK7H.js} +74 -74
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-Q7ZOMZC7.js → agentRuntimeLocal-XCKO5FVP.js} +20 -18
  16. package/{agentSlice-MK5JTSZR.js → agentSlice-YT3VCCEW.js} +8 -8
  17. package/{appDeleteCommands-MMWT54BR.js → appDeleteCommands-2PJFNLAJ.js} +30 -28
  18. package/{appDeployCommands-OIFXVDOF.js → appDeployCommands-AZCMCMK6.js} +30 -28
  19. package/{appDeployStatusCommands-OTXMSDFB.js → appDeployStatusCommands-HSIKPVJN.js} +30 -28
  20. package/{appGetCommands-JPY36ANL.js → appGetCommands-IUZCPAP7.js} +30 -28
  21. package/{appListCommands-IHJGN36O.js → appListCommands-JLFVS44M.js} +30 -28
  22. package/{authCommand-J3XILHWW.js → authCommand-3Z52KJID.js} +22 -302
  23. package/{authCommands-77CHYBGF.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-A6VSPJEJ.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
  26. package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
  27. package/{chunk-FDT27L7S.js → chunk-2XDQAWBM.js} +18 -16
  28. package/{chunk-UGN77YJU.js → chunk-2ZYCNT2O.js} +232 -76
  29. package/{chunk-QFEW2ULV.js → chunk-32ZKZET7.js} +1 -1
  30. package/{chunk-QRRFQFFU.js → chunk-3GTVM7NJ.js} +22 -22
  31. package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
  32. package/{chunk-LGCICX53.js → chunk-3L5MSPWX.js} +1 -1
  33. package/{chunk-4YRTZIVN.js → chunk-43OFVLWJ.js} +6 -6
  34. package/{chunk-6TF64IF2.js → chunk-4L4K6YR7.js} +16 -2
  35. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  36. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  37. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  38. package/{chunk-UUPR3TD7.js → chunk-7RF4O6AT.js} +1 -3
  39. package/{chunk-OGI4JKBD.js → chunk-BAWAKW7X.js} +2 -2
  40. package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
  41. package/{chunk-A7HQF6YH.js → chunk-CDLP56BS.js} +9 -9
  42. package/{chunk-5MM7NNO6.js → chunk-CNWKLQRL.js} +8 -3
  43. package/{chunk-TJ2VPCBE.js → chunk-DD2EOI6S.js} +2 -2
  44. package/{chunk-36OMEXXR.js → chunk-DLV3H464.js} +8 -8
  45. package/{chunk-4WLENVCW.js → chunk-DT7EWFTY.js} +6 -6
  46. package/{chunk-C5DLHL3R.js → chunk-ESMZW5PE.js} +3 -3
  47. package/{chunk-FJRGRIVL.js → chunk-EVPKKBSI.js} +17 -16
  48. package/{chunk-PSJWPSKS.js → chunk-EWO77ZGF.js} +9 -43
  49. package/{chunk-ZWG3C7VI.js → chunk-F3SOW2EU.js} +81 -1
  50. package/{chunk-RGBBF2RB.js → chunk-F5WASHQA.js} +279 -138
  51. package/{chunk-GJRCYN5X.js → chunk-FB5WLEOD.js} +21 -17
  52. package/{chunk-HHC5FJHS.js → chunk-FCUKCVKN.js} +12 -8
  53. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  54. package/{chunk-EM3YOZJ4.js → chunk-FFHV45HO.js} +3 -3
  55. package/{chunk-SWZEIKWQ.js → chunk-FZYKQFBQ.js} +3 -3
  56. package/{chunk-7KYVUFDG.js → chunk-G3VYRPTV.js} +5 -267
  57. package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
  58. package/{chunk-LXTNZVD4.js → chunk-HW7EBEC5.js} +35 -207
  59. package/{chunk-B2EGWZJG.js → chunk-I7S63QUU.js} +1 -1
  60. package/{chunk-PDJ6ZODI.js → chunk-IF7V3CBU.js} +1 -1
  61. package/{chunk-T6CBQ6BN.js → chunk-INFHX73M.js} +1 -1
  62. package/{chunk-YBNHPX4S.js → chunk-IW64YHXL.js} +155 -31
  63. package/{chunk-N37ERV4O.js → chunk-JDKSYQQN.js} +5 -5
  64. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  65. package/{chunk-PSYTZ4LK.js → chunk-JSB2OPQT.js} +134 -126
  66. package/{chunk-VEJFPTX7.js → chunk-JWEXJ573.js} +3 -3
  67. package/{chunk-ZG73GDYU.js → chunk-K25WQPP3.js} +253 -57
  68. package/{chunk-HKT6QXP3.js → chunk-KABQ74UQ.js} +5 -5
  69. package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
  70. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  71. package/{chunk-AIZE5TDM.js → chunk-MAYW6V3E.js} +2 -2
  72. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  73. package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
  74. package/{chunk-TPG4CZHI.js → chunk-NHEWV5FD.js} +17 -3
  75. package/{chunk-G47IPDOK.js → chunk-O2IWR23M.js} +1 -1
  76. package/{chunk-OU7WCUB5.js → chunk-OLVOR45M.js} +2 -2
  77. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  78. package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
  79. package/{chunk-2MTE2PEH.js → chunk-QA2C5NKI.js} +5 -739
  80. package/{chunk-TYND6RDQ.js → chunk-QI2WVWXV.js} +73 -2
  81. package/{chunk-L6EQV5OC.js → chunk-QXZH5UDF.js} +3 -3
  82. package/{chunk-24UXUXPR.js → chunk-QZIOZDM6.js} +10 -10
  83. package/{chunk-C7M4N5RA.js → chunk-R2KWTENX.js} +3 -3
  84. package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
  85. package/{chunk-UTIMX333.js → chunk-RIHQGFFA.js} +1 -1
  86. package/{chunk-4Z245KOA.js → chunk-SH3XD4E2.js} +8 -4
  87. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  88. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  89. package/chunk-TT644UJD.js +188 -0
  90. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  91. package/{chunk-ANJTRG52.js → chunk-ULQAD7ZY.js} +18 -43
  92. package/{chunk-LOLOIIIP.js → chunk-UY73HNIN.js} +704 -663
  93. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  94. package/{chunk-KX6LPG7W.js → chunk-VXS4YYJ2.js} +8 -8
  95. package/{chunk-HXHSTRGH.js → chunk-VYNMQ6HW.js} +0 -27
  96. package/{chunk-IJERIUXS.js → chunk-WRCZXJ4N.js} +6 -3
  97. package/chunk-Y5GCAMGP.js +9 -0
  98. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  99. package/{chunk-EYWJT7A2.js → chunk-YPG7TUQD.js} +3 -3
  100. package/chunk-YR47Y7CN.js +2685 -0
  101. package/{chunk-NEJZ5GLD.js → chunk-ZAV4YVEA.js} +18 -2
  102. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  103. package/{chunk-WUR6LY7R.js → chunk-ZSLIYVIQ.js} +7 -7
  104. package/{commandRegistry-VSJPFX6B.js → commandRegistry-76FLRKYQ.js} +88 -96
  105. package/{contentThunks-65BTQQQE.js → contentThunks-QBL5NK2W.js} +21 -21
  106. package/{createAgentAutomationAction-SRMBZTAO.js → createAgentAutomationAction-5UWBLR2N.js} +21 -21
  107. package/{createDialogAction-OWAU72JP.js → createDialogAction-NJ2LE7KC.js} +25 -25
  108. package/{createPageAction-D4XGNX3P.js → createPageAction-7T3RINS2.js} +24 -25
  109. package/{dbSlice-S2HYXURM.js → dbSlice-6PVPY44C.js} +7 -7
  110. package/{deleteFile-6JWDDRVP.js → deleteFile-YM6NDPAR.js} +5 -5
  111. package/{dialogCommands-H3K7PTF6.js → dialogCommands-KMECTGCW.js} +34 -31
  112. package/{dialogSlice-GEBK3X5L.js → dialogSlice-GQMTD4HR.js} +20 -20
  113. package/{dist-NJC2W7I4.js → dist-Q2JSMAKA.js} +7 -361
  114. package/{docCreateCommands-KP64KMVL.js → docCreateCommands-4IT5PUAL.js} +31 -29
  115. package/{docDeleteCommands-C3F4SZSR.js → docDeleteCommands-QS66YNZV.js} +32 -30
  116. package/{docReadCommands-7H6BDOUR.js → docReadCommands-3SAI46YC.js} +31 -29
  117. package/{docStore-ARTZTJRA.js → docStore-PM5PYKPZ.js} +8 -8
  118. package/{docUpdateCommands-JDW4BRBH.js → docUpdateCommands-OGYG5BRC.js} +31 -29
  119. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  120. package/{handleSendMessageAction-SPGAO47U.js → handleSendMessageAction-EQ3U6K5N.js} +43 -39
  121. package/index.js +8 -8
  122. package/{localRuntimeAdapter-CHLHJSA3.js → localRuntimeAdapter-MO64KEOS.js} +69 -68
  123. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  124. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  125. package/{machineCommands-GVFN64CM.js → machineCommands-7MBJJY4K.js} +79 -78
  126. package/{machineWsRunDispatch-3WXQ57DN.js → machineWsRunDispatch-T4LFRJL3.js} +69 -70
  127. package/{memberThunks-VPTET5M2.js → memberThunks-AZINUM4S.js} +10 -10
  128. package/package.json +6 -2
  129. package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
  130. package/{providerPresetApply-CRZFMQD5.js → providerPresetApply-PKUOHQJT.js} +5 -5
  131. package/{providerRegistry-7IS43D3X.js → providerRegistry-HNQLIFN2.js} +5 -5
  132. package/{read-VMMIHEAK.js → read-7JPIWRBQ.js} +5 -5
  133. package/{readDocTool-4XSLKYSQ.js → readDocTool-AAQTB2Y3.js} +1 -1
  134. package/{readlineWorkspace-2WGUU7KH.js → readlineWorkspace-WRV322AB.js} +374 -199
  135. package/{removeDialogAgentAction-YIV37ENV.js → removeDialogAgentAction-RMVRILLK.js} +9 -9
  136. package/{runAgentClientLoop-WS2HFGIR.js → runAgentClientLoop-EXIQDX7G.js} +58 -53
  137. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  138. package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
  139. package/{setDialogExtraReferencesAction-FWVD656I.js → setDialogExtraReferencesAction-L3V7JTMG.js} +8 -8
  140. package/{setPrimaryDialogAgentAction-HIPQTT6N.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +9 -9
  141. package/settingThunks-N6XFWPOU.js +923 -0
  142. package/{spaceCommands-JQN7D4FE.js → spaceCommands-WQMUCGV7.js} +28 -26
  143. package/{streamAgentChatTurn-OSGLMHT6.js → streamAgentChatTurn-DI2334G3.js} +153 -94
  144. package/{switchDialogAgentAction-SLTPB635.js → switchDialogAgentAction-ZJ5CGU7J.js} +7 -7
  145. package/{tableCommands-U3QDY4L6.js → tableCommands-IVC5S7Y3.js} +11 -11
  146. package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
  147. package/{tools-XF5A6N2B.js → tools-23VQGJOX.js} +42 -43
  148. package/{tuiSummaryLlmCaller-KLK6K3Q3.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  149. package/{updateCommands-NQXAGFM7.js → updateCommands-FJHGWD3Q.js} +5 -3
  150. package/{updateDialogTitleAction-IN5TBR23.js → updateDialogTitleAction-AGAYHWS7.js} +21 -21
  151. package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
  152. package/chunk-IA7TRNNR.js +0 -11
  153. package/chunk-ON3WLDG2.js +0 -7012
  154. package/chunk-UKZX3NHN.js +0 -48
  155. package/chunk-W4S6OTSC.js +0 -35
  156. package/clipboardy-GCO3GT3I.js +0 -11793
  157. package/settingThunks-SB37UY4C.js +0 -1371
  158. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  159. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  160. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  161. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  162. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  163. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
@@ -1,26 +1,23 @@
1
- import {
2
- BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
3
- BUILTIN_SUMMARY_LLM_CONFIG
4
- } from "./chunk-523DITKR.js";
5
- import {
6
- isOAuthApiKeyRef
7
- } from "./chunk-UKZX3NHN.js";
8
1
  import {
9
2
  buildDialogAttachmentPlan,
10
3
  extractFileContentIds
11
4
  } from "./chunk-OFFL4DCR.js";
5
+ import {
6
+ BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
7
+ BUILTIN_SUMMARY_LLM_CONFIG
8
+ } from "./chunk-523DITKR.js";
12
9
  import {
13
10
  isMediaToolConfirmation
14
11
  } from "./chunk-QYPE3TS3.js";
15
12
  import {
16
13
  runLlm
17
- } from "./chunk-4WLENVCW.js";
14
+ } from "./chunk-DT7EWFTY.js";
18
15
  import {
19
16
  getApproxPricePerImage
20
17
  } from "./chunk-4JH2UMJR.js";
21
18
  import {
22
19
  cleanupCliSessionForDialog
23
- } from "./chunk-C5DLHL3R.js";
20
+ } from "./chunk-ESMZW5PE.js";
24
21
  import {
25
22
  getActiveDialogAgentId,
26
23
  getDialogAgentIds,
@@ -56,7 +53,7 @@ import {
56
53
  } from "./chunk-XI7DGLUK.js";
57
54
  import {
58
55
  addContentAction
59
- } from "./chunk-VEJFPTX7.js";
56
+ } from "./chunk-JWEXJ573.js";
60
57
  import {
61
58
  patch,
62
59
  read,
@@ -64,19 +61,19 @@ import {
64
61
  selectById,
65
62
  upload,
66
63
  write
67
- } from "./chunk-A7HQF6YH.js";
64
+ } from "./chunk-CDLP56BS.js";
68
65
  import {
69
66
  getRuntimeServerContext,
70
67
  parseOwnerUserIdFromDbKey,
71
68
  scheduleDeleteReplication
72
- } from "./chunk-4YRTZIVN.js";
69
+ } from "./chunk-43OFVLWJ.js";
73
70
  import {
74
71
  asyncThunkCreator,
75
72
  buildCreateSlice,
76
73
  createAsyncThunk,
77
74
  createEntityAdapter,
78
75
  createSelector
79
- } from "./chunk-IJERIUXS.js";
76
+ } from "./chunk-WRCZXJ4N.js";
80
77
  import {
81
78
  createClientLogger
82
79
  } from "./chunk-QQ56R7KS.js";
@@ -84,7 +81,7 @@ import {
84
81
  selectIdentityToken,
85
82
  selectIdentityUser,
86
83
  selectIdentityUserId
87
- } from "./chunk-SEJ5OS6F.js";
84
+ } from "./chunk-PXYBUFDB.js";
88
85
  import {
89
86
  getRecordTimestamp,
90
87
  getTombstoneTimestamp,
@@ -102,24 +99,29 @@ import {
102
99
  STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE,
103
100
  STREAM_TRUNCATED_FALLBACK_MESSAGE,
104
101
  asOptionalJsonRecord,
102
+ devinChannelContextWindow,
105
103
  extractReferenceKeysFromMessage,
104
+ isOAuthApiKeyRef,
106
105
  normalizeUsage,
107
106
  resolveAutoExecutionProfile
108
- } from "./chunk-ZWG3C7VI.js";
107
+ } from "./chunk-F3SOW2EU.js";
108
+ import {
109
+ isDevinOAuthAgent
110
+ } from "./chunk-5ZUL4CUO.js";
109
111
  import {
110
112
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
111
113
  DEFAULT_CONTEXT_WINDOW,
112
114
  buildCompactionMetricsFromPlan,
113
115
  buildCompactionUserContent,
114
116
  computeSummarySourceMetadata,
117
+ findModelContextWindow,
115
118
  formatCompactionMetricsLog,
116
119
  formatFileOperationsFromMessages,
117
120
  formatMessagesForSummaryWithTruncation,
118
- getModelContextWindow,
119
121
  getModelInfo,
120
122
  planCompression,
121
123
  serializeMessageContent
122
- } from "./chunk-2MTE2PEH.js";
124
+ } from "./chunk-QA2C5NKI.js";
123
125
  import {
124
126
  asRecordOrEmpty
125
127
  } from "./chunk-KX6YBIHG.js";
@@ -146,13 +148,19 @@ import {
146
148
  createTokenStatsKey,
147
149
  dialogMessageKey
148
150
  } from "./chunk-5EMSBTQ6.js";
151
+ import {
152
+ estimateTokenCount
153
+ } from "./chunk-PSCNXBYA.js";
154
+ import {
155
+ API_ENDPOINTS
156
+ } from "./chunk-LCBAMY2M.js";
149
157
  import {
150
158
  asOptionalFiniteNumber
151
159
  } from "./chunk-WWC7I6TA.js";
152
160
  import {
153
161
  findModelConfig,
154
162
  getModelConfig
155
- } from "./chunk-TRW43TSC.js";
163
+ } from "./chunk-6EQD4AQL.js";
156
164
  import {
157
165
  isRecord
158
166
  } from "./chunk-KUG52IAP.js";
@@ -162,9 +170,6 @@ import {
162
170
  import {
163
171
  toErrorMessage
164
172
  } from "./chunk-HNMXYYJR.js";
165
- import {
166
- API_ENDPOINTS
167
- } from "./chunk-LCBAMY2M.js";
168
173
  import {
169
174
  normalizeServerOrigin
170
175
  } from "./chunk-CF7PE763.js";
@@ -576,6 +581,8 @@ var fetchAndCacheMessagesLocalFirst = async ({
576
581
  const remotePromise = Promise.all(serverPromises).then(
577
582
  (results) => results.flat()
578
583
  );
584
+ void remotePromise.catch(() => {
585
+ });
579
586
  let localSettledAt = null;
580
587
  const localTimingPromise = localPromise.then((value) => {
581
588
  localSettledAt = typeof performance !== "undefined" ? performance.now() : Date.now();
@@ -694,6 +701,154 @@ var fetchAndCacheMessages = async (options) => {
694
701
  return remotePromise;
695
702
  };
696
703
 
704
+ // packages/ai/context/contextOccupancy.ts
705
+ function estimateMessagesTokens(messages) {
706
+ return messages.reduce((total, message) => {
707
+ const content = typeof message.content === "string" ? message.content : message.content == null ? "" : JSON.stringify(message.content);
708
+ return total + estimateTokenCount(content) + 4;
709
+ }, 0);
710
+ }
711
+ function historyTokensBeforeLatestAssistant(messages) {
712
+ const total = estimateMessagesTokens(messages);
713
+ const latest = messages[messages.length - 1];
714
+ if (latest?.role !== "assistant") return total;
715
+ return Math.max(0, total - estimateMessagesTokens([latest]));
716
+ }
717
+ function resolveOccupancy(input) {
718
+ if (input.authoritativeInput !== void 0 && input.authoritativeInput > 0) {
719
+ const generated = Math.max(0, input.generatedSinceAuthority ?? 0);
720
+ return {
721
+ tokens: input.authoritativeInput + generated,
722
+ estimated: generated > 0
723
+ };
724
+ }
725
+ return {
726
+ tokens: Math.max(0, input.baselineEstimate ?? 0),
727
+ estimated: true
728
+ };
729
+ }
730
+ function resolveOccupancyWindow(ref) {
731
+ if (!ref.model) return void 0;
732
+ if (isDevinOAuthAgent(ref)) {
733
+ return devinChannelContextWindow(ref.model) ?? findModelContextWindow(ref.model, ref.provider);
734
+ }
735
+ return findModelContextWindow(ref.model, ref.provider);
736
+ }
737
+
738
+ // packages/ai/context/agentContextWindow.ts
739
+ function resolveAgentContextWindow(ref) {
740
+ const byModel = resolveOccupancyWindow({ model: ref.model, provider: ref.provider });
741
+ if (byModel !== void 0) return byModel;
742
+ const byName = ref.agentName?.trim() ? resolveOccupancyWindow({ model: ref.agentName, provider: ref.provider }) : void 0;
743
+ if (byName !== void 0) return byName;
744
+ const candidates = [
745
+ ...modelSlugCandidates(ref.agentKey, 2),
746
+ ...modelSlugCandidates(ref.agentName, 1)
747
+ ];
748
+ for (const candidate of candidates) {
749
+ const window = resolveOccupancyWindow({ model: candidate, provider: ref.provider });
750
+ if (window !== void 0) return window;
751
+ }
752
+ return void 0;
753
+ }
754
+ var AGENT_KEY_PREFIX = /^agent-[a-z0-9]+-/i;
755
+ function modelSlugCandidates(source, maxDrop) {
756
+ const raw = source?.trim();
757
+ if (!raw) return [];
758
+ const base = raw.replace(/\s+/g, "-").toLowerCase();
759
+ const seed = base.replace(AGENT_KEY_PREFIX, "");
760
+ const out = [seed];
761
+ if (seed !== base) out.push(base);
762
+ const segments = seed.split("-");
763
+ for (let drop = 1; drop <= maxDrop && drop < segments.length; drop++) {
764
+ out.push(segments.slice(drop).join("-"));
765
+ }
766
+ return [...new Set(out.filter(Boolean))];
767
+ }
768
+
769
+ // packages/agent-runtime/builtinPlatformAgentRoute.ts
770
+ function resolveBuiltinAgentRuntimeFields(agentKey) {
771
+ if (!isBuiltinPlatformAgentKey(agentKey)) return null;
772
+ const entry = builtinAgentCatalogEntryById(parseBuiltinPlatformAgentId(agentKey));
773
+ if (!entry) return null;
774
+ return { provider: entry.provider, model: entry.model };
775
+ }
776
+
777
+ // packages/agent-runtime/builtinPlatformAgentConfigs.ts
778
+ function buildConfig(e2) {
779
+ const key = publicAgentKey(e2.id);
780
+ const rawRecord = {
781
+ dbKey: key,
782
+ isPublic: true,
783
+ provider: e2.provider,
784
+ model: e2.model,
785
+ apiSource: e2.apiSource ?? "platform",
786
+ useServerProxy: e2.useServerProxy ?? true
787
+ };
788
+ if (e2.hasImageOutput) rawRecord.hasImageOutput = true;
789
+ if (e2.imageModel) rawRecord.imageModel = e2.imageModel;
790
+ if (e2.imageWorkflow) rawRecord.imageWorkflow = e2.imageWorkflow;
791
+ if (e2.imageConfig) rawRecord.imageConfig = e2.imageConfig;
792
+ return {
793
+ key,
794
+ name: e2.name,
795
+ provider: e2.provider,
796
+ model: e2.model,
797
+ apiSource: e2.apiSource ?? "platform",
798
+ useServerProxy: e2.useServerProxy ?? true,
799
+ rawRecord
800
+ };
801
+ }
802
+ var BUILTIN_PLATFORM_AGENT_CONFIGS = Object.fromEntries(
803
+ builtinRuntimeFallbackEntries().map((e2) => [publicAgentKey(e2.id), buildConfig(e2)])
804
+ );
805
+ function resolveBuiltinPlatformAgentConfig(agentRef) {
806
+ return BUILTIN_PLATFORM_AGENT_CONFIGS[agentRef] ?? null;
807
+ }
808
+ function resolveBuiltinPlatformAgentRecord(agentRef) {
809
+ const config = resolveBuiltinPlatformAgentConfig(agentRef);
810
+ if (!config) return null;
811
+ return {
812
+ ...config.rawRecord,
813
+ dbKey: agentRef,
814
+ ...config.name ? { name: config.name } : {}
815
+ };
816
+ }
817
+ var BUILTIN_RUNTIME_EXTRA_OVERRIDES = {
818
+ [BUILTIN_NOLO_AGENT_KEY]: { reasoningEffort: "max" }
819
+ };
820
+ function applyBuiltinAgentRuntimeOverride(agentKey, record) {
821
+ const fields = resolveBuiltinAgentRuntimeFields(agentKey);
822
+ if (!fields) return record;
823
+ const extraFields = BUILTIN_RUNTIME_EXTRA_OVERRIDES[agentKey];
824
+ const extraNeedsOverride = (target) => {
825
+ if (extraFields == null || target == null || typeof target !== "object") {
826
+ return false;
827
+ }
828
+ const flat = target;
829
+ return Object.entries(extraFields).some(([key, value]) => flat[key] !== value);
830
+ };
831
+ const current = record;
832
+ const rawNeedsOverride = current.rawRecord != null && (current.rawRecord.provider !== fields.provider || current.rawRecord.model !== fields.model || extraNeedsOverride(current.rawRecord));
833
+ if (current.provider === fields.provider && current.model === fields.model && !rawNeedsOverride && !extraNeedsOverride(record)) {
834
+ return record;
835
+ }
836
+ return {
837
+ ...record,
838
+ provider: fields.provider,
839
+ model: fields.model,
840
+ ...extraFields ?? {},
841
+ ...current.rawRecord ? {
842
+ rawRecord: {
843
+ ...current.rawRecord,
844
+ provider: fields.provider,
845
+ model: fields.model,
846
+ ...extraFields ?? {}
847
+ }
848
+ } : {}
849
+ };
850
+ }
851
+
697
852
  // packages/render/web/ui/toastStore.ts
698
853
  var EXIT_MS = 320;
699
854
  var raf = typeof globalThis.requestAnimationFrame === "function" ? (cb) => globalThis.requestAnimationFrame(cb) : (cb) => {
@@ -4916,9 +5071,18 @@ var chat_locale_default = {
4916
5071
  usageInputLabel: "input",
4917
5072
  usageOutputLabel: "output",
4918
5073
  contextWindow: "Context window",
4919
- contextWindowUnknown: "Unknown context window",
4920
- contextOccupancyPercent: "Context occupancy {{percent}}%",
4921
- contextOccupancy: "Context occupancy",
5074
+ contextUsageKnownChip: "{{percent}}%",
5075
+ contextUsageEstimatedChip: "~{{percent}}%",
5076
+ contextUsageUnknownChip: "{{tokens}}",
5077
+ contextUsageUnknownChipEstimated: "\u2248{{tokens}}",
5078
+ contextUsageLoadingChip: "\u2014",
5079
+ contextUsageChipLabel: "Context occupancy {{usage}}",
5080
+ contextUsageKnownPanel: "{{tokens}} / {{window}} \xB7 {{percent}}%",
5081
+ contextUsageUnknownPanel: "{{tokens}} tokens \xB7 Window unknown",
5082
+ contextUsageUnknownPanelEstimated: "\u2248{{tokens}} tokens \xB7 Window unknown",
5083
+ contextUsageUnknownHint: "This model has no registered context window; occupancy percentage is unavailable.",
5084
+ contextUsageLoading: "Loading\u2026",
5085
+ contextUsageCompact: "Compact context",
4922
5086
  contextOccupancyEstimated: " (estimated)",
4923
5087
  dialogCumulative: "Conversation total",
4924
5088
  dialogUsageTokensSection: "Session tokens",
@@ -5447,9 +5611,18 @@ var chat_locale_default = {
5447
5611
  usageInputLabel: "\u8F93\u5165",
5448
5612
  usageOutputLabel: "\u8F93\u51FA",
5449
5613
  contextWindow: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
5450
- contextWindowUnknown: "\u4E0A\u4E0B\u6587\u7A97\u53E3\u672A\u77E5",
5451
- contextOccupancyPercent: "\u4E0A\u4E0B\u6587\u5360\u7528 {{percent}}%",
5452
- contextOccupancy: "\u4E0A\u4E0B\u6587\u5360\u7528",
5614
+ contextUsageKnownChip: "{{percent}}%",
5615
+ contextUsageEstimatedChip: "~{{percent}}%",
5616
+ contextUsageUnknownChip: "{{tokens}}",
5617
+ contextUsageUnknownChipEstimated: "\u2248{{tokens}}",
5618
+ contextUsageLoadingChip: "\u2014",
5619
+ contextUsageChipLabel: "\u4E0A\u4E0B\u6587\u5360\u7528 {{usage}}",
5620
+ contextUsageKnownPanel: "{{tokens}} / {{window}} \xB7 {{percent}}%",
5621
+ contextUsageUnknownPanel: "{{tokens}} \xB7 \u7A97\u53E3\u672A\u77E5",
5622
+ contextUsageUnknownPanelEstimated: "\u2248{{tokens}} \xB7 \u7A97\u53E3\u672A\u77E5",
5623
+ contextUsageUnknownHint: "\u8BE5\u6A21\u578B\u672A\u767B\u8BB0\u4E0A\u4E0B\u6587\u7A97\u53E3\uFF0C\u65E0\u6CD5\u8BA1\u7B97\u5360\u6BD4",
5624
+ contextUsageLoading: "\u8BFB\u53D6\u4E2D\u2026",
5625
+ contextUsageCompact: "\u538B\u7F29\u4E0A\u4E0B\u6587",
5453
5626
  contextOccupancyEstimated: "\uFF08\u4F30\u7B97\uFF09",
5454
5627
  dialogCumulative: "\u672C\u5BF9\u8BDD\u7D2F\u8BA1",
5455
5628
  dialogUsageTokensSection: "\u672C\u4F1A\u8BDD token",
@@ -5967,9 +6140,18 @@ var chat_locale_default = {
5967
6140
  usageInputLabel: "\u8F38\u5165",
5968
6141
  usageOutputLabel: "\u8F38\u51FA",
5969
6142
  contextWindow: "\u4E0A\u4E0B\u6587\u8996\u7A97",
5970
- contextWindowUnknown: "\u4E0A\u4E0B\u6587\u8996\u7A97\u672A\u77E5",
5971
- contextOccupancyPercent: "\u4E0A\u4E0B\u6587\u4F54\u7528 {{percent}}%",
5972
- contextOccupancy: "\u4E0A\u4E0B\u6587\u4F54\u7528",
6143
+ contextUsageKnownChip: "{{percent}}%",
6144
+ contextUsageEstimatedChip: "~{{percent}}%",
6145
+ contextUsageUnknownChip: "{{tokens}}",
6146
+ contextUsageUnknownChipEstimated: "\u2248{{tokens}}",
6147
+ contextUsageLoadingChip: "\u2014",
6148
+ contextUsageChipLabel: "\u4E0A\u4E0B\u6587\u4F54\u7528 {{usage}}",
6149
+ contextUsageKnownPanel: "{{tokens}} / {{window}} \xB7 {{percent}}%",
6150
+ contextUsageUnknownPanel: "{{tokens}} \xB7 \u8996\u7A97\u672A\u77E5",
6151
+ contextUsageUnknownPanelEstimated: "\u2248{{tokens}} \xB7 \u8996\u7A97\u672A\u77E5",
6152
+ contextUsageUnknownHint: "\u8A72\u6A21\u578B\u672A\u767B\u8A18\u4E0A\u4E0B\u6587\u8996\u7A97\uFF0C\u7121\u6CD5\u8A08\u7B97\u4F54\u6BD4",
6153
+ contextUsageLoading: "\u8B80\u53D6\u4E2D\u2026",
6154
+ contextUsageCompact: "\u58D3\u7E2E\u4E0A\u4E0B\u6587",
5973
6155
  contextOccupancyEstimated: "\uFF08\u4F30\u7B97\uFF09",
5974
6156
  dialogCumulative: "\u672C\u5C0D\u8A71\u7D2F\u8A08",
5975
6157
  dialogUsageTokensSection: "\u672C\u6703\u8A71 token",
@@ -6486,9 +6668,18 @@ var chat_locale_default = {
6486
6668
  usageInputLabel: "\u5165\u529B",
6487
6669
  usageOutputLabel: "\u51FA\u529B",
6488
6670
  contextWindow: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30A6\u30A3\u30F3\u30C9\u30A6",
6489
- contextWindowUnknown: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30A6\u30A3\u30F3\u30C9\u30A6\u4E0D\u660E",
6490
- contextOccupancyPercent: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u4F7F\u7528\u7387 {{percent}}%",
6491
- contextOccupancy: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u4F7F\u7528\u91CF",
6671
+ contextUsageKnownChip: "{{percent}}%",
6672
+ contextUsageEstimatedChip: "~{{percent}}%",
6673
+ contextUsageUnknownChip: "{{tokens}}",
6674
+ contextUsageUnknownChipEstimated: "\u2248{{tokens}}",
6675
+ contextUsageLoadingChip: "\u2014",
6676
+ contextUsageChipLabel: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u4F7F\u7528\u91CF {{usage}}",
6677
+ contextUsageKnownPanel: "{{tokens}} / {{window}} \xB7 {{percent}}%",
6678
+ contextUsageUnknownPanel: "{{tokens}} \xB7 \u30A6\u30A3\u30F3\u30C9\u30A6\u4E0D\u660E",
6679
+ contextUsageUnknownPanelEstimated: "\u2248{{tokens}} \xB7 \u30A6\u30A3\u30F3\u30C9\u30A6\u4E0D\u660E",
6680
+ contextUsageUnknownHint: "\u3053\u306E\u30E2\u30C7\u30EB\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30A6\u30A3\u30F3\u30C9\u30A6\u306F\u672A\u767B\u9332\u306E\u305F\u3081\u3001\u4F7F\u7528\u7387\u3092\u8A08\u7B97\u3067\u304D\u307E\u305B\u3093\u3002",
6681
+ contextUsageLoading: "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
6682
+ contextUsageCompact: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u5727\u7E2E",
6492
6683
  contextOccupancyEstimated: "\uFF08\u63A8\u5B9A\uFF09",
6493
6684
  dialogCumulative: "\u3053\u306E\u4F1A\u8A71\u306E\u7D2F\u8A08",
6494
6685
  dialogUsageTokensSection: "\u30BB\u30C3\u30B7\u30E7\u30F3 token",
@@ -7029,6 +7220,10 @@ var space_locale_default = {
7029
7220
  unpin: "Unpin",
7030
7221
  favorite: "Favorite",
7031
7222
  unfavorite: "Unfavorite",
7223
+ quickAddToRail: "Add to Rail Shortcut",
7224
+ quickRemoveFromRail: "Remove from Rail Shortcut",
7225
+ quickMoveRailUp: "Move Rail Shortcut Up",
7226
+ quickMoveRailDown: "Move Rail Shortcut Down",
7032
7227
  pinUpdated: "Pin status updated",
7033
7228
  pinUpdateFailed: "Failed to update pin status",
7034
7229
  moveToSpace: "Move to Space",
@@ -7135,6 +7330,8 @@ var space_locale_default = {
7135
7330
  search_placeholder: "Search content...",
7136
7331
  allView: {
7137
7332
  recent: "Recent",
7333
+ work: "Work",
7334
+ projects: "Projects",
7138
7335
  favorites: "Favorites",
7139
7336
  shares: "My Shares",
7140
7337
  expanded: "Expanded",
@@ -7349,6 +7546,10 @@ var space_locale_default = {
7349
7546
  unpin: "\u53D6\u6D88\u7F6E\u9876",
7350
7547
  favorite: "\u6536\u85CF",
7351
7548
  unfavorite: "\u53D6\u6D88\u6536\u85CF",
7549
+ quickAddToRail: "\u52A0\u5165\u5FEB\u6377",
7550
+ quickRemoveFromRail: "\u4ECE\u5FEB\u6377\u79FB\u9664",
7551
+ quickMoveRailUp: "\u5FEB\u6377\u4E0A\u79FB",
7552
+ quickMoveRailDown: "\u5FEB\u6377\u4E0B\u79FB",
7352
7553
  pinUpdated: "\u7F6E\u9876\u72B6\u6001\u5DF2\u66F4\u65B0",
7353
7554
  pinUpdateFailed: "\u7F6E\u9876\u72B6\u6001\u66F4\u65B0\u5931\u8D25",
7354
7555
  moveToSpace: "\u79FB\u52A8\u5230\u7A7A\u95F4",
@@ -7455,6 +7656,8 @@ var space_locale_default = {
7455
7656
  search_placeholder: "\u641C\u7D22\u5185\u5BB9...",
7456
7657
  allView: {
7457
7658
  recent: "\u6700\u8FD1",
7659
+ work: "\u5DE5\u4F5C",
7660
+ projects: "\u9879\u76EE",
7458
7661
  favorites: "\u6211\u7684\u6536\u85CF",
7459
7662
  shares: "\u6211\u7684\u5206\u4EAB",
7460
7663
  expanded: "\u5DF2\u5C55\u5F00",
@@ -7668,6 +7871,10 @@ var space_locale_default = {
7668
7871
  unpin: "\u53D6\u6D88\u7F6E\u9802",
7669
7872
  favorite: "\u6536\u85CF",
7670
7873
  unfavorite: "\u53D6\u6D88\u6536\u85CF",
7874
+ quickAddToRail: "\u52A0\u5165\u5FEB\u6377",
7875
+ quickRemoveFromRail: "\u5F9E\u5FEB\u6377\u79FB\u9664",
7876
+ quickMoveRailUp: "\u5FEB\u6377\u4E0A\u79FB",
7877
+ quickMoveRailDown: "\u5FEB\u6377\u4E0B\u79FB",
7671
7878
  pinUpdated: "\u7F6E\u9802\u72C0\u614B\u5DF2\u66F4\u65B0",
7672
7879
  pinUpdateFailed: "\u7F6E\u9802\u72C0\u614B\u66F4\u65B0\u5931\u6557",
7673
7880
  moveToSpace: "\u79FB\u52D5\u5230\u7A7A\u9593",
@@ -7774,6 +7981,8 @@ var space_locale_default = {
7774
7981
  search_placeholder: "\u641C\u5C0B\u5167\u5BB9...",
7775
7982
  allView: {
7776
7983
  recent: "\u6700\u8FD1",
7984
+ work: "\u5DE5\u4F5C",
7985
+ projects: "\u5C08\u6848",
7777
7986
  favorites: "\u6211\u7684\u6536\u85CF",
7778
7987
  shares: "\u6211\u7684\u5206\u4EAB",
7779
7988
  expanded: "\u5DF2\u5C55\u958B",
@@ -7988,6 +8197,10 @@ var space_locale_default = {
7988
8197
  unpin: "\u30D4\u30F3\u7559\u3081\u89E3\u9664",
7989
8198
  favorite: "\u304A\u6C17\u306B\u5165\u308A",
7990
8199
  unfavorite: "\u304A\u6C17\u306B\u5165\u308A\u89E3\u9664",
8200
+ quickAddToRail: "\u30EC\u30FC\u30EB\u306B\u8FFD\u52A0",
8201
+ quickRemoveFromRail: "\u30EC\u30FC\u30EB\u304B\u3089\u524A\u9664",
8202
+ quickMoveRailUp: "\u30EC\u30FC\u30EB\u5185\u3067\u4E0A\u3078\u79FB\u52D5",
8203
+ quickMoveRailDown: "\u30EC\u30FC\u30EB\u5185\u3067\u4E0B\u3078\u79FB\u52D5",
7991
8204
  pinUpdated: "\u30D4\u30F3\u7559\u3081\u306E\u72B6\u614B\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F",
7992
8205
  pinUpdateFailed: "\u30D4\u30F3\u7559\u3081\u306E\u72B6\u614B\u306E\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
7993
8206
  moveToSpace: "\u30B9\u30DA\u30FC\u30B9\u306B\u79FB\u52D5",
@@ -8095,6 +8308,8 @@ var space_locale_default = {
8095
8308
  search_placeholder: "\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u691C\u7D22...",
8096
8309
  allView: {
8097
8310
  recent: "\u6700\u8FD1",
8311
+ work: "\u4F5C\u696D",
8312
+ projects: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",
8098
8313
  favorites: "\u304A\u6C17\u306B\u5165\u308A",
8099
8314
  shares: "\u81EA\u5206\u306E\u5171\u6709",
8100
8315
  expanded: "\u5C55\u958B\u6E08\u307F",
@@ -8231,12 +8446,16 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
8231
8446
  const dialogConfig = selectById(state, dialogKey);
8232
8447
  if (!dialogConfig) return;
8233
8448
  let contextWindow = DEFAULT_CONTEXT_WINDOW;
8234
- if (dialogConfig.cybots && dialogConfig.cybots.length > 0) {
8235
- const agentId = dialogConfig.cybots[0];
8236
- const agent = selectById(state, agentId);
8237
- if (agent?.model) {
8238
- contextWindow = getModelContextWindow(agent.model);
8239
- }
8449
+ {
8450
+ const agentId = getActiveDialogAgentId(dialogConfig);
8451
+ const agent = agentId ? selectById(state, agentId) : void 0;
8452
+ const resolvedAgent = agent && agentId ? applyBuiltinAgentRuntimeOverride(agentId, agent) : agent;
8453
+ contextWindow = resolveAgentContextWindow({
8454
+ model: resolvedAgent?.model,
8455
+ provider: resolvedAgent?.provider,
8456
+ agentKey: agentId,
8457
+ agentName: resolvedAgent?.name
8458
+ }) ?? DEFAULT_CONTEXT_WINDOW;
8240
8459
  }
8241
8460
  const allMsgs = preFetchedMessages || getMessagesForDialogFromState(state, dialogId);
8242
8461
  const plan = planCompression({
@@ -8892,89 +9111,6 @@ var buildPersonalizationDialogPolicyContext = () => [
8892
9111
  "\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\uFF0C\u5426\u5219\u4E0D\u8981\u521B\u5EFA\u6587\u6863\uFF0C\u4E0D\u8981\u521B\u5EFA\u6216\u4FEE\u6539\u4EFB\u4F55 agent\u3002"
8893
9112
  ].join("\n");
8894
9113
 
8895
- // packages/agent-runtime/builtinPlatformAgentRoute.ts
8896
- function resolveBuiltinAgentRuntimeFields(agentKey) {
8897
- if (!isBuiltinPlatformAgentKey(agentKey)) return null;
8898
- const entry = builtinAgentCatalogEntryById(parseBuiltinPlatformAgentId(agentKey));
8899
- if (!entry) return null;
8900
- return { provider: entry.provider, model: entry.model };
8901
- }
8902
-
8903
- // packages/agent-runtime/builtinPlatformAgentConfigs.ts
8904
- function buildConfig(e2) {
8905
- const key = publicAgentKey(e2.id);
8906
- const rawRecord = {
8907
- dbKey: key,
8908
- isPublic: true,
8909
- provider: e2.provider,
8910
- model: e2.model,
8911
- apiSource: e2.apiSource ?? "platform",
8912
- useServerProxy: e2.useServerProxy ?? true
8913
- };
8914
- if (e2.hasImageOutput) rawRecord.hasImageOutput = true;
8915
- if (e2.imageModel) rawRecord.imageModel = e2.imageModel;
8916
- if (e2.imageWorkflow) rawRecord.imageWorkflow = e2.imageWorkflow;
8917
- if (e2.imageConfig) rawRecord.imageConfig = e2.imageConfig;
8918
- return {
8919
- key,
8920
- name: e2.name,
8921
- provider: e2.provider,
8922
- model: e2.model,
8923
- apiSource: e2.apiSource ?? "platform",
8924
- useServerProxy: e2.useServerProxy ?? true,
8925
- rawRecord
8926
- };
8927
- }
8928
- var BUILTIN_PLATFORM_AGENT_CONFIGS = Object.fromEntries(
8929
- builtinRuntimeFallbackEntries().map((e2) => [publicAgentKey(e2.id), buildConfig(e2)])
8930
- );
8931
- function resolveBuiltinPlatformAgentConfig(agentRef) {
8932
- return BUILTIN_PLATFORM_AGENT_CONFIGS[agentRef] ?? null;
8933
- }
8934
- function resolveBuiltinPlatformAgentRecord(agentRef) {
8935
- const config = resolveBuiltinPlatformAgentConfig(agentRef);
8936
- if (!config) return null;
8937
- return {
8938
- ...config.rawRecord,
8939
- dbKey: agentRef,
8940
- ...config.name ? { name: config.name } : {}
8941
- };
8942
- }
8943
- var BUILTIN_RUNTIME_EXTRA_OVERRIDES = {
8944
- [BUILTIN_NOLO_AGENT_KEY]: { reasoningEffort: "max" }
8945
- };
8946
- function applyBuiltinAgentRuntimeOverride(agentKey, record) {
8947
- const fields = resolveBuiltinAgentRuntimeFields(agentKey);
8948
- if (!fields) return record;
8949
- const extraFields = BUILTIN_RUNTIME_EXTRA_OVERRIDES[agentKey];
8950
- const extraNeedsOverride = (target) => {
8951
- if (extraFields == null || target == null || typeof target !== "object") {
8952
- return false;
8953
- }
8954
- const flat = target;
8955
- return Object.entries(extraFields).some(([key, value]) => flat[key] !== value);
8956
- };
8957
- const current = record;
8958
- const rawNeedsOverride = current.rawRecord != null && (current.rawRecord.provider !== fields.provider || current.rawRecord.model !== fields.model || extraNeedsOverride(current.rawRecord));
8959
- if (current.provider === fields.provider && current.model === fields.model && !rawNeedsOverride && !extraNeedsOverride(record)) {
8960
- return record;
8961
- }
8962
- return {
8963
- ...record,
8964
- provider: fields.provider,
8965
- model: fields.model,
8966
- ...extraFields ?? {},
8967
- ...current.rawRecord ? {
8968
- rawRecord: {
8969
- ...current.rawRecord,
8970
- provider: fields.provider,
8971
- model: fields.model,
8972
- ...extraFields ?? {}
8973
- }
8974
- } : {}
8975
- };
8976
- }
8977
-
8978
9114
  // packages/chat/dialog/dialogAgentPolicy.ts
8979
9115
  var resolveDialogAgentMode = (dialog) => {
8980
9116
  if (dialog?.agentMode === "auto") return "auto";
@@ -10926,7 +11062,7 @@ var messageSlice = createSliceWithThunks({
10926
11062
  runtimeOptions: args.runtimeOptions
10927
11063
  });
10928
11064
  if (agentKeyToUse) {
10929
- const { streamAgentChatTurn } = await import("./agentSlice-MK5JTSZR.js");
11065
+ const { streamAgentChatTurn } = await import("./agentSlice-YT3VCCEW.js");
10930
11066
  await dispatch(
10931
11067
  streamAgentChatTurn({
10932
11068
  agentKey: agentKeyToUse,
@@ -13681,7 +13817,7 @@ var deleteOwnedDialogAttachments = async (args) => {
13681
13817
  metadataReadFailures
13682
13818
  });
13683
13819
  if (!plan.deleteCandidates.length) return plan;
13684
- const { deleteFileAction } = await import("./deleteFile-6JWDDRVP.js");
13820
+ const { deleteFileAction } = await import("./deleteFile-YM6NDPAR.js");
13685
13821
  for (const candidate of plan.deleteCandidates) {
13686
13822
  if (candidate.fileDbKey) {
13687
13823
  await deleteFileAction(candidate.fileDbKey, args.thunkApi);
@@ -13743,7 +13879,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13743
13879
  }
13744
13880
  if (isCurrentDialog) {
13745
13881
  await thunkApi.dispatch(resetMsgs());
13746
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-GEBK3X5L.js");
13882
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-GQMTD4HR.js");
13747
13883
  dispatch(clearPendingAttachments2());
13748
13884
  }
13749
13885
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13751,39 +13887,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13751
13887
 
13752
13888
  // packages/chat/dialog/dialogSlice.ts
13753
13889
  var runCreateDialogAction = async (args, thunkApi) => {
13754
- const { createDialogAction } = await import("./createDialogAction-OWAU72JP.js");
13890
+ const { createDialogAction } = await import("./createDialogAction-NJ2LE7KC.js");
13755
13891
  return createDialogAction(args, thunkApi);
13756
13892
  };
13757
13893
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13758
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-SRMBZTAO.js");
13894
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-5UWBLR2N.js");
13759
13895
  return createAgentAutomationAction(args, thunkApi);
13760
13896
  };
13761
13897
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13762
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-IN5TBR23.js");
13898
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-AGAYHWS7.js");
13763
13899
  return updateDialogTitleAction(args, thunkApi);
13764
13900
  };
13765
13901
  var runAddDialogAgentAction = async (args, thunkApi) => {
13766
- const { addDialogAgentAction } = await import("./addDialogAgentAction-WOLK7RB4.js");
13902
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-5WZX5CAY.js");
13767
13903
  return addDialogAgentAction(args, thunkApi);
13768
13904
  };
13769
13905
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
13770
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-YIV37ENV.js");
13906
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-RMVRILLK.js");
13771
13907
  return removeDialogAgentAction(args, thunkApi);
13772
13908
  };
13773
13909
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
13774
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-HIPQTT6N.js");
13910
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-X52JQGTJ.js");
13775
13911
  return setPrimaryDialogAgentAction(args, thunkApi);
13776
13912
  };
13777
13913
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
13778
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-SLTPB635.js");
13914
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-ZJ5CGU7J.js");
13779
13915
  return switchDialogAgentAction(args, thunkApi);
13780
13916
  };
13781
13917
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13782
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-FWVD656I.js");
13918
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-L3V7JTMG.js");
13783
13919
  return setDialogExtraReferencesAction(args, thunkApi);
13784
13920
  };
13785
13921
  var runHandleSendMessageAction = async (args, thunkApi) => {
13786
- const { handleSendMessageAction } = await import("./handleSendMessageAction-SPGAO47U.js");
13922
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-EQ3U6K5N.js");
13787
13923
  return handleSendMessageAction(args, thunkApi);
13788
13924
  };
13789
13925
  function clearDialogState() {
@@ -13796,7 +13932,7 @@ var createPageAndAddReference = createAsyncThunk(
13796
13932
  async (payload, { dispatch, getState, rejectWithValue }) => {
13797
13933
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13798
13934
  try {
13799
- const { createDocState } = await import("./docStore-ARTZTJRA.js");
13935
+ const { createDocState } = await import("./docStore-PM5PYKPZ.js");
13800
13936
  const pageKey = await createDocState(
13801
13937
  { slateData, title },
13802
13938
  { dispatch, getState }
@@ -13966,18 +14102,23 @@ export {
13966
14102
  uiAskChoiceFunc,
13967
14103
  parseUiAskChoiceContent,
13968
14104
  API_REPORTED_COST_MULTIPLIER,
14105
+ estimateMessagesTokens,
14106
+ historyTokensBeforeLatestAssistant,
14107
+ resolveOccupancy,
14108
+ resolveOccupancyWindow,
14109
+ resolveAgentContextWindow,
13969
14110
  runtime_default,
13970
14111
  toolResultNeedsUserConfirmation,
13971
14112
  isAssistantToolStub,
13972
14113
  fetchAndCacheMessages,
14114
+ resolveBuiltinPlatformAgentConfig,
14115
+ resolveBuiltinPlatformAgentRecord,
14116
+ applyBuiltinAgentRuntimeOverride,
13973
14117
  toast,
13974
14118
  buildDatabaseFileContentUrl,
13975
14119
  normalizeAppRouteId,
13976
14120
  PERSONALIZATION_DIALOG_CATEGORY,
13977
14121
  buildPersonalizationDialogPolicyContext,
13978
- resolveBuiltinPlatformAgentConfig,
13979
- resolveBuiltinPlatformAgentRecord,
13980
- applyBuiltinAgentRuntimeOverride,
13981
14122
  resolveDialogRuntimeAgentKey,
13982
14123
  resolveHandleSendMessageContext,
13983
14124
  estimateMissingUsage,