MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isSessionsMessage

Function isSessionsMessage

src/remote/SessionsWebSocket.ts:46–55  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

44 | SDKControlCancelRequest
45
46function isSessionsMessage(value: unknown): value is SessionsMessage {
47 if (typeof value !== 'object' || value === null || !('type' in value)) {
48 return false
49 }
50 // Accept any message with a string `type` field. Downstream handlers
51 // (sdkMessageAdapter, RemoteSessionManager) decide what to do with
52 // unknown types. A hardcoded allowlist here would silently drop new
53 // message types the backend starts sending before the client is updated.
54 return typeof value.type === 'string'
55}
56
57export type SessionsWebSocketCallbacks = {
58 onMessage: (message: SessionsMessage) => void

Callers 1

handleMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected