Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
nx-help-and-feedback-tree-item.ts1.09 kB
import { ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri, commands, } from 'vscode'; export class NxHelpAndFeedbackTreeItem extends TreeItem { commandString: string; constructor( private readonly title: string, private readonly link: string, readonly icon: string | Uri | { light: Uri; dark: Uri } | ThemeIcon ) { super(title, TreeItemCollapsibleState.None); this.iconPath = icon; this.contextValue = link; this.commandString = `nxConsole.helpAndFeedback.openUrl.${this.title.replace( ' ', '_' )}`; this.command = { title: this.title, command: this.commandString, }; this.registerCommand(this.link); } // kinda hacky but just setting 'command' on the TreeItem doesn't work anymore async registerCommand(url: string) { const openCommand = (await commands.getCommands(true)).find( (command) => command === this.commandString ); if (!openCommand) { commands.registerCommand(this.commandString, () => { commands.executeCommand('vscode.open', url); }); } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server