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

Function normalizeBlocks

tools/model-gateway/server.mjs:605–616  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

603}
604
605function normalizeBlocks(content) {
606 if (!content) {
607 return []
608 }
609 if (typeof content === 'string') {
610 return [{ type: 'text', text: content }]
611 }
612 if (!Array.isArray(content)) {
613 return []
614 }
615 return content
616}
617
618function flattenToolResult(content) {
619 if (typeof content === 'string') {

Callers 2

flattenSystemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected