Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
running-tasks.ts1.42 kB
import { NotificationType, NotificationType2 } from 'vscode-jsonrpc'; import { MessagingNotification, MessagingNotification2, } from '../messaging-notification'; import { endRunningTasks, setUpdatingRunningTasks, startRunningTasks, UpdatedRunningTask, } from '@nx-console/shared-running-tasks'; import { vscodeLogger } from '@nx-console/vscode-output-channels'; export const NxStartedRunningTasks: MessagingNotification<number> = { type: new NotificationType('nx/startedRunningTasks'), handler: (connectionId) => (processId) => { vscodeLogger.log('Started running tasks:', connectionId, processId); startRunningTasks(connectionId, processId); }, }; export const NxEndedRunningTasks: MessagingNotification<number> = { type: new NotificationType('nx/endedRunningTasks'), handler: (connectionId) => (process) => { vscodeLogger.log('Ended running tasks:', connectionId, process); endRunningTasks(connectionId); }, onClose(id) { endRunningTasks(id); }, }; export const NxUpdatedRunningTasks: MessagingNotification2< number, Array<UpdatedRunningTask> > = { type: new NotificationType2('nx/updateRunningTasks'), handler: (connectionId) => (process, updatedRunningTasks) => { vscodeLogger.log( 'Updated running tasks:', connectionId, process, updatedRunningTasks, ); setUpdatingRunningTasks(connectionId, updatedRunningTasks); }, };

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