@arbidocs/react 0.4.70 → 0.4.71
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/README.md +6 -4
- package/dist/ProductionDialog-BRrZ5Lj5.d.cts +84 -0
- package/dist/ProductionDialog-DUC9BXWS.d.ts +84 -0
- package/dist/annotations/freeze/index.cjs +45 -1100
- package/dist/annotations/freeze/index.cjs.map +1 -1
- package/dist/annotations/freeze/index.d.cts +2 -85
- package/dist/annotations/freeze/index.d.ts +2 -85
- package/dist/annotations/freeze/index.js +4 -1084
- package/dist/annotations/freeze/index.js.map +1 -1
- package/dist/annotations/index.d.cts +3 -51
- package/dist/annotations/index.d.ts +3 -51
- package/dist/artifacts/index.cjs +9 -9
- package/dist/artifacts/index.js +2 -2
- package/dist/bundle-BnCSbHy2.d.cts +85 -0
- package/dist/bundle-BnCSbHy2.d.ts +85 -0
- package/dist/bundle-N2JIJ2T6.js +4 -0
- package/dist/bundle-N2JIJ2T6.js.map +1 -0
- package/dist/bundle-T6BEVYHE.cjs +13 -0
- package/dist/bundle-T6BEVYHE.cjs.map +1 -0
- package/dist/{chunk-SYPUFZGA.js → chunk-6ERJUIMQ.js} +3 -3
- package/dist/{chunk-SYPUFZGA.js.map → chunk-6ERJUIMQ.js.map} +1 -1
- package/dist/{chunk-7CL7QHT6.cjs → chunk-6TFD5OS5.cjs} +25 -25
- package/dist/{chunk-7CL7QHT6.cjs.map → chunk-6TFD5OS5.cjs.map} +1 -1
- package/dist/{chunk-ZMTLGO3K.cjs → chunk-IIT7DMQL.cjs} +6 -2
- package/dist/chunk-IIT7DMQL.cjs.map +1 -0
- package/dist/chunk-QJXFRP5R.cjs +1103 -0
- package/dist/chunk-QJXFRP5R.cjs.map +1 -0
- package/dist/{chunk-J4MX2W4H.js → chunk-WBYNKFUO.js} +6 -3
- package/dist/chunk-WBYNKFUO.js.map +1 -0
- package/dist/chunk-ZJMUNGOY.js +1088 -0
- package/dist/chunk-ZJMUNGOY.js.map +1 -0
- package/dist/document-tools/index.cjs +223 -8
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +139 -9
- package/dist/document-tools/index.d.ts +139 -9
- package/dist/document-tools/index.js +207 -9
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +153 -149
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +6 -6
- package/dist/ui/index.cjs +9 -9
- package/dist/ui/index.js +1 -1
- package/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-J4MX2W4H.js.map +0 -1
- package/dist/chunk-ZMTLGO3K.cjs.map +0 -1
- package/dist/store-CqkkD7Ho.d.cts +0 -35
- package/dist/store-D1nhbkgk.d.ts +0 -35
package/dist/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6TFD5OS5_cjs = require('./chunk-6TFD5OS5.cjs');
|
|
4
4
|
var chunk5DCRIWCA_cjs = require('./chunk-5DCRIWCA.cjs');
|
|
5
5
|
var chunkF7KQVVD2_cjs = require('./chunk-F7KQVVD2.cjs');
|
|
6
6
|
var chunkBTRIS3HY_cjs = require('./chunk-BTRIS3HY.cjs');
|
|
7
7
|
var chunk5SZ2J2WT_cjs = require('./chunk-5SZ2J2WT.cjs');
|
|
8
|
-
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
9
8
|
var chunkLQ5YHB7W_cjs = require('./chunk-LQ5YHB7W.cjs');
|
|
9
|
+
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
10
10
|
var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
|
|
11
11
|
var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
|
|
12
12
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
13
13
|
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
14
|
-
var
|
|
14
|
+
var chunkIIT7DMQL_cjs = require('./chunk-IIT7DMQL.cjs');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var reactQuery = require('@tanstack/react-query');
|
|
17
17
|
var browser = require('@arbidocs/sdk/browser');
|
|
@@ -34,129 +34,129 @@ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
|
34
34
|
var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
|
|
35
35
|
|
|
36
36
|
function useUpdateConversation() {
|
|
37
|
-
const arbi =
|
|
37
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
38
38
|
const qc = reactQuery.useQueryClient();
|
|
39
39
|
return reactQuery.useMutation({
|
|
40
40
|
mutationFn: ({
|
|
41
41
|
conversationId,
|
|
42
42
|
patch
|
|
43
43
|
}) => arbi.conversations.update(conversationId, patch),
|
|
44
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
44
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations() })
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
function useCreateWork() {
|
|
48
|
-
const arbi =
|
|
48
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
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: chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations() })
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
function useRunConversation() {
|
|
56
|
-
const arbi =
|
|
56
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
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: chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations() })
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
function usePlanWork() {
|
|
64
|
-
const arbi =
|
|
64
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
65
65
|
return reactQuery.useMutation({
|
|
66
66
|
mutationFn: (body) => arbi.conversations.plan(body)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
function useConversationPendingAuth(conversationId, options) {
|
|
70
|
-
const arbi =
|
|
70
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
71
71
|
return reactQuery.useQuery({
|
|
72
|
-
queryKey: [...
|
|
72
|
+
queryKey: [...chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
|
|
73
73
|
queryFn: () => arbi.conversations.pendingAuth(conversationId),
|
|
74
74
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
75
75
|
retry: false
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function useConversationActivity(conversationId, options) {
|
|
79
|
-
const arbi =
|
|
79
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
80
80
|
return reactQuery.useQuery({
|
|
81
|
-
queryKey: [...
|
|
81
|
+
queryKey: [...chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
|
|
82
82
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
83
83
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
84
84
|
refetchInterval: options?.live ? 2500 : false
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
function useWorkflows(options) {
|
|
88
|
-
const arbi =
|
|
88
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
89
89
|
return reactQuery.useQuery({
|
|
90
|
-
queryKey:
|
|
90
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workflows(),
|
|
91
91
|
queryFn: () => arbi.workflows.list(),
|
|
92
92
|
refetchInterval: options?.live ? 15e3 : false,
|
|
93
93
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
function useCreateWorkflow() {
|
|
97
|
-
const arbi =
|
|
97
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
98
98
|
const qc = reactQuery.useQueryClient();
|
|
99
99
|
return reactQuery.useMutation({
|
|
100
100
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
101
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
101
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workflows() })
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
function useUpdateWorkflow() {
|
|
105
|
-
const arbi =
|
|
105
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
106
106
|
const qc = reactQuery.useQueryClient();
|
|
107
107
|
return reactQuery.useMutation({
|
|
108
108
|
mutationFn: ({
|
|
109
109
|
workflowId,
|
|
110
110
|
patch
|
|
111
111
|
}) => arbi.workflows.update(workflowId, patch),
|
|
112
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
112
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workflows() })
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
function useDeleteWorkflow() {
|
|
116
|
-
const arbi =
|
|
116
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
117
117
|
const qc = reactQuery.useQueryClient();
|
|
118
118
|
return reactQuery.useMutation({
|
|
119
119
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
120
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
120
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workflows() })
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
function useRunWorkflow() {
|
|
124
|
-
const arbi =
|
|
124
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
125
125
|
const qc = reactQuery.useQueryClient();
|
|
126
126
|
return reactQuery.useMutation({
|
|
127
127
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
128
128
|
onSuccess: () => Promise.all([
|
|
129
|
-
qc.invalidateQueries({ queryKey:
|
|
130
|
-
qc.invalidateQueries({ queryKey:
|
|
129
|
+
qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workflows() }),
|
|
130
|
+
qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations() })
|
|
131
131
|
])
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function useCreateAgent() {
|
|
135
|
-
const arbi =
|
|
135
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
136
136
|
const qc = reactQuery.useQueryClient();
|
|
137
137
|
return reactQuery.useMutation({
|
|
138
138
|
mutationFn: (name) => arbi.agents.create(name),
|
|
139
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
139
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agents() })
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
function useAgentConfig(agentExtId, options) {
|
|
143
|
-
const arbi =
|
|
143
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
144
144
|
return reactQuery.useQuery({
|
|
145
|
-
queryKey:
|
|
145
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
146
146
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
147
147
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
function useAgentModels(options) {
|
|
151
|
-
const arbi =
|
|
151
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
152
152
|
return reactQuery.useQuery({
|
|
153
|
-
queryKey:
|
|
153
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.models(),
|
|
154
154
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
155
155
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function useSaveAgentConfig() {
|
|
159
|
-
const arbi =
|
|
159
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
160
160
|
const qc = reactQuery.useQueryClient();
|
|
161
161
|
return reactQuery.useMutation({
|
|
162
162
|
mutationFn: async ({ agentExtId, title, sections }) => {
|
|
@@ -173,23 +173,23 @@ function useSaveAgentConfig() {
|
|
|
173
173
|
});
|
|
174
174
|
},
|
|
175
175
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
176
|
-
qc.invalidateQueries({ queryKey:
|
|
177
|
-
qc.invalidateQueries({ queryKey:
|
|
176
|
+
qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.configs() }),
|
|
177
|
+
qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
178
178
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
179
|
-
qc.invalidateQueries({ queryKey:
|
|
179
|
+
qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agents() })
|
|
180
180
|
])
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
function useAgentWorkspaces(agentExtId, options) {
|
|
184
|
-
const arbi =
|
|
184
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
185
185
|
return reactQuery.useQuery({
|
|
186
|
-
queryKey:
|
|
186
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
187
187
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
188
188
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
function useGrantAgentAccess() {
|
|
192
|
-
const arbi =
|
|
192
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
193
193
|
const qc = reactQuery.useQueryClient();
|
|
194
194
|
return reactQuery.useMutation({
|
|
195
195
|
mutationFn: async ({
|
|
@@ -204,11 +204,11 @@ function useGrantAgentAccess() {
|
|
|
204
204
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
205
205
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
206
206
|
},
|
|
207
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
207
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
function useRevokeAgentAccess() {
|
|
211
|
-
const arbi =
|
|
211
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
212
212
|
const qc = reactQuery.useQueryClient();
|
|
213
213
|
return reactQuery.useMutation({
|
|
214
214
|
mutationFn: async ({
|
|
@@ -223,13 +223,13 @@ function useRevokeAgentAccess() {
|
|
|
223
223
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
226
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
function useSkills(options) {
|
|
230
|
-
const arbi =
|
|
230
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
231
231
|
return reactQuery.useQuery({
|
|
232
|
-
queryKey: [...
|
|
232
|
+
queryKey: [...chunk6TFD5OS5_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
233
233
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
234
234
|
refetchInterval: options?.live ? 5e3 : false,
|
|
235
235
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -237,7 +237,7 @@ function useSkills(options) {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
function useUploadSkillFiles() {
|
|
240
|
-
const arbi =
|
|
240
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
241
241
|
const qc = reactQuery.useQueryClient();
|
|
242
242
|
return reactQuery.useMutation({
|
|
243
243
|
mutationFn: async (entries) => {
|
|
@@ -260,11 +260,11 @@ function useUploadSkillFiles() {
|
|
|
260
260
|
}
|
|
261
261
|
return results;
|
|
262
262
|
},
|
|
263
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
263
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.skills() })
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
function useStartWorkQuery() {
|
|
267
|
-
const arbi =
|
|
267
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
268
268
|
const qc = reactQuery.useQueryClient();
|
|
269
269
|
return reactQuery.useMutation({
|
|
270
270
|
mutationFn: async ({
|
|
@@ -287,11 +287,11 @@ function useStartWorkQuery() {
|
|
|
287
287
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
288
288
|
);
|
|
289
289
|
},
|
|
290
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
290
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.allConversations() })
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
function useAgentSession(agentId, options) {
|
|
294
|
-
const arbi =
|
|
294
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
295
295
|
return reactQuery.useQuery({
|
|
296
296
|
queryKey: ["arbi", "agent-session", agentId],
|
|
297
297
|
queryFn: () => arbi.agents.getSession(agentId),
|
|
@@ -300,7 +300,7 @@ function useAgentSession(agentId, options) {
|
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
function useAgentChats(agentId) {
|
|
303
|
-
const arbi =
|
|
303
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
304
304
|
return reactQuery.useQuery({
|
|
305
305
|
queryKey: ["arbi", "agent-chats", agentId],
|
|
306
306
|
queryFn: () => arbi.agents.listChats(agentId),
|
|
@@ -309,7 +309,7 @@ function useAgentChats(agentId) {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
function useStartAgentSession() {
|
|
312
|
-
const arbi =
|
|
312
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
313
313
|
const cache = reactQuery.useQueryClient();
|
|
314
314
|
return reactQuery.useMutation({
|
|
315
315
|
mutationFn: ({ agentId, workspaceId }) => arbi.agents.startSession(agentId, workspaceId),
|
|
@@ -317,7 +317,7 @@ function useStartAgentSession() {
|
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
function useCloseAgentSession() {
|
|
320
|
-
const arbi =
|
|
320
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
321
321
|
const cache = reactQuery.useQueryClient();
|
|
322
322
|
return reactQuery.useMutation({
|
|
323
323
|
mutationFn: (agentId) => arbi.agents.closeSession(agentId),
|
|
@@ -440,9 +440,9 @@ function useArbiChat(options = {}) {
|
|
|
440
440
|
const { workspaceId, agentId, model, titleLength = 48, streamRecovery } = options;
|
|
441
441
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
442
442
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
443
|
-
const arbi =
|
|
444
|
-
const { data: docs = [], isLoading: isLoadingDocuments, refetch } =
|
|
445
|
-
const ordinaryHistory =
|
|
443
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
444
|
+
const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunk6TFD5OS5_cjs.useDocuments(workspaceId);
|
|
445
|
+
const ordinaryHistory = chunk6TFD5OS5_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
446
446
|
const agentHistory = useAgentChats(agentId);
|
|
447
447
|
const stored = React.useMemo(
|
|
448
448
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -457,7 +457,7 @@ function useArbiChat(options = {}) {
|
|
|
457
457
|
);
|
|
458
458
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
459
459
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
460
|
-
const query =
|
|
460
|
+
const query = chunk6TFD5OS5_cjs.useAssistantQuery();
|
|
461
461
|
const { mutateAsync } = query;
|
|
462
462
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
463
463
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -517,7 +517,7 @@ function useArbiChat(options = {}) {
|
|
|
517
517
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
518
518
|
) || active.messages.some((message) => message.status === "streaming");
|
|
519
519
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
520
|
-
const loaded =
|
|
520
|
+
const loaded = chunk6TFD5OS5_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
521
521
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
522
522
|
live: liveHistory
|
|
523
523
|
});
|
|
@@ -1184,7 +1184,7 @@ function useArbiWsContext() {
|
|
|
1184
1184
|
return ctx;
|
|
1185
1185
|
}
|
|
1186
1186
|
function ArbiWebSocketProvider({ enabled = true, children }) {
|
|
1187
|
-
const arbi =
|
|
1187
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1188
1188
|
const subscribersRef = React.useRef(/* @__PURE__ */ new Set());
|
|
1189
1189
|
const setStatus = useArbiWsStore((s) => s.setStatus);
|
|
1190
1190
|
const applyTaskUpdate = useArbiWsStore((s) => s.applyTaskUpdate);
|
|
@@ -1296,14 +1296,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1296
1296
|
if (!workspaceId) return;
|
|
1297
1297
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1298
1298
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1299
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1300
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1299
|
+
void queryClient.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1300
|
+
void queryClient.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
1303
|
if (client.isMessageType(msg, "task_update")) {
|
|
1304
1304
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1305
1305
|
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1306
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1306
|
+
void queryClient.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
});
|
|
@@ -1431,8 +1431,8 @@ function useShellWorkspaces(options) {
|
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
1433
|
function useArbiShellWorkspaces(options = {}) {
|
|
1434
|
-
const arbi =
|
|
1435
|
-
const query =
|
|
1434
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1435
|
+
const query = chunk6TFD5OS5_cjs.useWorkspaces();
|
|
1436
1436
|
const { select, ...rest } = options;
|
|
1437
1437
|
const defaultSelect = React.useCallback(
|
|
1438
1438
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1447,9 +1447,9 @@ function useArbiShellWorkspaces(options = {}) {
|
|
|
1447
1447
|
});
|
|
1448
1448
|
}
|
|
1449
1449
|
function useContacts(options) {
|
|
1450
|
-
const arbi =
|
|
1450
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1451
1451
|
return reactQuery.useQuery({
|
|
1452
|
-
queryKey:
|
|
1452
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.contacts(),
|
|
1453
1453
|
queryFn: () => arbi.contacts.list(),
|
|
1454
1454
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1455
1455
|
});
|
|
@@ -1465,19 +1465,19 @@ function usePendingContacts(options) {
|
|
|
1465
1465
|
return { ...contacts, pending };
|
|
1466
1466
|
}
|
|
1467
1467
|
function useAddContacts() {
|
|
1468
|
-
const arbi =
|
|
1468
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1469
1469
|
const qc = reactQuery.useQueryClient();
|
|
1470
1470
|
return reactQuery.useMutation({
|
|
1471
1471
|
mutationFn: (emails) => arbi.contacts.add(emails),
|
|
1472
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1472
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.contacts() })
|
|
1473
1473
|
});
|
|
1474
1474
|
}
|
|
1475
1475
|
function useRemoveContacts() {
|
|
1476
|
-
const arbi =
|
|
1476
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1477
1477
|
const qc = reactQuery.useQueryClient();
|
|
1478
1478
|
return reactQuery.useMutation({
|
|
1479
1479
|
mutationFn: (contactIds) => arbi.contacts.remove(contactIds),
|
|
1480
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1480
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.contacts() })
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
1483
|
function toProfileView(profile) {
|
|
@@ -1487,9 +1487,9 @@ function toProfileView(profile) {
|
|
|
1487
1487
|
};
|
|
1488
1488
|
}
|
|
1489
1489
|
function useProfile(options) {
|
|
1490
|
-
const arbi =
|
|
1490
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1491
1491
|
return reactQuery.useQuery({
|
|
1492
|
-
queryKey:
|
|
1492
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.profile(),
|
|
1493
1493
|
queryFn: () => {
|
|
1494
1494
|
const profile = arbi.user.profile();
|
|
1495
1495
|
return profile ? toProfileView(profile) : null;
|
|
@@ -1499,7 +1499,7 @@ function useProfile(options) {
|
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
1501
1501
|
function useUpdateProfile() {
|
|
1502
|
-
const arbi =
|
|
1502
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1503
1503
|
const qc = reactQuery.useQueryClient();
|
|
1504
1504
|
return reactQuery.useMutation({
|
|
1505
1505
|
mutationFn: async (vars) => {
|
|
@@ -1512,8 +1512,8 @@ function useUpdateProfile() {
|
|
|
1512
1512
|
return profile ? toProfileView(profile) : null;
|
|
1513
1513
|
},
|
|
1514
1514
|
onSuccess: (profile) => {
|
|
1515
|
-
qc.setQueryData(
|
|
1516
|
-
return qc.invalidateQueries({ queryKey:
|
|
1515
|
+
qc.setQueryData(chunk6TFD5OS5_cjs.arbiQueryKeys.profile(), profile);
|
|
1516
|
+
return qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.workspaces() });
|
|
1517
1517
|
}
|
|
1518
1518
|
});
|
|
1519
1519
|
}
|
|
@@ -1586,19 +1586,19 @@ function useAvatarCrop({
|
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
1588
|
function useRequestEmailChange() {
|
|
1589
|
-
const arbi =
|
|
1589
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1590
1590
|
return reactQuery.useMutation({
|
|
1591
1591
|
mutationFn: (newEmail) => arbi.account.requestEmailChange(newEmail)
|
|
1592
1592
|
});
|
|
1593
1593
|
}
|
|
1594
1594
|
function useConfirmEmailChange() {
|
|
1595
|
-
const arbi =
|
|
1595
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1596
1596
|
const qc = reactQuery.useQueryClient();
|
|
1597
1597
|
return reactQuery.useMutation({
|
|
1598
1598
|
mutationFn: ({ newEmail, code }) => arbi.account.confirmEmailChange(newEmail, code),
|
|
1599
1599
|
onSuccess: () => {
|
|
1600
1600
|
const profile = arbi.user.profile();
|
|
1601
|
-
qc.setQueryData(
|
|
1601
|
+
qc.setQueryData(chunk6TFD5OS5_cjs.arbiQueryKeys.profile(), profile ? toProfileView(profile) : null);
|
|
1602
1602
|
}
|
|
1603
1603
|
});
|
|
1604
1604
|
}
|
|
@@ -1663,7 +1663,7 @@ function useEmailChange({
|
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
1665
|
function usePasswordChange() {
|
|
1666
|
-
const arbi =
|
|
1666
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1667
1667
|
return reactQuery.useMutation({
|
|
1668
1668
|
mutationFn: (vars) => arbi.account.changePassword(vars)
|
|
1669
1669
|
});
|
|
@@ -1765,33 +1765,33 @@ function toNotificationPreferences(stored, keys) {
|
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
1767
|
function useUserSettings(options) {
|
|
1768
|
-
const arbi =
|
|
1768
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1769
1769
|
return reactQuery.useQuery({
|
|
1770
|
-
queryKey:
|
|
1770
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings(),
|
|
1771
1771
|
queryFn: () => arbi.settings.get(),
|
|
1772
1772
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1773
1773
|
});
|
|
1774
1774
|
}
|
|
1775
1775
|
function useNotificationPreferences(keys, options) {
|
|
1776
|
-
const arbi =
|
|
1776
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1777
1777
|
const qc = reactQuery.useQueryClient();
|
|
1778
1778
|
const settings = useUserSettings(options);
|
|
1779
1779
|
const stored = settings.data?.email_notifications;
|
|
1780
1780
|
const save = reactQuery.useMutation({
|
|
1781
1781
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
1782
1782
|
onMutate: async (patch) => {
|
|
1783
|
-
await qc.cancelQueries({ queryKey:
|
|
1784
|
-
const previous = qc.getQueryData(
|
|
1783
|
+
await qc.cancelQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings() });
|
|
1784
|
+
const previous = qc.getQueryData(chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings());
|
|
1785
1785
|
qc.setQueryData(
|
|
1786
|
-
|
|
1786
|
+
chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings(),
|
|
1787
1787
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
1788
1788
|
);
|
|
1789
1789
|
return { previous };
|
|
1790
1790
|
},
|
|
1791
1791
|
onError: (_err, _patch, context) => {
|
|
1792
|
-
qc.setQueryData(
|
|
1792
|
+
qc.setQueryData(chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
1793
1793
|
},
|
|
1794
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
1794
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.userSettings() })
|
|
1795
1795
|
});
|
|
1796
1796
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
1797
1797
|
const setAll = React.useCallback(
|
|
@@ -1813,15 +1813,15 @@ function useNotificationPreferences(keys, options) {
|
|
|
1813
1813
|
};
|
|
1814
1814
|
}
|
|
1815
1815
|
function useTerminateSession() {
|
|
1816
|
-
const arbi =
|
|
1816
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1817
1817
|
const qc = reactQuery.useQueryClient();
|
|
1818
1818
|
return reactQuery.useMutation({
|
|
1819
1819
|
mutationFn: (sessionId) => arbi.sessions.terminate(sessionId),
|
|
1820
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1820
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.sessions() })
|
|
1821
1821
|
});
|
|
1822
1822
|
}
|
|
1823
1823
|
function useLogoutAllSessions() {
|
|
1824
|
-
const arbi =
|
|
1824
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1825
1825
|
const qc = reactQuery.useQueryClient();
|
|
1826
1826
|
return reactQuery.useMutation({
|
|
1827
1827
|
mutationFn: () => arbi.sessions.logoutAll(),
|
|
@@ -1829,7 +1829,7 @@ function useLogoutAllSessions() {
|
|
|
1829
1829
|
});
|
|
1830
1830
|
}
|
|
1831
1831
|
function useCurrentSessionId() {
|
|
1832
|
-
return
|
|
1832
|
+
return chunkIIT7DMQL_cjs.useArbi().sessions.currentId();
|
|
1833
1833
|
}
|
|
1834
1834
|
function parseDeleteAccountBlockers(error) {
|
|
1835
1835
|
const body = error?.apiError ?? error;
|
|
@@ -1844,7 +1844,7 @@ function parseDeleteAccountBlockers(error) {
|
|
|
1844
1844
|
return [];
|
|
1845
1845
|
}
|
|
1846
1846
|
function useDeleteAccount() {
|
|
1847
|
-
const arbi =
|
|
1847
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1848
1848
|
return reactQuery.useMutation({ mutationFn: () => arbi.account.requestDeletion() });
|
|
1849
1849
|
}
|
|
1850
1850
|
function useDeleteAccountFlow({
|
|
@@ -1893,7 +1893,7 @@ function useDeleteAccountFlow({
|
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
1895
|
function useWorkspaceDocs(workspaceId) {
|
|
1896
|
-
const { data: docs = [], isLoading, isError } =
|
|
1896
|
+
const { data: docs = [], isLoading, isError } = chunk6TFD5OS5_cjs.useDocuments(workspaceId);
|
|
1897
1897
|
const docIds = React.useMemo(
|
|
1898
1898
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
1899
1899
|
[docs]
|
|
@@ -1901,7 +1901,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
1901
1901
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
1902
1902
|
}
|
|
1903
1903
|
function useAiTask() {
|
|
1904
|
-
const mutation =
|
|
1904
|
+
const mutation = chunk6TFD5OS5_cjs.useAssistantQuery();
|
|
1905
1905
|
const [status, setStatus] = React.useState("idle");
|
|
1906
1906
|
const [text, setText] = React.useState("");
|
|
1907
1907
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -1991,7 +1991,7 @@ function useAiTask() {
|
|
|
1991
1991
|
};
|
|
1992
1992
|
}
|
|
1993
1993
|
function useSemanticSearch(docIds) {
|
|
1994
|
-
const arbi =
|
|
1994
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
1995
1995
|
const [query, setQuery] = React.useState("");
|
|
1996
1996
|
const mutation = reactQuery.useMutation({
|
|
1997
1997
|
mutationFn: async ({ query: q, mode }) => {
|
|
@@ -2494,8 +2494,8 @@ function DocumentReview({
|
|
|
2494
2494
|
onClose,
|
|
2495
2495
|
className
|
|
2496
2496
|
}) {
|
|
2497
|
-
const parsedQuery =
|
|
2498
|
-
const tagsQuery =
|
|
2497
|
+
const parsedQuery = chunk6TFD5OS5_cjs.useParsedDocument(docId, stage);
|
|
2498
|
+
const tagsQuery = chunk6TFD5OS5_cjs.useTags(workspaceId);
|
|
2499
2499
|
const tagNameById = React__default.default.useMemo(() => {
|
|
2500
2500
|
const map = /* @__PURE__ */ new Map();
|
|
2501
2501
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -2726,7 +2726,7 @@ function SemanticSearch({
|
|
|
2726
2726
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
2727
2727
|
const [value, setValue] = React.useState("");
|
|
2728
2728
|
const [selected, setSelected] = React.useState(null);
|
|
2729
|
-
const { data: docs = [] } =
|
|
2729
|
+
const { data: docs = [] } = chunk6TFD5OS5_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
2730
2730
|
const docMap = React.useMemo(() => {
|
|
2731
2731
|
const map = /* @__PURE__ */ new Map();
|
|
2732
2732
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -3830,7 +3830,7 @@ function ActivityFeed({
|
|
|
3830
3830
|
enabled,
|
|
3831
3831
|
"data-testid": testId = "activity-feed"
|
|
3832
3832
|
}) {
|
|
3833
|
-
const { data, isLoading, isError } =
|
|
3833
|
+
const { data, isLoading, isError } = chunk6TFD5OS5_cjs.useActivity({ limit, enabled });
|
|
3834
3834
|
if (isLoading) {
|
|
3835
3835
|
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: [
|
|
3836
3836
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -3879,7 +3879,7 @@ var workTypes = [
|
|
|
3879
3879
|
"workflow_failed"
|
|
3880
3880
|
];
|
|
3881
3881
|
function useWorkNotifications(options) {
|
|
3882
|
-
const arbi =
|
|
3882
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
3883
3883
|
const queries = reactQuery.useQueryClient();
|
|
3884
3884
|
const queryKey = ["work-notifications", options.apiUrl, options.userId];
|
|
3885
3885
|
const query = reactQuery.useQuery({
|
|
@@ -3972,7 +3972,7 @@ function groupConversations(notifications, myExtId) {
|
|
|
3972
3972
|
return conversations;
|
|
3973
3973
|
}
|
|
3974
3974
|
function useDirectMessages(options) {
|
|
3975
|
-
const arbi =
|
|
3975
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
3976
3976
|
const queryClient = reactQuery.useQueryClient();
|
|
3977
3977
|
const enabled = options?.enabled ?? arbi.isLoggedIn;
|
|
3978
3978
|
const query = reactQuery.useQuery({
|
|
@@ -3981,7 +3981,7 @@ function useDirectMessages(options) {
|
|
|
3981
3981
|
enabled
|
|
3982
3982
|
});
|
|
3983
3983
|
const contactsQuery = reactQuery.useQuery({
|
|
3984
|
-
queryKey:
|
|
3984
|
+
queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.contacts(),
|
|
3985
3985
|
queryFn: () => arbi.contacts.list(),
|
|
3986
3986
|
enabled
|
|
3987
3987
|
});
|
|
@@ -5152,10 +5152,10 @@ function DocumentTable({
|
|
|
5152
5152
|
extraColumns,
|
|
5153
5153
|
className
|
|
5154
5154
|
}) {
|
|
5155
|
-
const query =
|
|
5155
|
+
const query = chunk6TFD5OS5_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
5156
5156
|
const rows = documents ?? query.data ?? [];
|
|
5157
5157
|
const isLoading = !documents && query.isLoading;
|
|
5158
|
-
const tagsQuery =
|
|
5158
|
+
const tagsQuery = chunk6TFD5OS5_cjs.useTags(workspaceId);
|
|
5159
5159
|
const tagNameById = React__default.default.useMemo(() => {
|
|
5160
5160
|
const map = /* @__PURE__ */ new Map();
|
|
5161
5161
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -5331,12 +5331,12 @@ function DocumentCardMenu({
|
|
|
5331
5331
|
canDelete = true,
|
|
5332
5332
|
testId = "document-card-menu"
|
|
5333
5333
|
}) {
|
|
5334
|
-
const arbi =
|
|
5334
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
5335
5335
|
const queryClient = reactQuery.useQueryClient();
|
|
5336
5336
|
const invalidateDocuments = () => {
|
|
5337
5337
|
const workspaceId = arbi.getWorkspaceId();
|
|
5338
5338
|
if (workspaceId) {
|
|
5339
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
5339
|
+
void queryClient.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
5340
5340
|
}
|
|
5341
5341
|
};
|
|
5342
5342
|
const download = reactQuery.useMutation({
|
|
@@ -5435,10 +5435,10 @@ function DocumentGallery({
|
|
|
5435
5435
|
minTileWidth = 148,
|
|
5436
5436
|
className
|
|
5437
5437
|
}) {
|
|
5438
|
-
const query =
|
|
5438
|
+
const query = chunk6TFD5OS5_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
5439
5439
|
const rows = documents ?? query.data ?? [];
|
|
5440
5440
|
const isLoading = !documents && query.isLoading;
|
|
5441
|
-
const tagsQuery =
|
|
5441
|
+
const tagsQuery = chunk6TFD5OS5_cjs.useTags(workspaceId);
|
|
5442
5442
|
const tagNameById = React__default.default.useMemo(() => {
|
|
5443
5443
|
const map = /* @__PURE__ */ new Map();
|
|
5444
5444
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -5450,7 +5450,7 @@ function DocumentGallery({
|
|
|
5450
5450
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
5451
5451
|
[rows]
|
|
5452
5452
|
);
|
|
5453
|
-
const thumbsQuery =
|
|
5453
|
+
const thumbsQuery = chunk6TFD5OS5_cjs.useThumbnails(docIds);
|
|
5454
5454
|
const thumbs = thumbsQuery.data ?? {};
|
|
5455
5455
|
const storeSelected = useArbiUiStore((s) => s.selectedDocIds);
|
|
5456
5456
|
const storeSetSelected = useArbiUiStore((s) => s.setSelectedDocIds);
|
|
@@ -5475,7 +5475,7 @@ function DocumentGallery({
|
|
|
5475
5475
|
},
|
|
5476
5476
|
[onOpenDocument, setViewingDocId]
|
|
5477
5477
|
);
|
|
5478
|
-
const arbi =
|
|
5478
|
+
const arbi = chunkIIT7DMQL_cjs.useArbi();
|
|
5479
5479
|
const queryClient = reactQuery.useQueryClient();
|
|
5480
5480
|
const [renamingId, setRenamingId] = React__default.default.useState(null);
|
|
5481
5481
|
const rename = reactQuery.useMutation({
|
|
@@ -5486,7 +5486,7 @@ function DocumentGallery({
|
|
|
5486
5486
|
setRenamingId(null);
|
|
5487
5487
|
const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
|
|
5488
5488
|
if (activeWorkspace) {
|
|
5489
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
5489
|
+
void queryClient.invalidateQueries({ queryKey: chunk6TFD5OS5_cjs.arbiQueryKeys.documents(activeWorkspace) });
|
|
5490
5490
|
}
|
|
5491
5491
|
}
|
|
5492
5492
|
});
|
|
@@ -6104,107 +6104,107 @@ function hasVideoTrack(blob) {
|
|
|
6104
6104
|
|
|
6105
6105
|
Object.defineProperty(exports, "DEFAULT_USD_PER_CREDIT", {
|
|
6106
6106
|
enumerable: true,
|
|
6107
|
-
get: function () { return
|
|
6107
|
+
get: function () { return chunk6TFD5OS5_cjs.DEFAULT_USD_PER_CREDIT; }
|
|
6108
6108
|
});
|
|
6109
6109
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
6110
6110
|
enumerable: true,
|
|
6111
|
-
get: function () { return
|
|
6111
|
+
get: function () { return chunk6TFD5OS5_cjs.arbiQueryKeys; }
|
|
6112
6112
|
});
|
|
6113
6113
|
Object.defineProperty(exports, "creditsToUsd", {
|
|
6114
6114
|
enumerable: true,
|
|
6115
|
-
get: function () { return
|
|
6115
|
+
get: function () { return chunk6TFD5OS5_cjs.creditsToUsd; }
|
|
6116
6116
|
});
|
|
6117
6117
|
Object.defineProperty(exports, "formatCredits", {
|
|
6118
6118
|
enumerable: true,
|
|
6119
|
-
get: function () { return
|
|
6119
|
+
get: function () { return chunk6TFD5OS5_cjs.formatCredits; }
|
|
6120
6120
|
});
|
|
6121
6121
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
6122
6122
|
enumerable: true,
|
|
6123
|
-
get: function () { return
|
|
6123
|
+
get: function () { return chunk6TFD5OS5_cjs.isUsageMetered; }
|
|
6124
6124
|
});
|
|
6125
6125
|
Object.defineProperty(exports, "useActivity", {
|
|
6126
6126
|
enumerable: true,
|
|
6127
|
-
get: function () { return
|
|
6127
|
+
get: function () { return chunk6TFD5OS5_cjs.useActivity; }
|
|
6128
6128
|
});
|
|
6129
6129
|
Object.defineProperty(exports, "useAgents", {
|
|
6130
6130
|
enumerable: true,
|
|
6131
|
-
get: function () { return
|
|
6131
|
+
get: function () { return chunk6TFD5OS5_cjs.useAgents; }
|
|
6132
6132
|
});
|
|
6133
6133
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
6134
6134
|
enumerable: true,
|
|
6135
|
-
get: function () { return
|
|
6135
|
+
get: function () { return chunk6TFD5OS5_cjs.useAssistantQuery; }
|
|
6136
6136
|
});
|
|
6137
6137
|
Object.defineProperty(exports, "useConfigs", {
|
|
6138
6138
|
enumerable: true,
|
|
6139
|
-
get: function () { return
|
|
6139
|
+
get: function () { return chunk6TFD5OS5_cjs.useConfigs; }
|
|
6140
6140
|
});
|
|
6141
6141
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
6142
6142
|
enumerable: true,
|
|
6143
|
-
get: function () { return
|
|
6143
|
+
get: function () { return chunk6TFD5OS5_cjs.useConversationThreads; }
|
|
6144
6144
|
});
|
|
6145
6145
|
Object.defineProperty(exports, "useConversations", {
|
|
6146
6146
|
enumerable: true,
|
|
6147
|
-
get: function () { return
|
|
6147
|
+
get: function () { return chunk6TFD5OS5_cjs.useConversations; }
|
|
6148
6148
|
});
|
|
6149
6149
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
6150
6150
|
enumerable: true,
|
|
6151
|
-
get: function () { return
|
|
6151
|
+
get: function () { return chunk6TFD5OS5_cjs.useDeleteAgents; }
|
|
6152
6152
|
});
|
|
6153
6153
|
Object.defineProperty(exports, "useDocuments", {
|
|
6154
6154
|
enumerable: true,
|
|
6155
|
-
get: function () { return
|
|
6155
|
+
get: function () { return chunk6TFD5OS5_cjs.useDocuments; }
|
|
6156
6156
|
});
|
|
6157
6157
|
Object.defineProperty(exports, "useFacts", {
|
|
6158
6158
|
enumerable: true,
|
|
6159
|
-
get: function () { return
|
|
6159
|
+
get: function () { return chunk6TFD5OS5_cjs.useFacts; }
|
|
6160
6160
|
});
|
|
6161
6161
|
Object.defineProperty(exports, "useHealth", {
|
|
6162
6162
|
enumerable: true,
|
|
6163
|
-
get: function () { return
|
|
6163
|
+
get: function () { return chunk6TFD5OS5_cjs.useHealth; }
|
|
6164
6164
|
});
|
|
6165
6165
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
6166
6166
|
enumerable: true,
|
|
6167
|
-
get: function () { return
|
|
6167
|
+
get: function () { return chunk6TFD5OS5_cjs.useParsedDocument; }
|
|
6168
6168
|
});
|
|
6169
6169
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
6170
6170
|
enumerable: true,
|
|
6171
|
-
get: function () { return
|
|
6171
|
+
get: function () { return chunk6TFD5OS5_cjs.useProjectInvoices; }
|
|
6172
6172
|
});
|
|
6173
6173
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
6174
6174
|
enumerable: true,
|
|
6175
|
-
get: function () { return
|
|
6175
|
+
get: function () { return chunk6TFD5OS5_cjs.useProjectUsage; }
|
|
6176
6176
|
});
|
|
6177
6177
|
Object.defineProperty(exports, "useProjects", {
|
|
6178
6178
|
enumerable: true,
|
|
6179
|
-
get: function () { return
|
|
6179
|
+
get: function () { return chunk6TFD5OS5_cjs.useProjects; }
|
|
6180
6180
|
});
|
|
6181
6181
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
6182
6182
|
enumerable: true,
|
|
6183
|
-
get: function () { return
|
|
6183
|
+
get: function () { return chunk6TFD5OS5_cjs.useProjectsUsage; }
|
|
6184
6184
|
});
|
|
6185
6185
|
Object.defineProperty(exports, "useSessions", {
|
|
6186
6186
|
enumerable: true,
|
|
6187
|
-
get: function () { return
|
|
6187
|
+
get: function () { return chunk6TFD5OS5_cjs.useSessions; }
|
|
6188
6188
|
});
|
|
6189
6189
|
Object.defineProperty(exports, "useTags", {
|
|
6190
6190
|
enumerable: true,
|
|
6191
|
-
get: function () { return
|
|
6191
|
+
get: function () { return chunk6TFD5OS5_cjs.useTags; }
|
|
6192
6192
|
});
|
|
6193
6193
|
Object.defineProperty(exports, "useThumbnails", {
|
|
6194
6194
|
enumerable: true,
|
|
6195
|
-
get: function () { return
|
|
6195
|
+
get: function () { return chunk6TFD5OS5_cjs.useThumbnails; }
|
|
6196
6196
|
});
|
|
6197
6197
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
6198
6198
|
enumerable: true,
|
|
6199
|
-
get: function () { return
|
|
6199
|
+
get: function () { return chunk6TFD5OS5_cjs.useUserUsageToday; }
|
|
6200
6200
|
});
|
|
6201
6201
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
6202
6202
|
enumerable: true,
|
|
6203
|
-
get: function () { return
|
|
6203
|
+
get: function () { return chunk6TFD5OS5_cjs.useWorkspaceUsers; }
|
|
6204
6204
|
});
|
|
6205
6205
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
6206
6206
|
enumerable: true,
|
|
6207
|
-
get: function () { return
|
|
6207
|
+
get: function () { return chunk6TFD5OS5_cjs.useWorkspaces; }
|
|
6208
6208
|
});
|
|
6209
6209
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
6210
6210
|
enumerable: true,
|
|
@@ -6798,18 +6798,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
|
|
|
6798
6798
|
enumerable: true,
|
|
6799
6799
|
get: function () { return chunk5SZ2J2WT_cjs.splitMarkdownBlocks; }
|
|
6800
6800
|
});
|
|
6801
|
-
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
6802
|
-
enumerable: true,
|
|
6803
|
-
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
6804
|
-
});
|
|
6805
|
-
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
6806
|
-
enumerable: true,
|
|
6807
|
-
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
6808
|
-
});
|
|
6809
|
-
Object.defineProperty(exports, "trimOpenCitation", {
|
|
6810
|
-
enumerable: true,
|
|
6811
|
-
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
6812
|
-
});
|
|
6813
6801
|
Object.defineProperty(exports, "Button", {
|
|
6814
6802
|
enumerable: true,
|
|
6815
6803
|
get: function () { return chunkLQ5YHB7W_cjs.Button; }
|
|
@@ -6858,6 +6846,18 @@ Object.defineProperty(exports, "buttonVariants", {
|
|
|
6858
6846
|
enumerable: true,
|
|
6859
6847
|
get: function () { return chunkLQ5YHB7W_cjs.buttonVariants; }
|
|
6860
6848
|
});
|
|
6849
|
+
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
6850
|
+
enumerable: true,
|
|
6851
|
+
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
6852
|
+
});
|
|
6853
|
+
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
6854
|
+
enumerable: true,
|
|
6855
|
+
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
6856
|
+
});
|
|
6857
|
+
Object.defineProperty(exports, "trimOpenCitation", {
|
|
6858
|
+
enumerable: true,
|
|
6859
|
+
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
6860
|
+
});
|
|
6861
6861
|
Object.defineProperty(exports, "ScrollArea", {
|
|
6862
6862
|
enumerable: true,
|
|
6863
6863
|
get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
|
|
@@ -6940,11 +6940,15 @@ Object.defineProperty(exports, "cn", {
|
|
|
6940
6940
|
});
|
|
6941
6941
|
Object.defineProperty(exports, "ArbiProvider", {
|
|
6942
6942
|
enumerable: true,
|
|
6943
|
-
get: function () { return
|
|
6943
|
+
get: function () { return chunkIIT7DMQL_cjs.ArbiProvider; }
|
|
6944
6944
|
});
|
|
6945
6945
|
Object.defineProperty(exports, "useArbi", {
|
|
6946
6946
|
enumerable: true,
|
|
6947
|
-
get: function () { return
|
|
6947
|
+
get: function () { return chunkIIT7DMQL_cjs.useArbi; }
|
|
6948
|
+
});
|
|
6949
|
+
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
6950
|
+
enumerable: true,
|
|
6951
|
+
get: function () { return chunkIIT7DMQL_cjs.useDeploymentDomain; }
|
|
6948
6952
|
});
|
|
6949
6953
|
Object.defineProperty(exports, "Arbi", {
|
|
6950
6954
|
enumerable: true,
|