MCPcopy Create free account
hub / github.com/cortexkit/magic-context / sleepWithLog

Function sleepWithLog

packages/plugin/scripts/longmemeval/runner.ts:107–112  ·  view source on GitHub ↗
(config: RunnerConfig, label: string, delayMs: number)

Source from the content-addressed store, hash-verified

105}
106
107async function sleepWithLog(config: RunnerConfig, label: string, delayMs: number): Promise<void> {
108 if (delayMs <= 0) return;
109 logLine(`${label}; sleeping ${delayMs}ms`);
110 await appendLog(config.paths.logFile, `${label}; sleeping ${delayMs}ms`);
111 await sleep(delayMs);
112}
113
114function extractAssistantTextFromParts(parts: unknown): string {
115 if (!Array.isArray(parts)) return "";

Callers 2

replayHaystackFunction · 0.85
askFinalQuestionFunction · 0.85

Calls 3

logLineFunction · 0.85
appendLogFunction · 0.85
sleepFunction · 0.70

Tested by

no test coverage detected