MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / textOf

Function textOf

scripts/agent-eval/parse-run.mjs:83–86  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

81const CG_CLI_RE = /(^|[;&|(]|&&|\|\||\$\(|`)\s*(?:[A-Za-z_]\w*=\S*\s+)*[\w./~-]*codegraph(\s|$)/;
82
83const textOf = (content) =>
84 Array.isArray(content) ? content.map((c) => c.text ?? (typeof c === 'string' ? c : JSON.stringify(c))).join('')
85 : typeof content === 'string' ? content
86 : content == null ? '' : JSON.stringify(content);
87
88/** Characters an assistant content block occupies once it is back in the prompt. */
89function assistantBlockChars(b) {

Callers 3

parseSessionFunction · 0.85
collectExploreTextsFunction · 0.85
classifySufficiencyFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected