From 2feedd766b02ec36b6cde3cd76d6a7451caeeacd Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 6 Jul 2024 03:25:34 -0400 Subject: [PATCH] Update view names --- {src/assets => assets}/icon.png | Bin package.json | 26 ++++++++++---------------- src/extension.ts | 13 ++----------- src/providers/SidebarProvider.ts | 4 ++-- 4 files changed, 14 insertions(+), 29 deletions(-) rename {src/assets => assets}/icon.png (100%) diff --git a/src/assets/icon.png b/assets/icon.png similarity index 100% rename from src/assets/icon.png rename to assets/icon.png diff --git a/package.json b/package.json index 58fb3cd..5377528 100644 --- a/package.json +++ b/package.json @@ -15,40 +15,34 @@ "viewsContainers": { "activitybar": [ { - "id": "custom-activitybar", - "title": "VSCode Extension", - "icon": "assets/logo_bito.svg" + "id": "claude-dev-ActivityBar", + "title": "Claude Dev", + "icon": "assets/icon.png" } ] }, "views": { - "custom-activitybar": [ + "claude-dev-ActivityBar": [ { "type": "webview", - "id": "vscodeSidebar.openview", - "name": "View", - "contextualTitle": "View" + "id": "claude-dev.SidebarProvider", + "name": "" } ] }, "commands": [ { - "command": "vscodeSidebar.openview", - "title": "Sidebar View" - }, - { - "command": "vscodeSidebar.menu.view", - "category": "vscode-extension-sidebar-html", - "title": "Sample WebView in VS Code Sidebar", + "command": "claude-dev.menuButtonTapped", + "title": "Text that will show when hovered", "icon": "$(clear-all)" } ], "menus": { "view/title": [ { - "command": "vscodeSidebar.menu.view", + "command": "claude-dev.menuButtonTapped", "group": "navigation", - "when": "view == vscodeSidebar.openview" + "when": "view == claude-dev.SidebarProvider" } ] } diff --git a/src/extension.ts b/src/extension.ts index bf41be2..e1f1c6a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -34,21 +34,12 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(vscode.window.registerWebviewViewProvider(SidebarProvider.viewType, provider)) context.subscriptions.push( - vscode.commands.registerCommand("vscodeSidebar.menu.view", () => { - const message = "Menu/Title of extension is clicked !" + vscode.commands.registerCommand("claude-dev.menuButtonTapped", () => { + const message = "claude-dev.menuButtonTapped!" vscode.window.showInformationMessage(message) }) ) - // Command has been defined in the package.json file - // Provide the implementation of the command with registerCommand - // CommandId parameter must match the command field in package.json - let openWebView = vscode.commands.registerCommand("vscodeSidebar.openview", () => { - // Display a message box to the user - vscode.window.showInformationMessage('Command " Sidebar View [vscodeSidebar.openview] " called.') - }) - - context.subscriptions.push(openWebView) } // This method is called when your extension is deactivated diff --git a/src/providers/SidebarProvider.ts b/src/providers/SidebarProvider.ts index 2486f81..2e790fb 100644 --- a/src/providers/SidebarProvider.ts +++ b/src/providers/SidebarProvider.ts @@ -11,7 +11,7 @@ https://github.com/KumarVariable/vscode-extension-sidebar-html/blob/master/src/c export class SidebarProvider implements vscode.WebviewViewProvider { - public static readonly viewType = "vscodeSidebar.openview" + public static readonly viewType = "claude-dev.SidebarProvider" private _view?: vscode.WebviewView @@ -86,7 +86,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider { -