Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/frontend/src/services/WebSocketService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ class WebSocketService {
private planSubscriptions: Set<string> = new Set();
private reconnectTimer: NodeJS.Timeout | null = null;
private isConnecting = false;
private baseWsUrl = getApiUrl() || 'ws://localhost:8000';


private buildSocketUrl(processId?: string, sessionId?: string): string {
const baseWsUrl = getApiUrl() || 'ws://localhost:8000';
// Trim and remove trailing slashes
let base = (this.baseWsUrl || '').trim().replace(/\/+$/, '');
let base = (baseWsUrl || '').trim().replace(/\/+$/, '');
// Normalize protocol: http -> ws, https -> wss
base = base.replace(/^http:\/\//i, 'ws://')
.replace(/^https:\/\//i, 'wss://');
Expand Down
Loading