@arbidocs/react 0.4.131 → 0.4.133
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 +55 -56
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +4 -6
- 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-BUFDJCDS.js → chunk-CPPBN2JB.js} +9 -7
- package/dist/chunk-CPPBN2JB.js.map +1 -0
- package/dist/{chunk-UN3AZUXX.cjs → chunk-E5XFVK4I.cjs} +42 -29
- package/dist/chunk-E5XFVK4I.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-XIDDXD5Y.cjs → chunk-R2MF7YCW.cjs} +9 -7
- package/dist/chunk-R2MF7YCW.cjs.map +1 -0
- package/dist/{chunk-XV7EOUQM.js → chunk-T253I7XC.js} +17 -5
- package/dist/chunk-T253I7XC.js.map +1 -0
- package/dist/{chunk-S7J5SCTZ.cjs → chunk-TYUQFRHF.cjs} +4 -4
- package/dist/{chunk-S7J5SCTZ.cjs.map → chunk-TYUQFRHF.cjs.map} +1 -1
- package/dist/{chunk-6JSXDLIQ.js → chunk-ZJ6NQ4M4.js} +3 -3
- package/dist/{chunk-6JSXDLIQ.js.map → chunk-ZJ6NQ4M4.js.map} +1 -1
- package/dist/{chunk-5DCRIWCA.cjs → chunk-ZWFMFOGP.cjs} +68 -2
- package/dist/chunk-ZWFMFOGP.cjs.map +1 -0
- package/dist/document-tools/index.cjs +26 -27
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +4 -5
- package/dist/document-tools/index.js.map +1 -1
- package/dist/{index-C7OqcKY3.d.cts → index-D8NvRj3J.d.cts} +16 -7
- package/dist/{index-C7OqcKY3.d.ts → index-D8NvRj3J.d.ts} +16 -7
- package/dist/index.cjs +372 -225
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +174 -23
- package/dist/index.d.ts +174 -23
- package/dist/index.js +173 -40
- 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/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5DCRIWCA.cjs.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-BOJHNPNJ.cjs.map +0 -1
- package/dist/chunk-BUFDJCDS.js.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/chunk-UN3AZUXX.cjs.map +0 -1
- package/dist/chunk-XIDDXD5Y.cjs.map +0 -1
- package/dist/chunk-XV7EOUQM.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
3
|
+
var chunkE5XFVK4I_cjs = require('./chunk-E5XFVK4I.cjs');
|
|
4
|
+
var chunkTYUQFRHF_cjs = require('./chunk-TYUQFRHF.cjs');
|
|
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');
|
|
@@ -12,7 +13,7 @@ var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
|
|
|
12
13
|
var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
|
|
13
14
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
14
15
|
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
15
|
-
var
|
|
16
|
+
var chunkR2MF7YCW_cjs = require('./chunk-R2MF7YCW.cjs');
|
|
16
17
|
var React = require('react');
|
|
17
18
|
var reactQuery = require('@tanstack/react-query');
|
|
18
19
|
var browser = require('@arbidocs/sdk/browser');
|
|
@@ -35,45 +36,45 @@ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
|
35
36
|
var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
|
|
36
37
|
|
|
37
38
|
function useUpdateConversation() {
|
|
38
|
-
const arbi =
|
|
39
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
39
40
|
const qc = reactQuery.useQueryClient();
|
|
40
41
|
return reactQuery.useMutation({
|
|
41
42
|
mutationFn: ({
|
|
42
43
|
conversationId,
|
|
43
44
|
patch
|
|
44
45
|
}) => arbi.conversations.update(conversationId, patch),
|
|
45
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
46
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function useCreateWork() {
|
|
49
|
-
const arbi =
|
|
50
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
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: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
function useRunConversation() {
|
|
57
|
-
const arbi =
|
|
58
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
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: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
function useActOnStep() {
|
|
65
|
-
const arbi =
|
|
66
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
66
67
|
const qc = reactQuery.useQueryClient();
|
|
67
68
|
return reactQuery.useMutation({
|
|
68
69
|
mutationFn: ({
|
|
69
70
|
conversationId,
|
|
70
71
|
body
|
|
71
72
|
}) => arbi.conversations.actOnStep(conversationId, body),
|
|
72
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
73
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
function useSendBackStep() {
|
|
76
|
-
const arbi =
|
|
77
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
77
78
|
const qc = reactQuery.useQueryClient();
|
|
78
79
|
return reactQuery.useMutation({
|
|
79
80
|
mutationFn: ({
|
|
@@ -82,106 +83,143 @@ 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: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
function usePlanWork() {
|
|
89
|
-
const arbi =
|
|
90
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
90
91
|
return reactQuery.useMutation({
|
|
91
92
|
mutationFn: (body) => arbi.conversations.plan(body)
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
function useConversationPendingAuth(conversationId, options) {
|
|
95
|
-
const arbi =
|
|
96
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
96
97
|
return reactQuery.useQuery({
|
|
97
|
-
queryKey: [...
|
|
98
|
+
queryKey: [...chunkE5XFVK4I_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
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
function useConversationActivity(conversationId, options) {
|
|
104
|
-
const arbi =
|
|
105
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
105
106
|
return reactQuery.useQuery({
|
|
106
|
-
queryKey:
|
|
107
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.conversationActivity(conversationId ?? ""),
|
|
107
108
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
108
109
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
109
110
|
refetchInterval: options?.live ? 2500 : false
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
113
|
function useWorkflows(options) {
|
|
113
|
-
const arbi =
|
|
114
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
114
115
|
return reactQuery.useQuery({
|
|
115
|
-
queryKey:
|
|
116
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflows(),
|
|
116
117
|
queryFn: () => arbi.workflows.list(),
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
// A clock or event can fire while the list is open, without a write here.
|
|
119
|
+
refetchInterval: options?.live ? 1e4 : false,
|
|
120
|
+
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function useWorkflowRuns(workflowId) {
|
|
124
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
125
|
+
return reactQuery.useQuery({
|
|
126
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflowRuns(workflowId ?? ""),
|
|
127
|
+
queryFn: () => arbi.workflows.runs(workflowId),
|
|
128
|
+
enabled: !!workflowId && arbi.isLoggedIn,
|
|
129
|
+
refetchInterval: 3e3,
|
|
130
|
+
staleTime: 0,
|
|
131
|
+
refetchOnMount: "always"
|
|
119
132
|
});
|
|
120
133
|
}
|
|
121
134
|
function useCreateWorkflow() {
|
|
122
|
-
const arbi =
|
|
135
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
123
136
|
const qc = reactQuery.useQueryClient();
|
|
124
137
|
return reactQuery.useMutation({
|
|
125
138
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
126
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
139
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflows() })
|
|
127
140
|
});
|
|
128
141
|
}
|
|
129
142
|
function useUpdateWorkflow() {
|
|
130
|
-
const arbi =
|
|
143
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
131
144
|
const qc = reactQuery.useQueryClient();
|
|
132
145
|
return reactQuery.useMutation({
|
|
133
146
|
mutationFn: ({
|
|
134
147
|
workflowId,
|
|
135
148
|
patch
|
|
136
149
|
}) => arbi.workflows.update(workflowId, patch),
|
|
137
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
150
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflows() })
|
|
138
151
|
});
|
|
139
152
|
}
|
|
140
153
|
function useDeleteWorkflow() {
|
|
141
|
-
const arbi =
|
|
154
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
142
155
|
const qc = reactQuery.useQueryClient();
|
|
143
156
|
return reactQuery.useMutation({
|
|
144
157
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
145
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
158
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflows() })
|
|
146
159
|
});
|
|
147
160
|
}
|
|
148
161
|
function useRunWorkflow() {
|
|
149
|
-
const arbi =
|
|
162
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
150
163
|
const qc = reactQuery.useQueryClient();
|
|
151
164
|
return reactQuery.useMutation({
|
|
165
|
+
mutationKey: chunkE5XFVK4I_cjs.arbiMutationKeys.runWorkflow(),
|
|
152
166
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
153
167
|
onSuccess: () => Promise.all([
|
|
154
|
-
qc.invalidateQueries({ queryKey:
|
|
155
|
-
qc.invalidateQueries({ queryKey:
|
|
168
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workflows() }),
|
|
169
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
156
170
|
])
|
|
157
171
|
});
|
|
158
172
|
}
|
|
159
173
|
function useCreateAgent() {
|
|
160
|
-
const arbi =
|
|
174
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
161
175
|
const qc = reactQuery.useQueryClient();
|
|
162
176
|
return reactQuery.useMutation({
|
|
163
177
|
mutationFn: (name) => arbi.agents.create(name),
|
|
164
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
178
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agents() })
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function useGenerateAgentAvatar() {
|
|
182
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
183
|
+
const qc = reactQuery.useQueryClient();
|
|
184
|
+
return reactQuery.useMutation({
|
|
185
|
+
mutationFn: ({ agentExtId, prompt }) => arbi.agents.generateAvatar(agentExtId, prompt),
|
|
186
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agents() })
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function useAuthorizeLimits(options) {
|
|
190
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
191
|
+
return reactQuery.useQuery({
|
|
192
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.authorizeLimits(),
|
|
193
|
+
queryFn: () => arbi.agents.authorizeLimits(),
|
|
194
|
+
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function useMcpTools(options) {
|
|
198
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
199
|
+
return reactQuery.useQuery({
|
|
200
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.mcpTools(),
|
|
201
|
+
queryFn: () => arbi.health.mcpTools(),
|
|
202
|
+
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
165
203
|
});
|
|
166
204
|
}
|
|
167
205
|
function useAgentConfig(agentExtId, options) {
|
|
168
|
-
const arbi =
|
|
206
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
169
207
|
return reactQuery.useQuery({
|
|
170
|
-
queryKey:
|
|
208
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
171
209
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
172
210
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
173
211
|
});
|
|
174
212
|
}
|
|
175
213
|
function useAgentModels(options) {
|
|
176
|
-
const arbi =
|
|
214
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
177
215
|
return reactQuery.useQuery({
|
|
178
|
-
queryKey:
|
|
216
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.models(),
|
|
179
217
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
180
218
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
181
219
|
});
|
|
182
220
|
}
|
|
183
221
|
function useSaveAgentConfig() {
|
|
184
|
-
const arbi =
|
|
222
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
185
223
|
const qc = reactQuery.useQueryClient();
|
|
186
224
|
return reactQuery.useMutation({
|
|
187
225
|
mutationFn: async ({ agentExtId, title, sections }) => {
|
|
@@ -198,23 +236,23 @@ function useSaveAgentConfig() {
|
|
|
198
236
|
});
|
|
199
237
|
},
|
|
200
238
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
201
|
-
qc.invalidateQueries({ queryKey:
|
|
202
|
-
qc.invalidateQueries({ queryKey:
|
|
239
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.configs() }),
|
|
240
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
203
241
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
204
|
-
qc.invalidateQueries({ queryKey:
|
|
242
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agents() })
|
|
205
243
|
])
|
|
206
244
|
});
|
|
207
245
|
}
|
|
208
246
|
function useAgentWorkspaces(agentExtId, options) {
|
|
209
|
-
const arbi =
|
|
247
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
210
248
|
return reactQuery.useQuery({
|
|
211
|
-
queryKey:
|
|
249
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
212
250
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
213
251
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
214
252
|
});
|
|
215
253
|
}
|
|
216
254
|
function useGrantAgentAccess() {
|
|
217
|
-
const arbi =
|
|
255
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
218
256
|
const qc = reactQuery.useQueryClient();
|
|
219
257
|
return reactQuery.useMutation({
|
|
220
258
|
mutationFn: async ({
|
|
@@ -229,11 +267,11 @@ function useGrantAgentAccess() {
|
|
|
229
267
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
230
268
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
231
269
|
},
|
|
232
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
270
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
233
271
|
});
|
|
234
272
|
}
|
|
235
273
|
function useRevokeAgentAccess() {
|
|
236
|
-
const arbi =
|
|
274
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
237
275
|
const qc = reactQuery.useQueryClient();
|
|
238
276
|
return reactQuery.useMutation({
|
|
239
277
|
mutationFn: async ({
|
|
@@ -248,13 +286,13 @@ function useRevokeAgentAccess() {
|
|
|
248
286
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
249
287
|
}
|
|
250
288
|
},
|
|
251
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
289
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
252
290
|
});
|
|
253
291
|
}
|
|
254
292
|
function useSkills(options) {
|
|
255
|
-
const arbi =
|
|
293
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
256
294
|
return reactQuery.useQuery({
|
|
257
|
-
queryKey: [...
|
|
295
|
+
queryKey: [...chunkE5XFVK4I_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
258
296
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
259
297
|
refetchInterval: options?.live ? 5e3 : false,
|
|
260
298
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -262,7 +300,7 @@ function useSkills(options) {
|
|
|
262
300
|
});
|
|
263
301
|
}
|
|
264
302
|
function useUploadSkillFiles() {
|
|
265
|
-
const arbi =
|
|
303
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
266
304
|
const qc = reactQuery.useQueryClient();
|
|
267
305
|
return reactQuery.useMutation({
|
|
268
306
|
mutationFn: async (entries) => {
|
|
@@ -285,11 +323,11 @@ function useUploadSkillFiles() {
|
|
|
285
323
|
}
|
|
286
324
|
return results;
|
|
287
325
|
},
|
|
288
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
326
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.skills() })
|
|
289
327
|
});
|
|
290
328
|
}
|
|
291
329
|
function useStartWorkQuery() {
|
|
292
|
-
const arbi =
|
|
330
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
293
331
|
const qc = reactQuery.useQueryClient();
|
|
294
332
|
return reactQuery.useMutation({
|
|
295
333
|
mutationFn: async ({
|
|
@@ -312,41 +350,51 @@ function useStartWorkQuery() {
|
|
|
312
350
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
313
351
|
);
|
|
314
352
|
},
|
|
315
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
353
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.allConversations() })
|
|
316
354
|
});
|
|
317
355
|
}
|
|
318
356
|
function useAgentSession(agentId, options) {
|
|
319
|
-
const arbi =
|
|
357
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
320
358
|
return reactQuery.useQuery({
|
|
321
|
-
queryKey:
|
|
359
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentSession(agentId ?? ""),
|
|
322
360
|
queryFn: () => arbi.agents.getSession(agentId),
|
|
323
361
|
enabled: !!agentId && arbi.isLoggedIn && (options?.enabled ?? true),
|
|
324
362
|
refetchInterval: 5e3
|
|
325
363
|
});
|
|
326
364
|
}
|
|
327
365
|
function useAgentChats(agentId) {
|
|
328
|
-
const arbi =
|
|
366
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
329
367
|
return reactQuery.useQuery({
|
|
330
|
-
queryKey:
|
|
368
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.agentChats(agentId ?? ""),
|
|
331
369
|
queryFn: () => arbi.agents.listChats(agentId),
|
|
332
370
|
enabled: !!agentId && arbi.isLoggedIn,
|
|
333
371
|
refetchInterval: 5e3
|
|
334
372
|
});
|
|
335
373
|
}
|
|
374
|
+
function refreshAgentSession(qc, agentId) {
|
|
375
|
+
return Promise.all(
|
|
376
|
+
[
|
|
377
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.agentSession(agentId),
|
|
378
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.agentWorkspaces(agentId),
|
|
379
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.agentChats(agentId),
|
|
380
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.sessions()
|
|
381
|
+
].map((queryKey) => qc.invalidateQueries({ queryKey }))
|
|
382
|
+
);
|
|
383
|
+
}
|
|
336
384
|
function useStartAgentSession() {
|
|
337
|
-
const arbi =
|
|
338
|
-
const
|
|
385
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
386
|
+
const qc = reactQuery.useQueryClient();
|
|
339
387
|
return reactQuery.useMutation({
|
|
340
388
|
mutationFn: ({ agentId, workspaceId }) => arbi.agents.startSession(agentId, workspaceId),
|
|
341
|
-
onSuccess: () =>
|
|
389
|
+
onSuccess: (_session, { agentId }) => refreshAgentSession(qc, agentId)
|
|
342
390
|
});
|
|
343
391
|
}
|
|
344
392
|
function useCloseAgentSession() {
|
|
345
|
-
const arbi =
|
|
346
|
-
const
|
|
393
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
394
|
+
const qc = reactQuery.useQueryClient();
|
|
347
395
|
return reactQuery.useMutation({
|
|
348
396
|
mutationFn: (agentId) => arbi.agents.closeSession(agentId),
|
|
349
|
-
onSuccess: () =>
|
|
397
|
+
onSuccess: (_result, agentId) => refreshAgentSession(qc, agentId)
|
|
350
398
|
});
|
|
351
399
|
}
|
|
352
400
|
function previewText(content) {
|
|
@@ -475,9 +523,9 @@ function useArbiChat(options = {}) {
|
|
|
475
523
|
});
|
|
476
524
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
477
525
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
478
|
-
const arbi =
|
|
479
|
-
const { data: docs = [], isLoading: isLoadingDocuments, refetch } =
|
|
480
|
-
const ordinaryHistory =
|
|
526
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
527
|
+
const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkE5XFVK4I_cjs.useDocuments(workspaceId);
|
|
528
|
+
const ordinaryHistory = chunkE5XFVK4I_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
481
529
|
const agentHistory = useAgentChats(agentId);
|
|
482
530
|
const stored = React.useMemo(
|
|
483
531
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -492,7 +540,7 @@ function useArbiChat(options = {}) {
|
|
|
492
540
|
);
|
|
493
541
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
494
542
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
495
|
-
const query =
|
|
543
|
+
const query = chunkE5XFVK4I_cjs.useAssistantQuery();
|
|
496
544
|
const { mutateAsync } = query;
|
|
497
545
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
498
546
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -552,7 +600,7 @@ function useArbiChat(options = {}) {
|
|
|
552
600
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
553
601
|
) || active.messages.some((message) => message.status === "streaming");
|
|
554
602
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
555
|
-
const loaded =
|
|
603
|
+
const loaded = chunkE5XFVK4I_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
556
604
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
557
605
|
live: liveHistory
|
|
558
606
|
});
|
|
@@ -1221,7 +1269,7 @@ function useArbiWsContext() {
|
|
|
1221
1269
|
return ctx;
|
|
1222
1270
|
}
|
|
1223
1271
|
function ArbiWebSocketProvider({ enabled = true, children }) {
|
|
1224
|
-
const arbi =
|
|
1272
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1225
1273
|
const subscribersRef = React.useRef(/* @__PURE__ */ new Set());
|
|
1226
1274
|
const setStatus = useArbiWsStore((s) => s.setStatus);
|
|
1227
1275
|
const applyTaskUpdate = useArbiWsStore((s) => s.applyTaskUpdate);
|
|
@@ -1333,14 +1381,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1333
1381
|
if (!workspaceId) return;
|
|
1334
1382
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1335
1383
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1336
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1337
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1384
|
+
void queryClient.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1385
|
+
void queryClient.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1338
1386
|
return;
|
|
1339
1387
|
}
|
|
1340
1388
|
if (client.isMessageType(msg, "task_update")) {
|
|
1341
1389
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1342
1390
|
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1343
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1391
|
+
void queryClient.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1344
1392
|
}
|
|
1345
1393
|
}
|
|
1346
1394
|
});
|
|
@@ -1468,8 +1516,8 @@ function useShellWorkspaces(options) {
|
|
|
1468
1516
|
};
|
|
1469
1517
|
}
|
|
1470
1518
|
function useArbiShellWorkspaces(options = {}) {
|
|
1471
|
-
const arbi =
|
|
1472
|
-
const query =
|
|
1519
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1520
|
+
const query = chunkE5XFVK4I_cjs.useWorkspaces();
|
|
1473
1521
|
const { select, ...rest } = options;
|
|
1474
1522
|
const defaultSelect = React.useCallback(
|
|
1475
1523
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1485,12 +1533,12 @@ function useArbiShellWorkspaces(options = {}) {
|
|
|
1485
1533
|
}
|
|
1486
1534
|
function invalidateTagData(qc, workspaceId) {
|
|
1487
1535
|
return Promise.all([
|
|
1488
|
-
qc.invalidateQueries({ queryKey:
|
|
1489
|
-
qc.invalidateQueries({ queryKey:
|
|
1536
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.tags(workspaceId) }),
|
|
1537
|
+
qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.facts(workspaceId) })
|
|
1490
1538
|
]);
|
|
1491
1539
|
}
|
|
1492
1540
|
function useInvalidateTagData() {
|
|
1493
|
-
const arbi =
|
|
1541
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1494
1542
|
const qc = reactQuery.useQueryClient();
|
|
1495
1543
|
return React.useCallback(() => {
|
|
1496
1544
|
const workspaceId = arbi.getWorkspaceId();
|
|
@@ -1498,16 +1546,16 @@ function useInvalidateTagData() {
|
|
|
1498
1546
|
}, [arbi, qc]);
|
|
1499
1547
|
}
|
|
1500
1548
|
function useTagKindSchema(kind, options) {
|
|
1501
|
-
const arbi =
|
|
1549
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1502
1550
|
const workspaceId = arbi.getWorkspaceId() ?? "";
|
|
1503
1551
|
return reactQuery.useQuery({
|
|
1504
|
-
queryKey:
|
|
1552
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
|
|
1505
1553
|
queryFn: () => arbi.tagKinds.get(kind),
|
|
1506
1554
|
enabled: (options?.enabled ?? true) && !!kind && !!workspaceId && arbi.hasWorkspace
|
|
1507
1555
|
});
|
|
1508
1556
|
}
|
|
1509
1557
|
function useUpdateTagKindSchema() {
|
|
1510
|
-
const arbi =
|
|
1558
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1511
1559
|
const qc = reactQuery.useQueryClient();
|
|
1512
1560
|
return reactQuery.useMutation({
|
|
1513
1561
|
mutationFn: ({
|
|
@@ -1517,13 +1565,13 @@ function useUpdateTagKindSchema() {
|
|
|
1517
1565
|
onSuccess: (schema) => {
|
|
1518
1566
|
const workspaceId = arbi.getWorkspaceId();
|
|
1519
1567
|
if (!workspaceId) return;
|
|
1520
|
-
qc.setQueryData(
|
|
1568
|
+
qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
|
|
1521
1569
|
return invalidateTagData(qc, workspaceId);
|
|
1522
1570
|
}
|
|
1523
1571
|
});
|
|
1524
1572
|
}
|
|
1525
1573
|
function useSetTagValues() {
|
|
1526
|
-
const arbi =
|
|
1574
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1527
1575
|
const qc = reactQuery.useQueryClient();
|
|
1528
1576
|
return reactQuery.useMutation({
|
|
1529
1577
|
mutationFn: ({
|
|
@@ -1534,29 +1582,29 @@ function useSetTagValues() {
|
|
|
1534
1582
|
});
|
|
1535
1583
|
}
|
|
1536
1584
|
function useFilteredProjects(filters, options) {
|
|
1537
|
-
const arbi =
|
|
1585
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1538
1586
|
return reactQuery.useQuery({
|
|
1539
|
-
queryKey:
|
|
1587
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
1540
1588
|
queryFn: () => arbi.projects.list(filters),
|
|
1541
1589
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1542
1590
|
});
|
|
1543
1591
|
}
|
|
1544
1592
|
function useUpdateProjectFields() {
|
|
1545
|
-
const arbi =
|
|
1593
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1546
1594
|
const qc = reactQuery.useQueryClient();
|
|
1547
1595
|
return reactQuery.useMutation({
|
|
1548
1596
|
mutationFn: ({
|
|
1549
1597
|
projectExtId,
|
|
1550
1598
|
patch
|
|
1551
1599
|
}) => arbi.projects.update(projectExtId, patch),
|
|
1552
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1600
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.projects() })
|
|
1553
1601
|
});
|
|
1554
1602
|
}
|
|
1555
1603
|
function useProjectEvents(projectExtId, options) {
|
|
1556
|
-
const arbi =
|
|
1604
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1557
1605
|
return reactQuery.useQuery({
|
|
1558
1606
|
queryKey: [
|
|
1559
|
-
...
|
|
1607
|
+
...chunkE5XFVK4I_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
1560
1608
|
options?.kind ?? "all",
|
|
1561
1609
|
options?.limit ?? "default"
|
|
1562
1610
|
],
|
|
@@ -1565,26 +1613,26 @@ function useProjectEvents(projectExtId, options) {
|
|
|
1565
1613
|
});
|
|
1566
1614
|
}
|
|
1567
1615
|
function useConversationUsage(conversationId, options) {
|
|
1568
|
-
const arbi =
|
|
1616
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1569
1617
|
return reactQuery.useQuery({
|
|
1570
|
-
queryKey:
|
|
1618
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
1571
1619
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
1572
1620
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
1573
1621
|
refetchInterval: options?.live ? 1e4 : false
|
|
1574
1622
|
});
|
|
1575
1623
|
}
|
|
1576
1624
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
1577
|
-
const arbi =
|
|
1625
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1578
1626
|
return reactQuery.useQuery({
|
|
1579
|
-
queryKey:
|
|
1627
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
1580
1628
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
1581
1629
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1582
1630
|
});
|
|
1583
1631
|
}
|
|
1584
1632
|
function useContacts(options) {
|
|
1585
|
-
const arbi =
|
|
1633
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1586
1634
|
return reactQuery.useQuery({
|
|
1587
|
-
queryKey:
|
|
1635
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.contacts(),
|
|
1588
1636
|
queryFn: () => arbi.contacts.list(),
|
|
1589
1637
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1590
1638
|
});
|
|
@@ -1599,10 +1647,10 @@ function usePendingContacts(options) {
|
|
|
1599
1647
|
}
|
|
1600
1648
|
function useInvalidateContacts() {
|
|
1601
1649
|
const qc = reactQuery.useQueryClient();
|
|
1602
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1650
|
+
return () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.contacts() });
|
|
1603
1651
|
}
|
|
1604
1652
|
function useInviteContacts() {
|
|
1605
|
-
const arbi =
|
|
1653
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1606
1654
|
const invalidate = useInvalidateContacts();
|
|
1607
1655
|
return reactQuery.useMutation({
|
|
1608
1656
|
mutationFn: (emails) => arbi.contacts.invite(emails),
|
|
@@ -1610,7 +1658,7 @@ function useInviteContacts() {
|
|
|
1610
1658
|
});
|
|
1611
1659
|
}
|
|
1612
1660
|
function useCreateContact() {
|
|
1613
|
-
const arbi =
|
|
1661
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1614
1662
|
const invalidate = useInvalidateContacts();
|
|
1615
1663
|
return reactQuery.useMutation({
|
|
1616
1664
|
mutationFn: (body) => arbi.contacts.create(body),
|
|
@@ -1618,7 +1666,7 @@ function useCreateContact() {
|
|
|
1618
1666
|
});
|
|
1619
1667
|
}
|
|
1620
1668
|
function useUpdateContact() {
|
|
1621
|
-
const arbi =
|
|
1669
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1622
1670
|
const invalidate = useInvalidateContacts();
|
|
1623
1671
|
return reactQuery.useMutation({
|
|
1624
1672
|
mutationFn: ({ id, card }) => arbi.contacts.update(id, card),
|
|
@@ -1626,7 +1674,7 @@ function useUpdateContact() {
|
|
|
1626
1674
|
});
|
|
1627
1675
|
}
|
|
1628
1676
|
function useDeleteContact() {
|
|
1629
|
-
const arbi =
|
|
1677
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1630
1678
|
const invalidate = useInvalidateContacts();
|
|
1631
1679
|
return reactQuery.useMutation({
|
|
1632
1680
|
mutationFn: (contactId) => arbi.contacts.delete(contactId),
|
|
@@ -1710,7 +1758,7 @@ function AccountClientProvider({
|
|
|
1710
1758
|
}
|
|
1711
1759
|
function useAccountClient() {
|
|
1712
1760
|
const provided = React.useContext(AccountClientContext);
|
|
1713
|
-
const arbi = React.useContext(
|
|
1761
|
+
const arbi = React.useContext(chunkR2MF7YCW_cjs.ArbiContext);
|
|
1714
1762
|
const fallback = React.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
|
|
1715
1763
|
if (provided) return provided;
|
|
1716
1764
|
if (!arbi || !fallback) return NO_ACCOUNT;
|
|
@@ -1728,11 +1776,11 @@ function useProfile(options) {
|
|
|
1728
1776
|
const { client, enabled } = useAccountClient();
|
|
1729
1777
|
const qc = reactQuery.useQueryClient();
|
|
1730
1778
|
React.useEffect(
|
|
1731
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
1779
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
1732
1780
|
[client, qc]
|
|
1733
1781
|
);
|
|
1734
1782
|
return reactQuery.useQuery({
|
|
1735
|
-
queryKey:
|
|
1783
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.profile(),
|
|
1736
1784
|
queryFn: () => client.profile(),
|
|
1737
1785
|
enabled: (options?.enabled ?? true) && enabled,
|
|
1738
1786
|
staleTime: Infinity
|
|
@@ -1747,9 +1795,9 @@ function useUpdateProfile() {
|
|
|
1747
1795
|
return client.profile();
|
|
1748
1796
|
},
|
|
1749
1797
|
onSuccess: (profile) => {
|
|
1750
|
-
qc.setQueryData(
|
|
1751
|
-
void qc.invalidateQueries({ queryKey:
|
|
1752
|
-
return qc.invalidateQueries({ queryKey:
|
|
1798
|
+
qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.profile(), profile);
|
|
1799
|
+
void qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.identity() });
|
|
1800
|
+
return qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workspaces() });
|
|
1753
1801
|
}
|
|
1754
1802
|
});
|
|
1755
1803
|
}
|
|
@@ -1832,7 +1880,7 @@ function useConfirmEmailChange() {
|
|
|
1832
1880
|
const qc = reactQuery.useQueryClient();
|
|
1833
1881
|
return reactQuery.useMutation({
|
|
1834
1882
|
mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
|
|
1835
|
-
onSuccess: () => qc.setQueryData(
|
|
1883
|
+
onSuccess: () => qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.profile(), client.profile())
|
|
1836
1884
|
});
|
|
1837
1885
|
}
|
|
1838
1886
|
function useEmailChange({
|
|
@@ -1998,33 +2046,33 @@ function toNotificationPreferences(stored, keys) {
|
|
|
1998
2046
|
};
|
|
1999
2047
|
}
|
|
2000
2048
|
function useUserSettings(options) {
|
|
2001
|
-
const arbi =
|
|
2049
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2002
2050
|
return reactQuery.useQuery({
|
|
2003
|
-
queryKey:
|
|
2051
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings(),
|
|
2004
2052
|
queryFn: () => arbi.settings.get(),
|
|
2005
2053
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
2006
2054
|
});
|
|
2007
2055
|
}
|
|
2008
2056
|
function useNotificationPreferences(keys, options) {
|
|
2009
|
-
const arbi =
|
|
2057
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2010
2058
|
const qc = reactQuery.useQueryClient();
|
|
2011
2059
|
const settings = useUserSettings(options);
|
|
2012
2060
|
const stored = settings.data?.email_notifications;
|
|
2013
2061
|
const save = reactQuery.useMutation({
|
|
2014
2062
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
2015
2063
|
onMutate: async (patch) => {
|
|
2016
|
-
await qc.cancelQueries({ queryKey:
|
|
2017
|
-
const previous = qc.getQueryData(
|
|
2064
|
+
await qc.cancelQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings() });
|
|
2065
|
+
const previous = qc.getQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings());
|
|
2018
2066
|
qc.setQueryData(
|
|
2019
|
-
|
|
2067
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings(),
|
|
2020
2068
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
2021
2069
|
);
|
|
2022
2070
|
return { previous };
|
|
2023
2071
|
},
|
|
2024
2072
|
onError: (_err, _patch, context) => {
|
|
2025
|
-
qc.setQueryData(
|
|
2073
|
+
qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2026
2074
|
},
|
|
2027
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2075
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings() })
|
|
2028
2076
|
});
|
|
2029
2077
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
2030
2078
|
const setAll = React.useCallback(
|
|
@@ -2046,23 +2094,23 @@ function useNotificationPreferences(keys, options) {
|
|
|
2046
2094
|
};
|
|
2047
2095
|
}
|
|
2048
2096
|
function useRelevanceSave() {
|
|
2049
|
-
const arbi =
|
|
2097
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2050
2098
|
const qc = reactQuery.useQueryClient();
|
|
2051
2099
|
return reactQuery.useMutation({
|
|
2052
2100
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2053
2101
|
onMutate: async (patch) => {
|
|
2054
|
-
await qc.cancelQueries({ queryKey:
|
|
2055
|
-
const previous = qc.getQueryData(
|
|
2102
|
+
await qc.cancelQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings() });
|
|
2103
|
+
const previous = qc.getQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings());
|
|
2056
2104
|
qc.setQueryData(
|
|
2057
|
-
|
|
2105
|
+
chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings(),
|
|
2058
2106
|
(old) => old ? { ...old, ...patch } : old
|
|
2059
2107
|
);
|
|
2060
2108
|
return { previous };
|
|
2061
2109
|
},
|
|
2062
2110
|
onError: (_err, _patch, context) => {
|
|
2063
|
-
qc.setQueryData(
|
|
2111
|
+
qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2064
2112
|
},
|
|
2065
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2113
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings() })
|
|
2066
2114
|
});
|
|
2067
2115
|
}
|
|
2068
2116
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -2073,7 +2121,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
2073
2121
|
const setLevel = React.useCallback(
|
|
2074
2122
|
(next) => {
|
|
2075
2123
|
if (!workspaceId) return;
|
|
2076
|
-
const current = qc.getQueryData(
|
|
2124
|
+
const current = qc.getQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2077
2125
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
2078
2126
|
},
|
|
2079
2127
|
[qc, save, settings.data, workspaceId]
|
|
@@ -2092,12 +2140,19 @@ function useFollowThread(conversationId, options) {
|
|
|
2092
2140
|
const save = useRelevanceSave();
|
|
2093
2141
|
const following = !!conversationId && !!settings.data?.followed_threads?.includes(conversationId);
|
|
2094
2142
|
const setFollowing = React.useCallback(
|
|
2095
|
-
(on) => {
|
|
2143
|
+
(on, callbacks) => {
|
|
2096
2144
|
if (!conversationId) return;
|
|
2097
|
-
const current = qc.getQueryData(
|
|
2098
|
-
save.mutate(
|
|
2099
|
-
|
|
2100
|
-
|
|
2145
|
+
const current = qc.getQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2146
|
+
save.mutate(
|
|
2147
|
+
{
|
|
2148
|
+
followed_threads: browser.settings.withMembership(
|
|
2149
|
+
current?.followed_threads,
|
|
2150
|
+
conversationId,
|
|
2151
|
+
on
|
|
2152
|
+
)
|
|
2153
|
+
},
|
|
2154
|
+
callbacks
|
|
2155
|
+
);
|
|
2101
2156
|
},
|
|
2102
2157
|
[qc, save, settings.data, conversationId]
|
|
2103
2158
|
);
|
|
@@ -2112,7 +2167,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2112
2167
|
function useSessions(options) {
|
|
2113
2168
|
const { client, enabled } = useAccountClient();
|
|
2114
2169
|
return reactQuery.useQuery({
|
|
2115
|
-
queryKey:
|
|
2170
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.sessions(),
|
|
2116
2171
|
queryFn: () => client.listSessions(),
|
|
2117
2172
|
enabled: (options?.enabled ?? true) && enabled
|
|
2118
2173
|
});
|
|
@@ -2122,7 +2177,7 @@ function useTerminateSession() {
|
|
|
2122
2177
|
const qc = reactQuery.useQueryClient();
|
|
2123
2178
|
return reactQuery.useMutation({
|
|
2124
2179
|
mutationFn: (sessionId) => client.terminateSession(sessionId),
|
|
2125
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2180
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.sessions() })
|
|
2126
2181
|
});
|
|
2127
2182
|
}
|
|
2128
2183
|
function useSignOut() {
|
|
@@ -2265,7 +2320,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2265
2320
|
const apiRef = React.useRef(api);
|
|
2266
2321
|
apiRef.current = api;
|
|
2267
2322
|
const query = reactQuery.useQuery({
|
|
2268
|
-
queryKey:
|
|
2323
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.identity(),
|
|
2269
2324
|
queryFn: () => apiRef.current.status(),
|
|
2270
2325
|
enabled,
|
|
2271
2326
|
staleTime: 6e4
|
|
@@ -2283,7 +2338,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2283
2338
|
const lastVerified = React.useRef(void 0);
|
|
2284
2339
|
const apply = React.useCallback(
|
|
2285
2340
|
(next) => {
|
|
2286
|
-
qc.setQueryData(
|
|
2341
|
+
qc.setQueryData(chunkE5XFVK4I_cjs.arbiQueryKeys.identity(), next);
|
|
2287
2342
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
2288
2343
|
onVerifiedChange?.(next.verified);
|
|
2289
2344
|
}
|
|
@@ -2478,12 +2533,12 @@ function useIdentityVerification(options = {}) {
|
|
|
2478
2533
|
enabled,
|
|
2479
2534
|
formatPrice,
|
|
2480
2535
|
onVerifiedChange: (verified) => {
|
|
2481
|
-
void qc.invalidateQueries({ queryKey:
|
|
2536
|
+
void qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.profile() });
|
|
2482
2537
|
onVerifiedChange?.(verified);
|
|
2483
2538
|
},
|
|
2484
2539
|
onNameAccepted: (name) => {
|
|
2485
|
-
void qc.invalidateQueries({ queryKey:
|
|
2486
|
-
void qc.invalidateQueries({ queryKey:
|
|
2540
|
+
void qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.profile() });
|
|
2541
|
+
void qc.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.workspaces() });
|
|
2487
2542
|
onNameAccepted?.(name);
|
|
2488
2543
|
}
|
|
2489
2544
|
});
|
|
@@ -2493,7 +2548,7 @@ async function downloadRecoveryFile(params) {
|
|
|
2493
2548
|
...params,
|
|
2494
2549
|
origin: params.origin ?? window.location.origin
|
|
2495
2550
|
});
|
|
2496
|
-
|
|
2551
|
+
chunkTYUQFRHF_cjs.downloadBlob(new Blob([file.html], { type: "text/html" }), file.filename);
|
|
2497
2552
|
}
|
|
2498
2553
|
|
|
2499
2554
|
// src/mail/client.ts
|
|
@@ -2603,7 +2658,7 @@ function MailClientProvider({
|
|
|
2603
2658
|
}
|
|
2604
2659
|
function useMailClient() {
|
|
2605
2660
|
const provided = React.useContext(MailClientContext);
|
|
2606
|
-
const arbi = React.useContext(
|
|
2661
|
+
const arbi = React.useContext(chunkR2MF7YCW_cjs.ArbiContext);
|
|
2607
2662
|
const fallback = React.useMemo(() => arbi ? arbiMailClient(arbi) : null, [arbi]);
|
|
2608
2663
|
if (provided) return provided;
|
|
2609
2664
|
if (!arbi || !fallback) return NO_MAIL;
|
|
@@ -2901,7 +2956,7 @@ function useMailDraftReplaced(draftId, onReplaced) {
|
|
|
2901
2956
|
}, [draftId]);
|
|
2902
2957
|
}
|
|
2903
2958
|
function useWorkspaceDocs(workspaceId) {
|
|
2904
|
-
const { data: docs = [], isLoading, isError } =
|
|
2959
|
+
const { data: docs = [], isLoading, isError } = chunkE5XFVK4I_cjs.useDocuments(workspaceId);
|
|
2905
2960
|
const docIds = React.useMemo(
|
|
2906
2961
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
2907
2962
|
[docs]
|
|
@@ -2909,7 +2964,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
2909
2964
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
2910
2965
|
}
|
|
2911
2966
|
function useAiTask() {
|
|
2912
|
-
const mutation =
|
|
2967
|
+
const mutation = chunkE5XFVK4I_cjs.useAssistantQuery();
|
|
2913
2968
|
const [status, setStatus] = React.useState("idle");
|
|
2914
2969
|
const [text, setText] = React.useState("");
|
|
2915
2970
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -2999,7 +3054,7 @@ function useAiTask() {
|
|
|
2999
3054
|
};
|
|
3000
3055
|
}
|
|
3001
3056
|
function useSemanticSearch(docIds) {
|
|
3002
|
-
const arbi =
|
|
3057
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3003
3058
|
const [query, setQuery] = React.useState("");
|
|
3004
3059
|
const mutation = reactQuery.useMutation({
|
|
3005
3060
|
mutationFn: async ({ query: q, mode }) => {
|
|
@@ -3529,8 +3584,8 @@ function DocumentReview({
|
|
|
3529
3584
|
onClose,
|
|
3530
3585
|
className
|
|
3531
3586
|
}) {
|
|
3532
|
-
const parsedQuery =
|
|
3533
|
-
const tagsQuery =
|
|
3587
|
+
const parsedQuery = chunkE5XFVK4I_cjs.useParsedDocument(docId, stage);
|
|
3588
|
+
const tagsQuery = chunkE5XFVK4I_cjs.useTags(workspaceId);
|
|
3534
3589
|
const tagNameById = React__default.default.useMemo(() => {
|
|
3535
3590
|
const map = /* @__PURE__ */ new Map();
|
|
3536
3591
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -3761,7 +3816,7 @@ function SemanticSearch({
|
|
|
3761
3816
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
3762
3817
|
const [value, setValue] = React.useState("");
|
|
3763
3818
|
const [selected, setSelected] = React.useState(null);
|
|
3764
|
-
const { data: docs = [] } =
|
|
3819
|
+
const { data: docs = [] } = chunkE5XFVK4I_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
3765
3820
|
const docMap = React.useMemo(() => {
|
|
3766
3821
|
const map = /* @__PURE__ */ new Map();
|
|
3767
3822
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -4863,7 +4918,7 @@ function ActivityFeed({
|
|
|
4863
4918
|
enabled,
|
|
4864
4919
|
"data-testid": testId = "activity-feed"
|
|
4865
4920
|
}) {
|
|
4866
|
-
const { data, isLoading, isError } =
|
|
4921
|
+
const { data, isLoading, isError } = chunkE5XFVK4I_cjs.useActivity({ limit, enabled });
|
|
4867
4922
|
if (isLoading) {
|
|
4868
4923
|
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: [
|
|
4869
4924
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -4913,7 +4968,7 @@ var workTypes = [
|
|
|
4913
4968
|
"mail_draft_ready"
|
|
4914
4969
|
];
|
|
4915
4970
|
function useWorkNotifications(options) {
|
|
4916
|
-
const arbi =
|
|
4971
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
4917
4972
|
const queries = reactQuery.useQueryClient();
|
|
4918
4973
|
const queryKey = ["work-notifications", options.apiUrl, options.userId];
|
|
4919
4974
|
const query = reactQuery.useQuery({
|
|
@@ -5009,7 +5064,7 @@ function toConversation(loaded, myExtId, pending) {
|
|
|
5009
5064
|
};
|
|
5010
5065
|
}
|
|
5011
5066
|
function useDirectMessages(options) {
|
|
5012
|
-
const arbi =
|
|
5067
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5013
5068
|
const queryClient = reactQuery.useQueryClient();
|
|
5014
5069
|
const enabled = options?.enabled ?? arbi.isLoggedIn;
|
|
5015
5070
|
const query = reactQuery.useQuery({
|
|
@@ -5021,7 +5076,7 @@ function useDirectMessages(options) {
|
|
|
5021
5076
|
enabled
|
|
5022
5077
|
});
|
|
5023
5078
|
const contactsQuery = reactQuery.useQuery({
|
|
5024
|
-
queryKey:
|
|
5079
|
+
queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.contacts(),
|
|
5025
5080
|
queryFn: () => arbi.contacts.list(),
|
|
5026
5081
|
enabled
|
|
5027
5082
|
});
|
|
@@ -5223,7 +5278,7 @@ function ConversationList({
|
|
|
5223
5278
|
children: c.subtitle ?? preview
|
|
5224
5279
|
}
|
|
5225
5280
|
),
|
|
5226
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ?
|
|
5281
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunk6PPWZILQ_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
|
|
5227
5282
|
] })
|
|
5228
5283
|
] })
|
|
5229
5284
|
] });
|
|
@@ -5307,7 +5362,7 @@ function MessageBubble({
|
|
|
5307
5362
|
isLastOfRun,
|
|
5308
5363
|
senderName: message.isMine ? "You" : userDisplayName(message.sender),
|
|
5309
5364
|
classNames,
|
|
5310
|
-
formatTimestamp:
|
|
5365
|
+
formatTimestamp: chunk6PPWZILQ_cjs.formatRelativeTime
|
|
5311
5366
|
}
|
|
5312
5367
|
);
|
|
5313
5368
|
}
|
|
@@ -6174,12 +6229,89 @@ function CommandPaletteProvider({
|
|
|
6174
6229
|
/* @__PURE__ */ jsxRuntime.jsx(CommandPalette, { open: isOpen, onOpenChange: setIsOpen, ...paletteProps })
|
|
6175
6230
|
] });
|
|
6176
6231
|
}
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6232
|
+
|
|
6233
|
+
// src/session/store.ts
|
|
6234
|
+
var EMPTY_SESSION_STATE = {
|
|
6235
|
+
workspaceId: null,
|
|
6236
|
+
conversationId: null,
|
|
6237
|
+
viewingDocument: null,
|
|
6238
|
+
selectedDocumentIds: [],
|
|
6239
|
+
generating: {},
|
|
6240
|
+
paMode: false,
|
|
6241
|
+
conversationDocuments: {}
|
|
6242
|
+
};
|
|
6243
|
+
var selectViewingDocumentId = (state) => state.viewingDocument ? chunkZWFMFOGP_cjs.parseVersionRef(state.viewingDocument.id).docId : null;
|
|
6244
|
+
var selectIsGenerating = (conversationId) => (state) => !!conversationId && !!state.generating[conversationId]?.isGenerating;
|
|
6245
|
+
function nextViewingDocument(current, input) {
|
|
6246
|
+
if (!input) return null;
|
|
6247
|
+
const same = current?.id === input.id;
|
|
6248
|
+
return {
|
|
6249
|
+
id: input.id,
|
|
6250
|
+
page: input.page !== void 0 ? input.page : same ? current?.page ?? null : null,
|
|
6251
|
+
passageId: input.passageId !== void 0 ? input.passageId : current?.passageId ?? null
|
|
6252
|
+
};
|
|
6253
|
+
}
|
|
6254
|
+
function createArbiSessionStore(initial = {}) {
|
|
6255
|
+
let state = { ...EMPTY_SESSION_STATE, ...initial };
|
|
6256
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
6257
|
+
const update = (patch) => {
|
|
6258
|
+
state = { ...state, ...patch };
|
|
6259
|
+
listeners.forEach((listener) => listener());
|
|
6260
|
+
};
|
|
6261
|
+
return {
|
|
6262
|
+
getState: () => state,
|
|
6263
|
+
subscribe: (listener) => {
|
|
6264
|
+
listeners.add(listener);
|
|
6265
|
+
return () => listeners.delete(listener);
|
|
6266
|
+
},
|
|
6267
|
+
setWorkspaceId: (workspaceId) => {
|
|
6268
|
+
if (state.workspaceId !== workspaceId) update({ workspaceId });
|
|
6269
|
+
},
|
|
6270
|
+
setConversationId: (conversationId) => {
|
|
6271
|
+
if (state.conversationId !== conversationId) update({ conversationId });
|
|
6272
|
+
},
|
|
6273
|
+
setViewingDocument: (input) => update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),
|
|
6274
|
+
setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),
|
|
6275
|
+
setConversationGenerating: (conversationId, isGenerating) => {
|
|
6276
|
+
const current = state.generating[conversationId];
|
|
6277
|
+
update({
|
|
6278
|
+
generating: {
|
|
6279
|
+
...state.generating,
|
|
6280
|
+
[conversationId]: {
|
|
6281
|
+
isGenerating,
|
|
6282
|
+
error: isGenerating ? null : current?.error ?? null,
|
|
6283
|
+
startTime: isGenerating ? Date.now() : null
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6286
|
+
});
|
|
6287
|
+
},
|
|
6288
|
+
setPaMode: (paMode) => {
|
|
6289
|
+
if (state.paMode !== paMode) update({ paMode });
|
|
6290
|
+
},
|
|
6291
|
+
setConversationDocuments: (conversationId, documents) => update({
|
|
6292
|
+
conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents }
|
|
6293
|
+
})
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
var ArbiSessionStoreContext = React.createContext(null);
|
|
6297
|
+
var moduleDefault = null;
|
|
6298
|
+
var defaultStore = () => moduleDefault ??= createArbiSessionStore();
|
|
6299
|
+
function ArbiSessionStateProvider({
|
|
6300
|
+
store,
|
|
6301
|
+
children
|
|
6302
|
+
}) {
|
|
6303
|
+
const enclosing = React.useContext(ArbiSessionStoreContext);
|
|
6304
|
+
const [own] = React.useState(createArbiSessionStore);
|
|
6305
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ArbiSessionStoreContext.Provider, { value: store ?? enclosing ?? own, children });
|
|
6306
|
+
}
|
|
6307
|
+
function useArbiSessionStore() {
|
|
6308
|
+
return React.useContext(ArbiSessionStoreContext) ?? defaultStore();
|
|
6309
|
+
}
|
|
6310
|
+
function useArbiSessionState(selector) {
|
|
6311
|
+
const store = useArbiSessionStore();
|
|
6312
|
+
const select = () => selector(store.getState());
|
|
6313
|
+
return React.useSyncExternalStore(store.subscribe, select, select);
|
|
6314
|
+
}
|
|
6183
6315
|
agGridCommunity.ModuleRegistry.registerModules([agGridCommunity.AllCommunityModule]);
|
|
6184
6316
|
function formatBytes(bytes) {
|
|
6185
6317
|
if (bytes == null || Number.isNaN(bytes)) return "\u2014";
|
|
@@ -6213,10 +6345,10 @@ function DocumentTable({
|
|
|
6213
6345
|
extraColumns,
|
|
6214
6346
|
className
|
|
6215
6347
|
}) {
|
|
6216
|
-
const query =
|
|
6348
|
+
const query = chunkE5XFVK4I_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6217
6349
|
const rows = documents ?? query.data ?? [];
|
|
6218
6350
|
const isLoading = !documents && query.isLoading;
|
|
6219
|
-
const tagsQuery =
|
|
6351
|
+
const tagsQuery = chunkE5XFVK4I_cjs.useTags(workspaceId);
|
|
6220
6352
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6221
6353
|
const map = /* @__PURE__ */ new Map();
|
|
6222
6354
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6224,19 +6356,19 @@ function DocumentTable({
|
|
|
6224
6356
|
}
|
|
6225
6357
|
return map;
|
|
6226
6358
|
}, [tagsQuery.data]);
|
|
6227
|
-
const
|
|
6228
|
-
const
|
|
6229
|
-
const
|
|
6230
|
-
const
|
|
6359
|
+
const session = useArbiSessionStore();
|
|
6360
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6361
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6362
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6231
6363
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6232
6364
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6233
6365
|
const gridApiRef = React__default.default.useRef(null);
|
|
6234
6366
|
const openDocument = React__default.default.useCallback(
|
|
6235
6367
|
(id) => {
|
|
6236
|
-
|
|
6368
|
+
session.setViewingDocument({ id });
|
|
6237
6369
|
onOpenDocument?.(id);
|
|
6238
6370
|
},
|
|
6239
|
-
[onOpenDocument,
|
|
6371
|
+
[onOpenDocument, session]
|
|
6240
6372
|
);
|
|
6241
6373
|
const applySelection = React__default.default.useCallback(() => {
|
|
6242
6374
|
const api = gridApiRef.current;
|
|
@@ -6392,12 +6524,12 @@ function DocumentCardMenu({
|
|
|
6392
6524
|
canDelete = true,
|
|
6393
6525
|
testId = "document-card-menu"
|
|
6394
6526
|
}) {
|
|
6395
|
-
const arbi =
|
|
6527
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
6396
6528
|
const queryClient = reactQuery.useQueryClient();
|
|
6397
6529
|
const invalidateDocuments = () => {
|
|
6398
6530
|
const workspaceId = arbi.getWorkspaceId();
|
|
6399
6531
|
if (workspaceId) {
|
|
6400
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6532
|
+
void queryClient.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
6401
6533
|
}
|
|
6402
6534
|
};
|
|
6403
6535
|
const download = reactQuery.useMutation({
|
|
@@ -6496,10 +6628,10 @@ function DocumentGallery({
|
|
|
6496
6628
|
minTileWidth = 148,
|
|
6497
6629
|
className
|
|
6498
6630
|
}) {
|
|
6499
|
-
const query =
|
|
6631
|
+
const query = chunkE5XFVK4I_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6500
6632
|
const rows = documents ?? query.data ?? [];
|
|
6501
6633
|
const isLoading = !documents && query.isLoading;
|
|
6502
|
-
const tagsQuery =
|
|
6634
|
+
const tagsQuery = chunkE5XFVK4I_cjs.useTags(workspaceId);
|
|
6503
6635
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6504
6636
|
const map = /* @__PURE__ */ new Map();
|
|
6505
6637
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6511,12 +6643,12 @@ function DocumentGallery({
|
|
|
6511
6643
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
6512
6644
|
[rows]
|
|
6513
6645
|
);
|
|
6514
|
-
const thumbsQuery =
|
|
6646
|
+
const thumbsQuery = chunkE5XFVK4I_cjs.useThumbnails(docIds);
|
|
6515
6647
|
const thumbs = thumbsQuery.data ?? {};
|
|
6516
|
-
const
|
|
6517
|
-
const
|
|
6518
|
-
const
|
|
6519
|
-
const
|
|
6648
|
+
const session = useArbiSessionStore();
|
|
6649
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6650
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6651
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6520
6652
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6521
6653
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6522
6654
|
const selectedSet = React__default.default.useMemo(() => new Set(effectiveSelected), [effectiveSelected]);
|
|
@@ -6531,12 +6663,12 @@ function DocumentGallery({
|
|
|
6531
6663
|
);
|
|
6532
6664
|
const openDocument = React__default.default.useCallback(
|
|
6533
6665
|
(id) => {
|
|
6534
|
-
|
|
6666
|
+
session.setViewingDocument({ id });
|
|
6535
6667
|
onOpenDocument?.(id);
|
|
6536
6668
|
},
|
|
6537
|
-
[onOpenDocument,
|
|
6669
|
+
[onOpenDocument, session]
|
|
6538
6670
|
);
|
|
6539
|
-
const arbi =
|
|
6671
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
6540
6672
|
const queryClient = reactQuery.useQueryClient();
|
|
6541
6673
|
const [renamingId, setRenamingId] = React__default.default.useState(null);
|
|
6542
6674
|
const rename = reactQuery.useMutation({
|
|
@@ -6547,7 +6679,7 @@ function DocumentGallery({
|
|
|
6547
6679
|
setRenamingId(null);
|
|
6548
6680
|
const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
|
|
6549
6681
|
if (activeWorkspace) {
|
|
6550
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
6682
|
+
void queryClient.invalidateQueries({ queryKey: chunkE5XFVK4I_cjs.arbiQueryKeys.documents(activeWorkspace) });
|
|
6551
6683
|
}
|
|
6552
6684
|
}
|
|
6553
6685
|
});
|
|
@@ -7165,183 +7297,187 @@ function hasVideoTrack(blob) {
|
|
|
7165
7297
|
|
|
7166
7298
|
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
7167
7299
|
enumerable: true,
|
|
7168
|
-
get: function () { return
|
|
7300
|
+
get: function () { return chunkE5XFVK4I_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
7301
|
+
});
|
|
7302
|
+
Object.defineProperty(exports, "arbiMutationKeys", {
|
|
7303
|
+
enumerable: true,
|
|
7304
|
+
get: function () { return chunkE5XFVK4I_cjs.arbiMutationKeys; }
|
|
7169
7305
|
});
|
|
7170
7306
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
7171
7307
|
enumerable: true,
|
|
7172
|
-
get: function () { return
|
|
7308
|
+
get: function () { return chunkE5XFVK4I_cjs.arbiQueryKeys; }
|
|
7173
7309
|
});
|
|
7174
7310
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
7175
7311
|
enumerable: true,
|
|
7176
|
-
get: function () { return
|
|
7312
|
+
get: function () { return chunkE5XFVK4I_cjs.isUsageMetered; }
|
|
7177
7313
|
});
|
|
7178
7314
|
Object.defineProperty(exports, "useActivity", {
|
|
7179
7315
|
enumerable: true,
|
|
7180
|
-
get: function () { return
|
|
7316
|
+
get: function () { return chunkE5XFVK4I_cjs.useActivity; }
|
|
7181
7317
|
});
|
|
7182
7318
|
Object.defineProperty(exports, "useAgents", {
|
|
7183
7319
|
enumerable: true,
|
|
7184
|
-
get: function () { return
|
|
7320
|
+
get: function () { return chunkE5XFVK4I_cjs.useAgents; }
|
|
7185
7321
|
});
|
|
7186
7322
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
7187
7323
|
enumerable: true,
|
|
7188
|
-
get: function () { return
|
|
7324
|
+
get: function () { return chunkE5XFVK4I_cjs.useAssistantQuery; }
|
|
7189
7325
|
});
|
|
7190
7326
|
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
7191
7327
|
enumerable: true,
|
|
7192
|
-
get: function () { return
|
|
7328
|
+
get: function () { return chunkE5XFVK4I_cjs.useCanCreateProjects; }
|
|
7193
7329
|
});
|
|
7194
7330
|
Object.defineProperty(exports, "useConfigs", {
|
|
7195
7331
|
enumerable: true,
|
|
7196
|
-
get: function () { return
|
|
7332
|
+
get: function () { return chunkE5XFVK4I_cjs.useConfigs; }
|
|
7197
7333
|
});
|
|
7198
7334
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
7199
7335
|
enumerable: true,
|
|
7200
|
-
get: function () { return
|
|
7336
|
+
get: function () { return chunkE5XFVK4I_cjs.useConversationThreads; }
|
|
7201
7337
|
});
|
|
7202
7338
|
Object.defineProperty(exports, "useConversations", {
|
|
7203
7339
|
enumerable: true,
|
|
7204
|
-
get: function () { return
|
|
7340
|
+
get: function () { return chunkE5XFVK4I_cjs.useConversations; }
|
|
7205
7341
|
});
|
|
7206
7342
|
Object.defineProperty(exports, "useCurrentUser", {
|
|
7207
7343
|
enumerable: true,
|
|
7208
|
-
get: function () { return
|
|
7344
|
+
get: function () { return chunkE5XFVK4I_cjs.useCurrentUser; }
|
|
7209
7345
|
});
|
|
7210
7346
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
7211
7347
|
enumerable: true,
|
|
7212
|
-
get: function () { return
|
|
7348
|
+
get: function () { return chunkE5XFVK4I_cjs.useDeleteAgents; }
|
|
7213
7349
|
});
|
|
7214
7350
|
Object.defineProperty(exports, "useDocuments", {
|
|
7215
7351
|
enumerable: true,
|
|
7216
|
-
get: function () { return
|
|
7352
|
+
get: function () { return chunkE5XFVK4I_cjs.useDocuments; }
|
|
7217
7353
|
});
|
|
7218
7354
|
Object.defineProperty(exports, "useFacts", {
|
|
7219
7355
|
enumerable: true,
|
|
7220
|
-
get: function () { return
|
|
7356
|
+
get: function () { return chunkE5XFVK4I_cjs.useFacts; }
|
|
7221
7357
|
});
|
|
7222
7358
|
Object.defineProperty(exports, "useFirmPool", {
|
|
7223
7359
|
enumerable: true,
|
|
7224
|
-
get: function () { return
|
|
7360
|
+
get: function () { return chunkE5XFVK4I_cjs.useFirmPool; }
|
|
7225
7361
|
});
|
|
7226
7362
|
Object.defineProperty(exports, "useHealth", {
|
|
7227
7363
|
enumerable: true,
|
|
7228
|
-
get: function () { return
|
|
7364
|
+
get: function () { return chunkE5XFVK4I_cjs.useHealth; }
|
|
7229
7365
|
});
|
|
7230
7366
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
7231
7367
|
enumerable: true,
|
|
7232
|
-
get: function () { return
|
|
7368
|
+
get: function () { return chunkE5XFVK4I_cjs.useParsedDocument; }
|
|
7233
7369
|
});
|
|
7234
7370
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
7235
7371
|
enumerable: true,
|
|
7236
|
-
get: function () { return
|
|
7372
|
+
get: function () { return chunkE5XFVK4I_cjs.useProjectInvoices; }
|
|
7237
7373
|
});
|
|
7238
7374
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
7239
7375
|
enumerable: true,
|
|
7240
|
-
get: function () { return
|
|
7376
|
+
get: function () { return chunkE5XFVK4I_cjs.useProjectUsage; }
|
|
7241
7377
|
});
|
|
7242
7378
|
Object.defineProperty(exports, "useProjects", {
|
|
7243
7379
|
enumerable: true,
|
|
7244
|
-
get: function () { return
|
|
7380
|
+
get: function () { return chunkE5XFVK4I_cjs.useProjects; }
|
|
7245
7381
|
});
|
|
7246
7382
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
7247
7383
|
enumerable: true,
|
|
7248
|
-
get: function () { return
|
|
7384
|
+
get: function () { return chunkE5XFVK4I_cjs.useProjectsUsage; }
|
|
7249
7385
|
});
|
|
7250
7386
|
Object.defineProperty(exports, "useTags", {
|
|
7251
7387
|
enumerable: true,
|
|
7252
|
-
get: function () { return
|
|
7388
|
+
get: function () { return chunkE5XFVK4I_cjs.useTags; }
|
|
7253
7389
|
});
|
|
7254
7390
|
Object.defineProperty(exports, "useThumbnails", {
|
|
7255
7391
|
enumerable: true,
|
|
7256
|
-
get: function () { return
|
|
7392
|
+
get: function () { return chunkE5XFVK4I_cjs.useThumbnails; }
|
|
7257
7393
|
});
|
|
7258
7394
|
Object.defineProperty(exports, "useTopUpFirmPool", {
|
|
7259
7395
|
enumerable: true,
|
|
7260
|
-
get: function () { return
|
|
7396
|
+
get: function () { return chunkE5XFVK4I_cjs.useTopUpFirmPool; }
|
|
7261
7397
|
});
|
|
7262
7398
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
7263
7399
|
enumerable: true,
|
|
7264
|
-
get: function () { return
|
|
7400
|
+
get: function () { return chunkE5XFVK4I_cjs.useUserUsageToday; }
|
|
7265
7401
|
});
|
|
7266
7402
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
7267
7403
|
enumerable: true,
|
|
7268
|
-
get: function () { return
|
|
7404
|
+
get: function () { return chunkE5XFVK4I_cjs.useWorkspaceActivity; }
|
|
7269
7405
|
});
|
|
7270
7406
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
7271
7407
|
enumerable: true,
|
|
7272
|
-
get: function () { return
|
|
7408
|
+
get: function () { return chunkE5XFVK4I_cjs.useWorkspaceUsers; }
|
|
7273
7409
|
});
|
|
7274
7410
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
7275
7411
|
enumerable: true,
|
|
7276
|
-
get: function () { return
|
|
7412
|
+
get: function () { return chunkE5XFVK4I_cjs.useWorkspaces; }
|
|
7277
7413
|
});
|
|
7278
7414
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
7279
7415
|
enumerable: true,
|
|
7280
|
-
get: function () { return
|
|
7416
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftMarkdown; }
|
|
7281
7417
|
});
|
|
7282
7418
|
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
7283
7419
|
enumerable: true,
|
|
7284
|
-
get: function () { return
|
|
7420
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftWithReport; }
|
|
7285
7421
|
});
|
|
7286
7422
|
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
7287
7423
|
enumerable: true,
|
|
7288
|
-
get: function () { return
|
|
7424
|
+
get: function () { return chunkZWFMFOGP_cjs.promoteBoldTitle; }
|
|
7289
7425
|
});
|
|
7290
7426
|
Object.defineProperty(exports, "repairParsedStructure", {
|
|
7291
7427
|
enumerable: true,
|
|
7292
|
-
get: function () { return
|
|
7428
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedStructure; }
|
|
7293
7429
|
});
|
|
7294
7430
|
Object.defineProperty(exports, "repairParsedTitle", {
|
|
7295
7431
|
enumerable: true,
|
|
7296
|
-
get: function () { return
|
|
7432
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedTitle; }
|
|
7297
7433
|
});
|
|
7298
7434
|
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
7299
7435
|
enumerable: true,
|
|
7300
|
-
get: function () { return
|
|
7436
|
+
get: function () { return chunkZWFMFOGP_cjs.stripAgentPreamble; }
|
|
7301
7437
|
});
|
|
7302
7438
|
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
7303
7439
|
enumerable: true,
|
|
7304
|
-
get: function () { return
|
|
7440
|
+
get: function () { return chunkZWFMFOGP_cjs.unescapeMarkdown; }
|
|
7305
7441
|
});
|
|
7306
7442
|
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
7307
7443
|
enumerable: true,
|
|
7308
|
-
get: function () { return
|
|
7444
|
+
get: function () { return chunkZWFMFOGP_cjs.unwrapCitationLinks; }
|
|
7309
7445
|
});
|
|
7310
7446
|
Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
|
|
7311
7447
|
enumerable: true,
|
|
7312
|
-
get: function () { return
|
|
7448
|
+
get: function () { return chunk6PPWZILQ_cjs.DEFAULT_NOTIFY_TONE; }
|
|
7313
7449
|
});
|
|
7314
7450
|
Object.defineProperty(exports, "NotificationBell", {
|
|
7315
7451
|
enumerable: true,
|
|
7316
|
-
get: function () { return
|
|
7452
|
+
get: function () { return chunk6PPWZILQ_cjs.NotificationBell; }
|
|
7317
7453
|
});
|
|
7318
7454
|
Object.defineProperty(exports, "Toaster", {
|
|
7319
7455
|
enumerable: true,
|
|
7320
|
-
get: function () { return
|
|
7456
|
+
get: function () { return chunk6PPWZILQ_cjs.Toaster; }
|
|
7321
7457
|
});
|
|
7322
7458
|
Object.defineProperty(exports, "formatRelativeTime", {
|
|
7323
7459
|
enumerable: true,
|
|
7324
|
-
get: function () { return
|
|
7460
|
+
get: function () { return chunk6PPWZILQ_cjs.formatRelativeTime; }
|
|
7325
7461
|
});
|
|
7326
7462
|
Object.defineProperty(exports, "notify", {
|
|
7327
7463
|
enumerable: true,
|
|
7328
|
-
get: function () { return
|
|
7464
|
+
get: function () { return chunk6PPWZILQ_cjs.notify; }
|
|
7329
7465
|
});
|
|
7330
7466
|
Object.defineProperty(exports, "seedNotifications", {
|
|
7331
7467
|
enumerable: true,
|
|
7332
|
-
get: function () { return
|
|
7468
|
+
get: function () { return chunk6PPWZILQ_cjs.seedNotifications; }
|
|
7333
7469
|
});
|
|
7334
7470
|
Object.defineProperty(exports, "selectUnread", {
|
|
7335
7471
|
enumerable: true,
|
|
7336
|
-
get: function () { return
|
|
7472
|
+
get: function () { return chunk6PPWZILQ_cjs.selectUnread; }
|
|
7337
7473
|
});
|
|
7338
7474
|
Object.defineProperty(exports, "toast", {
|
|
7339
7475
|
enumerable: true,
|
|
7340
|
-
get: function () { return
|
|
7476
|
+
get: function () { return chunk6PPWZILQ_cjs.toast; }
|
|
7341
7477
|
});
|
|
7342
7478
|
Object.defineProperty(exports, "useNotify", {
|
|
7343
7479
|
enumerable: true,
|
|
7344
|
-
get: function () { return
|
|
7480
|
+
get: function () { return chunk6PPWZILQ_cjs.useNotify; }
|
|
7345
7481
|
});
|
|
7346
7482
|
Object.defineProperty(exports, "AUDIO_MIME_PREFERENCE", {
|
|
7347
7483
|
enumerable: true,
|
|
@@ -8085,15 +8221,15 @@ Object.defineProperty(exports, "cn", {
|
|
|
8085
8221
|
});
|
|
8086
8222
|
Object.defineProperty(exports, "ArbiProvider", {
|
|
8087
8223
|
enumerable: true,
|
|
8088
|
-
get: function () { return
|
|
8224
|
+
get: function () { return chunkR2MF7YCW_cjs.ArbiProvider; }
|
|
8089
8225
|
});
|
|
8090
8226
|
Object.defineProperty(exports, "useArbi", {
|
|
8091
8227
|
enumerable: true,
|
|
8092
|
-
get: function () { return
|
|
8228
|
+
get: function () { return chunkR2MF7YCW_cjs.useArbi; }
|
|
8093
8229
|
});
|
|
8094
8230
|
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
8095
8231
|
enumerable: true,
|
|
8096
|
-
get: function () { return
|
|
8232
|
+
get: function () { return chunkR2MF7YCW_cjs.useDeploymentDomain; }
|
|
8097
8233
|
});
|
|
8098
8234
|
Object.defineProperty(exports, "Arbi", {
|
|
8099
8235
|
enumerable: true,
|
|
@@ -8129,6 +8265,7 @@ exports.AiActionCard = AiActionCard;
|
|
|
8129
8265
|
exports.AiAnswer = AiAnswer;
|
|
8130
8266
|
exports.AppleIcon = AppleIcon;
|
|
8131
8267
|
exports.ArbiBotIcon = ArbiBotIcon;
|
|
8268
|
+
exports.ArbiSessionStateProvider = ArbiSessionStateProvider;
|
|
8132
8269
|
exports.ArbiWebSocketProvider = ArbiWebSocketProvider;
|
|
8133
8270
|
exports.ArtifactCanvas = ArtifactCanvas;
|
|
8134
8271
|
exports.ChatBubble = ChatBubble;
|
|
@@ -8151,6 +8288,7 @@ exports.DocumentGallery = DocumentGallery;
|
|
|
8151
8288
|
exports.DocumentReview = DocumentReview;
|
|
8152
8289
|
exports.DocumentTable = DocumentTable;
|
|
8153
8290
|
exports.DraftTitleControls = DraftTitleControls;
|
|
8291
|
+
exports.EMPTY_SESSION_STATE = EMPTY_SESSION_STATE;
|
|
8154
8292
|
exports.FileIcon = FileIcon;
|
|
8155
8293
|
exports.FireworksIcon = FireworksIcon;
|
|
8156
8294
|
exports.GeminiIcon = GeminiIcon;
|
|
@@ -8182,6 +8320,7 @@ exports.announceMailDraftReplaced = announceMailDraftReplaced;
|
|
|
8182
8320
|
exports.arbiAccountClient = arbiAccountClient;
|
|
8183
8321
|
exports.arbiMailClient = arbiMailClient;
|
|
8184
8322
|
exports.captureFrameAsBlob = captureFrameAsBlob;
|
|
8323
|
+
exports.createArbiSessionStore = createArbiSessionStore;
|
|
8185
8324
|
exports.createMailClient = createMailClient;
|
|
8186
8325
|
exports.cropImage = cropImage;
|
|
8187
8326
|
exports.dayKey = dayKey;
|
|
@@ -8204,11 +8343,14 @@ exports.mailJson = mailJson;
|
|
|
8204
8343
|
exports.mailQueryKeys = mailQueryKeys;
|
|
8205
8344
|
exports.mountDiditVerification = mountDiditVerification;
|
|
8206
8345
|
exports.nextAliasSuggestion = nextAliasSuggestion;
|
|
8346
|
+
exports.nextViewingDocument = nextViewingDocument;
|
|
8207
8347
|
exports.parseActivityContent = parseActivityContent;
|
|
8208
8348
|
exports.parseDeleteAccountBlockers = parseDeleteAccountBlockers;
|
|
8209
8349
|
exports.pickRecentWorkspaces = pickRecentWorkspaces;
|
|
8210
8350
|
exports.redlineStats = redlineStats;
|
|
8211
8351
|
exports.resolveActiveWorkspace = resolveActiveWorkspace;
|
|
8352
|
+
exports.selectIsGenerating = selectIsGenerating;
|
|
8353
|
+
exports.selectViewingDocumentId = selectViewingDocumentId;
|
|
8212
8354
|
exports.textToArtifact = textToArtifact;
|
|
8213
8355
|
exports.titleFromQuestion = titleFromQuestion;
|
|
8214
8356
|
exports.toChatCitations = toChatCitations;
|
|
@@ -8227,8 +8369,9 @@ exports.useAiTask = useAiTask;
|
|
|
8227
8369
|
exports.useArbiChat = useArbiChat;
|
|
8228
8370
|
exports.useArbiConnected = useArbiConnected;
|
|
8229
8371
|
exports.useArbiDocumentSync = useArbiDocumentSync;
|
|
8372
|
+
exports.useArbiSessionState = useArbiSessionState;
|
|
8373
|
+
exports.useArbiSessionStore = useArbiSessionStore;
|
|
8230
8374
|
exports.useArbiShellWorkspaces = useArbiShellWorkspaces;
|
|
8231
|
-
exports.useArbiUiStore = useArbiUiStore;
|
|
8232
8375
|
exports.useArbiWebSocket = useArbiWebSocket;
|
|
8233
8376
|
exports.useArbiWsContext = useArbiWsContext;
|
|
8234
8377
|
exports.useArbiWsMessage = useArbiWsMessage;
|
|
@@ -8236,6 +8379,7 @@ exports.useArbiWsStatus = useArbiWsStatus;
|
|
|
8236
8379
|
exports.useArbiWsStore = useArbiWsStore;
|
|
8237
8380
|
exports.useArbiWsTask = useArbiWsTask;
|
|
8238
8381
|
exports.useArbiWsTasks = useArbiWsTasks;
|
|
8382
|
+
exports.useAuthorizeLimits = useAuthorizeLimits;
|
|
8239
8383
|
exports.useAvatarCrop = useAvatarCrop;
|
|
8240
8384
|
exports.useCameraStream = useCameraStream;
|
|
8241
8385
|
exports.useClaimNativeAlias = useClaimNativeAlias;
|
|
@@ -8261,6 +8405,7 @@ exports.useDisconnectMailAccount = useDisconnectMailAccount;
|
|
|
8261
8405
|
exports.useEmailChange = useEmailChange;
|
|
8262
8406
|
exports.useFilteredProjects = useFilteredProjects;
|
|
8263
8407
|
exports.useFollowThread = useFollowThread;
|
|
8408
|
+
exports.useGenerateAgentAvatar = useGenerateAgentAvatar;
|
|
8264
8409
|
exports.useGrantAgentAccess = useGrantAgentAccess;
|
|
8265
8410
|
exports.useIdentityVerification = useIdentityVerification;
|
|
8266
8411
|
exports.useIdentityVerificationFlow = useIdentityVerificationFlow;
|
|
@@ -8279,6 +8424,7 @@ exports.useMailOnline = useMailOnline;
|
|
|
8279
8424
|
exports.useMailPolicy = useMailPolicy;
|
|
8280
8425
|
exports.useMailProjects = useMailProjects;
|
|
8281
8426
|
exports.useMailUnlock = useMailUnlock;
|
|
8427
|
+
exports.useMcpTools = useMcpTools;
|
|
8282
8428
|
exports.useNameEditor = useNameEditor;
|
|
8283
8429
|
exports.useNotificationPreferences = useNotificationPreferences;
|
|
8284
8430
|
exports.usePasswordChange = usePasswordChange;
|
|
@@ -8317,6 +8463,7 @@ exports.useUploadSkillFiles = useUploadSkillFiles;
|
|
|
8317
8463
|
exports.useUserSettings = useUserSettings;
|
|
8318
8464
|
exports.useVideoRecorder = useVideoRecorder;
|
|
8319
8465
|
exports.useWorkNotifications = useWorkNotifications;
|
|
8466
|
+
exports.useWorkflowRuns = useWorkflowRuns;
|
|
8320
8467
|
exports.useWorkflows = useWorkflows;
|
|
8321
8468
|
exports.useWorkspaceDocs = useWorkspaceDocs;
|
|
8322
8469
|
exports.useWorkspaceNotificationLevel = useWorkspaceNotificationLevel;
|