Spaces:
Paused
Paused
Soham Waghmare
commited on
Commit
·
645950d
1
Parent(s):
88139f0
feat: add depth, breadth and num_sites parameters.
Browse files
frontend/src/components/ResearchControls.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
|
|
| 4 |
import { Separator } from "@/components/ui/separator";
|
| 5 |
import { ResearchOptions } from "@/lib/types";
|
| 6 |
import React from "react";
|
|
|
|
| 7 |
|
| 8 |
interface ResearchControlsProps {
|
| 9 |
options: ResearchOptions;
|
|
@@ -50,6 +51,45 @@ const ResearchControls: React.FC<ResearchControlsProps> = ({ options, onOptionCh
|
|
| 50 |
|
| 51 |
<Separator />
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
<div className="space-y-3">
|
| 54 |
<Label>Coming Soon</Label>
|
| 55 |
<div className="flex items-center space-x-2">
|
|
@@ -70,4 +110,4 @@ const ResearchControls: React.FC<ResearchControlsProps> = ({ options, onOptionCh
|
|
| 70 |
);
|
| 71 |
};
|
| 72 |
|
| 73 |
-
export default ResearchControls;
|
|
|
|
| 4 |
import { Separator } from "@/components/ui/separator";
|
| 5 |
import { ResearchOptions } from "@/lib/types";
|
| 6 |
import React from "react";
|
| 7 |
+
import { Input } from "@/components/ui/input"; // Make sure you have an Input component
|
| 8 |
|
| 9 |
interface ResearchControlsProps {
|
| 10 |
options: ResearchOptions;
|
|
|
|
| 51 |
|
| 52 |
<Separator />
|
| 53 |
|
| 54 |
+
<div className="space-y-3">
|
| 55 |
+
<Label>Settings</Label>
|
| 56 |
+
|
| 57 |
+
<div className="space-y-2">
|
| 58 |
+
<Label htmlFor="max-depth">Max Depth</Label>
|
| 59 |
+
<Input
|
| 60 |
+
type="number"
|
| 61 |
+
id="max-depth"
|
| 62 |
+
value={options.max_depth}
|
| 63 |
+
onChange={(e) => onOptionChange({ ...options, max_depth: parseInt(e.target.value, 10) })}
|
| 64 |
+
className="w-full"
|
| 65 |
+
/>
|
| 66 |
+
</div>
|
| 67 |
+
|
| 68 |
+
<div className="space-y-2">
|
| 69 |
+
<Label htmlFor="max-breadth">Max Breadth</Label>
|
| 70 |
+
<Input
|
| 71 |
+
type="number"
|
| 72 |
+
id="max-breadth"
|
| 73 |
+
value={options.max_breadth}
|
| 74 |
+
onChange={(e) => onOptionChange({ ...options, max_breadth: parseInt(e.target.value, 10) })}
|
| 75 |
+
className="w-full"
|
| 76 |
+
/>
|
| 77 |
+
</div>
|
| 78 |
+
|
| 79 |
+
<div className="space-y-2">
|
| 80 |
+
<Label htmlFor="num-sites-per-query">Number of Sites per Query</Label>
|
| 81 |
+
<Input
|
| 82 |
+
type="number"
|
| 83 |
+
id="num-sites-per-query"
|
| 84 |
+
value={options.num_sites_per_query}
|
| 85 |
+
onChange={(e) => onOptionChange({ ...options, num_sites_per_query: parseInt(e.target.value, 10) })}
|
| 86 |
+
className="w-full"
|
| 87 |
+
/>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
|
| 91 |
+
<Separator />
|
| 92 |
+
|
| 93 |
<div className="space-y-3">
|
| 94 |
<Label>Coming Soon</Label>
|
| 95 |
<div className="flex items-center space-x-2">
|
|
|
|
| 110 |
);
|
| 111 |
};
|
| 112 |
|
| 113 |
+
export default ResearchControls;
|