File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,10 @@ export class CustomModesManager {
545545
546546 // Clear cache when modes are deleted
547547 this . clearCache ( )
548+
549+ // Add a small delay to ensure file operations are complete before refreshing UI
550+ await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
551+
548552 await this . refreshMergedState ( )
549553 } )
550554 } catch ( error ) {
@@ -1069,6 +1073,12 @@ export class CustomModesManager {
10691073 source : "global" ,
10701074 }
10711075 addsForSettings . push ( modeToAdd )
1076+ // Add a corresponding update entry for the settings file
1077+ const settingsPath = await this . getCustomModesFilePath ( )
1078+ if ( ! updatesByFile . has ( settingsPath ) ) {
1079+ updatesByFile . set ( settingsPath , [ ] )
1080+ }
1081+ updatesByFile . get ( settingsPath ) ! . push ( update )
10721082 continue
10731083 }
10741084 console . warn ( `Mode not found: ${ update . slug } ` )
You can’t perform that action at this time.
0 commit comments