fix: add copilot tests and lint fixes

This commit is contained in:
Peter Steinberger
2026-01-12 17:48:08 +00:00
parent 14801b46fc
commit e91aa0657e
9 changed files with 214 additions and 36 deletions

View File

@@ -34,7 +34,7 @@ const MOONSHOT_DEFAULT_COST = {
function normalizeApiKeyConfig(value: string): string {
const trimmed = value.trim();
const match = /^\$\{([A-Z0-9_]+)\}$/.exec(trimmed);
return match ? match[1] : trimmed;
return match?.[1] ?? trimmed;
}
function resolveEnvApiKeyVarName(provider: string): string | undefined {