Is there a way to send text to cursor chat window directly from an extension

I am working on creating a vscode extension and i would like the ability to send message directly from my clipboard to cursor chat window. is there a way currently to achieve the same?

const currentClipboard = await vscode.env.clipboard.readText();
i tried the below, it didnt work,it opens up a blank window
vscode.commands.executeCommand(‘composer.createNewWithPrevContext’, {
input: Here is the current instructions :\n\n${currentClipboard}
});

I have the same need. Is this achievable?

In my custom extension, I have to make a “Copy“ button to provide the prompt to tell user “Copy, then paste to agent“

I have an idea to try. `Fix in chat` in editor triggered will provide a prompt to agent. I not sure it will work.

In addition, there are some commands in cursor that are worth trying. You can search for composer.xxx commands.