@arbidocs/react 0.4.131 → 0.4.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/artifacts/index.cjs +55 -56
  2. package/dist/artifacts/index.cjs.map +1 -1
  3. package/dist/artifacts/index.js +4 -6
  4. package/dist/artifacts/index.js.map +1 -1
  5. package/dist/{chunk-XV7EOUQM.js → chunk-3TISH7QU.js} +9 -4
  6. package/dist/chunk-3TISH7QU.js.map +1 -0
  7. package/dist/{chunk-BOJHNPNJ.cjs → chunk-6PPWZILQ.cjs} +16 -11
  8. package/dist/chunk-6PPWZILQ.cjs.map +1 -0
  9. package/dist/{chunk-BUFDJCDS.js → chunk-CPPBN2JB.js} +9 -7
  10. package/dist/chunk-CPPBN2JB.js.map +1 -0
  11. package/dist/{chunk-G6FHNURH.js → chunk-NNWMHMEC.js} +60 -3
  12. package/dist/chunk-NNWMHMEC.js.map +1 -0
  13. package/dist/{chunk-6AWF4HFU.js → chunk-PPRKQK4P.js} +16 -11
  14. package/dist/chunk-PPRKQK4P.js.map +1 -0
  15. package/dist/{chunk-XIDDXD5Y.cjs → chunk-R2MF7YCW.cjs} +9 -7
  16. package/dist/chunk-R2MF7YCW.cjs.map +1 -0
  17. package/dist/{chunk-S7J5SCTZ.cjs → chunk-TYUQFRHF.cjs} +4 -4
  18. package/dist/{chunk-S7J5SCTZ.cjs.map → chunk-TYUQFRHF.cjs.map} +1 -1
  19. package/dist/{chunk-UN3AZUXX.cjs → chunk-UTZZMUHI.cjs} +34 -29
  20. package/dist/chunk-UTZZMUHI.cjs.map +1 -0
  21. package/dist/{chunk-6JSXDLIQ.js → chunk-ZJ6NQ4M4.js} +3 -3
  22. package/dist/{chunk-6JSXDLIQ.js.map → chunk-ZJ6NQ4M4.js.map} +1 -1
  23. package/dist/{chunk-5DCRIWCA.cjs → chunk-ZWFMFOGP.cjs} +68 -2
  24. package/dist/chunk-ZWFMFOGP.cjs.map +1 -0
  25. package/dist/document-tools/index.cjs +26 -27
  26. package/dist/document-tools/index.cjs.map +1 -1
  27. package/dist/document-tools/index.js +4 -5
  28. package/dist/document-tools/index.js.map +1 -1
  29. package/dist/{index-C7OqcKY3.d.cts → index-D8NvRj3J.d.cts} +16 -7
  30. package/dist/{index-C7OqcKY3.d.ts → index-D8NvRj3J.d.ts} +16 -7
  31. package/dist/index.cjs +352 -223
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +148 -23
  34. package/dist/index.d.ts +148 -23
  35. package/dist/index.js +157 -37
  36. package/dist/index.js.map +1 -1
  37. package/dist/shell/index.cjs +10 -6
  38. package/dist/shell/index.d.cts +1 -1
  39. package/dist/shell/index.d.ts +1 -1
  40. package/dist/shell/index.js +1 -1
  41. package/dist/viewers/index.cjs +2 -2
  42. package/dist/viewers/index.js +1 -1
  43. package/package.json +3 -3
  44. package/dist/chunk-5DCRIWCA.cjs.map +0 -1
  45. package/dist/chunk-6AWF4HFU.js.map +0 -1
  46. package/dist/chunk-74UTKIWQ.js +0 -62
  47. package/dist/chunk-74UTKIWQ.js.map +0 -1
  48. package/dist/chunk-BOJHNPNJ.cjs.map +0 -1
  49. package/dist/chunk-BUFDJCDS.js.map +0 -1
  50. package/dist/chunk-G6FHNURH.js.map +0 -1
  51. package/dist/chunk-NUFEZBA5.cjs +0 -72
  52. package/dist/chunk-NUFEZBA5.cjs.map +0 -1
  53. package/dist/chunk-UN3AZUXX.cjs.map +0 -1
  54. package/dist/chunk-XIDDXD5Y.cjs.map +0 -1
  55. package/dist/chunk-XV7EOUQM.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkUN3AZUXX_cjs = require('./chunk-UN3AZUXX.cjs');
4
- var chunkS7J5SCTZ_cjs = require('./chunk-S7J5SCTZ.cjs');
5
- var chunk5DCRIWCA_cjs = require('./chunk-5DCRIWCA.cjs');
6
- var chunkBOJHNPNJ_cjs = require('./chunk-BOJHNPNJ.cjs');
3
+ var chunkUTZZMUHI_cjs = require('./chunk-UTZZMUHI.cjs');
4
+ var chunkTYUQFRHF_cjs = require('./chunk-TYUQFRHF.cjs');
5
+ var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
6
+ require('./chunk-VOFNX4P6.cjs');
7
+ var chunk6PPWZILQ_cjs = require('./chunk-6PPWZILQ.cjs');
7
8
  var chunk65WT5PHA_cjs = require('./chunk-65WT5PHA.cjs');
8
9
  var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
9
10
  var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
@@ -12,7 +13,7 @@ var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
12
13
  var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
13
14
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
14
15
  var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
15
- var chunkXIDDXD5Y_cjs = require('./chunk-XIDDXD5Y.cjs');
16
+ var chunkR2MF7YCW_cjs = require('./chunk-R2MF7YCW.cjs');
16
17
  var React = require('react');
17
18
  var reactQuery = require('@tanstack/react-query');
18
19
  var browser = require('@arbidocs/sdk/browser');
@@ -35,45 +36,45 @@ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
35
36
  var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
36
37
 
37
38
  function useUpdateConversation() {
38
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
39
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
39
40
  const qc = reactQuery.useQueryClient();
40
41
  return reactQuery.useMutation({
41
42
  mutationFn: ({
42
43
  conversationId,
43
44
  patch
44
45
  }) => arbi.conversations.update(conversationId, patch),
45
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
46
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
46
47
  });
47
48
  }
48
49
  function useCreateWork() {
49
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
50
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
50
51
  const qc = reactQuery.useQueryClient();
51
52
  return reactQuery.useMutation({
52
53
  mutationFn: (body) => arbi.conversations.createWork(body),
53
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
54
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
54
55
  });
55
56
  }
56
57
  function useRunConversation() {
57
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
58
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
58
59
  const qc = reactQuery.useQueryClient();
59
60
  return reactQuery.useMutation({
60
61
  mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
61
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
62
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
62
63
  });
63
64
  }
64
65
  function useActOnStep() {
65
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
66
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
66
67
  const qc = reactQuery.useQueryClient();
67
68
  return reactQuery.useMutation({
68
69
  mutationFn: ({
69
70
  conversationId,
70
71
  body
71
72
  }) => arbi.conversations.actOnStep(conversationId, body),
72
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
73
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
73
74
  });
74
75
  }
75
76
  function useSendBackStep() {
76
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
77
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
77
78
  const qc = reactQuery.useQueryClient();
78
79
  return reactQuery.useMutation({
79
80
  mutationFn: ({
@@ -82,106 +83,130 @@ function useSendBackStep() {
82
83
  to,
83
84
  note
84
85
  }) => arbi.conversations.sendBackStep(conversationId, step, { to, note }),
85
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
86
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
86
87
  });
87
88
  }
88
89
  function usePlanWork() {
89
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
90
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
90
91
  return reactQuery.useMutation({
91
92
  mutationFn: (body) => arbi.conversations.plan(body)
92
93
  });
93
94
  }
94
95
  function useConversationPendingAuth(conversationId, options) {
95
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
96
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
96
97
  return reactQuery.useQuery({
97
- queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
98
+ queryKey: [...chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
98
99
  queryFn: () => arbi.conversations.pendingAuth(conversationId),
99
100
  enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
100
101
  retry: false
101
102
  });
102
103
  }
103
104
  function useConversationActivity(conversationId, options) {
104
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
105
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
105
106
  return reactQuery.useQuery({
106
- queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
107
+ queryKey: [...chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
107
108
  queryFn: () => arbi.conversations.activity(conversationId),
108
109
  enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
109
110
  refetchInterval: options?.live ? 2500 : false
110
111
  });
111
112
  }
112
113
  function useWorkflows(options) {
113
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
114
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
114
115
  return reactQuery.useQuery({
115
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows(),
116
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workflows(),
116
117
  queryFn: () => arbi.workflows.list(),
117
118
  refetchInterval: options?.live ? 15e3 : false,
118
119
  enabled: options?.enabled ?? arbi.isLoggedIn
119
120
  });
120
121
  }
121
122
  function useCreateWorkflow() {
122
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
123
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
123
124
  const qc = reactQuery.useQueryClient();
124
125
  return reactQuery.useMutation({
125
126
  mutationFn: (body) => arbi.workflows.create(body),
126
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
127
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workflows() })
127
128
  });
128
129
  }
129
130
  function useUpdateWorkflow() {
130
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
131
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
131
132
  const qc = reactQuery.useQueryClient();
132
133
  return reactQuery.useMutation({
133
134
  mutationFn: ({
134
135
  workflowId,
135
136
  patch
136
137
  }) => arbi.workflows.update(workflowId, patch),
137
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
138
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workflows() })
138
139
  });
