MCPcopy Create free account
hub / github.com/WJX20/claude-code / sendMessage

Method sendMessage

src/remote/RemoteSessionManager.ts:220–243  ·  view source on GitHub ↗

* Send a user message to the remote session via HTTP POST

(
    content: RemoteMessageContent,
    opts?: { uuid?: string },
  )

Source from the content-addressed store, hash-verified

218 * Send a user message to the remote session via HTTP POST
219 */
220 async sendMessage(
221 content: RemoteMessageContent,
222 opts?: { uuid?: string },
223 ): Promise<boolean> {
224 logForDebugging(
225 `[RemoteSessionManager] Sending message to session ${this.config.sessionId}`,
226 )
227
228 const success = await sendEventToRemoteSession(
229 this.config.sessionId,
230 content,
231 opts,
232 )
233
234 if (!success) {
235 logError(
236 new Error(
237 `[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`,
238 ),
239 )
240 }
241
242 return success
243 }
244
245 /**
246 * Respond to a permission request from CCR

Callers 1

useRemoteSessionFunction · 0.95

Calls 3

logForDebuggingFunction · 0.85
sendEventToRemoteSessionFunction · 0.85
logErrorFunction · 0.50

Tested by

no test coverage detected