Skip to content

Commit

Permalink
fix: avoid prompt template directory error
Browse files Browse the repository at this point in the history
The prompt customization service tried to access the prompt template
directory even if it did not exist (yet). This case is now checked.

Fixes #14367
  • Loading branch information
sdirix committed Nov 8, 2024
1 parent c7a1f49 commit 13a76ef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class FrontendPromptCustomizationServiceImpl implements PromptCustomizati
}));

this.onDidChangeCustomAgentsEmitter.fire();

if (!(await this.fileService.exists(templateURI))) {
return;
}
const stat = await this.fileService.resolve(templateURI);
if (stat.children === undefined) {
return;
Expand Down

0 comments on commit 13a76ef

Please sign in to comment.