File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,34 @@ struct CheetahApp: App {
117117 }
118118 . windowResizability ( . contentSize)
119119 . windowStyle ( . hiddenTitleBar)
120+ . commands {
121+ CommandGroup ( replacing: . appSettings) {
122+ Button ( action: {
123+ viewModel. authToken = nil
124+ resetAfterSettingsChanged ( )
125+ } ) {
126+ Text ( " Change API Key… " )
127+ }
128+ Button ( action: {
129+ if viewModel. useGPT4 == true {
130+ viewModel. useGPT4 = false
131+ } else {
132+ viewModel. useGPT4 = true
133+ }
134+ resetAfterSettingsChanged ( )
135+ } ) {
136+ Text ( " Use GPT-4 " )
137+ if viewModel. useGPT4 == true {
138+ Image ( systemName: " checkmark " )
139+ }
140+ }
141+ }
142+ }
143+ }
144+
145+ func resetAfterSettingsChanged( ) {
146+ viewModel. selectedDevice = nil
147+ viewModel. analyzer = nil
120148 }
121149
122150 func setCaptureDevice( _ device: CaptureDevice ? ) {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ struct AuthTokenView: View {
1818 }
1919 . privacySensitive ( )
2020 . frame ( width: 300 )
21- Toggle ( " Use GPT-4 (access required) " , isOn: $toggleValue)
21+ Toggle ( " Use GPT-4 (API access required) " , isOn: $toggleValue)
2222 Button ( " Save " ) {
2323 storedToken = tokenValue
2424 useGPT4 = toggleValue
You can’t perform that action at this time.
0 commit comments