@arbidocs/react 0.5.48 → 0.5.50
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/annotations/freeze/index.cjs +14 -14
- package/dist/annotations/freeze/index.js +3 -3
- package/dist/annotations/index.cjs +48 -48
- package/dist/annotations/index.js +2 -2
- package/dist/artifacts/index.cjs +4 -4
- package/dist/artifacts/index.js +3 -3
- package/dist/bundle-DCWPYNGD.cjs +14 -0
- package/dist/{bundle-IC65W2AO.cjs.map → bundle-DCWPYNGD.cjs.map} +1 -1
- package/dist/bundle-JCKKGEJE.js +5 -0
- package/dist/{bundle-YNOX7VIL.js.map → bundle-JCKKGEJE.js.map} +1 -1
- package/dist/calls/livekit/index.cjs +43 -43
- package/dist/calls/livekit/index.js +4 -4
- package/dist/{chunk-NIKPG4PW.js → chunk-A2XSLTIP.js} +3 -3
- package/dist/{chunk-NIKPG4PW.js.map → chunk-A2XSLTIP.js.map} +1 -1
- package/dist/{chunk-PC4O3JDV.cjs → chunk-B6I2HRRF.cjs} +3 -3
- package/dist/{chunk-PC4O3JDV.cjs.map → chunk-B6I2HRRF.cjs.map} +1 -1
- package/dist/{chunk-E76255DQ.js → chunk-BIHGAW4G.js} +3 -3
- package/dist/{chunk-E76255DQ.js.map → chunk-BIHGAW4G.js.map} +1 -1
- package/dist/{chunk-QN4UN6KG.js → chunk-CMNZI4WQ.js} +3 -3
- package/dist/{chunk-QN4UN6KG.js.map → chunk-CMNZI4WQ.js.map} +1 -1
- package/dist/{chunk-25PMGZT7.cjs → chunk-FSPLYO52.cjs} +3 -3
- package/dist/{chunk-25PMGZT7.cjs.map → chunk-FSPLYO52.cjs.map} +1 -1
- package/dist/{chunk-FNV5V2J2.js → chunk-JQSHGBNI.js} +4 -4
- package/dist/{chunk-FNV5V2J2.js.map → chunk-JQSHGBNI.js.map} +1 -1
- package/dist/{chunk-IBBV5A5M.js → chunk-KOLCL4KV.js} +3 -3
- package/dist/{chunk-IBBV5A5M.js.map → chunk-KOLCL4KV.js.map} +1 -1
- package/dist/{chunk-DWCST7NF.js → chunk-KUGZXI7V.js} +3 -3
- package/dist/{chunk-DWCST7NF.js.map → chunk-KUGZXI7V.js.map} +1 -1
- package/dist/{chunk-J5DUAVNR.cjs → chunk-ME4TS33T.cjs} +3 -3
- package/dist/{chunk-J5DUAVNR.cjs.map → chunk-ME4TS33T.cjs.map} +1 -1
- package/dist/{chunk-NETQSWIK.cjs → chunk-ONGNP4JM.cjs} +3 -3
- package/dist/{chunk-NETQSWIK.cjs.map → chunk-ONGNP4JM.cjs.map} +1 -1
- package/dist/{chunk-YCDRSSDT.cjs → chunk-SUZORMAB.cjs} +3 -3
- package/dist/{chunk-YCDRSSDT.cjs.map → chunk-SUZORMAB.cjs.map} +1 -1
- package/dist/{chunk-NSNTGXTW.js → chunk-T4CLW3DN.js} +3 -3
- package/dist/{chunk-NSNTGXTW.js.map → chunk-T4CLW3DN.js.map} +1 -1
- package/dist/{chunk-F7MTKPV5.cjs → chunk-TUPSNW3B.cjs} +3 -3
- package/dist/{chunk-F7MTKPV5.cjs.map → chunk-TUPSNW3B.cjs.map} +1 -1
- package/dist/{chunk-6N7PXOR5.cjs → chunk-W7DQJT4T.cjs} +6 -6
- package/dist/{chunk-6N7PXOR5.cjs.map → chunk-W7DQJT4T.cjs.map} +1 -1
- package/dist/document-tools/index.cjs +48 -48
- package/dist/document-tools/index.js +7 -7
- package/dist/index.cjs +749 -696
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +92 -39
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +33 -33
- package/dist/shell/index.js +2 -2
- package/dist/ui/index.cjs +148 -148
- package/dist/ui/index.js +2 -2
- package/dist/viewers/index.cjs +5 -5
- package/dist/viewers/index.js +2 -2
- package/package.json +3 -3
- package/dist/bundle-IC65W2AO.cjs +0 -14
- package/dist/bundle-YNOX7VIL.js +0 -5
package/dist/index.d.cts
CHANGED
|
@@ -2321,9 +2321,15 @@ declare function useDeleteConfig(): _tanstack_react_query.UseMutationResult<{
|
|
|
2321
2321
|
*
|
|
2322
2322
|
* save(instrument, field, value, title?) one field (a switch)
|
|
2323
2323
|
* saveDelta(changes, title?) several at once: { Agents: { ENABLED: true, … } }
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2324
|
+
*
|
|
2325
|
+
* `baseConfigId`: the config a host shows (it can differ from the chat's), which saves build on
|
|
2326
|
+
* instead. Each save reads it first, so one made while it loads keeps its overrides, and builds on
|
|
2327
|
+
* the config the previous save made, so quick edits keep each other, also once the host shows a
|
|
2328
|
+
* config one of them made. The config a save makes becomes the chat's (`session.chatModel`), so
|
|
2329
|
+
* the host shows and uses it. A base that cannot be read is reported like a refused save.
|
|
2330
|
+
*/
|
|
2331
|
+
declare function useSaveConfigField(baseConfigId?: string | null): {
|
|
2332
|
+
save: (instrument: string, field: string, value: unknown, title?: string) => undefined;
|
|
2327
2333
|
saveDelta: (changes: Record<string, Record<string, unknown>>, title?: string) => Promise<{
|
|
2328
2334
|
external_id: string;
|
|
2329
2335
|
title: string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -2321,9 +2321,15 @@ declare function useDeleteConfig(): _tanstack_react_query.UseMutationResult<{
|
|
|
2321
2321
|
*
|
|
2322
2322
|
* save(instrument, field, value, title?) one field (a switch)
|
|
2323
2323
|
* saveDelta(changes, title?) several at once: { Agents: { ENABLED: true, … } }
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2324
|
+
*
|
|
2325
|
+
* `baseConfigId`: the config a host shows (it can differ from the chat's), which saves build on
|
|
2326
|
+
* instead. Each save reads it first, so one made while it loads keeps its overrides, and builds on
|
|
2327
|
+
* the config the previous save made, so quick edits keep each other, also once the host shows a
|
|
2328
|
+
* config one of them made. The config a save makes becomes the chat's (`session.chatModel`), so
|
|
2329
|
+
* the host shows and uses it. A base that cannot be read is reported like a refused save.
|
|
2330
|
+
*/
|
|
2331
|
+
declare function useSaveConfigField(baseConfigId?: string | null): {
|
|
2332
|
+
save: (instrument: string, field: string, value: unknown, title?: string) => undefined;
|
|
2327
2333
|
saveDelta: (changes: Record<string, Record<string, unknown>>, title?: string) => Promise<{
|
|
2328
2334
|
external_id: string;
|
|
2329
2335
|
title: string | null;
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { AUDIENCE_CHOICES, CALL_CAPTION_TOPIC, CALL_CHAT_MAX_CHARS, CALL_CHAT_TOPIC, CALL_MODERATION_TOPIC, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, CALL_WEBINAR_TOPIC, CAPTION_MAX_CHARS, COMPOSITE_AUDIO_BITS_PER_SECOND, COMPOSITE_VIDEO_BITS_PER_SECOND, DEFAULT_JOIN_CHOICES, EMPTY_CALL_SESSION, EXPORT_SAMPLE_RATE, HISTORY_LIMIT, LIVE_SEGMENTER, MAX_AVATAR_FILE_BYTES, MUTED_DEDUPE_MS, PLAYBACK_LOOKAHEAD_MS, READ_ONLY_MEETING_TEXT, RECORDING_CHUNK_MS, RECORDING_SEGMENTER, SEGMENT_FRAME_MS, SEGMENT_ID_PATTERN, SEGMENT_PRE_ROLL_MS, SHORT_PIECE_MERGE_GAP_MS, SPEAKER_AUDIO_BITS_PER_SECOND, TrackUploader, UPLOAD_ATTEMPTS, UPLOAD_BACKOFF_MS, acceptRing, addConversationToList, appendToThread, applyAgentDmStatus, applyCallEvent, applyChatEvent, applyChatMessage, applyChatRead, applyChatUpdated, arbiAccountClient, buildMeetingChatBody, cachedChat, cachedChats, callLink, callMemberKeys, callSession, chatByExtId, chatHasLiveCall, chatLiveCallId, chatTranscriptRef, clearMeetingChatCache, clearTrackUploaders, clockTime, compositeFiles, compositeTrack, conversationKeyForCall, createMutedNotifier, createTrackCutter, cutAtPauses, declineRing, decodeCallChatPacket, decodeCaptionPacket, decodeMono16k, decryptPart, encodeCallChatPacket, encodeCaptionPacket, encodeWav, encryptPart, ensureMeetingChat, entitlementRefusal, extensionFor, fetchPart, fileSafe, findConversation, floatToWav, formatTranscriptMarkdown, getOpenChat, hasRecordingTranscript, invalidateCall, invalidateConversationDetails, invalidateConversationLists, isConversationListKey, isConversationShared, isKnownSoloConversation, isRecordingOver, isRecordingSegmentId, isRetryable, isWorkspaceGuestOf, joinFromPreJoin, knownMeetingChat, loadMeetingHistory, markRejoining, meetingChatRefFrom, meetingRefForCall, mergeChatLines, mutedNoticeFromEvent, mutedNoticeFromPacket, mutedNoticeText, myChatId, newPacketId, newSegmentId, newTrackKey, nextSeqAfter, onCallEvent, openCall, openQuestion, openRecording, parseWebinarPacket, partKey, partOffsetMs, partsDue, patchConversation, patchConversationList, persistMeetingMessage, persistTranscriptSegment, playheadAt, postRecordingDocsToThread, postTranscriptToThread, recordingFiles, recordingWindowsOf, rejoinAsAudience, removeChat, removeConversationFromLists, resetCallSession, resolveMeetingChat, saveRecordingFilesToThread, schedulePart, sealQuestionText, serverCallsExperimental, setOpenChat, sortTranscriptMessages, sortedParts, speakerTracks, speakerWav, splitIntoFiles, standalone, startChatCall, startContactsCall, startDmCall, startThreadCall, startsMediaFile, storeTranscriptSegment, stripSpeakerPrefix, supersedeLiveTranscript, supersededTranscriptLines, threadHasLiveCall, threadLiveCallId, threadTranscriptLines, threadTranscriptRef, threadTranscriptText, timelineDurationMs, timelineOf, toProfileView, trackUploaderFor, transcribeRecording, transcriptPersistRole, transcriptSegmentOf, unwrapTrackKey, upsertChat, useAccountClient, useAvatarCrop, useCall, useCallInviteLinks, useCallRecording, useCallRecordings, useCallSession, useCallTranscriptionAvailable, useCallsConfig, useCallsEnabled, useCanHostCalls, useEntitlements, useIsEntitled, useMeetingReadOnly, useNameEditor, useOpenCallMeetingChat, useProfile, useRecordingActions, useRecordingWindows, useRevokeCallInviteLink, useSaveToThread, useServerCallsEnabled, useServerCallsExperimental, useUpdateProfile, wrapTrackKey, writeSamples } from './chunk-FNV5V2J2.js';
|
|
1
|
+
import { invalidateConversationLists, patchConversation, invalidateConversationDetails, removeConversationFromLists, addConversationToList, findConversation, isConversationShared, isKnownSoloConversation, patchConversationList, useAccountClient, myChatId, upsertChat, appendToThread, dropFromThread, deleteChatMessage, removeChat, getOpenChat, cachedChat, applyChatEvent, applyCallEvent } from './chunk-JQSHGBNI.js';
|
|
2
|
+
export { AUDIENCE_CHOICES, CALL_CAPTION_TOPIC, CALL_CHAT_MAX_CHARS, CALL_CHAT_TOPIC, CALL_MODERATION_TOPIC, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, CALL_WEBINAR_TOPIC, CAPTION_MAX_CHARS, COMPOSITE_AUDIO_BITS_PER_SECOND, COMPOSITE_VIDEO_BITS_PER_SECOND, DEFAULT_JOIN_CHOICES, EMPTY_CALL_SESSION, EXPORT_SAMPLE_RATE, HISTORY_LIMIT, LIVE_SEGMENTER, MAX_AVATAR_FILE_BYTES, MUTED_DEDUPE_MS, PLAYBACK_LOOKAHEAD_MS, READ_ONLY_MEETING_TEXT, RECORDING_CHUNK_MS, RECORDING_SEGMENTER, SEGMENT_FRAME_MS, SEGMENT_ID_PATTERN, SEGMENT_PRE_ROLL_MS, SHORT_PIECE_MERGE_GAP_MS, SPEAKER_AUDIO_BITS_PER_SECOND, TrackUploader, UPLOAD_ATTEMPTS, UPLOAD_BACKOFF_MS, acceptRing, addConversationToList, appendToThread, applyAgentDmStatus, applyCallEvent, applyChatEvent, applyChatMessage, applyChatRead, applyChatUpdated, arbiAccountClient, buildMeetingChatBody, cachedChat, cachedChats, callLink, callMemberKeys, callSession, chatByExtId, chatHasLiveCall, chatLiveCallId, chatTranscriptRef, clearMeetingChatCache, clearTrackUploaders, clockTime, compositeFiles, compositeTrack, conversationKeyForCall, createMutedNotifier, createTrackCutter, cutAtPauses, declineRing, decodeCallChatPacket, decodeCaptionPacket, decodeMono16k, decryptPart, encodeCallChatPacket, encodeCaptionPacket, encodeWav, encryptPart, ensureMeetingChat, entitlementRefusal, extensionFor, fetchPart, fileSafe, findConversation, floatToWav, formatTranscriptMarkdown, getOpenChat, hasRecordingTranscript, invalidateCall, invalidateConversationDetails, invalidateConversationLists, isConversationListKey, isConversationShared, isKnownSoloConversation, isRecordingOver, isRecordingSegmentId, isRetryable, isWorkspaceGuestOf, joinFromPreJoin, knownMeetingChat, loadMeetingHistory, markRejoining, meetingChatRefFrom, meetingRefForCall, mergeChatLines, mutedNoticeFromEvent, mutedNoticeFromPacket, mutedNoticeText, myChatId, newPacketId, newSegmentId, newTrackKey, nextSeqAfter, onCallEvent, openCall, openQuestion, openRecording, parseWebinarPacket, partKey, partOffsetMs, partsDue, patchConversation, patchConversationList, persistMeetingMessage, persistTranscriptSegment, playheadAt, postRecordingDocsToThread, postTranscriptToThread, recordingFiles, recordingWindowsOf, rejoinAsAudience, removeChat, removeConversationFromLists, resetCallSession, resolveMeetingChat, saveRecordingFilesToThread, schedulePart, sealQuestionText, serverCallsExperimental, setOpenChat, sortTranscriptMessages, sortedParts, speakerTracks, speakerWav, splitIntoFiles, standalone, startChatCall, startContactsCall, startDmCall, startThreadCall, startsMediaFile, storeTranscriptSegment, stripSpeakerPrefix, supersedeLiveTranscript, supersededTranscriptLines, threadHasLiveCall, threadLiveCallId, threadTranscriptLines, threadTranscriptRef, threadTranscriptText, timelineDurationMs, timelineOf, toProfileView, trackUploaderFor, transcribeRecording, transcriptPersistRole, transcriptSegmentOf, unwrapTrackKey, upsertChat, useAccountClient, useAvatarCrop, useCall, useCallInviteLinks, useCallRecording, useCallRecordings, useCallSession, useCallTranscriptionAvailable, useCallsConfig, useCallsEnabled, useCanHostCalls, useEntitlements, useIsEntitled, useMeetingReadOnly, useNameEditor, useOpenCallMeetingChat, useProfile, useRecordingActions, useRecordingWindows, useRevokeCallInviteLink, useSaveToThread, useServerCallsEnabled, useServerCallsExperimental, useUpdateProfile, wrapTrackKey, writeSamples } from './chunk-JQSHGBNI.js';
|
|
4
3
|
import { replayableTagMutations, patchDocuments, setCachedDocument, adjustTagCounts, patchCachedDocument, FINISHED_DOCUMENT_STATUSES, refreshDocuments, getCachedDocuments, useArbiWsStore, IN_FLIGHT_DOCUMENT_STATUSES, forgetDocuments, useSimilarDocuments, SIMILARITY_THRESHOLD, useDocuments, finishEntityExtraction } from './chunk-MJWUUDYT.js';
|
|
5
4
|
export { DISMISSED_TASK_TTL_MS, DOCUMENTS_FIRST_PAGE_MEASURE, DOCUMENTS_FIRST_PAGE_SIZE, DOCUMENTS_PAGE_SIZE, FINISHED_DOCUMENT_STATUSES, IN_FLIGHT_DOCUMENT_STATUSES, SIMILARITY_THRESHOLD, adjustTagCounts, dropTagFromCachedDocuments, finishEntityExtraction, forgetDocuments, getCachedDocuments, invalidateTagData, invalidateTagTables, isDocumentsLoading, isRowNewer, isStaleTaskUpdate, patchCachedDocument, patchDocuments, patchWorkspaceTags, refreshDocuments, resolveDocumentStatus, setCachedDocument, settledByRows, startEntityExtraction, stopDocumentsLoading, subscribeDocumentRows, upsertDocuments, useArbiWsStore, useCreateTag, useDeleteTag, useDocument, useDocuments, useDocumentsById, useDocumentsLoading, useEntityExtractionDocIds, useExtractEntities, useInvalidateTagData, useIsCreatingTag, useRefreshDocuments, useSetTagValues, useSimilarDocuments, useTagKindSchema, useUpdateTag, useUpdateTagKindSchema } from './chunk-MJWUUDYT.js';
|
|
6
|
-
import { useArbiSessionState, useConversations, useArbiSession, useWorkspaces, useConfig, useArbiSessionStore, useAvailableModels, useParsedDocument, useTags, selectDraft, useConversationThreads, createArbiSessionStore, useAgents, useAssistantQuery, useActivity, queuedMessages, MIN_QUEUED_MESSAGE_VISIBILITY_MS } from './chunk-
|
|
7
|
-
export { DEFAULT_DOCUMENT_VIEWER_STATE, EMPTY_SESSION_STATE, MAX_THREAD_TABS, MIN_QUEUED_MESSAGE_VISIBILITY_MS, PROJECT_CREATION_DENIED_REASON, agentControl, clearSealedDrafts, closePanelIn, conversationKey, createArbiLayoutStore, createArbiSessionStore, createDebouncedWriter, createSealedDraftStorage, createStoragePersist, defaultLayoutState, dmTabId, flushOnPageExit, isPanelOpen, isUsageMetered, layoutActionsOf, nextViewingDocument, openPanelIn, panelPlace, parseSavedLayout, queuedMessages, restoreLayout, savedLayoutOf, selectDraft, selectIsGenerating, selectViewingDocumentId, threadTabId, useActivity, useAgents, useArbiSession, useArbiSessionState, useArbiSessionStore, useAssistantQuery, useAvailableModels, useBoxRole, useBuiltinCommands, useCanCreateProjects, useConfig, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocumentVersionList, useFirmPool, useHealth, useMessageDetails, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSessionPageTab, useSessionView, useSignedInSession, useTags, useThumbnails, useTopUpFirmPool, useTransientView, useUserUsageToday, useWorkspaceActivity, useWorkspaces } from './chunk-
|
|
8
|
-
import { fetchDocumentFile, downloadBlob, fetchMarkupPdf, fetchDocumentPdf } from './chunk-
|
|
5
|
+
import { useArbiSessionState, useConversations, useArbiSession, useWorkspaces, useConfig, useArbiSessionStore, useAvailableModels, useParsedDocument, useTags, selectDraft, useConversationThreads, createArbiSessionStore, useAgents, useAssistantQuery, useActivity, queuedMessages, MIN_QUEUED_MESSAGE_VISIBILITY_MS } from './chunk-BIHGAW4G.js';
|
|
6
|
+
export { DEFAULT_DOCUMENT_VIEWER_STATE, EMPTY_SESSION_STATE, MAX_THREAD_TABS, MIN_QUEUED_MESSAGE_VISIBILITY_MS, PROJECT_CREATION_DENIED_REASON, agentControl, clearSealedDrafts, closePanelIn, conversationKey, createArbiLayoutStore, createArbiSessionStore, createDebouncedWriter, createSealedDraftStorage, createStoragePersist, defaultLayoutState, dmTabId, flushOnPageExit, isPanelOpen, isUsageMetered, layoutActionsOf, nextViewingDocument, openPanelIn, panelPlace, parseSavedLayout, queuedMessages, restoreLayout, savedLayoutOf, selectDraft, selectIsGenerating, selectViewingDocumentId, threadTabId, useActivity, useAgents, useArbiSession, useArbiSessionState, useArbiSessionStore, useAssistantQuery, useAvailableModels, useBoxRole, useBuiltinCommands, useCanCreateProjects, useConfig, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocumentVersionList, useFirmPool, useHealth, useMessageDetails, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSessionPageTab, useSessionView, useSignedInSession, useTags, useThumbnails, useTopUpFirmPool, useTransientView, useUserUsageToday, useWorkspaceActivity, useWorkspaces } from './chunk-BIHGAW4G.js';
|
|
7
|
+
import { fetchDocumentFile, downloadBlob, fetchMarkupPdf, fetchDocumentPdf } from './chunk-KOLCL4KV.js';
|
|
9
8
|
import { arbiMutationKeys, arbiQueryKeys, mailQueryKeys, connectorQueryKeys, calendarQueryKeys } from './chunk-PBXJFMES.js';
|
|
10
9
|
export { arbiMutationKeys, arbiQueryKeys, calendarQueryKeys, callQueryKeys, connectorQueryKeys, isUnderQueryKey, mailQueryKeys } from './chunk-PBXJFMES.js';
|
|
11
|
-
import {
|
|
12
|
-
export {
|
|
13
|
-
import { ArbiHost, extractMentions, UNBOUND, bindingOfRow, readLegacyThreadDocuments, forgetLegacyThreadDocuments, toMessageMentions, takeDocumentForTurn, hasMessageBody, createSearchSession, clearSearchSession } from './chunk-QN4UN6KG.js';
|
|
14
|
-
export { LEGACY_THREAD_DOCUMENTS_KEY, MENTION_HREF_PREFIX, NotificationBell, Toaster, UNBOUND, bindingOfRow, clearSearchSession, createSearchSession, extractMentions, filterMentionCandidates, findMentionQuery, forgetLegacyThreadDocuments, hasMessageBody, insertMention, latestThreadOfDocument, linkMentions, mentionFromHref, openDocumentId, opensInWord, persistSearchSession, readLegacyThreadDocuments, requestSearch, savedDocumentIdFor, sharedSearchSession, takeDocumentForTurn, takePendingSearch, toMessageMentions, useOpenDocumentId, useRegisterOpenDocument, useTurnDocumentId } from './chunk-QN4UN6KG.js';
|
|
10
|
+
import { ArbiHost, extractMentions, UNBOUND, bindingOfRow, readLegacyThreadDocuments, forgetLegacyThreadDocuments, toMessageMentions, takeDocumentForTurn, hasMessageBody, createSearchSession, clearSearchSession } from './chunk-CMNZI4WQ.js';
|
|
11
|
+
export { LEGACY_THREAD_DOCUMENTS_KEY, MENTION_HREF_PREFIX, NotificationBell, Toaster, UNBOUND, bindingOfRow, clearSearchSession, createSearchSession, extractMentions, filterMentionCandidates, findMentionQuery, forgetLegacyThreadDocuments, hasMessageBody, insertMention, latestThreadOfDocument, linkMentions, mentionFromHref, openDocumentId, opensInWord, persistSearchSession, readLegacyThreadDocuments, requestSearch, savedDocumentIdFor, sharedSearchSession, takeDocumentForTurn, takePendingSearch, toMessageMentions, useOpenDocumentId, useRegisterOpenDocument, useTurnDocumentId } from './chunk-CMNZI4WQ.js';
|
|
15
12
|
import { notify } from './chunk-5HDC43MF.js';
|
|
16
13
|
export { DEFAULT_NOTIFY_TONE, MAX_SESSION_NOTIFICATIONS, configureNotify, notify, persistNotifyHistory, seedNotifications, selectUnread, toast, useNotify } from './chunk-5HDC43MF.js';
|
|
17
14
|
export { mergeHostConfig } from './chunk-DPYBZDJB.js';
|
|
18
15
|
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from './chunk-NNWMHMEC.js';
|
|
19
16
|
import './chunk-WUTL62MC.js';
|
|
20
|
-
import { returnFocusToMark, MarkMenu, getDocumentTitle, Badge, TagEntity, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed, AiMarkdown, Card, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Slider, getEntityLabel, getDocumentDate, usesOriginalBytesForViewer } from './chunk-
|
|
21
|
-
export { ARBI_MARK_SRC, AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, AudIcon, BASE_COLORS, Badge, COLUMN_LABEL_FALLBACKS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_METADATA_TAGS, DebouncedInput, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FireworksIcon, GeminiIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, ProviderIcon, 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, VerifiedToggle, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, buildFolderTree, canonicalFolderPath, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, entityNoun, extensionFromMime, formatDocDate, formatElapsed, formatFolderLabel, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentAuthor, getDocumentDate, getDocumentNature, getDocumentSubject, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, isAudioFile, isDocumentAddableToConversation, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, markdownToPlainText, markdownToPlainTextBlocks, pickRecorderMimeType, tagKindNouns, tagKindTitle, toggleVariants, useAudioRecorder, useDictateContext, usesOriginalBytesForViewer } from './chunk-
|
|
17
|
+
import { returnFocusToMark, MarkMenu, getDocumentTitle, Badge, TagEntity, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed, AiMarkdown, Card, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Slider, getEntityLabel, getDocumentDate, usesOriginalBytesForViewer } from './chunk-KUGZXI7V.js';
|
|
18
|
+
export { ARBI_MARK_SRC, AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, AudIcon, BASE_COLORS, Badge, COLUMN_LABEL_FALLBACKS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_METADATA_TAGS, DebouncedInput, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FireworksIcon, GeminiIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, ProviderIcon, 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, VerifiedToggle, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, buildFolderTree, canonicalFolderPath, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, entityNoun, extensionFromMime, formatDocDate, formatElapsed, formatFolderLabel, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentAuthor, getDocumentDate, getDocumentNature, getDocumentSubject, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, isAudioFile, isDocumentAddableToConversation, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, markdownToPlainText, markdownToPlainTextBlocks, pickRecorderMimeType, tagKindNouns, tagKindTitle, toggleVariants, useAudioRecorder, useDictateContext, usesOriginalBytesForViewer } from './chunk-KUGZXI7V.js';
|
|
22
19
|
import { getUserDisplayName, isAgent } from './chunk-APZZQZ6P.js';
|
|
23
20
|
export { Avatar, AvatarFallback, AvatarImage, DEFAULT_SEGMENTER_CONFIG, INITIAL_SEGMENTER_STATE, createUserAvatarIcon, flushSegmenter, getUserAvatarColor, getUserDisplayName, getUserInitials, isAgent, levelFromRms, stepSegmenter } from './chunk-APZZQZ6P.js';
|
|
24
21
|
import { MarkdownRenderer } from './chunk-C44GO33B.js';
|
|
@@ -31,9 +28,12 @@ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuIte
|
|
|
31
28
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, PortalContainerProvider, usePortalContainer } from './chunk-47CCGUWR.js';
|
|
32
29
|
import { normalizeCitationMarkup } from './chunk-QRCMKEE6.js';
|
|
33
30
|
export { closeOpenEmphasis, normalizeCitationMarkup, trimOpenCitation } from './chunk-QRCMKEE6.js';
|
|
34
|
-
export { useHostConfigRecord } from './chunk-CPZ36AQS.js';
|
|
35
31
|
import { cn } from './chunk-SN5YV6FF.js';
|
|
36
32
|
export { cn } from './chunk-SN5YV6FF.js';
|
|
33
|
+
import { AudioViewer, ImageViewer, VideoViewer } from './chunk-HDCRPPBW.js';
|
|
34
|
+
import { useArbi, useArbiHost } from './chunk-MB34NKBZ.js';
|
|
35
|
+
export { useArbi, useArbiHost, useDeploymentDomain } from './chunk-MB34NKBZ.js';
|
|
36
|
+
export { useHostConfigRecord } from './chunk-CPZ36AQS.js';
|
|
37
37
|
import React, { memo, useState, createContext, useMemo, useCallback, useEffect, useRef, useLayoutEffect, useSyncExternalStore, useContext, useId } from 'react';
|
|
38
38
|
import { useQueryClient, useMutation, useQuery, onlineManager, partialMatchKey, useMutationState, keepPreviousData, useQueries } from '@tanstack/react-query';
|
|
39
39
|
import { documents, doctags, houseTemplates, STOP_ID_WAIT_MS, resolveCitations, summarizeCitations, createIndexAssigner, reduceOutputItem, findReplyTarget, ArbiApiError, quotaFromStreamError, STOP_REPEAT_WINDOW_MS, getRunToCancel, pickMainThread, extractDocumentIdsFromMessages, extractFactIdsFromMessages, hydrateAgentSteps, getSubagentBranchRecord, getRunToAttach, settings, isConnectorVendorVisible, ACCOUNT_VENDOR, searchChunks, formatFileSize, chats, connectWithReconnect, ArbiWorkspaceSupersededError, identityErrorCode } from '@arbidocs/sdk/browser';
|
|
@@ -1459,41 +1459,94 @@ function configDelta(active, defaults) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
return delta;
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function deltaOnto(changes, active, defaults) {
|
|
1463
|
+
const delta = configDelta(active, defaults);
|
|
1464
|
+
for (const [instrument, fields] of Object.entries(changes)) {
|
|
1465
|
+
delta[instrument] = { ...delta[instrument] ?? {}, ...fields };
|
|
1466
|
+
const defaultInstrument = defaults[instrument];
|
|
1467
|
+
if (defaultInstrument) {
|
|
1468
|
+
const instrumentDelta = delta[instrument];
|
|
1469
|
+
for (const [field, value] of Object.entries(fields)) {
|
|
1470
|
+
if (JSON.stringify(value) === JSON.stringify(defaultInstrument[field])) {
|
|
1471
|
+
delete instrumentDelta[field];
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
if (Object.keys(instrumentDelta).length === 0) delete delta[instrument];
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return delta;
|
|
1478
|
+
}
|
|
1479
|
+
function useSaveConfigField(baseConfigId) {
|
|
1480
|
+
const arbi = useArbi();
|
|
1481
|
+
const queryClient = useQueryClient();
|
|
1463
1482
|
const saveConfig = useSaveConfig();
|
|
1464
1483
|
const { data: defaultConfig } = useConfig("default");
|
|
1465
1484
|
const chatModel = useArbiSessionState((state) => state.chatModel);
|
|
1466
1485
|
const { data: userSettings } = useUserSettings();
|
|
1467
|
-
const activeConfigId = chatModel || userSettings?.last_config || "default";
|
|
1486
|
+
const activeConfigId = baseConfigId || chatModel || userSettings?.last_config || "default";
|
|
1468
1487
|
const { data: activeConfigData } = useConfig(activeConfigId);
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1488
|
+
const session = useArbiSessionStore();
|
|
1489
|
+
const chain = useRef(null);
|
|
1490
|
+
const buildDelta = (changes) => deltaOnto(
|
|
1491
|
+
changes,
|
|
1492
|
+
activeConfigData ?? {},
|
|
1493
|
+
defaultConfig ?? {}
|
|
1494
|
+
);
|
|
1495
|
+
const readConfig = (configId) => queryClient.fetchQuery({
|
|
1496
|
+
queryKey: arbiQueryKeys.config(configId),
|
|
1497
|
+
queryFn: () => arbi.agentConfig.get(configId),
|
|
1498
|
+
staleTime: 10 * 60 * 1e3
|
|
1499
|
+
});
|
|
1500
|
+
const saveOnBase = (base, changes, title) => {
|
|
1501
|
+
const current = chain.current?.ids.has(base) ? chain.current : null;
|
|
1502
|
+
const ids = current?.ids ?? /* @__PURE__ */ new Set([base]);
|
|
1503
|
+
const from = current?.latest ?? Promise.resolve(base);
|
|
1504
|
+
const saved = from.then(async (configId) => {
|
|
1505
|
+
const [defaults, active] = await Promise.all([
|
|
1506
|
+
readConfig("default"),
|
|
1507
|
+
readConfig(configId)
|
|
1508
|
+
]).catch((error) => {
|
|
1509
|
+
notify.error(formatConfigValidationError(error), {
|
|
1510
|
+
description: "Configuration not saved \u2014 the settings it builds on could not be read."
|
|
1511
|
+
});
|
|
1512
|
+
throw error;
|
|
1513
|
+
});
|
|
1514
|
+
const response = await saveConfig.mutateAsync({
|
|
1515
|
+
...deltaOnto(changes, active ?? {}, defaults ?? {}),
|
|
1516
|
+
title
|
|
1517
|
+
});
|
|
1518
|
+
if (response?.external_id) {
|
|
1519
|
+
ids.add(response.external_id);
|
|
1520
|
+
const { chatModel: chatModel2 } = session.getState();
|
|
1521
|
+
const followsSettings = !chatModel2 && base === userSettings?.last_config;
|
|
1522
|
+
if (chain.current?.ids === ids && !followsSettings) {
|
|
1523
|
+
session.setChatModel(response.external_id);
|
|
1482
1524
|
}
|
|
1483
|
-
if (Object.keys(instrumentDelta).length === 0) delete delta[instrument];
|
|
1484
1525
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1526
|
+
return { response, configId: response?.external_id ?? configId };
|
|
1527
|
+
});
|
|
1528
|
+
chain.current = {
|
|
1529
|
+
ids,
|
|
1530
|
+
latest: Promise.all([from, saved]).then(
|
|
1531
|
+
([, done]) => done.configId,
|
|
1532
|
+
() => from
|
|
1533
|
+
)
|
|
1534
|
+
};
|
|
1535
|
+
return saved.then(({ response }) => response);
|
|
1487
1536
|
};
|
|
1488
1537
|
return {
|
|
1489
|
-
save: (instrument, field, value, title) =>
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
...buildDelta(changes),
|
|
1495
|
-
|
|
1496
|
-
|
|
1538
|
+
save: (instrument, field, value, title) => {
|
|
1539
|
+
const changes = { [instrument]: { [field]: value } };
|
|
1540
|
+
const name = title ?? `prefs-${Date.now()}`;
|
|
1541
|
+
if (baseConfigId) return void saveOnBase(baseConfigId, changes, name).catch(() => {
|
|
1542
|
+
});
|
|
1543
|
+
saveConfig.mutate({ ...buildDelta(changes), title: name });
|
|
1544
|
+
},
|
|
1545
|
+
saveDelta: (changes, title) => {
|
|
1546
|
+
const name = title ?? `prefs-${Date.now()}`;
|
|
1547
|
+
if (baseConfigId) return saveOnBase(baseConfigId, changes, name);
|
|
1548
|
+
return saveConfig.mutateAsync({ ...buildDelta(changes), title: name });
|
|
1549
|
+
},
|
|
1497
1550
|
isPending: saveConfig.isPending
|
|
1498
1551
|
};
|
|
1499
1552
|
}
|