Skip to content

Commit

Permalink
Merge pull request #61 from anetaj/feature/open-settings-button
Browse files Browse the repository at this point in the history
Link to settings from extension
  • Loading branch information
andrewpareles authored Sep 30, 2024
2 parents aea35c9 + 0a5ebc1 commit 180df75
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
27 changes: 24 additions & 3 deletions extensions/void/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "void",
"publisher": "void",
"displayName": "Void",
"description": "",
"version": "0.0.1",
Expand All @@ -13,12 +14,18 @@
"main": "./out/extension.js",
"contributes": {
"configuration": {
"title": "API Keys",
"title": "Void",
"properties": {
"void.whichApi": {
"type": "string",
"default": "anthropic",
"description": "Choose a model to use (anthropic | openai | greptile | ollama)"
"description": "Choose a model to use",
"enum": [
"anthropic",
"openai",
"greptile",
"ollama"
]
},
"void.anthropicApiKey": {
"type": "string",
Expand Down Expand Up @@ -63,6 +70,11 @@
{
"command": "void.discardDiff",
"title": "Discard Diff"
},
{
"command": "void.openSettings",
"title": "Void settings",
"icon": "$(settings-gear)"
}
],
"viewsContainers": {
Expand Down Expand Up @@ -94,7 +106,16 @@
"key": "ctrl+k",
"mac": "cmd+k"
}
]
],
"menus": {
"view/title": [
{
"command": "void.openSettings",
"when": "view == 'void.viewnumberone'",
"group": "navigation"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
Expand Down
3 changes: 3 additions & 0 deletions extensions/void/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export function activate(context: vscode.ExtensionContext) {
approvalCodeLensProvider.discardDiff(params)
}));

context.subscriptions.push(vscode.commands.registerCommand('void.openSettings', async () => {
vscode.commands.executeCommand('workbench.action.openSettings', '@ext:void.void');
}));

// 5.
webviewProvider.webview.then(
Expand Down

0 comments on commit 180df75

Please sign in to comment.