add context menu to processes view + add more shit you can do.

This commit is contained in:
KingKDot
2026-05-17 02:35:48 -05:00
parent 0cd05547e8
commit f53b1cf2c8
7 changed files with 494 additions and 75 deletions
@@ -360,6 +360,26 @@ export function handleProcessViewerMessage(ws: ServerWebSocket<SocketData>, raw:
metrics.recordCommand("process_kill");
break;
}
case "process_suspend": {
const pid = Number(payload.pid);
if (!Number.isFinite(pid) || pid <= 0) {
safeSendViewer(ws, { type: "command_result", commandId, ok: false, message: "Invalid PID" });
break;
}
target.ws.send(encodeMessage({ type: "command", commandType: "process_suspend", id: commandId, payload: { pid } } as any));
metrics.recordCommand("process_suspend");
break;
}
case "process_resume": {
const pid = Number(payload.pid);
if (!Number.isFinite(pid) || pid <= 0) {
safeSendViewer(ws, { type: "command_result", commandId, ok: false, message: "Invalid PID" });
break;
}
target.ws.send(encodeMessage({ type: "command", commandType: "process_resume", id: commandId, payload: { pid } } as any));
metrics.recordCommand("process_resume");
break;
}
default:
break;
}