Skip to content

Conversation

@pakrym-oai
Copy link
Collaborator

No description provided.

Introduce split_string() to compute prefix/suffix slices and removed
char count in a single UTF-8–safe pass, and use it in
truncate_with_byte_estimate.

Remove truncate_on_boundary/pick_prefix_end/pick_suffix_start in favor
of split_string, and add unit tests covering empty input, overlapping
budgets, and UTF-8 edge cases.

Adjust utf8-related
# Conflicts:
#	codex-rs/core/src/truncate.rs
@pakrym-oai pakrym-oai merged commit 92e3046 into main Nov 20, 2025
22 of 25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/single-pass-truncation branch November 20, 2025 00:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants