Skip to content

Commit

Permalink
feat: added a shortcut for opening extension settings on the top righ…
Browse files Browse the repository at this point in the history
…t of sidebar
  • Loading branch information
srikanth235 committed Jan 25, 2024
1 parent 7da3289 commit 44ca4b1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<h1><b>💬 Privy</b></h1>
<p>
<strong>A privacy-first coding assistant.</strong>
<strong>A privacy based alternative to GitHub co-pilot.</strong>
</p>
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"/>
<a href="https://twitter.com/getprivydev" style="text-decoration: none; outline: none"><img src="https://img.shields.io/twitter/url/https/twitter.com/getprivydev.svg?style=social&label=%20%40getprivydev" alt="Twitter: @getprivydev"/></a>
Expand Down
25 changes: 13 additions & 12 deletions app/vscode/asset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"publisher": "Privy",
"name": "privy-vscode",
"version": "0.1.5",
"displayName": "Privy - Your private coding assistant",
"displayName": "Privy - A privacy based alternative to GitHub co-pilot. ",
"description": "Chat with code, explain code, generate tests, find bugs, etc.",
"keywords": [
"ai",
Expand Down Expand Up @@ -46,16 +46,6 @@
],
"contributes": {
"commands": [
{
"command": "privy.enterOpenAIApiKey",
"category": "Privy",
"title": "Enter OpenAI API key"
},
{
"command": "privy.clearOpenAIApiKey",
"category": "Privy",
"title": "Clear OpenAI API key"
},
{
"command": "privy.startChat",
"title": "Start Chat 💬",
Expand Down Expand Up @@ -121,6 +111,12 @@
"category": "Privy",
"icon": "$(question)"
},
{
"command": "privy.openSettings",
"title": "Open Settings",
"category": "Privy",
"icon": "$(settings)"
},
{
"command": "privy.reloadTemplates",
"title": "Reload Templates",
Expand Down Expand Up @@ -312,9 +308,14 @@
"group": "navigation@1"
},
{
"command": "privy.getStarted",
"command": "privy.openSettings",
"when": "view == privy.chat",
"group": "navigation@2"
},
{
"command": "privy.getStarted",
"when": "view == privy.chat",
"group": "navigation@3"
}
],
"touchBar": [
Expand Down
14 changes: 6 additions & 8 deletions lib/extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ export const activate = async (context: vscode.ExtensionContext) => {

context.subscriptions.push(
vscode.window.registerWebviewViewProvider("privy.chat", chatPanel),
vscode.commands.registerCommand(
"privy.enterOpenAIApiKey",
apiKeyManager.enterOpenAIApiKey.bind(apiKeyManager)
),
vscode.commands.registerCommand("privy.clearOpenAIApiKey", async () => {
await apiKeyManager.clearOpenAIApiKey();
vscode.window.showInformationMessage("OpenAI API key cleared.");
}),

vscode.commands.registerCommand("privy.startConversation", (templateId) =>
chatController.createConversation(templateId)
Expand Down Expand Up @@ -139,6 +131,12 @@ export const activate = async (context: vscode.ExtensionContext) => {
category: `Privy.privy-vscode#privy`,
});
}),
vscode.commands.registerCommand("privy.openSettings", async () => {
await vscode.commands.executeCommand(
"workbench.action.openSettings",
`@ext:privy.privy-vscode`
);
}),
vscode.commands.registerCommand("privy.reloadTemplates", async () => {
await conversationTypesProvider.loadConversationTypes();
vscode.window.showInformationMessage("Privy templates reloaded.");
Expand Down

0 comments on commit 44ca4b1

Please sign in to comment.