MCPcopy Create free account
hub / github.com/anomalyco/opencode / preview

Function preview

packages/opencode/src/tool/shell.ts:220–223  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

218}
219
220function preview(text: string) {
221 if (text.length <= MAX_METADATA_LENGTH) return text
222 return "...\n\n" + text.slice(-MAX_METADATA_LENGTH)
223}
224
225function tail(text: string, maxLines: number, maxBytes: number) {
226 const lines = text.split("\n")

Callers 1

shell.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected