@arbidocs/react 0.4.59 → 0.4.60

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.
package/dist/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkX75MAVGQ_cjs = require('./chunk-X75MAVGQ.cjs');
3
+ var chunkUUE2R2E2_cjs = require('./chunk-UUE2R2E2.cjs');
4
4
  var chunkZ4M7JB4L_cjs = require('./chunk-Z4M7JB4L.cjs');
5
- var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
6
- var chunkZMTLGO3K_cjs = require('./chunk-ZMTLGO3K.cjs');
7
5
  var chunkX3F5ABY2_cjs = require('./chunk-X3F5ABY2.cjs');
8
6
  var chunkXDCRWZF2_cjs = require('./chunk-XDCRWZF2.cjs');
9
7
  var chunkNA3FOYSF_cjs = require('./chunk-NA3FOYSF.cjs');
10
8
  var chunkOBNTJEEO_cjs = require('./chunk-OBNTJEEO.cjs');
11
9
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
10
+ var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
11
+ var chunkZMTLGO3K_cjs = require('./chunk-ZMTLGO3K.cjs');
12
12
  var React = require('react');
13
13
  var reactQuery = require('@tanstack/react-query');
14
14
  var browser = require('@arbidocs/sdk/browser');
@@ -38,7 +38,7 @@ function useUpdateConversation() {
38
38
  conversationId,
39
39
  patch
40
40
  }) => arbi.conversations.update(conversationId, patch),
41
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations() })
41
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations() })
42
42
  });
43
43
  }
44
44
  function useCreateWork() {
@@ -46,7 +46,7 @@ function useCreateWork() {
46
46
  const qc = reactQuery.useQueryClient();
47
47
  return reactQuery.useMutation({
48
48
  mutationFn: (body) => arbi.conversations.createWork(body),
49
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations() })
49
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations() })
50
50
  });
51
51
  }
52
52
  function useRunConversation() {
@@ -54,7 +54,7 @@ function useRunConversation() {
54
54
  const qc = reactQuery.useQueryClient();
55
55
  return reactQuery.useMutation({
56
56
  mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
57
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations() })
57
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations() })
58
58
  });
59
59
  }
60
60
  function usePlanWork() {
@@ -66,7 +66,7 @@ function usePlanWork() {
66
66
  function useConversationPendingAuth(conversationId, options) {
67
67
  const arbi = chunkZMTLGO3K_cjs.useArbi();
68
68
  return reactQuery.useQuery({
69
- queryKey: [...chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
69
+ queryKey: [...chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
70
70
  queryFn: () => arbi.conversations.pendingAuth(conversationId),
71
71
  enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
72
72
  retry: false
@@ -75,7 +75,7 @@ function useConversationPendingAuth(conversationId, options) {
75
75
  function useConversationActivity(conversationId, options) {
76
76
  const arbi = chunkZMTLGO3K_cjs.useArbi();
77
77
  return reactQuery.useQuery({
78
- queryKey: [...chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
78
+ queryKey: [...chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
79
79
  queryFn: () => arbi.conversations.activity(conversationId),
80
80
  enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
81
81
  refetchInterval: options?.live ? 2500 : false
@@ -84,7 +84,7 @@ function useConversationActivity(conversationId, options) {
84
84
  function useWorkflows(options) {
85
85
  const arbi = chunkZMTLGO3K_cjs.useArbi();
86
86
  return reactQuery.useQuery({
87
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workflows(),
87
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workflows(),
88
88
  queryFn: () => arbi.workflows.list(),
89
89
  refetchInterval: options?.live ? 15e3 : false,
90
90
  enabled: options?.enabled ?? arbi.isLoggedIn
@@ -95,7 +95,7 @@ function useCreateWorkflow() {
95
95
  const qc = reactQuery.useQueryClient();
96
96
  return reactQuery.useMutation({
97
97
  mutationFn: (body) => arbi.workflows.create(body),
98
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workflows() })
98
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workflows() })
99
99
  });
100
100
  }
101
101
  function useUpdateWorkflow() {
@@ -106,7 +106,7 @@ function useUpdateWorkflow() {
106
106
  workflowId,
107
107
  patch
108
108
  }) => arbi.workflows.update(workflowId, patch),
109
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workflows() })
109
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workflows() })
110
110
  });
111
111
  }
112
112
  function useDeleteWorkflow() {
@@ -114,7 +114,7 @@ function useDeleteWorkflow() {
114
114
  const qc = reactQuery.useQueryClient();
115
115
  return reactQuery.useMutation({
116
116
  mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
117
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workflows() })
117
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workflows() })
118
118
  });
119
119
  }
120
120
  function useRunWorkflow() {
@@ -123,8 +123,8 @@ function useRunWorkflow() {
123
123
  return reactQuery.useMutation({
124
124
  mutationFn: (workflowId) => arbi.workflows.run(workflowId),
125
125
  onSuccess: () => Promise.all([
126
- qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workflows() }),
127
- qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations() })
126
+ qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workflows() }),
127
+ qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations() })
128
128
  ])
