MCPcopy
hub / github.com/CopilotKit/CopilotKit / onThreadStarted

Function onThreadStarted

packages/bot/src/create-bot.ts:562–573  ·  view source on GitHub ↗
(evt: IncomingThreadStart)

Source from the content-addressed store, hash-verified

560 await command.handler(ctx);
561 },
562 async onThreadStarted(evt: IncomingThreadStart) {
563 // The adapter has already applied its static defaults (greeting /
564 // prompts) before emitting this, so handlers layer on top and never
565 // race. Zero handlers → no-op.
566 const thread = makeThread(
567 adapter,
568 evt.replyTarget,
569 evt.conversationKey,
570 );
571 for (const h of threadStartedHandlers)
572 await h({ thread, user: evt.user });
573 },
574 async onReaction(evt: IncomingReaction) {
575 // Only normalize when the adapter's platform is one the emoji table
576 // knows; otherwise the raw token passes through unchanged.

Callers

nothing calls this directly

Calls 3

hFunction · 0.85
makeThreadFunction · 0.70
pushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…