MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / buildDynamicContext

Function buildDynamicContext

scripts/analysis.ts:38–63  ·  view source on GitHub ↗
(runs: EvaluationRunExport[])

Source from the content-addressed store, hash-verified

36const analyzerModelId = "opencode/claude-sonnet-4-5";
37
38function buildDynamicContext(runs: EvaluationRunExport[]): string {
39 const repo = runs[0].evaluation.repo;
40 const parts: string[] = [];
41
42 parts.push(`# Evaluation
43- Repository: ${repo}
44- Total runs: ${runs.length}
45`);
46
47 parts.push("# Run Scoreboard");
48 runs.forEach((run, index) => {
49 parts.push(
50 `${index + 1}. ${run.agent} (${
51 run.model
52 }) — final ${run.finalScore.toFixed(3)}, base ${run.baseScore.toFixed(
53 3,
54 )}, penalty ${run.variancePenalty.toFixed(3)}`,
55 );
56 if (run.summary?.trim()) {
57 parts.push(` Summary: ${run.summary.trim()}`);
58 }
59 });
60 parts.push("");
61
62 return parts.join("\n");
63}
64
65function formatFallbackSummary(runs: EvaluationRunExport[]): string {
66 const repo = runs[0].evaluation.repo;

Callers 1

generateAnalysisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected