Skip to content

feat: allow writing evals.json for config - #404

Open
tbuckley wants to merge 1 commit into
mainfrom
add-json-configs
Open

feat: allow writing evals.json for config#404
tbuckley wants to merge 1 commit into
mainfrom
add-json-configs

Conversation

@tbuckley

Copy link
Copy Markdown
Owner

No description provided.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: JSON Errors Misreported as YAML

When parsing JSON configuration files, errors are incorrectly reported as "Invalid YAML". The getConfig method's error handling logic is designed for YAML-specific errors, causing JSON parsing failures to fall through to a generic message that hardcodes "Invalid YAML". Consequently, JSON errors also lack detailed line-specific information.

src/lib/storage/FileSystemEvalsStorage.ts#L100-L110

}
} catch (err) {
if (err instanceof yaml.YAMLParseError) {
if (text && err.linePos) {
const line = text.split('\n')[err.linePos[0].line - 1];
const error = `Line ${err.linePos[0].line}: ${line}`;
throw new UiError({ type: 'invalid-config', errors: [error] });
}
}
throw new UiError({ type: 'invalid-config', errors: ['Invalid YAML'] });
}

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant