Răsfoiți Sursa

Update view names

Saoud Rizwan 1 an în urmă
părinte
comite
2feedd766b
4 a modificat fișierele cu 14 adăugiri și 29 ștergeri
  1. 0 0
      assets/icon.png
  2. 10 16
      package.json
  3. 2 11
      src/extension.ts
  4. 2 2
      src/providers/SidebarProvider.ts

+ 0 - 0
src/assets/icon.png → assets/icon.png


+ 10 - 16
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"
         }
       ]
     }

+ 2 - 11
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

+ 2 - 2
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 {
             <meta name="theme-color" content="#000000">
             <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src ${webview.cspSource}; script-src 'nonce-${nonce}';">
             <link rel="stylesheet" type="text/css" href="${stylesUri}">
-            <title>Hello World</title>
+            <title>Claude Dev</title>
           </head>
           <body>
             <noscript>You need to enable JavaScript to run this app.</noscript>