Skip to content

fix(messages): avoid code block placeholder collisions#160

Open
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/code-block-placeholder-collision
Open

fix(messages): avoid code block placeholder collisions#160
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/code-block-placeholder-collision

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • generate code-block placeholders with a prefix that cannot collide with the original message
  • preserve literal text such as __QRYPTCHAT_CODE_BLOCK_0__
  • add regression coverage for the collision case

Bug

The formatter used predictable placeholder text while processing fenced code blocks. If a user message contained the same literal marker, the rendered code block replaced that text instead and left the real block as a placeholder.

Tests

  • focused URL converter suite: 5/5 passed with a minimal Vitest config
  • direct regression assertion: passed
  • changed-file oxlint: passed
  • git diff --check: passed

The repository's normal Vitest config is currently blocked before test execution by the pre-existing @vitejs/plugin-react / vite/internal package export mismatch. No invoice will be sent unless this PR is merged and accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant