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

Function truncateText

compatible-shell/src/tools.mjs:396–403  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

394}
395
396function truncateText(text) {
397 if (typeof text !== 'string') {
398 return ''
399 }
400 return text.length > MAX_TOOL_OUTPUT
401 ? `${text.slice(0, MAX_TOOL_OUTPUT)}\n...[truncated]`
402 : text
403}
404
405function isObject(value) {
406 return typeof value === 'object' && value !== null && !Array.isArray(value)

Callers 1

runShellCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected