Refactor codebase for consistency and readability

- Standardize array and vector formatting for clarity.
- Adjust spacing and indentation in examples and TUI code.
- Ensure proper newline usage across files (e.g., LICENSE, TOML files, etc.).
- Simplify `.to_string()` and `.ok()` calls for brevity.
This commit is contained in:
2025-10-05 02:31:53 +02:00
parent 13af046eff
commit 4d7ad2c330
12 changed files with 116 additions and 68 deletions

View File

@@ -16,10 +16,16 @@ impl Provider for MyCustomProvider {
}
async fn chat(&self, session: &Session, model: &Model) -> Result<String, anyhow::Error> {
println!("Custom provider received chat request for model: {}", model.name);
println!(
"Custom provider received chat request for model: {}",
model.name
);
// In a real implementation, you would send the session data to an API.
let message_count = session.get_messages().len();
Ok(format!("This is a custom response. You have {} messages in your session.", message_count))
Ok(format!(
"This is a custom response. You have {} messages in your session.",
message_count
))
}
}