@arbidocs/blocks 0.5.43 → 0.5.44

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.
Files changed (91) hide show
  1. package/README.md +14 -0
  2. package/dist/{ConnectedNativeDocxComparison-52KQKJGY.js → ConnectedNativeDocxComparison-4DYPHNY2.js} +6 -6
  3. package/dist/{ConnectedNativeDocxComparison-52KQKJGY.js.map → ConnectedNativeDocxComparison-4DYPHNY2.js.map} +1 -1
  4. package/dist/{ConnectedNativeDocxComparison-UVLZGS2V.cjs → ConnectedNativeDocxComparison-OZE2SPNU.cjs} +7 -7
  5. package/dist/{ConnectedNativeDocxComparison-UVLZGS2V.cjs.map → ConnectedNativeDocxComparison-OZE2SPNU.cjs.map} +1 -1
  6. package/dist/{ConnectedNativeDocxEditor-BRBL3MOV.js → ConnectedNativeDocxEditor-F3EHJKDI.js} +5 -5
  7. package/dist/{ConnectedNativeDocxEditor-BRBL3MOV.js.map → ConnectedNativeDocxEditor-F3EHJKDI.js.map} +1 -1
  8. package/dist/{ConnectedNativeDocxEditor-KHR5I7W6.cjs → ConnectedNativeDocxEditor-MUM6YRPY.cjs} +7 -7
  9. package/dist/{ConnectedNativeDocxEditor-KHR5I7W6.cjs.map → ConnectedNativeDocxEditor-MUM6YRPY.cjs.map} +1 -1
  10. package/dist/{ConnectedStreamedWordArtifact-DSVFI7BX.cjs → ConnectedStreamedWordArtifact-F6M766FG.cjs} +7 -7
  11. package/dist/ConnectedStreamedWordArtifact-F6M766FG.cjs.map +1 -0
  12. package/dist/{ConnectedStreamedWordArtifact-EQUE6WT5.js → ConnectedStreamedWordArtifact-XUWLRRG5.js} +6 -6
  13. package/dist/{ConnectedStreamedWordArtifact-EQUE6WT5.js.map → ConnectedStreamedWordArtifact-XUWLRRG5.js.map} +1 -1
  14. package/dist/WorkspaceTableView-2CGEO5KK.cjs +1 -1
  15. package/dist/WorkspaceTableView-3ARFQYNO.js +1 -1
  16. package/dist/agents/index.cjs +326 -326
  17. package/dist/agents/index.js +4 -4
  18. package/dist/calls/index.cjs +73 -696
  19. package/dist/calls/index.cjs.map +1 -1
  20. package/dist/calls/index.js +10 -666
  21. package/dist/calls/index.js.map +1 -1
  22. package/dist/{chunk-3YZ3RUSB.cjs → chunk-3GHFTAOV.cjs} +4 -4
  23. package/dist/{chunk-3YZ3RUSB.cjs.map → chunk-3GHFTAOV.cjs.map} +1 -1
  24. package/dist/{chunk-6AJJJ5HR.cjs → chunk-5R256EMF.cjs} +671 -3
  25. package/dist/chunk-5R256EMF.cjs.map +1 -0
  26. package/dist/{chunk-EFDZRAW6.js → chunk-CG7EYB3J.js} +3 -3
  27. package/dist/{chunk-EFDZRAW6.js.map → chunk-CG7EYB3J.js.map} +1 -1
  28. package/dist/{chunk-YAGSGBVM.js → chunk-EY4IEOW3.js} +3 -3
  29. package/dist/{chunk-YAGSGBVM.js.map → chunk-EY4IEOW3.js.map} +1 -1
  30. package/dist/{chunk-YD3RN2FY.cjs → chunk-F72ZD5Q2.cjs} +3 -3
  31. package/dist/{chunk-YD3RN2FY.cjs.map → chunk-F72ZD5Q2.cjs.map} +1 -1
  32. package/dist/{chunk-E3IEZMRK.cjs → chunk-FKFGP7MQ.cjs} +18 -18
  33. package/dist/{chunk-E3IEZMRK.cjs.map → chunk-FKFGP7MQ.cjs.map} +1 -1
  34. package/dist/{chunk-WAIHNFUH.js → chunk-G5JENSLN.js} +3 -3
  35. package/dist/{chunk-WAIHNFUH.js.map → chunk-G5JENSLN.js.map} +1 -1
  36. package/dist/{chunk-O3MRE2HL.cjs → chunk-GUV63FUC.cjs} +11 -11
  37. package/dist/{chunk-O3MRE2HL.cjs.map → chunk-GUV63FUC.cjs.map} +1 -1
  38. package/dist/{chunk-REHG7VRQ.js → chunk-H6UK6LGL.js} +4 -4
  39. package/dist/{chunk-REHG7VRQ.js.map → chunk-H6UK6LGL.js.map} +1 -1
  40. package/dist/{chunk-75Z5AUMM.js → chunk-JS7KJRKG.js} +3 -3
  41. package/dist/{chunk-75Z5AUMM.js.map → chunk-JS7KJRKG.js.map} +1 -1
  42. package/dist/{chunk-TPNLYQD2.cjs → chunk-PV5A5SAC.cjs} +5 -5
  43. package/dist/{chunk-TPNLYQD2.cjs.map → chunk-PV5A5SAC.cjs.map} +1 -1
  44. package/dist/{chunk-K53QRFPJ.cjs → chunk-QPDQYZIR.cjs} +4 -4
  45. package/dist/{chunk-K53QRFPJ.cjs.map → chunk-QPDQYZIR.cjs.map} +1 -1
  46. package/dist/{chunk-UZVXVTTB.cjs → chunk-QWSAJNQE.cjs} +9 -9
  47. package/dist/{chunk-UZVXVTTB.cjs.map → chunk-QWSAJNQE.cjs.map} +1 -1
  48. package/dist/{chunk-2QDNQM63.cjs → chunk-T5BCPKU3.cjs} +3 -3
  49. package/dist/{chunk-2QDNQM63.cjs.map → chunk-T5BCPKU3.cjs.map} +1 -1
  50. package/dist/{chunk-X7CXCEGO.js → chunk-T6KAZPOZ.js} +3 -3
  51. package/dist/{chunk-X7CXCEGO.js.map → chunk-T6KAZPOZ.js.map} +1 -1
  52. package/dist/{chunk-4U4NXFV5.js → chunk-TKTNXFAB.js} +666 -9
  53. package/dist/chunk-TKTNXFAB.js.map +1 -0
  54. package/dist/{chunk-FOIDBAZB.js → chunk-TOP5BMS7.js} +3 -3
  55. package/dist/{chunk-FOIDBAZB.js.map → chunk-TOP5BMS7.js.map} +1 -1
  56. package/dist/{chunk-7CHI36EP.js → chunk-VE6DHRXD.js} +3 -3
  57. package/dist/{chunk-7CHI36EP.js.map → chunk-VE6DHRXD.js.map} +1 -1
  58. package/dist/connect/docx.cjs +9 -9
  59. package/dist/connect/docx.js +5 -5
  60. package/dist/connect/index.cjs +1957 -774
  61. package/dist/connect/index.cjs.map +1 -1
  62. package/dist/connect/index.d.ts +1 -0
  63. package/dist/connect/index.js +1667 -487
  64. package/dist/connect/index.js.map +1 -1
  65. package/dist/connect/viewer.cjs +3 -3
  66. package/dist/connect/viewer.js +3 -3
  67. package/dist/connection/ConnectedFilterDropdown.d.ts +6 -0
  68. package/dist/connection/conversation/ConnectedConversation.d.ts +7 -9
  69. package/dist/connection/conversation/ConnectedConversationPage.d.ts +30 -0
  70. package/dist/connection/conversation/SemanticSearchButton.d.ts +12 -0
  71. package/dist/connection/files/imports/ConnectedAccountsImport.d.ts +16 -0
  72. package/dist/connection/files/imports/DriveImportPanel.d.ts +10 -0
  73. package/dist/connection/files/imports/EmailImportPanel.d.ts +21 -0
  74. package/dist/connection/files/imports/ImportHandoff.d.ts +24 -0
  75. package/dist/connection/files/imports/useDriveSyncTrigger.d.ts +11 -0
  76. package/dist/connection/files/imports/useEmailSyncTrigger.d.ts +11 -0
  77. package/dist/connection/files/imports/useImportHandoff.d.ts +20 -0
  78. package/dist/connection/files/index.d.ts +1 -0
  79. package/dist/facts/index.cjs +55 -55
  80. package/dist/facts/index.js +3 -3
  81. package/dist/index.cjs +384 -384
  82. package/dist/index.js +5 -5
  83. package/dist/settings/index.cjs +1 -1
  84. package/dist/settings/index.js +1 -1
  85. package/dist/workflow-canvas/index.cjs +17 -17
  86. package/dist/workflow-canvas/index.js +4 -4
  87. package/node_modules/@arbidocs/coedit/package.json +1 -1
  88. package/package.json +5 -5
  89. package/dist/ConnectedStreamedWordArtifact-DSVFI7BX.cjs.map +0 -1
  90. package/dist/chunk-4U4NXFV5.js.map +0 -1
  91. package/dist/chunk-6AJJJ5HR.cjs.map +0 -1
@@ -4,17 +4,17 @@ export { CAP_REACHED_MESSAGE, ZERO_BUDGET_MESSAGE, aiUsageResetTimestamp, format
4
4
  import { getRoleBadgeClass, formatRole, getRoleDescription, PageLoading, WorkspacePageFrame, WorkspaceIdentityPanel, WorkspaceProjectSlot, WorkspaceAudienceLine, CommonWorkspaceToggle, ExpandableSection, LeaveFooter, WorkspaceTypeBadge, ProjectPicker, ProjectOptionRow, WorkspaceFormModal, FormErrorBanner, WorkspaceFieldsView, FormActions, WorkspaceList, WorkspaceGroup, WorkspaceCard } from '../chunk-PPHUOWCJ.js';
5
5
  import { isAgentAccount, workspaceConversationCount, workspaceDocumentCount, isListedWorkspace, WORKSPACE_CATEGORY_FILTERS, projectFilterId, workspaceFilterAttributes, groupWorkspacesByProject, workspaceGroupStats, byRecentUpdate } from '../chunk-57CG33XJ.js';
6
6
  import { SharedFileView, SharedFilesInbox } from '../chunk-4ML5AMMO.js';
7
- import { buildFactCitations, citedVersionRef, chronologyFactBodies, docIdsOf, toFactCitations, FactsToolbar, FactsFieldsButton, FactComposer, FactDateInput, FactSourcesRow, FactsLoading, FactsLoadError, FactsEmptyState, FactsCalendar, FactsGanttPane, FactsBulkBar, FactSourceGroup, EMPTY_FACT_DATE_FIELDS, withoutChunk, factDateSpanToFields, FactFieldRow, FactLabelsCell, enableFactTableColumnResize, withChunk, factDateFieldsToSpan, createFactColumns, FactRowActions, withoutDoc, withDoc, sourceDocCount, DEFAULT_FACT_COLUMN_LABELS } from '../chunk-75Z5AUMM.js';
7
+ import { buildFactCitations, citedVersionRef, chronologyFactBodies, docIdsOf, toFactCitations, FactsToolbar, FactsFieldsButton, FactComposer, FactDateInput, FactSourcesRow, FactsLoading, FactsLoadError, FactsEmptyState, FactsCalendar, FactsGanttPane, FactsBulkBar, FactSourceGroup, EMPTY_FACT_DATE_FIELDS, withoutChunk, factDateSpanToFields, FactFieldRow, FactLabelsCell, enableFactTableColumnResize, withChunk, factDateFieldsToSpan, createFactColumns, FactRowActions, withoutDoc, withDoc, sourceDocCount, DEFAULT_FACT_COLUMN_LABELS } from '../chunk-JS7KJRKG.js';
8
8
  import { HomeLoadError, HomeFrame, HomeMain, HomeCenteredScroll, HomeCenteredColumn, DashboardRoot, DashboardBand, DashboardColumns, RecentList, DashboardAction, FactsStrip, FactMark, CreateTile } from '../chunk-RH4XIABH.js';
9
9
  import { ProjectBandTitle, PlainBandTitle } from '../chunk-RQKWYKZY.js';
10
10
  import '../chunk-WZ63HE2C.js';
11
11
  import { MessageJsonTree, DraggableHeader, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, DeleteAccountDialog, toDeleteBlockerViews, PremiumModelsFrame, ConnectionsLoading, ConnectionsError, ConnectionsEmpty, UsageToggle, SettingsPage, UsageSummary, AppearanceSettings, UsageLineChart, PlanStack, PlanNotice, PlanPickerCard, PlanPickerHeader, PricingToggle, PromoCodeInput, PlanActionButton, SyncDialogBody, SyncField, SyncSelect, SyncSmallNote, SyncLoading, SyncReconnectNotice, SyncNote, SyncTreeFrame, SyncLinkRow, SyncLinkButton, SyncOptions, SyncOptionToggle, SyncDialogFooter, InvoicesDialog, PlanDialogFrame, ProjectList, RenameDialog, SharedProjectsSection, SharedProjectRow, MoreInfo, MoreInfoList, UsagePanel, UsageQuotaHint, UsageSection, UsageLegend, UsageProportionBar, UsageActionButton, ProjectDetailHeader, PlanBadge, ProjectDetailSection, QuotaExceededDialogView, InviteContactsDialog, WelcomeDialog, applyTriStateFilters, PanelFrame, PanelAddButton, PanelFrameBody, PanelScroll, PanelActionsRow, applyInvertedIndexFilter, ConfigSwitcherBar, PanelNote, FloatingPanel, ProjectRow, QuotaMeter, FilterChip, buildInvertedIndex, serverConnectionView, ServerConnectionButton, ModelProviderLabel, PlanInfoPopover, PlanCardGrid, ReferralRewardSummary, CheckoutDialogFrame, SyncFolderRow, SyncFolderStatus, PlanTierOption, PlanActionRow, SubscriptionStatusView, DailyCapField, ConnectionCard, ReferralRewardNote } from '../chunk-ICCBNHPU.js';
12
12
  export { ConnectedAssistantDock, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useSemanticSearch, useWorkspaceDocs } from '../chunk-OPZBIGW4.js';
13
- import { useConnectedWorkspaceRole, ConnectedWorkflowLauncher, useConnectedWorkflowScopeSource, ConnectedWorkflowDocumentsField, ConnectedNativeDocxEditor, toWorkflowFieldDocument } from '../chunk-REHG7VRQ.js';
14
- export { ConnectedWorkflowDocumentsField, ConnectedWorkflowLauncher, ConnectedWorkflowsTable, DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, toWorkflowFieldDocument, useConnectedAgentOptions, useConnectedWorkflowScopeSource, useConnectedWorkspaceRole, useDocxCommentTarget, useNativeDocxSupport } from '../chunk-REHG7VRQ.js';
13
+ import { useConnectedWorkspaceRole, ConnectedWorkflowLauncher, useConnectedWorkflowScopeSource, ConnectedWorkflowDocumentsField, ConnectedNativeDocxEditor, toWorkflowFieldDocument } from '../chunk-H6UK6LGL.js';
14
+ export { ConnectedWorkflowDocumentsField, ConnectedWorkflowLauncher, ConnectedWorkflowsTable, DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, toWorkflowFieldDocument, useConnectedAgentOptions, useConnectedWorkflowScopeSource, useConnectedWorkspaceRole, useDocxCommentTarget, useNativeDocxSupport } from '../chunk-H6UK6LGL.js';
15
15
  import { ConnectedMarkdown, InternalDocLink, ExternalLink, DocumentWorkspaceContext } from '../chunk-4DDPMLGU.js';
16
16
  export { ConnectedDocumentToolsProvider, ConnectedMarkdown, DocumentChip, DocumentWorkspaceContext, ExternalLink, InternalDocLink, MailChip, MermaidDiagram, WorkspaceDocumentReference, useDocumentViewerSupport, useDocumentWorkspace, useViewerDraftDocument, useViewerIsDetached, useViewerPassageCitation, useViewerStreamingDocument } from '../chunk-4DDPMLGU.js';
17
- import { ExplorerFileTile, formatFolderSegment, hasFolderProviderIcon, FolderProviderIcon, ExplorerFolderTile, StatusPill, FailedStageIcon, DocumentNameCellFrame, DocumentRowMenu, visibilityToggleTooltip, FolderCell, FolderCommandList, RelatedDocsCell, FilterButton, DOCUMENTS_ROW_HEIGHT_INITIAL, searchExplorerDocuments, buildExplorerEntries, collectFolderDocs, joinFolderPath, getExplorerDisplayName, RECENTLY_DELETED_HINT, RECENTLY_DELETED_HINT_PLURAL, canDeleteDocument, ExplorerFrame, ExplorerStage, ExplorerScroller, ExplorerLoadingTiles, ExplorerEmpty, ExplorerMarquee, ExplorerDropOverlay, ExplorerDragPreview, CheckboxCell, TagColumnHeader, ExplorerFileTooltip, visibilityAudience, TagFormRoot, TagFormNameField, TagFormSelectField, TagFormNote, TagFormOptionsEditor, TagFormInstructionField, TagFormMeta, TagFormFooter, TagFormSharedToggle, FilesViewCenter, FilesFilterBar, TransferProgressView, TransferResumeBanner, ExportResultsReport, TransferScopeChooser, TransferKindsPicker, TransferReferencesChooser, ExportMethodChooser, ExportWorkspacePicker, TransferConflictChooser, TransferPlanSummary, ExportFooter, ExportModalTitle, ROW_MIN, rowHeightForLines, linesForRowHeight, RowDensityControl, VendorLogo, FolderFilterButton, FolderPickerRow, UploadFrame, UploadContainer, SelectedFilesList, RejectedFilesList, UploadErrorMessage, UploadProgress, PrivacyExplainerModal, MultiSelectCellEditor, DOCUMENT_TYPE_OPTIONS, DEFAULT_DOCUMENT_COLUMNS, shareStateOf, BulkActionsBar, shareTooltipFor, parseFolderSegments, AiReviewDialogView, MoveToFolderDialog, sortFields, filterFieldsByName, fieldsApplyBarCopy, FieldsEditorRoot, FieldsEditorToolbar, FieldsEditorList, FieldRow, FieldsEmptyState, fieldsEmptyText, FieldsApplyBar, FieldsManagerDefinition, FieldsManagerBody, FieldsManagerTitle, BulkTagEditorDialog, BulkReplaceDialog, FieldValue, FieldFolderSelect, FieldFolderValue, FieldNativeSelect, FieldWithAttribution, EMAIL_VIEW_COLUMNS, useGridViews, ViewSelectorMenu, FilesAddMenu, applyColumnLayout, applyViewColumns, sortExplorerFiles, FilesPage, UrlInputDialog, FilesPageHeader, FilesToolbar, ExplorerFileNavigator, NavigatorPickerBar, FilesPageMain, DocumentGrid, resolveDocumentGridLayout, FilesModalFooter, BulkLabelSelectView, confirmHideFromMembers, DocumentsFolderButton, FilesTagsButton, UploadSourceSection, UploadSourcePicker, UploadBrowseButtons, canEditDocumentFields, FieldLabelsSelect, ShareToggle, FieldAttribution, UploadDropArea, canChangeVisibility, UploadUrlButton } from '../chunk-P6MVDOCL.js';
17
+ import { ExplorerFileTile, formatFolderSegment, hasFolderProviderIcon, FolderProviderIcon, ExplorerFolderTile, StatusPill, FailedStageIcon, DocumentNameCellFrame, DocumentRowMenu, visibilityToggleTooltip, FolderCell, FolderCommandList, RelatedDocsCell, FilterButton, DOCUMENTS_ROW_HEIGHT_INITIAL, searchExplorerDocuments, buildExplorerEntries, collectFolderDocs, joinFolderPath, getExplorerDisplayName, RECENTLY_DELETED_HINT, RECENTLY_DELETED_HINT_PLURAL, canDeleteDocument, ExplorerFrame, ExplorerStage, ExplorerScroller, ExplorerLoadingTiles, ExplorerEmpty, ExplorerMarquee, ExplorerDropOverlay, ExplorerDragPreview, CheckboxCell, TagColumnHeader, ExplorerFileTooltip, visibilityAudience, TagFormRoot, TagFormNameField, TagFormSelectField, TagFormNote, TagFormOptionsEditor, TagFormInstructionField, TagFormMeta, TagFormFooter, TagFormSharedToggle, FilesViewCenter, FilesFilterBar, TransferProgressView, TransferResumeBanner, ExportResultsReport, TransferScopeChooser, TransferKindsPicker, TransferReferencesChooser, ExportMethodChooser, ExportWorkspacePicker, TransferConflictChooser, TransferPlanSummary, ExportFooter, ExportModalTitle, ROW_MIN, rowHeightForLines, linesForRowHeight, RowDensityControl, VendorLogo, FolderFilterButton, FolderPickerRow, UploadFrame, UploadContainer, SelectedFilesList, RejectedFilesList, UploadErrorMessage, UploadProgress, PrivacyExplainerModal, MultiSelectCellEditor, DOCUMENT_TYPE_OPTIONS, DEFAULT_DOCUMENT_COLUMNS, shareStateOf, BulkActionsBar, shareTooltipFor, parseFolderSegments, AiReviewDialogView, MoveToFolderDialog, sortFields, filterFieldsByName, fieldsApplyBarCopy, FieldsEditorRoot, FieldsEditorToolbar, FieldsEditorList, FieldRow, FieldsEmptyState, fieldsEmptyText, FieldsApplyBar, FieldsManagerDefinition, FieldsManagerBody, FieldsManagerTitle, BulkTagEditorDialog, BulkReplaceDialog, FieldValue, FieldFolderSelect, FieldFolderValue, FieldNativeSelect, FieldWithAttribution, EMAIL_VIEW_COLUMNS, useGridViews, ViewSelectorMenu, FilesAddMenu, applyColumnLayout, applyViewColumns, sortExplorerFiles, FilesPage, UrlInputDialog, FilesPageHeader, FilesToolbar, ExplorerFileNavigator, NavigatorPickerBar, FilesPageMain, DocumentGrid, resolveDocumentGridLayout, FilesModalFooter, BulkLabelSelectView, confirmHideFromMembers, DocumentsFolderButton, FilesTagsButton, UploadSourceSection, UploadSourcePicker, UploadBrowseButtons, canEditDocumentFields, FieldLabelsSelect, ShareToggle, FieldAttribution, ImportPanel, ImportFamilySection, ImportList, ImportRow, UploadDropArea, canChangeVisibility, ImportSummary, ImportAside, FolderSummary, ImportProgress, ImportRunActions, ImportHint, ImportActionButton, UploadUrlButton } from '../chunk-P6MVDOCL.js';
18
18
  import { ViewToggle, DocumentViewToggle } from '../chunk-JJA6GQKH.js';
19
19
  import { ModalBreadcrumbHeader, ModalCrumbs } from '../chunk-RC6VTY2H.js';
20
20
  import { DatabaseList, NewDatabaseDialog, DatabaseToolbar, DatabaseTable, DatabaseRowDetail, DatabaseColumnDialog, rowTitle, OPEN_ROW_COL_ID, ADD_COLUMN_COL_ID } from '../chunk-PTYERKEU.js';
@@ -25,7 +25,7 @@ import '../chunk-MTSKK3BN.js';
25
25
  import '../chunk-BTTUZZN3.js';
26
26
  import { FactSourcesPanel, FactPassageItem } from '../chunk-HFZ45FD3.js';
27
27
  import '../chunk-IA5BYEO7.js';
28
- import { EntityTooltip, EntityTooltipHeader, EntityTooltipSection, EntityTooltipHint, SharedCell, WorkspaceActivityList, WorkspaceNotificationMenu, ThreadFollowMenuItem, ThreadFollowButton, TagTable, TagPicker, tagsPageNouns, entitiesPhrase, ExtractEntitiesDialog, GridRowNavigator, LoadingIndicator, EntityIdentityBar, IDENTITY_NAME_MAX_LENGTH, EntityTooltipStats, documentCount, TIPS_VISIBILITY_OVERRIDE, tagTableDocx, setHintsSessionOverride, tagTableLabels, TagDetail, tagDetailLabels, tagNoteLabel, tagKindDescription, Toolbar, glossaryEntries, glossaryDocx, glossaryMarkdown, glossaryFileName } from '../chunk-X7CXCEGO.js';
28
+ import { EntityTooltip, EntityTooltipHeader, EntityTooltipSection, EntityTooltipHint, SharedCell, WorkspaceActivityList, WorkspaceNotificationMenu, ThreadFollowMenuItem, ThreadFollowButton, TagTable, TagPicker, tagsPageNouns, entitiesPhrase, ExtractEntitiesDialog, GridRowNavigator, LoadingIndicator, EntityIdentityBar, IDENTITY_NAME_MAX_LENGTH, EntityTooltipStats, documentCount, TIPS_VISIBILITY_OVERRIDE, tagTableDocx, setHintsSessionOverride, tagTableLabels, TagDetail, tagDetailLabels, tagNoteLabel, tagKindDescription, Toolbar, glossaryEntries, glossaryDocx, glossaryMarkdown, glossaryFileName } from '../chunk-T6KAZPOZ.js';
29
29
  import { MemberAvatarStack } from '../chunk-FUPAGAZB.js';
30
30
  import { renderSearchSnippet, SearchGroupHeader, isMeaningMatch, extractHighlightTerms, passesRelevanceCutoff, groupSearchResults, SearchPillToggle, SearchPagination, SearchPageFrame, SearchPageHeader, ApplyLabelDialog, SearchPageBody, SearchToolbarRow, SearchBar, SearchControlsBar, RelevanceThreshold, SearchTotalsHeadline, ApplyLabelButton, getSearchMatchHint, SearchResultsMain, SearchResultsInner, SearchErrorBanner, SearchResultList, SearchGroupCard, SearchNoResults, SearchEmptyState } from '../chunk-G4IYES7G.js';
31
31
  import { SearchHit } from '../chunk-XJA6TS6D.js';
@@ -45,9 +45,9 @@ import '../chunk-K4BGOPGG.js';
45
45
  import '../chunk-ZCOVDK2E.js';
46
46
  import { isDefinitionsLabel, DOCX_MIME_TYPE, toDefinitionSource, definitionLabels } from '../chunk-IYUKJESY.js';
47
47
  import { decodeWhitespaceEntities } from '../chunk-AF6RDAJF.js';
48
- import { EntityChip, StepTraceSummary, StepTrace, getCurrentAgentStepPresentation, AssistantEntity, ThreadActivity, SubAgentLane, getAgentStepPresentation, stepAccent, MODEL_TIER_ICON_MAP, StepRow, StepNarration, StepSummary, StepDetail, StepOutcome, StepParams, GoalCriteria, SubStepGroup, MODEL_TIER_LABELS, fromPlanSteps, latestMessageTime, isSupersededStop, compactThreadActivity, unnotifiedMentions, notifiedLabel, linkedRunsFromActivity, getModelIcon, SubagentRoster, buildLibrarySkills, filterLibrarySkills, SKILL_SOURCE_LABELS, SKILL_TYPE_LABELS, SkillViewToggle, SkillFilterChips, SkillTile, SkillGenerateForm, SkillLibraryDetail, parseSkillFrontmatter, SKILL_MAIN_FILENAME, SkillEditForm, DEFAULT_AGENT_CAPABILITIES, stripPersonaPreamble, AgentCreator, DEFAULT_AGENT_TYPES, DEFAULT_AGENT_TEMPLATES, AgentAvatarField, isValidAgentName, AgentConnectInstructions, TaskRunsDialog, TaskActivityDialog, WorkflowStepBar, ConsentPage, ConsentCard, ConsentHeader, ConsentNotice, ConsentSection, ConsentBulletList, ConsentStrong, ConsentText, ConfigForm, AgentEditView, AgentMainView, AgentCreatedView, AgentCreateView, GENERATE_IMAGE_ID, IMAGE_ASPECT_AUTO, taskComposerToCreateRequest, taskComposerToUpdateRequest, composerToWorkflowUpdate, deriveAnnotationName, ANNOTATE_ID, recordWorkflowUse, renderWorkflowIcon, useWorkflowUsage, WEB_WORKFLOWS, DASHBOARD_PINNED, CUSTOM_TASK, REMIND_TASK, DASHBOARD_OPERATIONS, sortByRecentUse, openWorkflowLaunch, useWorkflowLaunchRequest, WorkflowRunStatus, ThreadStatusLine, WorkflowThreadStrip, WorkflowStepAction, WorkflowThreadStartedBy, TaskFlow, moveTargets, workflowToComposerValues, REMIND_TASK_ID, CUSTOM_TASK_ID, taskToComposerValues, TaskComposer, AUTOMATION_EVENTS, TaskPlan, TaskStartDialog, ThreadLauncher, NewThreadDialog, AgentBar, AgentBarNotes, AgentBarQueuedNote, AgentBarProbeAnswer, BUILTIN_SKILLS, TaskEmptyState, ConsentMessage, CopyableUrl, ConsentPermissionList, ConsentActions, ConsentFootnote, ConversationListView, ConversationTurnSpeaker, TaskInbox, AgentBarStatus, AgentBarIconButton, AgentBarMenu, composePersona, newThreadToRequest, importSkillFile, importSkillFromUrl, WorkflowRunner, skillSlug, serializeSkill, toPlanSteps, useWorkflowView, STATUS_LABELS, asTaskStatus, workflowToSkillMarkdown, closeWorkflowLaunch } from '../chunk-YAGSGBVM.js';
48
+ import { EntityChip, StepTraceSummary, StepTrace, getCurrentAgentStepPresentation, AssistantEntity, ThreadActivity, SubAgentLane, getAgentStepPresentation, stepAccent, MODEL_TIER_ICON_MAP, StepRow, StepNarration, StepSummary, StepDetail, StepOutcome, StepParams, GoalCriteria, SubStepGroup, MODEL_TIER_LABELS, fromPlanSteps, latestMessageTime, isSupersededStop, compactThreadActivity, unnotifiedMentions, notifiedLabel, linkedRunsFromActivity, getModelIcon, SubagentRoster, buildLibrarySkills, filterLibrarySkills, SKILL_SOURCE_LABELS, SKILL_TYPE_LABELS, SkillViewToggle, SkillFilterChips, SkillTile, SkillGenerateForm, SkillLibraryDetail, parseSkillFrontmatter, SKILL_MAIN_FILENAME, SkillEditForm, DEFAULT_AGENT_CAPABILITIES, stripPersonaPreamble, AgentCreator, DEFAULT_AGENT_TYPES, DEFAULT_AGENT_TEMPLATES, AgentAvatarField, isValidAgentName, AgentConnectInstructions, TaskRunsDialog, TaskActivityDialog, WorkflowStepBar, ConsentPage, ConsentCard, ConsentHeader, ConsentNotice, ConsentSection, ConsentBulletList, ConsentStrong, ConsentText, ConfigForm, AgentEditView, AgentMainView, AgentCreatedView, AgentCreateView, GENERATE_IMAGE_ID, IMAGE_ASPECT_AUTO, taskComposerToCreateRequest, taskComposerToUpdateRequest, composerToWorkflowUpdate, deriveAnnotationName, ANNOTATE_ID, recordWorkflowUse, renderWorkflowIcon, useWorkflowUsage, WEB_WORKFLOWS, DASHBOARD_PINNED, CUSTOM_TASK, REMIND_TASK, DASHBOARD_OPERATIONS, sortByRecentUse, openWorkflowLaunch, useWorkflowLaunchRequest, WorkflowRunStatus, ThreadStatusLine, WorkflowThreadStrip, WorkflowStepAction, WorkflowThreadStartedBy, TaskFlow, moveTargets, workflowToComposerValues, REMIND_TASK_ID, CUSTOM_TASK_ID, taskToComposerValues, TaskComposer, AUTOMATION_EVENTS, TaskPlan, TaskStartDialog, ThreadLauncher, NewThreadDialog, AgentBar, AgentBarNotes, AgentBarQueuedNote, AgentBarProbeAnswer, ConversationListView, ConversationTurnSpeaker, TaskInbox, ConsentMessage, CopyableUrl, ConsentPermissionList, ConsentActions, ConsentFootnote, AgentBarStatus, AgentBarIconButton, AgentBarMenu, composePersona, newThreadToRequest, importSkillFile, importSkillFromUrl, WorkflowRunner, skillSlug, serializeSkill, toPlanSteps, useWorkflowView, STATUS_LABELS, asTaskStatus, filterConversationRows, BUILTIN_SKILLS, TaskEmptyState, workflowToSkillMarkdown, closeWorkflowLaunch } from '../chunk-EY4IEOW3.js';
49
49
  import { MultiSelect } from '../chunk-CQCC7LE7.js';
50
- import { PersonPill, documentScopeLabels, matchWorkflowScope } from '../chunk-7CHI36EP.js';
50
+ import { PersonPill, documentScopeLabels, matchWorkflowScope } from '../chunk-VE6DHRXD.js';
51
51
  import { SectionLabel } from '../chunk-2C3I27VI.js';
52
52
  import { TriStateFilterMenu } from '../chunk-G4GLDQLY.js';
53
53
  import '../chunk-M4S75AEJ.js';
@@ -60,11 +60,8 @@ import { GridView } from '../chunk-7F5Z4K5W.js';
60
60
  import { StreamedArtifactFrame } from '../chunk-LOJVUGBJ.js';
61
61
  import { DEFAULT_PASSWORD_RULES, AccountRecoveryDialog, promptSaveCredential, useFragmentCredentials, AuthLayout, AuthHeading, AuthField, AuthInput, AuthFieldBadge, AuthLink, AuthNote, RevealablePasswordInput, AuthConsent, AuthSubmitButton, AuthDivider, AuthAlert, RecoveryKeyDialog, parseAuthError, AuthOfflineBadge, AuthTabs, splitAuthHash, withTrailingFragment } from '../chunk-VN4FSGBR.js';
62
62
  import { PasswordStrengthInput } from '../chunk-P6OLZGQA.js';
63
- import { attendeeKey, upcomingOf, conferenceUrl, isWebinarConference, canJoinEvent, calendarToListItem, buildGridEvents, pendingCreateToGrid, newEventDraft, MiniMonth, CalendarList, CalendarGrid, printCalendar, EventDetails, ScopeDialog, CalendarFormDialog, ProposeTimeDialog, isCalendarAttachment, parseIcsInvite, formatEventWhen, groupSlotsByDay, publicBookingMessage, formatSlotRange, zoneOptions, buildTimeChangeRequest, eventToDraft, needsScope, validateDraft, CALENDAR_DEFAULT_LABELS, buildCreateBody, buildDeleteTarget, EventEditor, toSettingsValue, CalendarSettingsForm, describeCalendarError, normalizeFeedUrl, parseOverlayLink, isAllDayDraft, draftRangeUtc, freeBusyToRows, SchedulingAssistant, applySuggestion, toSuggestionViews, bookingLink, defaultRoomWindow, bookingToForm, emptyBookingForm, slugify, WeeklyHoursEditor, validateBookingForm, formToBookingBody, WEEKDAY_NAMES, formatBusy, buildEditRequest } from '../chunk-AWVGKHJT.js';
64
- import { detectTimeZone, utcToDate, formatPlainDate, formatInZone, safeZone, todayInZone, addDays, listTimeZones, wallToUtc } from '../chunk-OJIX5NBN.js';
65
- import { DocumentPicker } from '../chunk-WNDIVNPT.js';
66
- import { useTranscriptRuns, TranscriptEntry, ThreadCallLogCard, RecordingCard, useMeetingThreadMessages, threadTranscriptRuns, useProvisionalSpeakers, TranscriptRunsContext, ProvisionalSpeakers, CallConversationEmpty } from '../chunk-4U4NXFV5.js';
67
- export { useMeetingThreadMessages } from '../chunk-4U4NXFV5.js';
63
+ import { useTranscriptRuns, TranscriptEntry, ThreadCallLogCard, RecordingCard, ConnectedConversationCallActions, useMeetingThreadMessages, threadTranscriptRuns, useProvisionalSpeakers, TranscriptRunsContext, ProvisionalSpeakers, CallConversationEmpty } from '../chunk-TKTNXFAB.js';
64
+ export { useMeetingThreadMessages } from '../chunk-TKTNXFAB.js';
68
65
  import { parseCallLogDetail } from '../chunk-S3YRRD54.js';
69
66
  import { useDocumentFilter, useConnectedTags, useConnectedDocuments, useConnectedConversations, useListedDocuments, listedDocuments } from '../chunk-SYP2A4GQ.js';
70
67
  export { isListedDocument, useConnectedConversations, useConnectedDocuments, useConnectedTags, useDocumentFilter, useListedDocuments } from '../chunk-SYP2A4GQ.js';
@@ -74,8 +71,11 @@ import { DmThreadHeader, DmInviteChip } from '../chunk-2S3LT5KE.js';
74
71
  import { useHost, ArbiHost } from '../chunk-ILBBV2ZY.js';
75
72
  import { TabHeader } from '../chunk-ABEKUV6L.js';
76
73
  import { EmptyState } from '../chunk-P6GHJSLR.js';
77
- import { useLongPaste, useRecipientDraft, SlashMenu, ContextUsageBar, findMessageDocument, getParticipantTints, flashMessage, parseSlashTokenInProgress, buildSlashItems, filterSlashItems, copyMessageToClipboard, BranchControls, ThreadVisualizer, downloadTableAsCsv, useOpenCitation, ModelAutoIcon, ModelTierIcon, ModelDot, ModelPricingTip, ModelPickerPopover, ModelOption, ModelMenuDivider, ModelTierOption, ModelConfigureButton, ModelMenuMessage, ModelPickerTrigger, ModelTriggerContent, ModelOptionLabel, ConversationBody, ConversationMain, ConversationLoading, PendingAnswerBar, ComposerTools, PaModeBadge, ComposerAccessories, DraftingDocChip, groupOutputsByConversation, ConversationSearchView } from '../chunk-SEZEEHLU.js';
78
- import { ComposerSend, ComposerVoiceButton, Composer, MessageActionMenu, MessageActionButton, MessageFooter, MessageRoot, MessageContent, MessageAuthor, MessageBubble, MessageByline, MessageSubagentBadge, MessageBody, MessageNarration, useStreamAnnouncement, MessageList, WorkflowStepChip, MessageSources, ChatPage, ConversationEmpty, MessageAlert, ComposerDock, ComposerContainer, ScrollToBottom } from '../chunk-AL7EXOX5.js';
74
+ import { attendeeKey, upcomingOf, conferenceUrl, isWebinarConference, canJoinEvent, calendarToListItem, buildGridEvents, pendingCreateToGrid, newEventDraft, MiniMonth, CalendarList, CalendarGrid, printCalendar, EventDetails, ScopeDialog, CalendarFormDialog, ProposeTimeDialog, isCalendarAttachment, parseIcsInvite, formatEventWhen, groupSlotsByDay, publicBookingMessage, formatSlotRange, zoneOptions, buildTimeChangeRequest, eventToDraft, needsScope, validateDraft, CALENDAR_DEFAULT_LABELS, buildCreateBody, buildDeleteTarget, EventEditor, toSettingsValue, CalendarSettingsForm, describeCalendarError, normalizeFeedUrl, parseOverlayLink, isAllDayDraft, draftRangeUtc, freeBusyToRows, SchedulingAssistant, applySuggestion, toSuggestionViews, bookingLink, defaultRoomWindow, bookingToForm, emptyBookingForm, slugify, WeeklyHoursEditor, validateBookingForm, formToBookingBody, WEEKDAY_NAMES, formatBusy, buildEditRequest } from '../chunk-AWVGKHJT.js';
75
+ import { detectTimeZone, utcToDate, formatPlainDate, formatInZone, safeZone, todayInZone, addDays, listTimeZones, wallToUtc } from '../chunk-OJIX5NBN.js';
76
+ import { DocumentPicker } from '../chunk-WNDIVNPT.js';
77
+ import { useLongPaste, useRecipientDraft, SlashMenu, ContextUsageBar, findMessageDocument, getParticipantTints, flashMessage, parseSlashTokenInProgress, buildSlashItems, filterSlashItems, copyMessageToClipboard, BranchControls, ThreadVisualizer, downloadTableAsCsv, useOpenCitation, ModelAutoIcon, ModelTierIcon, ModelDot, ModelPricingTip, ModelPickerPopover, ModelOption, ModelMenuDivider, ModelTierOption, ModelConfigureButton, ModelMenuMessage, ModelPickerTrigger, ModelTriggerContent, ModelOptionLabel, groupOutputsByConversation, ConversationSearchView, ConversationRoot, ConversationHeader, ConversationHeaderActions, NewChatButton, NewPaChatButton, ConversationSettingsButton, ConversationHistoryPane, ConversationBody, ConversationMain, ConversationLoading, PendingAnswerBar, ComposerTools, PaModeBadge, ComposerAccessories, DraftingDocChip } from '../chunk-SEZEEHLU.js';
78
+ import { ComposerSend, ComposerVoiceButton, Composer, MessageActionMenu, MessageActionButton, MessageFooter, MessageRoot, MessageContent, MessageAuthor, MessageBubble, MessageByline, MessageSubagentBadge, MessageBody, MessageNarration, useStreamAnnouncement, MessageList, WorkflowStepChip, MessageSources, ChatPage, ConversationEmpty, MessageAlert, ComposerContainer, ComposerDock, ScrollToBottom } from '../chunk-AL7EXOX5.js';
79
79
  import { workspaceDocIdFromHref } from '../chunk-DDCMLHXF.js';
80
80
  import { PageContainer, Shell } from '../chunk-7XF5SFJ2.js';
81
81
  import { useMentionAutocomplete, stepStatesFromActivity, stepDocuments, splitDocRef, stepPhase, stepKindOf, STEP_KIND_ICONS, stepLevels, canAssign, assigneeName, runFieldsOf, initialRunInputs, workflowSteps, runThreadTitle, stepFields } from '../chunk-THNTNAYI.js';
@@ -94,17 +94,17 @@ import { ModalSection, ModalHeader, ModalScaffold, ModalSectionTitle } from '../
94
94
  import '../chunk-7F6CBP3Z.js';
95
95
  import '../chunk-VUNV25KB.js';
96
96
  import { QueryClient, useQueryClient, QueryClientProvider } from '@tanstack/react-query';
97
- import { useWorkspaces, ArbiBotHeadIcon, IN_FLIGHT_DOCUMENT_STATUSES, useOfflineDocumentIds, useOpenViewerDocumentId, FINISHED_DOCUMENT_STATUSES, useMailPolicy, useProcessingTasks, resolveDocumentStatus, useArbi, useIsCreatingTag, useUpdateDocuments, useDeleteDocuments, useRenameFolder, useDownloadDocuments, useTags, useDocumentHostActions, useDocumentThumbnails, HtmlIcon, useArbiSessionState, selectDraft, useArbiSessionStore, useAudioRecorder, MicRecordingOverlay, useArbiWsStatus, useArbiWsStore, useUserSettings, useProcessingTask, useDocumentPendingSync, useWorkspaceUsers, useMessageTimer, useDocuments, useAvailableModels, formatGbp, CitationRenderer, useArbiSession, buildMentionCandidates, useConversations, ASSISTANT_MENTION_LABEL, useConversationItems, useDeleteMessage, useArbiHost, transcriptSegmentOf, useConfig, useThinkingContent, useCreateFact, useCreateFacts, workflowStepOf, stripSpeakerPrefix, MessageArtifactCard, useConversationData, useBranchNavigation, useSkills, useBuiltinCommands, useDocumentsSupport, useConversationActivity, useMessageDetails, useWorkflows, getWorkspaceKind, resolveConfigModel, useRunConversation, useWorkspaceActivity, callLink, openCall, startDmCall, calendarQueryKeys, mailQueryKeys, arbiQueryKeys, invalidateConversationLists, isWorkspaceNotificationType, useNotifications, useDeleteNotifications, useMarkNotificationsRead, useCallsEnabled, serverNotificationBellEntry, documentDisplayName, useArbiWebSocket, isNotificationRow, usePendingSyncItems, useCancelManyPendingSync, useWorkspaceNotificationLevel, useFollowThread, useUploadSkillFiles, useSaveSkill, useSetSkillVisibility, useDeleteSkill, useSkillSource, useAgentModels, useMcpTools, useAgentConfig, useAgentWorkspaces, useCreateAgent, useSaveAgentConfig, useGrantAgentAccess, useRevokeAgentAccess, useGenerateAgentAvatar, useWorkflowRuns, useAgents, ArtifactCanvas, ConversationScope, useConversation, useTagKindSchema, useCreateTag, useSetTagValues, useUpdateTagKindSchema, useUpdateTag, useFacts, useDeleteTag, useExtractEntities, useEntityExtractionDocIds, useStartWorkspaceTransfer, useResumeWorkspaceTransfer, useCancelWorkspaceTransfer, useWorkspaceTransfer, useWorkspaceTransfers, useWorkspaceExportDownload, usePlanWorkspaceTransfer, isTransferResumable, isTransferFinished, useShellWorkspaces, useProfile, useUpdateProfile, useRequestEmailChange, useConfirmEmailChange, useNameEditor, useAvatarCrop, useEmailChange, ImageCropModal, useIdentityVerification, usePasswordChange, usePasswordChangeForm, useNotificationPreferences, useSessions, useCurrentSessionId, useTerminateSession, useSignOut, useDeleteAccount, useDeleteAccountFlow, useMailClient, defaultMailAlias, useClaimNativeAlias, useMailOnline, useConnectMailAccount, useDisconnectMailAccount, useMailAccounts, useUpdateUserSettings, useDismissedTips, useConnectorVendorVisibility, useConnectorCatalog, useMyConnectors, useDisconnectConnector, useSlackConnection, useDisconnectSlack, isMailboxSyncVendor, isSharePointVendor, useWorkspaceTrash, useInvalidateStorage, useStorageActions, useStorageItems, useStorageItemNames, useStorageProjects, useUserUsageToday, useStorageSnapshots, useUpdateWorkspace, useAddWorkspaceMembers, useRemoveWorkspaceMembers, useSetWorkspaceMemberRoles, toShellWorkspace, useIsSlow, useProducts, useCreateProject, useDeleteProject, useCanCreateProjects, PROJECT_CREATION_DENIED_REASON, useEnableMailboxSync, useMailboxFolders, useEnableDriveSync, useDriveFolderChildren, connectorErrorStatus, useProjectInvoices, useProjects, useUpdateProjectFields, useChargeWatch, useAddonQuote, STILL_WORKING, useProjectBillingPortal, useProjectUsage, useRefreshProject, useBoxRole, useContacts, useInviteContacts, useDeleteWorkspaces, useCreateContact, useUpdateContact, useLinkContact, useEntitlements, useImportContacts, entitlementRefusal, useDeleteContact, MAX_RETRIEVE_DOC_IDS, useSemanticSearch, useAssignDocTags, useMailUnlock, useMailFolders, useMailMessages, useMailDraftCompose, useMailMessage, useMailCache, MailOfflineUnavailableError, accountPath, useCalendarEvents, useCalendars, useCanHostCalls, useOpenCallMeetingChat, usePeople, useFetchCalendarEvent, useCalendarSettings, useCalendarOverlays, useCalendarOutbox, useCalendarAccounts, useSyncAccountsOnOpen, useResumeCalendarAccountConnect, useCreateEvent, useUpdateEvent, useDeleteEvent, useMoveEvent, useRespondToEvent, useCreateCalendar, useUpdateCalendar, useDeleteCalendar, useImportCalendar, useSaveCalendarSettings, useRefreshCalendar, useCalendarEvent, useMailAttachmentText, useCalendarEventByUid, getPublicBookingPage, bookPublicSlot, PublicBookingError, isZipFile, prepareUploadFiles, UPLOAD_MAX_FILE_SIZE, filesFromDrop, UPLOAD_ACCEPT, useUploadFromUrls, useUploadFiles, useUpdateDocTag, useRemoveDocTags, useKeepDocumentsOffline, useRemoveDocumentsOffline, subscribeDocumentRows, useGenerateDocTags, useRefreshDocuments, useDocumentsLoading, selectViewingDocumentId, useRelatedDocuments, useDatabases, useCreateDatabase, useImportDatabase, myChatId, useChatThread, useChatPost, useDeleteChatMessage, useMarkChatRead, setOpenChat, useAgentDmStatus, annotateThread, userDisplayName, DmComposer, TypingIndicator, useRenameChat, useAddChatMembers, useRemoveChatMember, useChats, useChatSummaries, useCreateGroupChat, useChatArrivals, useApplyChatModel, AUTO_CHAT_MODEL, formatGbpPerMillionTokens, useConfigSchema, useSaveConfig, useConversationPendingAuth, openAccessRequest, useRequestWorkspaceAccess, useIsEntitled, ImageCropper, useCreateWork, useRunWorkflow, useStartTaskQuery, useCreateWorkflow, useUpdateConversation, useUpdateWorkflow, usePeopleSearch, threadTabId, useCanEditShared, useActOnStep, usePlanWork, useWorkItems, TaskThreadPendingError, useMentionCandidates, useAgentRunControl, useConnectRunStream, useAnswerAgentQuestion, useConversationIsShared, useWorkspaceRole, buildPendingFirstTurn, useConversationTurn, useAskAgain, getOrphanedLastMessage, refuseChatWhenOffline, useThreadDocument, useDocumentAutoAdd, useAutoSendDraft, READ_ONLY_MEETING_TEXT, useAgentSession, useStartAgentSession, useCloseAgentSession, downloadRecoveryFile, LinkedInIcon, GoogleIcon, AppleIcon, useCurrentUser, useTransientView, useDeleteConversation, useIsWorkspaceOwner, isQueuedCalendarWrite, DateSeparator, ChatBubble, isAliasTakenError, nextAliasSuggestion, aliasTakenMessage, mailJson, connectorReturnTo, DmAvatar, ConversationList, GitHubIcon, cropImage, getRelatedTotal, isDeploymentUserNotification, describeServerNotification, getWorkspaceActionText, getWorkspaceSentPhrase, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_TITLE, documentActivityPhrase, isSignatureNotificationType, inputRequestTitle, WORK_NOTIFICATION_LABELS, useConversationThreads, usePassageQuotes, useUpdateFact, useDeleteFact, useAccountClient, usePlanQuote, useCreateProjectCheckout, useInvalidateProjects, useCreateWorkspace, useDriveFolderDocCount, useChangeProjectPlan, useCancelProjectSubscription, usePreviewProjectPlanChange, useAddProjectAddonBlock, useSwitchWorkspace, fileAttachment, useMailProjects, useSaveMailDraft, useSendMail, useMailDraftReplaced, useCalendarInvitations, useDecideCounter, useSearchContacts, usePublishCalendar, useCalendarShares, useShareCalendar, useUnshareCalendar, useSubscribeCalendar, useHolidayCountries, useAddHolidayCalendar, cancelPublicBooking, useDatabase, useDatabaseRows, useUpdateDatabase, useDeleteDatabase, useAddDatabaseRows, useUpdateDatabaseRow, useDeleteDatabaseRows, useImportDatabaseRows, useExportDatabase, DATABASE_ROWS_PAGE, useInvalidateAfterTransfer, useConfigs, useSaveConfigField, useDeleteConfig, isFullConfig, useChatUnreadTotal, useUnreadByPeer, useMarkDocumentShared, useConversationSearch, useProjectConversationUsage, AiAnswer, ArbiWebSocketProvider, signatureNotificationPhrase, signatureRequestMeta, getNotificationTypeMeta, useMailDraftEditor, useFreeBusy, useFindTime, useCalendarSupport, useStartCalendarAccountOAuth, useConnectOAuthAccount, useBookingPages, useDeleteBookingPage, useRooms, useSearchDatabaseRows, isReplayableArbiMutation, SHAREPOINT_VENDORS, useUpdateProjectNextPeriodAddons, useUpdateProjectAddonSettings, useSyncCalendarAccount, useUpdateCalendarAccount, useDisconnectCalendarAccount, ACCOUNT_VENDOR, useCalDavProfiles, useConnectCalDavAccount, useSaveBookingPage, useCreateRoom } from '@arbidocs/react';
97
+ import { useWorkspaces, ArbiBotHeadIcon, IN_FLIGHT_DOCUMENT_STATUSES, useOfflineDocumentIds, useOpenViewerDocumentId, FINISHED_DOCUMENT_STATUSES, useMailPolicy, useProcessingTasks, resolveDocumentStatus, useArbi, useIsCreatingTag, useUpdateDocuments, useDeleteDocuments, useRenameFolder, useDownloadDocuments, useTags, useDocumentHostActions, useDocumentThumbnails, HtmlIcon, useArbiSessionState, selectDraft, useArbiSessionStore, useAudioRecorder, MicRecordingOverlay, useArbiWsStatus, useArbiWsStore, useUserSettings, useProcessingTask, useDocumentPendingSync, useWorkspaceUsers, useMessageTimer, useDocuments, useAvailableModels, formatGbp, CitationRenderer, useArbiSession, buildMentionCandidates, useConversations, ASSISTANT_MENTION_LABEL, useConversationItems, useDeleteMessage, useArbiHost, transcriptSegmentOf, useConfig, useThinkingContent, useCreateFact, useCreateFacts, workflowStepOf, stripSpeakerPrefix, MessageArtifactCard, useConversationData, useBranchNavigation, useSkills, useBuiltinCommands, useDocumentsSupport, useConversationActivity, useMessageDetails, useWorkflows, getWorkspaceKind, resolveConfigModel, useRunConversation, useWorkspaceActivity, callLink, openCall, startDmCall, calendarQueryKeys, mailQueryKeys, arbiQueryKeys, invalidateConversationLists, isWorkspaceNotificationType, useNotifications, useDeleteNotifications, useMarkNotificationsRead, useCallsEnabled, serverNotificationBellEntry, documentDisplayName, useArbiWebSocket, isNotificationRow, usePendingSyncItems, useCancelManyPendingSync, useWorkspaceNotificationLevel, useFollowThread, useUploadSkillFiles, useSaveSkill, useSetSkillVisibility, useDeleteSkill, useSkillSource, useAgentModels, useMcpTools, useAgentConfig, useAgentWorkspaces, useCreateAgent, useSaveAgentConfig, useGrantAgentAccess, useRevokeAgentAccess, useGenerateAgentAvatar, useWorkflowRuns, useAgents, ArtifactCanvas, ConversationScope, useConversation, useTagKindSchema, useCreateTag, useSetTagValues, useUpdateTagKindSchema, useUpdateTag, useFacts, useDeleteTag, useExtractEntities, useEntityExtractionDocIds, useStartWorkspaceTransfer, useResumeWorkspaceTransfer, useCancelWorkspaceTransfer, useWorkspaceTransfer, useWorkspaceTransfers, useWorkspaceExportDownload, usePlanWorkspaceTransfer, isTransferResumable, isTransferFinished, useShellWorkspaces, useProfile, useUpdateProfile, useRequestEmailChange, useConfirmEmailChange, useNameEditor, useAvatarCrop, useEmailChange, ImageCropModal, useIdentityVerification, usePasswordChange, usePasswordChangeForm, useNotificationPreferences, useSessions, useCurrentSessionId, useTerminateSession, useSignOut, useDeleteAccount, useDeleteAccountFlow, useMailClient, defaultMailAlias, useClaimNativeAlias, useMailOnline, useConnectMailAccount, useDisconnectMailAccount, useMailAccounts, useUpdateUserSettings, useDismissedTips, useConnectorVendorVisibility, useConnectorCatalog, useMyConnectors, useDisconnectConnector, useSlackConnection, useDisconnectSlack, isMailboxSyncVendor, isSharePointVendor, useWorkspaceTrash, useInvalidateStorage, useStorageActions, useStorageItems, useStorageItemNames, useStorageProjects, useUserUsageToday, useStorageSnapshots, useUpdateWorkspace, useAddWorkspaceMembers, useRemoveWorkspaceMembers, useSetWorkspaceMemberRoles, toShellWorkspace, useIsSlow, useProducts, useCreateProject, useDeleteProject, useCanCreateProjects, PROJECT_CREATION_DENIED_REASON, useEnableMailboxSync, useMailboxFolders, useEnableDriveSync, useDriveFolderChildren, connectorErrorStatus, useProjectInvoices, useProjects, useUpdateProjectFields, useChargeWatch, useAddonQuote, STILL_WORKING, useProjectBillingPortal, useProjectUsage, useRefreshProject, useBoxRole, useContacts, useInviteContacts, useDeleteWorkspaces, useCreateContact, useUpdateContact, useLinkContact, useEntitlements, useImportContacts, entitlementRefusal, useDeleteContact, MAX_RETRIEVE_DOC_IDS, useSemanticSearch, useAssignDocTags, useMailUnlock, useMailFolders, useMailMessages, useMailDraftCompose, useMailMessage, useMailCache, MailOfflineUnavailableError, accountPath, useCalendarEvents, useCalendars, useCanHostCalls, useOpenCallMeetingChat, usePeople, useFetchCalendarEvent, useCalendarSettings, useCalendarOverlays, useCalendarOutbox, useCalendarAccounts, useSyncAccountsOnOpen, useResumeCalendarAccountConnect, useCreateEvent, useUpdateEvent, useDeleteEvent, useMoveEvent, useRespondToEvent, useCreateCalendar, useUpdateCalendar, useDeleteCalendar, useImportCalendar, useSaveCalendarSettings, useRefreshCalendar, useCalendarEvent, useMailAttachmentText, useCalendarEventByUid, getPublicBookingPage, bookPublicSlot, PublicBookingError, isZipFile, prepareUploadFiles, UPLOAD_MAX_FILE_SIZE, filesFromDrop, UPLOAD_ACCEPT, useUploadFromUrls, useUploadFiles, useUpdateDocTag, useRemoveDocTags, useKeepDocumentsOffline, useRemoveDocumentsOffline, subscribeDocumentRows, useGenerateDocTags, useRefreshDocuments, useDocumentsLoading, selectViewingDocumentId, useRelatedDocuments, useDatabases, useCreateDatabase, useImportDatabase, myChatId, useChatThread, useChatPost, useDeleteChatMessage, useMarkChatRead, setOpenChat, useAgentDmStatus, annotateThread, userDisplayName, DmComposer, TypingIndicator, useRenameChat, useAddChatMembers, useRemoveChatMember, useChats, useChatSummaries, useCreateGroupChat, useChatArrivals, useApplyChatModel, AUTO_CHAT_MODEL, formatGbpPerMillionTokens, useConfigSchema, useSaveConfig, useConversationPendingAuth, openAccessRequest, useRequestWorkspaceAccess, useIsEntitled, ImageCropper, useCreateWork, useRunWorkflow, useStartTaskQuery, useCreateWorkflow, useUpdateConversation, useUpdateWorkflow, usePeopleSearch, threadTabId, useCanEditShared, useActOnStep, usePlanWork, useWorkItems, TaskThreadPendingError, useMentionCandidates, useAgentRunControl, useTransientView, useDeleteConversation, useIsWorkspaceOwner, useConversationTurn, useAgentSession, useStartAgentSession, useCloseAgentSession, downloadRecoveryFile, LinkedInIcon, GoogleIcon, AppleIcon, useCurrentUser, isQueuedCalendarWrite, DateSeparator, ChatBubble, isAliasTakenError, nextAliasSuggestion, aliasTakenMessage, mailJson, connectorReturnTo, DmAvatar, ConversationList, GitHubIcon, cropImage, getRelatedTotal, isDeploymentUserNotification, describeServerNotification, getWorkspaceActionText, getWorkspaceSentPhrase, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_TITLE, documentActivityPhrase, isSignatureNotificationType, inputRequestTitle, WORK_NOTIFICATION_LABELS, useConversationThreads, usePassageQuotes, useUpdateFact, useDeleteFact, useAccountClient, usePlanQuote, useCreateProjectCheckout, useInvalidateProjects, useCreateWorkspace, useDriveFolderDocCount, useChangeProjectPlan, useCancelProjectSubscription, usePreviewProjectPlanChange, useAddProjectAddonBlock, useSwitchWorkspace, fileAttachment, useMailProjects, useSaveMailDraft, useSendMail, useMailDraftReplaced, useCalendarInvitations, useDecideCounter, useSearchContacts, usePublishCalendar, useCalendarShares, useShareCalendar, useUnshareCalendar, useSubscribeCalendar, useHolidayCountries, useAddHolidayCalendar, cancelPublicBooking, SHAREPOINT_VENDORS, isDriveSyncVendor, useDatabase, useDatabaseRows, useUpdateDatabase, useDeleteDatabase, useAddDatabaseRows, useUpdateDatabaseRow, useDeleteDatabaseRows, useImportDatabaseRows, useExportDatabase, DATABASE_ROWS_PAGE, useInvalidateAfterTransfer, useConfigs, useSaveConfigField, useDeleteConfig, isFullConfig, useChatUnreadTotal, useUnreadByPeer, useMarkDocumentShared, useConversationSearch, useWorkspaceRole, useConversationDocuments, useConnectRunStream, useAnswerAgentQuestion, useConversationIsShared, buildPendingFirstTurn, useAskAgain, getOrphanedLastMessage, refuseChatWhenOffline, useThreadDocument, useDocumentAutoAdd, useAutoSendDraft, READ_ONLY_MEETING_TEXT, useProjectConversationUsage, AiAnswer, ArbiWebSocketProvider, signatureNotificationPhrase, signatureRequestMeta, getNotificationTypeMeta, useMailDraftEditor, useFreeBusy, useFindTime, useCalendarSupport, useStartCalendarAccountOAuth, useConnectOAuthAccount, useBookingPages, useDeleteBookingPage, useRooms, useCancelMailboxSync, useMailboxSyncProgress, useRefreshConnectorsOnRunEnd, useCancelDriveSync, useDriveFolders, useDriveSyncProgress, useDriveSyncEstimate, useSearchDatabaseRows, isReplayableArbiMutation, useUpdateProjectNextPeriodAddons, useUpdateProjectAddonSettings, useSyncCalendarAccount, useUpdateCalendarAccount, useDisconnectCalendarAccount, ACCOUNT_VENDOR, useCalDavProfiles, useConnectCalDavAccount, useSaveBookingPage, useCreateRoom, useTriggerMailboxSync, useTriggerDriveSync } from '@arbidocs/react';
98
98
  import { mergeAgentSteps, extractSubagentLanes, getCurrentStep, computeRunStats, formatTokens, isNearAiUsageBudget, getSubagentBranchRecord, buildCitationChunkData, topLevelAgentSteps, findMainSiblingLeaf, sliceToSubagentThread, getAgentStepLabel, subagentJobLabel, getStepDisplay, getStepTool, findLeafForTaskMessage, Arbi, FLAT_TAG_KINDS, getEligibleParentTags, canTagHaveParent, isFlatKind, TAG_NESTING_MAX_DEPTH, TAG_KINDS, formatFileSize, filterDocumentTags, isLabelTag, refusalReason, isPresenceTag, isAnnotationTag, flattenTagTree, tagsForScope, tagsOfGroup, chats, buildRetrievalFullContextTool, buildRetrievalChunkTool, getChildTags, tagUseCount, ArbiApiError, PRESENCE_KINDS, isEntityTag, DuplicateContactError, wouldCreateTagCycle, getTagDescendantIds } from '@arbidocs/sdk/browser';
99
99
  import { isAbortError, browserSessionStateStorage, parseCallFragment, isMessageType, validateRecoveryKeyFile, RECOVERY_KEY_ERRORS, parseRecoveryUrl, prewarmKeyPairs, decryptRecoveryKey, unlockIdentityWithPassword, createRecoveryUrl, bytesToBase64, initSodium } from '@arbidocs/client';
100
100
  import React9, { memo, useMemo, lazy, useRef, useEffect, useCallback, useState, forwardRef, useLayoutEffect, useImperativeHandle, createContext, useContext, Suspense, useSyncExternalStore, createElement, Fragment as Fragment$1, useId } from 'react';
101
- import { Users, MessageCircleMore, SquarePen, BookOpen, MessagesSquare, Pencil, Download, Mail, FolderInput, Trash2, Eye, Sparkles, Play, ArrowDownToLine, RefreshCw, Zap, AlertTriangle, FileX, SkipForward, Loader2, Clock, CheckCircle, ArrowUpRight, Send, Settings, Edit3, Copy, Link, Share2, Check, Milestone, RotateCcw, FileText, Network, ChevronRight, Bell, Activity, Info, UserCheck, WifiOff, CircleCheck, Upload, Link2, Search, Plus, ArrowLeft, ExternalLink as ExternalLink$1, Tags, CheckCircle2, Monitor, UserCircle, KeyRound, Radio, LogOut, Wifi, Lock, HardDrive, User, HatGlasses, MessageSquare, PlugZap, Gauge, Cloud, XCircle, Building2, Palette, Type, Printer, SquareStack, Table, FolderKanban, Cake, X, UserRound, Star, Tag, Video, CalendarDays, MapPin, Globe, Calendar, Hash, File as File$1, FileType, FolderOpen, Fingerprint, Paperclip, TriangleAlert, LoaderCircle, NotebookPen, Columns3, EyeOff, ArrowUp, ArrowDown, ZoomOut, Camera, FilePlus2, UserMinus, UserPlus, UsersRound, Code2, Infinity, Bug, Crop, Undo2, ImageUp, ChevronDown, MoreHorizontal, Wrench, RotateCw, Square, BadgeCheck, Shield, ClipboardList, Table2, CheckCheck, FolderUp, ArrowUpCircle, Contact, Scale, BookA, Quote, Inbox, CalendarX, CalendarCheck, Phone, LogIn, Pause, Workflow, Minimize2, Maximize2, Minus, CalendarSearch, DoorOpen, AlertCircle } from 'lucide-react';
101
+ import { Users, MessageCircleMore, SquarePen, BookOpen, MessagesSquare, Pencil, Download, Mail, FolderInput, Trash2, Eye, Sparkles, Play, ArrowDownToLine, RefreshCw, Zap, AlertTriangle, FileX, SkipForward, Loader2, Clock, CheckCircle, ArrowUpRight, Send, Settings, Edit3, Copy, Link, Share2, Check, Milestone, RotateCcw, FileText, Network, ChevronRight, Bell, Activity, Info, UserCheck, WifiOff, CircleCheck, Upload, Link2, Search, Plus, ArrowLeft, ExternalLink as ExternalLink$1, Tags, CheckCircle2, Monitor, UserCircle, KeyRound, Radio, LogOut, Wifi, Lock, HardDrive, User, HatGlasses, MessageSquare, PlugZap, Gauge, Cloud, XCircle, Building2, Palette, Type, Printer, SquareStack, Table, FolderKanban, Cake, X, UserRound, Star, Tag, Video, CalendarDays, MapPin, Globe, Calendar, Hash, File as File$1, FileType, FolderOpen, Fingerprint, Paperclip, TriangleAlert, LoaderCircle, NotebookPen, Columns3, EyeOff, ArrowUp, ArrowDown, ZoomOut, Camera, FilePlus2, UserMinus, UserPlus, UsersRound, Code2, Infinity, Bug, Crop, Undo2, ImageUp, ChevronDown, MoreHorizontal, Wrench, RotateCw, Square, BadgeCheck, Shield, ClipboardList, Table2, CheckCheck, FolderUp, ArrowUpCircle, Contact, Scale, BookA, Quote, Inbox, CalendarX, CalendarCheck, Phone, LogIn, Pause, Workflow, Minimize2, Maximize2, Minus, CalendarSearch, DoorOpen, AlertCircle, ClockFading } from 'lucide-react';
102
102
  import { isAgent, UserEntity, getUserInitials, getUserDisplayName, getUserAvatarColor, agentAvatarColors, Avatar, AvatarImage, AvatarFallback, cn, ShieldIcon, getWorkspaceColor, getFileTypeIcon, DocumentEntity, getDocumentTitle, formatFolderLabel, getEntityLabel, getEntityColor, VisibilityIcon, formatFriendlyDate, getDocumentSubject, Badge, getTagTypeIcon, getTagTypeLabel, VisibilityToggle, TagEntity, ThreadVisibilityIcon, Button, isImageDocument, Tooltip, TooltipTrigger, TooltipContent, Dialog, DialogContent, formatRelativeTime, ProviderIcon, EntityIcon, createUserAvatarIcon, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Label, Input, Textarea, tagKindNouns, tagKindTitle, IconToggle, Switch, Checkbox, entityNoun, DialogTrigger, EntityPill, ProjectEntity, Tabs, TabsList, TabsTrigger, TabsContent, getDocIcon, getDocumentNature, getDocumentAuthor, markdownToPlainText, formatDocDate, getDocumentDate, friendlyFileType, canonicalFolderPath, DebouncedInput, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Slider, AgentBadge, PresenceLabel, TooltipProvider, UserMenu, CommandGroup, CommandItem, Popover, PopoverAnchor, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, ScrollArea, ArbiIcon, ARBI_MARK_SRC, Card, CardHeader, CardTitle, CardContent, VerifiedToggle, Progress } from '@arbidocs/react/ui';
103
103
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
104
104
  import { hasMessageBody, notify, linkMentions, useNotify, sharedSearchSession, takePendingSearch, selectUnread, NotificationBell, useTurnDocumentId, useOpenDocumentId, useRegisterOpenDocument } from '@arbidocs/react/shell';
105
105
  import { SIGNED_LOCKED_REASON, isSignedVersion, currentHasMarkup, fetchMarkupPdf, downloadBlob, useIsOnline, DocumentToolsProvider, useOptionalDocumentTools, fetchDocumentPdf, useSignatureVerification, SignatureVerificationError } from '@arbidocs/react/document-tools';
106
106
  import { create } from 'zustand';
107
- import { artifactKindFromFileName, viewerTabForArtifactMode, useStreamedArtifact } from '@arbidocs/react/artifacts';
107
+ import { artifactKindFromFileName, viewerTabForArtifactMode, useStreamedArtifact, parseVersionRef } from '@arbidocs/react/artifacts';
108
108
  import { useDraggable, useDroppable, useSensors, useSensor, MouseSensor, TouchSensor, pointerWithin, rectIntersection, DndContext, DragOverlay } from '@dnd-kit/core';
109
109
  import { useVirtualizer } from '@tanstack/react-virtual';
110
110
  import { persist, createJSONStorage } from 'zustand/middleware';
@@ -29005,6 +29005,870 @@ function ConnectedGridView(props) {
29005
29005
  );
29006
29006
  return /* @__PURE__ */ jsx(GridView, { ...props, gridState, onGridStateChange });
29007
29007
  }
29008
+ function useEmailSyncTrigger() {
29009
+ const arbi = useArbi();
29010
+ const { notify: notify18 } = useBlocksEnvironment();
29011
+ const triggerSync = useTriggerMailboxSync();
29012
+ const runSync = useCallback(
29013
+ async ({
29014
+ vendorKey,
29015
+ workspaceExtId,
29016
+ workspaceLabel = "the workspace"
29017
+ }) => {
29018
+ await arbi.connectors.bridgeTokens({ vendor: vendorKey });
29019
+ if (workspaceExtId) {
29020
+ await arbi.workspaces.open(workspaceExtId).catch(() => {
29021
+ });
29022
+ }
29023
+ triggerSync.mutate(
29024
+ { vendorKey, workspaceExtId },
29025
+ {
29026
+ onSuccess: (res) => {
29027
+ const n = res?.estimated_count;
29028
+ if (n === 0) {
29029
+ notify18("You\u2019re up to date \u2014 no new emails to sync.", "success");
29030
+ } else if (n != null && n > 0) {
29031
+ notify18(
29032
+ `Fetching ${n} new email${n === 1 ? "" : "s"} to ${workspaceLabel}.`,
29033
+ "success"
29034
+ );
29035
+ } else {
29036
+ notify18("Sync started \u2014 fetching new emails\u2026", "success");
29037
+ }
29038
+ },
29039
+ onError: (err) => {
29040
+ if (connectorErrorStatus(err) === 425) {
29041
+ notify18("Still preparing your session \u2014 please try Sync now again.", "error");
29042
+ } else if (connectorErrorStatus(err) === 409) {
29043
+ notify18("Reconnect needed \u2014 your account needs to be re-authorized.", "error");
29044
+ } else if (connectorErrorStatus(err) === 404) {
29045
+ notify18("Email sync is not enabled for this connector yet.", "error");
29046
+ } else {
29047
+ notify18("Could not start sync. Please try again.", "error");
29048
+ }
29049
+ }
29050
+ }
29051
+ );
29052
+ },
29053
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- triggerSync.mutate is a stable TanStack Query reference
29054
+ [arbi, notify18, triggerSync.mutate]
29055
+ );
29056
+ return { runSync, isPending: triggerSync.isPending };
29057
+ }
29058
+ function useImportHandoff(running, processed) {
29059
+ const [lastRunCount, setLastRunCount] = useState(null);
29060
+ const seenWhileRunning = useRef(null);
29061
+ useEffect(() => {
29062
+ if (running) {
29063
+ setLastRunCount(null);
29064
+ if (typeof processed === "number") seenWhileRunning.current = processed;
29065
+ return;
29066
+ }
29067
+ if (seenWhileRunning.current !== null) {
29068
+ setLastRunCount(seenWhileRunning.current);
29069
+ seenWhileRunning.current = null;
29070
+ }
29071
+ }, [running, processed]);
29072
+ return {
29073
+ lastRunCount,
29074
+ dismiss: () => setLastRunCount(null)
29075
+ };
29076
+ }
29077
+ function ImportHandoff({
29078
+ count: count2,
29079
+ noun,
29080
+ onDismiss,
29081
+ onViewProgress,
29082
+ "data-testid": testId
29083
+ }) {
29084
+ if (count2 <= 0) return null;
29085
+ return /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-start justify-between gap-3", "data-testid": testId, children: [
29086
+ /* @__PURE__ */ jsxs("div", { className: "ml-[34px] text-sm leading-snug text-muted-foreground", children: [
29087
+ "Imported ",
29088
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: count2.toLocaleString() }),
29089
+ " ",
29090
+ count2 === 1 ? noun : `${noun}s`,
29091
+ " \xB7 indexing in the background"
29092
+ ] }),
29093
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
29094
+ onViewProgress && /* @__PURE__ */ jsxs(
29095
+ Button,
29096
+ {
29097
+ variant: "outline",
29098
+ size: "sm",
29099
+ className: "h-7 gap-1.5",
29100
+ onClick: onViewProgress,
29101
+ "data-testid": testId ? `${testId}-view` : void 0,
29102
+ children: [
29103
+ /* @__PURE__ */ jsx(ClockFading, { className: "h-3.5 w-3.5" }),
29104
+ "View progress"
29105
+ ]
29106
+ }
29107
+ ),
29108
+ /* @__PURE__ */ jsx(
29109
+ Button,
29110
+ {
29111
+ variant: "ghost",
29112
+ size: "sm",
29113
+ className: "h-7 px-2 text-muted-foreground",
29114
+ onClick: onDismiss,
29115
+ "aria-label": "Dismiss import summary",
29116
+ "data-testid": testId ? `${testId}-dismiss` : void 0,
29117
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
29118
+ }
29119
+ )
29120
+ ] })
29121
+ ] });
29122
+ }
29123
+ var PROVIDER_FAMILIES = [
29124
+ { key: "microsoft", label: "Microsoft", vendors: ["microsoft"] },
29125
+ { key: "google", label: "Google", vendors: ["gmail"] }
29126
+ ];
29127
+ function VendorGlyph({ catalog }) {
29128
+ return /* @__PURE__ */ jsx(VendorLogo, { vendorKey: catalog.vendor_key, className: "h-7 w-7" });
29129
+ }
29130
+ function mailboxProductName(catalog) {
29131
+ if (catalog.vendor_key === "microsoft") return "Outlook";
29132
+ if (catalog.vendor_key === "gmail") return "Gmail";
29133
+ return catalog.display_name;
29134
+ }
29135
+ function EmailProviderRow({
29136
+ catalog,
29137
+ userConnector,
29138
+ workspaceExtId,
29139
+ workspaceName,
29140
+ onViewProgress,
29141
+ onNeedsReconnectChange
29142
+ }) {
29143
+ const [settingsOpen, setSettingsOpen] = useState(false);
29144
+ const { runSync, isPending: syncPending } = useEmailSyncTrigger();
29145
+ const cancelSync = useCancelMailboxSync();
29146
+ const arbi = useArbi();
29147
+ const isConnected = !!userConnector?.is_connected;
29148
+ const thisSync = userConnector?.syncs?.find((s) => s.workspace_ext_id === workspaceExtId);
29149
+ const syncingHere = isConnected && !!thisSync && thisSync.enabled;
29150
+ const [tokensBridged, setTokensBridged] = useState(false);
29151
+ useEffect(() => {
29152
+ if (!isConnected) {
29153
+ setTokensBridged(false);
29154
+ return;
29155
+ }
29156
+ let cancelled = false;
29157
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key, autoSyncWorkspaceExtId: workspaceExtId }).finally(() => {
29158
+ if (!cancelled) setTokensBridged(true);
29159
+ });
29160
+ return () => {
29161
+ cancelled = true;
29162
+ };
29163
+ }, [isConnected, arbi, catalog.vendor_key, workspaceExtId]);
29164
+ const { data: mailboxFolders, error: foldersError } = useMailboxFolders(
29165
+ catalog.vendor_key,
29166
+ isConnected && tokensBridged
29167
+ );
29168
+ const needsReconnect = isConnected && !!foldersError;
29169
+ useEffect(() => {
29170
+ onNeedsReconnectChange(catalog.vendor_key, needsReconnect);
29171
+ }, [needsReconnect, catalog.vendor_key, onNeedsReconnectChange]);
29172
+ const { data: progress, refetch: refetchProgress } = useMailboxSyncProgress(
29173
+ catalog.vendor_key,
29174
+ workspaceExtId,
29175
+ syncingHere
29176
+ );
29177
+ const running = !!progress?.running;
29178
+ const { lastRunCount, dismiss: dismissHandoff } = useImportHandoff(running, progress?.processed);
29179
+ useRefreshConnectorsOnRunEnd(running);
29180
+ const busy = syncPending;
29181
+ const kickProgressPolling = () => {
29182
+ [500, 1400, 2800].forEach((ms) => window.setTimeout(() => void refetchProgress(), ms));
29183
+ };
29184
+ const syncNow = () => {
29185
+ void runSync({ vendorKey: catalog.vendor_key, workspaceExtId, workspaceLabel: workspaceName });
29186
+ kickProgressPolling();
29187
+ };
29188
+ const stopSync = () => cancelSync.mutate(
29189
+ { vendorKey: catalog.vendor_key, workspaceExtId },
29190
+ { onSettled: () => void refetchProgress() }
29191
+ );
29192
+ const emailNoun = (n) => n === 1 ? "email" : "emails";
29193
+ const syncedCount = thisSync?.synced_count ?? 0;
29194
+ return /* @__PURE__ */ jsxs(
29195
+ ImportRow,
29196
+ {
29197
+ testId: `email-provider-row-${catalog.vendor_key}`,
29198
+ logo: /* @__PURE__ */ jsx(VendorGlyph, { catalog }),
29199
+ name: mailboxProductName(catalog),
29200
+ actions: (
29201
+ // Connecting AND reconnecting are owned by the family header, so a
29202
+ // not-connected or needs-reconnect row shows no button of its own.
29203
+ !isConnected || needsReconnect ? null : /* @__PURE__ */ jsx(
29204
+ ImportRunActions,
29205
+ {
29206
+ isRunning: running,
29207
+ isStopping: cancelSync.isPending,
29208
+ isBusy: busy,
29209
+ onImport: syncingHere ? syncNow : () => setSettingsOpen(true),
29210
+ onStop: stopSync,
29211
+ onSettings: () => setSettingsOpen(true),
29212
+ settingsLabel: `${mailboxProductName(catalog)} sync settings`,
29213
+ stopButton: { testId: `email-stop-${catalog.vendor_key}` }
29214
+ }
29215
+ )
29216
+ ),
29217
+ children: [
29218
+ isConnected && !needsReconnect && !running && /* @__PURE__ */ jsxs(
29219
+ ImportSummary,
29220
+ {
29221
+ aside: /* @__PURE__ */ jsx(ImportAside, { children: thisSync && thisSync.folders.length > 0 && /* @__PURE__ */ jsx(
29222
+ FolderSummary,
29223
+ {
29224
+ names: thisSync.folders.map(
29225
+ (id) => mailboxFolders?.find((f) => f.id === id)?.name
29226
+ ),
29227
+ testId: `email-folders-${catalog.vendor_key}`
29228
+ }
29229
+ ) }),
29230
+ children: [
29231
+ /* @__PURE__ */ jsxs("div", { children: [
29232
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: syncedCount.toLocaleString() }),
29233
+ " ",
29234
+ emailNoun(syncedCount),
29235
+ " in this workspace"
29236
+ ] }),
29237
+ /* @__PURE__ */ jsxs("div", { "data-testid": `email-last-sync-${catalog.vendor_key}`, children: [
29238
+ thisSync?.last_sync_at ? `Last synced ${formatRelativeTime(thisSync.last_sync_at, { style: "compact" })}` : "Not synced yet",
29239
+ thisSync?.backfill_since ? ` \xB7 Backfill: since ${new Date(thisSync.backfill_since).toLocaleDateString()}` : thisSync?.backfill_window != null && ` \xB7 Backfill: ${windowLabel(thisSync.backfill_window)}`
29240
+ ] })
29241
+ ]
29242
+ }
29243
+ ),
29244
+ running && /* @__PURE__ */ jsx(
29245
+ ImportProgress,
29246
+ {
29247
+ processed: progress?.processed ?? 0,
29248
+ total: progress?.total,
29249
+ noun: "emails",
29250
+ testId: `email-progress-${catalog.vendor_key}`
29251
+ }
29252
+ ),
29253
+ !running && lastRunCount !== null && /* @__PURE__ */ jsx(
29254
+ ImportHandoff,
29255
+ {
29256
+ count: lastRunCount,
29257
+ noun: "email",
29258
+ onDismiss: dismissHandoff,
29259
+ onViewProgress,
29260
+ "data-testid": `email-handoff-${catalog.vendor_key}`
29261
+ }
29262
+ ),
29263
+ /* @__PURE__ */ jsx(
29264
+ ConnectedMailboxSyncDialog,
29265
+ {
29266
+ catalog,
29267
+ userConnector,
29268
+ open: settingsOpen,
29269
+ onOpenChange: setSettingsOpen,
29270
+ lockedWorkspaceExtId: workspaceExtId
29271
+ }
29272
+ )
29273
+ ]
29274
+ }
29275
+ );
29276
+ }
29277
+ function EmailImportPanel({
29278
+ workspaceExtId,
29279
+ workspaceName,
29280
+ onViewProgress,
29281
+ microsoftExtra,
29282
+ googleExtra
29283
+ }) {
29284
+ const arbi = useArbi();
29285
+ const { confirm, notify: notify18 } = useBlocksEnvironment();
29286
+ const { data: catalog = [] } = useConnectorCatalog();
29287
+ const { data: myConnectors = [] } = useMyConnectors();
29288
+ const disconnect = useDisconnectConnector();
29289
+ const isVendorVisible = useConnectorVendorVisibility();
29290
+ const [reconnectByVendor, setReconnectByVendor] = useState({});
29291
+ const handleNeedsReconnectChange = useCallback((vendorKey, needs) => {
29292
+ setReconnectByVendor(
29293
+ (prev) => prev[vendorKey] === needs ? prev : { ...prev, [vendorKey]: needs }
29294
+ );
29295
+ }, []);
29296
+ const mailboxCatalog = catalog.filter(
29297
+ (c) => isMailboxSyncVendor(c.vendor_key) && isVendorVisible(c.vendor_key)
29298
+ );
29299
+ const connectedByVendor = Object.fromEntries(myConnectors.map((uc) => [uc.vendor_key, uc]));
29300
+ const byVendor = Object.fromEntries(mailboxCatalog.map((c) => [c.vendor_key, c]));
29301
+ const connectFamily = async (vendorKey) => {
29302
+ try {
29303
+ window.location.href = await arbi.connectors.authorize(
29304
+ vendorKey,
29305
+ connectorReturnTo("accounts")
29306
+ );
29307
+ } catch {
29308
+ notify18("Could not start the connection. Please try again.", "error");
29309
+ }
29310
+ };
29311
+ const reconnectFamily = async (vendorKey) => {
29312
+ try {
29313
+ await disconnect.mutateAsync({ vendorKey });
29314
+ } catch {
29315
+ }
29316
+ try {
29317
+ window.location.href = await arbi.connectors.authorize(
29318
+ vendorKey,
29319
+ connectorReturnTo("accounts")
29320
+ );
29321
+ } catch {
29322
+ notify18("Could not start reconnection. Please try again.", "error");
29323
+ }
29324
+ };
29325
+ const extraByFamily = {
29326
+ microsoft: isVendorVisible("microsoft") ? microsoftExtra : null,
29327
+ google: isVendorVisible("gmail") ? googleExtra : null
29328
+ };
29329
+ const disconnectFamily = useCallback(
29330
+ async (family, connectVendor, identity) => {
29331
+ const who = identity ? `${identity} will be disconnected.` : "This account will be disconnected.";
29332
+ const ok = await confirm({
29333
+ message: `${who} Documents already imported stay in the workspace, but nothing further will sync until you connect again.`,
29334
+ title: `Disconnect ${family.label}?`
29335
+ });
29336
+ if (!ok) return;
29337
+ await disconnect.mutateAsync({ vendorKey: connectVendor });
29338
+ if (connectVendor === "microsoft") {
29339
+ for (const spVendor of SHAREPOINT_VENDORS) {
29340
+ if (connectedByVendor[spVendor]) {
29341
+ await disconnect.mutateAsync({ vendorKey: spVendor }).catch(() => {
29342
+ });
29343
+ }
29344
+ }
29345
+ }
29346
+ notify18(`Disconnected ${family.label}`, "success");
29347
+ },
29348
+ [confirm, disconnect, connectedByVendor, notify18]
29349
+ );
29350
+ const groups = PROVIDER_FAMILIES.map((family) => {
29351
+ const entries = family.vendors.map((v) => byVendor[v]).filter(Boolean);
29352
+ const extra = extraByFamily[family.key] ?? null;
29353
+ const connectVendor = family.vendors[0];
29354
+ const connectUc = connectedByVendor[connectVendor];
29355
+ const connected = !!connectUc?.is_connected;
29356
+ const identity = family.vendors.map((v) => connectedByVendor[v]).find((uc) => uc?.is_connected && uc?.vendor_user_identity)?.vendor_user_identity;
29357
+ const mailboxNeedsReconnect = family.vendors.some((v) => reconnectByVendor[v]);
29358
+ const needsReconnect = connected && (isDriveSyncVendor(connectVendor) && !!connectUc?.drive_needs_reconsent || mailboxNeedsReconnect);
29359
+ return { family, entries, extra, identity, connectVendor, connected, needsReconnect };
29360
+ }).filter((g) => g.entries.length > 0 || g.extra);
29361
+ if (groups.length === 0) return null;
29362
+ return /* @__PURE__ */ jsx(ImportPanel, { "data-testid": "email-import-panel", children: groups.map(
29363
+ ({ family, entries, extra, identity, connectVendor, connected, needsReconnect }) => /* @__PURE__ */ jsx(
29364
+ ImportFamilySection,
29365
+ {
29366
+ label: family.label,
29367
+ identity,
29368
+ action: !connected ? "connect" : needsReconnect ? "reconnect" : "disconnect",
29369
+ isActionPending: disconnect.isPending,
29370
+ onAction: () => void (!connected ? connectFamily(connectVendor) : needsReconnect ? reconnectFamily(connectVendor) : disconnectFamily(family, connectVendor, identity)),
29371
+ testId: `import-family-${family.key}`,
29372
+ actionButton: !connected ? { testId: `import-family-connect-${family.key}` } : needsReconnect ? { testId: `import-family-reconnect-${family.key}` } : { testId: `import-family-disconnect-${family.key}` },
29373
+ children: /* @__PURE__ */ jsxs(ImportList, { children: [
29374
+ entries.map((entry) => /* @__PURE__ */ jsx(
29375
+ EmailProviderRow,
29376
+ {
29377
+ catalog: entry,
29378
+ userConnector: connectedByVendor[entry.vendor_key],
29379
+ workspaceExtId,
29380
+ workspaceName,
29381
+ onViewProgress,
29382
+ onNeedsReconnectChange: handleNeedsReconnectChange
29383
+ },
29384
+ entry.vendor_key
29385
+ )),
29386
+ extra
29387
+ ] })
29388
+ },
29389
+ family.key
29390
+ )
29391
+ ) });
29392
+ }
29393
+ function useDriveSyncTrigger() {
29394
+ const arbi = useArbi();
29395
+ const { notify: notify18 } = useBlocksEnvironment();
29396
+ const triggerSync = useTriggerDriveSync();
29397
+ const runSync = useCallback(
29398
+ async ({
29399
+ vendorKey,
29400
+ workspaceExtId,
29401
+ workspaceLabel = "the workspace"
29402
+ }) => {
29403
+ await arbi.connectors.bridgeTokens({ vendor: vendorKey });
29404
+ if (workspaceExtId) {
29405
+ await arbi.workspaces.open(workspaceExtId).catch(() => {
29406
+ });
29407
+ }
29408
+ triggerSync.mutate(
29409
+ { vendorKey },
29410
+ {
29411
+ onSuccess: (res) => {
29412
+ const n = res?.estimated_count;
29413
+ if (n === 0) {
29414
+ notify18("You\u2019re up to date \u2014 no new documents to sync.", "success");
29415
+ } else if (n != null && n > 0) {
29416
+ notify18(
29417
+ `Fetching ${n} new document${n === 1 ? "" : "s"} to ${workspaceLabel}.`,
29418
+ "success"
29419
+ );
29420
+ } else {
29421
+ notify18("Sync started \u2014 fetching new documents\u2026", "success");
29422
+ }
29423
+ },
29424
+ onError: (err) => {
29425
+ if (connectorErrorStatus(err) === 425) {
29426
+ notify18("Still preparing your session \u2014 please try Sync now again.", "error");
29427
+ } else if (connectorErrorStatus(err) === 409) {
29428
+ notify18("Reconnect needed \u2014 your account needs to be re-authorized.", "error");
29429
+ } else if (connectorErrorStatus(err) === 404) {
29430
+ notify18("Drive sync is not enabled for this connector yet.", "error");
29431
+ } else {
29432
+ notify18("Could not start sync. Please try again.", "error");
29433
+ }
29434
+ }
29435
+ }
29436
+ );
29437
+ },
29438
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- triggerSync.mutate is a stable TanStack Query reference
29439
+ [arbi, notify18, triggerSync.mutate]
29440
+ );
29441
+ return { runSync, isPending: triggerSync.isPending };
29442
+ }
29443
+ var DRIVE_PRODUCT = {
29444
+ microsoft: { name: "OneDrive", glyph: "onedrive" },
29445
+ gmail: { name: "Google Drive", glyph: "googledrive" },
29446
+ microsoft_sharepoint: { name: "SharePoint", glyph: "sharepoint" },
29447
+ box: { name: "Box", glyph: "box" },
29448
+ dropbox: { name: "Dropbox", glyph: "dropbox" },
29449
+ onenote: { name: "OneNote", glyph: "onenote" },
29450
+ clio: { name: "Clio", glyph: "clio" }
29451
+ };
29452
+ function driveProduct(vendorKey) {
29453
+ return DRIVE_PRODUCT[vendorKey] ?? { name: "Drive", glyph: "onedrive" };
29454
+ }
29455
+ function VendorGlyph2({ catalog }) {
29456
+ return /* @__PURE__ */ jsx(
29457
+ VendorLogo,
29458
+ {
29459
+ vendorKey: catalog.vendor_key,
29460
+ product: driveProduct(catalog.vendor_key).glyph,
29461
+ className: "h-7 w-7"
29462
+ }
29463
+ );
29464
+ }
29465
+ function OneDriveProviderRow({
29466
+ catalog,
29467
+ userConnector,
29468
+ workspaceExtId,
29469
+ workspaceName,
29470
+ onViewProgress
29471
+ }) {
29472
+ const [settingsOpen, setSettingsOpen] = useState(false);
29473
+ const { runSync, isPending: syncPending } = useDriveSyncTrigger();
29474
+ const cancelSync = useCancelDriveSync();
29475
+ const arbi = useArbi();
29476
+ const { notify: notify18 } = useBlocksEnvironment();
29477
+ const isConnected = !!userConnector?.is_connected;
29478
+ const product = driveProduct(catalog.vendor_key);
29479
+ const status = userConnector?.drive_sync_status ?? null;
29480
+ const configuredHere = status != null && userConnector?.drive_sync_workspace_ext_id === workspaceExtId;
29481
+ const folderCount = userConnector?.drive_sync_folders?.length ?? 0;
29482
+ const needsReconsent = isConnected && !!userConnector?.drive_needs_reconsent;
29483
+ const [tokensBridged, setTokensBridged] = useState(false);
29484
+ useEffect(() => {
29485
+ if (!isConnected) {
29486
+ setTokensBridged(false);
29487
+ return;
29488
+ }
29489
+ let cancelled = false;
29490
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key, autoSyncWorkspaceExtId: workspaceExtId }).finally(() => {
29491
+ if (!cancelled) setTokensBridged(true);
29492
+ });
29493
+ return () => {
29494
+ cancelled = true;
29495
+ };
29496
+ }, [isConnected, arbi, catalog.vendor_key, workspaceExtId]);
29497
+ const { error: foldersError } = useDriveFolders(
29498
+ catalog.vendor_key,
29499
+ isConnected && tokensBridged && !needsReconsent
29500
+ );
29501
+ const needsReconnect = needsReconsent || isConnected && connectorErrorStatus(foldersError) === 409;
29502
+ const { data: progress, refetch: refetchProgress } = useDriveSyncProgress(
29503
+ catalog.vendor_key,
29504
+ configuredHere && !needsReconnect
29505
+ );
29506
+ const running = !!progress?.running;
29507
+ const { lastRunCount, dismiss: dismissHandoff } = useImportHandoff(running, progress?.processed);
29508
+ useRefreshConnectorsOnRunEnd(running);
29509
+ const { data: estimate, refetch: refetchEstimate } = useDriveSyncEstimate(
29510
+ catalog.vendor_key,
29511
+ configuredHere && tokensBridged && !needsReconnect && !running
29512
+ );
29513
+ const lastSummaryRef = useRef(null);
29514
+ const baselinedRef = useRef(false);
29515
+ useEffect(() => {
29516
+ if (progress === void 0) return;
29517
+ const s = progress.summary;
29518
+ const finishedAt = s?.finished_at ?? null;
29519
+ if (!baselinedRef.current) {
29520
+ baselinedRef.current = true;
29521
+ lastSummaryRef.current = finishedAt;
29522
+ return;
29523
+ }
29524
+ if (!s?.finished_at || lastSummaryRef.current === s.finished_at) return;
29525
+ lastSummaryRef.current = s.finished_at;
29526
+ const total = s.attempted || s.ingested;
29527
+ const importedMsg = `Imported ${s.ingested} of ${total} document${total === 1 ? "" : "s"} from ${product.name}.`;
29528
+ const skipped = s.skipped ?? [];
29529
+ if (skipped.length === 0) {
29530
+ notify18(importedMsg, "success");
29531
+ } else {
29532
+ notify18(`${importedMsg} ${skipped.length} couldn\u2019t be imported:`, "warning", {
29533
+ duration: 12e3,
29534
+ description: /* @__PURE__ */ jsx("ul", { className: "mt-1 max-h-56 space-y-0.5 overflow-y-auto pr-1 text-xs", children: skipped.map((f, i) => /* @__PURE__ */ jsxs("li", { className: "break-all", children: [
29535
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: f.name }),
29536
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
29537
+ " \u2014 ",
29538
+ f.reason
29539
+ ] })
29540
+ ] }, i)) })
29541
+ });
29542
+ }
29543
+ void refetchEstimate();
29544
+ }, [progress, refetchEstimate, product.name, notify18]);
29545
+ const pendingCount = estimate?.estimated_count;
29546
+ const busy = syncPending;
29547
+ const ownsAuth = catalog.vendor_key === "microsoft_sharepoint";
29548
+ const [reauthPending, setReauthPending] = useState(false);
29549
+ const reconnectSelf = async () => {
29550
+ setReauthPending(true);
29551
+ try {
29552
+ window.location.href = await arbi.connectors.authorize(
29553
+ catalog.vendor_key,
29554
+ connectorReturnTo("accounts")
29555
+ );
29556
+ } catch {
29557
+ setReauthPending(false);
29558
+ notify18("Could not start reconnection. Please try again.", "error");
29559
+ }
29560
+ };
29561
+ const kickProgressPolling = () => {
29562
+ [500, 1400, 2800].forEach((ms) => window.setTimeout(() => void refetchProgress(), ms));
29563
+ };
29564
+ const syncNow = () => {
29565
+ void runSync({
29566
+ vendorKey: catalog.vendor_key,
29567
+ workspaceExtId,
29568
+ workspaceLabel: workspaceName
29569
+ });
29570
+ kickProgressPolling();
29571
+ [1500, 4e3].forEach((ms) => window.setTimeout(() => void refetchEstimate(), ms));
29572
+ };
29573
+ const stopSync = () => cancelSync.mutate(
29574
+ { vendorKey: catalog.vendor_key },
29575
+ { onSettled: () => void refetchProgress() }
29576
+ );
29577
+ const driveNoun = (n) => n === 1 ? "document" : "documents";
29578
+ const showRunActions = isConnected && !needsReconnect;
29579
+ const reconnectAction = ownsAuth && needsReconnect ? /* @__PURE__ */ jsx(
29580
+ ImportActionButton,
29581
+ {
29582
+ onClick: () => void reconnectSelf(),
29583
+ disabled: reauthPending,
29584
+ "data-testid": `onedrive-reconnect-${catalog.vendor_key}`,
29585
+ children: reauthPending ? "Reconnecting\u2026" : "Reconnect"
29586
+ }
29587
+ ) : null;
29588
+ return /* @__PURE__ */ jsxs(
29589
+ ImportRow,
29590
+ {
29591
+ testId: `onedrive-provider-row-${catalog.vendor_key}`,
29592
+ logo: /* @__PURE__ */ jsx(VendorGlyph2, { catalog }),
29593
+ name: product.name,
29594
+ actions: (
29595
+ // OneDrive/Google Drive: connecting AND reconnecting are owned by the family header.
29596
+ // SharePoint (ownsAuth) is a separate grant, so its row renders its OWN Reconnect (D1).
29597
+ showRunActions ? (
29598
+ // Until folders are configured here (or when nothing new is pending), Import now
29599
+ // stays disabled; the gear opens the folder picker.
29600
+ /* @__PURE__ */ jsx(
29601
+ ImportRunActions,
29602
+ {
29603
+ isRunning: running,
29604
+ isStopping: cancelSync.isPending,
29605
+ isBusy: busy,
29606
+ importDisabled: !configuredHere || pendingCount === 0,
29607
+ importTitle: !configuredHere ? `Choose ${product.name} folders in settings first` : pendingCount === 0 ? "No new documents to import" : void 0,
29608
+ onImport: syncNow,
29609
+ onStop: stopSync,
29610
+ onSettings: () => setSettingsOpen(true),
29611
+ settingsLabel: `${product.name} import settings`,
29612
+ importButton: { testId: `onedrive-sync-${catalog.vendor_key}` },
29613
+ settingsButton: { testId: `onedrive-settings-${catalog.vendor_key}` },
29614
+ stopButton: { testId: `onedrive-stop-${catalog.vendor_key}` }
29615
+ }
29616
+ )
29617
+ ) : reconnectAction
29618
+ ),
29619
+ children: [
29620
+ ownsAuth && needsReconnect && /* @__PURE__ */ jsxs(ImportHint, { "data-testid": `onedrive-reconnect-hint-${catalog.vendor_key}`, children: [
29621
+ "Couldn\u2019t reach SharePoint. Click ",
29622
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Reconnect" }),
29623
+ " \u2014 if it keeps happening, log out and back in to refresh the connection."
29624
+ ] }),
29625
+ configuredHere && !needsReconnect && !running && /* @__PURE__ */ jsxs(
29626
+ ImportSummary,
29627
+ {
29628
+ className: "mt-2",
29629
+ aside: typeof pendingCount === "number" ? /* @__PURE__ */ jsx(ImportAside, { className: "max-w-none shrink-0", children: /* @__PURE__ */ jsx("span", { "data-testid": `drive-pending-${catalog.vendor_key}`, children: pendingCount > 0 ? `${pendingCount.toLocaleString()} new ${driveNoun(pendingCount)} to sync` : "No new documents to sync" }) }) : void 0,
29630
+ children: [
29631
+ /* @__PURE__ */ jsxs("div", { children: [
29632
+ "Syncing ",
29633
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: folderCount }),
29634
+ " folder",
29635
+ folderCount === 1 ? "" : "s",
29636
+ " into this workspace"
29637
+ ] }),
29638
+ /* @__PURE__ */ jsx("div", { "data-testid": `drive-last-sync-${catalog.vendor_key}`, children: userConnector?.drive_last_sync_at ? `Last synced ${formatRelativeTime(userConnector.drive_last_sync_at, { style: "compact" })}` : "Not synced yet" })
29639
+ ]
29640
+ }
29641
+ ),
29642
+ isConnected && !needsReconnect && !running && !configuredHere && /* @__PURE__ */ jsxs(
29643
+ "button",
29644
+ {
29645
+ type: "button",
29646
+ className: "ml-[34px] mt-2 text-left text-sm leading-snug text-muted-foreground hover:text-foreground pointer-coarse:min-h-11",
29647
+ onClick: () => setSettingsOpen(true),
29648
+ "data-testid": `onedrive-choose-folders-${catalog.vendor_key}`,
29649
+ children: [
29650
+ "Choose folders in ",
29651
+ /* @__PURE__ */ jsx("span", { className: "underline", children: "settings" }),
29652
+ " to start syncing"
29653
+ ]
29654
+ }
29655
+ ),
29656
+ running && /* @__PURE__ */ jsx(
29657
+ ImportProgress,
29658
+ {
29659
+ processed: progress?.processed ?? 0,
29660
+ total: progress?.total,
29661
+ noun: "documents",
29662
+ testId: `onedrive-progress-${catalog.vendor_key}`
29663
+ }
29664
+ ),
29665
+ !running && lastRunCount !== null && /* @__PURE__ */ jsx(
29666
+ ImportHandoff,
29667
+ {
29668
+ count: lastRunCount,
29669
+ noun: "document",
29670
+ onDismiss: dismissHandoff,
29671
+ onViewProgress,
29672
+ "data-testid": `onedrive-handoff-${catalog.vendor_key}`
29673
+ }
29674
+ ),
29675
+ /* @__PURE__ */ jsx(
29676
+ ConnectedDriveSyncDialog,
29677
+ {
29678
+ catalog,
29679
+ userConnector,
29680
+ open: settingsOpen,
29681
+ onOpenChange: setSettingsOpen,
29682
+ lockedWorkspaceExtId: workspaceExtId,
29683
+ onEnabled: () => void refetchEstimate()
29684
+ }
29685
+ )
29686
+ ]
29687
+ }
29688
+ );
29689
+ }
29690
+ function SharePointEnableRow({
29691
+ catalog,
29692
+ sharePointAdminUrl
29693
+ }) {
29694
+ const arbi = useArbi();
29695
+ const { notify: notify18 } = useBlocksEnvironment();
29696
+ const [pending, setPending] = useState(false);
29697
+ const product = driveProduct(catalog.vendor_key);
29698
+ const enable = async () => {
29699
+ setPending(true);
29700
+ try {
29701
+ window.location.href = await arbi.connectors.authorize(
29702
+ catalog.vendor_key,
29703
+ connectorReturnTo("accounts")
29704
+ );
29705
+ } catch {
29706
+ setPending(false);
29707
+ notify18("Could not start the connection. Please try again.", "error");
29708
+ }
29709
+ };
29710
+ const copyAdminLink = async () => {
29711
+ const link = sharePointAdminUrl;
29712
+ if (!link) return;
29713
+ try {
29714
+ await navigator.clipboard.writeText(link);
29715
+ notify18("Approval link copied \u2014 send it to your Microsoft admin.", "success");
29716
+ } catch {
29717
+ notify18(`Copy this link for your Microsoft admin: ${link}`, "info");
29718
+ }
29719
+ };
29720
+ return /* @__PURE__ */ jsx(
29721
+ ImportRow,
29722
+ {
29723
+ testId: `onedrive-provider-row-${catalog.vendor_key}`,
29724
+ logo: /* @__PURE__ */ jsx(VendorLogo, { vendorKey: catalog.vendor_key, product: product.glyph, className: "h-7 w-7" }),
29725
+ name: product.name,
29726
+ actions: /* @__PURE__ */ jsx(
29727
+ ImportActionButton,
29728
+ {
29729
+ onClick: () => void enable(),
29730
+ disabled: pending,
29731
+ "data-testid": `onedrive-enable-${catalog.vendor_key}`,
29732
+ children: pending ? "Enabling\u2026" : `Enable ${product.name}`
29733
+ }
29734
+ ),
29735
+ children: sharePointAdminUrl && /* @__PURE__ */ jsxs(ImportHint, { children: [
29736
+ "Does your organization require admin approval?",
29737
+ " ",
29738
+ /* @__PURE__ */ jsx(
29739
+ "button",
29740
+ {
29741
+ type: "button",
29742
+ className: "underline hover:text-foreground",
29743
+ onClick: () => void copyAdminLink(),
29744
+ "data-testid": "sharepoint-copy-admin-link",
29745
+ children: "Copy the approval link"
29746
+ }
29747
+ ),
29748
+ " ",
29749
+ "and send it to your Microsoft admin \u2014 they won't need an ARBI account."
29750
+ ] })
29751
+ }
29752
+ );
29753
+ }
29754
+ function DriveImportPanel({
29755
+ workspaceExtId,
29756
+ workspaceName,
29757
+ onViewProgress,
29758
+ only,
29759
+ sharePointAdminUrl
29760
+ }) {
29761
+ const { data: catalog = [] } = useConnectorCatalog();
29762
+ const { data: myConnectors = [] } = useMyConnectors();
29763
+ const driveCatalog = catalog.filter(
29764
+ (c) => isDriveSyncVendor(c.vendor_key) && (!only || c.vendor_key === only)
29765
+ );
29766
+ if (driveCatalog.length === 0) return null;
29767
+ const connectedByVendor = Object.fromEntries(myConnectors.map((uc) => [uc.vendor_key, uc]));
29768
+ const microsoftConnected = !!connectedByVendor["microsoft"]?.is_connected;
29769
+ const rows = driveCatalog.map((entry) => {
29770
+ const uc = connectedByVendor[entry.vendor_key];
29771
+ if (entry.vendor_key === "microsoft_sharepoint" && !uc) {
29772
+ if (microsoftConnected) {
29773
+ return /* @__PURE__ */ jsx(
29774
+ SharePointEnableRow,
29775
+ {
29776
+ catalog: entry,
29777
+ sharePointAdminUrl
29778
+ },
29779
+ entry.vendor_key
29780
+ );
29781
+ }
29782
+ const product = driveProduct(entry.vendor_key);
29783
+ return /* @__PURE__ */ jsx(
29784
+ ImportRow,
29785
+ {
29786
+ testId: `onedrive-provider-row-${entry.vendor_key}`,
29787
+ logo: /* @__PURE__ */ jsx(
29788
+ VendorLogo,
29789
+ {
29790
+ vendorKey: entry.vendor_key,
29791
+ product: product.glyph,
29792
+ className: "h-7 w-7"
29793
+ }
29794
+ ),
29795
+ name: product.name
29796
+ },
29797
+ entry.vendor_key
29798
+ );
29799
+ }
29800
+ return /* @__PURE__ */ jsx(
29801
+ OneDriveProviderRow,
29802
+ {
29803
+ catalog: entry,
29804
+ userConnector: uc,
29805
+ workspaceExtId,
29806
+ workspaceName,
29807
+ onViewProgress
29808
+ },
29809
+ entry.vendor_key
29810
+ );
29811
+ }).filter(Boolean);
29812
+ if (rows.length === 0) return null;
29813
+ return /* @__PURE__ */ jsx(ImportList, { "data-testid": "onedrive-import-panel", children: rows });
29814
+ }
29815
+ function useHasAccountsImport() {
29816
+ const isVendorVisible = useConnectorVendorVisibility();
29817
+ return isVendorVisible("microsoft") || isVendorVisible("gmail");
29818
+ }
29819
+ function ConnectedAccountsImport({
29820
+ workspaceExtId,
29821
+ workspaceName,
29822
+ onViewProgress,
29823
+ sharePointAdminUrl
29824
+ }) {
29825
+ const isVendorVisible = useConnectorVendorVisibility();
29826
+ if (!isVendorVisible("microsoft") && !isVendorVisible("gmail")) return null;
29827
+ return /* @__PURE__ */ jsx(
29828
+ EmailImportPanel,
29829
+ {
29830
+ workspaceExtId,
29831
+ workspaceName,
29832
+ onViewProgress,
29833
+ microsoftExtra: (
29834
+ // Two drive products ride Microsoft: OneDrive (the `microsoft` grant) and SharePoint
29835
+ // (its own grant, behind its own visibility toggle).
29836
+ /* @__PURE__ */ jsxs("div", { className: "divide-y divide-border", "data-testid": "upload-source-onedrive", children: [
29837
+ /* @__PURE__ */ jsx(
29838
+ DriveImportPanel,
29839
+ {
29840
+ workspaceExtId,
29841
+ workspaceName,
29842
+ onViewProgress,
29843
+ sharePointAdminUrl,
29844
+ only: "microsoft"
29845
+ }
29846
+ ),
29847
+ isVendorVisible("microsoft_sharepoint") && /* @__PURE__ */ jsx("div", { "data-testid": "upload-source-sharepoint", children: /* @__PURE__ */ jsx(
29848
+ DriveImportPanel,
29849
+ {
29850
+ workspaceExtId,
29851
+ workspaceName,
29852
+ onViewProgress,
29853
+ sharePointAdminUrl,
29854
+ only: "microsoft_sharepoint"
29855
+ }
29856
+ ) })
29857
+ ] })
29858
+ ),
29859
+ googleExtra: /* @__PURE__ */ jsx("div", { "data-testid": "upload-source-googledrive", children: /* @__PURE__ */ jsx(
29860
+ DriveImportPanel,
29861
+ {
29862
+ workspaceExtId,
29863
+ workspaceName,
29864
+ onViewProgress,
29865
+ sharePointAdminUrl,
29866
+ only: "gmail"
29867
+ }
29868
+ ) })
29869
+ }
29870
+ );
29871
+ }
29008
29872
  var UNTITLED = "Untitled";
