mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Update view names
This commit is contained in:
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
26
package.json
26
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user