( initialMessages?: Message[], initialContentReplacements?: ContentReplacementRecord[], )
| 445 | * populate the replacements Map for byte-identical re-apply. |
| 446 | */ |
| 447 | export function provisionContentReplacementState( |
| 448 | initialMessages?: Message[], |
| 449 | initialContentReplacements?: ContentReplacementRecord[], |
| 450 | ): ContentReplacementState | undefined { |
| 451 | const enabled = getFeatureValue_CACHED_MAY_BE_STALE( |
| 452 | 'tengu_hawthorn_steeple', |
| 453 | false, |
| 454 | ) |
| 455 | if (!enabled) return undefined |
| 456 | if (initialMessages) { |
| 457 | return reconstructContentReplacementState( |
| 458 | initialMessages, |
| 459 | initialContentReplacements ?? [], |
| 460 | ) |
| 461 | } |
| 462 | return createContentReplacementState() |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * Serializable record of one content-replacement decision. Written to the |
no test coverage detected