Refactor truncation helpers into its own file (#6683)

That's to centralize the truncation in one place. Next step would be to
make only two methods public: one with bytes/lines and one with tokens.
This commit is contained in:
Ahmed Ibrahim
2025-11-14 22:44:23 -08:00
committed by GitHub
parent b560c5cef1
commit 94dfb211af
7 changed files with 425 additions and 189 deletions

View File

@@ -1,8 +1,7 @@
mod history;
mod normalize;
mod truncate;
pub(crate) use crate::truncate::MODEL_FORMAT_MAX_BYTES;
pub(crate) use crate::truncate::MODEL_FORMAT_MAX_LINES;
pub(crate) use crate::truncate::format_output_for_model_body;
pub(crate) use history::ContextManager;
pub(crate) use truncate::MODEL_FORMAT_MAX_BYTES;
pub(crate) use truncate::MODEL_FORMAT_MAX_LINES;
pub(crate) use truncate::format_output_for_model_body;