29009
29873
  function useDatabaseCellSources(databases) {
29010
29874
  const workspaceId = useArbiSessionState((state) => state.workspaceId);
@@ -37699,6 +38563,763 @@ function ConnectedMessageList({ messages }) {
37699
38563
  /* @__PURE__ */ jsx(ConnectedThreadsPreview, { open: previewOpen, onOpenChange: setPreviewOpen })
37700
38564
  ] });
37701
38565
  }
38566
+ function ThreadSearch({ children, ResultsBoundary = ErrorBoundary }) {
38567
+ const [query, setQuery] = useState("");
38568
+ const [submitted, setSubmitted] = useState("");
38569
+ const selectedWorkspaceId = useArbiSessionState((s) => s.workspaceId);
38570
+ const { notify: notify18, openConversation } = useBlocksEnvironment();
38571
+ const search = useConversationSearch();
38572
+ const isSearching = search.isPending;
38573
+ const groups = useMemo(
38574
+ () => search.isError ? [] : (search.data?.results ?? []).map((g) => ({
38575
+ id: g.conversation_ext_id,
38576
+ title: g.title,
38577
+ matches: g.messages.map((m) => ({
38578
+ id: m.message_ext_id,
38579
+ role: m.role,
38580
+ score: m.score,
38581
+ snippet: m.snippet
38582
+ }))
38583
+ })),
38584
+ [search.data, search.isError]
38585
+ );
38586
+ const handleSearch = useCallback(() => {
38587
+ const q = query.trim();
38588
+ if (!q || !selectedWorkspaceId || isSearching) return;
38589
+ setSubmitted(q);
38590
+ search.mutate(
38591
+ { query: q, search_mode: "hybrid", limit: 20 },
38592
+ {
38593
+ onError: (err) => {
38594
+ console.error("Conversation search failed", err);
38595
+ notify18("Conversation search failed", "error");
38596
+ }
38597
+ }
38598
+ );
38599
+ }, [query, selectedWorkspaceId, isSearching, search, notify18]);
38600
+ const clearSearch = useCallback(() => {
38601
+ setQuery("");
38602
+ setSubmitted("");
38603
+ }, []);
38604
+ const openHit = useCallback(
38605
+ (conversationId, messageId) => {
38606
+ openConversation(conversationId, messageId ? { messageId } : void 0);
38607
+ },
38608
+ [openConversation]
38609
+ );
38610
+ return /* @__PURE__ */ jsx(
38611
+ ConversationSearchView,
38612
+ {
38613
+ query,
38614
+ onQueryChange: setQuery,
38615
+ onSubmit: handleSearch,
38616
+ canSubmit: !!query.trim() && !!selectedWorkspaceId && !isSearching,
38617
+ isSearching,
38618
+ submittedQuery: submitted,
38619
+ groups,
38620
+ onOpenConversation: openHit,
38621
+ onClear: clearSearch,
38622
+ ResultsBoundary,
38623
+ children
38624
+ }
38625
+ );
38626
+ }
38627
+ var DEFAULT_THREAD_VISIBILITY = { me: null, workspace: null };
38628
+ var relativeTime2 = (iso) => formatRelativeTime(iso, { style: "short" });
38629
+ var LIST_LABELS = {
38630
+ emptyTitle: "Nothing here yet",
38631
+ emptyMessage: "Use New: just type what you need, or fill in an owner and a due date. You always decide when a thread is done.",
38632
+ untitled: `Untitled ${getEntityLabel("CONVERSATION").toLowerCase()}`,
38633
+ noMatches: `No ${getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} match.`,
38634
+ selectAll: "Select all"
38635
+ };
38636
+ var RENAME_DIALOG = { testId: "rename-conversation-modal" };
38637
+ function useStableRecencyOrder(rows) {
38638
+ const orderRef = useRef([]);
38639
+ return useMemo(() => {
38640
+ const byRecency = [...rows].sort(
38641
+ (a, b) => new Date(b.updated_at || b.created_at || 0).getTime() - new Date(a.updated_at || a.created_at || 0).getTime()
38642
+ );
38643
+ const present = new Set(byRecency.map((r) => r.external_id));
38644
+ const known = new Set(orderRef.current);
38645
+ const added = byRecency.map((r) => r.external_id).filter((id) => !known.has(id));
38646
+ orderRef.current = [...added, ...orderRef.current.filter((id) => present.has(id))];
38647
+ const byId = new Map(byRecency.map((r) => [r.external_id, r]));
38648
+ return orderRef.current.flatMap((id) => byId.get(id) ?? []);
38649
+ }, [rows]);
38650
+ }
38651
+ function ConnectedThreadsPage({
38652
+ showHeader = true,
38653
+ search = false,
38654
+ ResultsBoundary,
38655
+ focusLauncher,
38656
+ layout = "list",
38657
+ workflowActions
38658
+ }) {
38659
+ const mode = layout === "inbox" ? "tasks" : "threads";
38660
+ const { confirm, notify: notify18, openConversation, openDocument } = useBlocksEnvironment();
38661
+ const { conversations: all, isLoading } = useConversationItems();
38662
+ const [doneFilter] = useTransientView("threads.done", "exclude");
38663
+ const [visibilityFilters] = useTransientView("threads.visibility", DEFAULT_THREAD_VISIBILITY);
38664
+ const [meetingFilter] = useTransientView("threads.meetings", null);
38665
+ const [topbarFilterQuery, setTopbarFilterQuery] = useTransientView("topbar.filter", "");
38666
+ const currentUserExtId = useArbiSession().user?.external_id;
38667
+ const listed = useMemo(
38668
+ () => all.filter((c) => mode === "threads" || c.status != null),
38669
+ [all, mode]
38670
+ );
38671
+ const tasks = useStableRecencyOrder(listed);
38672
+ const updateConversation = useUpdateConversation();
38673
+ const deleteConversation = useDeleteConversation();
38674
+ const people = useTaskPeople();
38675
+ const renderPerson = useRenderTaskPerson();
38676
+ const canEditShared = useCanEditShared();
38677
+ const isWorkspaceOwner = useIsWorkspaceOwner();
38678
+ const { data: agents = [] } = useAgents();
38679
+ const { data: workflows = [] } = useWorkflows();
38680
+ const agentNames = useMemo(
38681
+ () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
38682
+ [agents]
38683
+ );
38684
+ const workflowNames = useMemo(
38685
+ () => Object.fromEntries(workflows.map((w) => [w.external_id, w.name])),
38686
+ [workflows]
38687
+ );
38688
+ const runConversation = useRunConversation();
38689
+ const [busyId, setBusyId] = useState(null);
38690
+ const [editorOpen, setEditorOpen] = useState(false);
38691
+ const [editing, setEditing] = useState(null);
38692
+ const [startOpen, setStartOpen] = useState(false);
38693
+ const [parentForNew, setParentForNew] = useState(void 0);
38694
+ const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && workflowNames[task.workflow_ext_id] || "Untitled task";
38695
+ const openCreate = () => {
38696
+ setParentForNew(void 0);
38697
+ setStartOpen(true);
38698
+ };
38699
+ const openAddSubtask = (parent) => {
38700
+ setParentForNew(parent.external_id);
38701
+ setStartOpen(true);
38702
+ };
38703
+ const [renaming, setRenaming] = useState(null);
38704
+ const [newTitle, setNewTitle] = useState("");
38705
+ const [isExportOpen, setIsExportOpen] = useState(false);
38706
+ const [exportRows, setExportRows] = useState([]);
38707
+ const openEdit = (task) => {
38708
+ if (mode === "threads" || !task.status) {
38709
+ setRenaming(task);
38710
+ setNewTitle(task.title ?? "");
38711
+ return;
38712
+ }
38713
+ setEditing(task);
38714
+ setEditorOpen(true);
38715
+ };
38716
+ const act = async (task, action, success, failure) => {
38717
+ setBusyId(task.external_id);
38718
+ try {
38719
+ await action();
38720
+ if (success) notify18(success, "success");
38721
+ } catch (error) {
38722
+ notify18(
38723
+ error instanceof ArbiApiError && error.detail ? `${failure}: ${error.detail}` : failure,
38724
+ "error"
38725
+ );
38726
+ } finally {
38727
+ setBusyId(null);
38728
+ }
38729
+ };
38730
+ const patch = (task, body) => updateConversation.mutateAsync({ conversationId: task.external_id, patch: body });
38731
+ const setStatus = (task, status, success) => act(task, () => patch(task, { status }), success, "Failed to update task");
38732
+ const handleToggleShared = (task, shouldShare) => act(
38733
+ task,
38734
+ () => patch(task, { shared: shouldShare }),
38735
+ shouldShare ? `Shared \u201C${nameOf(task)}\u201D with the workspace` : `Made \u201C${nameOf(task)}\u201D private`,
38736
+ "Failed to change who can see the task"
38737
+ );
38738
+ const handleMove = (task, parentId) => act(
38739
+ task,
38740
+ () => patch(task, { parent_conversation_ext_id: parentId }),
38741
+ parentId ? `Moved \u201C${nameOf(task)}\u201D` : `Moved \u201C${nameOf(task)}\u201D to the top level`,
38742
+ "Failed to move task"
38743
+ );
38744
+ const handleDelete = async (task) => {
38745
+ const subtasks = tasks.filter((t) => t.parent_conversation_ext_id === task.external_id).length;
38746
+ const confirmed = await confirm({
38747
+ message: `Delete \u201C${nameOf(task)}\u201D? This can't be undone from here.${subtasks ? ` Its ${subtasks === 1 ? "sub-task stays" : `${subtasks} sub-tasks stay`} and ${subtasks === 1 ? "moves" : "move"} to the top level.` : ""}`,
38748
+ title: "Delete task"
38749
+ });
38750
+ if (!confirmed) return;
38751
+ await act(
38752
+ task,
38753
+ () => deleteConversation.mutateAsync(task.external_id),
38754
+ `Deleted \u201C${nameOf(task)}\u201D`,
38755
+ "Failed to delete task"
38756
+ );
38757
+ };
38758
+ const forEach = async (rows, one, done) => {
38759
+ let failed = 0;
38760
+ for (const task of rows) {
38761
+ try {
38762
+ await one(task);
38763
+ } catch {
38764
+ failed += 1;
38765
+ }
38766
+ }
38767
+ notify18(
38768
+ failed ? `${failed} of ${rows.length} could not be changed: you may not be allowed to change them` : done,
38769
+ failed ? "error" : "success"
38770
+ );
38771
+ };
38772
+ const handleMarkDoneMany = (rows) => forEach(rows, (task) => patch(task, { status: "done" }), `Marked ${rows.length} done`);
38773
+ const handleDeleteMany = async (rows) => {
38774
+ const named = rows.slice(0, 3).map((task) => `"${nameOf(task)}"`).join(", ");
38775
+ const more = rows.length - 3;
38776
+ const confirmed = await confirm({
38777
+ message: `Delete ${more > 0 ? `${named} and ${more} more` : named}? This cannot be undone.`,
38778
+ title: `Delete ${rows.length} item${rows.length === 1 ? "" : "s"}`
38779
+ });
38780
+ if (!confirmed) return;
38781
+ await forEach(
38782
+ rows,
38783
+ (task) => deleteConversation.mutateAsync(task.external_id),
38784
+ `Deleted ${rows.length}`
38785
+ );
38786
+ };
38787
+ const handleSaveRename = useCallback(() => {
38788
+ if (!renaming || !newTitle.trim()) return;
38789
+ updateConversation.mutate(
38790
+ { conversationId: renaming.external_id, patch: { title: newTitle.trim() } },
38791
+ {
38792
+ onSuccess: () => {
38793
+ notify18("Conversation renamed successfully", "success");
38794
+ setRenaming(null);
38795
+ setNewTitle("");
38796
+ },
38797
+ onError: (error) => {
38798
+ console.error("Failed to rename conversation:", error);
38799
+ notify18("Failed to rename conversation", "error");
38800
+ }
38801
+ }
38802
+ );
38803
+ }, [renaming, newTitle, updateConversation, notify18]);
38804
+ const handleBulkShare = async (rows) => {
38805
+ const unshared = rows.filter((c) => !c.is_shared);
38806
+ if (unshared.length === 0) {
38807
+ await confirm({
38808
+ message: "All selected conversations are already shared",
38809
+ title: "Info",
38810
+ kind: "alert"
38811
+ });
38812
+ return;
38813
+ }
38814
+ const noun = getEntityLabel("CONVERSATION", unshared.length > 1 ? "PLURAL" : "SINGULAR");
38815
+ const confirmed = await confirm({
38816
+ message: `Are you sure you want to share ${unshared.length} ${noun.toLowerCase()} with everyone in the current ${getEntityLabel("WORKSPACE").toLowerCase()}? You can make them private again later.`,
38817
+ title: `Share ${getEntityLabel("CONVERSATION", "PLURAL")}`
38818
+ });
38819
+ if (!confirmed) return;
38820
+ try {
38821
+ await Promise.all(
38822
+ unshared.map(
38823
+ (c) => updateConversation.mutateAsync({ conversationId: c.external_id, patch: { shared: true } })
38824
+ )
38825
+ );
38826
+ notify18(`${unshared.length} ${noun.toLowerCase()} shared successfully`, "success");
38827
+ } catch (error) {
38828
+ console.error("Failed to share conversations:", error);
38829
+ notify18("Failed to share some conversations", "error");
38830
+ }
38831
+ };
38832
+ const { data: workspaceDocs } = useDocuments();
38833
+ const outputsByTask = useMemo(() => {
38834
+ const out = {};
38835
+ for (const [conversationId, docs] of Object.entries(
38836
+ groupOutputsByConversation(workspaceDocs ?? [])
38837
+ )) {
38838
+ out[conversationId] = docs.map((d) => ({
38839
+ id: d.external_id,
38840
+ name: getDocumentTitle(d, d.external_id)
38841
+ }));
38842
+ }
38843
+ return out;
38844
+ }, [workspaceDocs]);
38845
+ const handleOpenOutput = (documentId) => openDocument(documentId);
38846
+ const handleGrantAccess = (task) => act(
38847
+ task,
38848
+ () => runConversation.mutateAsync(task.external_id),
38849
+ `Running \u201C${nameOf(task)}\u201D`,
38850
+ "Failed to run task"
38851
+ );
38852
+ const threadLabels = useThreadLabels(canEditShared);
38853
+ const selectionActions = (selected, isCompact) => {
38854
+ const mine = selected.every((c) => c.created_by_ext_id === currentUserExtId);
38855
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
38856
+ mode === "threads" && selected.every((row2) => row2.is_owner || row2.is_shared && canEditShared) && selected.some((row2) => row2.status !== "done") && !selected.some((row2) => row2.in_progress || row2.status === "generating") && /* @__PURE__ */ jsx(
38857
+ SelectionBarAction,
38858
+ {
38859
+ icon: CheckCheck,
38860
+ label: "Mark Done",
38861
+ onClick: () => void handleMarkDoneMany(selected),
38862
+ isCompact,
38863
+ testId: "threads-bulk-done"
38864
+ }
38865
+ ),
38866
+ threadLabels.renderBulkLabels(selected, isCompact),
38867
+ mine && selected.some((c) => !c.is_shared) && /* @__PURE__ */ jsx(
38868
+ VisibilityToggle,
38869
+ {
38870
+ items: selected,
38871
+ onToggle: () => void handleBulkShare(selected),
38872
+ disablePrivate: true,
38873
+ showLabel: false,
38874
+ tooltipInactive: "Share all with workspace members",
38875
+ tooltipMixed: "Share all with workspace members (some already shared)",
38876
+ "data-testid": "bulk-shared-toggle"
38877
+ }
38878
+ ),
38879
+ /* @__PURE__ */ jsx(
38880
+ SelectionBarAction,
38881
+ {
38882
+ icon: FolderUp,
38883
+ label: "Export",
38884
+ onClick: () => {
38885
+ setExportRows(selected);
38886
+ setIsExportOpen(true);
38887
+ },
38888
+ isCompact,
38889
+ tooltip: `Export the selected ${getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} to another ${getEntityLabel("WORKSPACE").toLowerCase()}`,
38890
+ testId: "export-chats-button"
38891
+ }
38892
+ ),
38893
+ mode === "threads" && selected.every((row2) => row2.is_owner || isWorkspaceOwner) && /* @__PURE__ */ jsx(
38894
+ SelectionBarAction,
38895
+ {
38896
+ icon: Trash2,
38897
+ label: "Delete",
38898
+ className: "text-red-text hover:bg-red-bg hover:text-red-text",
38899
+ onClick: () => void handleDeleteMany(selected),
38900
+ isCompact,
38901
+ testId: "threads-bulk-delete"
38902
+ }
38903
+ )
38904
+ ] });
38905
+ };
38906
+ const page = /* @__PURE__ */ jsxs(
38907
+ "div",
38908
+ {
38909
+ className: "flex h-full min-h-0 flex-col",
38910
+ "data-testid": mode === "tasks" ? "tasks-page" : "threads-page",
38911
+ children: [
38912
+ /* @__PURE__ */ jsx("main", { className: "flex min-h-0 flex-1 flex-col bg-background", children: mode === "threads" ? /* @__PURE__ */ jsx(
38913
+ ConversationListView,
38914
+ {
38915
+ showHeader,
38916
+ conversations: tasks,
38917
+ doneFilter,
38918
+ visibilityFilters,
38919
+ meetingFilter,
38920
+ renderThread: (row2) => /* @__PURE__ */ jsx(
38921
+ ConversationEntity,
38922
+ {
38923
+ conversation: row2,
38924
+ showRePrefix: false,
38925
+ labelMaxWidth: "max-w-full",
38926
+ className: "w-full max-w-full [&_.truncate]:line-clamp-2 [&_.truncate]:whitespace-normal [&_.truncate]:break-words [&_.truncate]:text-left",
38927
+ "data-testid": `thread-open-${row2.external_id}`
38928
+ }
38929
+ ),
38930
+ renderLabels: threadLabels.renderLabels,
38931
+ labelText: threadLabels.labelText,
38932
+ renderBy: (row2) => /* @__PURE__ */ jsx(
38933
+ ConversationTurnSpeaker,
38934
+ {
38935
+ variant: "icon",
38936
+ role: row2.last_message_role,
38937
+ actor: row2.last_message_actor,
38938
+ currentUserId: currentUserExtId,
38939
+ colorClass: row2.last_message_actor ? getUserAvatarColor(row2.last_message_actor.external_id) : void 0
38940
+ }
38941
+ ),
38942
+ renderStatus: (row2) => /* @__PURE__ */ jsx(ConversationStatusCell, { conversation: row2 }),
38943
+ isLoading,
38944
+ filterText: topbarFilterQuery ?? "",
38945
+ formatDate: relativeTime2,
38946
+ onOpen: (c) => openConversation(c.external_id),
38947
+ onRename: openEdit,
38948
+ onDelete: handleDelete,
38949
+ canEditShared,
38950
+ isWorkspaceOwner,
38951
+ selectionActions,
38952
+ footer: /* @__PURE__ */ jsx(ConnectedThreadLauncher, { autoFocus: focusLauncher })
38953
+ }
38954
+ ) : /* @__PURE__ */ jsx(
38955
+ TaskInbox,
38956
+ {
38957
+ tasks,
38958
+ isLoading,
38959
+ ...workflowActions,
38960
+ onCreate: openCreate,
38961
+ filterText: topbarFilterQuery ?? "",
38962
+ labels: LIST_LABELS,
38963
+ gridId: "conversation-list-grid-v4",
38964
+ onFilterTextChange: (text2) => setTopbarFilterQuery(text2),
38965
+ outputsByTask,
38966
+ onOpenActivity: (task) => openConversation(task.external_id),
38967
+ formatRelative: relativeTime2,
38968
+ onOpenOutput: handleOpenOutput,
38969
+ busyId,
38970
+ formatDate: formatFriendlyDate,
38971
+ onOpenThread: (conversationId) => openConversation(conversationId),
38972
+ onMarkDone: (task) => setStatus(task, "done", `Marked \u201C${nameOf(task)}\u201D done`),
38973
+ onReopen: (task) => setStatus(task, "todo", `Reopened \u201C${nameOf(task)}\u201D`),
38974
+ people,
38975
+ agentNames,
38976
+ workflowNames,
38977
+ canEditShared,
38978
+ isWorkspaceOwner,
38979
+ renderPerson,
38980
+ onToggleShared: handleToggleShared,
38981
+ onEdit: openEdit,
38982
+ onDelete: handleDelete,
38983
+ onAddSubtask: openAddSubtask,
38984
+ onMove: handleMove,
38985
+ onMarkDoneMany: handleMarkDoneMany,
38986
+ onDeleteMany: handleDeleteMany,
38987
+ onGrantAccess: handleGrantAccess,
38988
+ selectionActions
38989
+ }
38990
+ ) }),
38991
+ /* @__PURE__ */ jsx(
38992
+ ConnectedTaskStartDialog,
38993
+ {
38994
+ open: startOpen,
38995
+ onOpenChange: setStartOpen,
38996
+ initialParentId: parentForNew
38997
+ }
38998
+ ),
38999
+ /* @__PURE__ */ jsx(ConnectedTaskComposer, { open: editorOpen, onOpenChange: setEditorOpen, task: editing }),
39000
+ /* @__PURE__ */ jsx(
39001
+ ConnectedExportDialog,
39002
+ {
39003
+ open: isExportOpen,
39004
+ onOpenChange: setIsExportOpen,
39005
+ items: exportRows.map((c) => ({ extId: c.external_id, label: nameOf(c) })),
39006
+ entityType: "CONVERSATION",
39007
+ testId: "export-chats-modal"
39008
+ }
39009
+ ),
39010
+ /* @__PURE__ */ jsx(
39011
+ RenameDialog,
39012
+ {
39013
+ open: !!renaming,
39014
+ onClose: () => {
39015
+ setRenaming(null);
39016
+ setNewTitle("");
39017
+ },
39018
+ title: `Rename ${getEntityLabel("CONVERSATION")}`,
39019
+ labels: { description: "Rename the conversation title" },
39020
+ fieldLabel: `${getEntityLabel("CONVERSATION")} Title`,
39021
+ placeholder: "Enter title",
39022
+ value: newTitle,
39023
+ onChange: setNewTitle,
39024
+ onSave: handleSaveRename,
39025
+ canSave: !!newTitle.trim(),
39026
+ dialogTestId: RENAME_DIALOG.testId
39027
+ }
39028
+ )
39029
+ ]
39030
+ }
39031
+ );
39032
+ return search ? /* @__PURE__ */ jsx(ThreadSearch, { ResultsBoundary, children: page }) : page;
39033
+ }
39034
+ function ConnectedFilterDropdown({
39035
+ stateKey,
39036
+ ...props
39037
+ }) {
39038
+ const [open, setOpen] = useTransientView(`filter.dropdown.${stateKey}`, false);
39039
+ return /* @__PURE__ */ jsx(
39040
+ TriStateFilterMenu,
39041
+ {
39042
+ ...props,
39043
+ testId: `${stateKey}-filter-button`,
39044
+ open,
39045
+ onOpenChange: setOpen
39046
+ }
39047
+ );
39048
+ }
39049
+ function SearchSparkleIcon({ className }) {
39050
+ return /* @__PURE__ */ jsxs(
39051
+ "svg",
39052
+ {
39053
+ viewBox: "0 0 24 24",
39054
+ fill: "none",
39055
+ stroke: "currentColor",
39056
+ strokeWidth: "2",
39057
+ strokeLinecap: "round",
39058
+ strokeLinejoin: "round",
39059
+ "aria-hidden": "true",
39060
+ className,
39061
+ children: [
39062
+ /* @__PURE__ */ jsx("circle", { cx: "10.5", cy: "10.5", r: "7.5" }),
39063
+ /* @__PURE__ */ jsx("path", { d: "m21 21-5.2-5.2" }),
39064
+ /* @__PURE__ */ jsx(
39065
+ "path",
39066
+ {
39067
+ d: "M10.5 6.8c.35 2.1 1.6 3.35 3.7 3.7-2.1.35-3.35 1.6-3.7 3.7-.35-2.1-1.6-3.35-3.7-3.7 2.1-.35 3.35-1.6 3.7-3.7Z",
39068
+ fill: "currentColor",
39069
+ strokeWidth: "1"
39070
+ }
39071
+ )
39072
+ ]
39073
+ }
39074
+ );
39075
+ }
39076
+ function SemanticSearchButton({ active, onClick }) {
39077
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
39078
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
39079
+ Button,
39080
+ {
39081
+ type: "button",
39082
+ variant: "ghost",
39083
+ size: "icon",
39084
+ onClick,
39085
+ "aria-label": "Semantic search",
39086
+ "aria-pressed": active,
39087
+ "data-testid": "semantic-search-button",
39088
+ className: active ? "bg-muted text-primary" : "text-muted-foreground hover:text-foreground",
39089
+ children: /* @__PURE__ */ jsx(SearchSparkleIcon, { className: "size-5" })
39090
+ }
39091
+ ) }),
39092
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Semantic search" }) })
39093
+ ] });
39094
+ }
39095
+ var DEFAULT_THREAD_VISIBILITY2 = { me: null, workspace: null };
39096
+ function ConnectedConversationPage({
39097
+ renderComposerAccessory,
39098
+ ResultsBoundary,
39099
+ onGoToDocuments,
39100
+ modelSelector,
39101
+ composerAccessory,
39102
+ composerTools,
39103
+ ConversationThread: ConversationThread2
39104
+ }) {
39105
+ const session = useArbiSessionStore();
39106
+ const { openFiles } = useBlocksEnvironment();
39107
+ useEffect(() => () => session.setActiveCitationKey(null), [session]);
39108
+ const { isInChat, setActiveTab } = useThreadTabs();
39109
+ const [doneFilter, setDoneFilter] = useTransientView(
39110
+ "threads.done",
39111
+ "exclude"
39112
+ );
39113
+ const [visibilityFilters, setVisibilityFilters] = useTransientView(
39114
+ "threads.visibility",
39115
+ DEFAULT_THREAD_VISIBILITY2
39116
+ );
39117
+ const [meetingFilter, setMeetingFilter] = useTransientView(
39118
+ "threads.meetings",
39119
+ null
39120
+ );
39121
+ const [threadFilter, setThreadFilter] = useTransientView("topbar.filter", "");
39122
+ const { data: userSettings } = useUserSettings();
39123
+ const isDeveloper = userSettings?.developer === true;
39124
+ const showPaMode = userSettings?.show_pa_mode ?? false;
39125
+ const searchEnabled = userSettings?.show_conversation_search === true;
39126
+ const [semanticSearchOpen, setSemanticSearchOpen] = useState(false);
39127
+ const handleSelectSource = (source) => {
39128
+ if (source === "internet") {
39129
+ setUrlDialogOpen(true);
39130
+ return;
39131
+ }
39132
+ openDialog("upload", { tab: "upload", source });
39133
+ };
39134
+ const handleGoToDocuments = () => {
39135
+ closeDialog("conversationDocuments");
39136
+ if (onGoToDocuments) onGoToDocuments();
39137
+ else openFiles();
39138
+ };
39139
+ const handleStatusClick = () => {
39140
+ openDialog("conversationDocuments");
39141
+ };
39142
+ const currentConversationId = useArbiSessionState((state) => state.conversationId);
39143
+ const { conversations: taskItems } = useConversationItems();
39144
+ const conversations = taskItems;
39145
+ const workspaceId = useArbiSessionState((state) => state.workspaceId);
39146
+ const { data: workspaces = [] } = useWorkspaces();
39147
+ const workspace = workspaces.find((item) => item.external_id === workspaceId);
39148
+ const workspaceRole = useWorkspaceRole();
39149
+ const isGuest = workspaceRole === "guest";
39150
+ const canUpload = workspaceRole !== null && !isGuest;
39151
+ const [urlDialogOpen, setUrlDialogOpen] = useState(false);
39152
+ const [focusLauncher, setFocusLauncher] = useState(false);
39153
+ useEffect(() => {
39154
+ if (isInChat) setFocusLauncher(false);
39155
+ }, [isInChat]);
39156
+ const uploadUrls = useAddFromUrls({
39157
+ onZipFiles: (files) => openDialog("upload", { tab: "upload", files, source: "computer" })
39158
+ });
39159
+ const uploadDisabledReason = isGuest ? "Guests cannot upload documents in this workspace" : "You cannot upload to this workspace";
39160
+ const { data: allWorkspaceDocuments = [] } = useDocuments();
39161
+ const { data: conversationDocuments } = useConversationDocuments();
39162
+ const pinnedDocumentId = useArbiSessionState((state) => state.pinnedDocumentId);
39163
+ const pinnedRef = parseVersionRef(pinnedDocumentId);
39164
+ const pinnedDocument = conversationDocuments?.find((d) => d.external_id === pinnedRef.docId) ?? allWorkspaceDocuments?.find((d) => d.external_id === pinnedRef.docId);
39165
+ const pinnedTitle = pinnedDocument ? `${getDocumentTitle(pinnedDocument)}${pinnedRef.version ? ` (version ${pinnedRef.version})` : ""}` : null;
39166
+ const startNewChat = (asPaChat) => {
39167
+ session.clearConversationError(currentConversationId || "new");
39168
+ session.startNewConversation();
39169
+ session.openThreadTab(null);
39170
+ session.setPaMode(true);
39171
+ };
39172
+ const threadFilterDropdown = /* @__PURE__ */ jsx(
39173
+ ConnectedFilterDropdown,
39174
+ {
39175
+ stateKey: "threads",
39176
+ filterStates: /* @__PURE__ */ new Map([
39177
+ ["done", doneFilter],
39178
+ ["me", visibilityFilters.me],
39179
+ ["workspace", visibilityFilters.workspace],
39180
+ ["meeting", meetingFilter]
39181
+ ]),
39182
+ onFiltersChange: (filters) => {
39183
+ setDoneFilter(filters.get("done") ?? null);
39184
+ setMeetingFilter(filters.get("meeting") ?? null);
39185
+ setVisibilityFilters({
39186
+ me: filters.get("me") ?? null,
39187
+ workspace: filters.get("workspace") ?? null
39188
+ });
39189
+ },
39190
+ options: [
39191
+ {
39192
+ id: "me",
39193
+ label: "Only Me",
39194
+ count: conversations.filter((thread) => !thread.is_shared).length
39195
+ },
39196
+ {
39197
+ id: "workspace",
39198
+ label: "Workspace",
39199
+ count: conversations.filter((thread) => thread.is_shared).length
39200
+ },
39201
+ {
39202
+ id: "meeting",
39203
+ label: "Meetings",
39204
+ count: conversations.filter((thread) => !!thread.meeting_call_ext_id).length
39205
+ },
39206
+ {
39207
+ id: "done",
39208
+ label: "Done",
39209
+ count: conversations.filter((thread) => thread.status === "done").length
39210
+ }
39211
+ ],
39212
+ hasExternalActiveState: Boolean(threadFilter.trim()),
39213
+ renderChevron: true,
39214
+ disableHoverOpen: true,
39215
+ align: "start"
39216
+ }
39217
+ );
39218
+ const threadFilterBox = /* @__PURE__ */ jsx(
39219
+ FilterInput,
39220
+ {
39221
+ filter: threadFilterDropdown,
39222
+ borderless: true,
39223
+ value: threadFilter,
39224
+ onChange: setThreadFilter,
39225
+ fields: ["text"],
39226
+ onFieldsChange: () => {
39227
+ },
39228
+ hideFieldPicker: true,
39229
+ ariaLabel: "Filter threads",
39230
+ labels: doneFilter === "exclude" ? { placeholder: "Done hidden" } : void 0,
39231
+ className: "w-44 max-w-[40vw]"
39232
+ }
39233
+ );
39234
+ const { data: workspaceTags = [] } = useTags();
39235
+ const historyCount = filterConversationRows(
39236
+ conversations,
39237
+ threadFilter,
39238
+ (row2) => workspaceTags.filter((tag) => row2.label_ext_ids?.includes(tag.external_id)).map((tag) => tag.name).join(" "),
39239
+ doneFilter,
39240
+ visibilityFilters,
39241
+ meetingFilter
39242
+ ).length;
39243
+ const historyFiltered = Boolean(threadFilter.trim()) || doneFilter !== null || meetingFilter !== null || Object.values(visibilityFilters).some(Boolean);
39244
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
39245
+ /* @__PURE__ */ jsxs(ConversationRoot, { children: [
39246
+ /* @__PURE__ */ jsxs(ConversationHeader, { children: [
39247
+ /* @__PURE__ */ jsx(
39248
+ ConnectedThreadTabs,
39249
+ {
39250
+ historyCount,
39251
+ historyFiltered,
39252
+ historyActions: threadFilterBox,
39253
+ rightContent: (isCompact) => /* @__PURE__ */ jsxs(ConversationHeaderActions, { children: [
39254
+ searchEnabled && /* @__PURE__ */ jsx(
39255
+ SemanticSearchButton,
39256
+ {
39257
+ active: semanticSearchOpen && !isInChat,
39258
+ onClick: () => {
39259
+ if (isInChat) {
39260
+ setActiveTab("history");
39261
+ setSemanticSearchOpen(true);
39262
+ } else {
39263
+ setSemanticSearchOpen((open) => !open);
39264
+ }
39265
+ }
39266
+ }
39267
+ ),
39268
+ isInChat && /* @__PURE__ */ jsx(ConnectedConversationCallActions, {}),
39269
+ isInChat && /* @__PURE__ */ jsx(
39270
+ NewChatButton,
39271
+ {
39272
+ entityLabel: "Task",
39273
+ labels: { newEntity: () => "New Task" },
39274
+ isCompact,
39275
+ onClick: () => {
39276
+ setFocusLauncher(true);
39277
+ setActiveTab("history");
39278
+ }
39279
+ }
39280
+ ),
39281
+ showPaMode && /* @__PURE__ */ jsx(NewPaChatButton, { isCompact, onClick: () => startNewChat() })
39282
+ ] })
39283
+ }
39284
+ ),
39285
+ isInChat && /* @__PURE__ */ jsx(ConnectedThreadTaskBar, { conversationId: currentConversationId })
39286
+ ] }),
39287
+ isInChat && /* @__PURE__ */ jsx(
39288
+ ConversationThread2,
39289
+ {
39290
+ modelSelector,
39291
+ composerAccessory: renderComposerAccessory ? renderComposerAccessory({
39292
+ documents: conversationDocuments || [],
39293
+ pinnedTitle,
39294
+ onStatusClick: handleStatusClick,
39295
+ onSelectSource: handleSelectSource,
39296
+ onAddFromSources: handleGoToDocuments,
39297
+ canUpload,
39298
+ uploadDisabledReason
39299
+ }) : composerAccessory,
39300
+ composerTools: composerTools !== void 0 ? composerTools : isDeveloper && /* @__PURE__ */ jsx(
39301
+ ConversationSettingsButton,
39302
+ {
39303
+ label: `${getEntityLabel("CONVERSATION")} Settings`,
39304
+ onClick: () => openDialog("conversationSettings")
39305
+ }
39306
+ )
39307
+ }
39308
+ ),
39309
+ !isInChat && /* @__PURE__ */ jsx(ConversationHistoryPane, { children: searchEnabled && semanticSearchOpen ? /* @__PURE__ */ jsx(ConnectedThreadsPage, { showHeader: false, search: true, ResultsBoundary }) : /* @__PURE__ */ jsx(ConnectedThreadsPage, { showHeader: false, focusLauncher }) })
39310
+ ] }),
39311
+ /* @__PURE__ */ jsx(
39312
+ UrlInputDialog,
39313
+ {
39314
+ open: urlDialogOpen,
39315
+ onOpenChange: setUrlDialogOpen,
39316
+ onUrlsSubmit: uploadUrls,
39317
+ titleWorkspaceName: workspace?.name,
39318
+ titleIcon: workspace && /* @__PURE__ */ jsx(ConnectedWorkspaceEntity, { workspace, size: 24, variant: "icon" })
39319
+ }
39320
+ )
39321
+ ] });
39322
+ }
37702
39323
  function useStartRequestedDraft(enabled = true) {
37703
39324
  const session = useArbiSessionStore();
37704
39325
  useIntentRequest(
@@ -38289,7 +39910,7 @@ function useThreadScroll({
38289
39910
  scrollToBottom
38290
39911
  };
38291
39912
  }
38292
- function ConnectedConversation({
39913
+ function ConversationThread({
38293
39914
  modelSelector,
38294
39915
  composerAccessory,
38295
39916
  composerTools
@@ -38745,6 +40366,33 @@ function ConnectedConversation({
38745
40366
  slashWorkflows.launcher
38746
40367
  ] });
38747
40368
  }
40369
+ function ConnectedConversation({
40370
+ layout = "thread",
40371
+ page,
40372
+ conversationId,
40373
+ ...props
40374
+ }) {
40375
+ const session = useArbiSessionStore();
40376
+ useEffect(() => {
40377
+ if (conversationId === void 0) return;
40378
+ if (layout === "page") {
40379
+ const tabId = conversationId ?? "new";
40380
+ if (session.getState().activeThreadTabId !== tabId) session.openThreadTab(conversationId);
40381
+ } else if (session.getState().conversationId !== conversationId) {
40382
+ session.setConversationId(conversationId);
40383
+ }
40384
+ }, [conversationId, layout, session]);
40385
+ return layout === "page" ? /* @__PURE__ */ jsx(
40386
+ ConnectedConversationPage,
40387
+ {
40388
+ ...page,
40389
+ modelSelector: props.modelSelector,
40390
+ composerAccessory: props.composerAccessory,
40391
+ composerTools: props.composerTools,
40392
+ ConversationThread
40393
+ }
40394
+ ) : /* @__PURE__ */ jsx(ConversationThread, { ...props });
40395
+ }
38748
40396
  function ConnectedCompactConversation() {
38749
40397
  const containerRef = useRef(null);
38750
40398
  const inputRef = useRef(null);
@@ -41507,474 +43155,6 @@ function ConnectedAccountAccessBadge() {
41507
43155
  /* @__PURE__ */ jsx(PopoverContent, { className: "max-w-xs text-sm", align: "end", children: explanation })
41508
43156
  ] });
41509
43157
  }
41510
- function ThreadSearch({ children, ResultsBoundary = ErrorBoundary }) {
41511
- const [query, setQuery] = useState("");
41512
- const [submitted, setSubmitted] = useState("");
41513
- const selectedWorkspaceId = useArbiSessionState((s) => s.workspaceId);
41514
- const { notify: notify18, openConversation } = useBlocksEnvironment();
41515
- const search = useConversationSearch();
41516
- const isSearching = search.isPending;
41517
- const groups = useMemo(
41518
- () => search.isError ? [] : (search.data?.results ?? []).map((g) => ({
41519
- id: g.conversation_ext_id,
41520
- title: g.title,
41521
- matches: g.messages.map((m) => ({
41522
- id: m.message_ext_id,
41523
- role: m.role,
41524
- score: m.score,
41525
- snippet: m.snippet
41526
- }))
41527
- })),
41528
- [search.data, search.isError]
41529
- );
41530
- const handleSearch = useCallback(() => {
41531
- const q = query.trim();
41532
- if (!q || !selectedWorkspaceId || isSearching) return;
41533
- setSubmitted(q);
41534
- search.mutate(
41535
- { query: q, search_mode: "hybrid", limit: 20 },
41536
- {
41537
- onError: (err) => {
41538
- console.error("Conversation search failed", err);
41539
- notify18("Conversation search failed", "error");
41540
- }
41541
- }
41542
- );
41543
- }, [query, selectedWorkspaceId, isSearching, search, notify18]);
41544
- const clearSearch = useCallback(() => {
41545
- setQuery("");
41546
- setSubmitted("");
41547
- }, []);
41548
- const openHit = useCallback(
41549
- (conversationId, messageId) => {
41550
- openConversation(conversationId, messageId ? { messageId } : void 0);
41551
- },
41552
- [openConversation]
41553
- );
41554
- return /* @__PURE__ */ jsx(
41555
- ConversationSearchView,
41556
- {
41557
- query,
41558
- onQueryChange: setQuery,
41559
- onSubmit: handleSearch,
41560
- canSubmit: !!query.trim() && !!selectedWorkspaceId && !isSearching,
41561
- isSearching,
41562
- submittedQuery: submitted,
41563
- groups,
41564
- onOpenConversation: openHit,
41565
- onClear: clearSearch,
41566
- ResultsBoundary,
41567
- children
41568
- }
41569
- );
41570
- }
41571
- var DEFAULT_THREAD_VISIBILITY = { me: null, workspace: null };
41572
- var relativeTime2 = (iso) => formatRelativeTime(iso, { style: "short" });
41573
- var LIST_LABELS = {
41574
- emptyTitle: "Nothing here yet",
41575
- emptyMessage: "Use New: just type what you need, or fill in an owner and a due date. You always decide when a thread is done.",
41576
- untitled: `Untitled ${getEntityLabel("CONVERSATION").toLowerCase()}`,
41577
- noMatches: `No ${getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} match.`,
41578
- selectAll: "Select all"
41579
- };
41580
- var RENAME_DIALOG = { testId: "rename-conversation-modal" };
41581
- function useStableRecencyOrder(rows) {
41582
- const orderRef = useRef([]);
41583
- return useMemo(() => {
41584
- const byRecency = [...rows].sort(
41585
- (a, b) => new Date(b.updated_at || b.created_at || 0).getTime() - new Date(a.updated_at || a.created_at || 0).getTime()
41586
- );
41587
- const present = new Set(byRecency.map((r) => r.external_id));
41588
- const known = new Set(orderRef.current);
41589
- const added = byRecency.map((r) => r.external_id).filter((id) => !known.has(id));
41590
- orderRef.current = [...added, ...orderRef.current.filter((id) => present.has(id))];
41591
- const byId = new Map(byRecency.map((r) => [r.external_id, r]));
41592
- return orderRef.current.flatMap((id) => byId.get(id) ?? []);
41593
- }, [rows]);
41594
- }
41595
- function ConnectedThreadsPage({
41596
- showHeader = true,
41597
- search = false,
41598
- ResultsBoundary,
41599
- focusLauncher,
41600
- layout = "list",
41601
- workflowActions
41602
- }) {
41603
- const mode = layout === "inbox" ? "tasks" : "threads";
41604
- const { confirm, notify: notify18, openConversation, openDocument } = useBlocksEnvironment();
41605
- const { conversations: all, isLoading } = useConversationItems();
41606
- const [doneFilter] = useTransientView("threads.done", "exclude");
41607
- const [visibilityFilters] = useTransientView("threads.visibility", DEFAULT_THREAD_VISIBILITY);
41608
- const [meetingFilter] = useTransientView("threads.meetings", null);
41609
- const [topbarFilterQuery, setTopbarFilterQuery] = useTransientView("topbar.filter", "");
41610
- const currentUserExtId = useArbiSession().user?.external_id;
41611
- const listed = useMemo(
41612
- () => all.filter((c) => mode === "threads" || c.status != null),
41613
- [all, mode]
41614
- );
41615
- const tasks = useStableRecencyOrder(listed);
41616
- const updateConversation = useUpdateConversation();
41617
- const deleteConversation = useDeleteConversation();
41618
- const people = useTaskPeople();
41619
- const renderPerson = useRenderTaskPerson();
41620
- const canEditShared = useCanEditShared();
41621
- const isWorkspaceOwner = useIsWorkspaceOwner();
41622
- const { data: agents = [] } = useAgents();
41623
- const { data: workflows = [] } = useWorkflows();
41624
- const agentNames = useMemo(
41625
- () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
41626
- [agents]
41627
- );
41628
- const workflowNames = useMemo(
41629
- () => Object.fromEntries(workflows.map((w) => [w.external_id, w.name])),
41630
- [workflows]
41631
- );
41632
- const runConversation = useRunConversation();
41633
- const [busyId, setBusyId] = useState(null);
41634
- const [editorOpen, setEditorOpen] = useState(false);
41635
- const [editing, setEditing] = useState(null);
41636
- const [startOpen, setStartOpen] = useState(false);
41637
- const [parentForNew, setParentForNew] = useState(void 0);
41638
- const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && workflowNames[task.workflow_ext_id] || "Untitled task";
41639
- const openCreate = () => {
41640
- setParentForNew(void 0);
41641
- setStartOpen(true);
41642
- };
41643
- const openAddSubtask = (parent) => {
41644
- setParentForNew(parent.external_id);
41645
- setStartOpen(true);
41646
- };
41647
- const [renaming, setRenaming] = useState(null);
41648
- const [newTitle, setNewTitle] = useState("");
41649
- const [isExportOpen, setIsExportOpen] = useState(false);
41650
- const [exportRows, setExportRows] = useState([]);
41651
- const openEdit = (task) => {
41652
- if (mode === "threads" || !task.status) {
41653
- setRenaming(task);
41654
- setNewTitle(task.title ?? "");
41655
- return;
41656
- }
41657
- setEditing(task);
41658
- setEditorOpen(true);
41659
- };
41660
- const act = async (task, action, success, failure) => {
41661
- setBusyId(task.external_id);
41662
- try {
41663
- await action();
41664
- if (success) notify18(success, "success");
41665
- } catch (error) {
41666
- notify18(
41667
- error instanceof ArbiApiError && error.detail ? `${failure}: ${error.detail}` : failure,
41668
- "error"
41669
- );
41670
- } finally {
41671
- setBusyId(null);
41672
- }
41673
- };
41674
- const patch = (task, body) => updateConversation.mutateAsync({ conversationId: task.external_id, patch: body });
41675
- const setStatus = (task, status, success) => act(task, () => patch(task, { status }), success, "Failed to update task");
41676
- const handleToggleShared = (task, shouldShare) => act(
41677
- task,
41678
- () => patch(task, { shared: shouldShare }),
41679
- shouldShare ? `Shared \u201C${nameOf(task)}\u201D with the workspace` : `Made \u201C${nameOf(task)}\u201D private`,
41680
- "Failed to change who can see the task"
41681
- );
41682
- const handleMove = (task, parentId) => act(
41683
- task,
41684
- () => patch(task, { parent_conversation_ext_id: parentId }),
41685
- parentId ? `Moved \u201C${nameOf(task)}\u201D` : `Moved \u201C${nameOf(task)}\u201D to the top level`,
41686
- "Failed to move task"
41687
- );
41688
- const handleDelete = async (task) => {
41689
- const subtasks = tasks.filter((t) => t.parent_conversation_ext_id === task.external_id).length;
41690
- const confirmed = await confirm({
41691
- message: `Delete \u201C${nameOf(task)}\u201D? This can't be undone from here.${subtasks ? ` Its ${subtasks === 1 ? "sub-task stays" : `${subtasks} sub-tasks stay`} and ${subtasks === 1 ? "moves" : "move"} to the top level.` : ""}`,
41692
- title: "Delete task"
41693
- });
41694
- if (!confirmed) return;
41695
- await act(
41696
- task,
41697
- () => deleteConversation.mutateAsync(task.external_id),
41698
- `Deleted \u201C${nameOf(task)}\u201D`,
41699
- "Failed to delete task"
41700
- );
41701
- };
41702
- const forEach = async (rows, one, done) => {
41703
- let failed = 0;
41704
- for (const task of rows) {
41705
- try {
41706
- await one(task);
41707
- } catch {
41708
- failed += 1;
41709
- }
41710
- }
41711
- notify18(
41712
- failed ? `${failed} of ${rows.length} could not be changed: you may not be allowed to change them` : done,
41713
- failed ? "error" : "success"
41714
- );
41715
- };
41716
- const handleMarkDoneMany = (rows) => forEach(rows, (task) => patch(task, { status: "done" }), `Marked ${rows.length} done`);
41717
- const handleDeleteMany = async (rows) => {
41718
- const named = rows.slice(0, 3).map((task) => `"${nameOf(task)}"`).join(", ");
41719
- const more = rows.length - 3;
41720
- const confirmed = await confirm({
41721
- message: `Delete ${more > 0 ? `${named} and ${more} more` : named}? This cannot be undone.`,
41722
- title: `Delete ${rows.length} item${rows.length === 1 ? "" : "s"}`
41723
- });
41724
- if (!confirmed) return;
41725
- await forEach(
41726
- rows,
41727
- (task) => deleteConversation.mutateAsync(task.external_id),
41728
- `Deleted ${rows.length}`
41729
- );
41730
- };
41731
- const handleSaveRename = useCallback(() => {
41732
- if (!renaming || !newTitle.trim()) return;
41733
- updateConversation.mutate(
41734
- { conversationId: renaming.external_id, patch: { title: newTitle.trim() } },
41735
- {
41736
- onSuccess: () => {
41737
- notify18("Conversation renamed successfully", "success");
41738
- setRenaming(null);
41739
- setNewTitle("");
41740
- },
41741
- onError: (error) => {
41742
- console.error("Failed to rename conversation:", error);
41743
- notify18("Failed to rename conversation", "error");
41744
- }
41745
- }
41746
- );
41747
- }, [renaming, newTitle, updateConversation, notify18]);
41748
- const handleBulkShare = async (rows) => {
41749
- const unshared = rows.filter((c) => !c.is_shared);
41750
- if (unshared.length === 0) {
41751
- await confirm({
41752
- message: "All selected conversations are already shared",
41753
- title: "Info",
41754
- kind: "alert"
41755
- });
41756
- return;
41757
- }
41758
- const noun = getEntityLabel("CONVERSATION", unshared.length > 1 ? "PLURAL" : "SINGULAR");
41759
- const confirmed = await confirm({
41760
- message: `Are you sure you want to share ${unshared.length} ${noun.toLowerCase()} with everyone in the current ${getEntityLabel("WORKSPACE").toLowerCase()}? You can make them private again later.`,
41761
- title: `Share ${getEntityLabel("CONVERSATION", "PLURAL")}`
41762
- });
41763
- if (!confirmed) return;
41764
- try {
41765
- await Promise.all(
41766
- unshared.map(
41767
- (c) => updateConversation.mutateAsync({ conversationId: c.external_id, patch: { shared: true } })
41768
- )
41769
- );
41770
- notify18(`${unshared.length} ${noun.toLowerCase()} shared successfully`, "success");
41771
- } catch (error) {
41772
- console.error("Failed to share conversations:", error);
41773
- notify18("Failed to share some conversations", "error");
41774
- }
41775
- };
41776
- const { data: workspaceDocs } = useDocuments();
41777
- const outputsByTask = useMemo(() => {
41778
- const out = {};
41779
- for (const [conversationId, docs] of Object.entries(
41780
- groupOutputsByConversation(workspaceDocs ?? [])
41781
- )) {
41782
- out[conversationId] = docs.map((d) => ({
41783
- id: d.external_id,
41784
- name: getDocumentTitle(d, d.external_id)
41785
- }));
41786
- }
41787
- return out;
41788
- }, [workspaceDocs]);
41789
- const handleOpenOutput = (documentId) => openDocument(documentId);
41790
- const handleGrantAccess = (task) => act(
41791
- task,
41792
- () => runConversation.mutateAsync(task.external_id),
41793
- `Running \u201C${nameOf(task)}\u201D`,
41794
- "Failed to run task"
41795
- );
41796
- const threadLabels = useThreadLabels(canEditShared);
41797
- const selectionActions = (selected, isCompact) => {
41798
- const mine = selected.every((c) => c.created_by_ext_id === currentUserExtId);
41799
- return /* @__PURE__ */ jsxs(Fragment, { children: [
41800
- mode === "threads" && selected.every((row2) => row2.is_owner || row2.is_shared && canEditShared) && selected.some((row2) => row2.status !== "done") && !selected.some((row2) => row2.in_progress || row2.status === "generating") && /* @__PURE__ */ jsx(
41801
- SelectionBarAction,
41802
- {
41803
- icon: CheckCheck,
41804
- label: "Mark Done",
41805
- onClick: () => void handleMarkDoneMany(selected),
41806
- isCompact,
41807
- testId: "threads-bulk-done"
41808
- }
41809
- ),
41810
- threadLabels.renderBulkLabels(selected, isCompact),
41811
- mine && selected.some((c) => !c.is_shared) && /* @__PURE__ */ jsx(
41812
- VisibilityToggle,
41813
- {
41814
- items: selected,
41815
- onToggle: () => void handleBulkShare(selected),
41816
- disablePrivate: true,
41817
- showLabel: false,
41818
- tooltipInactive: "Share all with workspace members",
41819
- tooltipMixed: "Share all with workspace members (some already shared)",
41820
- "data-testid": "bulk-shared-toggle"
41821
- }
41822
- ),
41823
- /* @__PURE__ */ jsx(
41824
- SelectionBarAction,
41825
- {
41826
- icon: FolderUp,
41827
- label: "Export",
41828
- onClick: () => {
41829
- setExportRows(selected);
41830
- setIsExportOpen(true);
41831
- },
41832
- isCompact,
41833
- tooltip: `Export the selected ${getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} to another ${getEntityLabel("WORKSPACE").toLowerCase()}`,
41834
- testId: "export-chats-button"
41835
- }
41836
- ),
41837
- mode === "threads" && selected.every((row2) => row2.is_owner || isWorkspaceOwner) && /* @__PURE__ */ jsx(
41838
- SelectionBarAction,
41839
- {
41840
- icon: Trash2,
41841
- label: "Delete",
41842
- className: "text-red-text hover:bg-red-bg hover:text-red-text",
41843
- onClick: () => void handleDeleteMany(selected),
41844
- isCompact,
41845
- testId: "threads-bulk-delete"
41846
- }
41847
- )
41848
- ] });
41849
- };
41850
- const page = /* @__PURE__ */ jsxs(
41851
- "div",
41852
- {
41853
- className: "flex h-full min-h-0 flex-col",
41854
- "data-testid": mode === "tasks" ? "tasks-page" : "threads-page",
41855
- children: [
41856
- /* @__PURE__ */ jsx("main", { className: "flex min-h-0 flex-1 flex-col bg-background", children: mode === "threads" ? /* @__PURE__ */ jsx(
41857
- ConversationListView,
41858
- {
41859
- showHeader,
41860
- conversations: tasks,
41861
- doneFilter,
41862
- visibilityFilters,
41863
- meetingFilter,
41864
- renderThread: (row2) => /* @__PURE__ */ jsx(
41865
- ConversationEntity,
41866
- {
41867
- conversation: row2,
41868
- showRePrefix: false,
41869
- labelMaxWidth: "max-w-full",
41870
- className: "w-full max-w-full [&_.truncate]:line-clamp-2 [&_.truncate]:whitespace-normal [&_.truncate]:break-words [&_.truncate]:text-left",
41871
- "data-testid": `thread-open-${row2.external_id}`
41872
- }
41873
- ),
41874
- renderLabels: threadLabels.renderLabels,
41875
- labelText: threadLabels.labelText,
41876
- renderBy: (row2) => /* @__PURE__ */ jsx(
41877
- ConversationTurnSpeaker,
41878
- {
41879
- variant: "icon",
41880
- role: row2.last_message_role,
41881
- actor: row2.last_message_actor,
41882
- currentUserId: currentUserExtId,
41883
- colorClass: row2.last_message_actor ? getUserAvatarColor(row2.last_message_actor.external_id) : void 0
41884
- }
41885
- ),
41886
- renderStatus: (row2) => /* @__PURE__ */ jsx(ConversationStatusCell, { conversation: row2 }),
41887
- isLoading,
41888
- filterText: topbarFilterQuery ?? "",
41889
- formatDate: relativeTime2,
41890
- onOpen: (c) => openConversation(c.external_id),
41891
- onRename: openEdit,
41892
- onDelete: handleDelete,
41893
- canEditShared,
41894
- isWorkspaceOwner,
41895
- selectionActions,
41896
- footer: /* @__PURE__ */ jsx(ConnectedThreadLauncher, { autoFocus: focusLauncher })
41897
- }
41898
- ) : /* @__PURE__ */ jsx(
41899
- TaskInbox,
41900
- {
41901
- tasks,
41902
- isLoading,
41903
- ...workflowActions,
41904
- onCreate: openCreate,
41905
- filterText: topbarFilterQuery ?? "",
41906
- labels: LIST_LABELS,
41907
- gridId: "conversation-list-grid-v4",
41908
- onFilterTextChange: (text2) => setTopbarFilterQuery(text2),
41909
- outputsByTask,
41910
- onOpenActivity: (task) => openConversation(task.external_id),
41911
- formatRelative: relativeTime2,
41912
- onOpenOutput: handleOpenOutput,
41913
- busyId,
41914
- formatDate: formatFriendlyDate,
41915
- onOpenThread: (conversationId) => openConversation(conversationId),
41916
- onMarkDone: (task) => setStatus(task, "done", `Marked \u201C${nameOf(task)}\u201D done`),
41917
- onReopen: (task) => setStatus(task, "todo", `Reopened \u201C${nameOf(task)}\u201D`),
41918
- people,
41919
- agentNames,
41920
- workflowNames,
41921
- canEditShared,
41922
- isWorkspaceOwner,
41923
- renderPerson,
41924
- onToggleShared: handleToggleShared,
41925
- onEdit: openEdit,
41926
- onDelete: handleDelete,
41927
- onAddSubtask: openAddSubtask,
41928
- onMove: handleMove,
41929
- onMarkDoneMany: handleMarkDoneMany,
41930
- onDeleteMany: handleDeleteMany,
41931
- onGrantAccess: handleGrantAccess,
41932
- selectionActions
41933
- }
41934
- ) }),
41935
- /* @__PURE__ */ jsx(
41936
- ConnectedTaskStartDialog,
41937
- {
41938
- open: startOpen,
41939
- onOpenChange: setStartOpen,
41940
- initialParentId: parentForNew
41941
- }
41942
- ),
41943
- /* @__PURE__ */ jsx(ConnectedTaskComposer, { open: editorOpen, onOpenChange: setEditorOpen, task: editing }),
41944
- /* @__PURE__ */ jsx(
41945
- ConnectedExportDialog,
41946
- {
41947
- open: isExportOpen,
41948
- onOpenChange: setIsExportOpen,
41949
- items: exportRows.map((c) => ({ extId: c.external_id, label: nameOf(c) })),
41950
- entityType: "CONVERSATION",
41951
- testId: "export-chats-modal"
41952
- }
41953
- ),
41954
- /* @__PURE__ */ jsx(
41955
- RenameDialog,
41956
- {
41957
- open: !!renaming,
41958
- onClose: () => {
41959
- setRenaming(null);
41960
- setNewTitle("");
41961
- },
41962
- title: `Rename ${getEntityLabel("CONVERSATION")}`,
41963
- labels: { description: "Rename the conversation title" },
41964
- fieldLabel: `${getEntityLabel("CONVERSATION")} Title`,
41965
- placeholder: "Enter title",
41966
- value: newTitle,
41967
- onChange: setNewTitle,
41968
- onSave: handleSaveRename,
41969
- canSave: !!newTitle.trim(),
41970
- dialogTestId: RENAME_DIALOG.testId
41971
- }
41972
- )
41973
- ]
41974
- }
41975
- );
41976
- return search ? /* @__PURE__ */ jsx(ThreadSearch, { ResultsBoundary, children: page }) : page;
41977
- }
41978
43158
  function useSessionPanelMode(panelId, defaultMode = "docked", isOpen = true) {
41979
43159
  const panelModes = useArbiSessionState((s) => s.shell.panels.modes);
41980
43160
  const setPanelModeStore = useArbiSessionStore().setPanelMode;
@@ -42190,6 +43370,6 @@ function useContextualHints() {
42190
43370
  };
42191
43371
  }
42192
43372
 
42193
- export { AddAddonDialog, AddFromAccountsButton, AgentBarShell, AgentControlBar, AgentSteps, AnswerTable, AskAgainContext, BACKFILL_OPTIONS, BUILTIN_GLOBAL_DIALOGS, BULK_REPROCESS_LIMIT, BillingProjectEntity, CaptureBar, ChangePlanDialog, ChatAttachmentList, ConnectedAccountAccessBadge, ConnectedAccountCluster, ConnectedAccountSettings, ConnectedAddContacts, ConnectedAgentChat, ConnectedAgentChatPanel, ConnectedAgentConfigForm, ConnectedAgentCreator, ConnectedAiReview, ConnectedAppRuntime, ConnectedAppShell, ConnectedAppsSettings, ConnectedAuthorizeAgent, ConnectedBranchControls, ConnectedBulkTagEditor, ConnectedCalendar, ConnectedChatThread, ConnectedCitationRenderer, ConnectedCompactConversation, ConnectedConfigForm, ConnectedContactCardForm, ConnectedContactToggle, ConnectedContactsDirectory, ConnectedConversation, ConnectedConversationDocumentPicker, ConnectedConversationEmpty, ConnectedConversationStart, ConnectedDangerZone, ConnectedDatabasesPage, ConnectedDeploymentStorage, ConnectedDeveloperConfig, ConnectedDriveSyncDialog, ConnectedExportDialog, ConnectedExportPanel, ConnectedFactsPage, ConnectedFieldsEditor, ConnectedFieldsManager, ConnectedFilesBulkActions, ConnectedFilesExplorer, ConnectedFilesPage, ConnectedForgotPassword, ConnectedGlobalDialogs, ConnectedGrantWorkspaceAccessDialog, ConnectedGridView, ConnectedGroupMembers, ConnectedIdentityVerification, ConnectedLoginPage, ConnectedLogoutDialog, ConnectedMailAccounts, ConnectedMailComposer, ConnectedMailInviteCard, ConnectedMailMessage, ConnectedMailSettings, ConnectedMailSetup, ConnectedMailbox, ConnectedMailboxSyncDialog, ConnectedMessage, ConnectedMessageArea, ConnectedMessageList, ConnectedMessenger, ConnectedModelSelector, ConnectedMoveToFolder, ConnectedNewThreadDialog, ConnectedNotificationCenter, ConnectedNotificationPreferences, ConnectedOAuthConsentPage, ConnectedPanelHost, ConnectedPasswordChangeDialog, ConnectedPendingSyncDialog, ConnectedPeopleMultiSelect, ConnectedPremiumModels, ConnectedPrivacySettings, ConnectedProfileCard, ConnectedProjectEntity, ConnectedProjectPage, ConnectedProjectSelector, ConnectedProjectStorage, ConnectedProjectsPanel, ConnectedPublicBooking, ConnectedQuotaDialog, ConnectedRecentlyDeletedButton, ConnectedRecoveryKeyDialog, ConnectedReportProblem, ConnectedRequestWorkspaceAccess, ConnectedRequireVerified, ConnectedSearchPage, ConnectedSecuritySection, ConnectedSessionsRow, ConnectedSettingsPage, ConnectedShareDialog, ConnectedSharePointAdminConsentPage, ConnectedSharedFilesPage, ConnectedSignatureVerifyPage, ConnectedSkillUpload, ConnectedSkillsLibrary, ConnectedSsoCallback, ConnectedStorageProjectCard, ConnectedStorageSettings, ConnectedTagEditorDialog, ConnectedTagEntity, ConnectedTagForm, ConnectedTagTable, ConnectedTagsPage, ConnectedTaskAccessRequest, ConnectedTaskActivityDialog, ConnectedTaskComposer, ConnectedTaskStartDialog, ConnectedThreadFollow, ConnectedThreadLauncher, ConnectedThreadTabs, ConnectedThreadTaskBar, ConnectedThreadsPage, ConnectedThreadsPreview, ConnectedTransferWatcher, ConnectedUpcomingEvents, ConnectedUpload, ConnectedUploadDropzone, ConnectedUserEntity, ConnectedWelcomeDialog, ConnectedWorkflowHistory, ConnectedWorkflowRunner, ConnectedWorkflowStart, ConnectedWorkspaceActivity, ConnectedWorkspaceDashboard, ConnectedWorkspaceEntity, ConnectedWorkspaceFormModal, ConnectedWorkspaceList, ConnectedWorkspaceMembers, ConnectedWorkspaceNotificationMenu, ConnectedWorkspaceSettings, ConnectedWorkspaceTrash, ConversationAlert, ConversationComposer2 as ConversationComposer, ConversationEntity, ConversationSendButton, ConversationStatusCell, DEFAULT_CONNECTED_SEARCH_PAGE_LABELS, DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS, DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS, DEFAULT_OAUTH_PERMISSIONS, DEFAULT_PROJECTS_LIST_LABELS, DEFAULT_PROJECT_DETAILS_LABELS, DEFAULT_PROJECT_DETAIL_FIELDS, DEFAULT_PROJECT_LIST_COLUMNS, DEFAULT_PROJECT_PAGE_LABELS, DEFAULT_SEARCH_FIELDS, DEFAULT_SEARCH_ROW_LABELS, DEFAULT_SETTINGS_SECTIONS, DEFAULT_TIMELINE_LABEL_WIDTH, DEFAULT_WORKSPACE_LIST_LABELS, DeveloperFooter, DocumentFolderCell, DocumentLabelsCell, DocumentNameCell, DocumentSharedCell, DocumentStatusGlyph, DocumentSyncGlyph, DocumentUser, DocumentsFilterBarActions, DocumentsUploadButton, EmptyWorkspaceUpload, FACTS_GRID_ID, FILES_PREFS_KEY, FileTooltipContent, ImportVcfButton, ImportVcfSummary, InvoicesModal, LOOK_AGAIN_LABEL, MessageDetailsModal, MessageLiveSeconds, MicButton, NewProjectFlow, NotificationCenter, NotificationEvent, PENDING_LOOKUP_MS, PENDING_RECOVERY_KEY, PENDING_TASK_MESSAGE, PREMIUM_TIER_TAG, PROJECTS_BASE_TAB_ID, PROMPT_BINDINGS, PersistedGridView, ProgressiveLoadingChip, ProjectDetail, ProjectUsageContent, ProjectsTable, REFERRAL_OFFER, RecoveryKeyDownload, RelatedDocumentsCell, ReportProblemDialog, RunStatsBadges, RunningSubagents, SEARCH_FIELD_OPTIONS, SETTINGS_SECTION_IDS, STANDARD_TIER_TAG, SessionStatusIcon, SharedProjects, SourceChips, SsoResendVerificationButton, StatusCell2 as StatusCell, StorageBreakdown, StorageItemsTable, StorageTiers, StreamedArtifact, TILE_DEFAULT, TILE_MAX, TILE_MIN, ThreadSwitcher, UserAvatar, ViewSelector, WORKSPACES_TAB_ID, WorkflowLaunchHost, WorkflowRunStatusCell, WorkflowRunThread, WorkflowStepMessage, accountSettingsSection, appearanceSettingsSection, backUpOnSignup, bookingCancelLink, buildNotificationCenterItems, buildProjectSummaries, chatSettingsSection, closeAccessRequestReview, connectedAppsSettingsSection, connectionSettingsSection, countNotificationTypes, createDocumentColumns, createEventCall, createNotificationTargetOpener, createTagColumn, deduplicateByContentHash, defaultHost, describePlan, distinctPeers, documentFamilyMeta, documentFieldContent, filesViewMode, filterNotificationCenterItems, formatStorageGb, groupFallbackName, identifyOAuthClient, isActiveDocumentStatus, joinEventMeeting, loadEventWebinar, mailSettingsSection, openMeetingLink, openPendingSyncDialog, openSsoPopup, organisationSettingsSection, parseArbiCallUrl, parseOAuthConsentRequest, parseQuotaError, parseTypedSkill, primaryProjectWorkspace, privacySettingsSection, renderConnectedUser, renderSessionStatusIcon, requestProjectBillingFocus, resolveAttendeeUsers, resolveAttendeeUsersRemote, resolveCallPeers, resolveCallPeersRemote, resolveLaunchInputs, resolveMailbox, resolveSsoName, reviewAccessRequest, reviewProgress, shareEventCall, startMenuItem, storageSettingsSection, suppliedKinds, threadStateOf, toWorkspaceSummary, transferOutcome, updateEventWebinarRoles, usageSettingsSection, useAccessRequestUnderReview, useAddFromUrls, useAiReviewLiveUpdates, useAiReviewStore, useAppShell, useAuthPages, useAutoRefreshPendingProjects, useBatchCompleteToasts, useChatMessageToasts, useConnectedCalendarCalls, useConnectedNotificationBell, useConnectedShellWorkspaces, useConnectedThreadActivity, useConnectedWorkspaceList, useConnectedWorkspaceSettings, useContextualHints, useDocumentBulkActions, useDocumentFilters, useDocumentFolders, useDocumentGridSync, useDocumentNavigation, useDocumentTable, useExportStore, useFilesDialogs, useFilesGridStates, useFilesPrefs, useFilesStore, useLaunchWorkflow, useMemberLookup, useMessengerRows, useModelPicker, useNotificationBellEntry, useNotificationToasts, useOpenBillingPortal, useOpenChunk, useOpenNotificationTarget, useOpenWorkspaceActivityTarget, useOpenWorkspaceIcon, usePendingFolders, usePendingTaskThread, useProjectBillingFocus, useProjectSummaries, useProjectSummary, useReferralReward, useRenderTaskPerson, useReportProblem, useResolvedDocStatus, useSessionPanelMode, useSessionSidebar, useSkillsEnabled, useSlashItems, useSlashSkillWorkflows, useSsoSignIn, useStartRequestedDraft, useTableViews, useTaskPeople, useTaskStart, useThreadLabels, useThreadTabs, useWorkflowDefinitions, useWorkflowLaunch, useWorkflowTasks, useWorkflowsPageState, useWorkspaceDocTitles, viewsOfTable, webinarRolesByUser, windowLabel, withMissingTableViews, withTableView, withoutTableView, workflowRunView };
43373
+ export { AddAddonDialog, AddFromAccountsButton, AgentBarShell, AgentControlBar, AgentSteps, AnswerTable, AskAgainContext, BACKFILL_OPTIONS, BUILTIN_GLOBAL_DIALOGS, BULK_REPROCESS_LIMIT, BillingProjectEntity, CaptureBar, ChangePlanDialog, ChatAttachmentList, ConnectedAccountAccessBadge, ConnectedAccountCluster, ConnectedAccountSettings, ConnectedAccountsImport, ConnectedAddContacts, ConnectedAgentChat, ConnectedAgentChatPanel, ConnectedAgentConfigForm, ConnectedAgentCreator, ConnectedAiReview, ConnectedAppRuntime, ConnectedAppShell, ConnectedAppsSettings, ConnectedAuthorizeAgent, ConnectedBranchControls, ConnectedBulkTagEditor, ConnectedCalendar, ConnectedChatThread, ConnectedCitationRenderer, ConnectedCompactConversation, ConnectedConfigForm, ConnectedContactCardForm, ConnectedContactToggle, ConnectedContactsDirectory, ConnectedConversation, ConnectedConversationDocumentPicker, ConnectedConversationEmpty, ConnectedConversationStart, ConnectedDangerZone, ConnectedDatabasesPage, ConnectedDeploymentStorage, ConnectedDeveloperConfig, ConnectedDriveSyncDialog, ConnectedExportDialog, ConnectedExportPanel, ConnectedFactsPage, ConnectedFieldsEditor, ConnectedFieldsManager, ConnectedFilesBulkActions, ConnectedFilesExplorer, ConnectedFilesPage, ConnectedFilterDropdown, ConnectedForgotPassword, ConnectedGlobalDialogs, ConnectedGrantWorkspaceAccessDialog, ConnectedGridView, ConnectedGroupMembers, ConnectedIdentityVerification, ConnectedLoginPage, ConnectedLogoutDialog, ConnectedMailAccounts, ConnectedMailComposer, ConnectedMailInviteCard, ConnectedMailMessage, ConnectedMailSettings, ConnectedMailSetup, ConnectedMailbox, ConnectedMailboxSyncDialog, ConnectedMessage, ConnectedMessageArea, ConnectedMessageList, ConnectedMessenger, ConnectedModelSelector, ConnectedMoveToFolder, ConnectedNewThreadDialog, ConnectedNotificationCenter, ConnectedNotificationPreferences, ConnectedOAuthConsentPage, ConnectedPanelHost, ConnectedPasswordChangeDialog, ConnectedPendingSyncDialog, ConnectedPeopleMultiSelect, ConnectedPremiumModels, ConnectedPrivacySettings, ConnectedProfileCard, ConnectedProjectEntity, ConnectedProjectPage, ConnectedProjectSelector, ConnectedProjectStorage, ConnectedProjectsPanel, ConnectedPublicBooking, ConnectedQuotaDialog, ConnectedRecentlyDeletedButton, ConnectedRecoveryKeyDialog, ConnectedReportProblem, ConnectedRequestWorkspaceAccess, ConnectedRequireVerified, ConnectedSearchPage, ConnectedSecuritySection, ConnectedSessionsRow, ConnectedSettingsPage, ConnectedShareDialog, ConnectedSharePointAdminConsentPage, ConnectedSharedFilesPage, ConnectedSignatureVerifyPage, ConnectedSkillUpload, ConnectedSkillsLibrary, ConnectedSsoCallback, ConnectedStorageProjectCard, ConnectedStorageSettings, ConnectedTagEditorDialog, ConnectedTagEntity, ConnectedTagForm, ConnectedTagTable, ConnectedTagsPage, ConnectedTaskAccessRequest, ConnectedTaskActivityDialog, ConnectedTaskComposer, ConnectedTaskStartDialog, ConnectedThreadFollow, ConnectedThreadLauncher, ConnectedThreadTabs, ConnectedThreadTaskBar, ConnectedThreadsPage, ConnectedThreadsPreview, ConnectedTransferWatcher, ConnectedUpcomingEvents, ConnectedUpload, ConnectedUploadDropzone, ConnectedUserEntity, ConnectedWelcomeDialog, ConnectedWorkflowHistory, ConnectedWorkflowRunner, ConnectedWorkflowStart, ConnectedWorkspaceActivity, ConnectedWorkspaceDashboard, ConnectedWorkspaceEntity, ConnectedWorkspaceFormModal, ConnectedWorkspaceList, ConnectedWorkspaceMembers, ConnectedWorkspaceNotificationMenu, ConnectedWorkspaceSettings, ConnectedWorkspaceTrash, ConversationAlert, ConversationComposer2 as ConversationComposer, ConversationEntity, ConversationSendButton, ConversationStatusCell, DEFAULT_CONNECTED_SEARCH_PAGE_LABELS, DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS, DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS, DEFAULT_OAUTH_PERMISSIONS, DEFAULT_PROJECTS_LIST_LABELS, DEFAULT_PROJECT_DETAILS_LABELS, DEFAULT_PROJECT_DETAIL_FIELDS, DEFAULT_PROJECT_LIST_COLUMNS, DEFAULT_PROJECT_PAGE_LABELS, DEFAULT_SEARCH_FIELDS, DEFAULT_SEARCH_ROW_LABELS, DEFAULT_SETTINGS_SECTIONS, DEFAULT_TIMELINE_LABEL_WIDTH, DEFAULT_WORKSPACE_LIST_LABELS, DeveloperFooter, DocumentFolderCell, DocumentLabelsCell, DocumentNameCell, DocumentSharedCell, DocumentStatusGlyph, DocumentSyncGlyph, DocumentUser, DocumentsFilterBarActions, DocumentsUploadButton, EmptyWorkspaceUpload, FACTS_GRID_ID, FILES_PREFS_KEY, FileTooltipContent, ImportVcfButton, ImportVcfSummary, InvoicesModal, LOOK_AGAIN_LABEL, MessageDetailsModal, MessageLiveSeconds, MicButton, NewProjectFlow, NotificationCenter, NotificationEvent, PENDING_LOOKUP_MS, PENDING_RECOVERY_KEY, PENDING_TASK_MESSAGE, PREMIUM_TIER_TAG, PROJECTS_BASE_TAB_ID, PROMPT_BINDINGS, PersistedGridView, ProgressiveLoadingChip, ProjectDetail, ProjectUsageContent, ProjectsTable, REFERRAL_OFFER, RecoveryKeyDownload, RelatedDocumentsCell, ReportProblemDialog, RunStatsBadges, RunningSubagents, SEARCH_FIELD_OPTIONS, SETTINGS_SECTION_IDS, STANDARD_TIER_TAG, SessionStatusIcon, SharedProjects, SourceChips, SsoResendVerificationButton, StatusCell2 as StatusCell, StorageBreakdown, StorageItemsTable, StorageTiers, StreamedArtifact, TILE_DEFAULT, TILE_MAX, TILE_MIN, ThreadSwitcher, UserAvatar, ViewSelector, WORKSPACES_TAB_ID, WorkflowLaunchHost, WorkflowRunStatusCell, WorkflowRunThread, WorkflowStepMessage, accountSettingsSection, appearanceSettingsSection, backUpOnSignup, bookingCancelLink, buildNotificationCenterItems, buildProjectSummaries, chatSettingsSection, closeAccessRequestReview, connectedAppsSettingsSection, connectionSettingsSection, countNotificationTypes, createDocumentColumns, createEventCall, createNotificationTargetOpener, createTagColumn, deduplicateByContentHash, defaultHost, describePlan, distinctPeers, documentFamilyMeta, documentFieldContent, filesViewMode, filterNotificationCenterItems, formatStorageGb, groupFallbackName, identifyOAuthClient, isActiveDocumentStatus, joinEventMeeting, loadEventWebinar, mailSettingsSection, openMeetingLink, openPendingSyncDialog, openSsoPopup, organisationSettingsSection, parseArbiCallUrl, parseOAuthConsentRequest, parseQuotaError, parseTypedSkill, primaryProjectWorkspace, privacySettingsSection, renderConnectedUser, renderSessionStatusIcon, requestProjectBillingFocus, resolveAttendeeUsers, resolveAttendeeUsersRemote, resolveCallPeers, resolveCallPeersRemote, resolveLaunchInputs, resolveMailbox, resolveSsoName, reviewAccessRequest, reviewProgress, shareEventCall, startMenuItem, storageSettingsSection, suppliedKinds, threadStateOf, toWorkspaceSummary, transferOutcome, updateEventWebinarRoles, usageSettingsSection, useAccessRequestUnderReview, useAddFromUrls, useAiReviewLiveUpdates, useAiReviewStore, useAppShell, useAuthPages, useAutoRefreshPendingProjects, useBatchCompleteToasts, useChatMessageToasts, useConnectedCalendarCalls, useConnectedNotificationBell, useConnectedShellWorkspaces, useConnectedThreadActivity, useConnectedWorkspaceList, useConnectedWorkspaceSettings, useContextualHints, useDocumentBulkActions, useDocumentFilters, useDocumentFolders, useDocumentGridSync, useDocumentNavigation, useDocumentTable, useExportStore, useFilesDialogs, useFilesGridStates, useFilesPrefs, useFilesStore, useHasAccountsImport, useLaunchWorkflow, useMemberLookup, useMessengerRows, useModelPicker, useNotificationBellEntry, useNotificationToasts, useOpenBillingPortal, useOpenChunk, useOpenNotificationTarget, useOpenWorkspaceActivityTarget, useOpenWorkspaceIcon, usePendingFolders, usePendingTaskThread, useProjectBillingFocus, useProjectSummaries, useProjectSummary, useReferralReward, useRenderTaskPerson, useReportProblem, useResolvedDocStatus, useSessionPanelMode, useSessionSidebar, useSkillsEnabled, useSlashItems, useSlashSkillWorkflows, useSsoSignIn, useStartRequestedDraft, useTableViews, useTaskPeople, useTaskStart, useThreadLabels, useThreadTabs, useWorkflowDefinitions, useWorkflowLaunch, useWorkflowTasks, useWorkflowsPageState, useWorkspaceDocTitles, viewsOfTable, webinarRolesByUser, windowLabel, withMissingTableViews, withTableView, withoutTableView, workflowRunView };
42194
43374
  //# sourceMappingURL=index.js.map
42195
43375
  //# sourceMappingURL=index.js.map