@arbidocs/react 0.4.150 → 0.4.152
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/artifacts/index.cjs +7 -7
- package/dist/artifacts/index.js +1 -1
- package/dist/{chunk-IQIDM3KM.cjs → chunk-I7UUV7FP.cjs} +11 -3
- package/dist/chunk-I7UUV7FP.cjs.map +1 -0
- package/dist/{chunk-JQ7Y723H.js → chunk-OKDZDDJM.js} +11 -3
- package/dist/chunk-OKDZDDJM.js.map +1 -0
- package/dist/index.cjs +229 -229
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-IQIDM3KM.cjs.map +0 -1
- package/dist/chunk-JQ7Y723H.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkI7UUV7FP_cjs = require('./chunk-I7UUV7FP.cjs');
|
|
4
4
|
var chunkL57RRAII_cjs = require('./chunk-L57RRAII.cjs');
|
|
5
5
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
6
6
|
require('./chunk-VOFNX4P6.cjs');
|
|
@@ -43,7 +43,7 @@ function useUpdateConversation() {
|
|
|
43
43
|
conversationId,
|
|
44
44
|
patch
|
|
45
45
|
}) => arbi.conversations.update(conversationId, patch),
|
|
46
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
46
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function useCreateWork() {
|
|
@@ -51,7 +51,7 @@ function useCreateWork() {
|
|
|
51
51
|
const qc = reactQuery.useQueryClient();
|
|
52
52
|
return reactQuery.useMutation({
|
|
53
53
|
mutationFn: (body) => arbi.conversations.createWork(body),
|
|
54
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
54
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
function useRunConversation() {
|
|
@@ -59,7 +59,7 @@ function useRunConversation() {
|
|
|
59
59
|
const qc = reactQuery.useQueryClient();
|
|
60
60
|
return reactQuery.useMutation({
|
|
61
61
|
mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
|
|
62
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
62
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function useActOnStep() {
|
|
@@ -70,7 +70,7 @@ function useActOnStep() {
|
|
|
70
70
|
conversationId,
|
|
71
71
|
body
|
|
72
72
|
}) => arbi.conversations.actOnStep(conversationId, body),
|
|
73
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
73
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
function useSendBackStep() {
|
|
@@ -83,7 +83,7 @@ function useSendBackStep() {
|
|
|
83
83
|
to,
|
|
84
84
|
note
|
|
85
85
|
}) => arbi.conversations.sendBackStep(conversationId, step, { to, note }),
|
|
86
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
86
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function usePlanWork() {
|
|
@@ -95,7 +95,7 @@ function usePlanWork() {
|
|
|
95
95
|
function useConversationPendingAuth(conversationId, options) {
|
|
96
96
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
97
97
|
return reactQuery.useQuery({
|
|
98
|
-
queryKey: [...
|
|
98
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
|
|
99
99
|
queryFn: () => arbi.conversations.pendingAuth(conversationId),
|
|
100
100
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
101
101
|
retry: false
|
|
@@ -104,7 +104,7 @@ function useConversationPendingAuth(conversationId, options) {
|
|
|
104
104
|
function useConversationActivity(conversationId, options) {
|
|
105
105
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
106
106
|
return reactQuery.useQuery({
|
|
107
|
-
queryKey:
|
|
107
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.conversationActivity(conversationId ?? ""),
|
|
108
108
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
109
109
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
110
110
|
refetchInterval: options?.live ? 2500 : false
|
|
@@ -113,7 +113,7 @@ function useConversationActivity(conversationId, options) {
|
|
|
113
113
|
function useWorkflows(options) {
|
|
114
114
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
115
115
|
return reactQuery.useQuery({
|
|
116
|
-
queryKey:
|
|
116
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflows(),
|
|
117
117
|
queryFn: () => arbi.workflows.list(),
|
|
118
118
|
// A clock or event can fire while the list is open, without a write here.
|
|
119
119
|
refetchInterval: options?.live ? 1e4 : false,
|
|
@@ -123,7 +123,7 @@ function useWorkflows(options) {
|
|
|
123
123
|
function useWorkflowRuns(workflowId) {
|
|
124
124
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
125
125
|
return reactQuery.useQuery({
|
|
126
|
-
queryKey:
|
|
126
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflowRuns(workflowId ?? ""),
|
|
127
127
|
queryFn: () => arbi.workflows.runs(workflowId),
|
|
128
128
|
enabled: !!workflowId && arbi.isLoggedIn,
|
|
129
129
|
refetchInterval: 3e3,
|
|
@@ -136,7 +136,7 @@ function useCreateWorkflow() {
|
|
|
136
136
|
const qc = reactQuery.useQueryClient();
|
|
137
137
|
return reactQuery.useMutation({
|
|
138
138
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
139
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
139
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflows() })
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
function useUpdateWorkflow() {
|
|
@@ -147,7 +147,7 @@ function useUpdateWorkflow() {
|
|
|
147
147
|
workflowId,
|
|
148
148
|
patch
|
|
149
149
|
}) => arbi.workflows.update(workflowId, patch),
|
|
150
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
150
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflows() })
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
function useDeleteWorkflow() {
|
|
@@ -155,18 +155,18 @@ function useDeleteWorkflow() {
|
|
|
155
155
|
const qc = reactQuery.useQueryClient();
|
|
156
156
|
return reactQuery.useMutation({
|
|
157
157
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
158
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
158
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflows() })
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
function useRunWorkflow() {
|
|
162
162
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
163
163
|
const qc = reactQuery.useQueryClient();
|
|
164
164
|
return reactQuery.useMutation({
|
|
165
|
-
mutationKey:
|
|
165
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.runWorkflow(),
|
|
166
166
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
167
167
|
onSuccess: () => Promise.all([
|
|
168
|
-
qc.invalidateQueries({ queryKey:
|
|
169
|
-
qc.invalidateQueries({ queryKey:
|
|
168
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workflows() }),
|
|
169
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
170
170
|
])
|
|
171
171
|
});
|
|
172
172
|
}
|
|
@@ -175,7 +175,7 @@ function useCreateAgent() {
|
|
|
175
175
|
const qc = reactQuery.useQueryClient();
|
|
176
176
|
return reactQuery.useMutation({
|
|
177
177
|
mutationFn: (name) => arbi.agents.create(name),
|
|
178
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
178
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agents() })
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
function useGenerateAgentAvatar() {
|
|
@@ -183,13 +183,13 @@ function useGenerateAgentAvatar() {
|
|
|
183
183
|
const qc = reactQuery.useQueryClient();
|
|
184
184
|
return reactQuery.useMutation({
|
|
185
185
|
mutationFn: ({ agentExtId, prompt }) => arbi.agents.generateAvatar(agentExtId, prompt),
|
|
186
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
186
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agents() })
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
function useAuthorizeLimits(options) {
|
|
190
190
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
191
191
|
return reactQuery.useQuery({
|
|
192
|
-
queryKey:
|
|
192
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.authorizeLimits(),
|
|
193
193
|
queryFn: () => arbi.agents.authorizeLimits(),
|
|
194
194
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
195
195
|
});
|
|
@@ -197,7 +197,7 @@ function useAuthorizeLimits(options) {
|
|
|
197
197
|
function useMcpTools(options) {
|
|
198
198
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
199
199
|
return reactQuery.useQuery({
|
|
200
|
-
queryKey:
|
|
200
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.mcpTools(),
|
|
201
201
|
queryFn: () => arbi.health.mcpTools(),
|
|
202
202
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
203
203
|
});
|
|
@@ -205,7 +205,7 @@ function useMcpTools(options) {
|
|
|
205
205
|
function useAgentConfig(agentExtId, options) {
|
|
206
206
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
207
207
|
return reactQuery.useQuery({
|
|
208
|
-
queryKey:
|
|
208
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
209
209
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
210
210
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
211
211
|
});
|
|
@@ -213,7 +213,7 @@ function useAgentConfig(agentExtId, options) {
|
|
|
213
213
|
function useAgentModels(options) {
|
|
214
214
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
215
215
|
return reactQuery.useQuery({
|
|
216
|
-
queryKey:
|
|
216
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.models(),
|
|
217
217
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
218
218
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
219
219
|
});
|
|
@@ -236,17 +236,17 @@ function useSaveAgentConfig() {
|
|
|
236
236
|
});
|
|
237
237
|
},
|
|
238
238
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
239
|
-
qc.invalidateQueries({ queryKey:
|
|
240
|
-
qc.invalidateQueries({ queryKey:
|
|
239
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.configs() }),
|
|
240
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
241
241
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
242
|
-
qc.invalidateQueries({ queryKey:
|
|
242
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agents() })
|
|
243
243
|
])
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
function useAgentWorkspaces(agentExtId, options) {
|
|
247
247
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
248
248
|
return reactQuery.useQuery({
|
|
249
|
-
queryKey:
|
|
249
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
250
250
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
251
251
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
252
252
|
});
|
|
@@ -267,7 +267,7 @@ function useGrantAgentAccess() {
|
|
|
267
267
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
268
268
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
269
269
|
},
|
|
270
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
270
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
function useRevokeAgentAccess() {
|
|
@@ -286,13 +286,13 @@ function useRevokeAgentAccess() {
|
|
|
286
286
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
289
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
function useSkills(options) {
|
|
293
293
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
294
294
|
return reactQuery.useQuery({
|
|
295
|
-
queryKey: [...
|
|
295
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
296
296
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
297
297
|
refetchInterval: options?.live ? 5e3 : false,
|
|
298
298
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -324,13 +324,13 @@ function useUploadSkillFiles() {
|
|
|
324
324
|
}
|
|
325
325
|
return results;
|
|
326
326
|
},
|
|
327
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
327
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.skills() })
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
function useSkillSource(docExtId, options) {
|
|
331
331
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
332
332
|
return reactQuery.useQuery({
|
|
333
|
-
queryKey:
|
|
333
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.skillSource(docExtId ?? ""),
|
|
334
334
|
queryFn: async () => {
|
|
335
335
|
const response = await arbi.documents.download(docExtId);
|
|
336
336
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
@@ -345,7 +345,7 @@ function useDeleteSkill() {
|
|
|
345
345
|
const qc = reactQuery.useQueryClient();
|
|
346
346
|
return reactQuery.useMutation({
|
|
347
347
|
mutationFn: (docExtId) => arbi.documents.delete([docExtId]),
|
|
348
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
348
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.skills() })
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
function useSetSkillVisibility() {
|
|
@@ -353,7 +353,7 @@ function useSetSkillVisibility() {
|
|
|
353
353
|
const qc = reactQuery.useQueryClient();
|
|
354
354
|
return reactQuery.useMutation({
|
|
355
355
|
mutationFn: ({ docExtId, visibility }) => arbi.documents.update([{ external_id: docExtId, shared: visibility === "global" }]),
|
|
356
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
356
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.skills() })
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
function useStartWorkQuery() {
|
|
@@ -380,13 +380,13 @@ function useStartWorkQuery() {
|
|
|
380
380
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
381
381
|
);
|
|
382
382
|
},
|
|
383
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
383
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allConversations() })
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
function useAgentSession(agentId, options) {
|
|
387
387
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
388
388
|
return reactQuery.useQuery({
|
|
389
|
-
queryKey:
|
|
389
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentSession(agentId ?? ""),
|
|
390
390
|
queryFn: () => arbi.agents.getSession(agentId),
|
|
391
391
|
enabled: !!agentId && arbi.isLoggedIn && (options?.enabled ?? true),
|
|
392
392
|
refetchInterval: 5e3
|
|
@@ -395,7 +395,7 @@ function useAgentSession(agentId, options) {
|
|
|
395
395
|
function useAgentChats(agentId) {
|
|
396
396
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
397
397
|
return reactQuery.useQuery({
|
|
398
|
-
queryKey:
|
|
398
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.agentChats(agentId ?? ""),
|
|
399
399
|
queryFn: () => arbi.agents.listChats(agentId),
|
|
400
400
|
enabled: !!agentId && arbi.isLoggedIn,
|
|
401
401
|
refetchInterval: 5e3
|
|
@@ -404,10 +404,10 @@ function useAgentChats(agentId) {
|
|
|
404
404
|
function refreshAgentSession(qc, agentId) {
|
|
405
405
|
return Promise.all(
|
|
406
406
|
[
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.agentSession(agentId),
|
|
408
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.agentWorkspaces(agentId),
|
|
409
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.agentChats(agentId),
|
|
410
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.sessions()
|
|
411
411
|
].map((queryKey) => qc.invalidateQueries({ queryKey }))
|
|
412
412
|
);
|
|
413
413
|
}
|
|
@@ -555,8 +555,8 @@ function useArbiChat(options = {}) {
|
|
|
555
555
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
556
556
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
557
557
|
const queryClient = reactQuery.useQueryClient();
|
|
558
|
-
const { data: docs = [], isLoading: isLoadingDocuments } =
|
|
559
|
-
const ordinaryHistory =
|
|
558
|
+
const { data: docs = [], isLoading: isLoadingDocuments } = chunkI7UUV7FP_cjs.useDocuments(workspaceId);
|
|
559
|
+
const ordinaryHistory = chunkI7UUV7FP_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
560
560
|
const agentHistory = useAgentChats(agentId);
|
|
561
561
|
const stored = React3.useMemo(
|
|
562
562
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -571,7 +571,7 @@ function useArbiChat(options = {}) {
|
|
|
571
571
|
);
|
|
572
572
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
573
573
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
574
|
-
const query =
|
|
574
|
+
const query = chunkI7UUV7FP_cjs.useAssistantQuery();
|
|
575
575
|
const { mutateAsync } = query;
|
|
576
576
|
const [stagedFiles, setStagedFiles] = React3.useState([]);
|
|
577
577
|
const [threads, setThreads] = React3.useState(() => [emptyThread()]);
|
|
@@ -631,7 +631,7 @@ function useArbiChat(options = {}) {
|
|
|
631
631
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
632
632
|
) || active.messages.some((message) => message.status === "streaming");
|
|
633
633
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
634
|
-
const loaded =
|
|
634
|
+
const loaded = chunkI7UUV7FP_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
635
635
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
636
636
|
live: liveHistory
|
|
637
637
|
});
|
|
@@ -1106,7 +1106,7 @@ function useArbiChat(options = {}) {
|
|
|
1106
1106
|
} else
|
|
1107
1107
|
uploaded.push(...(await arbi.documents.uploadFile(file, file.name)).doc_ext_ids ?? []);
|
|
1108
1108
|
}
|
|
1109
|
-
if (uploaded.length) await
|
|
1109
|
+
if (uploaded.length) await chunkI7UUV7FP_cjs.refreshDocuments(queryClient, arbi, uploaded);
|
|
1110
1110
|
} catch (e) {
|
|
1111
1111
|
setUploadError(messageOf(e, "The upload failed."));
|
|
1112
1112
|
} finally {
|
|
@@ -1408,14 +1408,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1408
1408
|
if (!workspaceId) return;
|
|
1409
1409
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1410
1410
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1411
|
-
if (msg.doc_ext_ids?.length) void
|
|
1412
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1411
|
+
if (msg.doc_ext_ids?.length) void chunkI7UUV7FP_cjs.refreshDocuments(queryClient, arbi, msg.doc_ext_ids);
|
|
1412
|
+
void queryClient.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
1415
|
if (client.isMessageType(msg, "task_update")) {
|
|
1416
1416
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1417
|
-
if (
|
|
1418
|
-
void
|
|
1417
|
+
if (chunkI7UUV7FP_cjs.FINISHED_DOCUMENT_STATUSES.has(msg.status))
|
|
1418
|
+
void chunkI7UUV7FP_cjs.refreshDocuments(queryClient, arbi, [msg.doc_ext_id]);
|
|
1419
1419
|
}
|
|
1420
1420
|
});
|
|
1421
1421
|
}
|
|
@@ -1543,7 +1543,7 @@ function useShellWorkspaces(options) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
function useArbiShellWorkspaces(options = {}) {
|
|
1545
1545
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1546
|
-
const query =
|
|
1546
|
+
const query = chunkI7UUV7FP_cjs.useWorkspaces();
|
|
1547
1547
|
const { select, ...rest } = options;
|
|
1548
1548
|
const defaultSelect = React3.useCallback(
|
|
1549
1549
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1562,7 +1562,7 @@ function useUpdateWorkspace() {
|
|
|
1562
1562
|
const qc = reactQuery.useQueryClient();
|
|
1563
1563
|
return reactQuery.useMutation({
|
|
1564
1564
|
mutationFn: (body) => arbi.workspaces.update(body),
|
|
1565
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1565
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() })
|
|
1566
1566
|
});
|
|
1567
1567
|
}
|
|
1568
1568
|
var MEMBERS_STALE_MS = 15 * 60 * 1e3;
|
|
@@ -1570,7 +1570,7 @@ function useWorkspaceUsers(workspaceId, options) {
|
|
|
1570
1570
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1571
1571
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1572
1572
|
return reactQuery.useQuery({
|
|
1573
|
-
queryKey:
|
|
1573
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaceUsers(workspace),
|
|
1574
1574
|
enabled: !!workspace && (options?.enabled ?? arbi.hasWorkspace),
|
|
1575
1575
|
queryFn: async () => {
|
|
1576
1576
|
await options?.beforeFetch?.();
|
|
@@ -1582,21 +1582,21 @@ function useWorkspaceUsers(workspaceId, options) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
function settleMembership(qc) {
|
|
1584
1584
|
return Promise.all([
|
|
1585
|
-
qc.invalidateQueries({ queryKey:
|
|
1586
|
-
qc.invalidateQueries({ queryKey:
|
|
1585
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allWorkspaceUsers() }),
|
|
1586
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() }),
|
|
1587
1587
|
// A project's collaborator quota counts workspace members.
|
|
1588
|
-
qc.invalidateQueries({ queryKey:
|
|
1588
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects() })
|
|
1589
1589
|
]);
|
|
1590
1590
|
}
|
|
1591
1591
|
function useAddWorkspaceMembers() {
|
|
1592
1592
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1593
1593
|
const qc = reactQuery.useQueryClient();
|
|
1594
1594
|
return reactQuery.useMutation({
|
|
1595
|
-
mutationKey:
|
|
1595
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.workspaceMembership(),
|
|
1596
1596
|
mutationFn: (request) => arbi.workspaces.addMembers(request),
|
|
1597
1597
|
onSuccess: () => Promise.all([
|
|
1598
1598
|
settleMembership(qc),
|
|
1599
|
-
qc.invalidateQueries({ queryKey:
|
|
1599
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.contacts() })
|
|
1600
1600
|
])
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
@@ -1604,7 +1604,7 @@ function useRemoveWorkspaceMembers() {
|
|
|
1604
1604
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1605
1605
|
const qc = reactQuery.useQueryClient();
|
|
1606
1606
|
return reactQuery.useMutation({
|
|
1607
|
-
mutationKey:
|
|
1607
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.workspaceMembership(),
|
|
1608
1608
|
mutationFn: (userIds) => arbi.workspaces.removeUsers(userIds),
|
|
1609
1609
|
onSuccess: () => settleMembership(qc)
|
|
1610
1610
|
});
|
|
@@ -1613,11 +1613,11 @@ function useSetWorkspaceMemberRoles() {
|
|
|
1613
1613
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1614
1614
|
const qc = reactQuery.useQueryClient();
|
|
1615
1615
|
return reactQuery.useMutation({
|
|
1616
|
-
mutationKey:
|
|
1616
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.setWorkspaceMemberRoles(),
|
|
1617
1617
|
mutationFn: ({ userIds, role }) => arbi.workspaces.setUserRole(userIds, role),
|
|
1618
1618
|
onSuccess: () => Promise.all([
|
|
1619
|
-
qc.invalidateQueries({ queryKey:
|
|
1620
|
-
qc.invalidateQueries({ queryKey:
|
|
1619
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allWorkspaceUsers() }),
|
|
1620
|
+
qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() })
|
|
1621
1621
|
])
|
|
1622
1622
|
});
|
|
1623
1623
|
}
|
|
@@ -1626,7 +1626,7 @@ function useFacts(workspaceId, options) {
|
|
|
1626
1626
|
const { enabled = true, ...filter } = options ?? {};
|
|
1627
1627
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1628
1628
|
return reactQuery.useQuery({
|
|
1629
|
-
queryKey: [...
|
|
1629
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.facts(workspace), filter],
|
|
1630
1630
|
queryFn: () => arbi.facts.list(filter),
|
|
1631
1631
|
enabled: enabled && !!workspace && arbi.hasWorkspace,
|
|
1632
1632
|
staleTime: 3e4
|
|
@@ -1634,7 +1634,7 @@ function useFacts(workspaceId, options) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
function useRefreshFacts() {
|
|
1636
1636
|
const qc = reactQuery.useQueryClient();
|
|
1637
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1637
|
+
return () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allFacts() });
|
|
1638
1638
|
}
|
|
1639
1639
|
function useCreateFact() {
|
|
1640
1640
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -1688,7 +1688,7 @@ function usePassageQuotes(docIds) {
|
|
|
1688
1688
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1689
1689
|
const passages = reactQuery.useQueries({
|
|
1690
1690
|
queries: [...new Set(docIds ?? [])].map((docId) => ({
|
|
1691
|
-
queryKey:
|
|
1691
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.parsedDoc(docId, "final"),
|
|
1692
1692
|
queryFn: () => arbi.documents.getParsedContent(docId, "final"),
|
|
1693
1693
|
enabled: arbi.hasWorkspace,
|
|
1694
1694
|
staleTime: PARSED_STALE_TIME
|
|
@@ -1718,7 +1718,7 @@ function useDocumentsSupport() {
|
|
|
1718
1718
|
function applyOptimisticDocumentEdit(qc, updates) {
|
|
1719
1719
|
const byId = new Map(updates.map((update) => [update.external_id, update]));
|
|
1720
1720
|
const previous = [];
|
|
1721
|
-
|
|
1721
|
+
chunkI7UUV7FP_cjs.patchDocuments(qc, (old) => {
|
|
1722
1722
|
let changed = false;
|
|
1723
1723
|
const next = old.map((doc) => {
|
|
1724
1724
|
const update = byId.get(doc.external_id);
|
|
@@ -1731,9 +1731,9 @@ function applyOptimisticDocumentEdit(qc, updates) {
|
|
|
1731
1731
|
});
|
|
1732
1732
|
const previousOwn = updates.map((update) => {
|
|
1733
1733
|
const own = qc.getQueryData(
|
|
1734
|
-
|
|
1734
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.document(update.external_id)
|
|
1735
1735
|
);
|
|
1736
|
-
if (own)
|
|
1736
|
+
if (own) chunkI7UUV7FP_cjs.setCachedDocument(qc, { ...own, ...update });
|
|
1737
1737
|
return [update.external_id, own];
|
|
1738
1738
|
});
|
|
1739
1739
|
return { optimistic: true, previous, previousOwn };
|
|
@@ -1743,38 +1743,38 @@ function rollbackOptimisticDocumentEdit(qc, context) {
|
|
|
1743
1743
|
if (!edit?.optimistic) return;
|
|
1744
1744
|
if (edit.previous.length) {
|
|
1745
1745
|
const restore = new Map(edit.previous.map((doc) => [doc.external_id, doc]));
|
|
1746
|
-
|
|
1746
|
+
chunkI7UUV7FP_cjs.patchDocuments(
|
|
1747
1747
|
qc,
|
|
1748
1748
|
(old) => old.some((doc) => restore.has(doc.external_id)) ? old.map((doc) => restore.get(doc.external_id) ?? doc) : old
|
|
1749
1749
|
);
|
|
1750
1750
|
}
|
|
1751
|
-
for (const [id, own] of edit.previousOwn) qc.setQueryData(
|
|
1751
|
+
for (const [id, own] of edit.previousOwn) qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.document(id), own);
|
|
1752
1752
|
}
|
|
1753
1753
|
function settleUpdatedDocuments(qc, updated) {
|
|
1754
1754
|
if (!updated.length) return;
|
|
1755
1755
|
const byId = new Map(updated.map((doc) => [doc.external_id, doc]));
|
|
1756
|
-
|
|
1756
|
+
chunkI7UUV7FP_cjs.patchDocuments(
|
|
1757
1757
|
qc,
|
|
1758
1758
|
(old) => old.some((doc) => byId.has(doc.external_id)) ? old.map((doc) => byId.get(doc.external_id) ?? doc) : old
|
|
1759
1759
|
);
|
|
1760
|
-
for (const doc of updated)
|
|
1760
|
+
for (const doc of updated) chunkI7UUV7FP_cjs.setCachedDocument(qc, doc);
|
|
1761
1761
|
}
|
|
1762
1762
|
function patchEachDocument(qc, docIds, reducer) {
|
|
1763
1763
|
const ids = new Set(docIds);
|
|
1764
|
-
|
|
1764
|
+
chunkI7UUV7FP_cjs.patchDocuments(
|
|
1765
1765
|
qc,
|
|
1766
1766
|
(old) => old.some((doc) => ids.has(doc.external_id)) ? old.map((doc) => ids.has(doc.external_id) ? reducer(doc) : doc) : old
|
|
1767
1767
|
);
|
|
1768
|
-
for (const id of ids)
|
|
1768
|
+
for (const id of ids) chunkI7UUV7FP_cjs.patchCachedDocument(qc, id, reducer);
|
|
1769
1769
|
}
|
|
1770
1770
|
function workspaceOf(qc, docId) {
|
|
1771
1771
|
for (const [, docs] of qc.getQueriesData({
|
|
1772
|
-
queryKey:
|
|
1772
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allDocuments()
|
|
1773
1773
|
})) {
|
|
1774
1774
|
const doc = Array.isArray(docs) ? docs.find((d) => d.external_id === docId) : void 0;
|
|
1775
1775
|
if (doc) return doc.workspace_ext_id;
|
|
1776
1776
|
}
|
|
1777
|
-
return qc.getQueryData(
|
|
1777
|
+
return qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.document(docId))?.workspace_ext_id;
|
|
1778
1778
|
}
|
|
1779
1779
|
function settleAssignedDocTags(qc, created) {
|
|
1780
1780
|
const byDoc = /* @__PURE__ */ new Map();
|
|
@@ -1792,13 +1792,13 @@ function settleAssignedDocTags(qc, created) {
|
|
|
1792
1792
|
...doc,
|
|
1793
1793
|
doctags: [...doc.doctags ?? [], ...byDoc.get(doc.external_id) ?? []]
|
|
1794
1794
|
}));
|
|
1795
|
-
for (const [workspaceId, delta] of workspaces)
|
|
1795
|
+
for (const [workspaceId, delta] of workspaces) chunkI7UUV7FP_cjs.adjustTagCounts(qc, workspaceId, delta);
|
|
1796
1796
|
}
|
|
1797
1797
|
function settleRemovedDocTags(qc, { tagId, docIds }) {
|
|
1798
1798
|
const ids = new Set(docIds);
|
|
1799
1799
|
const removedByWorkspace = /* @__PURE__ */ new Map();
|
|
1800
1800
|
for (const [, docs] of qc.getQueriesData({
|
|
1801
|
-
queryKey:
|
|
1801
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allDocuments()
|
|
1802
1802
|
})) {
|
|
1803
1803
|
for (const doc of Array.isArray(docs) ? docs : []) {
|
|
1804
1804
|
if (!ids.has(doc.external_id)) continue;
|
|
@@ -1814,7 +1814,7 @@ function settleRemovedDocTags(qc, { tagId, docIds }) {
|
|
|
1814
1814
|
doctags: (doc.doctags ?? []).filter((dt) => dt.tag_ext_id !== tagId)
|
|
1815
1815
|
}));
|
|
1816
1816
|
for (const [workspaceId, removed] of removedByWorkspace)
|
|
1817
|
-
|
|
1817
|
+
chunkI7UUV7FP_cjs.adjustTagCounts(qc, workspaceId, /* @__PURE__ */ new Map([[tagId, -removed]]));
|
|
1818
1818
|
}
|
|
1819
1819
|
function settleUpdatedDocTag(qc, updated) {
|
|
1820
1820
|
patchEachDocument(qc, [updated.doc_ext_id], (doc) => ({
|
|
@@ -1824,22 +1824,22 @@ function settleUpdatedDocTag(qc, updated) {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
var replayableDocumentMutations = [
|
|
1826
1826
|
{
|
|
1827
|
-
mutationKey:
|
|
1827
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.updateDocuments(),
|
|
1828
1828
|
run: (client, input) => browser.documents.updateDocuments(client, input.documents),
|
|
1829
1829
|
settle: (qc, updated) => settleUpdatedDocuments(qc, updated)
|
|
1830
1830
|
},
|
|
1831
1831
|
{
|
|
1832
|
-
mutationKey:
|
|
1832
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.assignDocTags(),
|
|
1833
1833
|
run: (client, input) => browser.doctags.assignDocTags(client, input.tagId, input.docIds, input.note, input.citations),
|
|
1834
1834
|
settle: (qc, created) => settleAssignedDocTags(qc, created)
|
|
1835
1835
|
},
|
|
1836
1836
|
{
|
|
1837
|
-
mutationKey:
|
|
1837
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.removeDocTags(),
|
|
1838
1838
|
run: (client, input) => browser.doctags.removeDocTags(client, input.tagId, input.docIds),
|
|
1839
1839
|
settle: (qc, _data, input) => settleRemovedDocTags(qc, input)
|
|
1840
1840
|
},
|
|
1841
1841
|
{
|
|
1842
|
-
mutationKey:
|
|
1842
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.updateDocTag(),
|
|
1843
1843
|
run: (client, input) => browser.doctags.updateDocTag(client, input.tagId, input.docId, {
|
|
1844
1844
|
note: input.note,
|
|
1845
1845
|
citations: input.citations
|
|
@@ -1862,7 +1862,7 @@ function useUpdateDocuments() {
|
|
|
1862
1862
|
const qc = reactQuery.useQueryClient();
|
|
1863
1863
|
return resolvingOffline(
|
|
1864
1864
|
reactQuery.useMutation({
|
|
1865
|
-
mutationKey:
|
|
1865
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.updateDocuments(),
|
|
1866
1866
|
mutationFn: ({ documents }) => arbi.documents.update(documents),
|
|
1867
1867
|
onMutate: ({ documents }) => reactQuery.onlineManager.isOnline() || !documents.length ? void 0 : applyOptimisticDocumentEdit(qc, documents),
|
|
1868
1868
|
onError: (_error, _input, context) => rollbackOptimisticDocumentEdit(qc, context),
|
|
@@ -1875,30 +1875,30 @@ function useDeleteDocuments() {
|
|
|
1875
1875
|
const qc = reactQuery.useQueryClient();
|
|
1876
1876
|
const { onDocumentsDeleted } = useDocumentsSupport();
|
|
1877
1877
|
return reactQuery.useMutation({
|
|
1878
|
-
mutationKey:
|
|
1878
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.deleteDocuments(),
|
|
1879
1879
|
mutationFn: (docIds) => arbi.documents.delete(docIds),
|
|
1880
1880
|
onSuccess: (_data, docIds) => {
|
|
1881
1881
|
const gone = new Set(docIds);
|
|
1882
|
-
|
|
1882
|
+
chunkI7UUV7FP_cjs.patchDocuments(
|
|
1883
1883
|
qc,
|
|
1884
1884
|
(old) => old.some((doc) => gone.has(doc.external_id)) ? old.filter((doc) => !gone.has(doc.external_id)) : old
|
|
1885
1885
|
);
|
|
1886
|
-
|
|
1886
|
+
chunkI7UUV7FP_cjs.forgetDocuments(qc, docIds);
|
|
1887
1887
|
onDocumentsDeleted?.(docIds);
|
|
1888
|
-
return qc.invalidateQueries({ queryKey:
|
|
1888
|
+
return qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
1889
1889
|
}
|
|
1890
1890
|
});
|
|
1891
1891
|
}
|
|
1892
1892
|
async function settleUpload(qc, arbi, docIds, processingStatus) {
|
|
1893
|
-
if (docIds?.length) await
|
|
1894
|
-
await qc.invalidateQueries({ queryKey:
|
|
1893
|
+
if (docIds?.length) await chunkI7UUV7FP_cjs.refreshDocuments(qc, arbi, docIds, { processingStatus });
|
|
1894
|
+
await qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
1895
1895
|
}
|
|
1896
1896
|
function useUploadDocuments() {
|
|
1897
1897
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1898
1898
|
const qc = reactQuery.useQueryClient();
|
|
1899
1899
|
const { processingStatus } = useDocumentsSupport();
|
|
1900
1900
|
return reactQuery.useMutation({
|
|
1901
|
-
mutationKey:
|
|
1901
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.uploadDocuments(),
|
|
1902
1902
|
mutationFn: ({ files, options }) => arbi.documents.upload(files, options),
|
|
1903
1903
|
onSuccess: (result) => settleUpload(qc, arbi, result.doc_ext_ids, processingStatus)
|
|
1904
1904
|
});
|
|
@@ -1908,7 +1908,7 @@ function useUploadUrls() {
|
|
|
1908
1908
|
const qc = reactQuery.useQueryClient();
|
|
1909
1909
|
const { processingStatus } = useDocumentsSupport();
|
|
1910
1910
|
return reactQuery.useMutation({
|
|
1911
|
-
mutationKey:
|
|
1911
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.uploadUrls(),
|
|
1912
1912
|
mutationFn: ({ urls, shared, configExtId }) => arbi.documents.uploadUrl(urls, { shared, configExtId }),
|
|
1913
1913
|
onSuccess: (result) => settleUpload(qc, arbi, result.doc_ext_ids, processingStatus)
|
|
1914
1914
|
});
|
|
@@ -1918,7 +1918,7 @@ function useAssignDocTags() {
|
|
|
1918
1918
|
const qc = reactQuery.useQueryClient();
|
|
1919
1919
|
return resolvingOffline(
|
|
1920
1920
|
reactQuery.useMutation({
|
|
1921
|
-
mutationKey:
|
|
1921
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.assignDocTags(),
|
|
1922
1922
|
mutationFn: ({ tagId, docIds, note, citations }) => arbi.doctags.assign(tagId, docIds, note, citations),
|
|
1923
1923
|
onSuccess: (created) => settleAssignedDocTags(qc, created)
|
|
1924
1924
|
})
|
|
@@ -1929,7 +1929,7 @@ function useRemoveDocTags() {
|
|
|
1929
1929
|
const qc = reactQuery.useQueryClient();
|
|
1930
1930
|
return resolvingOffline(
|
|
1931
1931
|
reactQuery.useMutation({
|
|
1932
|
-
mutationKey:
|
|
1932
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.removeDocTags(),
|
|
1933
1933
|
mutationFn: ({ tagId, docIds }) => arbi.doctags.remove(tagId, docIds),
|
|
1934
1934
|
onSuccess: (_data, input) => settleRemovedDocTags(qc, input)
|
|
1935
1935
|
})
|
|
@@ -1940,7 +1940,7 @@ function useUpdateDocTag() {
|
|
|
1940
1940
|
const qc = reactQuery.useQueryClient();
|
|
1941
1941
|
return resolvingOffline(
|
|
1942
1942
|
reactQuery.useMutation({
|
|
1943
|
-
mutationKey:
|
|
1943
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.updateDocTag(),
|
|
1944
1944
|
mutationFn: ({ tagId, docId, note, citations }) => arbi.doctags.update(tagId, docId, { note, citations }),
|
|
1945
1945
|
onSuccess: (updated) => settleUpdatedDocTag(qc, updated)
|
|
1946
1946
|
})
|
|
@@ -1951,13 +1951,13 @@ function useGenerateDocTags() {
|
|
|
1951
1951
|
const qc = reactQuery.useQueryClient();
|
|
1952
1952
|
const { onProcessingQueued } = useDocumentsSupport();
|
|
1953
1953
|
return reactQuery.useMutation({
|
|
1954
|
-
mutationKey:
|
|
1954
|
+
mutationKey: chunkI7UUV7FP_cjs.arbiMutationKeys.generateDocTags(),
|
|
1955
1955
|
mutationFn: ({ tagIds, docIds, overwrite }) => arbi.doctags.generate(tagIds, docIds, { overwrite }),
|
|
1956
1956
|
onMutate: ({ docIds }) => {
|
|
1957
1957
|
if (!onProcessingQueued || !docIds.length) return void 0;
|
|
1958
1958
|
const workspaceId = arbi.hasWorkspace ? arbi.getWorkspaceId() : "";
|
|
1959
1959
|
const listed = new Map(
|
|
1960
|
-
(
|
|
1960
|
+
(chunkI7UUV7FP_cjs.getCachedDocuments(qc, workspaceId) ?? []).map((doc) => [doc.external_id, doc])
|
|
1961
1961
|
);
|
|
1962
1962
|
return {
|
|
1963
1963
|
undo: onProcessingQueued(
|
|
@@ -1979,13 +1979,13 @@ function useFinaliseTranslation() {
|
|
|
1979
1979
|
const { processingStatus } = useDocumentsSupport();
|
|
1980
1980
|
return reactQuery.useMutation({
|
|
1981
1981
|
mutationFn: (docId) => arbi.documents.finaliseTranslation(docId),
|
|
1982
|
-
onSuccess: (result) => void
|
|
1982
|
+
onSuccess: (result) => void chunkI7UUV7FP_cjs.refreshDocuments(qc, arbi, [result.document_ext_id], { processingStatus })
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
1985
|
|
|
1986
1986
|
// src/offline.ts
|
|
1987
1987
|
var REPLAYABLE = [
|
|
1988
|
-
...
|
|
1988
|
+
...chunkI7UUV7FP_cjs.replayableTagMutations,
|
|
1989
1989
|
...replayableDocumentMutations
|
|
1990
1990
|
];
|
|
1991
1991
|
function isReplayableArbiMutation(mutationKey) {
|
|
@@ -2015,13 +2015,13 @@ function isRestorableArbiQueryOnline(queryKey, data) {
|
|
|
2015
2015
|
const docs = Array.isArray(data) ? data : [data];
|
|
2016
2016
|
return !docs.some((doc) => {
|
|
2017
2017
|
const status = doc?.status;
|
|
2018
|
-
return !!status && !
|
|
2018
|
+
return !!status && !chunkI7UUV7FP_cjs.FINISHED_DOCUMENT_STATUSES.has(status);
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
2021
|
function useFilteredProjects(filters, options) {
|
|
2022
2022
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2023
2023
|
return reactQuery.useQuery({
|
|
2024
|
-
queryKey:
|
|
2024
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
2025
2025
|
queryFn: () => arbi.projects.list(filters),
|
|
2026
2026
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
2027
2027
|
});
|
|
@@ -2035,8 +2035,8 @@ function useUpdateProjectFields() {
|
|
|
2035
2035
|
patch
|
|
2036
2036
|
}) => arbi.projects.update(projectExtId, patch),
|
|
2037
2037
|
onSuccess: () => {
|
|
2038
|
-
void qc.invalidateQueries({ queryKey:
|
|
2039
|
-
void qc.invalidateQueries({ queryKey:
|
|
2038
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects() });
|
|
2039
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
2040
2040
|
}
|
|
2041
2041
|
});
|
|
2042
2042
|
}
|
|
@@ -2044,7 +2044,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
2044
2044
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2045
2045
|
return reactQuery.useQuery({
|
|
2046
2046
|
queryKey: [
|
|
2047
|
-
...
|
|
2047
|
+
...chunkI7UUV7FP_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
2048
2048
|
options?.kind ?? "all",
|
|
2049
2049
|
options?.limit ?? "default"
|
|
2050
2050
|
],
|
|
@@ -2055,7 +2055,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
2055
2055
|
function useConversationUsage(conversationId, options) {
|
|
2056
2056
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2057
2057
|
return reactQuery.useQuery({
|
|
2058
|
-
queryKey:
|
|
2058
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
2059
2059
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
2060
2060
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
2061
2061
|
refetchInterval: options?.live ? 1e4 : false
|
|
@@ -2064,7 +2064,7 @@ function useConversationUsage(conversationId, options) {
|
|
|
2064
2064
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
2065
2065
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2066
2066
|
return reactQuery.useQuery({
|
|
2067
|
-
queryKey:
|
|
2067
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
2068
2068
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
2069
2069
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
2070
2070
|
});
|
|
@@ -2091,7 +2091,7 @@ function useChargeWatch(project, isPending) {
|
|
|
2091
2091
|
React3.useEffect(() => {
|
|
2092
2092
|
if (!isSlow) return;
|
|
2093
2093
|
const timer = setInterval(
|
|
2094
|
-
() => queryClient.invalidateQueries({ queryKey:
|
|
2094
|
+
() => queryClient.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects(), exact: true }),
|
|
2095
2095
|
POLL_EVERY_MS
|
|
2096
2096
|
);
|
|
2097
2097
|
return () => clearInterval(timer);
|
|
@@ -2118,8 +2118,8 @@ function useChargeWatch(project, isPending) {
|
|
|
2118
2118
|
if (!watch2 || watch2.settled) return;
|
|
2119
2119
|
let fresh;
|
|
2120
2120
|
try {
|
|
2121
|
-
await queryClient.refetchQueries({ queryKey:
|
|
2122
|
-
fresh = queryClient.getQueryData(
|
|
2121
|
+
await queryClient.refetchQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects(), exact: true });
|
|
2122
|
+
fresh = queryClient.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.projects())?.find((p) => p.external_id === project.external_id);
|
|
2123
2123
|
} catch {
|
|
2124
2124
|
fresh = void 0;
|
|
2125
2125
|
}
|
|
@@ -2132,21 +2132,21 @@ function useChargeWatch(project, isPending) {
|
|
|
2132
2132
|
|
|
2133
2133
|
// src/billing.ts
|
|
2134
2134
|
function refreshProjects(qc, wide = false) {
|
|
2135
|
-
void qc.invalidateQueries({ queryKey:
|
|
2135
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects() });
|
|
2136
2136
|
if (wide) {
|
|
2137
|
-
void qc.invalidateQueries({ queryKey:
|
|
2138
|
-
void qc.invalidateQueries({ queryKey:
|
|
2137
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() });
|
|
2138
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
2141
|
var retryAbortOnly = (failureCount, error) => failureCount < 1 && error?.name === "AbortError";
|
|
2142
2142
|
function useInvalidateProjects() {
|
|
2143
2143
|
const qc = reactQuery.useQueryClient();
|
|
2144
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
2144
|
+
return () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects() });
|
|
2145
2145
|
}
|
|
2146
2146
|
function useProducts(options) {
|
|
2147
2147
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2148
2148
|
return reactQuery.useQuery({
|
|
2149
|
-
queryKey:
|
|
2149
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.products(),
|
|
2150
2150
|
queryFn: () => arbi.projects.products(),
|
|
2151
2151
|
staleTime: 5 * 6e4,
|
|
2152
2152
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
@@ -2199,15 +2199,15 @@ function useCancelProjectSubscription() {
|
|
|
2199
2199
|
return reactQuery.useMutation({
|
|
2200
2200
|
mutationFn: (projectExtId) => arbi.projects.cancelSubscription(projectExtId),
|
|
2201
2201
|
onSuccess: () => {
|
|
2202
|
-
void qc.invalidateQueries({ queryKey:
|
|
2203
|
-
void qc.invalidateQueries({ queryKey:
|
|
2202
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.projects() });
|
|
2203
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() });
|
|
2204
2204
|
}
|
|
2205
2205
|
});
|
|
2206
2206
|
}
|
|
2207
2207
|
function usePreviewProjectPlanChange(projectExtId, change) {
|
|
2208
2208
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2209
2209
|
return reactQuery.useQuery({
|
|
2210
|
-
queryKey: [...
|
|
2210
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.billingQuotes(), "preview", projectExtId, change],
|
|
2211
2211
|
queryFn: () => arbi.projects.previewPlanChange(projectExtId, change),
|
|
2212
2212
|
enabled: !!change && arbi.isLoggedIn,
|
|
2213
2213
|
staleTime: 6e4,
|
|
@@ -2217,7 +2217,7 @@ function usePreviewProjectPlanChange(projectExtId, change) {
|
|
|
2217
2217
|
function usePlanQuote(projectExtId, body) {
|
|
2218
2218
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2219
2219
|
return reactQuery.useQuery({
|
|
2220
|
-
queryKey: [...
|
|
2220
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.billingQuotes(), "plan", projectExtId ?? null, body],
|
|
2221
2221
|
queryFn: () => arbi.projects.quotePlan(projectExtId ?? null, body),
|
|
2222
2222
|
enabled: !!body && arbi.isLoggedIn,
|
|
2223
2223
|
staleTime: 5 * 6e4,
|
|
@@ -2227,7 +2227,7 @@ function usePlanQuote(projectExtId, body) {
|
|
|
2227
2227
|
function useAddonQuote(projectExtId, kind, enabled = true) {
|
|
2228
2228
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2229
2229
|
return reactQuery.useQuery({
|
|
2230
|
-
queryKey: [...
|
|
2230
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.billingQuotes(), "addon", projectExtId, kind],
|
|
2231
2231
|
queryFn: () => arbi.projects.quoteAddon(projectExtId, kind),
|
|
2232
2232
|
enabled: enabled && arbi.isLoggedIn,
|
|
2233
2233
|
staleTime: 6e4,
|
|
@@ -2273,7 +2273,7 @@ function useUpdateProjectAddonSettings() {
|
|
|
2273
2273
|
function useContacts(options) {
|
|
2274
2274
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2275
2275
|
return reactQuery.useQuery({
|
|
2276
|
-
queryKey:
|
|
2276
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.contacts(),
|
|
2277
2277
|
queryFn: () => arbi.contacts.list(),
|
|
2278
2278
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
2279
2279
|
});
|
|
@@ -2288,7 +2288,7 @@ function usePendingContacts(options) {
|
|
|
2288
2288
|
}
|
|
2289
2289
|
function useInvalidateContacts() {
|
|
2290
2290
|
const qc = reactQuery.useQueryClient();
|
|
2291
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
2291
|
+
return () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.contacts() });
|
|
2292
2292
|
}
|
|
2293
2293
|
function useInviteContacts() {
|
|
2294
2294
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -2326,7 +2326,7 @@ function useSearchContacts(q, { debounceMs = 200 } = {}) {
|
|
|
2326
2326
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2327
2327
|
const term = useDebounced(q.trim(), debounceMs);
|
|
2328
2328
|
return reactQuery.useQuery({
|
|
2329
|
-
queryKey: [...
|
|
2329
|
+
queryKey: [...chunkI7UUV7FP_cjs.arbiQueryKeys.contacts(), "search", term],
|
|
2330
2330
|
queryFn: () => arbi.contacts.search(term),
|
|
2331
2331
|
enabled: term.length > 0 && arbi.isLoggedIn,
|
|
2332
2332
|
staleTime: 6e4,
|
|
@@ -2345,7 +2345,7 @@ function useDebounced(value, ms) {
|
|
|
2345
2345
|
function useHouseTemplateCandidates(workspaceId, enabled, staleTime = 6e4) {
|
|
2346
2346
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2347
2347
|
return reactQuery.useQuery({
|
|
2348
|
-
queryKey:
|
|
2348
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.houseTemplateCandidates(workspaceId ?? ""),
|
|
2349
2349
|
enabled: enabled && !!workspaceId && arbi.hasWorkspace,
|
|
2350
2350
|
staleTime,
|
|
2351
2351
|
queryFn: () => arbi.houseTemplates.candidates()
|
|
@@ -2356,7 +2356,7 @@ function useSetWorkspaceHouseTemplate() {
|
|
|
2356
2356
|
const queryClient = reactQuery.useQueryClient();
|
|
2357
2357
|
return reactQuery.useMutation({
|
|
2358
2358
|
mutationFn: (documentId) => arbi.houseTemplates.setWorkspace(documentId),
|
|
2359
|
-
onSuccess: () => queryClient.invalidateQueries({ queryKey:
|
|
2359
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() })
|
|
2360
2360
|
});
|
|
2361
2361
|
}
|
|
2362
2362
|
var supportsHouseTemplates = browser.houseTemplates.supportsHouseTemplates;
|
|
@@ -2457,11 +2457,11 @@ function useProfile(options) {
|
|
|
2457
2457
|
const { client, enabled } = useAccountClient();
|
|
2458
2458
|
const qc = reactQuery.useQueryClient();
|
|
2459
2459
|
React3.useEffect(
|
|
2460
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
2460
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
2461
2461
|
[client, qc]
|
|
2462
2462
|
);
|
|
2463
2463
|
return reactQuery.useQuery({
|
|
2464
|
-
queryKey:
|
|
2464
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.profile(),
|
|
2465
2465
|
queryFn: () => client.profile(),
|
|
2466
2466
|
enabled: (options?.enabled ?? true) && enabled,
|
|
2467
2467
|
staleTime: Infinity
|
|
@@ -2476,9 +2476,9 @@ function useUpdateProfile() {
|
|
|
2476
2476
|
return client.profile();
|
|
2477
2477
|
},
|
|
2478
2478
|
onSuccess: (profile) => {
|
|
2479
|
-
qc.setQueryData(
|
|
2480
|
-
void qc.invalidateQueries({ queryKey:
|
|
2481
|
-
return qc.invalidateQueries({ queryKey:
|
|
2479
|
+
qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.profile(), profile);
|
|
2480
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.identity() });
|
|
2481
|
+
return qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
2482
2482
|
}
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
@@ -2561,7 +2561,7 @@ function useConfirmEmailChange() {
|
|
|
2561
2561
|
const qc = reactQuery.useQueryClient();
|
|
2562
2562
|
return reactQuery.useMutation({
|
|
2563
2563
|
mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
|
|
2564
|
-
onSuccess: () => qc.setQueryData(
|
|
2564
|
+
onSuccess: () => qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.profile(), client.profile())
|
|
2565
2565
|
});
|
|
2566
2566
|
}
|
|
2567
2567
|
function useEmailChange({
|
|
@@ -2720,7 +2720,7 @@ function usePasswordChangeForm({
|
|
|
2720
2720
|
function useUserSettings(options) {
|
|
2721
2721
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2722
2722
|
return reactQuery.useQuery({
|
|
2723
|
-
queryKey:
|
|
2723
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(),
|
|
2724
2724
|
queryFn: () => arbi.settings.get(),
|
|
2725
2725
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
2726
2726
|
});
|
|
@@ -2731,18 +2731,18 @@ function useUpdateUserSettings() {
|
|
|
2731
2731
|
return reactQuery.useMutation({
|
|
2732
2732
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2733
2733
|
onMutate: async (patch) => {
|
|
2734
|
-
await qc.cancelQueries({ queryKey:
|
|
2735
|
-
const previous = qc.getQueryData(
|
|
2734
|
+
await qc.cancelQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() });
|
|
2735
|
+
const previous = qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings());
|
|
2736
2736
|
qc.setQueryData(
|
|
2737
|
-
|
|
2737
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(),
|
|
2738
2738
|
(old) => old ? { ...old, ...patch } : old
|
|
2739
2739
|
);
|
|
2740
2740
|
return { previous };
|
|
2741
2741
|
},
|
|
2742
2742
|
onError: (_err, _patch, context) => {
|
|
2743
|
-
qc.setQueryData(
|
|
2743
|
+
qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2744
2744
|
},
|
|
2745
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2745
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() })
|
|
2746
2746
|
});
|
|
2747
2747
|
}
|
|
2748
2748
|
function toNotificationPreferences(stored, keys) {
|
|
@@ -2762,18 +2762,18 @@ function useNotificationPreferences(keys, options) {
|
|
|
2762
2762
|
const save = reactQuery.useMutation({
|
|
2763
2763
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
2764
2764
|
onMutate: async (patch) => {
|
|
2765
|
-
await qc.cancelQueries({ queryKey:
|
|
2766
|
-
const previous = qc.getQueryData(
|
|
2765
|
+
await qc.cancelQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() });
|
|
2766
|
+
const previous = qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings());
|
|
2767
2767
|
qc.setQueryData(
|
|
2768
|
-
|
|
2768
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(),
|
|
2769
2769
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
2770
2770
|
);
|
|
2771
2771
|
return { previous };
|
|
2772
2772
|
},
|
|
2773
2773
|
onError: (_err, _patch, context) => {
|
|
2774
|
-
qc.setQueryData(
|
|
2774
|
+
qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2775
2775
|
},
|
|
2776
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2776
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() })
|
|
2777
2777
|
});
|
|
2778
2778
|
const model = React3.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
2779
2779
|
const setAll = React3.useCallback(
|
|
@@ -2800,18 +2800,18 @@ function useRelevanceSave() {
|
|
|
2800
2800
|
return reactQuery.useMutation({
|
|
2801
2801
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2802
2802
|
onMutate: async (patch) => {
|
|
2803
|
-
await qc.cancelQueries({ queryKey:
|
|
2804
|
-
const previous = qc.getQueryData(
|
|
2803
|
+
await qc.cancelQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() });
|
|
2804
|
+
const previous = qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings());
|
|
2805
2805
|
qc.setQueryData(
|
|
2806
|
-
|
|
2806
|
+
chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(),
|
|
2807
2807
|
(old) => old ? { ...old, ...patch } : old
|
|
2808
2808
|
);
|
|
2809
2809
|
return { previous };
|
|
2810
2810
|
},
|
|
2811
2811
|
onError: (_err, _patch, context) => {
|
|
2812
|
-
qc.setQueryData(
|
|
2812
|
+
qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2813
2813
|
},
|
|
2814
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2814
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings() })
|
|
2815
2815
|
});
|
|
2816
2816
|
}
|
|
2817
2817
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -2822,7 +2822,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
2822
2822
|
const setLevel = React3.useCallback(
|
|
2823
2823
|
(next) => {
|
|
2824
2824
|
if (!workspaceId) return;
|
|
2825
|
-
const current = qc.getQueryData(
|
|
2825
|
+
const current = qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2826
2826
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
2827
2827
|
},
|
|
2828
2828
|
[qc, save, settings.data, workspaceId]
|
|
@@ -2843,7 +2843,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2843
2843
|
const setFollowing = React3.useCallback(
|
|
2844
2844
|
(on, callbacks) => {
|
|
2845
2845
|
if (!conversationId) return;
|
|
2846
|
-
const current = qc.getQueryData(
|
|
2846
|
+
const current = qc.getQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2847
2847
|
save.mutate(
|
|
2848
2848
|
{
|
|
2849
2849
|
followed_threads: browser.settings.withMembership(
|
|
@@ -2868,7 +2868,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2868
2868
|
function useSessions(options) {
|
|
2869
2869
|
const { client, enabled } = useAccountClient();
|
|
2870
2870
|
return reactQuery.useQuery({
|
|
2871
|
-
queryKey:
|
|
2871
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.sessions(),
|
|
2872
2872
|
queryFn: () => client.listSessions(),
|
|
2873
2873
|
enabled: (options?.enabled ?? true) && enabled
|
|
2874
2874
|
});
|
|
@@ -2878,7 +2878,7 @@ function useTerminateSession() {
|
|
|
2878
2878
|
const qc = reactQuery.useQueryClient();
|
|
2879
2879
|
return reactQuery.useMutation({
|
|
2880
2880
|
mutationFn: (sessionId) => client.terminateSession(sessionId),
|
|
2881
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2881
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.sessions() })
|
|
2882
2882
|
});
|
|
2883
2883
|
}
|
|
2884
2884
|
function useSignOut() {
|
|
@@ -3021,7 +3021,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
3021
3021
|
const apiRef = React3.useRef(api);
|
|
3022
3022
|
apiRef.current = api;
|
|
3023
3023
|
const query = reactQuery.useQuery({
|
|
3024
|
-
queryKey:
|
|
3024
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.identity(),
|
|
3025
3025
|
queryFn: () => apiRef.current.status(),
|
|
3026
3026
|
enabled,
|
|
3027
3027
|
staleTime: 6e4
|
|
@@ -3039,7 +3039,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
3039
3039
|
const lastVerified = React3.useRef(void 0);
|
|
3040
3040
|
const apply = React3.useCallback(
|
|
3041
3041
|
(next) => {
|
|
3042
|
-
qc.setQueryData(
|
|
3042
|
+
qc.setQueryData(chunkI7UUV7FP_cjs.arbiQueryKeys.identity(), next);
|
|
3043
3043
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
3044
3044
|
onVerifiedChange?.(next.verified);
|
|
3045
3045
|
}
|
|
@@ -3234,12 +3234,12 @@ function useIdentityVerification(options = {}) {
|
|
|
3234
3234
|
enabled,
|
|
3235
3235
|
formatPrice,
|
|
3236
3236
|
onVerifiedChange: (verified) => {
|
|
3237
|
-
void qc.invalidateQueries({ queryKey:
|
|
3237
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.profile() });
|
|
3238
3238
|
onVerifiedChange?.(verified);
|
|
3239
3239
|
},
|
|
3240
3240
|
onNameAccepted: (name) => {
|
|
3241
|
-
void qc.invalidateQueries({ queryKey:
|
|
3242
|
-
void qc.invalidateQueries({ queryKey:
|
|
3241
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.profile() });
|
|
3242
|
+
void qc.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.workspaces() });
|
|
3243
3243
|
onNameAccepted?.(name);
|
|
3244
3244
|
}
|
|
3245
3245
|
});
|
|
@@ -4511,7 +4511,7 @@ function useDeleteBookingPage() {
|
|
|
4511
4511
|
});
|
|
4512
4512
|
}
|
|
4513
4513
|
function useWorkspaceDocs(workspaceId) {
|
|
4514
|
-
const { data: docs = [], isLoading, isError } =
|
|
4514
|
+
const { data: docs = [], isLoading, isError } = chunkI7UUV7FP_cjs.useDocuments(workspaceId);
|
|
4515
4515
|
const docIds = React3.useMemo(
|
|
4516
4516
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
4517
4517
|
[docs]
|
|
@@ -4519,7 +4519,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
4519
4519
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
4520
4520
|
}
|
|
4521
4521
|
function useAiTask() {
|
|
4522
|
-
const mutation =
|
|
4522
|
+
const mutation = chunkI7UUV7FP_cjs.useAssistantQuery();
|
|
4523
4523
|
const [status, setStatus] = React3.useState("idle");
|
|
4524
4524
|
const [text, setText] = React3.useState("");
|
|
4525
4525
|
const [stepCount, setStepCount] = React3.useState(0);
|
|
@@ -6131,7 +6131,7 @@ function ActivityFeed({
|
|
|
6131
6131
|
enabled,
|
|
6132
6132
|
"data-testid": testId = "activity-feed"
|
|
6133
6133
|
}) {
|
|
6134
|
-
const { data, isLoading, isError } =
|
|
6134
|
+
const { data, isLoading, isError } = chunkI7UUV7FP_cjs.useActivity({ limit, enabled });
|
|
6135
6135
|
if (isLoading) {
|
|
6136
6136
|
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: [
|
|
6137
6137
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -6208,12 +6208,12 @@ function useNotifications(options = {}) {
|
|
|
6208
6208
|
React3.useEffect(
|
|
6209
6209
|
() => ws?.subscribe((message) => {
|
|
6210
6210
|
if ("sender" in message && "recipient" in message)
|
|
6211
|
-
void queries.invalidateQueries({ queryKey:
|
|
6211
|
+
void queries.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allNotifications() });
|
|
6212
6212
|
}),
|
|
6213
6213
|
[ws, queries]
|
|
6214
6214
|
);
|
|
6215
6215
|
return reactQuery.useQuery({
|
|
6216
|
-
queryKey:
|
|
6216
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.notifications(limit),
|
|
6217
6217
|
queryFn: () => arbi.notifications.list({ limit }),
|
|
6218
6218
|
enabled: (options.enabled ?? true) && arbi.isLoggedIn
|
|
6219
6219
|
});
|
|
@@ -6223,7 +6223,7 @@ function useDeleteNotifications() {
|
|
|
6223
6223
|
const queries = reactQuery.useQueryClient();
|
|
6224
6224
|
return reactQuery.useMutation({
|
|
6225
6225
|
mutationFn: (ids) => arbi.notifications.delete(ids),
|
|
6226
|
-
onSuccess: () => queries.invalidateQueries({ queryKey:
|
|
6226
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allNotifications() })
|
|
6227
6227
|
});
|
|
6228
6228
|
}
|
|
6229
6229
|
function useMarkNotificationsRead() {
|
|
@@ -6231,7 +6231,7 @@ function useMarkNotificationsRead() {
|
|
|
6231
6231
|
const queries = reactQuery.useQueryClient();
|
|
6232
6232
|
return reactQuery.useMutation({
|
|
6233
6233
|
mutationFn: (ids) => arbi.notifications.markRead(ids),
|
|
6234
|
-
onSuccess: () => queries.invalidateQueries({ queryKey:
|
|
6234
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.allNotifications() })
|
|
6235
6235
|
});
|
|
6236
6236
|
}
|
|
6237
6237
|
|
|
@@ -6685,7 +6685,7 @@ function useDirectMessages(options) {
|
|
|
6685
6685
|
enabled
|
|
6686
6686
|
});
|
|
6687
6687
|
const contactsQuery = reactQuery.useQuery({
|
|
6688
|
-
queryKey:
|
|
6688
|
+
queryKey: chunkI7UUV7FP_cjs.arbiQueryKeys.contacts(),
|
|
6689
6689
|
queryFn: () => arbi.contacts.list(),
|
|
6690
6690
|
enabled
|
|
6691
6691
|
});
|
|
@@ -7968,10 +7968,10 @@ function DocumentTable({
|
|
|
7968
7968
|
extraColumns,
|
|
7969
7969
|
className
|
|
7970
7970
|
}) {
|
|
7971
|
-
const query =
|
|
7971
|
+
const query = chunkI7UUV7FP_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
7972
7972
|
const rows = documents ?? query.data ?? [];
|
|
7973
7973
|
const isLoading = !documents && query.isLoading;
|
|
7974
|
-
const tagsQuery =
|
|
7974
|
+
const tagsQuery = chunkI7UUV7FP_cjs.useTags(workspaceId);
|
|
7975
7975
|
const tagNameById = React3__default.default.useMemo(() => {
|
|
7976
7976
|
const map = /* @__PURE__ */ new Map();
|
|
7977
7977
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -8241,10 +8241,10 @@ function DocumentGallery({
|
|
|
8241
8241
|
minTileWidth = 148,
|
|
8242
8242
|
className
|
|
8243
8243
|
}) {
|
|
8244
|
-
const query =
|
|
8244
|
+
const query = chunkI7UUV7FP_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
8245
8245
|
const rows = documents ?? query.data ?? [];
|
|
8246
8246
|
const isLoading = !documents && query.isLoading;
|
|
8247
|
-
const tagsQuery =
|
|
8247
|
+
const tagsQuery = chunkI7UUV7FP_cjs.useTags(workspaceId);
|
|
8248
8248
|
const tagNameById = React3__default.default.useMemo(() => {
|
|
8249
8249
|
const map = /* @__PURE__ */ new Map();
|
|
8250
8250
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -8256,7 +8256,7 @@ function DocumentGallery({
|
|
|
8256
8256
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
8257
8257
|
[rows]
|
|
8258
8258
|
);
|
|
8259
|
-
const thumbsQuery =
|
|
8259
|
+
const thumbsQuery = chunkI7UUV7FP_cjs.useThumbnails(docIds);
|
|
8260
8260
|
const thumbs = thumbsQuery.data ?? {};
|
|
8261
8261
|
const session = useArbiSessionStore();
|
|
8262
8262
|
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
@@ -8365,8 +8365,8 @@ function DocumentReview({
|
|
|
8365
8365
|
onClose,
|
|
8366
8366
|
className
|
|
8367
8367
|
}) {
|
|
8368
|
-
const parsedQuery =
|
|
8369
|
-
const tagsQuery =
|
|
8368
|
+
const parsedQuery = chunkI7UUV7FP_cjs.useParsedDocument(docId, stage);
|
|
8369
|
+
const tagsQuery = chunkI7UUV7FP_cjs.useTags(workspaceId);
|
|
8370
8370
|
const tagNameById = React3__default.default.useMemo(() => {
|
|
8371
8371
|
const map = /* @__PURE__ */ new Map();
|
|
8372
8372
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -9083,243 +9083,243 @@ function hasVideoTrack(blob) {
|
|
|
9083
9083
|
|
|
9084
9084
|
Object.defineProperty(exports, "DOCUMENTS_FIRST_PAGE_MEASURE", {
|
|
9085
9085
|
enumerable: true,
|
|
9086
|
-
get: function () { return
|
|
9086
|
+
get: function () { return chunkI7UUV7FP_cjs.DOCUMENTS_FIRST_PAGE_MEASURE; }
|
|
9087
9087
|
});
|
|
9088
9088
|
Object.defineProperty(exports, "DOCUMENTS_FIRST_PAGE_SIZE", {
|
|
9089
9089
|
enumerable: true,
|
|
9090
|
-
get: function () { return
|
|
9090
|
+
get: function () { return chunkI7UUV7FP_cjs.DOCUMENTS_FIRST_PAGE_SIZE; }
|
|
9091
9091
|
});
|
|
9092
9092
|
Object.defineProperty(exports, "DOCUMENTS_PAGE_SIZE", {
|
|
9093
9093
|
enumerable: true,
|
|
9094
|
-
get: function () { return
|
|
9094
|
+
get: function () { return chunkI7UUV7FP_cjs.DOCUMENTS_PAGE_SIZE; }
|
|
9095
9095
|
});
|
|
9096
9096
|
Object.defineProperty(exports, "FINISHED_DOCUMENT_STATUSES", {
|
|
9097
9097
|
enumerable: true,
|
|
9098
|
-
get: function () { return
|
|
9098
|
+
get: function () { return chunkI7UUV7FP_cjs.FINISHED_DOCUMENT_STATUSES; }
|
|
9099
9099
|
});
|
|
9100
9100
|
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
9101
9101
|
enumerable: true,
|
|
9102
|
-
get: function () { return
|
|
9102
|
+
get: function () { return chunkI7UUV7FP_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
9103
9103
|
});
|
|
9104
9104
|
Object.defineProperty(exports, "SIMILARITY_THRESHOLD", {
|
|
9105
9105
|
enumerable: true,
|
|
9106
|
-
get: function () { return
|
|
9106
|
+
get: function () { return chunkI7UUV7FP_cjs.SIMILARITY_THRESHOLD; }
|
|
9107
9107
|
});
|
|
9108
9108
|
Object.defineProperty(exports, "adjustTagCounts", {
|
|
9109
9109
|
enumerable: true,
|
|
9110
|
-
get: function () { return
|
|
9110
|
+
get: function () { return chunkI7UUV7FP_cjs.adjustTagCounts; }
|
|
9111
9111
|
});
|
|
9112
9112
|
Object.defineProperty(exports, "arbiMutationKeys", {
|
|
9113
9113
|
enumerable: true,
|
|
9114
|
-
get: function () { return
|
|
9114
|
+
get: function () { return chunkI7UUV7FP_cjs.arbiMutationKeys; }
|
|
9115
9115
|
});
|
|
9116
9116
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
9117
9117
|
enumerable: true,
|
|
9118
|
-
get: function () { return
|
|
9118
|
+
get: function () { return chunkI7UUV7FP_cjs.arbiQueryKeys; }
|
|
9119
9119
|
});
|
|
9120
9120
|
Object.defineProperty(exports, "forgetDocuments", {
|
|
9121
9121
|
enumerable: true,
|
|
9122
|
-
get: function () { return
|
|
9122
|
+
get: function () { return chunkI7UUV7FP_cjs.forgetDocuments; }
|
|
9123
9123
|
});
|
|
9124
9124
|
Object.defineProperty(exports, "getCachedDocuments", {
|
|
9125
9125
|
enumerable: true,
|
|
9126
|
-
get: function () { return
|
|
9126
|
+
get: function () { return chunkI7UUV7FP_cjs.getCachedDocuments; }
|
|
9127
9127
|
});
|
|
9128
9128
|
Object.defineProperty(exports, "invalidateTagData", {
|
|
9129
9129
|
enumerable: true,
|
|
9130
|
-
get: function () { return
|
|
9130
|
+
get: function () { return chunkI7UUV7FP_cjs.invalidateTagData; }
|
|
9131
9131
|
});
|
|
9132
9132
|
Object.defineProperty(exports, "invalidateTagTables", {
|
|
9133
9133
|
enumerable: true,
|
|
9134
|
-
get: function () { return
|
|
9134
|
+
get: function () { return chunkI7UUV7FP_cjs.invalidateTagTables; }
|
|
9135
9135
|
});
|
|
9136
9136
|
Object.defineProperty(exports, "isDocumentsLoading", {
|
|
9137
9137
|
enumerable: true,
|
|
9138
|
-
get: function () { return
|
|
9138
|
+
get: function () { return chunkI7UUV7FP_cjs.isDocumentsLoading; }
|
|
9139
9139
|
});
|
|
9140
9140
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
9141
9141
|
enumerable: true,
|
|
9142
|
-
get: function () { return
|
|
9142
|
+
get: function () { return chunkI7UUV7FP_cjs.isUsageMetered; }
|
|
9143
9143
|
});
|
|
9144
9144
|
Object.defineProperty(exports, "patchCachedDocument", {
|
|
9145
9145
|
enumerable: true,
|
|
9146
|
-
get: function () { return
|
|
9146
|
+
get: function () { return chunkI7UUV7FP_cjs.patchCachedDocument; }
|
|
9147
9147
|
});
|
|
9148
9148
|
Object.defineProperty(exports, "patchDocuments", {
|
|
9149
9149
|
enumerable: true,
|
|
9150
|
-
get: function () { return
|
|
9150
|
+
get: function () { return chunkI7UUV7FP_cjs.patchDocuments; }
|
|
9151
9151
|
});
|
|
9152
9152
|
Object.defineProperty(exports, "patchWorkspaceTags", {
|
|
9153
9153
|
enumerable: true,
|
|
9154
|
-
get: function () { return
|
|
9154
|
+
get: function () { return chunkI7UUV7FP_cjs.patchWorkspaceTags; }
|
|
9155
9155
|
});
|
|
9156
9156
|
Object.defineProperty(exports, "refreshDocuments", {
|
|
9157
9157
|
enumerable: true,
|
|
9158
|
-
get: function () { return
|
|
9158
|
+
get: function () { return chunkI7UUV7FP_cjs.refreshDocuments; }
|
|
9159
9159
|
});
|
|
9160
9160
|
Object.defineProperty(exports, "setCachedDocument", {
|
|
9161
9161
|
enumerable: true,
|
|
9162
|
-
get: function () { return
|
|
9162
|
+
get: function () { return chunkI7UUV7FP_cjs.setCachedDocument; }
|
|
9163
9163
|
});
|
|
9164
9164
|
Object.defineProperty(exports, "stopDocumentsLoading", {
|
|
9165
9165
|
enumerable: true,
|
|
9166
|
-
get: function () { return
|
|
9166
|
+
get: function () { return chunkI7UUV7FP_cjs.stopDocumentsLoading; }
|
|
9167
9167
|
});
|
|
9168
9168
|
Object.defineProperty(exports, "subscribeDocumentRows", {
|
|
9169
9169
|
enumerable: true,
|
|
9170
|
-
get: function () { return
|
|
9170
|
+
get: function () { return chunkI7UUV7FP_cjs.subscribeDocumentRows; }
|
|
9171
9171
|
});
|
|
9172
9172
|
Object.defineProperty(exports, "upsertDocuments", {
|
|
9173
9173
|
enumerable: true,
|
|
9174
|
-
get: function () { return
|
|
9174
|
+
get: function () { return chunkI7UUV7FP_cjs.upsertDocuments; }
|
|
9175
9175
|
});
|
|
9176
9176
|
Object.defineProperty(exports, "useActivity", {
|
|
9177
9177
|
enumerable: true,
|
|
9178
|
-
get: function () { return
|
|
9178
|
+
get: function () { return chunkI7UUV7FP_cjs.useActivity; }
|
|
9179
9179
|
});
|
|
9180
9180
|
Object.defineProperty(exports, "useAgents", {
|
|
9181
9181
|
enumerable: true,
|
|
9182
|
-
get: function () { return
|
|
9182
|
+
get: function () { return chunkI7UUV7FP_cjs.useAgents; }
|
|
9183
9183
|
});
|
|
9184
9184
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
9185
9185
|
enumerable: true,
|
|
9186
|
-
get: function () { return
|
|
9186
|
+
get: function () { return chunkI7UUV7FP_cjs.useAssistantQuery; }
|
|
9187
9187
|
});
|
|
9188
9188
|
Object.defineProperty(exports, "useAvailableModels", {
|
|
9189
9189
|
enumerable: true,
|
|
9190
|
-
get: function () { return
|
|
9190
|
+
get: function () { return chunkI7UUV7FP_cjs.useAvailableModels; }
|
|
9191
9191
|
});
|
|
9192
9192
|
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
9193
9193
|
enumerable: true,
|
|
9194
|
-
get: function () { return
|
|
9194
|
+
get: function () { return chunkI7UUV7FP_cjs.useCanCreateProjects; }
|
|
9195
9195
|
});
|
|
9196
9196
|
Object.defineProperty(exports, "useConfigs", {
|
|
9197
9197
|
enumerable: true,
|
|
9198
|
-
get: function () { return
|
|
9198
|
+
get: function () { return chunkI7UUV7FP_cjs.useConfigs; }
|
|
9199
9199
|
});
|
|
9200
9200
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
9201
9201
|
enumerable: true,
|
|
9202
|
-
get: function () { return
|
|
9202
|
+
get: function () { return chunkI7UUV7FP_cjs.useConversationThreads; }
|
|
9203
9203
|
});
|
|
9204
9204
|
Object.defineProperty(exports, "useConversations", {
|
|
9205
9205
|
enumerable: true,
|
|
9206
|
-
get: function () { return
|
|
9206
|
+
get: function () { return chunkI7UUV7FP_cjs.useConversations; }
|
|
9207
9207
|
});
|
|
9208
9208
|
Object.defineProperty(exports, "useCreateTag", {
|
|
9209
9209
|
enumerable: true,
|
|
9210
|
-
get: function () { return
|
|
9210
|
+
get: function () { return chunkI7UUV7FP_cjs.useCreateTag; }
|
|
9211
9211
|
});
|
|
9212
9212
|
Object.defineProperty(exports, "useCurrentUser", {
|
|
9213
9213
|
enumerable: true,
|
|
9214
|
-
get: function () { return
|
|
9214
|
+
get: function () { return chunkI7UUV7FP_cjs.useCurrentUser; }
|
|
9215
9215
|
});
|
|
9216
9216
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
9217
9217
|
enumerable: true,
|
|
9218
|
-
get: function () { return
|
|
9218
|
+
get: function () { return chunkI7UUV7FP_cjs.useDeleteAgents; }
|
|
9219
9219
|
});
|
|
9220
9220
|
Object.defineProperty(exports, "useDeleteTag", {
|
|
9221
9221
|
enumerable: true,
|
|
9222
|
-
get: function () { return
|
|
9222
|
+
get: function () { return chunkI7UUV7FP_cjs.useDeleteTag; }
|
|
9223
9223
|
});
|
|
9224
9224
|
Object.defineProperty(exports, "useDocument", {
|
|
9225
9225
|
enumerable: true,
|
|
9226
|
-
get: function () { return
|
|
9226
|
+
get: function () { return chunkI7UUV7FP_cjs.useDocument; }
|
|
9227
9227
|
});
|
|
9228
9228
|
Object.defineProperty(exports, "useDocumentVersionList", {
|
|
9229
9229
|
enumerable: true,
|
|
9230
|
-
get: function () { return
|
|
9230
|
+
get: function () { return chunkI7UUV7FP_cjs.useDocumentVersionList; }
|
|
9231
9231
|
});
|
|
9232
9232
|
Object.defineProperty(exports, "useDocuments", {
|
|
9233
9233
|
enumerable: true,
|
|
9234
|
-
get: function () { return
|
|
9234
|
+
get: function () { return chunkI7UUV7FP_cjs.useDocuments; }
|
|
9235
9235
|
});
|
|
9236
9236
|
Object.defineProperty(exports, "useDocumentsById", {
|
|
9237
9237
|
enumerable: true,
|
|
9238
|
-
get: function () { return
|
|
9238
|
+
get: function () { return chunkI7UUV7FP_cjs.useDocumentsById; }
|
|
9239
9239
|
});
|
|
9240
9240
|
Object.defineProperty(exports, "useDocumentsLoading", {
|
|
9241
9241
|
enumerable: true,
|
|
9242
|
-
get: function () { return
|
|
9242
|
+
get: function () { return chunkI7UUV7FP_cjs.useDocumentsLoading; }
|
|
9243
9243
|
});
|
|
9244
9244
|
Object.defineProperty(exports, "useExtractEntities", {
|
|
9245
9245
|
enumerable: true,
|
|
9246
|
-
get: function () { return
|
|
9246
|
+
get: function () { return chunkI7UUV7FP_cjs.useExtractEntities; }
|
|
9247
9247
|
});
|
|
9248
9248
|
Object.defineProperty(exports, "useFirmPool", {
|
|
9249
9249
|
enumerable: true,
|
|
9250
|
-
get: function () { return
|
|
9250
|
+
get: function () { return chunkI7UUV7FP_cjs.useFirmPool; }
|
|
9251
9251
|
});
|
|
9252
9252
|
Object.defineProperty(exports, "useHealth", {
|
|
9253
9253
|
enumerable: true,
|
|
9254
|
-
get: function () { return
|
|
9254
|
+
get: function () { return chunkI7UUV7FP_cjs.useHealth; }
|
|
9255
9255
|
});
|
|
9256
9256
|
Object.defineProperty(exports, "useInvalidateTagData", {
|
|
9257
9257
|
enumerable: true,
|
|
9258
|
-
get: function () { return
|
|
9258
|
+
get: function () { return chunkI7UUV7FP_cjs.useInvalidateTagData; }
|
|
9259
9259
|
});
|
|
9260
9260
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
9261
9261
|
enumerable: true,
|
|
9262
|
-
get: function () { return
|
|
9262
|
+
get: function () { return chunkI7UUV7FP_cjs.useParsedDocument; }
|
|
9263
9263
|
});
|
|
9264
9264
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
9265
9265
|
enumerable: true,
|
|
9266
|
-
get: function () { return
|
|
9266
|
+
get: function () { return chunkI7UUV7FP_cjs.useProjectInvoices; }
|
|
9267
9267
|
});
|
|
9268
9268
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
9269
9269
|
enumerable: true,
|
|
9270
|
-
get: function () { return
|
|
9270
|
+
get: function () { return chunkI7UUV7FP_cjs.useProjectUsage; }
|
|
9271
9271
|
});
|
|
9272
9272
|
Object.defineProperty(exports, "useProjects", {
|
|
9273
9273
|
enumerable: true,
|
|
9274
|
-
get: function () { return
|
|
9274
|
+
get: function () { return chunkI7UUV7FP_cjs.useProjects; }
|
|
9275
9275
|
});
|
|
9276
9276
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
9277
9277
|
enumerable: true,
|
|
9278
|
-
get: function () { return
|
|
9278
|
+
get: function () { return chunkI7UUV7FP_cjs.useProjectsUsage; }
|
|
9279
9279
|
});
|
|
9280
9280
|
Object.defineProperty(exports, "useSetTagValues", {
|
|
9281
9281
|
enumerable: true,
|
|
9282
|
-
get: function () { return
|
|
9282
|
+
get: function () { return chunkI7UUV7FP_cjs.useSetTagValues; }
|
|
9283
9283
|
});
|
|
9284
9284
|
Object.defineProperty(exports, "useSimilarDocuments", {
|
|
9285
9285
|
enumerable: true,
|
|
9286
|
-
get: function () { return
|
|
9286
|
+
get: function () { return chunkI7UUV7FP_cjs.useSimilarDocuments; }
|
|
9287
9287
|
});
|
|
9288
9288
|
Object.defineProperty(exports, "useTagKindSchema", {
|
|
9289
9289
|
enumerable: true,
|
|
9290
|
-
get: function () { return
|
|
9290
|
+
get: function () { return chunkI7UUV7FP_cjs.useTagKindSchema; }
|
|
9291
9291
|
});
|
|
9292
9292
|
Object.defineProperty(exports, "useTags", {
|
|
9293
9293
|
enumerable: true,
|
|
9294
|
-
get: function () { return
|
|
9294
|
+
get: function () { return chunkI7UUV7FP_cjs.useTags; }
|
|
9295
9295
|
});
|
|
9296
9296
|
Object.defineProperty(exports, "useThumbnails", {
|
|
9297
9297
|
enumerable: true,
|
|
9298
|
-
get: function () { return
|
|
9298
|
+
get: function () { return chunkI7UUV7FP_cjs.useThumbnails; }
|
|
9299
9299
|
});
|
|
9300
9300
|
Object.defineProperty(exports, "useTopUpFirmPool", {
|
|
9301
9301
|
enumerable: true,
|
|
9302
|
-
get: function () { return
|
|
9302
|
+
get: function () { return chunkI7UUV7FP_cjs.useTopUpFirmPool; }
|
|
9303
9303
|
});
|
|
9304
9304
|
Object.defineProperty(exports, "useUpdateTag", {
|
|
9305
9305
|
enumerable: true,
|
|
9306
|
-
get: function () { return
|
|
9306
|
+
get: function () { return chunkI7UUV7FP_cjs.useUpdateTag; }
|
|
9307
9307
|
});
|
|
9308
9308
|
Object.defineProperty(exports, "useUpdateTagKindSchema", {
|
|
9309
9309
|
enumerable: true,
|
|
9310
|
-
get: function () { return
|
|
9310
|
+
get: function () { return chunkI7UUV7FP_cjs.useUpdateTagKindSchema; }
|
|
9311
9311
|
});
|
|
9312
9312
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
9313
9313
|
enumerable: true,
|
|
9314
|
-
get: function () { return
|
|
9314
|
+
get: function () { return chunkI7UUV7FP_cjs.useUserUsageToday; }
|
|
9315
9315
|
});
|
|
9316
9316
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
9317
9317
|
enumerable: true,
|
|
9318
|
-
get: function () { return
|
|
9318
|
+
get: function () { return chunkI7UUV7FP_cjs.useWorkspaceActivity; }
|
|
9319
9319
|
});
|
|
9320
9320
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
9321
9321
|
enumerable: true,
|
|
9322
|
-
get: function () { return
|
|
9322
|
+
get: function () { return chunkI7UUV7FP_cjs.useWorkspaces; }
|
|
9323
9323
|
});
|
|
9324
9324
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
9325
9325
|
enumerable: true,
|