129
129
  });
130
130
  }
@@ -133,13 +133,13 @@ function useCreateAgent() {
133
133
  const qc = reactQuery.useQueryClient();
134
134
  return reactQuery.useMutation({
135
135
  mutationFn: (name) => arbi.agents.create(name),
136
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agents() })
136
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agents() })
137
137
  });
138
138
  }
139
139
  function useAgentConfig(agentExtId, options) {
140
140
  const arbi = chunkZMTLGO3K_cjs.useArbi();
141
141
  return reactQuery.useQuery({
142
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agentConfig(agentExtId),
142
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agentConfig(agentExtId),
143
143
  queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
144
144
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
145
145
  });
@@ -147,7 +147,7 @@ function useAgentConfig(agentExtId, options) {
147
147
  function useAgentModels(options) {
148
148
  const arbi = chunkZMTLGO3K_cjs.useArbi();
149
149
  return reactQuery.useQuery({
150
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.models(),
150
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.models(),
151
151
  queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
152
152
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
153
153
  });
@@ -170,17 +170,17 @@ function useSaveAgentConfig() {
170
170
  });
171
171
  },
172
172
  onSuccess: (_saved, { agentExtId }) => Promise.all([
173
- qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.configs() }),
174
- qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
173
+ qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.configs() }),
174
+ qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
175
175
  // The agent list shows the pinned persona/model, so it refreshes too.
176
- qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agents() })
176
+ qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agents() })
177
177
  ])
178
178
  });
179
179
  }
180
180
  function useAgentWorkspaces(agentExtId, options) {
181
181
  const arbi = chunkZMTLGO3K_cjs.useArbi();
182
182
  return reactQuery.useQuery({
183
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
183
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
184
184
  queryFn: () => arbi.agents.listWorkspaces(agentExtId),
185
185
  enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
186
186
  });
@@ -201,7 +201,7 @@ function useGrantAgentAccess() {
201
201
  if (!agent?.email) throw new Error("The agent's address is unknown.");
202
202
  return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
203
203
  },
204
- onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
204
+ onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
205
205
  });
206
206
  }
207
207
  function useRevokeAgentAccess() {
@@ -220,13 +220,13 @@ function useRevokeAgentAccess() {
220
220
  if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
221
221
  }
222
222
  },
223
- onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
223
+ onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
224
224
  });
225
225
  }
226
226
  function useSkills(options) {
227
227
  const arbi = chunkZMTLGO3K_cjs.useArbi();
228
228
  return reactQuery.useQuery({
229
- queryKey: [...chunkX75MAVGQ_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
229
+ queryKey: [...chunkUUE2R2E2_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
230
230
  queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
231
231
  refetchInterval: options?.live ? 5e3 : false,
232
232
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
@@ -257,7 +257,7 @@ function useUploadSkillFiles() {
257
257
  }
258
258
  return results;
259
259
  },
260
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.skills() })
260
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.skills() })
261
261
  });
262
262
  }
