IndexingModalWithMode.tsx 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. /**
  2. * Processing mode selection (Fast/Precise) support
  3. */
  4. import React, { useState, useEffect } from 'react';
  5. import { createPortal } from 'react-dom';
  6. import { ModelConfig, RawFile, IndexingConfig } from '../types';
  7. import { useLanguage } from '../contexts/LanguageContext';
  8. import { useToast } from '../contexts/ToastContext';
  9. import { useConfirm } from '../contexts/ConfirmContext';
  10. import { Layers, FileText, Database, X, ArrowRight, Files, Info, Zap, Target, AlertTriangle, Clock, DollarSign } from 'lucide-react';
  11. import { formatBytes } from '../utils/fileUtils';
  12. import { chunkConfigService } from '../services/chunkConfigService';
  13. import { uploadService } from '../services/uploadService';
  14. interface IndexingModalWithModeProps {
  15. isOpen: boolean;
  16. onClose: () => void;
  17. files?: RawFile[];
  18. embeddingModels: ModelConfig[];
  19. defaultEmbeddingId: string;
  20. onConfirm: (config: IndexingConfig) => void;
  21. authToken?: string;
  22. isReconfiguring?: boolean;
  23. }
  24. const IndexingModalWithMode: React.FC<IndexingModalWithModeProps> = ({
  25. isOpen,
  26. onClose,
  27. files = [],
  28. embeddingModels,
  29. defaultEmbeddingId,
  30. onConfirm,
  31. authToken,
  32. isReconfiguring = false
  33. }) => {
  34. const { t } = useLanguage();
  35. const { showWarning, showInfo } = useToast();
  36. const { confirm } = useConfirm();
  37. // Configuration state
  38. const [chunkSize, setChunkSize] = useState(200);
  39. const [chunkOverlap, setChunkOverlap] = useState(40);
  40. const [selectedEmbedding, setSelectedEmbedding] = useState('');
  41. const [mode, setMode] = useState<'fast' | 'precise'>('fast');
  42. const [userSelectedMode, setUserSelectedMode] = useState(false); // Track if user manually selected mode
  43. // Mode recommendation info
  44. const [modeRecommendation, setModeRecommendation] = useState<any>(null);
  45. const [isLoadingRecommendation, setIsLoadingRecommendation] = useState(false);
  46. // Limit info state
  47. const [limits, setLimits] = useState<{
  48. maxChunkSize: number;
  49. maxOverlapSize: number;
  50. minOverlapSize: number;
  51. defaultChunkSize: number;
  52. defaultOverlapSize: number;
  53. modelInfo: {
  54. name: string;
  55. maxInputTokens: number;
  56. maxBatchSize: number;
  57. expectedDimensions: number;
  58. };
  59. } | null>(null);
  60. const [isLoadingLimits, setIsLoadingLimits] = useState(false);
  61. // Get auth token
  62. const getAuthToken = () => {
  63. return authToken || localStorage.getItem('kb_api_key') || '';
  64. };
  65. // Load mode recommendation when files change
  66. useEffect(() => {
  67. if (!isOpen || !files || files.length === 0) return;
  68. const loadRecommendation = async () => {
  69. setIsLoadingRecommendation(true);
  70. try {
  71. // Use first file for recommendation (assume similar types)
  72. const file = files[0];
  73. const rec = await uploadService.recommendMode(file.file);
  74. setModeRecommendation(rec);
  75. // Auto-select recommended mode if user hasn't manually selected one
  76. if (!isReconfiguring && !userSelectedMode) {
  77. setMode(rec.recommendedMode);
  78. showInfo(t('recommendationMsg', rec.recommendedMode === 'precise' ? t('preciseMode') : t('fastMode'), t(rec.reason, ...(rec.reasonArgs || []))));
  79. }
  80. } catch (error) {
  81. console.error('モード推奨の取得に失敗しました:', error);
  82. } finally {
  83. setIsLoadingRecommendation(false);
  84. }
  85. };
  86. loadRecommendation();
  87. }, [isOpen, files, isReconfiguring]);
  88. // Load config limits when selected model changes
  89. useEffect(() => {
  90. if (!isOpen || !selectedEmbedding) {
  91. setLimits(null);
  92. return;
  93. }
  94. const loadLimits = async () => {
  95. setIsLoadingLimits(true);
  96. try {
  97. const token = getAuthToken();
  98. if (!token) return;
  99. const limitData = await chunkConfigService.getLimits(selectedEmbedding, token);
  100. setLimits(limitData);
  101. // Auto-adjust if current values exceed new limits
  102. if (chunkSize > limitData.maxChunkSize) {
  103. setChunkSize(limitData.maxChunkSize);
  104. showWarning(t('autoAdjustChunk', limitData.maxChunkSize));
  105. }
  106. if (chunkOverlap > limitData.maxOverlapSize) {
  107. setChunkOverlap(limitData.maxOverlapSize);
  108. showWarning(t('autoAdjustOverlap', limitData.maxOverlapSize));
  109. }
  110. if (chunkOverlap < limitData.minOverlapSize) {
  111. setChunkOverlap(limitData.minOverlapSize);
  112. // Only show warning if it was manually set below the new minimum
  113. if (chunkOverlap < limitData.minOverlapSize) {
  114. showWarning(t('autoAdjustOverlapMin', limitData.minOverlapSize));
  115. }
  116. }
  117. } catch (error) {
  118. console.error('設定制限の読み込みに失敗しました:', error);
  119. showWarning(t('loadLimitsFailed'));
  120. } finally {
  121. setIsLoadingLimits(false);
  122. }
  123. };
  124. loadLimits();
  125. }, [isOpen, selectedEmbedding]);
  126. // Track isOpen state change, reset only on open
  127. const [prevOpen, setPrevOpen] = useState(false);
  128. // Initialize modal
  129. useEffect(() => {
  130. if (isOpen && !prevOpen) {
  131. // Execute initialization only when going from closed to open
  132. console.log('DEBUG: IndexingModalWithMode opening, files:', files);
  133. // Set default embedding model
  134. const enabledModels = embeddingModels.filter(m => m.isEnabled !== false);
  135. const validDefault = enabledModels.find(m => m.id === defaultEmbeddingId);
  136. if (validDefault) {
  137. setSelectedEmbedding(defaultEmbeddingId);
  138. } else if (enabledModels.length > 0) {
  139. setSelectedEmbedding(enabledModels[0].id);
  140. } else {
  141. setSelectedEmbedding('');
  142. }
  143. // Reset to defaults
  144. setChunkSize(200);
  145. setChunkOverlap(40);
  146. if (!isReconfiguring) {
  147. setMode('fast');
  148. setUserSelectedMode(false); // Reset user selection status
  149. }
  150. setModeRecommendation(null);
  151. }
  152. setPrevOpen(isOpen);
  153. }, [isOpen, prevOpen, defaultEmbeddingId, embeddingModels, isReconfiguring]);
  154. // Handle chunk size change
  155. const handleChunkSizeChange = (value: number) => {
  156. if (limits && value > limits.maxChunkSize) {
  157. showWarning(t('maxValueMsg', limits.maxChunkSize));
  158. setChunkSize(limits.maxChunkSize);
  159. return;
  160. }
  161. setChunkSize(value);
  162. // Auto-adjust overlap if it exceeds 50% of new chunk size
  163. if (chunkOverlap > value * 0.5) {
  164. setChunkOverlap(Math.floor(value * 0.5));
  165. }
  166. };
  167. // Handle overlap size change
  168. const handleChunkOverlapChange = (value: number) => {
  169. if (limits && value > limits.maxOverlapSize) {
  170. showWarning(t('maxValueMsg', limits.maxOverlapSize));
  171. setChunkOverlap(limits.maxOverlapSize);
  172. return;
  173. }
  174. if (limits && value < limits.minOverlapSize) {
  175. // Don't show warning here, just set to min if they slide too low
  176. setChunkOverlap(limits.minOverlapSize);
  177. return;
  178. }
  179. // Check if it exceeds 50% of chunk size
  180. const maxOverlapByRatio = Math.floor(chunkSize * 0.5);
  181. if (value > maxOverlapByRatio) {
  182. showWarning(t('overlapRatioLimit', maxOverlapByRatio));
  183. setChunkOverlap(maxOverlapByRatio);
  184. return;
  185. }
  186. setChunkOverlap(value);
  187. };
  188. // Render limits info
  189. const renderLimitsInfo = () => {
  190. if (!limits || isLoadingLimits) {
  191. return null;
  192. }
  193. return (
  194. <div className="bg-blue-50/50 backdrop-blur-sm border border-blue-100 rounded-xl p-4 text-xs mt-2">
  195. <div className="flex items-center gap-2 mb-2 font-bold text-blue-900">
  196. <Info className="w-4 h-4 text-blue-600" />
  197. {t('modelLimitsInfo')}
  198. </div>
  199. <div className="grid grid-cols-2 gap-y-2 gap-x-4 text-slate-600">
  200. <div>{t('model')}: <span className="font-semibold text-slate-900">{limits.modelInfo.name}</span></div>
  201. <div>{t('maxChunkSize')}: <span className="font-semibold text-slate-900">{limits.maxChunkSize} tokens</span></div>
  202. <div>{t('maxOverlapSize')}: <span className="font-semibold text-slate-900">{limits.maxOverlapSize} tokens</span></div>
  203. <div>{t('maxBatchSize')}: <span className="font-semibold text-slate-900">{limits.modelInfo.maxBatchSize}</span></div>
  204. </div>
  205. {limits.modelInfo.maxInputTokens > limits.maxChunkSize && (
  206. <div className="mt-2 text-blue-600/80 text-[10px] flex items-center gap-1">
  207. <Info size={10} />
  208. {t('envLimitWeaker')}: {limits.maxChunkSize} &lt; {limits.modelInfo.maxInputTokens}
  209. </div>
  210. )}
  211. </div>
  212. );
  213. };
  214. // Render mode recommendation info
  215. const renderModeRecommendation = () => {
  216. if (!modeRecommendation || isLoadingRecommendation) {
  217. return null;
  218. }
  219. return (
  220. <div className="space-y-2 p-4 bg-purple-50/50 backdrop-blur-sm border border-purple-100 rounded-xl text-xs">
  221. <div className="font-bold text-purple-900 flex items-center gap-2">
  222. <Target className="w-4 h-4 text-purple-600" />
  223. {t('processingMode')}
  224. </div>
  225. <div className="text-slate-600">
  226. <strong className="text-purple-900/70">{t('recommendationReason')}:</strong> {t(modeRecommendation.reason, ...(modeRecommendation.reasonArgs || []))}
  227. </div>
  228. {modeRecommendation.warnings && modeRecommendation.warnings.length > 0 && (
  229. <div className="mt-2 space-y-1.5 border-t border-purple-100 pt-2">
  230. {modeRecommendation.warnings.map((warning: string, idx: number) => (
  231. <div key={idx} className="text-purple-800/80 flex items-start gap-1.5 leading-relaxed">
  232. <AlertTriangle className="w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-purple-500" />
  233. <span>{t(warning as any)}</span>
  234. </div>
  235. ))}
  236. </div>
  237. )}
  238. </div>
  239. );
  240. };
  241. // Render current mode description
  242. const renderModeDescription = () => {
  243. if (mode === 'fast') {
  244. return (
  245. <div className="text-xs text-slate-600 bg-slate-50/50 p-3 rounded-xl border border-slate-100">
  246. <div className="font-bold text-slate-900 mb-2 flex items-center gap-2">
  247. <Zap className="w-4 h-4 text-yellow-500" />
  248. {t('fastModeFeatures')}
  249. </div>
  250. <ul className="grid grid-cols-1 gap-1.5 text-[11px] text-slate-500">
  251. {['fastFeature1', 'fastFeature2', 'fastFeature3', 'fastFeature4', 'fastFeature5'].map((feature) => (
  252. <li key={feature} className="flex items-center gap-2 before:content-[''] before:w-1 before:h-1 before:bg-slate-300 before:rounded-full">
  253. {t(feature as any)}
  254. </li>
  255. ))}
  256. </ul>
  257. </div>
  258. );
  259. }
  260. return (
  261. <div className="text-xs text-slate-600 bg-slate-50/50 p-3 rounded-xl border border-slate-100">
  262. <div className="font-bold text-slate-900 mb-2 flex items-center gap-2">
  263. <Target className="w-4 h-4 text-blue-600" />
  264. {t('preciseModeFeatures')}
  265. </div>
  266. <ul className="grid grid-cols-1 gap-1.5 text-[11px] text-slate-500">
  267. {['preciseFeature1', 'preciseFeature2', 'preciseFeature3', 'preciseFeature4', 'preciseFeature5', 'preciseFeature6'].map((feature) => (
  268. <li key={feature} className="flex items-center gap-2 before:content-[''] before:w-1 before:h-1 before:bg-slate-300 before:rounded-full">
  269. {t(feature as any)}
  270. </li>
  271. ))}
  272. </ul>
  273. </div>
  274. );
  275. };
  276. if (!isOpen) return null;
  277. return createPortal(
  278. <>
  279. <div
  280. className="fixed inset-0 z-[100] bg-black/40 backdrop-blur-md transition-opacity"
  281. onClick={onClose}
  282. />
  283. <div className="fixed right-0 top-0 h-full w-full max-w-lg bg-white shadow-2xl z-[101] transform transition-transform duration-500 ease-out animate-in slide-in-from-right flex flex-col border-l border-slate-50">
  284. {/* Header */}
  285. <div className="p-6 border-b border-slate-50 bg-white shrink-0">
  286. <div className="flex justify-between items-start">
  287. <div>
  288. <h2 className="text-xl font-bold text-slate-900 flex items-center gap-2.5">
  289. <div className="p-2 bg-blue-50 rounded-xl">
  290. <Database className="w-5 h-5 text-blue-600" />
  291. </div>
  292. {isReconfiguring ? t('reconfigureTitle') : t('indexingConfigTitle')}
  293. </h2>
  294. <p className="text-[13px] text-slate-500 mt-1 ml-12">
  295. {isReconfiguring ? t('reconfigureDesc') : t('indexingConfigDesc')}
  296. </p>
  297. </div>
  298. <button
  299. onClick={(e) => {
  300. e.stopPropagation();
  301. onClose();
  302. }}
  303. className="p-2 hover:bg-slate-100 rounded-xl transition-all active:scale-95"
  304. >
  305. <X className="w-5 h-5 text-slate-400" />
  306. </button>
  307. </div>
  308. </div>
  309. <div className="flex-1 overflow-y-auto p-5 space-y-6">
  310. {/* Pending files - only show when there are files */}
  311. {files && files.length > 0 && (
  312. <div>
  313. <h3 className="text-sm font-semibold text-slate-700 mb-2 flex items-center gap-2">
  314. <Files className="w-4 h-4 text-slate-500" />
  315. {t('pendingFiles')}
  316. </h3>
  317. <div className="space-y-1 max-h-32 overflow-y-auto bg-slate-50/50 rounded-xl p-3 border border-slate-100">
  318. {files.map((file, index) => (
  319. <div key={index} className="text-xs text-slate-600 flex items-center justify-between py-1.5 px-2 hover:bg-white/80 rounded-lg transition-colors">
  320. <span className="truncate flex-1">{file.name}</span>
  321. <span className="text-slate-400 ml-2 font-medium">{formatBytes(file.size)}</span>
  322. </div>
  323. ))}
  324. </div>
  325. </div>
  326. )}
  327. {/* Processing mode selection */}
  328. {!isReconfiguring && (
  329. <div>
  330. <h3 className="text-sm font-semibold text-slate-700 mb-2 flex items-center gap-2">
  331. <Target className="w-4 h-4 text-slate-500" />
  332. {t('processingMode')}
  333. {isLoadingRecommendation && <span className="text-xs text-blue-600 ml-2">{t('analyzingFile')}</span>}
  334. </h3>
  335. {/* Mode recommendation info */}
  336. {renderModeRecommendation()}
  337. {/* Mode selection */}
  338. <div className="grid grid-cols-2 gap-3 mt-3">
  339. {/* Fast Mode */}
  340. <button
  341. onClick={() => {
  342. setMode('fast');
  343. setUserSelectedMode(true); // ユーザーによる手動選択をマーク
  344. }}
  345. className={`relative p-3 rounded-lg border-2 text-left transition-all ${mode === 'fast'
  346. ? 'border-blue-500 bg-blue-50'
  347. : 'border-slate-200 hover:border-slate-300'
  348. }`}
  349. >
  350. <div className="flex items-center gap-2 mb-2">
  351. <Zap className="w-4 h-4 text-yellow-600" />
  352. <span className="font-semibold text-sm">{t('fastMode')}</span>
  353. </div>
  354. <div className="text-xs text-slate-600 leading-relaxed">
  355. {t('fastModeDesc')}
  356. </div>
  357. {mode === 'fast' && (
  358. <div className="absolute top-2 right-2 text-blue-600">
  359. <div className="w-2 h-2 bg-blue-600 rounded-full"></div>
  360. </div>
  361. )}
  362. </button>
  363. {/* Precise Mode */}
  364. <button
  365. onClick={() => {
  366. setMode('precise');
  367. setUserSelectedMode(true); // ユーザーによる手動選択をマーク
  368. }}
  369. className={`relative p-3 rounded-lg border-2 text-left transition-all ${mode === 'precise'
  370. ? 'border-purple-500 bg-purple-50'
  371. : 'border-slate-200 hover:border-slate-300'
  372. }`}
  373. >
  374. <div className="flex items-center gap-2 mb-2">
  375. <Target className="w-4 h-4 text-purple-600" />
  376. <span className="font-semibold text-sm">{t('preciseMode')}</span>
  377. </div>
  378. <div className="text-xs text-slate-600 leading-relaxed">
  379. {t('preciseModeDesc')}
  380. </div>
  381. {mode === 'precise' && (
  382. <div className="absolute top-2 right-2 text-purple-600">
  383. <div className="w-2 h-2 bg-purple-600 rounded-full"></div>
  384. </div>
  385. )}
  386. </button>
  387. </div>
  388. {/* Mode description */}
  389. <div className="mt-3">
  390. {renderModeDescription()}
  391. </div>
  392. </div>
  393. )}
  394. {/* Embedding model selection */}
  395. <div>
  396. <h3 className="text-sm font-semibold text-slate-700 mb-2 flex items-center gap-2">
  397. <Layers className="w-4 h-4 text-slate-500" />
  398. {t('embeddingModel')}
  399. </h3>
  400. <select
  401. className="w-full text-sm border border-slate-100 bg-slate-50/50 rounded-xl px-4 py-2.5 focus:ring-2 focus:ring-blue-100 focus:border-blue-400 outline-none transition-all cursor-pointer"
  402. value={selectedEmbedding}
  403. onChange={(e) => setSelectedEmbedding(e.target.value)}
  404. >
  405. <option value="">{t('pleaseSelect')}</option>
  406. {embeddingModels.filter(m => m.isEnabled !== false).map(model => (
  407. <option key={model.id} value={model.id}>
  408. {model.name}
  409. </option>
  410. ))}
  411. </select>
  412. </div>
  413. {/* Chunk config */}
  414. <div>
  415. <h3 className="text-sm font-semibold text-slate-700 mb-2 flex items-center gap-2">
  416. <FileText className="w-4 h-4 text-slate-500" />
  417. {t('chunkConfig')}
  418. </h3>
  419. <div className="space-y-3">
  420. {/* Chunk size */}
  421. <div>
  422. <div className="flex justify-between mb-1 text-xs">
  423. <span className="text-slate-600">{t('chunkSize')}</span>
  424. <span className="font-mono font-semibold text-blue-600">{chunkSize}</span>
  425. </div>
  426. <input
  427. type="range"
  428. min="50"
  429. max={limits?.maxChunkSize || 8191}
  430. value={chunkSize}
  431. onChange={(e) => handleChunkSizeChange(Number(e.target.value))}
  432. className="w-full h-2 bg-slate-200 rounded-lg appearance-none cursor-pointer accent-blue-600"
  433. disabled={!selectedEmbedding || isLoadingLimits}
  434. />
  435. <div className="flex justify-between text-[10px] text-slate-400 mt-1">
  436. <span>{t('min')}: 50</span>
  437. <span>{t('max')}: {limits?.maxChunkSize || '-'}</span>
  438. </div>
  439. </div>
  440. {/* Overlap size */}
  441. <div>
  442. <div className="flex justify-between mb-1 text-xs">
  443. <span className="text-slate-600">{t('chunkOverlap')}</span>
  444. <span className="font-mono font-semibold text-blue-600">{chunkOverlap}</span>
  445. </div>
  446. <input
  447. type="range"
  448. min={limits?.minOverlapSize || 25}
  449. max={limits?.maxOverlapSize || 200}
  450. value={chunkOverlap}
  451. onChange={(e) => handleChunkOverlapChange(Number(e.target.value))}
  452. className="w-full h-2 bg-slate-200 rounded-lg appearance-none cursor-pointer accent-blue-600"
  453. disabled={!selectedEmbedding || isLoadingLimits}
  454. />
  455. <div className="flex justify-between text-[10px] text-slate-400 mt-1">
  456. <span>{t('min')}: {limits?.minOverlapSize || 25}</span>
  457. <span>{t('max')}: {limits?.maxOverlapSize || '-'}</span>
  458. </div>
  459. </div>
  460. </div>
  461. </div>
  462. {isReconfiguring && renderLimitsInfo()}
  463. {/* Optimization tips */}
  464. {limits && (
  465. <div className="bg-amber-50/50 backdrop-blur-sm border border-amber-100 rounded-xl p-4 text-xs text-amber-900">
  466. <p className="font-bold mb-2 flex items-center gap-1.5">
  467. <span className="text-amber-500">💡</span>
  468. {t('optimizationTips')}
  469. </p>
  470. <ul className="list-disc list-inside space-y-1.5 text-[11px] text-amber-800/80">
  471. {chunkSize > 800 && <li>{t('tipChunkTooLarge')}</li>}
  472. {chunkOverlap < chunkSize * 0.1 && <li>{t('tipOverlapSmall').replace('$1', `${Math.floor(chunkSize * 0.1)}`)}</li>}
  473. {chunkSize === limits.maxChunkSize && <li>{t('tipMaxValues')}</li>}
  474. {mode === 'precise' && <li>{t('tipPreciseCost')}</li>}
  475. </ul>
  476. </div>
  477. )}
  478. </div>
  479. {/* Footer buttons */}
  480. <div className="p-6 border-t border-slate-50 bg-white flex justify-end gap-3 shrink-0">
  481. <button
  482. onClick={(e) => {
  483. e.stopPropagation();
  484. onClose();
  485. }}
  486. className="px-6 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-50 rounded-xl transition-all active:scale-95"
  487. >
  488. {t('cancel')}
  489. </button>
  490. <button
  491. onClick={async () => {
  492. if (!selectedEmbedding) {
  493. showWarning(t('selectEmbeddingFirst'));
  494. return;
  495. }
  496. if (!isReconfiguring && mode === 'precise') {
  497. // Precise mode confirmation
  498. if (!(await confirm(t('confirmPreciseCost')))) {
  499. return;
  500. }
  501. }
  502. onConfirm({
  503. chunkSize,
  504. chunkOverlap,
  505. embeddingModelId: selectedEmbedding,
  506. mode,
  507. });
  508. }}
  509. disabled={isLoadingLimits}
  510. className="px-8 py-2.5 text-sm font-bold bg-blue-600 text-white hover:bg-blue-700 rounded-xl shadow-lg shadow-blue-200 flex items-center gap-2 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed"
  511. >
  512. <ArrowRight className="w-4 h-4" />
  513. {t('startProcessing')}
  514. </button>
  515. </div>
  516. </div>
  517. </>,
  518. document.body
  519. );
  520. };
  521. export default IndexingModalWithMode;