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:
@@ -3,13 +3,15 @@ use g3_console::process::ProcessDetector;
|
||||
|
||||
fn main() {
|
||||
let mut detector = ProcessDetector::new();
|
||||
|
||||
|
||||
match detector.detect_instances() {
|
||||
Ok(instances) => {
|
||||
println!("Found {} instances:", instances.len());
|
||||
for instance in instances {
|
||||
println!(" - PID: {}, Workspace: {:?}, Type: {:?}",
|
||||
instance.pid, instance.workspace, instance.instance_type);
|
||||
println!(
|
||||
" - PID: {}, Workspace: {:?}, Type: {:?}",
|
||||
instance.pid, instance.workspace, instance.instance_type
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user