@arbidocs/react 0.4.131 → 0.4.132
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-XV7EOUQM.js → chunk-3TISH7QU.js} +9 -4
- package/dist/chunk-3TISH7QU.js.map +1 -0
- 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-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-S7J5SCTZ.cjs → chunk-TYUQFRHF.cjs} +4 -4
- package/dist/{chunk-S7J5SCTZ.cjs.map → chunk-TYUQFRHF.cjs.map} +1 -1
- package/dist/{chunk-UN3AZUXX.cjs → chunk-UTZZMUHI.cjs} +34 -29
- package/dist/chunk-UTZZMUHI.cjs.map +1 -0
- 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 +352 -223
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +148 -23
- package/dist/index.d.ts +148 -23
- package/dist/index.js +157 -37
- 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.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { arbiQueryKeys, useDocuments, useConversations, useAssistantQuery, useConversationThreads, useWorkspaces, useParsedDocument, useTags, useActivity, useThumbnails } from './chunk-
|
|
2
|
-
export { PROJECT_CREATION_DENIED_REASON, arbiQueryKeys, isUsageMetered, useActivity, useAgents, useAssistantQuery, useCanCreateProjects, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocuments, useFacts, useFirmPool, useHealth, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useTags, useThumbnails, useTopUpFirmPool, useUserUsageToday, useWorkspaceActivity, useWorkspaceUsers, useWorkspaces } from './chunk-
|
|
3
|
-
import { downloadBlob } from './chunk-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { arbiQueryKeys, useDocuments, useConversations, useAssistantQuery, useConversationThreads, useWorkspaces, useParsedDocument, useTags, useActivity, useThumbnails } from './chunk-3TISH7QU.js';
|
|
2
|
+
export { PROJECT_CREATION_DENIED_REASON, arbiQueryKeys, isUsageMetered, useActivity, useAgents, useAssistantQuery, useCanCreateProjects, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocuments, useFacts, useFirmPool, useHealth, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useTags, useThumbnails, useTopUpFirmPool, useUserUsageToday, useWorkspaceActivity, useWorkspaceUsers, useWorkspaces } from './chunk-3TISH7QU.js';
|
|
3
|
+
import { downloadBlob } from './chunk-ZJ6NQ4M4.js';
|
|
4
|
+
import { parseVersionRef } from './chunk-NNWMHMEC.js';
|
|
5
|
+
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from './chunk-NNWMHMEC.js';
|
|
6
|
+
import './chunk-WUTL62MC.js';
|
|
7
|
+
import { formatRelativeTime } from './chunk-PPRKQK4P.js';
|
|
8
|
+
export { DEFAULT_NOTIFY_TONE, NotificationBell, Toaster, formatRelativeTime, notify, seedNotifications, selectUnread, toast, useNotify } from './chunk-PPRKQK4P.js';
|
|
7
9
|
import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, TagEntity, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Label, Slider, DocumentEntity, DocumentCard, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed, PassageCard } from './chunk-J3BYHBKW.js';
|
|
8
10
|
export { AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_SEGMENTER_CONFIG, DebouncedInput, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, INITIAL_SEGMENTER_STATE, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VIDEO_MIME_PREFERENCE, VISIBILITY_ICONS, VerifiedBadge, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, flushSegmenter, formatElapsed, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, levelFromRms, pickRecorderMimeType, stepSegmenter, toggleVariants, useAudioRecorder } from './chunk-J3BYHBKW.js';
|
|
9
11
|
import { MarkdownRenderer } from './chunk-C44GO33B.js';
|
|
@@ -19,8 +21,8 @@ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMe
|
|
|
19
21
|
import { cn } from './chunk-SN5YV6FF.js';
|
|
20
22
|
export { cn } from './chunk-SN5YV6FF.js';
|
|
21
23
|
import { AudioViewer, ImageViewer, VideoViewer } from './chunk-HDCRPPBW.js';
|
|
22
|
-
import { useArbi, ArbiContext } from './chunk-
|
|
23
|
-
export { ArbiProvider, useArbi, useDeploymentDomain } from './chunk-
|
|
24
|
+
import { useArbi, ArbiContext } from './chunk-CPPBN2JB.js';
|
|
25
|
+
export { ArbiProvider, useArbi, useDeploymentDomain } from './chunk-CPPBN2JB.js';
|
|
24
26
|
import React, { memo, useState, createContext, useMemo, useCallback, useEffect, useRef, useLayoutEffect, useContext, useId, useSyncExternalStore, Fragment as Fragment$1 } from 'react';
|
|
25
27
|
import { useQueryClient, useMutation, useQuery, onlineManager } from '@tanstack/react-query';
|
|
26
28
|
import { resolveCitations, summarizeCitations, settings, formatFileSize, connectWithReconnect, chats, identityErrorCode } from '@arbidocs/sdk/browser';
|
|
@@ -168,6 +170,30 @@ function useCreateAgent() {
|
|
|
168
170
|
onSuccess: () => qc.invalidateQueries({ queryKey: arbiQueryKeys.agents() })
|
|
169
171
|
});
|
|
170
172
|
}
|
|
173
|
+
function useGenerateAgentAvatar() {
|
|
174
|
+
const arbi = useArbi();
|
|
175
|
+
const qc = useQueryClient();
|
|
176
|
+
return useMutation({
|
|
177
|
+
mutationFn: ({ agentExtId, prompt }) => arbi.agents.generateAvatar(agentExtId, prompt),
|
|
178
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: arbiQueryKeys.agents() })
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function useAuthorizeLimits(options) {
|
|
182
|
+
const arbi = useArbi();
|
|
183
|
+
return useQuery({
|
|
184
|
+
queryKey: arbiQueryKeys.authorizeLimits(),
|
|
185
|
+
queryFn: () => arbi.agents.authorizeLimits(),
|
|
186
|
+
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function useMcpTools(options) {
|
|
190
|
+
const arbi = useArbi();
|
|
191
|
+
return useQuery({
|
|
192
|
+
queryKey: arbiQueryKeys.mcpTools(),
|
|
193
|
+
queryFn: () => arbi.health.mcpTools(),
|
|
194
|
+
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
195
|
+
});
|
|
196
|
+
}
|
|
171
197
|
function useAgentConfig(agentExtId, options) {
|
|
172
198
|
const arbi = useArbi();
|
|
173
199
|
return useQuery({
|
|
@@ -322,7 +348,7 @@ function useStartWorkQuery() {
|
|
|
322
348
|
function useAgentSession(agentId, options) {
|
|
323
349
|
const arbi = useArbi();
|
|
324
350
|
return useQuery({
|
|
325
|
-
queryKey:
|
|
351
|
+
queryKey: arbiQueryKeys.agentSession(agentId ?? ""),
|
|
326
352
|
queryFn: () => arbi.agents.getSession(agentId),
|
|
327
353
|
enabled: !!agentId && arbi.isLoggedIn && (options?.enabled ?? true),
|
|
328
354
|
refetchInterval: 5e3
|
|
@@ -331,26 +357,36 @@ function useAgentSession(agentId, options) {
|
|
|
331
357
|
function useAgentChats(agentId) {
|
|
332
358
|
const arbi = useArbi();
|
|
333
359
|
return useQuery({
|
|
334
|
-
queryKey:
|
|
360
|
+
queryKey: arbiQueryKeys.agentChats(agentId ?? ""),
|
|
335
361
|
queryFn: () => arbi.agents.listChats(agentId),
|
|
336
362
|
enabled: !!agentId && arbi.isLoggedIn,
|
|
337
363
|
refetchInterval: 5e3
|
|
338
364
|
});
|
|
339
365
|
}
|
|
366
|
+
function refreshAgentSession(qc, agentId) {
|
|
367
|
+
return Promise.all(
|
|
368
|
+
[
|
|
369
|
+
arbiQueryKeys.agentSession(agentId),
|
|
370
|
+
arbiQueryKeys.agentWorkspaces(agentId),
|
|
371
|
+
arbiQueryKeys.agentChats(agentId),
|
|
372
|
+
arbiQueryKeys.sessions()
|
|
373
|
+
].map((queryKey) => qc.invalidateQueries({ queryKey }))
|
|
374
|
+
);
|
|
375
|
+
}
|
|
340
376
|
function useStartAgentSession() {
|
|
341
377
|
const arbi = useArbi();
|
|
342
|
-
const
|
|
378
|
+
const qc = useQueryClient();
|
|
343
379
|
return useMutation({
|
|
344
380
|
mutationFn: ({ agentId, workspaceId }) => arbi.agents.startSession(agentId, workspaceId),
|
|
345
|
-
onSuccess: () =>
|
|
381
|
+
onSuccess: (_session, { agentId }) => refreshAgentSession(qc, agentId)
|
|
346
382
|
});
|
|
347
383
|
}
|
|
348
384
|
function useCloseAgentSession() {
|
|
349
385
|
const arbi = useArbi();
|
|
350
|
-
const
|
|
386
|
+
const qc = useQueryClient();
|
|
351
387
|
return useMutation({
|
|
352
388
|
mutationFn: (agentId) => arbi.agents.closeSession(agentId),
|
|
353
|
-
onSuccess: () =>
|
|
389
|
+
onSuccess: (_result, agentId) => refreshAgentSession(qc, agentId)
|
|
354
390
|
});
|
|
355
391
|
}
|
|
356
392
|
function previewText(content) {
|
|
@@ -2096,12 +2132,19 @@ function useFollowThread(conversationId, options) {
|
|
|
2096
2132
|
const save = useRelevanceSave();
|
|
2097
2133
|
const following = !!conversationId && !!settings$1.data?.followed_threads?.includes(conversationId);
|
|
2098
2134
|
const setFollowing = useCallback(
|
|
2099
|
-
(on) => {
|
|
2135
|
+
(on, callbacks) => {
|
|
2100
2136
|
if (!conversationId) return;
|
|
2101
2137
|
const current = qc.getQueryData(arbiQueryKeys.userSettings()) ?? settings$1.data;
|
|
2102
|
-
save.mutate(
|
|
2103
|
-
|
|
2104
|
-
|
|
2138
|
+
save.mutate(
|
|
2139
|
+
{
|
|
2140
|
+
followed_threads: settings.withMembership(
|
|
2141
|
+
current?.followed_threads,
|
|
2142
|
+
conversationId,
|
|
2143
|
+
on
|
|
2144
|
+
)
|
|
2145
|
+
},
|
|
2146
|
+
callbacks
|
|
2147
|
+
);
|
|
2105
2148
|
},
|
|
2106
2149
|
[qc, save, settings$1.data, conversationId]
|
|
2107
2150
|
);
|
|
@@ -6178,12 +6221,89 @@ function CommandPaletteProvider({
|
|
|
6178
6221
|
/* @__PURE__ */ jsx(CommandPalette, { open: isOpen, onOpenChange: setIsOpen, ...paletteProps })
|
|
6179
6222
|
] });
|
|
6180
6223
|
}
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6224
|
+
|
|
6225
|
+
// src/session/store.ts
|
|
6226
|
+
var EMPTY_SESSION_STATE = {
|
|
6227
|
+
workspaceId: null,
|
|
6228
|
+
conversationId: null,
|
|
6229
|
+
viewingDocument: null,
|
|
6230
|
+
selectedDocumentIds: [],
|
|
6231
|
+
generating: {},
|
|
6232
|
+
paMode: false,
|
|
6233
|
+
conversationDocuments: {}
|
|
6234
|
+
};
|
|
6235
|
+
var selectViewingDocumentId = (state) => state.viewingDocument ? parseVersionRef(state.viewingDocument.id).docId : null;
|
|
6236
|
+
var selectIsGenerating = (conversationId) => (state) => !!conversationId && !!state.generating[conversationId]?.isGenerating;
|
|
6237
|
+
function nextViewingDocument(current, input) {
|
|
6238
|
+
if (!input) return null;
|
|
6239
|
+
const same = current?.id === input.id;
|
|
6240
|
+
return {
|
|
6241
|
+
id: input.id,
|
|
6242
|
+
page: input.page !== void 0 ? input.page : same ? current?.page ?? null : null,
|
|
6243
|
+
passageId: input.passageId !== void 0 ? input.passageId : current?.passageId ?? null
|
|
6244
|
+
};
|
|
6245
|
+
}
|
|
6246
|
+
function createArbiSessionStore(initial = {}) {
|
|
6247
|
+
let state = { ...EMPTY_SESSION_STATE, ...initial };
|
|
6248
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
6249
|
+
const update = (patch) => {
|
|
6250
|
+
state = { ...state, ...patch };
|
|
6251
|
+
listeners.forEach((listener) => listener());
|
|
6252
|
+
};
|
|
6253
|
+
return {
|
|
6254
|
+
getState: () => state,
|
|
6255
|
+
subscribe: (listener) => {
|
|
6256
|
+
listeners.add(listener);
|
|
6257
|
+
return () => listeners.delete(listener);
|
|
6258
|
+
},
|
|
6259
|
+
setWorkspaceId: (workspaceId) => {
|
|
6260
|
+
if (state.workspaceId !== workspaceId) update({ workspaceId });
|
|
6261
|
+
},
|
|
6262
|
+
setConversationId: (conversationId) => {
|
|
6263
|
+
if (state.conversationId !== conversationId) update({ conversationId });
|
|
6264
|
+
},
|
|
6265
|
+
setViewingDocument: (input) => update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),
|
|
6266
|
+
setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),
|
|
6267
|
+
setConversationGenerating: (conversationId, isGenerating) => {
|
|
6268
|
+
const current = state.generating[conversationId];
|
|
6269
|
+
update({
|
|
6270
|
+
generating: {
|
|
6271
|
+
...state.generating,
|
|
6272
|
+
[conversationId]: {
|
|
6273
|
+
isGenerating,
|
|
6274
|
+
error: isGenerating ? null : current?.error ?? null,
|
|
6275
|
+
startTime: isGenerating ? Date.now() : null
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
});
|
|
6279
|
+
},
|
|
6280
|
+
setPaMode: (paMode) => {
|
|
6281
|
+
if (state.paMode !== paMode) update({ paMode });
|
|
6282
|
+
},
|
|
6283
|
+
setConversationDocuments: (conversationId, documents) => update({
|
|
6284
|
+
conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents }
|
|
6285
|
+
})
|
|
6286
|
+
};
|
|
6287
|
+
}
|
|
6288
|
+
var ArbiSessionStoreContext = createContext(null);
|
|
6289
|
+
var moduleDefault = null;
|
|
6290
|
+
var defaultStore = () => moduleDefault ??= createArbiSessionStore();
|
|
6291
|
+
function ArbiSessionStateProvider({
|
|
6292
|
+
store,
|
|
6293
|
+
children
|
|
6294
|
+
}) {
|
|
6295
|
+
const enclosing = useContext(ArbiSessionStoreContext);
|
|
6296
|
+
const [own] = useState(createArbiSessionStore);
|
|
6297
|
+
return /* @__PURE__ */ jsx(ArbiSessionStoreContext.Provider, { value: store ?? enclosing ?? own, children });
|
|
6298
|
+
}
|
|
6299
|
+
function useArbiSessionStore() {
|
|
6300
|
+
return useContext(ArbiSessionStoreContext) ?? defaultStore();
|
|
6301
|
+
}
|
|
6302
|
+
function useArbiSessionState(selector) {
|
|
6303
|
+
const store = useArbiSessionStore();
|
|
6304
|
+
const select = () => selector(store.getState());
|
|
6305
|
+
return useSyncExternalStore(store.subscribe, select, select);
|
|
6306
|
+
}
|
|
6187
6307
|
ModuleRegistry.registerModules([AllCommunityModule]);
|
|
6188
6308
|
function formatBytes(bytes) {
|
|
6189
6309
|
if (bytes == null || Number.isNaN(bytes)) return "\u2014";
|
|
@@ -6228,19 +6348,19 @@ function DocumentTable({
|
|
|
6228
6348
|
}
|
|
6229
6349
|
return map;
|
|
6230
6350
|
}, [tagsQuery.data]);
|
|
6231
|
-
const
|
|
6232
|
-
const
|
|
6233
|
-
const
|
|
6234
|
-
const
|
|
6351
|
+
const session = useArbiSessionStore();
|
|
6352
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6353
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6354
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6235
6355
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6236
6356
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6237
6357
|
const gridApiRef = React.useRef(null);
|
|
6238
6358
|
const openDocument = React.useCallback(
|
|
6239
6359
|
(id) => {
|
|
6240
|
-
|
|
6360
|
+
session.setViewingDocument({ id });
|
|
6241
6361
|
onOpenDocument?.(id);
|
|
6242
6362
|
},
|
|
6243
|
-
[onOpenDocument,
|
|
6363
|
+
[onOpenDocument, session]
|
|
6244
6364
|
);
|
|
6245
6365
|
const applySelection = React.useCallback(() => {
|
|
6246
6366
|
const api = gridApiRef.current;
|
|
@@ -6517,10 +6637,10 @@ function DocumentGallery({
|
|
|
6517
6637
|
);
|
|
6518
6638
|
const thumbsQuery = useThumbnails(docIds);
|
|
6519
6639
|
const thumbs = thumbsQuery.data ?? {};
|
|
6520
|
-
const
|
|
6521
|
-
const
|
|
6522
|
-
const
|
|
6523
|
-
const
|
|
6640
|
+
const session = useArbiSessionStore();
|
|
6641
|
+
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
6642
|
+
const storeSetSelected = session.setSelectedDocumentIds;
|
|
6643
|
+
const viewingDocId = useArbiSessionState(selectViewingDocumentId);
|
|
6524
6644
|
const effectiveSelected = selectedIds ?? storeSelected;
|
|
6525
6645
|
const emitSelection = onSelectionChange ?? storeSetSelected;
|
|
6526
6646
|
const selectedSet = React.useMemo(() => new Set(effectiveSelected), [effectiveSelected]);
|
|
@@ -6535,10 +6655,10 @@ function DocumentGallery({
|
|
|
6535
6655
|
);
|
|
6536
6656
|
const openDocument = React.useCallback(
|
|
6537
6657
|
(id) => {
|
|
6538
|
-
|
|
6658
|
+
session.setViewingDocument({ id });
|
|
6539
6659
|
onOpenDocument?.(id);
|
|
6540
6660
|
},
|
|
6541
|
-
[onOpenDocument,
|
|
6661
|
+
[onOpenDocument, session]
|
|
6542
6662
|
);
|
|
6543
6663
|
const arbi = useArbi();
|
|
6544
6664
|
const queryClient = useQueryClient();
|
|
@@ -7167,6 +7287,6 @@ function hasVideoTrack(blob) {
|
|
|
7167
7287
|
});
|
|
7168
7288
|
}
|
|
7169
7289
|
|
|
7170
|
-
export { AccountClientProvider, ActivityFeed, AiActionCard, AiAnswer, AppleIcon, ArbiBotIcon, ArbiWebSocketProvider, ArtifactCanvas, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocQaPanel, DocSearch, DocumentCardMenu, DocumentGallery, DocumentReview, DocumentTable, DraftTitleControls, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, ImageCropModal, ImageCropper, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, MailClientProvider, MailOfflineUnavailableError, MessageArtifactCard, MessageBubble, MessageThread, OpenAIIcon, PhotoCapture, ProviderIcon, RUN_WINDOW_MS, SemanticSearch, StartByEmail, TypingIndicator, VideoCapture, VoiceNoteRecorder, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, arbiAccountClient, arbiMailClient, captureFrameAsBlob, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, downloadRecoveryFile, fileAttachment, formatIdentityPrice, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isWorkspaceNotificationType, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, redlineStats, resolveActiveWorkspace, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useAccountClient, useActOnStep, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAiTask, useArbiChat, useArbiConnected, useArbiDocumentSync,
|
|
7290
|
+
export { AccountClientProvider, ActivityFeed, AiActionCard, AiAnswer, AppleIcon, ArbiBotIcon, ArbiSessionStateProvider, ArbiWebSocketProvider, ArtifactCanvas, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocQaPanel, DocSearch, DocumentCardMenu, DocumentGallery, DocumentReview, DocumentTable, DraftTitleControls, EMPTY_SESSION_STATE, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, ImageCropModal, ImageCropper, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, MailClientProvider, MailOfflineUnavailableError, MessageArtifactCard, MessageBubble, MessageThread, OpenAIIcon, PhotoCapture, ProviderIcon, RUN_WINDOW_MS, SemanticSearch, StartByEmail, TypingIndicator, VideoCapture, VoiceNoteRecorder, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, arbiAccountClient, arbiMailClient, captureFrameAsBlob, createArbiSessionStore, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, downloadRecoveryFile, fileAttachment, formatIdentityPrice, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isWorkspaceNotificationType, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, nextViewingDocument, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, redlineStats, resolveActiveWorkspace, selectIsGenerating, selectViewingDocumentId, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useAccountClient, useActOnStep, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAiTask, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiSessionState, useArbiSessionStore, useArbiShellWorkspaces, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAuthorizeLimits, useAvatarCrop, useCameraStream, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfirmEmailChange, useConnectMailAccount, useContacts, useConversationActivity, useConversationPendingAuth, useConversationUsage, useCreateAgent, useCreateContact, useCreateWork, useCreateWorkflow, useCurrentSessionId, useDeleteAccount, useDeleteAccountFlow, useDeleteContact, useDeleteWorkflow, useDirectMessages, useDisconnectMailAccount, useEmailChange, useFilteredProjects, useFollowThread, useGenerateAgentAvatar, useGrantAgentAccess, useIdentityVerification, useIdentityVerificationFlow, useInvalidateTagData, useInviteContacts, useMailAccounts, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useMcpTools, useNameEditor, useNotificationPreferences, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanWork, useProfile, useProjectConversationUsage, useProjectEvents, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveMailDraft, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetTagValues, useShellWorkspaces, useSignOut, useSkills, useStartAgentSession, useStartWorkQuery, useTagKindSchema, useTerminateSession, useUpdateContact, useUpdateConversation, useUpdateMailMessage, useUpdateProfile, useUpdateProjectFields, useUpdateTagKindSchema, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useVideoRecorder, useWorkNotifications, useWorkflows, useWorkspaceDocs, useWorkspaceNotificationLevel, userDisplayName, userInitials, workflowStepOf };
|
|
7171
7291
|
//# sourceMappingURL=index.js.map
|
|
7172
7292
|
//# sourceMappingURL=index.js.map
|