MCPcopy Create free account
hub / github.com/Noumena-Network/code / dispatchRemoteSubmit

Function dispatchRemoteSubmit

src/session/remoteSubmitDispatch.ts:101–118  ·  view source on GitHub ↗
(
  options: BuildRemoteSubmitPayloadOptions,
  deps: DispatchRemoteSubmitDeps,
)

Source from the content-addressed store, hash-verified

99}
100
101export async function dispatchRemoteSubmit(
102 options: BuildRemoteSubmitPayloadOptions,
103 deps: DispatchRemoteSubmitDeps,
104): Promise<UserMessage> {
105 const { messageContent, remoteContent, imagePasteIds } =
106 buildRemoteSubmitPayload(options)
107 const createUserMessageImpl = deps.createUserMessageImpl ?? createUserMessage
108 const userMessage = createUserMessageImpl({
109 content: messageContent,
110 imagePasteIds,
111 })
112
113 deps.appendUserMessage(userMessage)
114 await deps.sendMessage(remoteContent, {
115 uuid: userMessage.uuid,
116 })
117 return userMessage
118}

Callers 1

Calls 2

buildRemoteSubmitPayloadFunction · 0.85
sendMessageMethod · 0.45

Tested by

no test coverage detected