MCPcopy Create free account
hub / github.com/Noumena-Network/code / preview

Function preview

src/tools/REPLTool/pyReplFactory.tsx:146–151  ·  view source on GitHub ↗
(value: string, maxChars: number = PREVIEW_LIMIT)

Source from the content-addressed store, hash-verified

144}
145
146function preview(value: string, maxChars: number = PREVIEW_LIMIT): string {
147 if (value.length <= maxChars) {
148 return value
149 }
150 return `${value.slice(0, maxChars)}\n...[truncated ${value.length - maxChars} chars]`
151}
152
153function parsePragmaTimeout(code: string): number | undefined {
154 const firstLine = code.split('\n', 1)[0]?.trimStart() ?? ''

Callers 4

formatToolCallSummaryFunction · 0.70
formatModelToolResultFunction · 0.70
renderProgressHintFunction · 0.70
renderToolUseMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected