MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / getMessageTextContent

Function getMessageTextContent

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

Source from the content-addressed store, hash-verified

234}
235
236export function getMessageTextContent(message: RequestMessage) {
237 if (typeof message.content === "string") {
238 return message.content;
239 }
240 for (const c of message.content) {
241 if (c.type === "text") {
242 return c.text ?? "";
243 }
244 }
245 return "";
246}
247
248export function getMessageTextContentWithoutThinking(message: RequestMessage) {
249 let content = "";

Callers 15

chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90
chatMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected