MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / handleHostDesktopEventMessage

Function handleHostDesktopEventMessage

desktop/runtime-host/client-bridge.ts:210–221  ·  view source on GitHub ↗
(
  host: HostConnection,
  message: Extract<RuntimeHostToMainMessage, { type: 'desktop-event' }>,
)

Source from the content-addressed store, hash-verified

208}
209
210function handleHostDesktopEventMessage(
211 host: HostConnection,
212 message: Extract<RuntimeHostToMainMessage, { type: 'desktop-event' }>,
213) {
214 if (message.event.type === 'thread-update') {
215 rememberHostAlias(host, message.event.sessionPath)
216 host.busy = message.event.thread.isStreaming || message.event.thread.isCompacting
217 if (host.busy) clearHostIdleTimer(host)
218 else scheduleThreadHostIdleStop(host)
219 }
220 emitDesktopEvent(message.event)
221}
222
223function getHostSendOutcome(message: Extract<RuntimeHostToMainMessage, { type: 'response' }>) {
224 return message.ok &&

Callers 1

handleHostMessageFunction · 0.85

Calls 4

rememberHostAliasFunction · 0.85
clearHostIdleTimerFunction · 0.85
emitDesktopEventFunction · 0.70

Tested by

no test coverage detected