fix: use Promise.all instead of Promise.allSettled to propagate errors
This commit is contained in:
parent
9080d5b5b4
commit
8747c5f528
1 changed files with 7 additions and 8 deletions
|
|
@ -359,14 +359,13 @@ export class ConfigHandler {
|
|||
|
||||
if (options.includeWorkspace) {
|
||||
const yamlOptions = { ...options, fileExtType: "yaml" } as const;
|
||||
const results = await Promise.allSettled([
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "assistants"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "agents"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "configs"),
|
||||
]);
|
||||
const allFiles = results
|
||||
.filter((r) => r.status === "fulfilled")
|
||||
.flatMap((r) => r.value);
|
||||
const allFiles = (
|
||||
await Promise.all([
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "assistants"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "agents"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "configs"),
|
||||
])
|
||||
).flat();
|
||||
const profiles = allFiles.map((assistant) => {
|
||||
return new LocalProfileLoader(
|
||||
this.ide,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue