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 {
117
117
}
118
118
. windowResizability ( . contentSize)
119
119
. 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
120
148
}
121
149
122
150
func setCaptureDevice( _ device: CaptureDevice ? ) {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ struct AuthTokenView: View {
18
18
}
19
19
. privacySensitive ( )
20
20
. frame ( width: 300 )
21
- Toggle ( " Use GPT-4 (access required) " , isOn: $toggleValue)
21
+ Toggle ( " Use GPT-4 (API access required) " , isOn: $toggleValue)
22
22
Button ( " Save " ) {
23
23
storedToken = tokenValue
24
24
useGPT4 = toggleValue
You can’t perform that action at this time.
0 commit comments