MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / truncatePromptPreview

Function truncatePromptPreview

src/utils/autonomyRuns.ts:118–123  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

116}
117
118function truncatePromptPreview(prompt: string): string {
119 const singleLine = prompt.replace(/\s+/g, ' ').trim()
120 return singleLine.length <= 240
121 ? singleLine
122 : `${singleLine.slice(0, 237)}...`
123}
124
125/** A persisted record may lack fields that were added after the initial schema. */
126type PersistedAutonomyRunRecord = Omit<

Callers 1

buildAutonomyRunRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected