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:
@@ -6,19 +6,19 @@ use g3_providers::{Message, MessageRole};
|
||||
fn main() {
|
||||
println!("=== Message ID Implementation Verification ===");
|
||||
println!();
|
||||
|
||||
|
||||
// Create several messages to show ID generation
|
||||
println!("Creating 5 messages to demonstrate ID generation:");
|
||||
for i in 1..=5 {
|
||||
let msg = Message::new(MessageRole::User, format!("Test message {}", i));
|
||||
println!(" Message {}: id = '{}'", i, msg.id);
|
||||
}
|
||||
|
||||
|
||||
println!();
|
||||
println!("ID Format: HHMMSS-XXX");
|
||||
println!(" - HHMMSS: Current time (hours, minutes, seconds)");
|
||||
println!(" - XXX: 3 random alphabetic characters (a-z, A-Z)");
|
||||
|
||||
|
||||
println!();
|
||||
println!("Verifying ID is NOT serialized to JSON:");
|
||||
let msg = Message::new(MessageRole::User, "Hello World".to_string());
|
||||
@@ -26,7 +26,7 @@ fn main() {
|
||||
println!(" Message ID: {}", msg.id);
|
||||
println!(" JSON output: {}", json);
|
||||
println!(" Contains 'id' field: {}", json.contains("\"id\""));
|
||||
|
||||
|
||||
println!();
|
||||
println!("✅ Implementation complete!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user