MCPcopy Create free account
hub / github.com/tiann/hapi / sendAgentMessage

Method sendAgentMessage

cli/src/api/apiSession.ts:524–539  ·  view source on GitHub ↗
(body: unknown)

Source from the content-addressed store, hash-verified

522 }
523
524 sendAgentMessage(body: unknown): void {
525 const content = {
526 role: 'agent',
527 content: {
528 type: AGENT_MESSAGE_PAYLOAD_TYPE,
529 data: body
530 },
531 meta: {
532 sentFrom: 'cli'
533 }
534 }
535 this.socket.emit('message', {
536 sid: this.sessionId,
537 message: content
538 })
539 }
540
541 sendSessionEvent(event: {
542 type: 'switch'

Callers 15

handleAgentMessageMethod · 0.80
GeminiSessionClass · 0.80
handleTranscriptMessageFunction · 0.80
runMainLoopMethod · 0.80
CursorSessionClass · 0.80
handleAgentMessageMethod · 0.80
runOpencodeFunction · 0.80
OpencodeSessionClass · 0.80
handleAgentMessageMethod · 0.80
handleHookEventFunction · 0.80
sendAgentMessageFunction · 0.80
processTranscriptPathFunction · 0.80

Calls 1

emitMethod · 0.45

Tested by 1

sendAgentMessageFunction · 0.64