refactor: remove unused/deprecated code and legacy socket events

This commit is contained in:
weishu
2026-01-05 13:00:48 +08:00
parent 21a64dfb49
commit 23887ce040
2 changed files with 0 additions and 12 deletions
-2
View File
@@ -451,10 +451,8 @@ export function registerCliHandlers(socket: SocketWithData, deps: CliHandlersDep
}
socket.on('machine-update-metadata', handleMachineMetadataUpdate)
socket.on('update-machine-metadata', handleMachineMetadataUpdate)
socket.on('machine-update-state', handleMachineStateUpdate)
socket.on('update-machine-state', handleMachineStateUpdate)
socket.on('ping', (callback: () => void) => {
callback()
-10
View File
@@ -18,7 +18,6 @@ import { MessageService } from './messageService'
import { RpcGateway, type RpcCommandResponse, type RpcPathExistsResponse, type RpcReadFileResponse } from './rpcGateway'
import { SessionCache } from './sessionCache'
export type ConnectionStatus = 'disconnected' | 'connected'
export type { Session, SyncEvent } from '@hapi/protocol/types'
export type { Machine } from './machineCache'
export type { SyncEventListener } from './eventPublisher'
@@ -30,7 +29,6 @@ export class SyncEngine {
private readonly machineCache: MachineCache
private readonly messageService: MessageService
private readonly rpcGateway: RpcGateway
private connectionStatus: ConnectionStatus = 'connected'
private inactivityTimer: NodeJS.Timeout | null = null
constructor(
@@ -55,10 +53,6 @@ export class SyncEngine {
}
}
start(): Promise<void> {
return Promise.resolve()
}
subscribe(listener: SyncEventListener): () => void {
return this.eventPublisher.subscribe(listener)
}
@@ -76,10 +70,6 @@ export class SyncEngine {
return undefined
}
getConnectionStatus(): ConnectionStatus {
return this.connectionStatus
}
getSessions(): Session[] {
return this.sessionCache.getSessions()
}