MCPcopy Create free account
hub / github.com/continuedev/continue / formatMessageContent

Function formatMessageContent

extensions/cli/src/ui/SessionPreview.tsx:13–24  ·  view source on GitHub ↗
(content: string | any)

Source from the content-addressed store, hash-verified

11}
12
13function formatMessageContent(content: string | any): string {
14 if (typeof content === "string") {
15 return content;
16 } else if (Array.isArray(content)) {
17 // For array content, find the first text part
18 const textPart = content.find((part: any) => part.type === "text");
19 return textPart && "text" in textPart
20 ? textPart.text
21 : "(multimodal message)";
22 }
23 return "(unknown content type)";
24}
25
26export function SessionPreview({
27 chatHistory,

Callers 1

SessionPreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected