chore: backup before code cleanup
Backup commit before executing remove-unused-code proposal. This includes all pending changes and new features. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,10 +14,11 @@ import PreprocessingSettings from '@/components/PreprocessingSettings'
|
||||
import PreprocessingPreview from '@/components/PreprocessingPreview'
|
||||
import TableDetectionSelector from '@/components/TableDetectionSelector'
|
||||
import ProcessingTrackSelector from '@/components/ProcessingTrackSelector'
|
||||
import OCRPresetSelector from '@/components/OCRPresetSelector'
|
||||
import TaskNotFound from '@/components/TaskNotFound'
|
||||
import { useTaskValidation } from '@/hooks/useTaskValidation'
|
||||
import { useTaskStore, useProcessingState } from '@/store/taskStore'
|
||||
import type { LayoutModel, ProcessingOptions, PreprocessingMode, PreprocessingConfig, TableDetectionConfig, ProcessingTrack } from '@/types/apiV2'
|
||||
import type { LayoutModel, ProcessingOptions, PreprocessingMode, PreprocessingConfig, TableDetectionConfig, ProcessingTrack, OCRPreset, OCRConfig } from '@/types/apiV2'
|
||||
|
||||
export default function ProcessingPage() {
|
||||
const { t } = useTranslation()
|
||||
@@ -65,6 +66,10 @@ export default function ProcessingPage() {
|
||||
// Processing track override state (null = use system recommendation)
|
||||
const [forceTrack, setForceTrack] = useState<ProcessingTrack | null>(null)
|
||||
|
||||
// OCR Preset state (default to 'datasheet' for best balance)
|
||||
const [ocrPreset, setOcrPreset] = useState<OCRPreset>('datasheet')
|
||||
const [ocrConfig, setOcrConfig] = useState<OCRConfig>({})
|
||||
|
||||
// Analyze document to determine if OCR is needed (only for pending tasks)
|
||||
const { data: documentAnalysis, isLoading: isAnalyzing } = useQuery({
|
||||
queryKey: ['documentAnalysis', taskId],
|
||||
@@ -96,6 +101,8 @@ export default function ProcessingPage() {
|
||||
preprocessing_mode: preprocessingMode,
|
||||
preprocessing_config: preprocessingMode === 'manual' ? preprocessingConfig : undefined,
|
||||
table_detection: tableDetectionConfig,
|
||||
ocr_preset: ocrPreset,
|
||||
ocr_config: ocrPreset === 'custom' ? ocrConfig : undefined,
|
||||
}
|
||||
|
||||
// Update TaskStore processing state
|
||||
@@ -441,6 +448,15 @@ export default function ProcessingPage() {
|
||||
{/* OCR Track Options - Only show when document needs OCR */}
|
||||
{needsOcrTrack && !isAnalyzing && (
|
||||
<>
|
||||
{/* OCR Processing Preset - Primary selection */}
|
||||
<OCRPresetSelector
|
||||
value={ocrPreset}
|
||||
onChange={setOcrPreset}
|
||||
customConfig={ocrConfig}
|
||||
onCustomConfigChange={setOcrConfig}
|
||||
disabled={processOCRMutation.isPending}
|
||||
/>
|
||||
|
||||
{/* Layout Model Selection */}
|
||||
<LayoutModelSelector
|
||||
value={layoutModel}
|
||||
|
||||
Reference in New Issue
Block a user