MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / flattenSystem

Function flattenSystem

tools/model-gateway/server.mjs:592–603  ·  view source on GitHub ↗
(system)

Source from the content-addressed store, hash-verified

590}
591
592function flattenSystem(system) {
593 if (!system) {
594 return ''
595 }
596 if (typeof system === 'string') {
597 return system
598 }
599 return normalizeBlocks(system)
600 .filter(block => block.type === 'text')
601 .map(block => block.text || '')
602 .join('\n')
603}
604
605function normalizeBlocks(content) {
606 if (!content) {

Callers 1

Calls 1

normalizeBlocksFunction · 0.85

Tested by

no test coverage detected