feat: Add realtime git status updates via WebSocket

- Add file watcher on .git directory in terminal server
- Broadcast git-change events to connected clients
- Frontend auto-refreshes when changes detected
- Visual indicator shows realtime connection status
This commit is contained in:
2026-02-14 11:20:55 -06:00
parent 3c401c4c2b
commit 8daf07819b
3 changed files with 166 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
* even when the main server restarts due to code changes.
*/
import { startTerminalServer } from './services/terminal'
import { startTerminalServer, startGitWatcher } from './services/terminal'
import { WORKING_DIR } from './config'
console.log('')
@@ -13,6 +13,7 @@ console.log('='.repeat(50))
console.log('Terminal Server (Independent Process)')
console.log(` WebSocket: ws://localhost:4103`)
console.log(` Working Dir: ${WORKING_DIR}`)
console.log(` Git Watcher: enabled`)
console.log('')
console.log('This process is stable and won\'t restart')
console.log('when the main server reloads.')
@@ -20,3 +21,4 @@ console.log('='.repeat(50))
console.log('')
startTerminalServer()
startGitWatcher()