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

Allow an extension to add a file to the chat context #239703

Open
DanaMartens opened this issue Feb 5, 2025 · 0 comments
Open

Allow an extension to add a file to the chat context #239703

DanaMartens opened this issue Feb 5, 2025 · 0 comments
Assignees

Comments

@DanaMartens
Copy link

Type: Feature Request

I need a way to programatically add a file to the chat context. For example, if a user right-clicks on text for an embedded image in a document and chooses a Suggest Alt Text command, I want to retrieve the image and use the visiona capability to suggest alt-text based on what is seen in the image. When I ask GitHub Copilot if this is possible, it suggests the following but it doesn’t work:

    await vscode.commands.executeCommand("workbench.action.chat.addFileToContext", imageUri);

VS Code version: Code 1.96.4 (cd4ee3b, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.26100
Modes:

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

No branches or pull requests

3 participants