MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / msgFromTurn

Function msgFromTurn

packages/bot/src/create-bot.ts:244–252  ·  view source on GitHub ↗

Build the IncomingMessage object from an IncomingTurn (shared by lock-conflict callback and handler path).

(turn: IncomingTurn)

Source from the content-addressed store, hash-verified

242
243/** Build the IncomingMessage object from an IncomingTurn (shared by lock-conflict callback and handler path). */
244function msgFromTurn(turn: IncomingTurn): IncomingMessage {
245 return {
246 text: turn.userText,
247 contentParts: turn.contentParts,
248 user: turn.user ?? { id: "" },
249 ref: { id: "" },
250 platform: turn.platform,
251 };
252}
253
254export function createBot<
255 TStateSchema extends StandardSchemaV1 | undefined = undefined,

Callers 1

onTurnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…