263
263
  function useStartWorkQuery() {
@@ -284,7 +284,7 @@ function useStartWorkQuery() {
284
284
  `The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
285
285
  );
286
286
  },
287
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.allConversations() })
287
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.allConversations() })
288
288
  });
289
289
  }
290
290
  function useAgentSession(agentId, options) {
@@ -438,8 +438,8 @@ function useArbiChat(options = {}) {
438
438
  const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
439
439
  const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
440
440
  const arbi = chunkZMTLGO3K_cjs.useArbi();
441
- const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkX75MAVGQ_cjs.useDocuments(workspaceId);
442
- const ordinaryHistory = chunkX75MAVGQ_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
441
+ const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkUUE2R2E2_cjs.useDocuments(workspaceId);
442
+ const ordinaryHistory = chunkUUE2R2E2_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
443
443
  const agentHistory = useAgentChats(agentId);
444
444
  const stored = React.useMemo(
445
445
  () => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
@@ -454,7 +454,7 @@ function useArbiChat(options = {}) {
454
454
  );
455
455
  const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
456
456
  const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
457
- const query = chunkX75MAVGQ_cjs.useAssistantQuery();
457
+ const query = chunkUUE2R2E2_cjs.useAssistantQuery();
458
458
  const { mutateAsync } = query;
459
459
  const [stagedFiles, setStagedFiles] = React.useState([]);
460
460
  const [threads, setThreads] = React.useState(() => [emptyThread()]);
@@ -514,7 +514,7 @@ function useArbiChat(options = {}) {
514
514
  (conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
515
515
  ) || active.messages.some((message) => message.status === "streaming");
516
516
  const needsLoad = !!active.conversationId && !active.isLoaded;
517
- const loaded = chunkX75MAVGQ_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
517
+ const loaded = chunkUUE2R2E2_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
518
518
  enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
519
519
  live: liveHistory
520
520
  });
@@ -1293,14 +1293,14 @@ function useArbiDocumentSync(workspaceId) {
1293
1293
  if (!workspaceId) return;
1294
1294
  if (client.isMessageType(msg, "batch_complete")) {
1295
1295
  if (msg.workspace_ext_id !== workspaceId) return;
1296
- void queryClient.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.documents(workspaceId) });
1297
- void queryClient.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.tags(workspaceId) });
1296
+ void queryClient.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.documents(workspaceId) });
1297
+ void queryClient.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.tags(workspaceId) });
1298
1298
  return;
1299
1299
  }
1300
1300
  if (client.isMessageType(msg, "task_update")) {
1301
1301
  if (msg.workspace_ext_id !== workspaceId) return;
1302
1302
  if (TERMINAL_STATUSES.has(msg.status)) {
1303
- void queryClient.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.documents(workspaceId) });
1303
+ void queryClient.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.documents(workspaceId) });
1304
1304
  }
1305
1305
  }
1306
1306
  });
@@ -1429,7 +1429,7 @@ function useShellWorkspaces(options) {
1429
1429
  }
1430
1430
  function useArbiShellWorkspaces(options = {}) {
1431
1431
  const arbi = chunkZMTLGO3K_cjs.useArbi();
1432
- const query = chunkX75MAVGQ_cjs.useWorkspaces();
1432
+ const query = chunkUUE2R2E2_cjs.useWorkspaces();
1433
1433
  const { select, ...rest } = options;
1434
1434
  const defaultSelect = React.useCallback(
1435
1435
  (workspace) => arbi.selectWorkspace(workspace.id),
@@ -1446,7 +1446,7 @@ function useArbiShellWorkspaces(options = {}) {
1446
1446
  function useContacts(options) {
1447
1447
  const arbi = chunkZMTLGO3K_cjs.useArbi();
1448
1448
  return reactQuery.useQuery({
1449
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.contacts(),
1449
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.contacts(),
1450
1450
  queryFn: () => arbi.contacts.list(),
1451
1451
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
1452
1452
  });
@@ -1466,7 +1466,7 @@ function useAddContacts() {
1466
1466
  const qc = reactQuery.useQueryClient();
1467
1467
  return reactQuery.useMutation({
1468
1468
  mutationFn: (emails) => arbi.contacts.add(emails),
1469
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.contacts() })
1469
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.contacts() })
1470
1470
  });
1471
1471
  }
1472
1472
  function useRemoveContacts() {
@@ -1474,7 +1474,7 @@ function useRemoveContacts() {
1474
1474
  const qc = reactQuery.useQueryClient();
1475
1475
  return reactQuery.useMutation({
1476
1476
  mutationFn: (contactIds) => arbi.contacts.remove(contactIds),
1477
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.contacts() })
1477
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.contacts() })
1478
1478
  });
1479
1479
  }
1480
1480
  function toProfileView(profile) {
@@ -1486,7 +1486,7 @@ function toProfileView(profile) {
1486
1486
  function useProfile(options) {
1487
1487
  const arbi = chunkZMTLGO3K_cjs.useArbi();
1488
1488
  return reactQuery.useQuery({
1489
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.profile(),
1489
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.profile(),
1490
1490
  queryFn: () => {
1491
1491
  const profile = arbi.user.profile();
1492
1492
  return profile ? toProfileView(profile) : null;
@@ -1509,8 +1509,8 @@ function useUpdateProfile() {
1509
1509
  return profile ? toProfileView(profile) : null;
1510
1510
  },
1511
1511
  onSuccess: (profile) => {
1512
- qc.setQueryData(chunkX75MAVGQ_cjs.arbiQueryKeys.profile(), profile);
1513
- return qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.workspaces() });
1512
+ qc.setQueryData(chunkUUE2R2E2_cjs.arbiQueryKeys.profile(), profile);
1513
+ return qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.workspaces() });
1514
1514
  }
1515
1515
  });
1516
1516
  }
@@ -1595,7 +1595,7 @@ function useConfirmEmailChange() {
1595
1595
  mutationFn: ({ newEmail, code }) => arbi.account.confirmEmailChange(newEmail, code),
1596
1596
  onSuccess: () => {
1597
1597
  const profile = arbi.user.profile();
1598
- qc.setQueryData(chunkX75MAVGQ_cjs.arbiQueryKeys.profile(), profile ? toProfileView(profile) : null);
1598
+ qc.setQueryData(chunkUUE2R2E2_cjs.arbiQueryKeys.profile(), profile ? toProfileView(profile) : null);
1599
1599
  }
1600
1600
  });
1601
1601
  }
@@ -1764,7 +1764,7 @@ function toNotificationPreferences(stored, keys) {
1764
1764
  function useUserSettings(options) {
1765
1765
  const arbi = chunkZMTLGO3K_cjs.useArbi();
1766
1766
  return reactQuery.useQuery({
1767
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings(),
1767
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings(),
1768
1768
  queryFn: () => arbi.settings.get(),
1769
1769
  enabled: (options?.enabled ?? true) && arbi.isLoggedIn
1770
1770
  });
@@ -1777,18 +1777,18 @@ function useNotificationPreferences(keys, options) {
1777
1777
  const save = reactQuery.useMutation({
1778
1778
  mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
1779
1779
  onMutate: async (patch) => {
1780
- await qc.cancelQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings() });
1781
- const previous = qc.getQueryData(chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings());
1780
+ await qc.cancelQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings() });
1781
+ const previous = qc.getQueryData(chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings());
1782
1782
  qc.setQueryData(
1783
- chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings(),
1783
+ chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings(),
1784
1784
  (old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
1785
1785
  );
1786
1786
  return { previous };
1787
1787
  },
1788
1788
  onError: (_err, _patch, context) => {
1789
- qc.setQueryData(chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings(), context?.previous);
1789
+ qc.setQueryData(chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings(), context?.previous);
1790
1790
  },
1791
- onSettled: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.userSettings() })
1791
+ onSettled: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.userSettings() })
1792
1792
  });
1793
1793
  const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
1794
1794
  const setAll = React.useCallback(
@@ -1814,7 +1814,7 @@ function useTerminateSession() {
1814
1814
  const qc = reactQuery.useQueryClient();
1815
1815
  return reactQuery.useMutation({
1816
1816
  mutationFn: (sessionId) => arbi.sessions.terminate(sessionId),
1817
- onSuccess: () => qc.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.sessions() })
1817
+ onSuccess: () => qc.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.sessions() })
1818
1818
  });
1819
1819
  }
1820
1820
  function useLogoutAllSessions() {
@@ -1890,7 +1890,7 @@ function useDeleteAccountFlow({
1890
1890
  };
1891
1891
  }
1892
1892
  function useWorkspaceDocs(workspaceId) {
1893
- const { data: docs = [], isLoading, isError } = chunkX75MAVGQ_cjs.useDocuments(workspaceId);
1893
+ const { data: docs = [], isLoading, isError } = chunkUUE2R2E2_cjs.useDocuments(workspaceId);
1894
1894
  const docIds = React.useMemo(
1895
1895
  () => docs.map((d) => d.external_id).filter((id) => !!id),
1896
1896
  [docs]
@@ -1898,7 +1898,7 @@ function useWorkspaceDocs(workspaceId) {
1898
1898
  return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
1899
1899
  }
1900
1900
  function useAiTask() {
1901
- const mutation = chunkX75MAVGQ_cjs.useAssistantQuery();
1901
+ const mutation = chunkUUE2R2E2_cjs.useAssistantQuery();
1902
1902
  const [status, setStatus] = React.useState("idle");
1903
1903
  const [text, setText] = React.useState("");
1904
1904
  const [stepCount, setStepCount] = React.useState(0);
@@ -2491,8 +2491,8 @@ function DocumentReview({
2491
2491
  onClose,
2492
2492
  className
2493
2493
  }) {
2494
- const parsedQuery = chunkX75MAVGQ_cjs.useParsedDocument(docId, stage);
2495
- const tagsQuery = chunkX75MAVGQ_cjs.useTags(workspaceId);
2494
+ const parsedQuery = chunkUUE2R2E2_cjs.useParsedDocument(docId, stage);
2495
+ const tagsQuery = chunkUUE2R2E2_cjs.useTags(workspaceId);
2496
2496
  const tagNameById = React__default.default.useMemo(() => {
2497
2497
  const map = /* @__PURE__ */ new Map();
2498
2498
  for (const t of tagsQuery.data ?? []) {
@@ -2723,7 +2723,7 @@ function SemanticSearch({
2723
2723
  const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
2724
2724
  const [value, setValue] = React.useState("");
2725
2725
  const [selected, setSelected] = React.useState(null);
2726
- const { data: docs = [] } = chunkX75MAVGQ_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
2726
+ const { data: docs = [] } = chunkUUE2R2E2_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
2727
2727
  const docMap = React.useMemo(() => {
2728
2728
  const map = /* @__PURE__ */ new Map();
2729
2729
  for (const d of docs) if (d.external_id) map.set(d.external_id, d);
@@ -3827,7 +3827,7 @@ function ActivityFeed({
3827
3827
  enabled,
3828
3828
  "data-testid": testId = "activity-feed"
3829
3829
  }) {
3830
- const { data, isLoading, isError } = chunkX75MAVGQ_cjs.useActivity({ limit, enabled });
3830
+ const { data, isLoading, isError } = chunkUUE2R2E2_cjs.useActivity({ limit, enabled });
3831
3831
  if (isLoading) {
3832
3832
  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: [
3833
3833
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
@@ -3978,7 +3978,7 @@ function useDirectMessages(options) {
3978
3978
  enabled
3979
3979
  });
3980
3980
  const contactsQuery = reactQuery.useQuery({
3981
- queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.contacts(),
3981
+ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.contacts(),
3982
3982
  queryFn: () => arbi.contacts.list(),
3983
3983
  enabled
3984
3984
  });
@@ -5149,10 +5149,10 @@ function DocumentTable({
5149
5149
  extraColumns,
5150
5150
  className
5151
5151
  }) {
5152
- const query = chunkX75MAVGQ_cjs.useDocuments(workspaceId, { enabled: !documents });
5152
+ const query = chunkUUE2R2E2_cjs.useDocuments(workspaceId, { enabled: !documents });
5153
5153
  const rows = documents ?? query.data ?? [];
5154
5154
  const isLoading = !documents && query.isLoading;
5155
- const tagsQuery = chunkX75MAVGQ_cjs.useTags(workspaceId);
5155
+ const tagsQuery = chunkUUE2R2E2_cjs.useTags(workspaceId);
5156
5156
  const tagNameById = React__default.default.useMemo(() => {
5157
5157
  const map = /* @__PURE__ */ new Map();
5158
5158
  for (const t of tagsQuery.data ?? []) {
@@ -5333,7 +5333,7 @@ function DocumentCardMenu({
5333
5333
  const invalidateDocuments = () => {
5334
5334
  const workspaceId = arbi.getWorkspaceId();
5335
5335
  if (workspaceId) {
5336
- void queryClient.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.documents(workspaceId) });
5336
+ void queryClient.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.documents(workspaceId) });
5337
5337
  }
5338
5338
  };
5339
5339
  const download = reactQuery.useMutation({
@@ -5432,10 +5432,10 @@ function DocumentGallery({
5432
5432
  minTileWidth = 148,
5433
5433
  className
5434
5434
  }) {
5435
- const query = chunkX75MAVGQ_cjs.useDocuments(workspaceId, { enabled: !documents });
5435
+ const query = chunkUUE2R2E2_cjs.useDocuments(workspaceId, { enabled: !documents });
5436
5436
  const rows = documents ?? query.data ?? [];
5437
5437
  const isLoading = !documents && query.isLoading;
5438
- const tagsQuery = chunkX75MAVGQ_cjs.useTags(workspaceId);
5438
+ const tagsQuery = chunkUUE2R2E2_cjs.useTags(workspaceId);
5439
5439
  const tagNameById = React__default.default.useMemo(() => {
5440
5440
  const map = /* @__PURE__ */ new Map();
5441
5441
  for (const t of tagsQuery.data ?? []) {
@@ -5447,7 +5447,7 @@ function DocumentGallery({
5447
5447
  () => rows.map((d) => d.external_id).filter((id) => !!id),
5448
5448
  [rows]
5449
5449
  );
5450
- const thumbsQuery = chunkX75MAVGQ_cjs.useThumbnails(docIds);
5450
+ const thumbsQuery = chunkUUE2R2E2_cjs.useThumbnails(docIds);
5451
5451
  const thumbs = thumbsQuery.data ?? {};
5452
5452
  const storeSelected = useArbiUiStore((s) => s.selectedDocIds);
5453
5453
  const storeSetSelected = useArbiUiStore((s) => s.setSelectedDocIds);
@@ -5483,7 +5483,7 @@ function DocumentGallery({
5483
5483
  setRenamingId(null);
5484
5484
  const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
5485
5485
  if (activeWorkspace) {
5486
- void queryClient.invalidateQueries({ queryKey: chunkX75MAVGQ_cjs.arbiQueryKeys.documents(activeWorkspace) });
5486
+ void queryClient.invalidateQueries({ queryKey: chunkUUE2R2E2_cjs.arbiQueryKeys.documents(activeWorkspace) });
5487
5487
  }
5488
5488
  }
5489
5489
  });
@@ -6101,139 +6101,139 @@ function hasVideoTrack(blob) {
6101
6101
 
6102
6102
  Object.defineProperty(exports, "DEFAULT_USD_PER_CREDIT", {
6103
6103
  enumerable: true,
6104
- get: function () { return chunkX75MAVGQ_cjs.DEFAULT_USD_PER_CREDIT; }
6104
+ get: function () { return chunkUUE2R2E2_cjs.DEFAULT_USD_PER_CREDIT; }
6105
6105
  });
6106
6106
  Object.defineProperty(exports, "arbiQueryKeys", {
6107
6107
  enumerable: true,
6108
- get: function () { return chunkX75MAVGQ_cjs.arbiQueryKeys; }
6108
+ get: function () { return chunkUUE2R2E2_cjs.arbiQueryKeys; }
6109
6109
  });
6110
6110
  Object.defineProperty(exports, "cleanDraftMarkdown", {
6111
6111
  enumerable: true,
6112
- get: function () { return chunkX75MAVGQ_cjs.cleanDraftMarkdown; }
6112
+ get: function () { return chunkUUE2R2E2_cjs.cleanDraftMarkdown; }
6113
6113
  });
6114
6114
  Object.defineProperty(exports, "cleanDraftWithReport", {
6115
6115
  enumerable: true,
6116
- get: function () { return chunkX75MAVGQ_cjs.cleanDraftWithReport; }
6116
+ get: function () { return chunkUUE2R2E2_cjs.cleanDraftWithReport; }
6117
6117
  });
6118
6118
  Object.defineProperty(exports, "creditsToUsd", {
6119
6119
  enumerable: true,
6120
- get: function () { return chunkX75MAVGQ_cjs.creditsToUsd; }
6120
+ get: function () { return chunkUUE2R2E2_cjs.creditsToUsd; }
6121
6121
  });
6122
6122
  Object.defineProperty(exports, "formatCredits", {
6123
6123
  enumerable: true,
6124
- get: function () { return chunkX75MAVGQ_cjs.formatCredits; }
6124
+ get: function () { return chunkUUE2R2E2_cjs.formatCredits; }
6125
6125
  });
6126
6126
  Object.defineProperty(exports, "isUsageMetered", {
6127
6127
  enumerable: true,
6128
- get: function () { return chunkX75MAVGQ_cjs.isUsageMetered; }
6128
+ get: function () { return chunkUUE2R2E2_cjs.isUsageMetered; }
6129
6129
  });
6130
6130
  Object.defineProperty(exports, "promoteBoldTitle", {
6131
6131
  enumerable: true,
6132
- get: function () { return chunkX75MAVGQ_cjs.promoteBoldTitle; }
6132
+ get: function () { return chunkUUE2R2E2_cjs.promoteBoldTitle; }
6133
6133
  });
6134
6134
  Object.defineProperty(exports, "repairParsedStructure", {
6135
6135
  enumerable: true,
6136
- get: function () { return chunkX75MAVGQ_cjs.repairParsedStructure; }
6136
+ get: function () { return chunkUUE2R2E2_cjs.repairParsedStructure; }
6137
6137
  });
6138
6138
  Object.defineProperty(exports, "repairParsedTitle", {
6139
6139
  enumerable: true,
6140
- get: function () { return chunkX75MAVGQ_cjs.repairParsedTitle; }
6140
+ get: function () { return chunkUUE2R2E2_cjs.repairParsedTitle; }
6141
6141
  });
6142
6142
  Object.defineProperty(exports, "stripAgentPreamble", {
6143
6143
  enumerable: true,
6144
- get: function () { return chunkX75MAVGQ_cjs.stripAgentPreamble; }
6144
+ get: function () { return chunkUUE2R2E2_cjs.stripAgentPreamble; }
6145
6145
  });
6146
6146
  Object.defineProperty(exports, "unescapeMarkdown", {
6147
6147
  enumerable: true,
6148
- get: function () { return chunkX75MAVGQ_cjs.unescapeMarkdown; }
6148
+ get: function () { return chunkUUE2R2E2_cjs.unescapeMarkdown; }
6149
6149
  });
6150
6150
  Object.defineProperty(exports, "unwrapCitationLinks", {
6151
6151
  enumerable: true,
6152
- get: function () { return chunkX75MAVGQ_cjs.unwrapCitationLinks; }
6152
+ get: function () { return chunkUUE2R2E2_cjs.unwrapCitationLinks; }
6153
6153
  });
6154
6154
  Object.defineProperty(exports, "useActivity", {
6155
6155
  enumerable: true,
6156
- get: function () { return chunkX75MAVGQ_cjs.useActivity; }
6156
+ get: function () { return chunkUUE2R2E2_cjs.useActivity; }
6157
6157
  });
6158
6158
  Object.defineProperty(exports, "useAgents", {
6159
6159
  enumerable: true,
6160
- get: function () { return chunkX75MAVGQ_cjs.useAgents; }
6160
+ get: function () { return chunkUUE2R2E2_cjs.useAgents; }
6161
6161
  });
6162
6162
  Object.defineProperty(exports, "useAssistantQuery", {
6163
6163
  enumerable: true,
6164
- get: function () { return chunkX75MAVGQ_cjs.useAssistantQuery; }
6164
+ get: function () { return chunkUUE2R2E2_cjs.useAssistantQuery; }
6165
6165
  });
6166
6166
  Object.defineProperty(exports, "useConfigs", {
6167
6167
  enumerable: true,
6168
- get: function () { return chunkX75MAVGQ_cjs.useConfigs; }
6168
+ get: function () { return chunkUUE2R2E2_cjs.useConfigs; }
6169
6169
  });
6170
6170
  Object.defineProperty(exports, "useConversationThreads", {
6171
6171
  enumerable: true,
6172
- get: function () { return chunkX75MAVGQ_cjs.useConversationThreads; }
6172
+ get: function () { return chunkUUE2R2E2_cjs.useConversationThreads; }
6173
6173
  });
6174
6174
  Object.defineProperty(exports, "useConversations", {
6175
6175
  enumerable: true,
6176
- get: function () { return chunkX75MAVGQ_cjs.useConversations; }
6176
+ get: function () { return chunkUUE2R2E2_cjs.useConversations; }
6177
6177
  });
6178
6178
  Object.defineProperty(exports, "useDeleteAgents", {
6179
6179
  enumerable: true,
6180
- get: function () { return chunkX75MAVGQ_cjs.useDeleteAgents; }
6180
+ get: function () { return chunkUUE2R2E2_cjs.useDeleteAgents; }
6181
6181
  });
6182
6182
  Object.defineProperty(exports, "useDocuments", {
6183
6183
  enumerable: true,
6184
- get: function () { return chunkX75MAVGQ_cjs.useDocuments; }
6184
+ get: function () { return chunkUUE2R2E2_cjs.useDocuments; }
6185
6185
  });
6186
6186
  Object.defineProperty(exports, "useFacts", {
6187
6187
  enumerable: true,
6188
- get: function () { return chunkX75MAVGQ_cjs.useFacts; }
6188
+ get: function () { return chunkUUE2R2E2_cjs.useFacts; }
6189
6189
  });
6190
6190
  Object.defineProperty(exports, "useHealth", {
6191
6191
  enumerable: true,
6192
- get: function () { return chunkX75MAVGQ_cjs.useHealth; }
6192
+ get: function () { return chunkUUE2R2E2_cjs.useHealth; }
6193
6193
  });
6194
6194
  Object.defineProperty(exports, "useParsedDocument", {
6195
6195
  enumerable: true,
6196
- get: function () { return chunkX75MAVGQ_cjs.useParsedDocument; }
6196
+ get: function () { return chunkUUE2R2E2_cjs.useParsedDocument; }
6197
6197
  });
6198
6198
  Object.defineProperty(exports, "useProjectInvoices", {
6199
6199
  enumerable: true,
6200
- get: function () { return chunkX75MAVGQ_cjs.useProjectInvoices; }
6200
+ get: function () { return chunkUUE2R2E2_cjs.useProjectInvoices; }
6201
6201
  });
6202
6202
  Object.defineProperty(exports, "useProjectUsage", {
6203
6203
  enumerable: true,
6204
- get: function () { return chunkX75MAVGQ_cjs.useProjectUsage; }
6204
+ get: function () { return chunkUUE2R2E2_cjs.useProjectUsage; }
6205
6205
  });
6206
6206
  Object.defineProperty(exports, "useProjects", {
6207
6207
  enumerable: true,
6208
- get: function () { return chunkX75MAVGQ_cjs.useProjects; }
6208
+ get: function () { return chunkUUE2R2E2_cjs.useProjects; }
6209
6209
  });
6210
6210
  Object.defineProperty(exports, "useProjectsUsage", {
6211
6211
  enumerable: true,
6212
- get: function () { return chunkX75MAVGQ_cjs.useProjectsUsage; }
6212
+ get: function () { return chunkUUE2R2E2_cjs.useProjectsUsage; }
6213
6213
  });
6214
6214
  Object.defineProperty(exports, "useSessions", {
6215
6215
  enumerable: true,
6216
- get: function () { return chunkX75MAVGQ_cjs.useSessions; }
6216
+ get: function () { return chunkUUE2R2E2_cjs.useSessions; }
6217
6217
  });
6218
6218
  Object.defineProperty(exports, "useTags", {
6219
6219
  enumerable: true,
6220
- get: function () { return chunkX75MAVGQ_cjs.useTags; }
6220
+ get: function () { return chunkUUE2R2E2_cjs.useTags; }
6221
6221
  });
6222
6222
  Object.defineProperty(exports, "useThumbnails", {
6223
6223
  enumerable: true,
6224
- get: function () { return chunkX75MAVGQ_cjs.useThumbnails; }
6224
+ get: function () { return chunkUUE2R2E2_cjs.useThumbnails; }
6225
6225
  });
6226
6226
  Object.defineProperty(exports, "useUserUsageToday", {
6227
6227
  enumerable: true,
6228
- get: function () { return chunkX75MAVGQ_cjs.useUserUsageToday; }
6228
+ get: function () { return chunkUUE2R2E2_cjs.useUserUsageToday; }
6229
6229
  });
6230
6230
  Object.defineProperty(exports, "useWorkspaceUsers", {
6231
6231
  enumerable: true,
6232
- get: function () { return chunkX75MAVGQ_cjs.useWorkspaceUsers; }
6232
+ get: function () { return chunkUUE2R2E2_cjs.useWorkspaceUsers; }
6233
6233
  });
6234
6234
  Object.defineProperty(exports, "useWorkspaces", {
6235
6235
  enumerable: true,
6236
- get: function () { return chunkX75MAVGQ_cjs.useWorkspaces; }
6236
+ get: function () { return chunkUUE2R2E2_cjs.useWorkspaces; }
6237
6237
  });
6238
6238
  Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
6239
6239
  enumerable: true,
@@ -6271,14 +6271,6 @@ Object.defineProperty(exports, "useNotify", {
6271
6271
  enumerable: true,
6272
6272
  get: function () { return chunkZ4M7JB4L_cjs.useNotify; }
6273
6273
  });
6274
- Object.defineProperty(exports, "ArbiProvider", {
6275
- enumerable: true,
6276
- get: function () { return chunkZMTLGO3K_cjs.ArbiProvider; }
6277
- });
6278
- Object.defineProperty(exports, "useArbi", {
6279
- enumerable: true,
6280
- get: function () { return chunkZMTLGO3K_cjs.useArbi; }
6281
- });
6282
6274
  Object.defineProperty(exports, "AgentBadge", {
6283
6275
  enumerable: true,
6284
6276
  get: function () { return chunkX3F5ABY2_cjs.AgentBadge; }
@@ -6935,6 +6927,14 @@ Object.defineProperty(exports, "cn", {
6935
6927
  enumerable: true,
6936
6928
  get: function () { return chunkS6A6FSG7_cjs.cn; }
6937
6929
  });
6930
+ Object.defineProperty(exports, "ArbiProvider", {
6931
+ enumerable: true,
6932
+ get: function () { return chunkZMTLGO3K_cjs.ArbiProvider; }
6933
+ });
6934
+ Object.defineProperty(exports, "useArbi", {
6935
+ enumerable: true,
6936
+ get: function () { return chunkZMTLGO3K_cjs.useArbi; }
6937
+ });
6938
6938
  Object.defineProperty(exports, "Arbi", {
6939
6939
  enumerable: true,
6940
6940
  get: function () { return browser.Arbi; }