Refine planner mode UI, logging, and history tracking
- Display coach feedback content (up to 25 lines) instead of just length - Write GIT COMMIT entry to history before actual commit for better a... - Implement single-line status updates during LLM processing with too... - Display non-tool LLM text responses in planner UI - Redirect all logs to <workspace>/logs directory instead of codepath - Preserve TODO file in planner mode for history (prevent deletion) Completed files: - completed_requirements_2025-12-09_16-16-51.md - completed_todo_2025-12-09_16-16-51.md
This commit is contained in:
@@ -129,26 +129,27 @@ impl ErrorContext {
|
||||
return;
|
||||
}
|
||||
|
||||
let logs_dir = std::path::Path::new("logs/errors");
|
||||
let base_logs_dir = crate::logs_dir();
|
||||
let logs_dir = base_logs_dir.join("errors");
|
||||
if !logs_dir.exists() {
|
||||
if let Err(e) = std::fs::create_dir_all(logs_dir) {
|
||||
if let Err(e) = std::fs::create_dir_all(&logs_dir) {
|
||||
error!("Failed to create error logs directory: {}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let filename = format!(
|
||||
"logs/errors/error_{}_{}.json",
|
||||
let filename = logs_dir.join(format!(
|
||||
"error_{}_{}.json",
|
||||
self.timestamp,
|
||||
self.session_id.as_deref().unwrap_or("unknown")
|
||||
);
|
||||
));
|
||||
|
||||
match serde_json::to_string_pretty(self) {
|
||||
Ok(json_content) => {
|
||||
if let Err(e) = std::fs::write(&filename, json_content) {
|
||||
error!("Failed to save error context to {}: {}", filename, e);
|
||||
error!("Failed to save error context to {:?}: {}", &filename, e);
|
||||
} else {
|
||||
info!("Error details saved to: {}", filename);
|
||||
info!("Error details saved to: {:?}", &filename);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user