Skip to content

Commit 29f17dd

Browse files
committed
fix(utils-ai-vscode): rename commands
1 parent 7659ade commit 29f17dd

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

packages/utils-ai-vscode/package.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,44 @@
2222
"contributes": {
2323
"commands": [
2424
{
25-
"command": "utils-ai.addOpenAIKey",
26-
"title": "Utils AI: Add OpenAI API Key"
25+
"command": "barbapapazes.utils-ai-vscode.addOpenAIKey",
26+
"title": "Add OpenAI API Key",
27+
"category": "Utils AI"
2728
},
2829
{
29-
"command": "utils-ai.removeOpenAIKey",
30-
"title": "Utils AI: Remove OpenAI API Key"
30+
"command": "barbapapazes.utils-ai-vscode.removeOpenAIKey",
31+
"title": "Remove OpenAI API Key",
32+
"category": "Utils AI"
3133
},
3234
{
33-
"command": "utils-ai.correct",
34-
"title": "Utils AI: Correct current file",
35+
"command": "barbapapazes.utils-ai-vscode.correct",
36+
"title": "Correct current file",
37+
"category": "Utils AI",
3538
"icon": {
3639
"light": "./images/light.svg",
3740
"dark": "./images/dark.svg"
3841
}
3942
},
4043
{
41-
"command": "utils-ai.description",
42-
"title": "Utils AI: Generate description from current file"
44+
"command": "barbapapazes.utils-ai-vscode.description",
45+
"title": "Generate description from current file",
46+
"category": "Utils AI"
4347
}
4448
],
4549
"menus": {
4650
"commandPalette": [
4751
{
48-
"command": "utils-ai.correct",
52+
"command": "barbapapazes.utils-ai-vscode.correct",
4953
"when": "editorLangId == 'markdown'"
5054
},
5155
{
52-
"command": "utils-ai.description",
56+
"command": "barbapapazes.utils-ai-vscode.description",
5357
"when": "editorLangId == 'markdown'"
5458
}
5559
],
5660
"editor/title": [
5761
{
58-
"command": "utils-ai.correct",
62+
"command": "barbapapazes.utils-ai-vscode.correct",
5963
"group": "navigation",
6064
"when": "editorLangId == 'markdown'"
6165
}
@@ -69,7 +73,7 @@
6973
"publish": "vsce publish --no-dependencies"
7074
},
7175
"dependencies": {
72-
"utils-ai": "0.1.1"
76+
"utils-ai": "0.1.2"
7377
},
7478
"devDependencies": {
7579
"@types/node": "18.x",

packages/utils-ai-vscode/src/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { correctCommand } from './commands/correct'
66
export function activate(context: vscode.ExtensionContext) {
77
const secrets = context.secrets
88

9-
const addOpenAIKeyCommand = vscode.commands.registerCommand('utils-ai.addOpenAIKey', async () => {
9+
const addOpenAIKeyCommand = vscode.commands.registerCommand('barbapapazes.utils-ai-vscode.addOpenAIKey', async () => {
1010
const key = await vscode.window.showInputBox({
1111
prompt: 'Enter your OpenAI API key',
1212
placeHolder: 'OpenAI API key',
@@ -19,14 +19,18 @@ export function activate(context: vscode.ExtensionContext) {
1919
}
2020

2121
await addOpenAIKey(key, secrets)
22+
23+
vscode.window.showInformationMessage('OpenAI key added.')
2224
})
2325

24-
const removeOpenAIKeyCommand = vscode.commands.registerCommand('utils-ai.removeOpenAIKey', async () => {
26+
const removeOpenAIKeyCommand = vscode.commands.registerCommand('barbapapazes.utils-ai-vscode.removeOpenAIKey', async () => {
2527
await removeOpenAIKey(secrets)
28+
29+
vscode.window.showInformationMessage('OpenAI key removed.')
2630
})
2731

28-
const correctCommandDisposable = vscode.commands.registerCommand('utils-ai.correct', correctCommand(context))
29-
const descriptionCommandDisposable = vscode.commands.registerCommand('utils-ai.description', descriptionCommand(context))
32+
const correctCommandDisposable = vscode.commands.registerCommand('barbapapazes.utils-ai-vscode.correct', correctCommand(context))
33+
const descriptionCommandDisposable = vscode.commands.registerCommand('barbapapazes.utils-ai-vscode.description', descriptionCommand(context))
3034

3135
context.subscriptions.push(addOpenAIKeyCommand, removeOpenAIKeyCommand, correctCommandDisposable, descriptionCommandDisposable)
3236
}

pnpm-lock.yaml

Lines changed: 2 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)