MCPcopy
hub / github.com/CopilotKit/CopilotKit / onModalSubmit

Function onModalSubmit

packages/bot/src/create-bot.ts:619–635  ·  view source on GitHub ↗
(evt: IncomingModalSubmit)

Source from the content-addressed store, hash-verified

617 }
618 },
619 async onModalSubmit(evt: IncomingModalSubmit) {
620 const handler = modalSubmitHandlers.get(evt.callbackId);
621 if (!handler) return; // unregistered → closes
622 const thread =
623 evt.conversationKey !== undefined && evt.replyTarget !== undefined
624 ? makeThread(adapter, evt.replyTarget, evt.conversationKey)
625 : undefined;
626 const result = await handler({
627 callbackId: evt.callbackId,
628 values: evt.values,
629 user: evt.user,
630 thread,
631 privateMetadata: evt.privateMetadata,
632 raw: evt.raw,
633 });
634 return result ?? undefined;
635 },
636 async onModalClose(evt: IncomingModalClose) {
637 const handler = modalCloseHandlers.get(evt.callbackId);
638 if (!handler) return;

Callers

nothing calls this directly

Calls 4

makeThreadFunction · 0.70
getMethod · 0.65
handlerFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…