feat: add ranking criteria textarea + auto-rank toggle to evaluation config UI
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m11s
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m11s
The backend reads rankingCriteria from configJson but there was no UI field to set it. Adds a Textarea and autoRankEnabled switch to the AI Features card in the evaluation round config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
|
||||
|
||||
type EvaluationConfigProps = {
|
||||
@@ -219,6 +220,35 @@ export function EvaluationConfig({ config, onChange }: EvaluationConfigProps) {
|
||||
onCheckedChange={(v) => update('generateAiShortlist', v)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="pt-2 border-t space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<Label htmlFor="autoRankEnabled">AI Ranking</Label>
|
||||
<p className="text-xs text-muted-foreground">Rank projects using AI when all evaluations are complete</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="autoRankEnabled"
|
||||
checked={(config.autoRankEnabled as boolean) ?? false}
|
||||
onCheckedChange={(v) => update('autoRankEnabled', v)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="rankingCriteria">Ranking Criteria</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Natural-language criteria the AI uses to rank projects. E.g. "Prioritize innovation and ocean impact. Weight jury scores 60%, feasibility 40%."
|
||||
</p>
|
||||
<Textarea
|
||||
id="rankingCriteria"
|
||||
rows={4}
|
||||
placeholder="Describe how projects should be ranked..."
|
||||
value={(config.rankingCriteria as string) ?? ''}
|
||||
onChange={(e) => update('rankingCriteria', e.target.value)}
|
||||
className="resize-y"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user