From 9d21b67ef36ec0ce5fb5c5b42322bc2e67238088 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Sep 2025 08:50:52 -0700 Subject: [PATCH 1/3] fix: don't fail on non-fatal errors --- extensions/cli/src/configLoader.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts index 79e3cc9f3..1f0f998cc 100644 --- a/extensions/cli/src/configLoader.ts +++ b/extensions/cli/src/configLoader.ts @@ -373,8 +373,9 @@ async function loadAssistantSlug( }); const result = resp.configResult; - if (result.errors?.length || !result.config) { - throw new Error(result.errors?.join("\n") ?? "Failed to load assistant."); + const errors = result.errors; + if (errors?.some((e: any) => e.fatal)) { + throw new Error(errors.map((e: any) => e.message).join("\n") ?? "Failed to load assistant."); } return result.config as AssistantUnrolled; From 73848d554f6ad5fca57a7876d2738143246e576d Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Sep 2025 08:51:51 -0700 Subject: [PATCH 2/3] fix: similar fix --- extensions/cli/src/configLoader.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts index 1f0f998cc..32e1b1237 100644 --- a/extensions/cli/src/configLoader.ts +++ b/extensions/cli/src/configLoader.ts @@ -229,9 +229,15 @@ async function loadUserAssistantWithFallback( if (assistants.length > 0) { const result = assistants[0].configResult; - if (result.errors?.length || !result.config) { + if (!result.config) { throw new Error(result.errors?.join("\n") ?? "Failed to load assistant."); } + + const errors = result.errors; + if (errors?.some((e: any) => e.fatal)) { + throw new Error(errors.map((e: any) => e.message).join("\n") ?? "Failed to load assistant."); + } + return result.config as AssistantUnrolled; } From 47593204d29a3abe3a760a00416f5c66f4755987 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Sep 2025 08:52:28 -0700 Subject: [PATCH 3/3] chore: format --- extensions/cli/src/configLoader.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts index 32e1b1237..3fe00fd21 100644 --- a/extensions/cli/src/configLoader.ts +++ b/extensions/cli/src/configLoader.ts @@ -232,10 +232,13 @@ async function loadUserAssistantWithFallback( if (!result.config) { throw new Error(result.errors?.join("\n") ?? "Failed to load assistant."); } - + const errors = result.errors; if (errors?.some((e: any) => e.fatal)) { - throw new Error(errors.map((e: any) => e.message).join("\n") ?? "Failed to load assistant."); + throw new Error( + errors.map((e: any) => e.message).join("\n") ?? + "Failed to load assistant.", + ); } return result.config as AssistantUnrolled; @@ -381,7 +384,10 @@ async function loadAssistantSlug( const result = resp.configResult; const errors = result.errors; if (errors?.some((e: any) => e.fatal)) { - throw new Error(errors.map((e: any) => e.message).join("\n") ?? "Failed to load assistant."); + throw new Error( + errors.map((e: any) => e.message).join("\n") ?? + "Failed to load assistant.", + ); } return result.config as AssistantUnrolled;