Skip to content

canSendRequest returns undefined on activation even though constent has been given #213644

Closed

Description

Testing #213552

Used Cat sample extension to test this. Please correct me if I misunderstood something

  1. Added the following code to the end of the activate method (so it runs on activation)
vscode.lm.selectChatModels({ family: 'gpt-3.5-turbo' })!.then(models => {
        if (models.length > 0) {
            const [first] = models;
            const response = context.languageModelAccessInformation.canSendRequest(first)
            console.log('Can send request:', response);
        } else {
            console.log('No chat models available');
        }
    });
  1. Run extension

    • Log: Can send request: undefined => This is expected, consent has not been given yet
  2. Send a chat message using the @cat participant (@cat Hello World)

    • Consent is requested => Accept
  3. Restart the extension

    • 🐍 Log: Can send request: undefined

Consent has been given by now, so the expected response would be true?
When sending another @cat Hello World message, consent is not requested again.

Activity

  1. jrieken commented on May 28, 2024

    @jrieken
    Contributor

    Nice find!

  2. vscodenpa commented on May 29, 2024

    @vscodenpa

    Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha, or directly add the insiders-released label if you know this has already been releaased

  3. added
    unreleasedPatch has not yet been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on May 29, 2024
  4. locked and limited conversation to collaborators on Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugchatverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions