Add "Gemini CLI: Run" command shortcut (#4792)
This commit is contained in:
parent
4e376c0447
commit
30b6cf8a00
|
@ -30,6 +30,14 @@
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"onStartupFinished"
|
"onStartupFinished"
|
||||||
],
|
],
|
||||||
|
"contributes": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"command": "gemini-cli.runGeminiCLI",
|
||||||
|
"title": "Gemini CLI: Run"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"main": "./dist/extension.js",
|
"main": "./dist/extension.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"vscode:prepublish": "npm run check-types && npm run lint && node esbuild.js --production",
|
"vscode:prepublish": "npm run check-types && npm run lint && node esbuild.js --production",
|
||||||
|
|
|
@ -23,6 +23,15 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||||
const message = err instanceof Error ? err.message : String(err);
|
const message = err instanceof Error ? err.message : String(err);
|
||||||
log(`Failed to start IDE server: ${message}`);
|
log(`Failed to start IDE server: ${message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.subscriptions.push(
|
||||||
|
vscode.commands.registerCommand('gemini-cli.runGeminiCLI', () => {
|
||||||
|
const geminiCmd = 'gemini';
|
||||||
|
const terminal = vscode.window.createTerminal(`Gemini CLI`);
|
||||||
|
terminal.show();
|
||||||
|
terminal.sendText(geminiCmd);
|
||||||
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deactivate(): Promise<void> {
|
export async function deactivate(): Promise<void> {
|
||||||
|
|
Loading…
Reference in New Issue