File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
src/vs/workbench/contrib/chat
common/promptSyntax/service
test/common/promptSyntax/service Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,12 @@ export class PromptsService extends Disposable implements IPromptsService {
9696 this . promptFileByCommandCache . clear ( ) ;
9797 }
9898 else {
99- const pendingClear = [ ] ;
99+ // Clear cache for prompt files that match the changed URI
100100 for ( const [ key , value ] of this . promptFileByCommandCache ) {
101- if ( value . value ?. uri === event . uri ) {
102- pendingClear . push ( key ) ;
101+ if ( isEqual ( value . value ?. uri , event . uri ) ) {
102+ this . promptFileByCommandCache . delete ( key ) ;
103103 }
104104 }
105-
106- for ( const key of pendingClear ) {
107- this . promptFileByCommandCache . delete ( key ) ;
108- }
109105 }
110106
111107 this . onDidChangeParsedPromptFilesCacheEmitter . fire ( ) ;
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ import { Range } from '../../../../../../../editor/common/core/range.js';
1414import { ILanguageService } from '../../../../../../../editor/common/languages/language.js' ;
1515import { IModelService } from '../../../../../../../editor/common/services/model.js' ;
1616import { ModelService } from '../../../../../../../editor/common/services/modelService.js' ;
17- import { IThemeService } from '../../../../../../../platform/theme/common/themeService.js' ;
18- import { TestThemeService } from '../../../../../../../platform/theme/test/common/testThemeService.js' ;
1917import { IConfigurationService } from '../../../../../../../platform/configuration/common/configuration.js' ;
2018import { TestConfigurationService } from '../../../../../../../platform/configuration/test/common/testConfigurationService.js' ;
2119import { IExtensionDescription } from '../../../../../../../platform/extensions/common/extensions.js' ;
@@ -73,8 +71,6 @@ suite('PromptsService', () => {
7371 const fileService = disposables . add ( instaService . createInstance ( FileService ) ) ;
7472 instaService . stub ( IFileService , fileService ) ;
7573
76- // Set up model service with theme service requirement
77- instaService . stub ( IThemeService , new TestThemeService ( ) ) ;
7874 const modelService = disposables . add ( instaService . createInstance ( ModelService ) ) ;
7975 instaService . stub ( IModelService , modelService ) ;
8076 instaService . stub ( ILanguageService , {
You can’t perform that action at this time.
0 commit comments