MCPcopy
hub / github.com/claude-code-best/claude-code / writeSdkMessages

Function writeSdkMessages

src/bridge/remoteBridgeCore.ts:844–857  ·  view source on GitHub ↗
(messages: SDKMessage[])

Source from the content-addressed store, hash-verified

842 void transport.writeBatch(events as StdoutMessage[])
843 },
844 writeSdkMessages(messages: SDKMessage[]) {
845 const filtered = messages.filter(
846 m => !m.uuid || !recentPostedUUIDs.has(m.uuid as string),
847 )
848 if (filtered.length === 0) return
849 for (const msg of filtered) {
850 if (msg.uuid) recentPostedUUIDs.add(msg.uuid as string)
851 }
852 const events = filtered.map(m => ({
853 ...m,
854 session_id: sessionId,
855 })) as StdoutMessage[]
856 void transport.writeBatch(events)
857 },
858 sendControlRequest(request: SDKControlRequest) {
859 if (authRecoveryInFlight) {
860 logForDebugging(

Callers

nothing calls this directly

Calls 3

writeBatchMethod · 0.80
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected