- Renamed `execute_compact_prompt` to `compact_prompt_for_bots` and simplified logic - Removed redundant comments and empty lines in test files - Consolidated prompt compaction threshold handling - Cleaned up UI logging implementation by removing unnecessary whitespace - Improved code organization in ui_tree module The changes focus on code quality improvements, removing clutter, and making the prompt compaction logic more straightforward. Test files were cleaned up to be more concise.
21 lines
610 B
Rust
21 lines
610 B
Rust
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
use crate::tests::test_util;
|
|
#[test]
|
|
fn test_last_keyword_mixed_whitespace() {
|
|
test_util::setup();
|
|
let result = std::panic::catch_unwind(|| {
|
|
parse_input("hello\tworld\n");
|
|
});
|
|
assert!(result.is_err(), "Should fail on mixed whitespace");
|
|
}
|
|
#[test]
|
|
fn test_last_keyword_tabs_and_newlines() {
|
|
test_util::setup();
|
|
let result = std::panic::catch_unwind(|| {
|
|
parse_input("hello\n\tworld");
|
|
});
|
|
assert!(result.is_err(), "Should fail on tabs/newlines");
|
|
}
|
|
}
|