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

@@ -1171,14 +1171,8 @@ impl ChatApp {
let description =
if self.controller.config().storage.generate_descriptions {
self.status = "Generating description...".to_string();
match self
.controller
.generate_conversation_description()
.await
{
Ok(desc) => Some(desc),
Err(_) => None,
}
(self.controller.generate_conversation_description().await)
.ok()
} else {
None
};
@@ -1780,7 +1774,7 @@ impl ChatApp {
stream,
}) => {
// Step 3: Model loaded, now generating response
self.status = format!("Model loaded. Generating response... (streaming)");
self.status = "Model loaded. Generating response... (streaming)".to_string();
self.spawn_stream(response_id, stream);
match self.controller.mark_stream_placeholder(response_id, "") {