MCPcopy Create free account
hub / github.com/CopilotKit/OpenTag / waitForOperator

Function waitForOperator

e2e/telegram-run.ts:125–137  ·  view source on GitHub ↗

* Wait for the operator to send a prompt (manual-trigger mode). * Prints the prompt text and waits `promptWaitMs` for the user to act.

(
  prompt: string,
  promptWaitMs: number,
)

Source from the content-addressed store, hash-verified

123 * Prints the prompt text and waits `promptWaitMs` for the user to act.
124 */
125async function waitForOperator(
126 prompt: string,
127 promptWaitMs: number,
128): Promise<void> {
129 console.log(
130 `\n [MANUAL] Please send the following message in the test chat:\n` +
131 ` ┌──────────────────────────────────────────────────────────┐\n` +
132 ` │ ${prompt.slice(0, 56).padEnd(56)} │\n` +
133 ` └──────────────────────────────────────────────────────────┘\n` +
134 ` Waiting up to ${Math.round(promptWaitMs / 1000)}s for your send…`,
135 );
136 await new Promise((r) => setTimeout(r, promptWaitMs));
137}
138
139async function runCase(spec: E2ECase): Promise<CaseResult> {
140 const errors: string[] = [];

Callers 1

runCaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected