File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
web/src/app/chat/components/input Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,11 @@ function MCPToolsList({
268
268
? disabledToolIds . filter ( ( id ) => id !== toolId )
269
269
: [ ...disabledToolIds , toolId ] ,
270
270
} ) ;
271
+
272
+ // If we're disabling a tool that is currently forced, remove it from forced tools
273
+ if ( ! disabled && forcedToolIds . includes ( toolId ) ) {
274
+ setForcedToolIds ( forcedToolIds . filter ( ( id ) => id !== toolId ) ) ;
275
+ }
271
276
} ;
272
277
273
278
const toggleForcedTool = ( toolId : number ) => {
@@ -427,6 +432,11 @@ export function ActionToggle({ selectedAssistant }: ActionToggleProps) {
427
432
? disabledToolIds . filter ( ( id ) => id !== toolId )
428
433
: [ ...disabledToolIds , toolId ] ,
429
434
} ) ;
435
+
436
+ // If we're disabling a tool that is currently forced, remove it from forced tools
437
+ if ( ! disabled && forcedToolIds . includes ( toolId ) ) {
438
+ setForcedToolIds ( forcedToolIds . filter ( ( id ) => id !== toolId ) ) ;
439
+ }
430
440
} ;
431
441
432
442
const toggleForcedTool = ( toolId : number ) => {
You can’t perform that action at this time.
0 commit comments