IndexingModalWithMode.tsx 22 KB

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