@@ -20,7 +20,7 @@ import { useAiBot } from "./hooks";
20
20
import { usePrev } from "../../hooks/usePrev" ;
21
21
import { HeaderButtons } from "./HeaderButtons/HeaderButtons" ;
22
22
import settings from "../../utils/settings" ;
23
- import { SaveChangesFunction , SettingsDialog } from "./SettingsDialog/SettingsDialog" ;
23
+ import { SettingsDialog } from "./SettingsDialog/SettingsDialog" ;
24
24
import { theme } from "@postgres.ai/shared/styles/theme" ;
25
25
import { colors } from "@postgres.ai/shared/styles/colors" ;
26
26
import { SettingsPanel } from "./SettingsPanel/SettingsPanel" ;
@@ -99,8 +99,6 @@ export const BotPage = (props: BotPageProps) => {
99
99
clearChat,
100
100
changeChatVisibility,
101
101
unsubscribe,
102
- model,
103
- setModel,
104
102
getDebugMessagesForWholeThread,
105
103
getChatsList,
106
104
} = useAiBot ( ) ;
@@ -109,7 +107,6 @@ export const BotPage = (props: BotPageProps) => {
109
107
110
108
const [ isChatsListVisible , setChatsListVisible ] = useState ( window ?. innerWidth > 640 ) ;
111
109
const [ isSettingsDialogVisible , setSettingsDialogVisible ] = useState ( false ) ;
112
- const [ chatVisibility , setChatVisibility ] = useState < 'public' | 'private' > ( 'public' ) ;
113
110
const [ isDebugConsoleVisible , setDebugConsoleVisible ] = useState ( false ) ;
114
111
115
112
const history = useHistory ( ) ;
@@ -152,23 +149,6 @@ export const BotPage = (props: BotPageProps) => {
152
149
history . push ( `/${ match . params . org } /bot` ) ;
153
150
}
154
151
155
- const handleSaveChatVisibility = ( value : boolean ) => {
156
- if ( match . params . threadId ) {
157
- changeChatVisibility ( match . params . threadId , value )
158
- getChatsList ( ) ;
159
- }
160
- }
161
-
162
- const handleSaveSettings : SaveChangesFunction = ( _model , _visibility ) => {
163
- if ( _model !== model ) {
164
- setModel ( _model )
165
- }
166
- if ( _visibility !== chatVisibility ) {
167
- handleSaveChatVisibility ( _visibility === 'public' )
168
- }
169
- toggleSettingsDialog ( ) ;
170
- }
171
-
172
152
const handleChatListLinkClick = ( targetThreadId : string ) => {
173
153
if ( match . params . threadId && match . params . threadId !== targetThreadId ) {
174
154
unsubscribe ( match . params . threadId )
0 commit comments