MCPcopy
hub / github.com/ChatAnyTeam/ChatAny / getMessageTextContent

Function getMessageTextContent

app/utils.ts:225–235  ·  view source on GitHub ↗
(message: RequestMessage)

Source from the content-addressed store, hash-verified

223}
224
225export function getMessageTextContent(message: RequestMessage) {
226 if (typeof message.content === "string") {
227 return message.content;
228 }
229 for (const c of message.content) {
230 if (c.type === "text") {
231 return c.text ?? "";
232 }
233 }
234 return "";
235}
236
237export function getMessageImages(message: RequestMessage): string[] {
238 if (typeof message.content === "string") {

Callers 15

chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
doSearchFunction · 0.90
MessageSelectorFunction · 0.90
ContextPromptItemFunction · 0.90
updateContextPromptFunction · 0.90
onRightClickFunction · 0.90
onResendFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected