@arbidocs/react 0.4.129 → 0.4.130
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 +52 -53
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +3 -5
- package/dist/artifacts/index.js.map +1 -1
- package/dist/{chunk-BOJHNPNJ.cjs → chunk-6PPWZILQ.cjs} +16 -11
- package/dist/chunk-6PPWZILQ.cjs.map +1 -0
- package/dist/{chunk-G6FHNURH.js → chunk-NNWMHMEC.js} +60 -3
- package/dist/chunk-NNWMHMEC.js.map +1 -0
- package/dist/{chunk-6AWF4HFU.js → chunk-PPRKQK4P.js} +16 -11
- package/dist/chunk-PPRKQK4P.js.map +1 -0
- package/dist/{chunk-AFGE55RQ.cjs → chunk-UN3AZUXX.cjs} +2 -11
- package/dist/chunk-UN3AZUXX.cjs.map +1 -0
- package/dist/{chunk-5WXNTCI3.js → chunk-XV7EOUQM.js} +3 -11
- package/dist/chunk-XV7EOUQM.js.map +1 -0
- package/dist/{chunk-5DCRIWCA.cjs → chunk-ZWFMFOGP.cjs} +68 -2
- package/dist/chunk-ZWFMFOGP.cjs.map +1 -0
- package/dist/document-tools/index.cjs +4 -5
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +1 -2
- package/dist/document-tools/index.js.map +1 -1
- package/dist/{index-C7OqcKY3.d.ts → index-D8NvRj3J.d.cts} +16 -7
- package/dist/{index-C7OqcKY3.d.cts → index-D8NvRj3J.d.ts} +16 -7
- package/dist/index.cjs +368 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +224 -90
- package/dist/index.d.ts +224 -90
- package/dist/index.js +232 -73
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +10 -6
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5DCRIWCA.cjs.map +0 -1
- package/dist/chunk-5WXNTCI3.js.map +0 -1
- package/dist/chunk-6AWF4HFU.js.map +0 -1
- package/dist/chunk-74UTKIWQ.js +0 -62
- package/dist/chunk-74UTKIWQ.js.map +0 -1
- package/dist/chunk-AFGE55RQ.cjs.map +0 -1
- package/dist/chunk-BOJHNPNJ.cjs.map +0 -1
- package/dist/chunk-G6FHNURH.js.map +0 -1
- package/dist/chunk-NUFEZBA5.cjs +0 -72
- package/dist/chunk-NUFEZBA5.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUN3AZUXX_cjs = require('./chunk-UN3AZUXX.cjs');
|
|
4
4
|
var chunkS7J5SCTZ_cjs = require('./chunk-S7J5SCTZ.cjs');
|
|
5
|
-
var
|
|
6
|
-
|
|
5
|
+
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
6
|
+
require('./chunk-VOFNX4P6.cjs');
|
|
7
|
+
var chunk6PPWZILQ_cjs = require('./chunk-6PPWZILQ.cjs');
|
|
7
8
|
var chunk65WT5PHA_cjs = require('./chunk-65WT5PHA.cjs');
|
|
8
9
|
var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
|
|
9
10
|
var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
|
|
@@ -42,7 +43,7 @@ function useUpdateConversation() {
|
|
|
42
43
|
conversationId,
|
|
43
44
|
patch
|
|
44
45
|
}) => arbi.conversations.update(conversationId, patch),
|
|
45
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
46
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function useCreateWork() {
|
|
@@ -50,7 +51,7 @@ function useCreateWork() {
|
|
|
50
51
|
const qc = reactQuery.useQueryClient();
|
|
51
52
|
return reactQuery.useMutation({
|
|
52
53
|
mutationFn: (body) => arbi.conversations.createWork(body),
|
|
53
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
54
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
function useRunConversation() {
|
|
@@ -58,7 +59,7 @@ function useRunConversation() {
|
|
|
58
59
|
const qc = reactQuery.useQueryClient();
|
|
59
60
|
return reactQuery.useMutation({
|
|
60
61
|
mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
|
|
61
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
62
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
function useActOnStep() {
|
|
@@ -69,7 +70,7 @@ function useActOnStep() {
|
|
|
69
70
|
conversationId,
|
|
70
71
|
body
|
|
71
72
|
}) => arbi.conversations.actOnStep(conversationId, body),
|
|
72
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
73
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
function useSendBackStep() {
|
|
@@ -82,7 +83,7 @@ function useSendBackStep() {
|
|
|
82
83
|
to,
|
|
83
84
|
note
|
|
84
85
|
}) => arbi.conversations.sendBackStep(conversationId, step, { to, note }),
|
|
85
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
86
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
function usePlanWork() {
|
|
@@ -94,7 +95,7 @@ function usePlanWork() {
|
|
|
94
95
|
function useConversationPendingAuth(conversationId, options) {
|
|
95
96
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
96
97
|
return reactQuery.useQuery({
|
|
97
|
-
queryKey: [...
|
|
98
|
+
queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
|
|
98
99
|
queryFn: () => arbi.conversations.pendingAuth(conversationId),
|
|
99
100
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
100
101
|
retry: false
|
|
@@ -103,7 +104,7 @@ function useConversationPendingAuth(conversationId, options) {
|
|
|
103
104
|
function useConversationActivity(conversationId, options) {
|
|
104
105
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
105
106
|
return reactQuery.useQuery({
|
|
106
|
-
queryKey: [...
|
|
107
|
+
queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "activity"],
|
|
107
108
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
108
109
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
109
110
|
refetchInterval: options?.live ? 2500 : false
|
|
@@ -112,7 +113,7 @@ function useConversationActivity(conversationId, options) {
|
|
|
112
113
|
function useWorkflows(options) {
|
|
113
114
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
114
115
|
return reactQuery.useQuery({
|
|
115
|
-
queryKey:
|
|
116
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows(),
|
|
116
117
|
queryFn: () => arbi.workflows.list(),
|
|
117
118
|
refetchInterval: options?.live ? 15e3 : false,
|
|
118
119
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
@@ -123,7 +124,7 @@ function useCreateWorkflow() {
|
|
|
123
124
|
const qc = reactQuery.useQueryClient();
|
|
124
125
|
return reactQuery.useMutation({
|
|
125
126
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
126
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
127
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
function useUpdateWorkflow() {
|
|
@@ -134,7 +135,7 @@ function useUpdateWorkflow() {
|
|
|
134
135
|
workflowId,
|
|
135
136
|
patch
|
|
136
137
|
}) => arbi.workflows.update(workflowId, patch),
|
|
137
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
138
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
function useDeleteWorkflow() {
|
|
@@ -142,7 +143,7 @@ function useDeleteWorkflow() {
|
|
|
142
143
|
const qc = reactQuery.useQueryClient();
|
|
143
144
|
return reactQuery.useMutation({
|
|
144
145
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
145
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
146
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() })
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
149
|
function useRunWorkflow() {
|
|
@@ -151,8 +152,8 @@ function useRunWorkflow() {
|
|
|
151
152
|
return reactQuery.useMutation({
|
|
152
153
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
153
154
|
onSuccess: () => Promise.all([
|
|
154
|
-
qc.invalidateQueries({ queryKey:
|
|
155
|
-
qc.invalidateQueries({ queryKey:
|
|
155
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workflows() }),
|
|
156
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
156
157
|
])
|
|
157
158
|
});
|
|
158
159
|
}
|
|
@@ -161,13 +162,13 @@ function useCreateAgent() {
|
|
|
161
162
|
const qc = reactQuery.useQueryClient();
|
|
162
163
|
return reactQuery.useMutation({
|
|
163
164
|
mutationFn: (name) => arbi.agents.create(name),
|
|
164
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
165
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agents() })
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
168
|
function useAgentConfig(agentExtId, options) {
|
|
168
169
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
169
170
|
return reactQuery.useQuery({
|
|
170
|
-
queryKey:
|
|
171
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
171
172
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
172
173
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
173
174
|
});
|
|
@@ -175,7 +176,7 @@ function useAgentConfig(agentExtId, options) {
|
|
|
175
176
|
function useAgentModels(options) {
|
|
176
177
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
177
178
|
return reactQuery.useQuery({
|
|
178
|
-
queryKey:
|
|
179
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.models(),
|
|
179
180
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
180
181
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
181
182
|
});
|
|
@@ -198,17 +199,17 @@ function useSaveAgentConfig() {
|
|
|
198
199
|
});
|
|
199
200
|
},
|
|
200
201
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
201
|
-
qc.invalidateQueries({ queryKey:
|
|
202
|
-
qc.invalidateQueries({ queryKey:
|
|
202
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.configs() }),
|
|
203
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
203
204
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
204
|
-
qc.invalidateQueries({ queryKey:
|
|
205
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agents() })
|
|
205
206
|
])
|
|
206
207
|
});
|
|
207
208
|
}
|
|
208
209
|
function useAgentWorkspaces(agentExtId, options) {
|
|
209
210
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
210
211
|
return reactQuery.useQuery({
|
|
211
|
-
queryKey:
|
|
212
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
212
213
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
213
214
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
214
215
|
});
|
|
@@ -229,7 +230,7 @@ function useGrantAgentAccess() {
|
|
|
229
230
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
230
231
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
231
232
|
},
|
|
232
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
233
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
233
234
|
});
|
|
234
235
|
}
|
|
235
236
|
function useRevokeAgentAccess() {
|
|
@@ -248,13 +249,13 @@ function useRevokeAgentAccess() {
|
|
|
248
249
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
249
250
|
}
|
|
250
251
|
},
|
|
251
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
252
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
255
|
function useSkills(options) {
|
|
255
256
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
256
257
|
return reactQuery.useQuery({
|
|
257
|
-
queryKey: [...
|
|
258
|
+
queryKey: [...chunkUN3AZUXX_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
258
259
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
259
260
|
refetchInterval: options?.live ? 5e3 : false,
|
|
260
261
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -285,7 +286,7 @@ function useUploadSkillFiles() {
|
|
|
285
286
|
}
|
|
286
287
|
return results;
|
|
287
288
|
},
|
|
288
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
289
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.skills() })
|
|
289
290
|
});
|
|
290
291
|
}
|
|
291
292
|
function useStartWorkQuery() {
|
|
@@ -312,7 +313,7 @@ function useStartWorkQuery() {
|
|
|
312
313
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
313
314
|
);
|
|
314
315
|
},
|
|
315
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
316
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.allConversations() })
|
|
316
317
|
});
|
|
317
318
|
}
|
|
318
319
|
function useAgentSession(agentId, options) {
|
|
@@ -476,8 +477,8 @@ function useArbiChat(options = {}) {
|
|
|
476
477
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
477
478
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
478
479
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
479
|
-
const { data: docs = [], isLoading: isLoadingDocuments, refetch } =
|
|
480
|
-
const ordinaryHistory =
|
|
480
|
+
const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkUN3AZUXX_cjs.useDocuments(workspaceId);
|
|
481
|
+
const ordinaryHistory = chunkUN3AZUXX_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
481
482
|
const agentHistory = useAgentChats(agentId);
|
|
482
483
|
const stored = React.useMemo(
|
|
483
484
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -492,7 +493,7 @@ function useArbiChat(options = {}) {
|
|
|
492
493
|
);
|
|
493
494
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
494
495
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
495
|
-
const query =
|
|
496
|
+
const query = chunkUN3AZUXX_cjs.useAssistantQuery();
|
|
496
497
|
const { mutateAsync } = query;
|
|
497
498
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
498
499
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -552,7 +553,7 @@ function useArbiChat(options = {}) {
|
|
|
552
553
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
553
554
|
) || active.messages.some((message) => message.status === "streaming");
|
|
554
555
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
555
|
-
const loaded =
|
|
556
|
+
const loaded = chunkUN3AZUXX_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
556
557
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
557
558
|
live: liveHistory
|
|
558
559
|
});
|
|
@@ -1333,14 +1334,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1333
1334
|
if (!workspaceId) return;
|
|
1334
1335
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1335
1336
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1336
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1337
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1337
|
+
void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1338
|
+
void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1338
1339
|
return;
|
|
1339
1340
|
}
|
|
1340
1341
|
if (client.isMessageType(msg, "task_update")) {
|
|
1341
1342
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1342
1343
|
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1343
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1344
|
+
void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1344
1345
|
}
|
|
1345
1346
|
}
|
|
1346
1347
|
});
|
|
@@ -1469,7 +1470,7 @@ function useShellWorkspaces(options) {
|
|
|
1469
1470
|
}
|
|
1470
1471
|
function useArbiShellWorkspaces(options = {}) {
|
|
1471
1472
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1472
|
-
const query =
|
|
1473
|
+
const query = chunkUN3AZUXX_cjs.useWorkspaces();
|
|
1473
1474
|
const { select, ...rest } = options;
|
|
1474
1475
|
const defaultSelect = React.useCallback(
|
|
1475
1476
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1485,8 +1486,8 @@ function useArbiShellWorkspaces(options = {}) {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
function invalidateTagData(qc, workspaceId) {
|
|
1487
1488
|
return Promise.all([
|
|
1488
|
-
qc.invalidateQueries({ queryKey:
|
|
1489
|
-
qc.invalidateQueries({ queryKey:
|
|
1489
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tags(workspaceId) }),
|
|
1490
|
+
qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.facts(workspaceId) })
|
|
1490
1491
|
]);
|
|
1491
1492
|
}
|
|
1492
1493
|
function useInvalidateTagData() {
|
|
@@ -1501,7 +1502,7 @@ function useTagKindSchema(kind, options) {
|
|
|
1501
1502
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1502
1503
|
const workspaceId = arbi.getWorkspaceId() ?? "";
|
|
1503
1504
|
return reactQuery.useQuery({
|
|
1504
|
-
queryKey:
|
|
1505
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
|
|
1505
1506
|
queryFn: () => arbi.tagKinds.get(kind),
|
|
1506
1507
|
enabled: (options?.enabled ?? true) && !!kind && !!workspaceId && arbi.hasWorkspace
|
|
1507
1508
|
});
|
|
@@ -1517,7 +1518,7 @@ function useUpdateTagKindSchema() {
|
|
|
1517
1518
|
onSuccess: (schema) => {
|
|
1518
1519
|
const workspaceId = arbi.getWorkspaceId();
|
|
1519
1520
|
if (!workspaceId) return;
|
|
1520
|
-
qc.setQueryData(
|
|
1521
|
+
qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
|
|
1521
1522
|
return invalidateTagData(qc, workspaceId);
|
|
1522
1523
|
}
|
|
1523
1524
|
});
|
|
@@ -1536,7 +1537,7 @@ function useSetTagValues() {
|
|
|
1536
1537
|
function useFilteredProjects(filters, options) {
|
|
1537
1538
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1538
1539
|
return reactQuery.useQuery({
|
|
1539
|
-
queryKey:
|
|
1540
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
1540
1541
|
queryFn: () => arbi.projects.list(filters),
|
|
1541
1542
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1542
1543
|
});
|
|
@@ -1549,14 +1550,14 @@ function useUpdateProjectFields() {
|
|
|
1549
1550
|
projectExtId,
|
|
1550
1551
|
patch
|
|
1551
1552
|
}) => arbi.projects.update(projectExtId, patch),
|
|
1552
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1553
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projects() })
|
|
1553
1554
|
});
|
|
1554
1555
|
}
|
|
1555
1556
|
function useProjectEvents(projectExtId, options) {
|
|
1556
1557
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1557
1558
|
return reactQuery.useQuery({
|
|
1558
1559
|
queryKey: [
|
|
1559
|
-
...
|
|
1560
|
+
...chunkUN3AZUXX_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
1560
1561
|
options?.kind ?? "all",
|
|
1561
1562
|
options?.limit ?? "default"
|
|
1562
1563
|
],
|
|
@@ -1567,7 +1568,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
1567
1568
|
function useConversationUsage(conversationId, options) {
|
|
1568
1569
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1569
1570
|
return reactQuery.useQuery({
|
|
1570
|
-
queryKey:
|
|
1571
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
1571
1572
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
1572
1573
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
1573
1574
|
refetchInterval: options?.live ? 1e4 : false
|
|
@@ -1576,7 +1577,7 @@ function useConversationUsage(conversationId, options) {
|
|
|
1576
1577
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
1577
1578
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1578
1579
|
return reactQuery.useQuery({
|
|
1579
|
-
queryKey:
|
|
1580
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
1580
1581
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
1581
1582
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1582
1583
|
});
|
|
@@ -1584,7 +1585,7 @@ function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
|
1584
1585
|
function useContacts(options) {
|
|
1585
1586
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1586
1587
|
return reactQuery.useQuery({
|
|
1587
|
-
queryKey:
|
|
1588
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts(),
|
|
1588
1589
|
queryFn: () => arbi.contacts.list(),
|
|
1589
1590
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1590
1591
|
});
|
|
@@ -1599,7 +1600,7 @@ function usePendingContacts(options) {
|
|
|
1599
1600
|
}
|
|
1600
1601
|
function useInvalidateContacts() {
|
|
1601
1602
|
const qc = reactQuery.useQueryClient();
|
|
1602
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1603
|
+
return () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts() });
|
|
1603
1604
|
}
|
|
1604
1605
|
function useInviteContacts() {
|
|
1605
1606
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
@@ -1633,6 +1634,91 @@ function useDeleteContact() {
|
|
|
1633
1634
|
onSuccess: () => invalidate()
|
|
1634
1635
|
});
|
|
1635
1636
|
}
|
|
1637
|
+
var AccountClientContext = React.createContext(null);
|
|
1638
|
+
function arbiProfile(arbi) {
|
|
1639
|
+
const profile = arbi.user.profile();
|
|
1640
|
+
return profile ? toProfileView(profile) : null;
|
|
1641
|
+
}
|
|
1642
|
+
function arbiAccountClient(arbi, overrides = {}) {
|
|
1643
|
+
return {
|
|
1644
|
+
profile: () => arbiProfile(arbi),
|
|
1645
|
+
onProfileChange: (listener) => arbi.user.onProfileChange(() => listener()),
|
|
1646
|
+
updateProfile: async (vars) => {
|
|
1647
|
+
await arbi.profile.update({
|
|
1648
|
+
...vars.givenName !== void 0 && { given_name: vars.givenName.trim() },
|
|
1649
|
+
...vars.familyName !== void 0 && { family_name: vars.familyName.trim() },
|
|
1650
|
+
...vars.picture !== void 0 && { picture: vars.picture }
|
|
1651
|
+
});
|
|
1652
|
+
},
|
|
1653
|
+
requestEmailChange: (newEmail) => arbi.account.requestEmailChange(newEmail),
|
|
1654
|
+
confirmEmailChange: async (newEmail, code) => {
|
|
1655
|
+
await arbi.account.confirmEmailChange(newEmail, code);
|
|
1656
|
+
},
|
|
1657
|
+
changePassword: (vars) => arbi.account.changePassword(vars),
|
|
1658
|
+
listSessions: () => arbi.sessions.list(),
|
|
1659
|
+
currentSessionId: () => arbi.sessions.currentId(),
|
|
1660
|
+
terminateSession: (sessionId) => arbi.sessions.terminate(sessionId),
|
|
1661
|
+
signOut: async ({ everywhere } = {}) => {
|
|
1662
|
+
if (everywhere) await arbi.sessions.logoutAll();
|
|
1663
|
+
else await arbi.logout();
|
|
1664
|
+
},
|
|
1665
|
+
requestDeletion: () => arbi.account.requestDeletion(),
|
|
1666
|
+
identity: {
|
|
1667
|
+
status: () => arbi.identity.status(),
|
|
1668
|
+
purchase: () => arbi.identity.purchase(),
|
|
1669
|
+
startSession: () => arbi.identity.startSession(),
|
|
1670
|
+
refresh: () => arbi.identity.refresh(),
|
|
1671
|
+
acceptName: () => arbi.identity.acceptName(),
|
|
1672
|
+
remove: () => arbi.identity.remove()
|
|
1673
|
+
},
|
|
1674
|
+
...overrides
|
|
1675
|
+
};
|
|
1676
|
+
}
|
|
1677
|
+
var NO_ACCOUNT_ERROR = "The account needs an <AccountClientProvider> or an <ArbiProvider> above it";
|
|
1678
|
+
var refuse = () => Promise.reject(new Error(NO_ACCOUNT_ERROR));
|
|
1679
|
+
var NO_ACCOUNT = {
|
|
1680
|
+
client: {
|
|
1681
|
+
profile: () => null,
|
|
1682
|
+
onProfileChange: () => () => {
|
|
1683
|
+
},
|
|
1684
|
+
updateProfile: refuse,
|
|
1685
|
+
requestEmailChange: refuse,
|
|
1686
|
+
confirmEmailChange: refuse,
|
|
1687
|
+
changePassword: refuse,
|
|
1688
|
+
listSessions: refuse,
|
|
1689
|
+
currentSessionId: () => null,
|
|
1690
|
+
terminateSession: refuse,
|
|
1691
|
+
signOut: refuse,
|
|
1692
|
+
requestDeletion: refuse,
|
|
1693
|
+
identity: {
|
|
1694
|
+
status: refuse,
|
|
1695
|
+
purchase: refuse,
|
|
1696
|
+
startSession: refuse,
|
|
1697
|
+
refresh: refuse,
|
|
1698
|
+
acceptName: refuse,
|
|
1699
|
+
remove: refuse
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
enabled: false
|
|
1703
|
+
};
|
|
1704
|
+
function AccountClientProvider({
|
|
1705
|
+
client,
|
|
1706
|
+
enabled = true,
|
|
1707
|
+
children
|
|
1708
|
+
}) {
|
|
1709
|
+
const value = React.useMemo(() => ({ client, enabled }), [client, enabled]);
|
|
1710
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AccountClientContext.Provider, { value, children });
|
|
1711
|
+
}
|
|
1712
|
+
function useAccountClient() {
|
|
1713
|
+
const provided = React.useContext(AccountClientContext);
|
|
1714
|
+
const arbi = React.useContext(chunkXIDDXD5Y_cjs.ArbiContext);
|
|
1715
|
+
const fallback = React.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
|
|
1716
|
+
if (provided) return provided;
|
|
1717
|
+
if (!arbi || !fallback) return NO_ACCOUNT;
|
|
1718
|
+
return { client: fallback, enabled: arbi.isLoggedIn };
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
// src/account/profile.ts
|
|
1636
1722
|
function toProfileView(profile) {
|
|
1637
1723
|
return {
|
|
1638
1724
|
...profile,
|
|
@@ -1640,34 +1726,31 @@ function toProfileView(profile) {
|
|
|
1640
1726
|
};
|
|
1641
1727
|
}
|
|
1642
1728
|
function useProfile(options) {
|
|
1643
|
-
const
|
|
1729
|
+
const { client, enabled } = useAccountClient();
|
|
1730
|
+
const qc = reactQuery.useQueryClient();
|
|
1731
|
+
React.useEffect(
|
|
1732
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
1733
|
+
[client, qc]
|
|
1734
|
+
);
|
|
1644
1735
|
return reactQuery.useQuery({
|
|
1645
|
-
queryKey:
|
|
1646
|
-
queryFn: () =>
|
|
1647
|
-
|
|
1648
|
-
return profile ? toProfileView(profile) : null;
|
|
1649
|
-
},
|
|
1650
|
-
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
1736
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile(),
|
|
1737
|
+
queryFn: () => client.profile(),
|
|
1738
|
+
enabled: (options?.enabled ?? true) && enabled,
|
|
1651
1739
|
staleTime: Infinity
|
|
1652
1740
|
});
|
|
1653
1741
|
}
|
|
1654
1742
|
function useUpdateProfile() {
|
|
1655
|
-
const
|
|
1743
|
+
const { client } = useAccountClient();
|
|
1656
1744
|
const qc = reactQuery.useQueryClient();
|
|
1657
1745
|
return reactQuery.useMutation({
|
|
1658
1746
|
mutationFn: async (vars) => {
|
|
1659
|
-
await
|
|
1660
|
-
|
|
1661
|
-
...vars.familyName !== void 0 && { family_name: vars.familyName.trim() },
|
|
1662
|
-
...vars.picture !== void 0 && { picture: vars.picture }
|
|
1663
|
-
});
|
|
1664
|
-
const profile = arbi.user.profile();
|
|
1665
|
-
return profile ? toProfileView(profile) : null;
|
|
1747
|
+
await client.updateProfile(vars);
|
|
1748
|
+
return client.profile();
|
|
1666
1749
|
},
|
|
1667
1750
|
onSuccess: (profile) => {
|
|
1668
|
-
qc.setQueryData(
|
|
1669
|
-
void qc.invalidateQueries({ queryKey:
|
|
1670
|
-
return qc.invalidateQueries({ queryKey:
|
|
1751
|
+
qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), profile);
|
|
1752
|
+
void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.identity() });
|
|
1753
|
+
return qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workspaces() });
|
|
1671
1754
|
}
|
|
1672
1755
|
});
|
|
1673
1756
|
}
|
|
@@ -1740,20 +1823,17 @@ function useAvatarCrop({
|
|
|
1740
1823
|
};
|
|
1741
1824
|
}
|
|
1742
1825
|
function useRequestEmailChange() {
|
|
1743
|
-
const
|
|
1826
|
+
const { client } = useAccountClient();
|
|
1744
1827
|
return reactQuery.useMutation({
|
|
1745
|
-
mutationFn: (newEmail) =>
|
|
1828
|
+
mutationFn: (newEmail) => client.requestEmailChange(newEmail)
|
|
1746
1829
|
});
|
|
1747
1830
|
}
|
|
1748
1831
|
function useConfirmEmailChange() {
|
|
1749
|
-
const
|
|
1832
|
+
const { client } = useAccountClient();
|
|
1750
1833
|
const qc = reactQuery.useQueryClient();
|
|
1751
1834
|
return reactQuery.useMutation({
|
|
1752
|
-
mutationFn: ({ newEmail, code }) =>
|
|
1753
|
-
onSuccess: () =>
|
|
1754
|
-
const profile = arbi.user.profile();
|
|
1755
|
-
qc.setQueryData(chunkAFGE55RQ_cjs.arbiQueryKeys.profile(), profile ? toProfileView(profile) : null);
|
|
1756
|
-
}
|
|
1835
|
+
mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
|
|
1836
|
+
onSuccess: () => qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.profile(), client.profile())
|
|
1757
1837
|
});
|
|
1758
1838
|
}
|
|
1759
1839
|
function useEmailChange({
|
|
@@ -1817,9 +1897,9 @@ function useEmailChange({
|
|
|
1817
1897
|
};
|
|
1818
1898
|
}
|
|
1819
1899
|
function usePasswordChange() {
|
|
1820
|
-
const
|
|
1900
|
+
const { client } = useAccountClient();
|
|
1821
1901
|
return reactQuery.useMutation({
|
|
1822
|
-
mutationFn: (vars) =>
|
|
1902
|
+
mutationFn: (vars) => client.changePassword(vars)
|
|
1823
1903
|
});
|
|
1824
1904
|
}
|
|
1825
1905
|
var DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES = {
|
|
@@ -1921,7 +2001,7 @@ function toNotificationPreferences(stored, keys) {
|
|
|
1921
2001
|
function useUserSettings(options) {
|
|
1922
2002
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
1923
2003
|
return reactQuery.useQuery({
|
|
1924
|
-
queryKey:
|
|
2004
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
|
|
1925
2005
|
queryFn: () => arbi.settings.get(),
|
|
1926
2006
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1927
2007
|
});
|
|
@@ -1934,18 +2014,18 @@ function useNotificationPreferences(keys, options) {
|
|
|
1934
2014
|
const save = reactQuery.useMutation({
|
|
1935
2015
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
1936
2016
|
onMutate: async (patch) => {
|
|
1937
|
-
await qc.cancelQueries({ queryKey:
|
|
1938
|
-
const previous = qc.getQueryData(
|
|
2017
|
+
await qc.cancelQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() });
|
|
2018
|
+
const previous = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings());
|
|
1939
2019
|
qc.setQueryData(
|
|
1940
|
-
|
|
2020
|
+
chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
|
|
1941
2021
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
1942
2022
|
);
|
|
1943
2023
|
return { previous };
|
|
1944
2024
|
},
|
|
1945
2025
|
onError: (_err, _patch, context) => {
|
|
1946
|
-
qc.setQueryData(
|
|
2026
|
+
qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
1947
2027
|
},
|
|
1948
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2028
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() })
|
|
1949
2029
|
});
|
|
1950
2030
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
1951
2031
|
const setAll = React.useCallback(
|
|
@@ -1972,18 +2052,18 @@ function useRelevanceSave() {
|
|
|
1972
2052
|
return reactQuery.useMutation({
|
|
1973
2053
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
1974
2054
|
onMutate: async (patch) => {
|
|
1975
|
-
await qc.cancelQueries({ queryKey:
|
|
1976
|
-
const previous = qc.getQueryData(
|
|
2055
|
+
await qc.cancelQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() });
|
|
2056
|
+
const previous = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings());
|
|
1977
2057
|
qc.setQueryData(
|
|
1978
|
-
|
|
2058
|
+
chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(),
|
|
1979
2059
|
(old) => old ? { ...old, ...patch } : old
|
|
1980
2060
|
);
|
|
1981
2061
|
return { previous };
|
|
1982
2062
|
},
|
|
1983
2063
|
onError: (_err, _patch, context) => {
|
|
1984
|
-
qc.setQueryData(
|
|
2064
|
+
qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
1985
2065
|
},
|
|
1986
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2066
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings() })
|
|
1987
2067
|
});
|
|
1988
2068
|
}
|
|
1989
2069
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -1994,7 +2074,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
1994
2074
|
const setLevel = React.useCallback(
|
|
1995
2075
|
(next) => {
|
|
1996
2076
|
if (!workspaceId) return;
|
|
1997
|
-
const current = qc.getQueryData(
|
|
2077
|
+
const current = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
1998
2078
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
1999
2079
|
},
|
|
2000
2080
|
[qc, save, settings.data, workspaceId]
|
|
@@ -2015,7 +2095,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2015
2095
|
const setFollowing = React.useCallback(
|
|
2016
2096
|
(on) => {
|
|
2017
2097
|
if (!conversationId) return;
|
|
2018
|
-
const current = qc.getQueryData(
|
|
2098
|
+
const current = qc.getQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2019
2099
|
save.mutate({
|
|
2020
2100
|
followed_threads: browser.settings.withMembership(current?.followed_threads, conversationId, on)
|
|
2021
2101
|
});
|
|
@@ -2030,24 +2110,32 @@ function useFollowThread(conversationId, options) {
|
|
|
2030
2110
|
error: save.error
|
|
2031
2111
|
};
|
|
2032
2112
|
}
|
|
2113
|
+
function useSessions(options) {
|
|
2114
|
+
const { client, enabled } = useAccountClient();
|
|
2115
|
+
return reactQuery.useQuery({
|
|
2116
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.sessions(),
|
|
2117
|
+
queryFn: () => client.listSessions(),
|
|
2118
|
+
enabled: (options?.enabled ?? true) && enabled
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2033
2121
|
function useTerminateSession() {
|
|
2034
|
-
const
|
|
2122
|
+
const { client } = useAccountClient();
|
|
2035
2123
|
const qc = reactQuery.useQueryClient();
|
|
2036
2124
|
return reactQuery.useMutation({
|
|
2037
|
-
mutationFn: (sessionId) =>
|
|
2038
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2125
|
+
mutationFn: (sessionId) => client.terminateSession(sessionId),
|
|
2126
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.sessions() })
|
|
2039
2127
|
});
|
|
2040
2128
|
}
|
|
2041
|
-
function
|
|
2042
|
-
const
|
|
2129
|
+
function useSignOut() {
|
|
2130
|
+
const { client } = useAccountClient();
|
|
2043
2131
|
const qc = reactQuery.useQueryClient();
|
|
2044
2132
|
return reactQuery.useMutation({
|
|
2045
|
-
mutationFn: () =>
|
|
2046
|
-
|
|
2133
|
+
mutationFn: (options = {}) => client.signOut(options),
|
|
2134
|
+
onSettled: () => qc.clear()
|
|
2047
2135
|
});
|
|
2048
2136
|
}
|
|
2049
2137
|
function useCurrentSessionId() {
|
|
2050
|
-
return
|
|
2138
|
+
return useAccountClient().client.currentSessionId();
|
|
2051
2139
|
}
|
|
2052
2140
|
function parseDeleteAccountBlockers(error) {
|
|
2053
2141
|
const body = error?.apiError ?? error;
|
|
@@ -2062,8 +2150,8 @@ function parseDeleteAccountBlockers(error) {
|
|
|
2062
2150
|
return [];
|
|
2063
2151
|
}
|
|
2064
2152
|
function useDeleteAccount() {
|
|
2065
|
-
const
|
|
2066
|
-
return reactQuery.useMutation({ mutationFn: () =>
|
|
2153
|
+
const { client } = useAccountClient();
|
|
2154
|
+
return reactQuery.useMutation({ mutationFn: () => client.requestDeletion() });
|
|
2067
2155
|
}
|
|
2068
2156
|
function useDeleteAccountFlow({
|
|
2069
2157
|
userEmail,
|
|
@@ -2178,7 +2266,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2178
2266
|
const apiRef = React.useRef(api);
|
|
2179
2267
|
apiRef.current = api;
|
|
2180
2268
|
const query = reactQuery.useQuery({
|
|
2181
|
-
queryKey:
|
|
2269
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.identity(),
|
|
2182
2270
|
queryFn: () => apiRef.current.status(),
|
|
2183
2271
|
enabled,
|
|
2184
2272
|
staleTime: 6e4
|
|
@@ -2196,7 +2284,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2196
2284
|
const lastVerified = React.useRef(void 0);
|
|
2197
2285
|
const apply = React.useCallback(
|
|
2198
2286
|
(next) => {
|
|
2199
|
-
qc.setQueryData(
|
|
2287
|
+
qc.setQueryData(chunkUN3AZUXX_cjs.arbiQueryKeys.identity(), next);
|
|
2200
2288
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
2201
2289
|
onVerifiedChange?.(next.verified);
|
|
2202
2290
|
}
|
|
@@ -2384,29 +2472,19 @@ function useIdentityVerificationFlow(api, {
|
|
|
2384
2472
|
};
|
|
2385
2473
|
}
|
|
2386
2474
|
function useIdentityVerification(options = {}) {
|
|
2387
|
-
const
|
|
2475
|
+
const { client, enabled } = useAccountClient();
|
|
2388
2476
|
const qc = reactQuery.useQueryClient();
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
startSession: () => arbi.identity.startSession(),
|
|
2394
|
-
refresh: () => arbi.identity.refresh(),
|
|
2395
|
-
acceptName: () => arbi.identity.acceptName(),
|
|
2396
|
-
remove: () => arbi.identity.remove()
|
|
2397
|
-
}),
|
|
2398
|
-
[arbi]
|
|
2399
|
-
);
|
|
2400
|
-
const { onVerifiedChange, onNameAccepted } = options;
|
|
2401
|
-
return useIdentityVerificationFlow(api, {
|
|
2402
|
-
enabled: arbi.isLoggedIn,
|
|
2477
|
+
const { onVerifiedChange, onNameAccepted, formatPrice } = options;
|
|
2478
|
+
return useIdentityVerificationFlow(client.identity, {
|
|
2479
|
+
enabled,
|
|
2480
|
+
formatPrice,
|
|
2403
2481
|
onVerifiedChange: (verified) => {
|
|
2404
|
-
void qc.invalidateQueries({ queryKey:
|
|
2482
|
+
void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile() });
|
|
2405
2483
|
onVerifiedChange?.(verified);
|
|
2406
2484
|
},
|
|
2407
2485
|
onNameAccepted: (name) => {
|
|
2408
|
-
void qc.invalidateQueries({ queryKey:
|
|
2409
|
-
void qc.invalidateQueries({ queryKey:
|
|
2486
|
+
void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.profile() });
|
|
2487
|
+
void qc.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.workspaces() });
|
|
2410
2488
|
onNameAccepted?.(name);
|
|
2411
2489
|
}
|
|
2412
2490
|
});
|
|
@@ -2824,7 +2902,7 @@ function useMailDraftReplaced(draftId, onReplaced) {
|
|
|
2824
2902
|
}, [draftId]);
|
|
2825
2903
|
}
|
|
2826
2904
|
function useWorkspaceDocs(workspaceId) {
|
|
2827
|
-
const { data: docs = [], isLoading, isError } =
|
|
2905
|
+
const { data: docs = [], isLoading, isError } = chunkUN3AZUXX_cjs.useDocuments(workspaceId);
|
|
2828
2906
|
const docIds = React.useMemo(
|
|
2829
2907
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
2830
2908
|
[docs]
|
|
@@ -2832,7 +2910,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
2832
2910
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
2833
2911
|
}
|
|
2834
2912
|
function useAiTask() {
|
|
2835
|
-
const mutation =
|
|
2913
|
+
const mutation = chunkUN3AZUXX_cjs.useAssistantQuery();
|
|
2836
2914
|
const [status, setStatus] = React.useState("idle");
|
|
2837
2915
|
const [text, setText] = React.useState("");
|
|
2838
2916
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -3452,8 +3530,8 @@ function DocumentReview({
|
|
|
3452
3530
|
onClose,
|
|
3453
3531
|
className
|
|
3454
3532
|
}) {
|
|
3455
|
-
const parsedQuery =
|
|
3456
|
-
const tagsQuery =
|
|
3533
|
+
const parsedQuery = chunkUN3AZUXX_cjs.useParsedDocument(docId, stage);
|
|
3534
|
+
const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
|
|
3457
3535
|
const tagNameById = React__default.default.useMemo(() => {
|
|
3458
3536
|
const map = /* @__PURE__ */ new Map();
|
|
3459
3537
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -3684,7 +3762,7 @@ function SemanticSearch({
|
|
|
3684
3762
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
3685
3763
|
const [value, setValue] = React.useState("");
|
|
3686
3764
|
const [selected, setSelected] = React.useState(null);
|
|
3687
|
-
const { data: docs = [] } =
|
|
3765
|
+
const { data: docs = [] } = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
3688
3766
|
const docMap = React.useMemo(() => {
|
|
3689
3767
|
const map = /* @__PURE__ */ new Map();
|
|
3690
3768
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -4652,6 +4730,9 @@ function getNotificationTypeMeta(type) {
|
|
|
4652
4730
|
return { Icon: lucideReact.FileText, iconClassName: "text-primary", label: "Document" };
|
|
4653
4731
|
case "contact_accepted":
|
|
4654
4732
|
return { Icon: lucideReact.UserCheck, iconClassName: "text-green-500", label: "Invitation" };
|
|
4733
|
+
case "deployment_user_invited":
|
|
4734
|
+
case "deployment_user_registered":
|
|
4735
|
+
return { Icon: lucideReact.UserPlus, iconClassName: "text-primary", label: "Users" };
|
|
4655
4736
|
case "signup_reward":
|
|
4656
4737
|
return { Icon: lucideReact.PartyPopper, iconClassName: "text-green-600", label: "Signup bonus" };
|
|
4657
4738
|
case "referral_reward":
|
|
@@ -4783,7 +4864,7 @@ function ActivityFeed({
|
|
|
4783
4864
|
enabled,
|
|
4784
4865
|
"data-testid": testId = "activity-feed"
|
|
4785
4866
|
}) {
|
|
4786
|
-
const { data, isLoading, isError } =
|
|
4867
|
+
const { data, isLoading, isError } = chunkUN3AZUXX_cjs.useActivity({ limit, enabled });
|
|
4787
4868
|
if (isLoading) {
|
|
4788
4869
|
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: [
|
|
4789
4870
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -4941,7 +5022,7 @@ function useDirectMessages(options) {
|
|
|
4941
5022
|
enabled
|
|
4942
5023
|
});
|
|
4943
5024
|
const contactsQuery = reactQuery.useQuery({
|
|
4944
|
-
queryKey:
|
|
5025
|
+
queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.contacts(),
|
|
4945
5026
|
queryFn: () => arbi.contacts.list(),
|
|
4946
5027
|
enabled
|
|
4947
5028
|
});
|
|
@@ -5143,7 +5224,7 @@ function ConversationList({
|
|
|
5143
5224
|
children: c.subtitle ?? preview
|
|
5144
5225
|
}
|
|
5145
5226
|
),
|
|
5146
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ?
|
|
5227
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunk6PPWZILQ_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
|
|
5147
5228
|
] })
|
|
5148
5229
|
] })
|
|
5149
5230
|
] });
|
|
@@ -5227,7 +5308,7 @@ function MessageBubble({
|
|
|
5227
5308
|
isLastOfRun,
|
|
5228
5309
|
senderName: message.isMine ? "You" : userDisplayName(message.sender),
|
|
5229
5310
|
classNames,
|
|
5230
|
-
formatTimestamp:
|
|
5311
|
+
formatTimestamp: chunk6PPWZILQ_cjs.formatRelativeTime
|
|
5231
5312
|
}
|
|
5232
5313
|
);
|
|
5233
5314
|
}
|
|
@@ -6094,12 +6175,89 @@ function CommandPaletteProvider({
|
|
|
6094
6175
|
/* @__PURE__ */ jsxRuntime.jsx(CommandPalette, { open: isOpen, onOpenChange: setIsOpen, ...paletteProps })
|
|
6095
6176
|
] });
|
|
6096
6177
|
}
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6178
|
+
|
|
6179
|
+
// src/session/store.ts
|
|
6180
|
+
var EMPTY_SESSION_STATE = {
|
|
6181
|
+
workspaceId: null,
|
|
6182
|
+
conversationId: null,
|
|
6183
|
+
viewingDocument: null,
|
|
6184
|
+
selectedDocumentIds: [],
|
|
6185
|
+
generating: {},
|
|
6186
|
+
paMode: false,
|
|
6187
|
+
conversationDocuments: {}
|
|
6188
|
+
};
|
|
6189
|
+
var selectViewingDocumentId = (state) => state.viewingDocument ? chunkZWFMFOGP_cjs.parseVersionRef(state.viewingDocument.id).docId : null;
|
|
6190
|
+
var selectIsGenerating = (conversationId) => (state) => !!conversationId && !!state.generating[conversationId]?.isGenerating;
|
|
6191
|
+
function nextViewingDocument(current, input) {
|
|
6192
|
+
if (!input) return null;
|
|
6193
|
+
const same = current?.id === input.id;
|
|
6194
|
+
return {
|
|
6195
|
+
id: input.id,
|
|
6196
|
+
page: input.page !== void 0 ? input.page : same ? current?.page ?? null : null,
|
|
6197
|
+
passageId: input.passageId !== void 0 ? input.passageId : current?.passageId ?? null
|
|
6198
|
+
};
|
|
6199
|
+
}
|
|
6200
|
+
function createArbiSessionStore(initial = {}) {
|
|
6201
|
+
let state = { ...EMPTY_SESSION_STATE, ...initial };
|
|
6202
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
6203
|
+
const update = (patch) => {
|
|
6204
|
+
state = { ...state, ...patch };
|
|
6205
|
+
listeners.forEach((listener) => listener());
|
|
6206
|
+
};
|
|
6207
|
+
return {
|
|
6208
|
+
getState: () => state,
|
|
6209
|
+
subscribe: (listener) => {
|
|
6210
|
+
listeners.add(listener);
|
|
6211
|
+
return () => listeners.delete(listener);
|
|
6212
|
+
},
|
|
6213
|
+
setWorkspaceId: (workspaceId) => {
|
|
6214
|
+
if (state.workspaceId !== workspaceId) update({ workspaceId });
|
|
6215
|
+
},
|
|
6216
|
+
setConversationId: (conversationId) => {
|
|
6217
|
+
if (state.conversationId !== conversationId) update({ conversationId });
|
|
6218
|
+
},
|
|
6219
|
+
setViewingDocument: (input) => update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),
|
|
6220
|
+
setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),
|
|
6221
|
+
setConversationGenerating: (conversationId, isGenerating) => {
|
|
6222
|
+
const current = state.generating[conversationId];
|
|
6223
|
+
update({
|
|
6224
|
+
generating: {
|
|
6225
|
+
...state.generating,
|
|
6226
|
+
[conversationId]: {
|
|
6227
|
+
isGenerating,
|
|
6228
|
+
error: isGenerating ? null : current?.error ?? null,
|
|
6229
|
+
startTime: isGenerating ? Date.now() : null
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
});
|
|
6233
|
+
},
|
|
6234
|
+
setPaMode: (paMode) => {
|
|
6235
|
+
if (state.paMode !== paMode) update({ paMode });
|
|
6236
|
+
},
|
|
6237
|
+
setConversationDocuments: (conversationId, documents) => update({
|
|
6238
|
+
conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents }
|
|
6239
|
+
})
|
|
6240
|
+
};
|
|
6241
|
+
}
|
|
6242
|
+
var ArbiSessionStoreContext = React.createContext(null);
|
|
6243
|
+
var moduleDefault = null;
|
|
6244
|
+
var defaultStore = () => moduleDefault ??= createArbiSessionStore();
|
|
6245
|
+
function ArbiSessionStateProvider({
|
|
6246
|
+
store,
|
|
6247
|
+
children
|
|
6248
|
+
}) {
|
|
6249
|
+
const enclosing = React.useContext(ArbiSessionStoreContext);
|
|
6250
|
+
const [own] = React.useState(createArbiSessionStore);
|
|
6251
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ArbiSessionStoreContext.Provider, { value: store ?? enclosing ?? own, children });
|
|
6252
|
+
}
|
|
6253
|
+
function useArbiSessionStore() {
|
|
6254
|
+
return React.useContext(ArbiSessionStoreContext) ?? defaultStore();
|
|
6255
|
+
}
|
|
6256
|
+
function useArbiSessionState(selector) {
|
|
6257
|
+
const store = useArbiSessionStore();
|
|
6258
|
+
const select = () => selector(store.getState());
|
|
6259
|
+
return React.useSyncExternalStore(store.subscribe, select, select);
|
|
6260
|
+
}
|
|
6103
6261
|
agGridCommunity.ModuleRegistry.registerModules([agGridCommunity.AllCommunityModule]);
|
|
6104
6262
|
function formatBytes(bytes) {
|
|
6105
6263
|
if (bytes == null || Number.isNaN(bytes)) return "\u2014";
|
|
@@ -6133,10 +6291,10 @@ function DocumentTable({
|
|
|
6133
6291
|
extraColumns,
|
|
6134
6292
|
className
|
|
6135
6293
|
}) {
|
|
6136
|
-
const query =
|
|
6294
|
+
const query = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6137
6295
|
const rows = documents ?? query.data ?? [];
|
|
6138
6296
|
const isLoading = !documents && query.isLoading;
|
|
6139
|
-
const tagsQuery =
|
|
6297
|
+
const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
|
|
6140
6298
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6141
6299
|
const map = /* @__PURE__ */ new Map();
|
|
6142
6300
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6144,19 +6302,19 @@ function DocumentTable({
|
|
|
6144
6302
|
}
|
|
6145
6303
|
return map;
|
|
6146
6304
|
}, [tagsQuery.data]);
|
|
6147
|
-
const
|
|
6148
|
-
const
|
|
6149
|
-
const
|
|
6150
|
-
const
|
|
6305
|
+
const session = useArbiSessionStore();
|
|
6306
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6307
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6308
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6151
6309
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6152
6310
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6153
6311
|
const gridApiRef = React__default.default.useRef(null);
|
|
6154
6312
|
const openDocument = React__default.default.useCallback(
|
|
6155
6313
|
(id) => {
|
|
6156
|
-
|
|
6314
|
+
session.setViewingDocument({ id });
|
|
6157
6315
|
onOpenDocument?.(id);
|
|
6158
6316
|
},
|
|
6159
|
-
[onOpenDocument,
|
|
6317
|
+
[onOpenDocument, session]
|
|
6160
6318
|
);
|
|
6161
6319
|
const applySelection = React__default.default.useCallback(() => {
|
|
6162
6320
|
const api = gridApiRef.current;
|
|
@@ -6317,7 +6475,7 @@ function DocumentCardMenu({
|
|
|
6317
6475
|
const invalidateDocuments = () => {
|
|
6318
6476
|
const workspaceId = arbi.getWorkspaceId();
|
|
6319
6477
|
if (workspaceId) {
|
|
6320
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6478
|
+
void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
6321
6479
|
}
|
|
6322
6480
|
};
|
|
6323
6481
|
const download = reactQuery.useMutation({
|
|
@@ -6416,10 +6574,10 @@ function DocumentGallery({
|
|
|
6416
6574
|
minTileWidth = 148,
|
|
6417
6575
|
className
|
|
6418
6576
|
}) {
|
|
6419
|
-
const query =
|
|
6577
|
+
const query = chunkUN3AZUXX_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6420
6578
|
const rows = documents ?? query.data ?? [];
|
|
6421
6579
|
const isLoading = !documents && query.isLoading;
|
|
6422
|
-
const tagsQuery =
|
|
6580
|
+
const tagsQuery = chunkUN3AZUXX_cjs.useTags(workspaceId);
|
|
6423
6581
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6424
6582
|
const map = /* @__PURE__ */ new Map();
|
|
6425
6583
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6431,12 +6589,12 @@ function DocumentGallery({
|
|
|
6431
6589
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
6432
6590
|
[rows]
|
|
6433
6591
|
);
|
|
6434
|
-
const thumbsQuery =
|
|
6592
|
+
const thumbsQuery = chunkUN3AZUXX_cjs.useThumbnails(docIds);
|
|
6435
6593
|
const thumbs = thumbsQuery.data ?? {};
|
|
6436
|
-
const
|
|
6437
|
-
const
|
|
6438
|
-
const
|
|
6439
|
-
const
|
|
6594
|
+
const session = useArbiSessionStore();
|
|
6595
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6596
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6597
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6440
6598
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6441
6599
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6442
6600
|
const selectedSet = React__default.default.useMemo(() => new Set(effectiveSelected), [effectiveSelected]);
|
|
@@ -6451,10 +6609,10 @@ function DocumentGallery({
|
|
|
6451
6609
|
);
|
|
6452
6610
|
const openDocument = React__default.default.useCallback(
|
|
6453
6611
|
(id) => {
|
|
6454
|
-
|
|
6612
|
+
session.setViewingDocument({ id });
|
|
6455
6613
|
onOpenDocument?.(id);
|
|
6456
6614
|
},
|
|
6457
|
-
[onOpenDocument,
|
|
6615
|
+
[onOpenDocument, session]
|
|
6458
6616
|
);
|
|
6459
6617
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
6460
6618
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -6467,7 +6625,7 @@ function DocumentGallery({
|
|
|
6467
6625
|
setRenamingId(null);
|
|
6468
6626
|
const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
|
|
6469
6627
|
if (activeWorkspace) {
|
|
6470
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6628
|
+
void queryClient.invalidateQueries({ queryKey: chunkUN3AZUXX_cjs.arbiQueryKeys.documents(activeWorkspace) });
|
|
6471
6629
|
}
|
|
6472
6630
|
}
|
|
6473
6631
|
});
|
|
@@ -7085,187 +7243,183 @@ function hasVideoTrack(blob) {
|
|
|
7085
7243
|
|
|
7086
7244
|
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
7087
7245
|
enumerable: true,
|
|
7088
|
-
get: function () { return
|
|
7246
|
+
get: function () { return chunkUN3AZUXX_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
7089
7247
|
});
|
|
7090
7248
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
7091
7249
|
enumerable: true,
|
|
7092
|
-
get: function () { return
|
|
7250
|
+
get: function () { return chunkUN3AZUXX_cjs.arbiQueryKeys; }
|
|
7093
7251
|
});
|
|
7094
7252
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
7095
7253
|
enumerable: true,
|
|
7096
|
-
get: function () { return
|
|
7254
|
+
get: function () { return chunkUN3AZUXX_cjs.isUsageMetered; }
|
|
7097
7255
|
});
|
|
7098
7256
|
Object.defineProperty(exports, "useActivity", {
|
|
7099
7257
|
enumerable: true,
|
|
7100
|
-
get: function () { return
|
|
7258
|
+
get: function () { return chunkUN3AZUXX_cjs.useActivity; }
|
|
7101
7259
|
});
|
|
7102
7260
|
Object.defineProperty(exports, "useAgents", {
|
|
7103
7261
|
enumerable: true,
|
|
7104
|
-
get: function () { return
|
|
7262
|
+
get: function () { return chunkUN3AZUXX_cjs.useAgents; }
|
|
7105
7263
|
});
|
|
7106
7264
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
7107
7265
|
enumerable: true,
|
|
7108
|
-
get: function () { return
|
|
7266
|
+
get: function () { return chunkUN3AZUXX_cjs.useAssistantQuery; }
|
|
7109
7267
|
});
|
|
7110
7268
|
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
7111
7269
|
enumerable: true,
|
|
7112
|
-
get: function () { return
|
|
7270
|
+
get: function () { return chunkUN3AZUXX_cjs.useCanCreateProjects; }
|
|
7113
7271
|
});
|
|
7114
7272
|
Object.defineProperty(exports, "useConfigs", {
|
|
7115
7273
|
enumerable: true,
|
|
7116
|
-
get: function () { return
|
|
7274
|
+
get: function () { return chunkUN3AZUXX_cjs.useConfigs; }
|
|
7117
7275
|
});
|
|
7118
7276
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
7119
7277
|
enumerable: true,
|
|
7120
|
-
get: function () { return
|
|
7278
|
+
get: function () { return chunkUN3AZUXX_cjs.useConversationThreads; }
|
|
7121
7279
|
});
|
|
7122
7280
|
Object.defineProperty(exports, "useConversations", {
|
|
7123
7281
|
enumerable: true,
|
|
7124
|
-
get: function () { return
|
|
7282
|
+
get: function () { return chunkUN3AZUXX_cjs.useConversations; }
|
|
7125
7283
|
});
|
|
7126
7284
|
Object.defineProperty(exports, "useCurrentUser", {
|
|
7127
7285
|
enumerable: true,
|
|
7128
|
-
get: function () { return
|
|
7286
|
+
get: function () { return chunkUN3AZUXX_cjs.useCurrentUser; }
|
|
7129
7287
|
});
|
|
7130
7288
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
7131
7289
|
enumerable: true,
|
|
7132
|
-
get: function () { return
|
|
7290
|
+
get: function () { return chunkUN3AZUXX_cjs.useDeleteAgents; }
|
|
7133
7291
|
});
|
|
7134
7292
|
Object.defineProperty(exports, "useDocuments", {
|
|
7135
7293
|
enumerable: true,
|
|
7136
|
-
get: function () { return
|
|
7294
|
+
get: function () { return chunkUN3AZUXX_cjs.useDocuments; }
|
|
7137
7295
|
});
|
|
7138
7296
|
Object.defineProperty(exports, "useFacts", {
|
|
7139
7297
|
enumerable: true,
|
|
7140
|
-
get: function () { return
|
|
7298
|
+
get: function () { return chunkUN3AZUXX_cjs.useFacts; }
|
|
7141
7299
|
});
|
|
7142
7300
|
Object.defineProperty(exports, "useFirmPool", {
|
|
7143
7301
|
enumerable: true,
|
|
7144
|
-
get: function () { return
|
|
7302
|
+
get: function () { return chunkUN3AZUXX_cjs.useFirmPool; }
|
|
7145
7303
|
});
|
|
7146
7304
|
Object.defineProperty(exports, "useHealth", {
|
|
7147
7305
|
enumerable: true,
|
|
7148
|
-
get: function () { return
|
|
7306
|
+
get: function () { return chunkUN3AZUXX_cjs.useHealth; }
|
|
7149
7307
|
});
|
|
7150
7308
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
7151
7309
|
enumerable: true,
|
|
7152
|
-
get: function () { return
|
|
7310
|
+
get: function () { return chunkUN3AZUXX_cjs.useParsedDocument; }
|
|
7153
7311
|
});
|
|
7154
7312
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
7155
7313
|
enumerable: true,
|
|
7156
|
-
get: function () { return
|
|
7314
|
+
get: function () { return chunkUN3AZUXX_cjs.useProjectInvoices; }
|
|
7157
7315
|
});
|
|
7158
7316
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
7159
7317
|
enumerable: true,
|
|
7160
|
-
get: function () { return
|
|
7318
|
+
get: function () { return chunkUN3AZUXX_cjs.useProjectUsage; }
|
|
7161
7319
|
});
|
|
7162
7320
|
Object.defineProperty(exports, "useProjects", {
|
|
7163
7321
|
enumerable: true,
|
|
7164
|
-
get: function () { return
|
|
7322
|
+
get: function () { return chunkUN3AZUXX_cjs.useProjects; }
|
|
7165
7323
|
});
|
|
7166
7324
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
7167
7325
|
enumerable: true,
|
|
7168
|
-
get: function () { return
|
|
7169
|
-
});
|
|
7170
|
-
Object.defineProperty(exports, "useSessions", {
|
|
7171
|
-
enumerable: true,
|
|
7172
|
-
get: function () { return chunkAFGE55RQ_cjs.useSessions; }
|
|
7326
|
+
get: function () { return chunkUN3AZUXX_cjs.useProjectsUsage; }
|
|
7173
7327
|
});
|
|
7174
7328
|
Object.defineProperty(exports, "useTags", {
|
|
7175
7329
|
enumerable: true,
|
|
7176
|
-
get: function () { return
|
|
7330
|
+
get: function () { return chunkUN3AZUXX_cjs.useTags; }
|
|
7177
7331
|
});
|
|
7178
7332
|
Object.defineProperty(exports, "useThumbnails", {
|
|
7179
7333
|
enumerable: true,
|
|
7180
|
-
get: function () { return
|
|
7334
|
+
get: function () { return chunkUN3AZUXX_cjs.useThumbnails; }
|
|
7181
7335
|
});
|
|
7182
7336
|
Object.defineProperty(exports, "useTopUpFirmPool", {
|
|
7183
7337
|
enumerable: true,
|
|
7184
|
-
get: function () { return
|
|
7338
|
+
get: function () { return chunkUN3AZUXX_cjs.useTopUpFirmPool; }
|
|
7185
7339
|
});
|
|
7186
7340
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
7187
7341
|
enumerable: true,
|
|
7188
|
-
get: function () { return
|
|
7342
|
+
get: function () { return chunkUN3AZUXX_cjs.useUserUsageToday; }
|
|
7189
7343
|
});
|
|
7190
7344
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
7191
7345
|
enumerable: true,
|
|
7192
|
-
get: function () { return
|
|
7346
|
+
get: function () { return chunkUN3AZUXX_cjs.useWorkspaceActivity; }
|
|
7193
7347
|
});
|
|
7194
7348
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
7195
7349
|
enumerable: true,
|
|
7196
|
-
get: function () { return
|
|
7350
|
+
get: function () { return chunkUN3AZUXX_cjs.useWorkspaceUsers; }
|
|
7197
7351
|
});
|
|
7198
7352
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
7199
7353
|
enumerable: true,
|
|
7200
|
-
get: function () { return
|
|
7354
|
+
get: function () { return chunkUN3AZUXX_cjs.useWorkspaces; }
|
|
7201
7355
|
});
|
|
7202
7356
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
7203
7357
|
enumerable: true,
|
|
7204
|
-
get: function () { return
|
|
7358
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftMarkdown; }
|
|
7205
7359
|
});
|
|
7206
7360
|
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
7207
7361
|
enumerable: true,
|
|
7208
|
-
get: function () { return
|
|
7362
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftWithReport; }
|
|
7209
7363
|
});
|
|
7210
7364
|
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
7211
7365
|
enumerable: true,
|
|
7212
|
-
get: function () { return
|
|
7366
|
+
get: function () { return chunkZWFMFOGP_cjs.promoteBoldTitle; }
|
|
7213
7367
|
});
|
|
7214
7368
|
Object.defineProperty(exports, "repairParsedStructure", {
|
|
7215
7369
|
enumerable: true,
|
|
7216
|
-
get: function () { return
|
|
7370
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedStructure; }
|
|
7217
7371
|
});
|
|
7218
7372
|
Object.defineProperty(exports, "repairParsedTitle", {
|
|
7219
7373
|
enumerable: true,
|
|
7220
|
-
get: function () { return
|
|
7374
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedTitle; }
|
|
7221
7375
|
});
|
|
7222
7376
|
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
7223
7377
|
enumerable: true,
|
|
7224
|
-
get: function () { return
|
|
7378
|
+
get: function () { return chunkZWFMFOGP_cjs.stripAgentPreamble; }
|
|
7225
7379
|
});
|
|
7226
7380
|
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
7227
7381
|
enumerable: true,
|
|
7228
|
-
get: function () { return
|
|
7382
|
+
get: function () { return chunkZWFMFOGP_cjs.unescapeMarkdown; }
|
|
7229
7383
|
});
|
|
7230
7384
|
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
7231
7385
|
enumerable: true,
|
|
7232
|
-
get: function () { return
|
|
7386
|
+
get: function () { return chunkZWFMFOGP_cjs.unwrapCitationLinks; }
|
|
7233
7387
|
});
|
|
7234
7388
|
Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
|
|
7235
7389
|
enumerable: true,
|
|
7236
|
-
get: function () { return
|
|
7390
|
+
get: function () { return chunk6PPWZILQ_cjs.DEFAULT_NOTIFY_TONE; }
|
|
7237
7391
|
});
|
|
7238
7392
|
Object.defineProperty(exports, "NotificationBell", {
|
|
7239
7393
|
enumerable: true,
|
|
7240
|
-
get: function () { return
|
|
7394
|
+
get: function () { return chunk6PPWZILQ_cjs.NotificationBell; }
|
|
7241
7395
|
});
|
|
7242
7396
|
Object.defineProperty(exports, "Toaster", {
|
|
7243
7397
|
enumerable: true,
|
|
7244
|
-
get: function () { return
|
|
7398
|
+
get: function () { return chunk6PPWZILQ_cjs.Toaster; }
|
|
7245
7399
|
});
|
|
7246
7400
|
Object.defineProperty(exports, "formatRelativeTime", {
|
|
7247
7401
|
enumerable: true,
|
|
7248
|
-
get: function () { return
|
|
7402
|
+
get: function () { return chunk6PPWZILQ_cjs.formatRelativeTime; }
|
|
7249
7403
|
});
|
|
7250
7404
|
Object.defineProperty(exports, "notify", {
|
|
7251
7405
|
enumerable: true,
|
|
7252
|
-
get: function () { return
|
|
7406
|
+
get: function () { return chunk6PPWZILQ_cjs.notify; }
|
|
7253
7407
|
});
|
|
7254
7408
|
Object.defineProperty(exports, "seedNotifications", {
|
|
7255
7409
|
enumerable: true,
|
|
7256
|
-
get: function () { return
|
|
7410
|
+
get: function () { return chunk6PPWZILQ_cjs.seedNotifications; }
|
|
7257
7411
|
});
|
|
7258
7412
|
Object.defineProperty(exports, "selectUnread", {
|
|
7259
7413
|
enumerable: true,
|
|
7260
|
-
get: function () { return
|
|
7414
|
+
get: function () { return chunk6PPWZILQ_cjs.selectUnread; }
|
|
7261
7415
|
});
|
|
7262
7416
|
Object.defineProperty(exports, "toast", {
|
|
7263
7417
|
enumerable: true,
|
|
7264
|
-
get: function () { return
|
|
7418
|
+
get: function () { return chunk6PPWZILQ_cjs.toast; }
|
|
7265
7419
|
});
|
|
7266
7420
|
Object.defineProperty(exports, "useNotify", {
|
|
7267
7421
|
enumerable: true,
|
|
7268
|
-
get: function () { return
|
|
7422
|
+
get: function () { return chunk6PPWZILQ_cjs.useNotify; }
|
|
7269
7423
|
});
|
|
7270
7424
|
Object.defineProperty(exports, "AUDIO_MIME_PREFERENCE", {
|
|
7271
7425
|
enumerable: true,
|
|
@@ -8047,11 +8201,13 @@ Object.defineProperty(exports, "isMessageType", {
|
|
|
8047
8201
|
enumerable: true,
|
|
8048
8202
|
get: function () { return client.isMessageType; }
|
|
8049
8203
|
});
|
|
8204
|
+
exports.AccountClientProvider = AccountClientProvider;
|
|
8050
8205
|
exports.ActivityFeed = ActivityFeed;
|
|
8051
8206
|
exports.AiActionCard = AiActionCard;
|
|
8052
8207
|
exports.AiAnswer = AiAnswer;
|
|
8053
8208
|
exports.AppleIcon = AppleIcon;
|
|
8054
8209
|
exports.ArbiBotIcon = ArbiBotIcon;
|
|
8210
|
+
exports.ArbiSessionStateProvider = ArbiSessionStateProvider;
|
|
8055
8211
|
exports.ArbiWebSocketProvider = ArbiWebSocketProvider;
|
|
8056
8212
|
exports.ArtifactCanvas = ArtifactCanvas;
|
|
8057
8213
|
exports.ChatBubble = ChatBubble;
|
|
@@ -8074,6 +8230,7 @@ exports.DocumentGallery = DocumentGallery;
|
|
|
8074
8230
|
exports.DocumentReview = DocumentReview;
|
|
8075
8231
|
exports.DocumentTable = DocumentTable;
|
|
8076
8232
|
exports.DraftTitleControls = DraftTitleControls;
|
|
8233
|
+
exports.EMPTY_SESSION_STATE = EMPTY_SESSION_STATE;
|
|
8077
8234
|
exports.FileIcon = FileIcon;
|
|
8078
8235
|
exports.FireworksIcon = FireworksIcon;
|
|
8079
8236
|
exports.GeminiIcon = GeminiIcon;
|
|
@@ -8102,8 +8259,10 @@ exports.accountPath = accountPath;
|
|
|
8102
8259
|
exports.aliasTakenMessage = aliasTakenMessage;
|
|
8103
8260
|
exports.annotateThread = annotateThread;
|
|
8104
8261
|
exports.announceMailDraftReplaced = announceMailDraftReplaced;
|
|
8262
|
+
exports.arbiAccountClient = arbiAccountClient;
|
|
8105
8263
|
exports.arbiMailClient = arbiMailClient;
|
|
8106
8264
|
exports.captureFrameAsBlob = captureFrameAsBlob;
|
|
8265
|
+
exports.createArbiSessionStore = createArbiSessionStore;
|
|
8107
8266
|
exports.createMailClient = createMailClient;
|
|
8108
8267
|
exports.cropImage = cropImage;
|
|
8109
8268
|
exports.dayKey = dayKey;
|
|
@@ -8126,11 +8285,14 @@ exports.mailJson = mailJson;
|
|
|
8126
8285
|
exports.mailQueryKeys = mailQueryKeys;
|
|
8127
8286
|
exports.mountDiditVerification = mountDiditVerification;
|
|
8128
8287
|
exports.nextAliasSuggestion = nextAliasSuggestion;
|
|
8288
|
+
exports.nextViewingDocument = nextViewingDocument;
|
|
8129
8289
|
exports.parseActivityContent = parseActivityContent;
|
|
8130
8290
|
exports.parseDeleteAccountBlockers = parseDeleteAccountBlockers;
|
|
8131
8291
|
exports.pickRecentWorkspaces = pickRecentWorkspaces;
|
|
8132
8292
|
exports.redlineStats = redlineStats;
|
|
8133
8293
|
exports.resolveActiveWorkspace = resolveActiveWorkspace;
|
|
8294
|
+
exports.selectIsGenerating = selectIsGenerating;
|
|
8295
|
+
exports.selectViewingDocumentId = selectViewingDocumentId;
|
|
8134
8296
|
exports.textToArtifact = textToArtifact;
|
|
8135
8297
|
exports.titleFromQuestion = titleFromQuestion;
|
|
8136
8298
|
exports.toChatCitations = toChatCitations;
|
|
@@ -8138,6 +8300,7 @@ exports.toNotificationPreferences = toNotificationPreferences;
|
|
|
8138
8300
|
exports.toProfileView = toProfileView;
|
|
8139
8301
|
exports.toRedlineMarkdown = toRedlineMarkdown;
|
|
8140
8302
|
exports.toShellWorkspace = toShellWorkspace;
|
|
8303
|
+
exports.useAccountClient = useAccountClient;
|
|
8141
8304
|
exports.useActOnStep = useActOnStep;
|
|
8142
8305
|
exports.useAgentChats = useAgentChats;
|
|
8143
8306
|
exports.useAgentConfig = useAgentConfig;
|
|
@@ -8148,8 +8311,9 @@ exports.useAiTask = useAiTask;
|
|
|
8148
8311
|
exports.useArbiChat = useArbiChat;
|
|
8149
8312
|
exports.useArbiConnected = useArbiConnected;
|
|
8150
8313
|
exports.useArbiDocumentSync = useArbiDocumentSync;
|
|
8314
|
+
exports.useArbiSessionState = useArbiSessionState;
|
|
8315
|
+
exports.useArbiSessionStore = useArbiSessionStore;
|
|
8151
8316
|
exports.useArbiShellWorkspaces = useArbiShellWorkspaces;
|
|
8152
|
-
exports.useArbiUiStore = useArbiUiStore;
|
|
8153
8317
|
exports.useArbiWebSocket = useArbiWebSocket;
|
|
8154
8318
|
exports.useArbiWsContext = useArbiWsContext;
|
|
8155
8319
|
exports.useArbiWsMessage = useArbiWsMessage;
|
|
@@ -8187,7 +8351,6 @@ exports.useIdentityVerification = useIdentityVerification;
|
|
|
8187
8351
|
exports.useIdentityVerificationFlow = useIdentityVerificationFlow;
|
|
8188
8352
|
exports.useInvalidateTagData = useInvalidateTagData;
|
|
8189
8353
|
exports.useInviteContacts = useInviteContacts;
|
|
8190
|
-
exports.useLogoutAllSessions = useLogoutAllSessions;
|
|
8191
8354
|
exports.useMailAccounts = useMailAccounts;
|
|
8192
8355
|
exports.useMailCache = useMailCache;
|
|
8193
8356
|
exports.useMailClient = useMailClient;
|
|
@@ -8219,8 +8382,10 @@ exports.useSaveMailDraft = useSaveMailDraft;
|
|
|
8219
8382
|
exports.useSemanticSearch = useSemanticSearch;
|
|
8220
8383
|
exports.useSendBackStep = useSendBackStep;
|
|
8221
8384
|
exports.useSendMail = useSendMail;
|
|
8385
|
+
exports.useSessions = useSessions;
|
|
8222
8386
|
exports.useSetTagValues = useSetTagValues;
|
|
8223
8387
|
exports.useShellWorkspaces = useShellWorkspaces;
|
|
8388
|
+
exports.useSignOut = useSignOut;
|
|
8224
8389
|
exports.useSkills = useSkills;
|
|
8225
8390
|
exports.useStartAgentSession = useStartAgentSession;
|
|
8226
8391
|
exports.useStartWorkQuery = useStartWorkQuery;
|