refactor: Separate git watcher from terminal service
- Create dedicated git-watcher.ts with its own WebSocket server (port 4105) - Remove git watcher code from terminal.ts (no more PTY dependency) - Add /ws/git endpoint for Traefik routing - GitPage now connects to dedicated git WebSocket instead of terminal
This commit is contained in:
@@ -27,6 +27,9 @@ export const endpoints = {
|
||||
// Terminal WebSocket
|
||||
terminal: buildWsUrl('/ws/terminal', 4103),
|
||||
|
||||
// Git WebSocket (realtime notifications, separate from terminal)
|
||||
git: buildWsUrl('/ws/git', 4105),
|
||||
|
||||
// Claude status WebSocket (same backend as terminal)
|
||||
claudeStatus: buildWsUrl('/ws/status', 4103),
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ const isRealtime = ref(false)
|
||||
function connectGitWatcher() {
|
||||
if (gitSocket?.readyState === WebSocket.OPEN) return
|
||||
|
||||
gitSocket = new WebSocket(endpoints.terminal)
|
||||
gitSocket = new WebSocket(endpoints.git)
|
||||
|
||||
gitSocket.onopen = () => {
|
||||
isRealtime.value = true
|
||||
|
||||
Reference in New Issue
Block a user