(content)
| 81 | const CG_CLI_RE = /(^|[;&|(]|&&|\|\||\$\(|`)\s*(?:[A-Za-z_]\w*=\S*\s+)*[\w./~-]*codegraph(\s|$)/; |
| 82 | |
| 83 | const 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. */ |
| 89 | function assistantBlockChars(b) { |
no test coverage detected