MCPcopy Create free account
hub / github.com/codeaashu/claude-code / sendChromeMessage

Function sendChromeMessage

src/utils/claudeInChrome/chromeNativeHost.ts:50–57  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

48 * Send a message to stdout (Chrome native messaging protocol)
49 */
50export function sendChromeMessage(message: string): void {
51 const jsonBytes = Buffer.from(message, 'utf-8')
52 const lengthBuffer = Buffer.alloc(4)
53 lengthBuffer.writeUInt32LE(jsonBytes.length, 0)
54
55 process.stdout.write(lengthBuffer)
56 process.stdout.write(jsonBytes)
57}
58
59export async function runChromeNativeHost(): Promise<void> {
60 log('Initializing...')

Callers 2

handleMessageMethod · 0.85
handleMcpClientMethod · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected