Move AI document parsing toggle from Config to Filtering tab
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m9s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m9s
Removes duplicate: the setting was in Config tab (General Settings) AND inside Advanced Settings in the Filtering tab. Now it lives only in the Filtering tab as a prominent standalone toggle, since it's directly related to AI filtering behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1824,24 +1824,6 @@ export default function RoundDetailPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between p-4 rounded-md">
|
||||
<div className="space-y-0.5">
|
||||
<Label htmlFor="ai-parse-files" className="text-sm font-medium">
|
||||
AI document parsing
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Allow AI to read the contents of uploaded files (PDF/text) for deeper analysis during filtering and evaluation
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="ai-parse-files"
|
||||
checked={!!config.aiParseFiles}
|
||||
onCheckedChange={(checked) => {
|
||||
handleConfigChange({ ...config, aiParseFiles: checked })
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="border-t mt-2 pt-4 px-4 pb-2 bg-[#053d57]/[0.03] rounded-b-lg -mx-6 -mb-6 p-6">
|
||||
<Label className="text-sm font-medium">Advancement Targets</Label>
|
||||
<p className="text-xs text-muted-foreground mb-3">
|
||||
|
||||
@@ -116,6 +116,15 @@ export function FilteringDashboard({ competitionId, roundId }: FilteringDashboar
|
||||
const utils = trpc.useUtils()
|
||||
|
||||
// -- Queries --
|
||||
const { data: round } = trpc.round.getById.useQuery({ id: roundId })
|
||||
const roundConfig = (round?.configJson as Record<string, unknown>) ?? {}
|
||||
const aiParseFiles = !!roundConfig.aiParseFiles
|
||||
|
||||
const updateRoundMutation = trpc.round.update.useMutation({
|
||||
onSuccess: () => utils.round.getById.invalidate({ id: roundId }),
|
||||
onError: (err) => toast.error(err.message),
|
||||
})
|
||||
|
||||
const { data: latestJob } = trpc.filtering.getLatestJob.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: pollingJobId ? 3_000 : 15_000 },
|
||||
@@ -525,6 +534,29 @@ export function FilteringDashboard({ competitionId, roundId }: FilteringDashboar
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
||||
{/* AI Document Parsing — prominent toggle */}
|
||||
<div className="flex items-center justify-between rounded-lg border p-3">
|
||||
<div className="space-y-0.5">
|
||||
<Label htmlFor="ai-parse-files-filter" className="text-sm font-medium">
|
||||
AI document parsing
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Allow AI to read uploaded file contents (PDF/text) for deeper analysis
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="ai-parse-files-filter"
|
||||
checked={aiParseFiles}
|
||||
disabled={updateRoundMutation.isPending}
|
||||
onCheckedChange={(checked) => {
|
||||
updateRoundMutation.mutate({
|
||||
id: roundId,
|
||||
configJson: { ...roundConfig, aiParseFiles: checked },
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Job Progress */}
|
||||
{isRunning && activeJob && (
|
||||
<div className="space-y-2 pt-3 border-t">
|
||||
|
||||
Reference in New Issue
Block a user