pub const COMPACTION_SUMMARY_PREFIX: &str = "The conversation history before this point was compacted into the following summary:\n\n<summary>\n";
pub const COMPACTION_SUMMARY_SUFFIX: &str = "\n</summary>";
pub const BRANCH_SUMMARY_PREFIX: &str =
"The following is a summary of a branch that this conversation came back from:\n\n<summary>\n";
pub const BRANCH_SUMMARY_SUFFIX: &str = "</summary>";
pub(crate) fn truncate_for_error(s: &str) -> String {
if s.len() > 1000 {
format!("{}...", &s[..1000])
} else {
s.to_string()
}
}
pub(crate) fn sanitize_surrogates(s: &str) -> String {
s.to_string()
}