feat(vscode): add context menu commands (#83)

* Fix bun lock

* Add Context Menu

* Make it always visible

* Add Improve and Explain Command
This commit is contained in:
wienans
2025-12-30 17:32:27 +02:00
committed by GitHub
parent b331a31414
commit f3a00bc8f4
5 changed files with 234 additions and 34 deletions
+26
View File
@@ -86,6 +86,32 @@ export class ChatViewProvider implements vscode.WebviewViewProvider {
// Send to webview if it exists
this._sendCachedState();
}
public addTextToInput(text: string) {
if (this._view) {
// Reveal the webview panel
this._view.show(true);
this._view.webview.postMessage({
type: 'command',
command: 'addToContext',
payload: { text }
});
}
}
public createNewSessionWithPrompt(prompt: string) {
if (this._view) {
// Reveal the webview panel
this._view.show(true);
this._view.webview.postMessage({
type: 'command',
command: 'createSessionWithPrompt',
payload: { prompt }
});
}
}
private _sendCachedState() {
if (!this._view) {