fix(wss): handle cloud version restriction in terminal setup

This commit is contained in:
Mauricio Siu
2026-01-27 08:38:14 -06:00
parent 74e0bd5fe3
commit 880a377e54
2 changed files with 7 additions and 2 deletions

View File

@@ -97,7 +97,12 @@ export const setupTerminalWebSocketServer = (
const isLocalServer = serverId === "local";
if (isLocalServer && !IS_CLOUD) {
if (isLocalServer) {
if (IS_CLOUD) {
ws.send("This feature is not available in the cloud version.");
ws.close();
return;
}
const port = Number(url.searchParams.get("port"));
const username = url.searchParams.get("username");

View File

@@ -34,7 +34,7 @@ export const isValidShell = (shell: string): boolean => {
export const getShell = () => {
if (IS_CLOUD) {
return "CLOUD_VERSION";
return "NO_AVAILABLE";
}
switch (os.platform()) {
case "win32":