File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/vs/workbench/contrib/chat/common/promptSyntax/service Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -96,12 +96,17 @@ export class PromptsService extends Disposable implements IPromptsService {
9696 this . promptFileByCommandCache . clear ( ) ;
9797 }
9898 else {
99- // Clear cache for prompt files that match the changed URI
99+ // Clear cache for prompt files that match the changed URI\
100+ const pendingDeletes : string [ ] = [ ] ;
100101 for ( const [ key , value ] of this . promptFileByCommandCache ) {
101102 if ( isEqual ( value . value ?. uri , event . uri ) ) {
102- this . promptFileByCommandCache . delete ( key ) ;
103+ pendingDeletes . push ( key ) ;
103104 }
104105 }
106+
107+ for ( const key of pendingDeletes ) {
108+ this . promptFileByCommandCache . delete ( key ) ;
109+ }
105110 }
106111
107112 this . onDidChangeParsedPromptFilesCacheEmitter . fire ( ) ;
You can’t perform that action at this time.
0 commit comments