File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,26 @@ export default async function doLoadConfig(options: {
219
219
}
220
220
} ) ;
221
221
222
+ const ruleCounts : Record < string , number > = { } ;
223
+ newConfig . rules . forEach ( ( rule ) => {
224
+ if ( rule . name ) {
225
+ if ( ruleCounts [ rule . name ] ) {
226
+ ruleCounts [ rule . name ] = ruleCounts [ rule . name ] + 1 ;
227
+ } else {
228
+ ruleCounts [ rule . name ] = 1 ;
229
+ }
230
+ }
231
+ } ) ;
232
+
233
+ Object . entries ( ruleCounts ) . forEach ( ( [ ruleName , count ] ) => {
234
+ if ( count > 1 ) {
235
+ errors ! . push ( {
236
+ fatal : false ,
237
+ message : `Duplicate (${ count } ) rules named "${ ruleName } " detected. This may cause unexpected behavior` ,
238
+ } ) ;
239
+ }
240
+ } ) ;
241
+
222
242
newConfig . allowAnonymousTelemetry =
223
243
newConfig . allowAnonymousTelemetry && ( await ide . isTelemetryEnabled ( ) ) ;
224
244
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const uiSlice = createSlice({
56
56
[ BuiltInToolNames . ViewDiff ] : "allowedWithoutPermission" ,
57
57
[ BuiltInToolNames . LSTool ] : "allowedWithoutPermission" ,
58
58
[ BuiltInToolNames . CreateRuleBlock ] : "allowedWithPermission" ,
59
- [ BuiltInToolNames . RequestRule ] : "allowedWithPermission " ,
59
+ [ BuiltInToolNames . RequestRule ] : "disabled " ,
60
60
} ,
61
61
toolGroupSettings : {
62
62
[ BUILT_IN_GROUP_NAME ] : "include" ,
You can’t perform that action at this time.
0 commit comments