Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCODE-640: Adapt message content access to latest vscode API #857

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

nirinchev
Copy link
Contributor

Description

microsoft/vscode#231788 changes the content field type of LanguageModelChatMessage. This means that in insiders builds, we're seeing exceptions/test failures due to us assuming the content will always be a string. Since the type definitions haven't been updated to account for this breaking change, this PR takes a somewhat hacky approach of casting the content to any and then testing for string or array.

Checklist

  • New tests and/or benchmarks are included

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

.vscode/launch.json Outdated Show resolved Hide resolved
Copy link
Contributor

@alenakhineika alenakhineika left a comment

Choose a reason for hiding this comment

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

Thx for taking care of this!

@nirinchev nirinchev merged commit cace4df into main Oct 24, 2024
5 checks passed
@nirinchev nirinchev deleted the ni/content-length-changes branch October 24, 2024 09:39
nirinchev added a commit that referenced this pull request Oct 24, 2024
* main:
  VSCODE-640: Adapt message content access to latest vscode API (#857)
  Update changelog (#856)
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.

2 participants