{
- if (!pickerOpen) handleOpenChange(false);
- }}
- />,
- document.body
- )}
-
-
e.preventDefault()}
- onInteractOutside={(e) => {
- if (pickerOpen) e.preventDefault();
- }}
- onPointerDownOutside={(e) => {
- if (pickerOpen) e.preventDefault();
- }}
- className="max-w-3xl w-[95vw] sm:w-full h-[75vh] sm:h-[85vh] flex flex-col p-0 gap-0 overflow-hidden ring-0 dark:ring-0 [&>button]:right-4 sm:[&>button]:right-12 [&>button]:top-6 sm:[&>button]:top-10 [&>button]:opacity-80 [&>button]:hover:opacity-100 [&>button]:hover:bg-accent [&>button]:hover:text-accent-foreground [&>button>svg]:size-5 select-none"
- >
- MCP Connectors
- {/* YouTube Crawler View - shown when adding YouTube videos */}
- {isYouTubeView && workspaceId ? (
-
- ) : viewingMCPList ? (
-
- ) : viewingAccountsType ? (
- {
- // Check both OAUTH_CONNECTORS and COMPOSIO_CONNECTORS
- const oauthConnector =
- OAUTH_CONNECTORS.find(
- (c) => c.connectorType === viewingAccountsType.connectorType
- ) ||
- COMPOSIO_CONNECTORS.find(
- (c) => c.connectorType === viewingAccountsType.connectorType
- );
- if (oauthConnector) {
- handleConnectOAuth(oauthConnector);
- }
- }}
- isConnecting={connectingId !== null}
- />
- ) : connectingConnectorType ? (
- handleSubmitConnectForm(formData, startIndexing)}
- onBack={handleBackFromConnect}
- isSubmitting={isCreatingConnector}
- />
- ) : editingConnector ? (
- c.id === editingConnector.id)
- ?.last_indexed_at ?? editingConnector.last_indexed_at,
- }}
- startDate={startDate}
- endDate={endDate}
- periodicEnabled={periodicEnabled}
- frequencyMinutes={frequencyMinutes}
- enableVisionLlm={enableVisionLlm}
- isSaving={isSaving}
- isDisconnecting={isDisconnecting}
- isIndexing={indexingConnectorIds.has(editingConnector.id)}
- workspaceId={workspaceId?.toString()}
- onStartDateChange={setStartDate}
- onEndDateChange={setEndDate}
- onPeriodicEnabledChange={setPeriodicEnabled}
- onFrequencyChange={setFrequencyMinutes}
- onEnableVisionLlmChange={setEnableVisionLlm}
- onSave={() => {
- startIndexing(editingConnector.id);
- handleSaveConnector(() => refreshConnectors());
- }}
- onDisconnect={() => handleDisconnectConnector(() => refreshConnectors())}
- onBack={handleBackFromEdit}
- onQuickIndex={(() => {
- const cfg = connectorConfig || editingConnector.config;
- const isDriveOrOneDrive =
- editingConnector.connector_type === "GOOGLE_DRIVE_CONNECTOR" ||
- editingConnector.connector_type === "COMPOSIO_GOOGLE_DRIVE_CONNECTOR" ||
- editingConnector.connector_type === "ONEDRIVE_CONNECTOR" ||
- editingConnector.connector_type === "DROPBOX_CONNECTOR";
- const hasDriveItems = isDriveOrOneDrive
- ? ((cfg?.selected_folders as unknown[]) ?? []).length > 0 ||
- ((cfg?.selected_files as unknown[]) ?? []).length > 0
- : true;
- if (!hasDriveItems) return undefined;
- return () => {
- startIndexing(editingConnector.id);
- handleQuickIndexConnector(
- editingConnector.id,
- editingConnector.connector_type,
- stopIndexing,
- startDate,
- endDate
- );
- };
- })()}
- onConfigChange={setConnectorConfig}
- onNameChange={setConnectorName}
- />
- ) : indexingConfig ? (
- {
- if (indexingConfig.connectorId) {
- startIndexing(indexingConfig.connectorId);
- }
- handleStartIndexing(() => refreshConnectors());
- }}
- onSkip={handleSkipIndexing}
- />
- ) : (
-
- {/* Header */}
-
-
- {/* Content */}
-
-
- {/* Bottom fade shadow */}
-
-
-
- )}
-
-
- );
- }
-);
-
-ConnectorIndicator.displayName = "ConnectorIndicator";
diff --git a/surfsense_web/components/assistant-ui/connector-popup/index.ts b/surfsense_web/components/assistant-ui/connector-popup/index.ts
index f3209a777..8fd895e71 100644
--- a/surfsense_web/components/assistant-ui/connector-popup/index.ts
+++ b/surfsense_web/components/assistant-ui/connector-popup/index.ts
@@ -1,6 +1,3 @@
-// Main component export
-export { ConnectorIndicator } from "../connector-popup";
-
// Sub-components (if needed for external use)
export { ConnectorCard } from "./components/connector-card";
export { ConnectorDialogHeader } from "./components/connector-dialog-header";