MCPcopy Create free account
hub / github.com/cortexkit/magic-context / collectUserPromptParts

Function collectUserPromptParts

packages/pi-plugin/src/auto-search-pi.ts:133–144  ·  view source on GitHub ↗
(message: UserMessage)

Source from the content-addressed store, hash-verified

131}
132
133function collectUserPromptParts(message: UserMessage): string {
134 const { content } = message;
135 if (typeof content === "string") return content;
136
137 let collected = "";
138 for (const part of content) {
139 if (part.type === "text" && typeof part.text === "string") {
140 collected += (collected.length > 0 ? "\n" : "") + part.text;
141 }
142 }
143 return collected;
144}
145
146function hasStackedAugmentation(rawText: string): boolean {
147 return (

Callers 4

extractUserPromptTextFunction · 0.70
appendHintToUserMessageFunction · 0.70
runAutoSearchHintForPiFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected