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

Method sendMessage

web/src/api/client.ts:390–400  ·  view source on GitHub ↗
(sessionId: string, text: string, localId?: string | null, attachments?: AttachmentMetadata[], scheduledAt?: number | null)

Source from the content-addressed store, hash-verified

388 }
389
390 async sendMessage(sessionId: string, text: string, localId?: string | null, attachments?: AttachmentMetadata[], scheduledAt?: number | null): Promise<void> {
391 await this.request(`/api/sessions/${encodeURIComponent(sessionId)}/messages`, {
392 method: 'POST',
393 body: JSON.stringify({
394 text,
395 localId: localId ?? undefined,
396 attachments: attachments ?? undefined,
397 scheduledAt: scheduledAt ?? undefined
398 })
399 })
400 }
401
402 async cancelMessage(sessionId: string, messageId: string): Promise<CancelMessageResponse> {
403 const response = await this.request(

Callers 3

useSendMessageFunction · 0.45

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected