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

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

Closed
benibenj opened this issue May 28, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug chat verified Verification succeeded
Milestone

Comments

@benibenj
Copy link
Contributor

benibenj commented May 28, 2024

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.

@jrieken jrieken added this to the May 2024 milestone May 28, 2024
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug chat labels May 28, 2024
@jrieken
Copy link
Member

jrieken commented May 28, 2024

Nice find!

jrieken added a commit that referenced this issue May 29, 2024
jrieken added a commit that referenced this issue May 29, 2024
@jrieken jrieken closed this as completed May 29, 2024
@benibenj benibenj added the unreleased Patch has not yet been released in VS Code Insiders label May 29, 2024
@vscodenpa vscodenpa removed the unreleased Patch has not yet been released in VS Code Insiders label May 29, 2024
@vscodenpa
Copy link

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

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 29, 2024
@benibenj benibenj added the verified Verification succeeded label May 30, 2024
@microsoft microsoft locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug chat verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants