@arbidocs/react 0.4.94 → 0.4.95
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 +2 -2
- package/dist/{chunk-PYPYDBOT.cjs → chunk-IJQ4S4LG.cjs} +20 -2
- package/dist/chunk-IJQ4S4LG.cjs.map +1 -0
- package/dist/{chunk-GYHKZ6JQ.js → chunk-KR7VTJS6.js} +18 -3
- package/dist/chunk-KR7VTJS6.js.map +1 -0
- package/dist/document-tools/index.cjs +4 -4
- package/dist/document-tools/index.js +4 -4
- package/dist/index.cjs +150 -138
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +7 -7
- package/dist/ui/index.cjs +9 -9
- package/dist/ui/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-GYHKZ6JQ.js.map +0 -1
- package/dist/chunk-PYPYDBOT.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIJQ4S4LG_cjs = require('./chunk-IJQ4S4LG.cjs');
|
|
4
4
|
var chunk5DCRIWCA_cjs = require('./chunk-5DCRIWCA.cjs');
|
|
5
5
|
var chunkF7KQVVD2_cjs = require('./chunk-F7KQVVD2.cjs');
|
|
6
|
+
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
7
|
+
var chunkXIDDXD5Y_cjs = require('./chunk-XIDDXD5Y.cjs');
|
|
6
8
|
var chunkGNIDMHTU_cjs = require('./chunk-GNIDMHTU.cjs');
|
|
7
9
|
var chunk5SZ2J2WT_cjs = require('./chunk-5SZ2J2WT.cjs');
|
|
8
|
-
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
9
10
|
var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
|
|
11
|
+
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
10
12
|
var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
|
|
11
13
|
var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
|
|
12
14
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
13
|
-
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
14
|
-
var chunkXIDDXD5Y_cjs = require('./chunk-XIDDXD5Y.cjs');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var reactQuery = require('@tanstack/react-query');
|
|
17
17
|
var browser = require('@arbidocs/sdk/browser');
|
|
@@ -41,7 +41,7 @@ function useUpdateConversation() {
|
|
|
41
41
|
conversationId,
|
|
42
42
|
patch
|
|
43
43
|
}) => arbi.conversations.update(conversationId, patch),
|
|
44
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
44
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
function useCreateWork() {
|
|
@@ -49,7 +49,7 @@ function useCreateWork() {
|
|
|
49
49
|
const qc = reactQuery.useQueryClient();
|
|
50
50
|
return reactQuery.useMutation({
|
|
51
51
|
mutationFn: (body) => arbi.conversations.createWork(body),
|
|
52
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
52
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
function useRunConversation() {
|
|
@@ -57,7 +57,7 @@ function useRunConversation() {
|
|
|
57
57
|
const qc = reactQuery.useQueryClient();
|
|
58
58
|
return reactQuery.useMutation({
|
|
59
59
|
mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
|
|
60
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
60
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
function useActOnStep() {
|
|
@@ -68,7 +68,7 @@ function useActOnStep() {
|
|
|
68
68
|
conversationId,
|
|
69
69
|
body
|
|
70
70
|
}) => arbi.conversations.actOnStep(conversationId, body),
|
|
71
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
71
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
function useSendBackStep() {
|
|
@@ -81,7 +81,7 @@ function useSendBackStep() {
|
|
|
81
81
|
to,
|
|
82
82
|
note
|
|
83
83
|
}) => arbi.conversations.sendBackStep(conversationId, step, { to, note }),
|
|
84
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
84
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
function usePlanWork() {
|
|
@@ -93,7 +93,7 @@ function usePlanWork() {
|
|
|
93
93
|
function useConversationPendingAuth(conversationId, options) {
|
|
94
94
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
95
95
|
return reactQuery.useQuery({
|
|
96
|
-
queryKey: [...
|
|
96
|
+
queryKey: [...chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
|
|
97
97
|
queryFn: () => arbi.conversations.pendingAuth(conversationId),
|
|
98
98
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
99
99
|
retry: false
|
|
@@ -102,7 +102,7 @@ function useConversationPendingAuth(conversationId, options) {
|
|
|
102
102
|
function useConversationActivity(conversationId, options) {
|
|
103
103
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
104
104
|
return reactQuery.useQuery({
|
|
105
|
-
queryKey: [...
|
|
105
|
+
queryKey: [...chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
|
|
106
106
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
107
107
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
108
108
|
refetchInterval: options?.live ? 2500 : false
|
|
@@ -111,7 +111,7 @@ function useConversationActivity(conversationId, options) {
|
|
|
111
111
|
function useWorkflows(options) {
|
|
112
112
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
113
113
|
return reactQuery.useQuery({
|
|
114
|
-
queryKey:
|
|
114
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workflows(),
|
|
115
115
|
queryFn: () => arbi.workflows.list(),
|
|
116
116
|
refetchInterval: options?.live ? 15e3 : false,
|
|
117
117
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
@@ -122,7 +122,7 @@ function useCreateWorkflow() {
|
|
|
122
122
|
const qc = reactQuery.useQueryClient();
|
|
123
123
|
return reactQuery.useMutation({
|
|
124
124
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
125
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
125
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workflows() })
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
function useUpdateWorkflow() {
|
|
@@ -133,7 +133,7 @@ function useUpdateWorkflow() {
|
|
|
133
133
|
workflowId,
|
|
134
134
|
patch
|
|
135
135
|
}) => arbi.workflows.update(workflowId, patch),
|
|
136
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
136
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workflows() })
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
function useDeleteWorkflow() {
|
|
@@ -141,7 +141,7 @@ function useDeleteWorkflow() {
|
|
|
141
141
|
const qc = reactQuery.useQueryClient();
|
|
142
142
|
return reactQuery.useMutation({
|
|
143
143
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
144
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
144
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workflows() })
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function useRunWorkflow() {
|
|
@@ -150,8 +150,8 @@ function useRunWorkflow() {
|
|
|
150
150
|
return reactQuery.useMutation({
|
|
151
151
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
152
152
|
onSuccess: () => Promise.all([
|
|
153
|
-
qc.invalidateQueries({ queryKey:
|
|
154
|
-
qc.invalidateQueries({ queryKey:
|
|
153
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workflows() }),
|
|
154
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
155
155
|
])
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -160,13 +160,13 @@ function useCreateAgent() {
|
|
|
160
160
|
const qc = reactQuery.useQueryClient();
|
|
161
161
|
return reactQuery.useMutation({
|
|
162
162
|
mutationFn: (name) => arbi.agents.create(name),
|
|
163
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
163
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agents() })
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
function useAgentConfig(agentExtId, options) {
|
|
167
167
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
168
168
|
return reactQuery.useQuery({
|
|
169
|
-
queryKey:
|
|
169
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
170
170
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
171
171
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
172
172
|
});
|
|
@@ -174,7 +174,7 @@ function useAgentConfig(agentExtId, options) {
|
|
|
174
174
|
function useAgentModels(options) {
|
|
175
175
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
176
176
|
return reactQuery.useQuery({
|
|
177
|
-
queryKey:
|
|
177
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.models(),
|
|
178
178
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
179
179
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
180
180
|
});
|
|
@@ -197,17 +197,17 @@ function useSaveAgentConfig() {
|
|
|
197
197
|
});
|
|
198
198
|
},
|
|
199
199
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
200
|
-
qc.invalidateQueries({ queryKey:
|
|
201
|
-
qc.invalidateQueries({ queryKey:
|
|
200
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.configs() }),
|
|
201
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
202
202
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
203
|
-
qc.invalidateQueries({ queryKey:
|
|
203
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agents() })
|
|
204
204
|
])
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
function useAgentWorkspaces(agentExtId, options) {
|
|
208
208
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
209
209
|
return reactQuery.useQuery({
|
|
210
|
-
queryKey:
|
|
210
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
211
211
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
212
212
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
213
213
|
});
|
|
@@ -228,7 +228,7 @@ function useGrantAgentAccess() {
|
|
|
228
228
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
229
229
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
230
230
|
},
|
|
231
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
231
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
function useRevokeAgentAccess() {
|
|
@@ -247,13 +247,13 @@ function useRevokeAgentAccess() {
|
|
|
247
247
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
250
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
function useSkills(options) {
|
|
254
254
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
255
255
|
return reactQuery.useQuery({
|
|
256
|
-
queryKey: [...
|
|
256
|
+
queryKey: [...chunkIJQ4S4LG_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
257
257
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
258
258
|
refetchInterval: options?.live ? 5e3 : false,
|
|
259
259
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -284,7 +284,7 @@ function useUploadSkillFiles() {
|
|
|
284
284
|
}
|
|
285
285
|
return results;
|
|
286
286
|
},
|
|
287
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
287
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.skills() })
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
function useStartWorkQuery() {
|
|
@@ -311,7 +311,7 @@ function useStartWorkQuery() {
|
|
|
311
311
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
312
312
|
);
|
|
313
313
|
},
|
|
314
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
314
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.allConversations() })
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
function useAgentSession(agentId, options) {
|
|
@@ -471,8 +471,8 @@ function useArbiChat(options = {}) {
|
|
|
471
471
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
472
472
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
473
473
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
474
|
-
const { data: docs = [], isLoading: isLoadingDocuments, refetch } =
|
|
475
|
-
const ordinaryHistory =
|
|
474
|
+
const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkIJQ4S4LG_cjs.useDocuments(workspaceId);
|
|
475
|
+
const ordinaryHistory = chunkIJQ4S4LG_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
476
476
|
const agentHistory = useAgentChats(agentId);
|
|
477
477
|
const stored = React.useMemo(
|
|
478
478
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -487,7 +487,7 @@ function useArbiChat(options = {}) {
|
|
|
487
487
|
);
|
|
488
488
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
489
489
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
490
|
-
const query =
|
|
490
|
+
const query = chunkIJQ4S4LG_cjs.useAssistantQuery();
|
|
491
491
|
const { mutateAsync } = query;
|
|
492
492
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
493
493
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -547,7 +547,7 @@ function useArbiChat(options = {}) {
|
|
|
547
547
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
548
548
|
) || active.messages.some((message) => message.status === "streaming");
|
|
549
549
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
550
|
-
const loaded =
|
|
550
|
+
const loaded = chunkIJQ4S4LG_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
551
551
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
552
552
|
live: liveHistory
|
|
553
553
|
});
|
|
@@ -1326,14 +1326,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1326
1326
|
if (!workspaceId) return;
|
|
1327
1327
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1328
1328
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1329
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1330
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1329
|
+
void queryClient.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1330
|
+
void queryClient.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1331
1331
|
return;
|
|
1332
1332
|
}
|
|
1333
1333
|
if (client.isMessageType(msg, "task_update")) {
|
|
1334
1334
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1335
1335
|
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1336
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1336
|
+
void queryClient.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
});
|
|
@@ -1462,7 +1462,7 @@ function useShellWorkspaces(options) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
function useArbiShellWorkspaces(options = {}) {
|
|
1464
1464
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1465
|
-
const query =
|
|
1465
|
+
const query = chunkIJQ4S4LG_cjs.useWorkspaces();
|
|
1466
1466
|
const { select, ...rest } = options;
|
|
1467
1467
|
const defaultSelect = React.useCallback(
|
|
1468
1468
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1478,8 +1478,8 @@ function useArbiShellWorkspaces(options = {}) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
function invalidateTagData(qc, workspaceId) {
|
|
1480
1480
|
return Promise.all([
|
|
1481
|
-
qc.invalidateQueries({ queryKey:
|
|
1482
|
-
qc.invalidateQueries({ queryKey:
|
|
1481
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.tags(workspaceId) }),
|
|
1482
|
+
qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.facts(workspaceId) })
|
|
1483
1483
|
]);
|
|
1484
1484
|
}
|
|
1485
1485
|
function useInvalidateTagData() {
|
|
@@ -1494,7 +1494,7 @@ function useTagKindSchema(kind, options) {
|
|
|
1494
1494
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1495
1495
|
const workspaceId = arbi.getWorkspaceId() ?? "";
|
|
1496
1496
|
return reactQuery.useQuery({
|
|
1497
|
-
queryKey:
|
|
1497
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
|
|
1498
1498
|
queryFn: () => arbi.tagKinds.get(kind),
|
|
1499
1499
|
enabled: (options?.enabled ?? true) && !!kind && !!workspaceId && arbi.hasWorkspace
|
|
1500
1500
|
});
|
|
@@ -1510,7 +1510,7 @@ function useUpdateTagKindSchema() {
|
|
|
1510
1510
|
onSuccess: (schema) => {
|
|
1511
1511
|
const workspaceId = arbi.getWorkspaceId();
|
|
1512
1512
|
if (!workspaceId) return;
|
|
1513
|
-
qc.setQueryData(
|
|
1513
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
|
|
1514
1514
|
return invalidateTagData(qc, workspaceId);
|
|
1515
1515
|
}
|
|
1516
1516
|
});
|
|
@@ -1529,7 +1529,7 @@ function useSetTagValues() {
|
|
|
1529
1529
|
function useFilteredProjects(filters, options) {
|
|
1530
1530
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1531
1531
|
return reactQuery.useQuery({
|
|
1532
|
-
queryKey:
|
|
1532
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
1533
1533
|
queryFn: () => arbi.projects.list(filters),
|
|
1534
1534
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1535
1535
|
});
|
|
@@ -1542,14 +1542,14 @@ function useUpdateProjectFields() {
|
|
|
1542
1542
|
projectExtId,
|
|
1543
1543
|
patch
|
|
1544
1544
|
}) => arbi.projects.update(projectExtId, patch),
|
|
1545
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1545
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.projects() })
|
|
1546
1546
|
});
|
|
1547
1547
|
}
|
|
1548
1548
|
function useProjectEvents(projectExtId, options) {
|
|
1549
1549
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1550
1550
|
return reactQuery.useQuery({
|
|
1551
1551
|
queryKey: [
|
|
1552
|
-
...
|
|
1552
|
+
...chunkIJQ4S4LG_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
1553
1553
|
options?.kind ?? "all",
|
|
1554
1554
|
options?.limit ?? "default"
|
|
1555
1555
|
],
|
|
@@ -1560,7 +1560,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
1560
1560
|
function useConversationUsage(conversationId, options) {
|
|
1561
1561
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1562
1562
|
return reactQuery.useQuery({
|
|
1563
|
-
queryKey:
|
|
1563
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
1564
1564
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
1565
1565
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
1566
1566
|
refetchInterval: options?.live ? 1e4 : false
|
|
@@ -1569,7 +1569,7 @@ function useConversationUsage(conversationId, options) {
|
|
|
1569
1569
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
1570
1570
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1571
1571
|
return reactQuery.useQuery({
|
|
1572
|
-
queryKey:
|
|
1572
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
1573
1573
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
1574
1574
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1575
1575
|
});
|
|
@@ -1577,7 +1577,7 @@ function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
|
1577
1577
|
function useContacts(options) {
|
|
1578
1578
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1579
1579
|
return reactQuery.useQuery({
|
|
1580
|
-
queryKey:
|
|
1580
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.contacts(),
|
|
1581
1581
|
queryFn: () => arbi.contacts.list(),
|
|
1582
1582
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1583
1583
|
});
|
|
@@ -1597,7 +1597,7 @@ function useAddContacts() {
|
|
|
1597
1597
|
const qc = reactQuery.useQueryClient();
|
|
1598
1598
|
return reactQuery.useMutation({
|
|
1599
1599
|
mutationFn: (emails) => arbi.contacts.add(emails),
|
|
1600
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1600
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.contacts() })
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
1603
1603
|
function useRemoveContacts() {
|
|
@@ -1605,7 +1605,7 @@ function useRemoveContacts() {
|
|
|
1605
1605
|
const qc = reactQuery.useQueryClient();
|
|
1606
1606
|
return reactQuery.useMutation({
|
|
1607
1607
|
mutationFn: (contactIds) => arbi.contacts.remove(contactIds),
|
|
1608
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1608
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.contacts() })
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
1611
|
function toProfileView(profile) {
|
|
@@ -1617,7 +1617,7 @@ function toProfileView(profile) {
|
|
|
1617
1617
|
function useProfile(options) {
|
|
1618
1618
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1619
1619
|
return reactQuery.useQuery({
|
|
1620
|
-
queryKey:
|
|
1620
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.profile(),
|
|
1621
1621
|
queryFn: () => {
|
|
1622
1622
|
const profile = arbi.user.profile();
|
|
1623
1623
|
return profile ? toProfileView(profile) : null;
|
|
@@ -1640,9 +1640,9 @@ function useUpdateProfile() {
|
|
|
1640
1640
|
return profile ? toProfileView(profile) : null;
|
|
1641
1641
|
},
|
|
1642
1642
|
onSuccess: (profile) => {
|
|
1643
|
-
qc.setQueryData(
|
|
1644
|
-
void qc.invalidateQueries({ queryKey:
|
|
1645
|
-
return qc.invalidateQueries({ queryKey:
|
|
1643
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.profile(), profile);
|
|
1644
|
+
void qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.identity() });
|
|
1645
|
+
return qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workspaces() });
|
|
1646
1646
|
}
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
@@ -1727,7 +1727,7 @@ function useConfirmEmailChange() {
|
|
|
1727
1727
|
mutationFn: ({ newEmail, code }) => arbi.account.confirmEmailChange(newEmail, code),
|
|
1728
1728
|
onSuccess: () => {
|
|
1729
1729
|
const profile = arbi.user.profile();
|
|
1730
|
-
qc.setQueryData(
|
|
1730
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.profile(), profile ? toProfileView(profile) : null);
|
|
1731
1731
|
}
|
|
1732
1732
|
});
|
|
1733
1733
|
}
|
|
@@ -1896,7 +1896,7 @@ function toNotificationPreferences(stored, keys) {
|
|
|
1896
1896
|
function useUserSettings(options) {
|
|
1897
1897
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1898
1898
|
return reactQuery.useQuery({
|
|
1899
|
-
queryKey:
|
|
1899
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings(),
|
|
1900
1900
|
queryFn: () => arbi.settings.get(),
|
|
1901
1901
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1902
1902
|
});
|
|
@@ -1909,18 +1909,18 @@ function useNotificationPreferences(keys, options) {
|
|
|
1909
1909
|
const save = reactQuery.useMutation({
|
|
1910
1910
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
1911
1911
|
onMutate: async (patch) => {
|
|
1912
|
-
await qc.cancelQueries({ queryKey:
|
|
1913
|
-
const previous = qc.getQueryData(
|
|
1912
|
+
await qc.cancelQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings() });
|
|
1913
|
+
const previous = qc.getQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings());
|
|
1914
1914
|
qc.setQueryData(
|
|
1915
|
-
|
|
1915
|
+
chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings(),
|
|
1916
1916
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
1917
1917
|
);
|
|
1918
1918
|
return { previous };
|
|
1919
1919
|
},
|
|
1920
1920
|
onError: (_err, _patch, context) => {
|
|
1921
|
-
qc.setQueryData(
|
|
1921
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
1922
1922
|
},
|
|
1923
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
1923
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings() })
|
|
1924
1924
|
});
|
|
1925
1925
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
1926
1926
|
const setAll = React.useCallback(
|
|
@@ -1947,18 +1947,18 @@ function useRelevanceSave() {
|
|
|
1947
1947
|
return reactQuery.useMutation({
|
|
1948
1948
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
1949
1949
|
onMutate: async (patch) => {
|
|
1950
|
-
await qc.cancelQueries({ queryKey:
|
|
1951
|
-
const previous = qc.getQueryData(
|
|
1950
|
+
await qc.cancelQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings() });
|
|
1951
|
+
const previous = qc.getQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings());
|
|
1952
1952
|
qc.setQueryData(
|
|
1953
|
-
|
|
1953
|
+
chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings(),
|
|
1954
1954
|
(old) => old ? { ...old, ...patch } : old
|
|
1955
1955
|
);
|
|
1956
1956
|
return { previous };
|
|
1957
1957
|
},
|
|
1958
1958
|
onError: (_err, _patch, context) => {
|
|
1959
|
-
qc.setQueryData(
|
|
1959
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
1960
1960
|
},
|
|
1961
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
1961
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings() })
|
|
1962
1962
|
});
|
|
1963
1963
|
}
|
|
1964
1964
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -1969,7 +1969,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
1969
1969
|
const setLevel = React.useCallback(
|
|
1970
1970
|
(next) => {
|
|
1971
1971
|
if (!workspaceId) return;
|
|
1972
|
-
const current = qc.getQueryData(
|
|
1972
|
+
const current = qc.getQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
1973
1973
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
1974
1974
|
},
|
|
1975
1975
|
[qc, save, settings.data, workspaceId]
|
|
@@ -1990,7 +1990,7 @@ function useFollowThread(conversationId, options) {
|
|
|
1990
1990
|
const setFollowing = React.useCallback(
|
|
1991
1991
|
(on) => {
|
|
1992
1992
|
if (!conversationId) return;
|
|
1993
|
-
const current = qc.getQueryData(
|
|
1993
|
+
const current = qc.getQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
1994
1994
|
save.mutate({
|
|
1995
1995
|
followed_threads: browser.settings.withMembership(current?.followed_threads, conversationId, on)
|
|
1996
1996
|
});
|
|
@@ -2010,7 +2010,7 @@ function useTerminateSession() {
|
|
|
2010
2010
|
const qc = reactQuery.useQueryClient();
|
|
2011
2011
|
return reactQuery.useMutation({
|
|
2012
2012
|
mutationFn: (sessionId) => arbi.sessions.terminate(sessionId),
|
|
2013
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2013
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.sessions() })
|
|
2014
2014
|
});
|
|
2015
2015
|
}
|
|
2016
2016
|
function useLogoutAllSessions() {
|
|
@@ -2153,7 +2153,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2153
2153
|
const apiRef = React.useRef(api);
|
|
2154
2154
|
apiRef.current = api;
|
|
2155
2155
|
const query = reactQuery.useQuery({
|
|
2156
|
-
queryKey:
|
|
2156
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.identity(),
|
|
2157
2157
|
queryFn: () => apiRef.current.status(),
|
|
2158
2158
|
enabled,
|
|
2159
2159
|
staleTime: 6e4
|
|
@@ -2171,7 +2171,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2171
2171
|
const lastVerified = React.useRef(void 0);
|
|
2172
2172
|
const apply = React.useCallback(
|
|
2173
2173
|
(next) => {
|
|
2174
|
-
qc.setQueryData(
|
|
2174
|
+
qc.setQueryData(chunkIJQ4S4LG_cjs.arbiQueryKeys.identity(), next);
|
|
2175
2175
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
2176
2176
|
onVerifiedChange?.(next.verified);
|
|
2177
2177
|
}
|
|
@@ -2376,12 +2376,12 @@ function useIdentityVerification(options = {}) {
|
|
|
2376
2376
|
return useIdentityVerificationFlow(api, {
|
|
2377
2377
|
enabled: arbi.isLoggedIn,
|
|
2378
2378
|
onVerifiedChange: (verified) => {
|
|
2379
|
-
void qc.invalidateQueries({ queryKey:
|
|
2379
|
+
void qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.profile() });
|
|
2380
2380
|
onVerifiedChange?.(verified);
|
|
2381
2381
|
},
|
|
2382
2382
|
onNameAccepted: (name) => {
|
|
2383
|
-
void qc.invalidateQueries({ queryKey:
|
|
2384
|
-
void qc.invalidateQueries({ queryKey:
|
|
2383
|
+
void qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.profile() });
|
|
2384
|
+
void qc.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.workspaces() });
|
|
2385
2385
|
onNameAccepted?.(name);
|
|
2386
2386
|
}
|
|
2387
2387
|
});
|
|
@@ -2730,7 +2730,7 @@ function useMailDraftCompose(account, draftId, prepare, options = {}) {
|
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
2732
|
function useWorkspaceDocs(workspaceId) {
|
|
2733
|
-
const { data: docs = [], isLoading, isError } =
|
|
2733
|
+
const { data: docs = [], isLoading, isError } = chunkIJQ4S4LG_cjs.useDocuments(workspaceId);
|
|
2734
2734
|
const docIds = React.useMemo(
|
|
2735
2735
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
2736
2736
|
[docs]
|
|
@@ -2738,7 +2738,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
2738
2738
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
2739
2739
|
}
|
|
2740
2740
|
function useAiTask() {
|
|
2741
|
-
const mutation =
|
|
2741
|
+
const mutation = chunkIJQ4S4LG_cjs.useAssistantQuery();
|
|
2742
2742
|
const [status, setStatus] = React.useState("idle");
|
|
2743
2743
|
const [text, setText] = React.useState("");
|
|
2744
2744
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -3358,8 +3358,8 @@ function DocumentReview({
|
|
|
3358
3358
|
onClose,
|
|
3359
3359
|
className
|
|
3360
3360
|
}) {
|
|
3361
|
-
const parsedQuery =
|
|
3362
|
-
const tagsQuery =
|
|
3361
|
+
const parsedQuery = chunkIJQ4S4LG_cjs.useParsedDocument(docId, stage);
|
|
3362
|
+
const tagsQuery = chunkIJQ4S4LG_cjs.useTags(workspaceId);
|
|
3363
3363
|
const tagNameById = React__default.default.useMemo(() => {
|
|
3364
3364
|
const map = /* @__PURE__ */ new Map();
|
|
3365
3365
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -3590,7 +3590,7 @@ function SemanticSearch({
|
|
|
3590
3590
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
3591
3591
|
const [value, setValue] = React.useState("");
|
|
3592
3592
|
const [selected, setSelected] = React.useState(null);
|
|
3593
|
-
const { data: docs = [] } =
|
|
3593
|
+
const { data: docs = [] } = chunkIJQ4S4LG_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
3594
3594
|
const docMap = React.useMemo(() => {
|
|
3595
3595
|
const map = /* @__PURE__ */ new Map();
|
|
3596
3596
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -4698,7 +4698,7 @@ function ActivityFeed({
|
|
|
4698
4698
|
enabled,
|
|
4699
4699
|
"data-testid": testId = "activity-feed"
|
|
4700
4700
|
}) {
|
|
4701
|
-
const { data, isLoading, isError } =
|
|
4701
|
+
const { data, isLoading, isError } = chunkIJQ4S4LG_cjs.useActivity({ limit, enabled });
|
|
4702
4702
|
if (isLoading) {
|
|
4703
4703
|
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: [
|
|
4704
4704
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -4850,7 +4850,7 @@ function useDirectMessages(options) {
|
|
|
4850
4850
|
enabled
|
|
4851
4851
|
});
|
|
4852
4852
|
const contactsQuery = reactQuery.useQuery({
|
|
4853
|
-
queryKey:
|
|
4853
|
+
queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.contacts(),
|
|
4854
4854
|
queryFn: () => arbi.contacts.list(),
|
|
4855
4855
|
enabled
|
|
4856
4856
|
});
|
|
@@ -6021,10 +6021,10 @@ function DocumentTable({
|
|
|
6021
6021
|
extraColumns,
|
|
6022
6022
|
className
|
|
6023
6023
|
}) {
|
|
6024
|
-
const query =
|
|
6024
|
+
const query = chunkIJQ4S4LG_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6025
6025
|
const rows = documents ?? query.data ?? [];
|
|
6026
6026
|
const isLoading = !documents && query.isLoading;
|
|
6027
|
-
const tagsQuery =
|
|
6027
|
+
const tagsQuery = chunkIJQ4S4LG_cjs.useTags(workspaceId);
|
|
6028
6028
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6029
6029
|
const map = /* @__PURE__ */ new Map();
|
|
6030
6030
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6205,7 +6205,7 @@ function DocumentCardMenu({
|
|
|
6205
6205
|
const invalidateDocuments = () => {
|
|
6206
6206
|
const workspaceId = arbi.getWorkspaceId();
|
|
6207
6207
|
if (workspaceId) {
|
|
6208
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6208
|
+
void queryClient.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
6209
6209
|
}
|
|
6210
6210
|
};
|
|
6211
6211
|
const download = reactQuery.useMutation({
|
|
@@ -6304,10 +6304,10 @@ function DocumentGallery({
|
|
|
6304
6304
|
minTileWidth = 148,
|
|
6305
6305
|
className
|
|
6306
6306
|
}) {
|
|
6307
|
-
const query =
|
|
6307
|
+
const query = chunkIJQ4S4LG_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6308
6308
|
const rows = documents ?? query.data ?? [];
|
|
6309
6309
|
const isLoading = !documents && query.isLoading;
|
|
6310
|
-
const tagsQuery =
|
|
6310
|
+
const tagsQuery = chunkIJQ4S4LG_cjs.useTags(workspaceId);
|
|
6311
6311
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6312
6312
|
const map = /* @__PURE__ */ new Map();
|
|
6313
6313
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6319,7 +6319,7 @@ function DocumentGallery({
|
|
|
6319
6319
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
6320
6320
|
[rows]
|
|
6321
6321
|
);
|
|
6322
|
-
const thumbsQuery =
|
|
6322
|
+
const thumbsQuery = chunkIJQ4S4LG_cjs.useThumbnails(docIds);
|
|
6323
6323
|
const thumbs = thumbsQuery.data ?? {};
|
|
6324
6324
|
const storeSelected = useArbiUiStore((s) => s.selectedDocIds);
|
|
6325
6325
|
const storeSetSelected = useArbiUiStore((s) => s.setSelectedDocIds);
|
|
@@ -6355,7 +6355,7 @@ function DocumentGallery({
|
|
|
6355
6355
|
setRenamingId(null);
|
|
6356
6356
|
const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
|
|
6357
6357
|
if (activeWorkspace) {
|
|
6358
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6358
|
+
void queryClient.invalidateQueries({ queryKey: chunkIJQ4S4LG_cjs.arbiQueryKeys.documents(activeWorkspace) });
|
|
6359
6359
|
}
|
|
6360
6360
|
}
|
|
6361
6361
|
});
|
|
@@ -6973,111 +6973,123 @@ function hasVideoTrack(blob) {
|
|
|
6973
6973
|
|
|
6974
6974
|
Object.defineProperty(exports, "DEFAULT_USD_PER_CREDIT", {
|
|
6975
6975
|
enumerable: true,
|
|
6976
|
-
get: function () { return
|
|
6976
|
+
get: function () { return chunkIJQ4S4LG_cjs.DEFAULT_USD_PER_CREDIT; }
|
|
6977
|
+
});
|
|
6978
|
+
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
6979
|
+
enumerable: true,
|
|
6980
|
+
get: function () { return chunkIJQ4S4LG_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
6977
6981
|
});
|
|
6978
6982
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
6979
6983
|
enumerable: true,
|
|
6980
|
-
get: function () { return
|
|
6984
|
+
get: function () { return chunkIJQ4S4LG_cjs.arbiQueryKeys; }
|
|
6981
6985
|
});
|
|
6982
6986
|
Object.defineProperty(exports, "creditsToUsd", {
|
|
6983
6987
|
enumerable: true,
|
|
6984
|
-
get: function () { return
|
|
6988
|
+
get: function () { return chunkIJQ4S4LG_cjs.creditsToUsd; }
|
|
6985
6989
|
});
|
|
6986
6990
|
Object.defineProperty(exports, "formatCredits", {
|
|
6987
6991
|
enumerable: true,
|
|
6988
|
-
get: function () { return
|
|
6992
|
+
get: function () { return chunkIJQ4S4LG_cjs.formatCredits; }
|
|
6989
6993
|
});
|
|
6990
6994
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
6991
6995
|
enumerable: true,
|
|
6992
|
-
get: function () { return
|
|
6996
|
+
get: function () { return chunkIJQ4S4LG_cjs.isUsageMetered; }
|
|
6993
6997
|
});
|
|
6994
6998
|
Object.defineProperty(exports, "useActivity", {
|
|
6995
6999
|
enumerable: true,
|
|
6996
|
-
get: function () { return
|
|
7000
|
+
get: function () { return chunkIJQ4S4LG_cjs.useActivity; }
|
|
6997
7001
|
});
|
|
6998
7002
|
Object.defineProperty(exports, "useAgents", {
|
|
6999
7003
|
enumerable: true,
|
|
7000
|
-
get: function () { return
|
|
7004
|
+
get: function () { return chunkIJQ4S4LG_cjs.useAgents; }
|
|
7001
7005
|
});
|
|
7002
7006
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
7003
7007
|
enumerable: true,
|
|
7004
|
-
get: function () { return
|
|
7008
|
+
get: function () { return chunkIJQ4S4LG_cjs.useAssistantQuery; }
|
|
7009
|
+
});
|
|
7010
|
+
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
7011
|
+
enumerable: true,
|
|
7012
|
+
get: function () { return chunkIJQ4S4LG_cjs.useCanCreateProjects; }
|
|
7005
7013
|
});
|
|
7006
7014
|
Object.defineProperty(exports, "useConfigs", {
|
|
7007
7015
|
enumerable: true,
|
|
7008
|
-
get: function () { return
|
|
7016
|
+
get: function () { return chunkIJQ4S4LG_cjs.useConfigs; }
|
|
7009
7017
|
});
|
|
7010
7018
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
7011
7019
|
enumerable: true,
|
|
7012
|
-
get: function () { return
|
|
7020
|
+
get: function () { return chunkIJQ4S4LG_cjs.useConversationThreads; }
|
|
7013
7021
|
});
|
|
7014
7022
|
Object.defineProperty(exports, "useConversations", {
|
|
7015
7023
|
enumerable: true,
|
|
7016
|
-
get: function () { return
|
|
7024
|
+
get: function () { return chunkIJQ4S4LG_cjs.useConversations; }
|
|
7025
|
+
});
|
|
7026
|
+
Object.defineProperty(exports, "useCurrentUser", {
|
|
7027
|
+
enumerable: true,
|
|
7028
|
+
get: function () { return chunkIJQ4S4LG_cjs.useCurrentUser; }
|
|
7017
7029
|
});
|
|
7018
7030
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
7019
7031
|
enumerable: true,
|
|
7020
|
-
get: function () { return
|
|
7032
|
+
get: function () { return chunkIJQ4S4LG_cjs.useDeleteAgents; }
|
|
7021
7033
|
});
|
|
7022
7034
|
Object.defineProperty(exports, "useDocuments", {
|
|
7023
7035
|
enumerable: true,
|
|
7024
|
-
get: function () { return
|
|
7036
|
+
get: function () { return chunkIJQ4S4LG_cjs.useDocuments; }
|
|
7025
7037
|
});
|
|
7026
7038
|
Object.defineProperty(exports, "useFacts", {
|
|
7027
7039
|
enumerable: true,
|
|
7028
|
-
get: function () { return
|
|
7040
|
+
get: function () { return chunkIJQ4S4LG_cjs.useFacts; }
|
|
7029
7041
|
});
|
|
7030
7042
|
Object.defineProperty(exports, "useHealth", {
|
|
7031
7043
|
enumerable: true,
|
|
7032
|
-
get: function () { return
|
|
7044
|
+
get: function () { return chunkIJQ4S4LG_cjs.useHealth; }
|
|
7033
7045
|
});
|
|
7034
7046
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
7035
7047
|
enumerable: true,
|
|
7036
|
-
get: function () { return
|
|
7048
|
+
get: function () { return chunkIJQ4S4LG_cjs.useParsedDocument; }
|
|
7037
7049
|
});
|
|
7038
7050
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
7039
7051
|
enumerable: true,
|
|
7040
|
-
get: function () { return
|
|
7052
|
+
get: function () { return chunkIJQ4S4LG_cjs.useProjectInvoices; }
|
|
7041
7053
|
});
|
|
7042
7054
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
7043
7055
|
enumerable: true,
|
|
7044
|
-
get: function () { return
|
|
7056
|
+
get: function () { return chunkIJQ4S4LG_cjs.useProjectUsage; }
|
|
7045
7057
|
});
|
|
7046
7058
|
Object.defineProperty(exports, "useProjects", {
|
|
7047
7059
|
enumerable: true,
|
|
7048
|
-
get: function () { return
|
|
7060
|
+
get: function () { return chunkIJQ4S4LG_cjs.useProjects; }
|
|
7049
7061
|
});
|
|
7050
7062
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
7051
7063
|
enumerable: true,
|
|
7052
|
-
get: function () { return
|
|
7064
|
+
get: function () { return chunkIJQ4S4LG_cjs.useProjectsUsage; }
|
|
7053
7065
|
});
|
|
7054
7066
|
Object.defineProperty(exports, "useSessions", {
|
|
7055
7067
|
enumerable: true,
|
|
7056
|
-
get: function () { return
|
|
7068
|
+
get: function () { return chunkIJQ4S4LG_cjs.useSessions; }
|
|
7057
7069
|
});
|
|
7058
7070
|
Object.defineProperty(exports, "useTags", {
|
|
7059
7071
|
enumerable: true,
|
|
7060
|
-
get: function () { return
|
|
7072
|
+
get: function () { return chunkIJQ4S4LG_cjs.useTags; }
|
|
7061
7073
|
});
|
|
7062
7074
|
Object.defineProperty(exports, "useThumbnails", {
|
|
7063
7075
|
enumerable: true,
|
|
7064
|
-
get: function () { return
|
|
7076
|
+
get: function () { return chunkIJQ4S4LG_cjs.useThumbnails; }
|
|
7065
7077
|
});
|
|
7066
7078
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
7067
7079
|
enumerable: true,
|
|
7068
|
-
get: function () { return
|
|
7080
|
+
get: function () { return chunkIJQ4S4LG_cjs.useUserUsageToday; }
|
|
7069
7081
|
});
|
|
7070
7082
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
7071
7083
|
enumerable: true,
|
|
7072
|
-
get: function () { return
|
|
7084
|
+
get: function () { return chunkIJQ4S4LG_cjs.useWorkspaceActivity; }
|
|
7073
7085
|
});
|
|
7074
7086
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
7075
7087
|
enumerable: true,
|
|
7076
|
-
get: function () { return
|
|
7088
|
+
get: function () { return chunkIJQ4S4LG_cjs.useWorkspaceUsers; }
|
|
7077
7089
|
});
|
|
7078
7090
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
7079
7091
|
enumerable: true,
|
|
7080
|
-
get: function () { return
|
|
7092
|
+
get: function () { return chunkIJQ4S4LG_cjs.useWorkspaces; }
|
|
7081
7093
|
});
|
|
7082
7094
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
7083
7095
|
enumerable: true,
|
|
@@ -7147,6 +7159,18 @@ Object.defineProperty(exports, "useNotify", {
|
|
|
7147
7159
|
enumerable: true,
|
|
7148
7160
|
get: function () { return chunkF7KQVVD2_cjs.useNotify; }
|
|
7149
7161
|
});
|
|
7162
|
+
Object.defineProperty(exports, "ArbiProvider", {
|
|
7163
|
+
enumerable: true,
|
|
7164
|
+
get: function () { return chunkXIDDXD5Y_cjs.ArbiProvider; }
|
|
7165
|
+
});
|
|
7166
|
+
Object.defineProperty(exports, "useArbi", {
|
|
7167
|
+
enumerable: true,
|
|
7168
|
+
get: function () { return chunkXIDDXD5Y_cjs.useArbi; }
|
|
7169
|
+
});
|
|
7170
|
+
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
7171
|
+
enumerable: true,
|
|
7172
|
+
get: function () { return chunkXIDDXD5Y_cjs.useDeploymentDomain; }
|
|
7173
|
+
});
|
|
7150
7174
|
Object.defineProperty(exports, "AgentBadge", {
|
|
7151
7175
|
enumerable: true,
|
|
7152
7176
|
get: function () { return chunkGNIDMHTU_cjs.AgentBadge; }
|
|
@@ -7679,18 +7703,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
|
|
|
7679
7703
|
enumerable: true,
|
|
7680
7704
|
get: function () { return chunk5SZ2J2WT_cjs.splitMarkdownBlocks; }
|
|
7681
7705
|
});
|
|
7682
|
-
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
7683
|
-
enumerable: true,
|
|
7684
|
-
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
7685
|
-
});
|
|
7686
|
-
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
7687
|
-
enumerable: true,
|
|
7688
|
-
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
7689
|
-
});
|
|
7690
|
-
Object.defineProperty(exports, "trimOpenCitation", {
|
|
7691
|
-
enumerable: true,
|
|
7692
|
-
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
7693
|
-
});
|
|
7694
7706
|
Object.defineProperty(exports, "Button", {
|
|
7695
7707
|
enumerable: true,
|
|
7696
7708
|
get: function () { return chunkWYZJLZ67_cjs.Button; }
|
|
@@ -7739,6 +7751,18 @@ Object.defineProperty(exports, "buttonVariants", {
|
|
|
7739
7751
|
enumerable: true,
|
|
7740
7752
|
get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
|
|
7741
7753
|
});
|
|
7754
|
+
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
7755
|
+
enumerable: true,
|
|
7756
|
+
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
7757
|
+
});
|
|
7758
|
+
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
7759
|
+
enumerable: true,
|
|
7760
|
+
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
7761
|
+
});
|
|
7762
|
+
Object.defineProperty(exports, "trimOpenCitation", {
|
|
7763
|
+
enumerable: true,
|
|
7764
|
+
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
7765
|
+
});
|
|
7742
7766
|
Object.defineProperty(exports, "ScrollArea", {
|
|
7743
7767
|
enumerable: true,
|
|
7744
7768
|
get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
|
|
@@ -7819,18 +7843,6 @@ Object.defineProperty(exports, "cn", {
|
|
|
7819
7843
|
enumerable: true,
|
|
7820
7844
|
get: function () { return chunkS6A6FSG7_cjs.cn; }
|
|
7821
7845
|
});
|
|
7822
|
-
Object.defineProperty(exports, "ArbiProvider", {
|
|
7823
|
-
enumerable: true,
|
|
7824
|
-
get: function () { return chunkXIDDXD5Y_cjs.ArbiProvider; }
|
|
7825
|
-
});
|
|
7826
|
-
Object.defineProperty(exports, "useArbi", {
|
|
7827
|
-
enumerable: true,
|
|
7828
|
-
get: function () { return chunkXIDDXD5Y_cjs.useArbi; }
|
|
7829
|
-
});
|
|
7830
|
-
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
7831
|
-
enumerable: true,
|
|
7832
|
-
get: function () { return chunkXIDDXD5Y_cjs.useDeploymentDomain; }
|
|
7833
|
-
});
|
|
7834
7846
|
Object.defineProperty(exports, "Arbi", {
|
|
7835
7847
|
enumerable: true,
|
|
7836
7848
|
get: function () { return browser.Arbi; }
|