Merge pull request #61 from anetaj/feature/open-settings-button

Link to settings from extension
This commit is contained in:
Andrew Pareles 2024-09-30 00:33:58 -07:00 committed by GitHub
commit 180df75bb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 3 deletions

View file

@ -1,5 +1,6 @@
{
"name": "void",
"publisher": "void",
"displayName": "Void",
"description": "",
"version": "0.0.1",
@ -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",
@ -63,6 +70,11 @@
{
"command": "void.discardDiff",
"title": "Discard Diff"
},
{
"command": "void.openSettings",
"title": "Void settings",
"icon": "$(settings-gear)"
}
],
"viewsContainers": {
@ -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",

View file

@ -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(