MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / recordReportEvent

Function recordReportEvent

packages/server-e2e/src/report.ts:114–119  ·  view source on GitHub ↗
(event: ReportEvent, options?: ReportOptions)

Source from the content-addressed store, hash-verified

112}
113
114export function recordReportEvent(event: ReportEvent, options?: ReportOptions): void {
115 const reportDir = options?.reportDir ?? defaultReportDir();
116 mkdirSync(reportDir, { recursive: true });
117 const stored = normalizeEvent(event);
118 appendFileSync(reportEventsPath(reportDir), `${JSON.stringify(stored)}\n`);
119}
120
121export function readReportEvents(reportDir = defaultReportDir()): StoredReportEvent[] {
122 if (!existsSync(reportDir)) return [];

Callers 15

report.test.tsFile · 0.90
recordLaterFunction · 0.90
logFunction · 0.85
createCaseLoggerFunction · 0.85
onTestRunEndMethod · 0.85
requestMethod · 0.85
fetchWithReportFunction · 0.85
openMethod · 0.85
sendMethod · 0.85
_onMessageMethod · 0.85
_onCloseMethod · 0.85
mainFunction · 0.85

Calls 3

defaultReportDirFunction · 0.85
normalizeEventFunction · 0.85
reportEventsPathFunction · 0.85

Tested by 1

recordLaterFunction · 0.72