Elffuss BraidHub

kikocis/continue public

4ba7cb950120 路 2.1 KiBRawPermalink
1import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
2import ToggleSwitch from "../../components/gui/Switch";
3import { ToolTip } from "../../components/gui/Tooltip";
4interface ContinueFeaturesMenuProps {
5 logEditingData: boolean;
6 handleLogEditingDataToggle: (value: boolean) => void;
7 optInNextEditFeature: boolean;
8 handleOptInNextEditToggle: (value: boolean) => void;
9 enableStaticContextualization: boolean;
10 handleEnableStaticContextualizationToggle: (value: boolean) => void;
11}
12
13export function ContinueFeaturesMenu({
14 logEditingData,
15 handleLogEditingDataToggle,
16 optInNextEditFeature,
17 handleOptInNextEditToggle,
18 enableStaticContextualization,
19 handleEnableStaticContextualizationToggle,
20}: ContinueFeaturesMenuProps) {
21 return (
22 <div className="flex w-full flex-col gap-y-4">
23 <div className="my-2 text-center text-xs font-medium text-slate-400">
24 馃毀 INTERNAL SETTINGS 馃毀
25 </div>
26 <div className="flex w-full flex-col gap-y-4">
27 <ToggleSwitch
28 isToggled={logEditingData}
29 onToggle={() => handleLogEditingDataToggle(!logEditingData)}
30 text="Log Editing Data"
31 showIfToggled={
32 <>
33 <ExclamationTriangleIcon
34 data-tooltip-id={`auto-accept-diffs-warning-tooltip`}
35 className="h-3 w-3 text-yellow-500"
36 />
37 <ToolTip id={`auto-accept-diffs-warning-tooltip`}>
38 {`Only turn this on if you want to log your editing processes in addition to the normal dev data. Note that this will store a lot of data.`}
39 </ToolTip>
40 </>
41 }
42 />
43
44 <ToggleSwitch
45 isToggled={optInNextEditFeature}
46 onToggle={() => handleOptInNextEditToggle(!optInNextEditFeature)}
47 text="Enable Next Edit Over Autocomplete"
48 />
49
50 <ToggleSwitch
51 isToggled={enableStaticContextualization}
52 onToggle={() =>
53 handleEnableStaticContextualizationToggle(
54 !enableStaticContextualization,
55 )
56 }
57 text="Use Static Contextualization"
58 />
59 </div>
60 </div>
61 );
62}