Skip to content

Fix truncation marker overflow#833

Open
hiSandog wants to merge 1 commit into
CodebuffAI:mainfrom
hiSandog:fix/small-cleanup-20260701
Open

Fix truncation marker overflow#833
hiSandog wants to merge 1 commit into
CodebuffAI:mainfrom
hiSandog:fix/small-cleanup-20260701

Conversation

@hiSandog

@hiSandog hiSandog commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Keep truncateStringWithMessage outputs within maxLength when the truncation marker is longer than the limit.
  • Cover END, START, and MIDDLE truncation edge cases.
  • Preserve context around the marker when the limit is large enough.

Validation:

  • /Users/sandog/.real/.bin/bun test common/src/util/tests/string.test.ts
  • git diff --check

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