refactor(webchat): SwiftUI-only WebChat UI
# Conflicts: # apps/macos/Package.swift
This commit is contained in:
@@ -42,10 +42,6 @@ export function registerGatewayCli(program: Command) {
|
||||
.command("gateway")
|
||||
.description("Run the WebSocket Gateway")
|
||||
.option("--port <port>", "Port for the gateway WebSocket", "18789")
|
||||
.option(
|
||||
"--webchat-port <port>",
|
||||
"Port for the loopback WebChat HTTP server (default 18788)",
|
||||
)
|
||||
.option(
|
||||
"--token <token>",
|
||||
"Shared token required in connect.params.auth.token (default: CLAWDIS_GATEWAY_TOKEN env if set)",
|
||||
@@ -63,16 +59,6 @@ export function registerGatewayCli(program: Command) {
|
||||
defaultRuntime.error("Invalid port");
|
||||
defaultRuntime.exit(1);
|
||||
}
|
||||
const webchatPort = opts.webchatPort
|
||||
? Number.parseInt(String(opts.webchatPort), 10)
|
||||
: undefined;
|
||||
if (
|
||||
webchatPort !== undefined &&
|
||||
(Number.isNaN(webchatPort) || webchatPort <= 0)
|
||||
) {
|
||||
defaultRuntime.error("Invalid webchat port");
|
||||
defaultRuntime.exit(1);
|
||||
}
|
||||
if (opts.force) {
|
||||
try {
|
||||
const killed = forceFreePort(port);
|
||||
@@ -143,7 +129,7 @@ export function registerGatewayCli(program: Command) {
|
||||
process.once("SIGINT", onSigint);
|
||||
|
||||
try {
|
||||
server = await startGatewayServer(port, { webchatPort });
|
||||
server = await startGatewayServer(port);
|
||||
} catch (err) {
|
||||
if (err instanceof GatewayLockError) {
|
||||
defaultRuntime.error(`Gateway failed to start: ${err.message}`);
|
||||
|
||||
Reference in New Issue
Block a user