refactor: Use dedicated WebSocket server for torch sync
- Add torch WebSocket server on port 4106 - Remove HTTP polling, use WebSocket for instant sync - Torch state changes broadcast immediately to all clients - Auto-reconnect on disconnect - Add port 4106 to kill-ports script
This commit is contained in:
@@ -11,7 +11,6 @@ import { handleWhisperRoutes } from './whisper'
|
||||
import { handleRecordingsRoutes } from './recordings'
|
||||
import { handleClaudeStatus } from './claude-status'
|
||||
import { handleGitStatus, handleGitDiff, handleGitLog, handleGitLogCommit, handleGitCompare, handleGitBranches, handleGitCurrentBranch, handleGitTree, handleGitFile } from './git'
|
||||
import { handleTorch } from './torch'
|
||||
|
||||
export async function handleRequest(req: Request): Promise<Response> {
|
||||
const url = new URL(req.url)
|
||||
@@ -51,12 +50,6 @@ export async function handleRequest(req: Request): Promise<Response> {
|
||||
if (res) return res
|
||||
}
|
||||
|
||||
// Torch (multi-browser MCP control)
|
||||
if (path.startsWith('/api/torch')) {
|
||||
const res = await handleTorch(req, url)
|
||||
if (res) return res
|
||||
}
|
||||
|
||||
// Claude Code status (thinking/idle)
|
||||
if (path === '/api/claude-status') {
|
||||
const res = await handleClaudeStatus(req)
|
||||
|
||||
Reference in New Issue
Block a user