Skip to content

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

@benibenj

Description

@benibenj

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.

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