MCPcopy Create free account
hub / github.com/CopilotKit/CopilotKit / awaitChoice

Method awaitChoice

packages/bot/src/thread.ts:276–285  ·  view source on GitHub ↗

Post a picker and wait until an interaction in this conversation resolves it.

(ui: Renderable)

Source from the content-addressed store, hash-verified

274
275 /** Post a picker and wait until an interaction in this conversation resolves it. */
276 async awaitChoice<T = unknown>(ui: Renderable): Promise<T> {
277 const p = new Promise<T>((resolve) =>
278 this.deps.registerWaiter(
279 this.deps.conversationKey,
280 resolve as (value: unknown) => void,
281 ),
282 );
283 await this.post(ui);
284 return p;
285 }
286
287 async runAgent(input?: {
288 context?: ContextEntry[];

Callers

nothing calls this directly

Calls 1

postMethod · 0.95

Tested by

no test coverage detected