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

Method sendUserMessage

cli/src/api/apiSession.ts:501–522  ·  view source on GitHub ↗
(text: string, meta?: MessageMeta)

Source from the content-addressed store, hash-verified

499 }
500
501 sendUserMessage(text: string, meta?: MessageMeta): void {
502 if (!text) {
503 return
504 }
505
506 const content: MessageContent = {
507 role: 'user',
508 content: {
509 type: 'text',
510 text
511 },
512 meta: {
513 sentFrom: 'cli',
514 ...(meta ?? {})
515 }
516 }
517
518 this.socket.emit('message', {
519 sid: this.sessionId,
520 message: content
521 })
522 }
523
524 sendAgentMessage(body: unknown): void {
525 const content = {

Callers 10

GeminiSessionClass · 0.80
handleTranscriptMessageFunction · 0.80
CursorSessionClass · 0.80
OpencodeSessionClass · 0.80
handleHookEventFunction · 0.80
sendUserMessageFunction · 0.80
processTranscriptPathFunction · 0.80
CodexSessionClass · 0.80
KimiSessionClass · 0.80
sendTextMessageMethod · 0.80

Calls 1

emitMethod · 0.45

Tested by 1

sendUserMessageFunction · 0.64