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:
@@ -1,12 +1,12 @@
|
||||
use sysinfo::{System, Pid};
|
||||
use sysinfo::{Pid, System};
|
||||
|
||||
fn main() {
|
||||
let mut sys = System::new_all();
|
||||
sys.refresh_processes();
|
||||
|
||||
|
||||
// Test with known PIDs
|
||||
let pids = vec![68123, 72749];
|
||||
|
||||
|
||||
for pid_num in pids {
|
||||
let pid = Pid::from_u32(pid_num);
|
||||
if let Some(process) = sys.process(pid) {
|
||||
|
||||
Reference in New Issue
Block a user