|
1 | 1 | import { Checkbox, Button, Input, VStack, Text, Link, HStack, Box, Divider, AbsoluteCenter, Stack, Switch, Textarea, Radio, RadioGroup, IconButton, Icon, Tag, TagLabel, Badge } from '@chakra-ui/react'; |
2 | 2 | import React, { useEffect, useState } from 'react'; |
3 | 3 | import { dispatch, logoutState, resetState } from '../../state/dispatch'; |
4 | | -import { updateIsLocal, updateIsDevToolsOpen, updateUploadLogs, updateDevToolsTabName, DevToolsTabName, setConfirmChanges, setDemoMode, setDRMode, setGroupsEnabled, setModelsMode, setViewAllCatalogs, setEnableHighlightHelpers, setUseMemory } from '../../state/settings/reducer'; |
| 4 | +import { updateIsLocal, updateIsDevToolsOpen, updateUploadLogs, updateDevToolsTabName, DevToolsTabName, setConfirmChanges, setDemoMode, setDRMode, setGroupsEnabled, setModelsMode, setViewAllCatalogs, setEnableHighlightHelpers, setUseMemory, setEnableStyleCustomization } from '../../state/settings/reducer'; |
5 | 5 | import { useSelector } from 'react-redux'; |
6 | 6 | import { RootState } from '../../state/store'; |
7 | 7 | import { configs } from '../../constants'; |
@@ -70,6 +70,7 @@ const SettingsPage = () => { |
70 | 70 | const thread = useSelector((state: RootState) => state.chat.activeThread) |
71 | 71 | const activeThread = useSelector((state: RootState) => state.chat.threads[thread]) |
72 | 72 | const useMemory = useSelector((state: RootState) => state.settings.useMemory) |
| 73 | + const enableStyleCustomization = useSelector((state: RootState) => state.settings.enableStyleCustomization) |
73 | 74 |
|
74 | 75 | const reloadBillingInfo = async () => { |
75 | 76 | await getBillingInfo().then((billingInfo) => { |
@@ -124,6 +125,9 @@ const SettingsPage = () => { |
124 | 125 | const updateUseMemory = (value: boolean) => { |
125 | 126 | dispatch(setUseMemory(value)) |
126 | 127 | } |
| 128 | + const updateEnableStyleCustomization = (value: boolean) => { |
| 129 | + dispatch(setEnableStyleCustomization(value)) |
| 130 | + } |
127 | 131 |
|
128 | 132 | // const CURRENT_ACTION_TESTS = ACTION_TESTS[tool]; |
129 | 133 | return ( |
@@ -208,6 +212,10 @@ const SettingsPage = () => { |
208 | 212 | <Text color={"minusxBW.800"} fontSize="sm">Use Memory</Text> |
209 | 213 | <Switch color={"minusxBW.800"} colorScheme='minusxGreen' size='md' isChecked={useMemory} onChange={(e) => updateUseMemory(e.target.checked)} /> |
210 | 214 | </HStack> |
| 215 | + <HStack justifyContent={"space-between"}> |
| 216 | + <Text color={"minusxBW.800"} fontSize="sm">Style Customization</Text> |
| 217 | + <Switch color={"minusxBW.800"} colorScheme='minusxGreen' size='md' isChecked={enableStyleCustomization} onChange={(e) => updateEnableStyleCustomization(e.target.checked)} /> |
| 218 | + </HStack> |
211 | 219 | </VStack> |
212 | 220 | </SettingsBlock> |
213 | 221 | <SettingsBlock title="Privacy"> |
|
0 commit comments