MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getUserPromptPreview

Function getUserPromptPreview

src/hooks/useTurnDiffs.ts:70–77  ·  view source on GitHub ↗
(message: Message)

Source from the content-addressed store, hash-verified

68}
69
70function getUserPromptPreview(message: Message): string {
71 if (message.type !== 'user') return ''
72 const content = message.message.content
73 const text = typeof content === 'string' ? content : ''
74 // Truncate to ~30 chars
75 if (text.length <= 30) return text
76 return text.slice(0, 29) + '…'
77}
78
79function computeTurnStats(turn: TurnDiff): void {
80 let totalAdded = 0

Callers 1

useTurnDiffsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected