(definition: PromptDefinition, rawContent: string)
| 237 | } |
| 238 | |
| 239 | function toEditablePromptText(definition: PromptDefinition, rawContent: string): string { |
| 240 | let normalized = stripPromptComments(rawContent).trim() |
| 241 | if (!normalized) { |
| 242 | return "" |
| 243 | } |
| 244 | |
| 245 | if (definition.key === "system") { |
| 246 | normalized = stripConditionalTag(normalized, "manual") |
| 247 | normalized = stripConditionalTag(normalized, "subagent") |
| 248 | } |
| 249 | |
| 250 | if (definition.key !== "compress-range" && definition.key !== "compress-message") { |
| 251 | normalized = normalizeReminderPromptContent(normalized) |
| 252 | } |
| 253 | |
| 254 | return normalized.trim() |
| 255 | } |
| 256 | |
| 257 | function wrapRuntimePromptContent(definition: PromptDefinition, editableText: string): string { |
| 258 | const trimmed = editableText.trim() |
no test coverage detected