Skip to content

Add VS Code extension for dev-process-manager#177

Open
Copilot wants to merge 10 commits into
mainfrom
copilot/implement-vscode-plugin-socket
Open

Add VS Code extension for dev-process-manager#177
Copilot wants to merge 10 commits into
mainfrom
copilot/implement-vscode-plugin-socket

Conversation

Copilot AI commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a VS Code extension that connects to the dev-pm daemon socket to provide sidebar-based process management. Users currently need to switch to a terminal to check script status or run start/stop/restart commands — this extension surfaces that directly in the editor.

The extension lives in vscode-extension/ with its own package.json and tsconfig.json. No monorepo tooling needed — it's a self-contained subfolder.

What it provides:

  • TreeView in activity bar — shows all scripts with status, CPU, memory, PID, restart count. Auto-refreshes every 2s via the status socket command.
  • Inline actions — context-aware start/stop/restart buttons per script (e.g., "Start" only shown for stopped scripts)
  • Live log streaming — opens a VS Code Output Channel per script, streams logs via the logs socket command
  • Bulk actions — Start All / Stop All in the view title bar
  • Auto-discovery — finds .pm.sock in workspace folders, watches for socket creation/deletion

Communicates with the daemon using the existing plain-text socket protocol (<COMMAND> <JSON_OPTIONS>), parses the cli-table3 status output, and strips ANSI codes for clean display.

Example

Bildschirmfoto 2026-04-14 um 16 31 23

Related tasks and documents

Inspired by pm2-vscode and pm2-explorer.

Open TODOs/questions

  • Should the extension be published to the VS Code Marketplace under vivid-planet?
  • Consider adding a structured JSON status command to the daemon to avoid parsing cli-table3 output
  • The daemon currently sends ANSI-colored table output designed for terminals — a machine-readable protocol would be more robust for tooling consumers

Further information

Architecture:

  • daemon-client.ts — socket connection, command sending, status table parsing, ANSI stripping
  • scripts-tree-provider.tsTreeDataProvider with auto-refresh timer, status icons via ThemeIcon
  • extension.ts — activation, command registration, socket path discovery, log channel management

Build: cd vscode-extension && npm install && npm run compile

Package: cd vscode-extension && npm run package produces a .vsix

Copilot AI and others added 2 commits April 14, 2026 06:58
Implements a VS Code extension in vscode-extension/ subfolder that:
- Connects to the dev-pm daemon via Unix socket (.pm.sock)
- Shows script statuses in a TreeView with auto-refresh
- Provides start/stop/restart actions per script
- Opens live log streams in VS Code Output Channels
- Has Start All / Stop All bulk actions

Agent-Logs-Url: https://github.com/vivid-planet/dev-process-manager/sessions/3a1e6f9e-3767-4634-9ac4-9fddc51567e9

Co-authored-by: nsams <50764+nsams@users.noreply.github.com>
nsams added 4 commits April 14, 2026 09:41
Move table rendering from daemon to CLI client so the VS Code extension
can parse structured JSON directly. Add a version command to the daemon
and version compatibility checking in the extension with auto-reconnect
when the daemon goes down or restarts.
@nsams nsams marked this pull request as ready for review April 14, 2026 14:41
@nsams nsams requested a review from Fabian-Fynn April 14, 2026 14:42
Comment thread vscode-extension/src/scripts-tree-provider.ts Outdated
Comment thread vscode-extension/resources/icon.svg
Comment thread .changeset/rich-chairs-leave.md
@nsams nsams force-pushed the copilot/implement-vscode-plugin-socket branch from 7ea9b42 to 8cf4255 Compare April 17, 2026 06:39
@nsams nsams force-pushed the copilot/implement-vscode-plugin-socket branch from bf45eef to a146f45 Compare April 17, 2026 07:40
@Fabian-Fynn Fabian-Fynn self-requested a review April 17, 2026 10:58
Fabian-Fynn
Fabian-Fynn previously approved these changes Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants