Skip to content

Conversation

@aeschli
Copy link
Contributor

@aeschli aeschli commented Jan 30, 2026

For #277642

Copilot AI review requested due to automatic review settings January 30, 2026 16:35
@aeschli aeschli enabled auto-merge (squash) January 30, 2026 16:35
@aeschli aeschli self-assigned this Jan 30, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Jan 30, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a validation issue where the excludeAgent attribute in instruction files was only accepting arrays, but GitHub's documentation indicates it should also accept strings. The fix updates the validation logic to accept both types.

Changes:

  • Modified the type validation for excludeAgent attribute to accept both string and array types
  • Updated the error message to reflect that either string or array is acceptable

if (attribute.value.type !== 'array') {
report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be an array."), attribute.value.range, MarkerSeverity.Error));
if (attribute.value.type !== 'array' && attribute.value.type !== 'string') {
report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be an string or array."), attribute.value.range, MarkerSeverity.Error));
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Grammar error in the error message. The article "an" should be "a" before "string" since "string" starts with a consonant sound.

Suggested change
report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be an string or array."), attribute.value.range, MarkerSeverity.Error));
report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be a string or array."), attribute.value.range, MarkerSeverity.Error));

Copilot uses AI. Check for mistakes.
@aeschli aeschli merged commit f9cc5a2 into main Jan 30, 2026
27 of 28 checks passed
@aeschli aeschli deleted the aeschli/emotional-crayfish-690 branch January 30, 2026 17:01
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.

3 participants