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 authored Nov 8, 2024
1 parent 527d278 commit 6c76b44
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 6c76b44

Please sign in to comment.