e.stopPropagation()}
+ style={{
+ background: '#fff', borderRadius: 8, padding: 0,
+ width: 'min(540px, 92vw)', maxHeight: '85vh', display: 'flex', flexDirection: 'column',
+ boxShadow: '0 12px 40px rgba(0,0,0,0.2)',
+ }}
+ >
+
+
+ {'\u2699\uFE0F '}{t('Einstellungen')} — {title}
+
+
+
+
+
+ {errorMsg && (
+
{errorMsg}
+ )}
+
+ {/* --- Section: Connection --- */}
+ {connectionId && (
+
+
+ {t('Verbindung')}
+
+
+
+
{t('Wissensdatenbank aktiv')}
+
+ {t('Master-Schalter — wirkt auf ALLE Datenquellen dieser Verbindung.')}
+
+
+
+
+
+ )}
+
+ {/* --- Section: RAG Limits (only on DataSource-Root, not sub-elements) --- */}
+ {dataSourceId && showRagSection && (
+
+
+ {t('RAG-Indexierungs-Limits')}
+
+
+ {t('Walker stoppt bei den ersten erreichten Limit. Defaults greifen, wenn ein Feld leer ist.')}
+
+
+ {limitKeys.map(key => (
+
+
+ _handleLimitChange(key, e.target.value)}
+ placeholder={cost?.basis?.limits?.[key] != null ? _displayValue(key, cost.basis.limits[key]) : ''}
+ style={{
+ padding: '6px 8px', fontSize: 13, border: '1px solid #ccc', borderRadius: 4,
+ textAlign: 'right',
+ }}
+ />
+
+ ))}
+
+
+
+
+
+ )}
+
+ {/* --- Section: Cost estimate (only on DataSource-Root) --- */}
+ {dataSourceId && showRagSection && (
+
+
+ {t('Kostenschätzung (indikativ)')}
+
+ {costLoading && {t('Wird berechnet…')}
}
+ {!costLoading && cost && (
+
+
+ {t('Voll-Sync (geschätzt)')}
+ ~ {cost.estimatedUsd.toFixed(4)} USD
+
+
+ ~ {cost.estimatedTokens.toLocaleString()} {t('Tokens')} · {cost.basis.notes}
+
+
+ )}
+
+ )}
+
+