MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / stripPromptComments

Function stripPromptComments

lib/prompts/store.ts:231–237  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

229}
230
231function stripPromptComments(content: string): string {
232 return content
233 .replace(/^\uFEFF/, "")
234 .replace(/\r\n?/g, "\n")
235 .replace(HTML_COMMENT_REGEX, "")
236 .replace(LEGACY_INLINE_COMMENT_LINE_REGEX, "")
237}
238
239function toEditablePromptText(definition: PromptDefinition, rawContent: string): string {
240 let normalized = stripPromptComments(rawContent).trim()

Callers 1

toEditablePromptTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected