@@ -7,8 +7,7 @@ import { useForm, FormProvider } from "react-hook-form"
77import { zodResolver } from "@hookform/resolvers/zod"
88import fuzzysort from "fuzzysort"
99import { toast } from "sonner"
10- import { X , Rocket , Check , ChevronsUpDown , HardDriveUpload , CircleCheck } from "lucide-react"
11- import { Dialog , DialogContent , DialogTitle , DialogFooter } from "@/components/ui/dialog"
10+ import { X , Rocket , Check , ChevronsUpDown , SlidersHorizontal , Book , CircleCheck } from "lucide-react"
1211
1312import { globalSettingsSchema , providerSettingsSchema , rooCodeDefaults } from "@evals/types"
1413
@@ -46,6 +45,10 @@ import {
4645 PopoverTrigger ,
4746 ScrollArea ,
4847 Slider ,
48+ Dialog ,
49+ DialogContent ,
50+ DialogTitle ,
51+ DialogFooter ,
4952} from "@/components/ui"
5053
5154import { SettingsDiff } from "./settings-diff"
@@ -292,7 +295,7 @@ export function NewRun() {
292295 type = "button"
293296 variant = "secondary"
294297 onClick = { ( ) => document . getElementById ( "json-upload" ) ?. click ( ) } >
295- < HardDriveUpload />
298+ < SlidersHorizontal />
296299 Import Settings
297300 </ Button >
298301 < input
@@ -320,8 +323,23 @@ export function NewRun() {
320323 </ FormItem >
321324
322325 < Button type = "button" variant = "secondary" onClick = { ( ) => setSystemPromptDialogOpen ( true ) } >
323- Import Foot Gun System Prompt
326+ < Book />
327+ Override System Prompt
324328 </ Button >
329+
330+ < Dialog open = { systemPromptDialogOpen } onOpenChange = { setSystemPromptDialogOpen } >
331+ < DialogContent >
332+ < DialogTitle > Override System Prompt</ DialogTitle >
333+ < Textarea
334+ ref = { systemPromptRef }
335+ value = { systemPrompt }
336+ onChange = { ( e ) => setSystemPrompt ( e . target . value ) }
337+ />
338+ < DialogFooter >
339+ < Button onClick = { ( ) => setSystemPromptDialogOpen ( false ) } > Done</ Button >
340+ </ DialogFooter >
341+ </ DialogContent >
342+ </ Dialog >
325343 </ div >
326344
327345 < FormField
@@ -397,27 +415,13 @@ export function NewRun() {
397415 </ div >
398416 </ form >
399417 </ FormProvider >
418+
400419 < Button
401420 variant = "default"
402421 className = "absolute top-4 right-12 size-12 rounded-full"
403422 onClick = { ( ) => router . push ( "/" ) } >
404423 < X className = "size-6" />
405424 </ Button >
406- < Dialog open = { systemPromptDialogOpen } onOpenChange = { setSystemPromptDialogOpen } >
407- < DialogContent >
408- < DialogTitle > Import Foot Gun System Prompt</ DialogTitle >
409- < textarea
410- ref = { systemPromptRef }
411- value = { systemPrompt }
412- onChange = { ( e ) => setSystemPrompt ( e . target . value ) }
413- placeholder = "Paste or type your system prompt here..."
414- className = "w-full min-h-[120px] border rounded p-2"
415- />
416- < DialogFooter >
417- < Button onClick = { ( ) => setSystemPromptDialogOpen ( false ) } > Done</ Button >
418- </ DialogFooter >
419- </ DialogContent >
420- </ Dialog >
421425 </ >
422426 )
423427}
0 commit comments