139
140
  }
140
141
  function useDeleteWorkflow() {
141
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
142
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
142
143
  const qc = reactQuery.useQueryClient();
143
144
  return reactQuery.useMutation({
144
145
  mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
145
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
146
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workflows() })
146
147
  });
147
148
  }
148
149
  function useRunWorkflow() {
149
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
150
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
150
151
  const qc = reactQuery.useQueryClient();
151
152
  return reactQuery.useMutation({
152
153
  mutationFn: (workflowId) => arbi.workflows.run(workflowId),
153
154
  onSuccess: () => Promise.all([
154
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() }),
155
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
155
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workflows() }),
156
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
156
157
  ])
157
158
  });
158
159
  }
159
160
  function useCreateAgent() {
160
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
161
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
161
162
  const qc = reactQuery.useQueryClient();
162
163
  return reactQuery.useMutation({
163
164
  mutationFn: (name) => arbi.agents.create(name),
164
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agents() })
165
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agents() })
166
+ });
167
+ }
168
+ function useGenerateAgentAvatar() {
169
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
170
+ const qc = reactQuery.useQueryClient();
171
+ return reactQuery.useMutation({
172
+ mutationFn: ({ agentExtId, prompt }) => arbi.agents.generateAvatar(agentExtId, prompt),
173
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agents() })
174
+ });
175
+ }
176
+ function useAuthorizeLimits(options) {
177
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
178
+ return reactQuery.useQuery({
179
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.authorizeLimits(),
180
+ queryFn: () => arbi.agents.authorizeLimits(),
181
+ enabled: (options?.enabled ?? true) && arbi.isLoggedIn
182
+ });
183
+ }
184
+ function useMcpTools(options) {
185
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
186
+ return reactQuery.useQuery({
187
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.mcpTools(),
188
+ queryFn: () => arbi.health.mcpTools(),
189
+ enabled: (options?.enabled ?? true) && arbi.isLoggedIn
165
190
  });
166
191
  }
167
192
  function useAgentConfig(agentExtId, options) {
168
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
193
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
169
194
  return reactQuery.useQuery({
170
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentConfig(agentExtId),
195
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentConfig(agentExtId),
171
196
  queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
172
197
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
173
198
  });
174
199
  }
175
200
  function useAgentModels(options) {
176
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
201
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
177
202
  return reactQuery.useQuery({
178
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.models(),
203
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.models(),
179
204
  queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
180
205
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
181
206
  });
182
207
  }
183
208
  function useSaveAgentConfig() {
184
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
209
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
185
210
  const qc = reactQuery.useQueryClient();
186
211
  return reactQuery.useMutation({
187
212
  mutationFn: async ({ agentExtId, title, sections }) => {
@@ -198,23 +223,23 @@ function useSaveAgentConfig() {
198
223
  });
199
224
  },
200
225
  onSuccess: (_saved, { agentExtId }) => Promise.all([
201
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.configs() }),
202
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
226
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.configs() }),
227
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
203
228
  // The agent list shows the pinned persona/model, so it refreshes too.
204
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agents() })
229
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agents() })
205
230
  ])
206
231
  });
207
232
  }
208
233
  function useAgentWorkspaces(agentExtId, options) {
209
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
234
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
210
235
  return reactQuery.useQuery({
211
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
236
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
212
237
  queryFn: () => arbi.agents.listWorkspaces(agentExtId),
213
238
  enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
214
239
  });
215
240
  }
