MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / getUserOriginalText

Function getUserOriginalText

frontend/components/chat-message-display.tsx:163–168  ·  view source on GitHub ↗
(message: UIMessage)

Source from the content-addressed store, hash-verified

161
162// Get only the user's original text, excluding appended file content
163const getUserOriginalText = (message: UIMessage): string => {
164 const fullText = getMessageTextContent(message)
165 // Strip out [PDF: ...] and [File: ...] sections that were appended
166 const filePattern = /\n\n\[(PDF|File):\s*[^\]]+\]\n[\s\S]*$/
167 return fullText.replace(filePattern, "").trim()
168}
169
170interface ChatMessageDisplayProps {
171 messages: UIMessage[]

Callers 1

ChatMessageDisplayFunction · 0.85

Calls 1

getMessageTextContentFunction · 0.85

Tested by

no test coverage detected