add context window monitor
Writes the current context window to logs/current_context_window (uses a symlink to a session ID). This PR was unfortunately generated by a different LLM and did a ton of superficial reformating, it's actually a fairly small and benign change, but I don't want to roll back everything. Hope that's ok.
This commit is contained in:
@@ -7,10 +7,10 @@ mod tilde_expansion_tests {
|
||||
// Test that shellexpand works
|
||||
let path_with_tilde = "~/test.txt";
|
||||
let expanded = shellexpand::tilde(path_with_tilde);
|
||||
|
||||
|
||||
// Get the actual home directory
|
||||
let home = env::var("HOME").expect("HOME environment variable not set");
|
||||
|
||||
|
||||
// Verify expansion happened
|
||||
assert_eq!(expanded.as_ref(), format!("{}/test.txt", home));
|
||||
assert!(!expanded.contains("~"));
|
||||
@@ -20,9 +20,9 @@ mod tilde_expansion_tests {
|
||||
fn test_tilde_expansion_with_subdirs() {
|
||||
let path_with_tilde = "~/Documents/test.txt";
|
||||
let expanded = shellexpand::tilde(path_with_tilde);
|
||||
|
||||
|
||||
let home = env::var("HOME").expect("HOME environment variable not set");
|
||||
|
||||
|
||||
assert_eq!(expanded.as_ref(), format!("{}/Documents/test.txt", home));
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ mod tilde_expansion_tests {
|
||||
fn test_no_tilde_unchanged() {
|
||||
let path_without_tilde = "/absolute/path/test.txt";
|
||||
let expanded = shellexpand::tilde(path_without_tilde);
|
||||
|
||||
|
||||
assert_eq!(expanded.as_ref(), path_without_tilde);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user