216
241
  function useGrantAgentAccess() {
217
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
242
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
218
243
  const qc = reactQuery.useQueryClient();
219
244
  return reactQuery.useMutation({
220
245
  mutationFn: async ({
@@ -229,11 +254,11 @@ function useGrantAgentAccess() {
229
254
  if (!agent?.email) throw new Error("The agent's address is unknown.");
230
255
  return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
231
256
  },
232
- onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
257
+ onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
233
258
  });
234
259
  }
235
260
  function useRevokeAgentAccess() {
236
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
261
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
237
262
  const qc = reactQuery.useQueryClient();
238
263
  return reactQuery.useMutation({
239
264
  mutationFn: async ({
@@ -248,13 +273,13 @@ function useRevokeAgentAccess() {
248
273
  if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
249
274
  }
250
275
  },
251
- onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
276
+ onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
252
277
  });
253
278
  }
254
279
  function useSkills(options) {
255
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
280
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
256
281
  return reactQuery.useQuery({
257
- queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
282
+ queryKey: [...chunkUTZZMUHI_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
258
283
  queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
259
284
  refetchInterval: options?.live ? 5e3 : false,
260
285
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
@@ -262,7 +287,7 @@ function useSkills(options) {
262
287
  });
263
288
  }
264
289
  function useUploadSkillFiles() {
265
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
290
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
266
291
  const qc = reactQuery.useQueryClient();
267
292
  return reactQuery.useMutation({
268
293
  mutationFn: async (entries) => {
@@ -285,11 +310,11 @@ function useUploadSkillFiles() {
285
310
  }
286
311
  return results;
287
312
  },
288
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.skills() })
313
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.skills() })
289
314
  });
290
315
  }
291
316
  function useStartWorkQuery() {
292
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
317
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
293
318
  const qc = reactQuery.useQueryClient();
294
319
  return reactQuery.useMutation({
295
320
  mutationFn: async ({
@@ -312,41 +337,51 @@ function useStartWorkQuery() {
312
337
  `The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
313
338
  );
314
339
  },
315
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
340
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.allConversations() })
316
341
  });
317
342
  }
318
343
  function useAgentSession(agentId, options) {
319
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
344
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
320
345
  return reactQuery.useQuery({
321
- queryKey: ["arbi", "agent-session", agentId],
346
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentSession(agentId ?? ""),
322
347
  queryFn: () => arbi.agents.getSession(agentId),
323
348
  enabled: !!agentId && arbi.isLoggedIn && (options?.enabled ?? true),
324
349
  refetchInterval: 5e3
325
350
  });
326
351
  }
327
352
  function useAgentChats(agentId) {
328
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
353
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
329
354
  return reactQuery.useQuery({
330
- queryKey: ["arbi", "agent-chats", agentId],
355
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.agentChats(agentId ?? ""),
331
356
  queryFn: () => arbi.agents.listChats(agentId),
332
357
  enabled: !!agentId && arbi.isLoggedIn,
333
358
  refetchInterval: 5e3
334
359
  });
335
360
  }
361
+ function refreshAgentSession(qc, agentId) {
362
+ return Promise.all(
363
+ [
364
+ chunkUTZZMUHI_cjs.arbiQueryKeys.agentSession(agentId),
365
+ chunkUTZZMUHI_cjs.arbiQueryKeys.agentWorkspaces(agentId),
366
+ chunkUTZZMUHI_cjs.arbiQueryKeys.agentChats(agentId),
367
+ chunkUTZZMUHI_cjs.arbiQueryKeys.sessions()
368
+ ].map((queryKey) => qc.invalidateQueries({ queryKey }))
369
+ );
370
+ }
336
371
  function useStartAgentSession() {
337
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
338
- const cache = reactQuery.useQueryClient();
372
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
373
+ const qc = reactQuery.useQueryClient();
339
374
  return reactQuery.useMutation({
340
375
  mutationFn: ({ agentId, workspaceId }) => arbi.agents.startSession(agentId, workspaceId),
341
- onSuccess: () => cache.invalidateQueries({ queryKey: ["arbi", "agent-session"] })
376
+ onSuccess: (_session, { agentId }) => refreshAgentSession(qc, agentId)
342
377
  });
343
378
  }
344
379
  function useCloseAgentSession() {
345
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
346
- const cache = reactQuery.useQueryClient();
380
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
381
+ const qc = reactQuery.useQueryClient();
347
382
  return reactQuery.useMutation({
348
383
  mutationFn: (agentId) => arbi.agents.closeSession(agentId),
349
- onSuccess: () => cache.invalidateQueries({ queryKey: ["arbi", "agent-session"] })
384
+ onSuccess: (_result, agentId) => refreshAgentSession(qc, agentId)
350
385
  });
351
386
  }
352
387
  function previewText(content) {
@@ -475,9 +510,9 @@ function useArbiChat(options = {}) {
475
510
  });
476
511
  const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
477
512
  const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
478
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
479
- const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkUN3AZUXX_cjs.useDocuments(workspaceId);
480
- const ordinaryHistory = chunkUN3AZUXX_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
513
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
514
+ const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkUTZZMUHI_cjs.useDocuments(workspaceId);
515
+ const ordinaryHistory = chunkUTZZMUHI_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
481
516
  const agentHistory = useAgentChats(agentId);
482
517
  const stored = React.useMemo(
483
518
  () => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
@@ -492,7 +527,7 @@ function useArbiChat(options = {}) {
492
527
  );
493
528
  const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
494
529
  const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
495
- const query = chunkUN3AZUXX_cjs.useAssistantQuery();
530
+ const query = chunkUTZZMUHI_cjs.useAssistantQuery();
496
531
  const { mutateAsync } = query;
497
532
  const [stagedFiles, setStagedFiles] = React.useState([]);
498
533
  const [threads, setThreads] = React.useState(() => [emptyThread()]);
@@ -552,7 +587,7 @@ function useArbiChat(options = {}) {
552
587
  (conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
553
588
  ) || active.messages.some((message) => message.status === "streaming");
554
589
  const needsLoad = !!active.conversationId && !active.isLoaded;
555
- const loaded = chunkUN3AZUXX_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
590
+ const loaded = chunkUTZZMUHI_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
556
591
  enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
557
592
  live: liveHistory
558
593
  });
@@ -1221,7 +1256,7 @@ function useArbiWsContext() {
1221
1256
  return ctx;
1222
1257
  }
1223
1258
  function ArbiWebSocketProvider({ enabled = true, children }) {
1224
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1259
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1225
1260
  const subscribersRef = React.useRef(/* @__PURE__ */ new Set());
1226
1261
  const setStatus = useArbiWsStore((s) => s.setStatus);
1227
1262
  const applyTaskUpdate = useArbiWsStore((s) => s.applyTaskUpdate);
@@ -1333,14 +1368,14 @@ function useArbiDocumentSync(workspaceId) {
1333
1368
  if (!workspaceId) return;
1334
1369
  if (client.isMessageType(msg, "batch_complete")) {
1335
1370
  if (msg.workspace_ext_id !== workspaceId) return;
1336
- void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
1337
- void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tags(workspaceId) });
1371
+ void queryClient.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.documents(workspaceId) });
1372
+ void queryClient.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.tags(workspaceId) });
1338
1373
  return;
1339
1374
  }
1340
1375
  if (client.isMessageType(msg, "task_update")) {
1341
1376
  if (msg.workspace_ext_id !== workspaceId) return;
1342
1377
  if (TERMINAL_STATUSES.has(msg.status)) {
1343
- void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
1378
+ void queryClient.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.documents(workspaceId) });
1344
1379
  }
1345
1380
  }
1346
1381
  });
@@ -1468,8 +1503,8 @@ function useShellWorkspaces(options) {
1468
1503
  };
1469
1504
  }
1470
1505
  function useArbiShellWorkspaces(options = {}) {
1471
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1472
- const query = chunkUN3AZUXX_cjs.useWorkspaces();
1506
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1507
+ const query = chunkUTZZMUHI_cjs.useWorkspaces();
1473
1508
  const { select, ...rest } = options;
1474
1509
  const defaultSelect = React.useCallback(
1475
1510
  (workspace) => arbi.selectWorkspace(workspace.id),
@@ -1485,12 +1520,12 @@ function useArbiShellWorkspaces(options = {}) {
1485
1520
  }
1486
1521
  function invalidateTagData(qc, workspaceId) {
1487
1522
  return Promise.all([
1488
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tags(workspaceId) }),
1489
- qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.facts(workspaceId) })
1523
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.tags(workspaceId) }),
1524
+ qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.facts(workspaceId) })
1490
1525
  ]);
1491
1526
  }
1492
1527
  function useInvalidateTagData() {
1493
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1528
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1494
1529
  const qc = reactQuery.useQueryClient();
1495
1530
  return React.useCallback(() => {
1496
1531
  const workspaceId = arbi.getWorkspaceId();
@@ -1498,16 +1533,16 @@ function useInvalidateTagData() {
1498
1533
  }, [arbi, qc]);
1499
1534
  }
1500
1535
  function useTagKindSchema(kind, options) {
1501
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1536
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1502
1537
  const workspaceId = arbi.getWorkspaceId() ?? "";
1503
1538
  return reactQuery.useQuery({
1504
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
1539
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
1505
1540
  queryFn: () => arbi.tagKinds.get(kind),
1506
1541
  enabled: (options?.enabled ?? true) && !!kind && !!workspaceId && arbi.hasWorkspace
1507
1542
  });
1508
1543
  }
1509
1544
  function useUpdateTagKindSchema() {
1510
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1545
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1511
1546
  const qc = reactQuery.useQueryClient();
1512
1547
  return reactQuery.useMutation({
1513
1548
  mutationFn: ({
@@ -1517,13 +1552,13 @@ function useUpdateTagKindSchema() {
1517
1552
  onSuccess: (schema) => {
1518
1553
  const workspaceId = arbi.getWorkspaceId();
1519
1554
  if (!workspaceId) return;
1520
- qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
1555
+ qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
1521
1556
  return invalidateTagData(qc, workspaceId);
1522
1557
  }
1523
1558
  });
1524
1559
  }
1525
1560
  function useSetTagValues() {
1526
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1561
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1527
1562
  const qc = reactQuery.useQueryClient();
1528
1563
  return reactQuery.useMutation({
1529
1564
  mutationFn: ({
@@ -1534,29 +1569,29 @@ function useSetTagValues() {
1534
1569
  });
1535
1570
  }
1536
1571
  function useFilteredProjects(filters, options) {
1537
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1572
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1538
1573
  return reactQuery.useQuery({
1539
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
1574
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
1540
1575
  queryFn: () => arbi.projects.list(filters),
1541
1576
  enabled: options?.enabled ?? arbi.isLoggedIn
1542
1577
  });
1543
1578
  }
1544
1579
  function useUpdateProjectFields() {
1545
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1580
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1546
1581
  const qc = reactQuery.useQueryClient();
1547
1582
  return reactQuery.useMutation({
1548
1583
  mutationFn: ({
1549
1584
  projectExtId,
1550
1585
  patch
1551
1586
  }) => arbi.projects.update(projectExtId, patch),
1552
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projects() })
1587
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.projects() })
1553
1588
  });
1554
1589
  }
1555
1590
  function useProjectEvents(projectExtId, options) {
1556
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1591
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1557
1592
  return reactQuery.useQuery({
1558
1593
  queryKey: [
1559
- ...chunkUN3AZUXX_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
1594
+ ...chunkUTZZMUHI_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
1560
1595
  options?.kind ?? "all",
1561
1596
  options?.limit ?? "default"
1562
1597
  ],
@@ -1565,26 +1600,26 @@ function useProjectEvents(projectExtId, options) {
1565
1600
  });
1566
1601
  }
1567
1602
  function useConversationUsage(conversationId, options) {
1568
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1603
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1569
1604
  return reactQuery.useQuery({
1570
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
1605
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
1571
1606
  queryFn: () => arbi.conversations.usage(conversationId),
1572
1607
  enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
1573
1608
  refetchInterval: options?.live ? 1e4 : false
1574
1609
  });
1575
1610
  }
1576
1611
  function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
1577
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1612
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1578
1613
  return reactQuery.useQuery({
1579
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
1614
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
1580
1615
  queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
1581
1616
  enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
1582
1617
  });
1583
1618
  }
1584
1619
  function useContacts(options) {
1585
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1620
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1586
1621
  return reactQuery.useQuery({
1587
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts(),
1622
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.contacts(),
1588
1623
  queryFn: () => arbi.contacts.list(),
1589
1624
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
1590
1625
  });
@@ -1599,10 +1634,10 @@ function usePendingContacts(options) {
1599
1634
  }
1600
1635
  function useInvalidateContacts() {
1601
1636
  const qc = reactQuery.useQueryClient();
1602
- return () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts() });
1637
+ return () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.contacts() });
1603
1638
  }
1604
1639
  function useInviteContacts() {
1605
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1640
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1606
1641
  const invalidate = useInvalidateContacts();
1607
1642
  return reactQuery.useMutation({
1608
1643
  mutationFn: (emails) => arbi.contacts.invite(emails),
@@ -1610,7 +1645,7 @@ function useInviteContacts() {
1610
1645
  });
1611
1646
  }
1612
1647
  function useCreateContact() {
1613
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1648
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1614
1649
  const invalidate = useInvalidateContacts();
1615
1650
  return reactQuery.useMutation({
1616
1651
  mutationFn: (body) => arbi.contacts.create(body),
@@ -1618,7 +1653,7 @@ function useCreateContact() {
1618
1653
  });
1619
1654
  }
1620
1655
  function useUpdateContact() {
1621
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1656
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1622
1657
  const invalidate = useInvalidateContacts();
1623
1658
  return reactQuery.useMutation({
1624
1659
  mutationFn: ({ id, card }) => arbi.contacts.update(id, card),
@@ -1626,7 +1661,7 @@ function useUpdateContact() {
1626
1661
  });
1627
1662
  }
1628
1663
  function useDeleteContact() {
1629
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
1664
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
1630
1665
  const invalidate = useInvalidateContacts();
1631
1666
  return reactQuery.useMutation({
1632
1667
  mutationFn: (contactId) => arbi.contacts.delete(contactId),
@@ -1710,7 +1745,7 @@ function AccountClientProvider({
1710
1745
  }
1711
1746
  function useAccountClient() {
1712
1747
  const provided = React.useContext(AccountClientContext);
1713
- const arbi = React.useContext(chunkXIDDXD5Y_cjs.ArbiContext);
1748
+ const arbi = React.useContext(chunkR2MF7YCW_cjs.ArbiContext);
1714
1749
  const fallback = React.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
1715
1750
  if (provided) return provided;
1716
1751
  if (!arbi || !fallback) return NO_ACCOUNT;
@@ -1728,11 +1763,11 @@ function useProfile(options) {
1728
1763
  const { client, enabled } = useAccountClient();
1729
1764
  const qc = reactQuery.useQueryClient();
1730
1765
  React.useEffect(
1731
- () => client.onProfileChange(() => qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), client.profile())),
1766
+ () => client.onProfileChange(() => qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.profile(), client.profile())),
1732
1767
  [client, qc]
1733
1768
  );
1734
1769
  return reactQuery.useQuery({
1735
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile(),
1770
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.profile(),
1736
1771
  queryFn: () => client.profile(),
1737
1772
  enabled: (options?.enabled ?? true) && enabled,
1738
1773
  staleTime: Infinity
@@ -1747,9 +1782,9 @@ function useUpdateProfile() {
1747
1782
  return client.profile();
1748
1783
  },
1749
1784
  onSuccess: (profile) => {
1750
- qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), profile);
1751
- void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.identity() });
1752
- return qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workspaces() });
1785
+ qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.profile(), profile);
1786
+ void qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.identity() });
1787
+ return qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workspaces() });
1753
1788
  }
1754
1789
  });
1755
1790
  }
@@ -1832,7 +1867,7 @@ function useConfirmEmailChange() {
1832
1867
  const qc = reactQuery.useQueryClient();
1833
1868
  return reactQuery.useMutation({
1834
1869
  mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
1835
- onSuccess: () => qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), client.profile())
1870
+ onSuccess: () => qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.profile(), client.profile())
1836
1871
  });
1837
1872
  }
1838
1873
  function useEmailChange({
@@ -1998,33 +2033,33 @@ function toNotificationPreferences(stored, keys) {
1998
2033
  };
1999
2034
  }
2000
2035
  function useUserSettings(options) {
2001
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
2036
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
2002
2037
  return reactQuery.useQuery({
2003
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
2038
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings(),
2004
2039
  queryFn: () => arbi.settings.get(),
2005
2040
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
2006
2041
  });
2007
2042
  }
2008
2043
  function useNotificationPreferences(keys, options) {
2009
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
2044
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
2010
2045
  const qc = reactQuery.useQueryClient();
2011
2046
  const settings = useUserSettings(options);
2012
2047
  const stored = settings.data?.email_notifications;
2013
2048
  const save = reactQuery.useMutation({
2014
2049
  mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
2015
2050
  onMutate: async (patch) => {
2016
- await qc.cancelQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() });
2017
- const previous = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings());
2051
+ await qc.cancelQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings() });
2052
+ const previous = qc.getQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings());
2018
2053
  qc.setQueryData(
2019
- chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
2054
+ chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings(),
2020
2055
  (old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
2021
2056
  );
2022
2057
  return { previous };
2023
2058
  },
2024
2059
  onError: (_err, _patch, context) => {
2025
- qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(), context?.previous);
2060
+ qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings(), context?.previous);
2026
2061
  },
2027
- onSettled: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() })
2062
+ onSettled: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings() })
2028
2063
  });
2029
2064
  const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
2030
2065
  const setAll = React.useCallback(
@@ -2046,23 +2081,23 @@ function useNotificationPreferences(keys, options) {
2046
2081
  };
2047
2082
  }
2048
2083
  function useRelevanceSave() {
2049
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
2084
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
2050
2085
  const qc = reactQuery.useQueryClient();
2051
2086
  return reactQuery.useMutation({
2052
2087
  mutationFn: (patch) => arbi.settings.update(patch),
2053
2088
  onMutate: async (patch) => {
2054
- await qc.cancelQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() });
2055
- const previous = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings());
2089
+ await qc.cancelQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings() });
2090
+ const previous = qc.getQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings());
2056
2091
  qc.setQueryData(
2057
- chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
2092
+ chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings(),
2058
2093
  (old) => old ? { ...old, ...patch } : old
2059
2094
  );
2060
2095
  return { previous };
2061
2096
  },
2062
2097
  onError: (_err, _patch, context) => {
2063
- qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(), context?.previous);
2098
+ qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings(), context?.previous);
2064
2099
  },
2065
- onSettled: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() })
2100
+ onSettled: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings() })
2066
2101
  });
2067
2102
  }
2068
2103
  function useWorkspaceNotificationLevel(workspaceId, options) {
@@ -2073,7 +2108,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
2073
2108
  const setLevel = React.useCallback(
2074
2109
  (next) => {
2075
2110
  if (!workspaceId) return;
2076
- const current = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
2111
+ const current = qc.getQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
2077
2112
  save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
2078
2113
  },
2079
2114
  [qc, save, settings.data, workspaceId]
@@ -2092,12 +2127,19 @@ function useFollowThread(conversationId, options) {
2092
2127
  const save = useRelevanceSave();
2093
2128
  const following = !!conversationId && !!settings.data?.followed_threads?.includes(conversationId);
2094
2129
  const setFollowing = React.useCallback(
2095
- (on) => {
2130
+ (on, callbacks) => {
2096
2131
  if (!conversationId) return;
2097
- const current = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
2098
- save.mutate({
2099
- followed_threads: browser.settings.withMembership(current?.followed_threads, conversationId, on)
2100
- });
2132
+ const current = qc.getQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
2133
+ save.mutate(
2134
+ {
2135
+ followed_threads: browser.settings.withMembership(
2136
+ current?.followed_threads,
2137
+ conversationId,
2138
+ on
2139
+ )
2140
+ },
2141
+ callbacks
2142
+ );
2101
2143
  },
2102
2144
  [qc, save, settings.data, conversationId]
2103
2145
  );
@@ -2112,7 +2154,7 @@ function useFollowThread(conversationId, options) {
2112
2154
  function useSessions(options) {
2113
2155
  const { client, enabled } = useAccountClient();
2114
2156
  return reactQuery.useQuery({
2115
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.sessions(),
2157
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.sessions(),
2116
2158
  queryFn: () => client.listSessions(),
2117
2159
  enabled: (options?.enabled ?? true) && enabled
2118
2160
  });
@@ -2122,7 +2164,7 @@ function useTerminateSession() {
2122
2164
  const qc = reactQuery.useQueryClient();
2123
2165
  return reactQuery.useMutation({
2124
2166
  mutationFn: (sessionId) => client.terminateSession(sessionId),
2125
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.sessions() })
2167
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.sessions() })
2126
2168
  });
2127
2169
  }
2128
2170
  function useSignOut() {
@@ -2265,7 +2307,7 @@ function useIdentityVerificationFlow(api, {
2265
2307
  const apiRef = React.useRef(api);
2266
2308
  apiRef.current = api;
2267
2309
  const query = reactQuery.useQuery({
2268
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.identity(),
2310
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.identity(),
2269
2311
  queryFn: () => apiRef.current.status(),
2270
2312
  enabled,
2271
2313
  staleTime: 6e4
@@ -2283,7 +2325,7 @@ function useIdentityVerificationFlow(api, {
2283
2325
  const lastVerified = React.useRef(void 0);
2284
2326
  const apply = React.useCallback(
2285
2327
  (next) => {
2286
- qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.identity(), next);
2328
+ qc.setQueryData(chunkUTZZMUHI_cjs.arbiQueryKeys.identity(), next);
2287
2329
  if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
2288
2330
  onVerifiedChange?.(next.verified);
2289
2331
  }
@@ -2478,12 +2520,12 @@ function useIdentityVerification(options = {}) {
2478
2520
  enabled,
2479
2521
  formatPrice,
2480
2522
  onVerifiedChange: (verified) => {
2481
- void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile() });
2523
+ void qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.profile() });
2482
2524
  onVerifiedChange?.(verified);
2483
2525
  },
2484
2526
  onNameAccepted: (name) => {
2485
- void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile() });
2486
- void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workspaces() });
2527
+ void qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.profile() });
2528
+ void qc.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.workspaces() });
2487
2529
  onNameAccepted?.(name);
2488
2530
  }
2489
2531
  });
@@ -2493,7 +2535,7 @@ async function downloadRecoveryFile(params) {
2493
2535
  ...params,
2494
2536
  origin: params.origin ?? window.location.origin
2495
2537
  });
2496
- chunkS7J5SCTZ_cjs.downloadBlob(new Blob([file.html], { type: "text/html" }), file.filename);
2538
+ chunkTYUQFRHF_cjs.downloadBlob(new Blob([file.html], { type: "text/html" }), file.filename);
2497
2539
  }
2498
2540
 
2499
2541
  // src/mail/client.ts
@@ -2603,7 +2645,7 @@ function MailClientProvider({
2603
2645
  }
2604
2646
  function useMailClient() {
2605
2647
  const provided = React.useContext(MailClientContext);
2606
- const arbi = React.useContext(chunkXIDDXD5Y_cjs.ArbiContext);
2648
+ const arbi = React.useContext(chunkR2MF7YCW_cjs.ArbiContext);
2607
2649
  const fallback = React.useMemo(() => arbi ? arbiMailClient(arbi) : null, [arbi]);
2608
2650
  if (provided) return provided;
2609
2651
  if (!arbi || !fallback) return NO_MAIL;
@@ -2901,7 +2943,7 @@ function useMailDraftReplaced(draftId, onReplaced) {
2901
2943
  }, [draftId]);
2902
2944
  }
2903
2945
  function useWorkspaceDocs(workspaceId) {
2904
- const { data: docs = [], isLoading, isError } = chunkUN3AZUXX_cjs.useDocuments(workspaceId);
2946
+ const { data: docs = [], isLoading, isError } = chunkUTZZMUHI_cjs.useDocuments(workspaceId);
2905
2947
  const docIds = React.useMemo(
2906
2948
  () => docs.map((d) => d.external_id).filter((id) => !!id),
2907
2949
  [docs]
@@ -2909,7 +2951,7 @@ function useWorkspaceDocs(workspaceId) {
2909
2951
  return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
2910
2952
  }
2911
2953
  function useAiTask() {
2912
- const mutation = chunkUN3AZUXX_cjs.useAssistantQuery();
2954
+ const mutation = chunkUTZZMUHI_cjs.useAssistantQuery();
2913
2955
  const [status, setStatus] = React.useState("idle");
2914
2956
  const [text, setText] = React.useState("");
2915
2957
  const [stepCount, setStepCount] = React.useState(0);
@@ -2999,7 +3041,7 @@ function useAiTask() {
2999
3041
  };
3000
3042
  }
3001
3043
  function useSemanticSearch(docIds) {
3002
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
3044
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
3003
3045
  const [query, setQuery] = React.useState("");
3004
3046
  const mutation = reactQuery.useMutation({
3005
3047
  mutationFn: async ({ query: q, mode }) => {
@@ -3529,8 +3571,8 @@ function DocumentReview({
3529
3571
  onClose,
3530
3572
  className
3531
3573
  }) {
3532
- const parsedQuery = chunkUN3AZUXX_cjs.useParsedDocument(docId, stage);
3533
- const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
3574
+ const parsedQuery = chunkUTZZMUHI_cjs.useParsedDocument(docId, stage);
3575
+ const tagsQuery = chunkUTZZMUHI_cjs.useTags(workspaceId);
3534
3576
  const tagNameById = React__default.default.useMemo(() => {
3535
3577
  const map = /* @__PURE__ */ new Map();
3536
3578
  for (const t of tagsQuery.data ?? []) {
@@ -3761,7 +3803,7 @@ function SemanticSearch({
3761
3803
  const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
3762
3804
  const [value, setValue] = React.useState("");
3763
3805
  const [selected, setSelected] = React.useState(null);
3764
- const { data: docs = [] } = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
3806
+ const { data: docs = [] } = chunkUTZZMUHI_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
3765
3807
  const docMap = React.useMemo(() => {
3766
3808
  const map = /* @__PURE__ */ new Map();
3767
3809
  for (const d of docs) if (d.external_id) map.set(d.external_id, d);
@@ -4863,7 +4905,7 @@ function ActivityFeed({
4863
4905
  enabled,
4864
4906
  "data-testid": testId = "activity-feed"
4865
4907
  }) {
4866
- const { data, isLoading, isError } = chunkUN3AZUXX_cjs.useActivity({ limit, enabled });
4908
+ const { data, isLoading, isError } = chunkUTZZMUHI_cjs.useActivity({ limit, enabled });
4867
4909
  if (isLoading) {
4868
4910
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkS6A6FSG7_cjs.cn("space-y-2", className), "data-testid": testId, "aria-busy": "true", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 py-1.5", children: [
4869
4911
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
@@ -4913,7 +4955,7 @@ var workTypes = [
4913
4955
  "mail_draft_ready"
4914
4956
  ];
4915
4957
  function useWorkNotifications(options) {
4916
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
4958
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
4917
4959
  const queries = reactQuery.useQueryClient();
4918
4960
  const queryKey = ["work-notifications", options.apiUrl, options.userId];
4919
4961
  const query = reactQuery.useQuery({
@@ -5009,7 +5051,7 @@ function toConversation(loaded, myExtId, pending) {
5009
5051
  };
5010
5052
  }
5011
5053
  function useDirectMessages(options) {
5012
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
5054
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
5013
5055
  const queryClient = reactQuery.useQueryClient();
5014
5056
  const enabled = options?.enabled ?? arbi.isLoggedIn;
5015
5057
  const query = reactQuery.useQuery({
@@ -5021,7 +5063,7 @@ function useDirectMessages(options) {
5021
5063
  enabled
5022
5064
  });
5023
5065
  const contactsQuery = reactQuery.useQuery({
5024
- queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts(),
5066
+ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.contacts(),
5025
5067
  queryFn: () => arbi.contacts.list(),
5026
5068
  enabled
5027
5069
  });
@@ -5223,7 +5265,7 @@ function ConversationList({
5223
5265
  children: c.subtitle ?? preview
5224
5266
  }
5225
5267
  ),
5226
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunkBOJHNPNJ_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
5268
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunk6PPWZILQ_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
5227
5269
  ] })
5228
5270
  ] })
5229
5271
  ] });
@@ -5307,7 +5349,7 @@ function MessageBubble({
5307
5349
  isLastOfRun,
5308
5350
  senderName: message.isMine ? "You" : userDisplayName(message.sender),
5309
5351
  classNames,
5310
- formatTimestamp: chunkBOJHNPNJ_cjs.formatRelativeTime
5352
+ formatTimestamp: chunk6PPWZILQ_cjs.formatRelativeTime
5311
5353
  }
5312
5354
  );
5313
5355
  }
@@ -6174,12 +6216,89 @@ function CommandPaletteProvider({
6174
6216
  /* @__PURE__ */ jsxRuntime.jsx(CommandPalette, { open: isOpen, onOpenChange: setIsOpen, ...paletteProps })
6175
6217
  ] });
6176
6218
  }
6177
- var useArbiUiStore = zustand.create((set) => ({
6178
- selectedDocIds: [],
6179
- setSelectedDocIds: (ids) => set({ selectedDocIds: ids }),
6180
- viewingDocId: null,
6181
- setViewingDocId: (id) => set({ viewingDocId: id })
6182
- }));
6219
+
6220
+ // src/session/store.ts
6221
+ var EMPTY_SESSION_STATE = {
6222
+ workspaceId: null,
6223
+ conversationId: null,
6224
+ viewingDocument: null,
6225
+ selectedDocumentIds: [],
6226
+ generating: {},
6227
+ paMode: false,
6228
+ conversationDocuments: {}
6229
+ };
6230
+ var selectViewingDocumentId = (state) => state.viewingDocument ? chunkZWFMFOGP_cjs.parseVersionRef(state.viewingDocument.id).docId : null;
6231
+ var selectIsGenerating = (conversationId) => (state) => !!conversationId && !!state.generating[conversationId]?.isGenerating;
6232
+ function nextViewingDocument(current, input) {
6233
+ if (!input) return null;
6234
+ const same = current?.id === input.id;
6235
+ return {
6236
+ id: input.id,
6237
+ page: input.page !== void 0 ? input.page : same ? current?.page ?? null : null,
6238
+ passageId: input.passageId !== void 0 ? input.passageId : current?.passageId ?? null
6239
+ };
6240
+ }
6241
+ function createArbiSessionStore(initial = {}) {
6242
+ let state = { ...EMPTY_SESSION_STATE, ...initial };
6243
+ const listeners = /* @__PURE__ */ new Set();
6244
+ const update = (patch) => {
6245
+ state = { ...state, ...patch };
6246
+ listeners.forEach((listener) => listener());
6247
+ };
6248
+ return {
6249
+ getState: () => state,
6250
+ subscribe: (listener) => {
6251
+ listeners.add(listener);
6252
+ return () => listeners.delete(listener);
6253
+ },
6254
+ setWorkspaceId: (workspaceId) => {
6255
+ if (state.workspaceId !== workspaceId) update({ workspaceId });
6256
+ },
6257
+ setConversationId: (conversationId) => {
6258
+ if (state.conversationId !== conversationId) update({ conversationId });
6259
+ },
6260
+ setViewingDocument: (input) => update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),
6261
+ setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),
6262
+ setConversationGenerating: (conversationId, isGenerating) => {
6263
+ const current = state.generating[conversationId];
6264
+ update({
6265
+ generating: {
6266
+ ...state.generating,
6267
+ [conversationId]: {
6268
+ isGenerating,
6269
+ error: isGenerating ? null : current?.error ?? null,
6270
+ startTime: isGenerating ? Date.now() : null
6271
+ }
6272
+ }
6273
+ });
6274
+ },
6275
+ setPaMode: (paMode) => {
6276
+ if (state.paMode !== paMode) update({ paMode });
6277
+ },
6278
+ setConversationDocuments: (conversationId, documents) => update({
6279
+ conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents }
6280
+ })
6281
+ };
6282
+ }
6283
+ var ArbiSessionStoreContext = React.createContext(null);
6284
+ var moduleDefault = null;
6285
+ var defaultStore = () => moduleDefault ??= createArbiSessionStore();
6286
+ function ArbiSessionStateProvider({
6287
+ store,
6288
+ children
6289
+ }) {
6290
+ const enclosing = React.useContext(ArbiSessionStoreContext);
6291
+ const [own] = React.useState(createArbiSessionStore);
6292
+ return /* @__PURE__ */ jsxRuntime.jsx(ArbiSessionStoreContext.Provider, { value: store ?? enclosing ?? own, children });
6293
+ }
6294
+ function useArbiSessionStore() {
6295
+ return React.useContext(ArbiSessionStoreContext) ?? defaultStore();
6296
+ }
6297
+ function useArbiSessionState(selector) {
6298
+ const store = useArbiSessionStore();
6299
+ const select = () => selector(store.getState());
6300
+ return React.useSyncExternalStore(store.subscribe, select, select);
6301
+ }
6183
6302
  agGridCommunity.ModuleRegistry.registerModules([agGridCommunity.AllCommunityModule]);
6184
6303
  function formatBytes(bytes) {
6185
6304
  if (bytes == null || Number.isNaN(bytes)) return "\u2014";
@@ -6213,10 +6332,10 @@ function DocumentTable({
6213
6332
  extraColumns,
6214
6333
  className
6215
6334
  }) {
6216
- const query = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !documents });
6335
+ const query = chunkUTZZMUHI_cjs.useDocuments(workspaceId, { enabled: !documents });
6217
6336
  const rows = documents ?? query.data ?? [];
6218
6337
  const isLoading = !documents && query.isLoading;
6219
- const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
6338
+ const tagsQuery = chunkUTZZMUHI_cjs.useTags(workspaceId);
6220
6339
  const tagNameById = React__default.default.useMemo(() => {
6221
6340
  const map = /* @__PURE__ */ new Map();
6222
6341
  for (const t of tagsQuery.data ?? []) {
@@ -6224,19 +6343,19 @@ function DocumentTable({
6224
6343
  }
6225
6344
  return map;
6226
6345
  }, [tagsQuery.data]);
6227
- const storeSelected = useArbiUiStore((s) => s.selectedDocIds);
6228
- const storeSetSelected = useArbiUiStore((s) => s.setSelectedDocIds);
6229
- const viewingDocId = useArbiUiStore((s) => s.viewingDocId);
6230
- const setViewingDocId = useArbiUiStore((s) => s.setViewingDocId);
6346
+ const session = useArbiSessionStore();
6347
+ const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
6348
+ const storeSetSelected = session.setSelectedDocumentIds;
6349
+ const viewingDocId = useArbiSessionState(selectViewingDocumentId);
6231
6350
  const effectiveSelected = selectedIds ?? storeSelected;
6232
6351
  const emitSelection = onSelectionChange ?? storeSetSelected;
6233
6352
  const gridApiRef = React__default.default.useRef(null);
6234
6353
  const openDocument = React__default.default.useCallback(
6235
6354
  (id) => {
6236
- setViewingDocId(id);
6355
+ session.setViewingDocument({ id });
6237
6356
  onOpenDocument?.(id);
6238
6357
  },
6239
- [onOpenDocument, setViewingDocId]
6358
+ [onOpenDocument, session]
6240
6359
  );
6241
6360
  const applySelection = React__default.default.useCallback(() => {
6242
6361
  const api = gridApiRef.current;
@@ -6392,12 +6511,12 @@ function DocumentCardMenu({
6392
6511
  canDelete = true,
6393
6512
  testId = "document-card-menu"
6394
6513
  }) {
6395
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
6514
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
6396
6515
  const queryClient = reactQuery.useQueryClient();
6397
6516
  const invalidateDocuments = () => {
6398
6517
  const workspaceId = arbi.getWorkspaceId();
6399
6518
  if (workspaceId) {
6400
- void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
6519
+ void queryClient.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.documents(workspaceId) });
6401
6520
  }
6402
6521
  };
6403
6522
  const download = reactQuery.useMutation({
@@ -6496,10 +6615,10 @@ function DocumentGallery({
6496
6615
  minTileWidth = 148,
6497
6616
  className
6498
6617
  }) {
6499
- const query = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !documents });
6618
+ const query = chunkUTZZMUHI_cjs.useDocuments(workspaceId, { enabled: !documents });
6500
6619
  const rows = documents ?? query.data ?? [];
6501
6620
  const isLoading = !documents && query.isLoading;
6502
- const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
6621
+ const tagsQuery = chunkUTZZMUHI_cjs.useTags(workspaceId);
6503
6622
  const tagNameById = React__default.default.useMemo(() => {
6504
6623
  const map = /* @__PURE__ */ new Map();
6505
6624
  for (const t of tagsQuery.data ?? []) {
@@ -6511,12 +6630,12 @@ function DocumentGallery({
6511
6630
  () => rows.map((d) => d.external_id).filter((id) => !!id),
6512
6631
  [rows]
6513
6632
  );
6514
- const thumbsQuery = chunkUN3AZUXX_cjs.useThumbnails(docIds);
6633
+ const thumbsQuery = chunkUTZZMUHI_cjs.useThumbnails(docIds);
6515
6634
  const thumbs = thumbsQuery.data ?? {};
6516
- const storeSelected = useArbiUiStore((s) => s.selectedDocIds);
6517
- const storeSetSelected = useArbiUiStore((s) => s.setSelectedDocIds);
6518
- const viewingDocId = useArbiUiStore((s) => s.viewingDocId);
6519
- const setViewingDocId = useArbiUiStore((s) => s.setViewingDocId);
6635
+ const session = useArbiSessionStore();
6636
+ const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
6637
+ const storeSetSelected = session.setSelectedDocumentIds;
6638
+ const viewingDocId = useArbiSessionState(selectViewingDocumentId);
6520
6639
  const effectiveSelected = selectedIds ?? storeSelected;
6521
6640
  const emitSelection = onSelectionChange ?? storeSetSelected;
6522
6641
  const selectedSet = React__default.default.useMemo(() => new Set(effectiveSelected), [effectiveSelected]);
@@ -6531,12 +6650,12 @@ function DocumentGallery({
6531
6650
  );
6532
6651
  const openDocument = React__default.default.useCallback(
6533
6652
  (id) => {
6534
- setViewingDocId(id);
6653
+ session.setViewingDocument({ id });
6535
6654
  onOpenDocument?.(id);
6536
6655
  },
6537
- [onOpenDocument, setViewingDocId]
6656
+ [onOpenDocument, session]
6538
6657
  );
6539
- const arbi = chunkXIDDXD5Y_cjs.useArbi();
6658
+ const arbi = chunkR2MF7YCW_cjs.useArbi();
6540
6659
  const queryClient = reactQuery.useQueryClient();
6541
6660
  const [renamingId, setRenamingId] = React__default.default.useState(null);
6542
6661
  const rename = reactQuery.useMutation({
@@ -6547,7 +6666,7 @@ function DocumentGallery({
6547
6666
  setRenamingId(null);
6548
6667
  const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
6549
6668
  if (activeWorkspace) {
6550
- void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(activeWorkspace) });
6669
+ void queryClient.invalidateQueries({ queryKey: chunkUTZZMUHI_cjs.arbiQueryKeys.documents(activeWorkspace) });
6551
6670
  }
6552
6671
  }
6553
6672
  });
@@ -7165,183 +7284,183 @@ function hasVideoTrack(blob) {
7165
7284
 
7166
7285
  Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
7167
7286
  enumerable: true,
7168
- get: function () { return chunkUN3AZUXX_cjs.PROJECT_CREATION_DENIED_REASON; }
7287
+ get: function () { return chunkUTZZMUHI_cjs.PROJECT_CREATION_DENIED_REASON; }
7169
7288
  });
7170
7289
  Object.defineProperty(exports, "arbiQueryKeys", {
7171
7290
  enumerable: true,
7172
- get: function () { return chunkUN3AZUXX_cjs.arbiQueryKeys; }
7291
+ get: function () { return chunkUTZZMUHI_cjs.arbiQueryKeys; }
7173
7292
  });
7174
7293
  Object.defineProperty(exports, "isUsageMetered", {
7175
7294
  enumerable: true,
7176
- get: function () { return chunkUN3AZUXX_cjs.isUsageMetered; }
7295
+ get: function () { return chunkUTZZMUHI_cjs.isUsageMetered; }
7177
7296
  });
7178
7297
  Object.defineProperty(exports, "useActivity", {
7179
7298
  enumerable: true,
7180
- get: function () { return chunkUN3AZUXX_cjs.useActivity; }
7299
+ get: function () { return chunkUTZZMUHI_cjs.useActivity; }
7181
7300
  });
7182
7301
  Object.defineProperty(exports, "useAgents", {
7183
7302
  enumerable: true,
7184
- get: function () { return chunkUN3AZUXX_cjs.useAgents; }
7303
+ get: function () { return chunkUTZZMUHI_cjs.useAgents; }
7185
7304
  });
7186
7305
  Object.defineProperty(exports, "useAssistantQuery", {
7187
7306
  enumerable: true,
7188
- get: function () { return chunkUN3AZUXX_cjs.useAssistantQuery; }
7307
+ get: function () { return chunkUTZZMUHI_cjs.useAssistantQuery; }
7189
7308
  });
7190
7309
  Object.defineProperty(exports, "useCanCreateProjects", {
7191
7310
  enumerable: true,
7192
- get: function () { return chunkUN3AZUXX_cjs.useCanCreateProjects; }
7311
+ get: function () { return chunkUTZZMUHI_cjs.useCanCreateProjects; }
7193
7312
  });
7194
7313
  Object.defineProperty(exports, "useConfigs", {
7195
7314
  enumerable: true,
7196
- get: function () { return chunkUN3AZUXX_cjs.useConfigs; }
7315
+ get: function () { return chunkUTZZMUHI_cjs.useConfigs; }
7197
7316
  });
7198
7317
  Object.defineProperty(exports, "useConversationThreads", {
7199
7318
  enumerable: true,
7200
- get: function () { return chunkUN3AZUXX_cjs.useConversationThreads; }
7319
+ get: function () { return chunkUTZZMUHI_cjs.useConversationThreads; }
7201
7320
  });
7202
7321
  Object.defineProperty(exports, "useConversations", {
7203
7322
  enumerable: true,
7204
- get: function () { return chunkUN3AZUXX_cjs.useConversations; }
7323
+ get: function () { return chunkUTZZMUHI_cjs.useConversations; }
7205
7324
  });
7206
7325
  Object.defineProperty(exports, "useCurrentUser", {
7207
7326
  enumerable: true,
7208
- get: function () { return chunkUN3AZUXX_cjs.useCurrentUser; }
7327
+ get: function () { return chunkUTZZMUHI_cjs.useCurrentUser; }
7209
7328
  });
7210
7329
  Object.defineProperty(exports, "useDeleteAgents", {
7211
7330
  enumerable: true,
7212
- get: function () { return chunkUN3AZUXX_cjs.useDeleteAgents; }
7331
+ get: function () { return chunkUTZZMUHI_cjs.useDeleteAgents; }
7213
7332
  });
7214
7333
  Object.defineProperty(exports, "useDocuments", {
7215
7334
  enumerable: true,
7216
- get: function () { return chunkUN3AZUXX_cjs.useDocuments; }
7335
+ get: function () { return chunkUTZZMUHI_cjs.useDocuments; }
7217
7336
  });
7218
7337
  Object.defineProperty(exports, "useFacts", {
7219
7338
  enumerable: true,
7220
- get: function () { return chunkUN3AZUXX_cjs.useFacts; }
7339
+ get: function () { return chunkUTZZMUHI_cjs.useFacts; }
7221
7340
  });
7222
7341
  Object.defineProperty(exports, "useFirmPool", {
7223
7342
  enumerable: true,
7224
- get: function () { return chunkUN3AZUXX_cjs.useFirmPool; }
7343
+ get: function () { return chunkUTZZMUHI_cjs.useFirmPool; }
7225
7344
  });
7226
7345
  Object.defineProperty(exports, "useHealth", {
7227
7346
  enumerable: true,
7228
- get: function () { return chunkUN3AZUXX_cjs.useHealth; }
7347
+ get: function () { return chunkUTZZMUHI_cjs.useHealth; }
7229
7348
  });
7230
7349
  Object.defineProperty(exports, "useParsedDocument", {
7231
7350
  enumerable: true,
7232
- get: function () { return chunkUN3AZUXX_cjs.useParsedDocument; }
7351
+ get: function () { return chunkUTZZMUHI_cjs.useParsedDocument; }
7233
7352
  });
7234
7353
  Object.defineProperty(exports, "useProjectInvoices", {
7235
7354
  enumerable: true,
7236
- get: function () { return chunkUN3AZUXX_cjs.useProjectInvoices; }
7355
+ get: function () { return chunkUTZZMUHI_cjs.useProjectInvoices; }
7237
7356
  });
7238
7357
  Object.defineProperty(exports, "useProjectUsage", {
7239
7358
  enumerable: true,
7240
- get: function () { return chunkUN3AZUXX_cjs.useProjectUsage; }
7359
+ get: function () { return chunkUTZZMUHI_cjs.useProjectUsage; }
7241
7360
  });
7242
7361
  Object.defineProperty(exports, "useProjects", {
7243
7362
  enumerable: true,
7244
- get: function () { return chunkUN3AZUXX_cjs.useProjects; }
7363
+ get: function () { return chunkUTZZMUHI_cjs.useProjects; }
7245
7364
  });
7246
7365
  Object.defineProperty(exports, "useProjectsUsage", {
7247
7366
  enumerable: true,
7248
- get: function () { return chunkUN3AZUXX_cjs.useProjectsUsage; }
7367
+ get: function () { return chunkUTZZMUHI_cjs.useProjectsUsage; }
7249
7368
  });
7250
7369
  Object.defineProperty(exports, "useTags", {
7251
7370
  enumerable: true,
7252
- get: function () { return chunkUN3AZUXX_cjs.useTags; }
7371
+ get: function () { return chunkUTZZMUHI_cjs.useTags; }
7253
7372
  });
7254
7373
  Object.defineProperty(exports, "useThumbnails", {
7255
7374
  enumerable: true,
7256
- get: function () { return chunkUN3AZUXX_cjs.useThumbnails; }
7375
+ get: function () { return chunkUTZZMUHI_cjs.useThumbnails; }
7257
7376
  });
7258
7377
  Object.defineProperty(exports, "useTopUpFirmPool", {
7259
7378
  enumerable: true,
7260
- get: function () { return chunkUN3AZUXX_cjs.useTopUpFirmPool; }
7379
+ get: function () { return chunkUTZZMUHI_cjs.useTopUpFirmPool; }
7261
7380
  });
7262
7381
  Object.defineProperty(exports, "useUserUsageToday", {
7263
7382
  enumerable: true,
7264
- get: function () { return chunkUN3AZUXX_cjs.useUserUsageToday; }
7383
+ get: function () { return chunkUTZZMUHI_cjs.useUserUsageToday; }
7265
7384
  });
7266
7385
  Object.defineProperty(exports, "useWorkspaceActivity", {
7267
7386
  enumerable: true,
7268
- get: function () { return chunkUN3AZUXX_cjs.useWorkspaceActivity; }
7387
+ get: function () { return chunkUTZZMUHI_cjs.useWorkspaceActivity; }
7269
7388
  });
7270
7389
  Object.defineProperty(exports, "useWorkspaceUsers", {
7271
7390
  enumerable: true,
7272
- get: function () { return chunkUN3AZUXX_cjs.useWorkspaceUsers; }
7391
+ get: function () { return chunkUTZZMUHI_cjs.useWorkspaceUsers; }
7273
7392
  });
7274
7393
  Object.defineProperty(exports, "useWorkspaces", {
7275
7394
  enumerable: true,
7276
- get: function () { return chunkUN3AZUXX_cjs.useWorkspaces; }
7395
+ get: function () { return chunkUTZZMUHI_cjs.useWorkspaces; }
7277
7396
  });
7278
7397
  Object.defineProperty(exports, "cleanDraftMarkdown", {
7279
7398
  enumerable: true,
7280
- get: function () { return chunk5DCRIWCA_cjs.cleanDraftMarkdown; }
7399
+ get: function () { return chunkZWFMFOGP_cjs.cleanDraftMarkdown; }
7281
7400
  });
7282
7401
  Object.defineProperty(exports, "cleanDraftWithReport", {
7283
7402
  enumerable: true,
7284
- get: function () { return chunk5DCRIWCA_cjs.cleanDraftWithReport; }
7403
+ get: function () { return chunkZWFMFOGP_cjs.cleanDraftWithReport; }
7285
7404
  });
7286
7405
  Object.defineProperty(exports, "promoteBoldTitle", {
7287
7406
  enumerable: true,
7288
- get: function () { return chunk5DCRIWCA_cjs.promoteBoldTitle; }
7407
+ get: function () { return chunkZWFMFOGP_cjs.promoteBoldTitle; }
7289
7408
  });
7290
7409
  Object.defineProperty(exports, "repairParsedStructure", {
7291
7410
  enumerable: true,
7292
- get: function () { return chunk5DCRIWCA_cjs.repairParsedStructure; }
7411
+ get: function () { return chunkZWFMFOGP_cjs.repairParsedStructure; }
7293
7412
  });
7294
7413
  Object.defineProperty(exports, "repairParsedTitle", {
7295
7414
  enumerable: true,
7296
- get: function () { return chunk5DCRIWCA_cjs.repairParsedTitle; }
7415
+ get: function () { return chunkZWFMFOGP_cjs.repairParsedTitle; }
7297
7416
  });
7298
7417
  Object.defineProperty(exports, "stripAgentPreamble", {
7299
7418
  enumerable: true,
7300
- get: function () { return chunk5DCRIWCA_cjs.stripAgentPreamble; }
7419
+ get: function () { return chunkZWFMFOGP_cjs.stripAgentPreamble; }
7301
7420
  });
7302
7421
  Object.defineProperty(exports, "unescapeMarkdown", {
7303
7422
  enumerable: true,
7304
- get: function () { return chunk5DCRIWCA_cjs.unescapeMarkdown; }
7423
+ get: function () { return chunkZWFMFOGP_cjs.unescapeMarkdown; }
7305
7424
  });
7306
7425
  Object.defineProperty(exports, "unwrapCitationLinks", {
7307
7426
  enumerable: true,
7308
- get: function () { return chunk5DCRIWCA_cjs.unwrapCitationLinks; }
7427
+ get: function () { return chunkZWFMFOGP_cjs.unwrapCitationLinks; }
7309
7428
  });
7310
7429
  Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
7311
7430
  enumerable: true,
7312
- get: function () { return chunkBOJHNPNJ_cjs.DEFAULT_NOTIFY_TONE; }
7431
+ get: function () { return chunk6PPWZILQ_cjs.DEFAULT_NOTIFY_TONE; }
7313
7432
  });
7314
7433
  Object.defineProperty(exports, "NotificationBell", {
7315
7434
  enumerable: true,
7316
- get: function () { return chunkBOJHNPNJ_cjs.NotificationBell; }
7435
+ get: function () { return chunk6PPWZILQ_cjs.NotificationBell; }
7317
7436
  });
7318
7437
  Object.defineProperty(exports, "Toaster", {
7319
7438
  enumerable: true,
7320
- get: function () { return chunkBOJHNPNJ_cjs.Toaster; }
7439
+ get: function () { return chunk6PPWZILQ_cjs.Toaster; }
7321
7440
  });
7322
7441
  Object.defineProperty(exports, "formatRelativeTime", {
7323
7442
  enumerable: true,
7324
- get: function () { return chunkBOJHNPNJ_cjs.formatRelativeTime; }
7443
+ get: function () { return chunk6PPWZILQ_cjs.formatRelativeTime; }
7325
7444
  });
7326
7445
  Object.defineProperty(exports, "notify", {
7327
7446
  enumerable: true,
7328
- get: function () { return chunkBOJHNPNJ_cjs.notify; }
7447
+ get: function () { return chunk6PPWZILQ_cjs.notify; }
7329
7448
  });
7330
7449
  Object.defineProperty(exports, "seedNotifications", {
7331
7450
  enumerable: true,
7332
- get: function () { return chunkBOJHNPNJ_cjs.seedNotifications; }
7451
+ get: function () { return chunk6PPWZILQ_cjs.seedNotifications; }
7333
7452
  });
7334
7453
  Object.defineProperty(exports, "selectUnread", {
7335
7454
  enumerable: true,
7336
- get: function () { return chunkBOJHNPNJ_cjs.selectUnread; }
7455
+ get: function () { return chunk6PPWZILQ_cjs.selectUnread; }
7337
7456
  });
7338
7457
  Object.defineProperty(exports, "toast", {
7339
7458
  enumerable: true,
7340
- get: function () { return chunkBOJHNPNJ_cjs.toast; }
7459
+ get: function () { return chunk6PPWZILQ_cjs.toast; }
7341
7460
  });
7342
7461
  Object.defineProperty(exports, "useNotify", {
7343
7462
  enumerable: true,
7344
- get: function () { return chunkBOJHNPNJ_cjs.useNotify; }
7463
+ get: function () { return chunk6PPWZILQ_cjs.useNotify; }
7345
7464
  });
7346
7465
  Object.defineProperty(exports, "AUDIO_MIME_PREFERENCE", {
7347
7466
  enumerable: true,
@@ -8085,15 +8204,15 @@ Object.defineProperty(exports, "cn", {
8085
8204
  });
8086
8205
  Object.defineProperty(exports, "ArbiProvider", {
8087
8206
  enumerable: true,
8088
- get: function () { return chunkXIDDXD5Y_cjs.ArbiProvider; }
8207
+ get: function () { return chunkR2MF7YCW_cjs.ArbiProvider; }
8089
8208
  });
8090
8209
  Object.defineProperty(exports, "useArbi", {
8091
8210
  enumerable: true,
8092
- get: function () { return chunkXIDDXD5Y_cjs.useArbi; }
8211
+ get: function () { return chunkR2MF7YCW_cjs.useArbi; }
8093
8212
  });
8094
8213
  Object.defineProperty(exports, "useDeploymentDomain", {
8095
8214
  enumerable: true,
8096
- get: function () { return chunkXIDDXD5Y_cjs.useDeploymentDomain; }
8215
+ get: function () { return chunkR2MF7YCW_cjs.useDeploymentDomain; }
8097
8216
  });
8098
8217
  Object.defineProperty(exports, "Arbi", {
8099
8218
  enumerable: true,
@@ -8129,6 +8248,7 @@ exports.AiActionCard = AiActionCard;
8129
8248
  exports.AiAnswer = AiAnswer;
8130
8249
  exports.AppleIcon = AppleIcon;
8131
8250
  exports.ArbiBotIcon = ArbiBotIcon;
8251
+ exports.ArbiSessionStateProvider = ArbiSessionStateProvider;
8132
8252
  exports.ArbiWebSocketProvider = ArbiWebSocketProvider;
8133
8253
  exports.ArtifactCanvas = ArtifactCanvas;
8134
8254
  exports.ChatBubble = ChatBubble;
@@ -8151,6 +8271,7 @@ exports.DocumentGallery = DocumentGallery;
8151
8271
  exports.DocumentReview = DocumentReview;
8152
8272
  exports.DocumentTable = DocumentTable;
8153
8273
  exports.DraftTitleControls = DraftTitleControls;
8274
+ exports.EMPTY_SESSION_STATE = EMPTY_SESSION_STATE;
8154
8275
  exports.FileIcon = FileIcon;
8155
8276
  exports.FireworksIcon = FireworksIcon;
8156
8277
  exports.GeminiIcon = GeminiIcon;
@@ -8182,6 +8303,7 @@ exports.announceMailDraftReplaced = announceMailDraftReplaced;
8182
8303
  exports.arbiAccountClient = arbiAccountClient;
8183
8304
  exports.arbiMailClient = arbiMailClient;
8184
8305
  exports.captureFrameAsBlob = captureFrameAsBlob;
8306
+ exports.createArbiSessionStore = createArbiSessionStore;
8185
8307
  exports.createMailClient = createMailClient;
8186
8308
  exports.cropImage = cropImage;
8187
8309
  exports.dayKey = dayKey;
@@ -8204,11 +8326,14 @@ exports.mailJson = mailJson;
8204
8326
  exports.mailQueryKeys = mailQueryKeys;
8205
8327
  exports.mountDiditVerification = mountDiditVerification;
8206
8328
  exports.nextAliasSuggestion = nextAliasSuggestion;
8329
+ exports.nextViewingDocument = nextViewingDocument;
8207
8330
  exports.parseActivityContent = parseActivityContent;
8208
8331
  exports.parseDeleteAccountBlockers = parseDeleteAccountBlockers;
8209
8332
  exports.pickRecentWorkspaces = pickRecentWorkspaces;
8210
8333
  exports.redlineStats = redlineStats;
8211
8334
  exports.resolveActiveWorkspace = resolveActiveWorkspace;
8335
+ exports.selectIsGenerating = selectIsGenerating;
8336
+ exports.selectViewingDocumentId = selectViewingDocumentId;
8212
8337
  exports.textToArtifact = textToArtifact;
8213
8338
  exports.titleFromQuestion = titleFromQuestion;
8214
8339
  exports.toChatCitations = toChatCitations;
@@ -8227,8 +8352,9 @@ exports.useAiTask = useAiTask;
8227
8352
  exports.useArbiChat = useArbiChat;
8228
8353
  exports.useArbiConnected = useArbiConnected;
8229
8354
  exports.useArbiDocumentSync = useArbiDocumentSync;
8355
+ exports.useArbiSessionState = useArbiSessionState;
8356
+ exports.useArbiSessionStore = useArbiSessionStore;
8230
8357
  exports.useArbiShellWorkspaces = useArbiShellWorkspaces;
8231
- exports.useArbiUiStore = useArbiUiStore;
8232
8358
  exports.useArbiWebSocket = useArbiWebSocket;
8233
8359
  exports.useArbiWsContext = useArbiWsContext;
8234
8360
  exports.useArbiWsMessage = useArbiWsMessage;
@@ -8236,6 +8362,7 @@ exports.useArbiWsStatus = useArbiWsStatus;
8236
8362
  exports.useArbiWsStore = useArbiWsStore;
8237
8363
  exports.useArbiWsTask = useArbiWsTask;
8238
8364
  exports.useArbiWsTasks = useArbiWsTasks;
8365
+ exports.useAuthorizeLimits = useAuthorizeLimits;
8239
8366
  exports.useAvatarCrop = useAvatarCrop;
8240
8367
  exports.useCameraStream = useCameraStream;
8241
8368
  exports.useClaimNativeAlias = useClaimNativeAlias;
@@ -8261,6 +8388,7 @@ exports.useDisconnectMailAccount = useDisconnectMailAccount;
8261
8388
  exports.useEmailChange = useEmailChange;
8262
8389
  exports.useFilteredProjects = useFilteredProjects;
8263
8390
  exports.useFollowThread = useFollowThread;
8391
+ exports.useGenerateAgentAvatar = useGenerateAgentAvatar;
8264
8392
  exports.useGrantAgentAccess = useGrantAgentAccess;
8265
8393
  exports.useIdentityVerification = useIdentityVerification;
8266
8394
  exports.useIdentityVerificationFlow = useIdentityVerificationFlow;
@@ -8279,6 +8407,7 @@ exports.useMailOnline = useMailOnline;
8279
8407
  exports.useMailPolicy = useMailPolicy;
8280
8408
  exports.useMailProjects = useMailProjects;
8281
8409
  exports.useMailUnlock = useMailUnlock;
8410
+ exports.useMcpTools = useMcpTools;
8282
8411
  exports.useNameEditor = useNameEditor;
8283
8412
  exports.useNotificationPreferences = useNotificationPreferences;
8284
8413
  exports.usePasswordChange = usePasswordChange;