Commit fd4c064
Eric Wheeler
fix: allow auto-approve checkbox to be toggled at any time
During model responses, users need the ability to disable auto-approval
for safety when they realize the model is about to perform unintended
actions. The checkbox was previously disabled when no options were
selected or when the menu was open, preventing users from turning off
auto-approval when needed most.
- Remove disabled state from main auto-approve checkbox
- Simplify toggle logic to always allow state changes
- Add memoization to reduce unnecessary re-renders that cause flickering
- Update tests to reflect new always-enabled behavior
This ensures users can always disable auto-approval for safety,
especially during time-critical situations when the model is actively
responding.
Fixes: #6060
Signed-off-by: Eric Wheeler <[email protected]>1 parent 2f4d833 commit fd4c064
File tree
2 files changed
+11
-17
lines changed- webview-ui/src/components/chat
- __tests__
2 files changed
+11
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
| |||
178 | 173 | | |
179 | 174 | | |
180 | 175 | | |
181 | | - | |
182 | 176 | | |
183 | 177 | | |
184 | 178 | | |
185 | 179 | | |
186 | 180 | | |
187 | 181 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
194 | 185 | | |
195 | 186 | | |
196 | 187 | | |
| |||
290 | 281 | | |
291 | 282 | | |
292 | 283 | | |
293 | | - | |
| 284 | + | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
0 commit comments