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:
@@ -196,12 +196,19 @@ pub fn extract_summary(response: &str) -> Option<String> {
|
||||
|
||||
/// Write the codebase report to logs directory
|
||||
fn write_code_report(report: &str) -> Result<()> {
|
||||
// Ensure logs directory exists
|
||||
fs::create_dir_all("logs")?;
|
||||
// Get logs directory from workspace path or current dir
|
||||
let logs_dir = if let Ok(workspace_path) = std::env::var("G3_WORKSPACE_PATH") {
|
||||
std::path::PathBuf::from(workspace_path).join("logs")
|
||||
} else {
|
||||
std::env::current_dir().unwrap_or_default().join("logs")
|
||||
};
|
||||
|
||||
// Ensure logs directory exists
|
||||
fs::create_dir_all(&logs_dir)?;
|
||||
|
||||
// Generate timestamp in same format as tool_calls log
|
||||
let timestamp = Local::now().format("%Y%m%d_%H%M%S").to_string();
|
||||
let filename = format!("logs/code_report_{}.log", timestamp);
|
||||
let filename = logs_dir.join(format!("code_report_{}.log", timestamp));
|
||||
|
||||
// Write the report to file
|
||||
let mut file = OpenOptions::new()
|
||||
@@ -218,12 +225,19 @@ fn write_code_report(report: &str) -> Result<()> {
|
||||
|
||||
/// Write the discovery commands to logs directory
|
||||
fn write_discovery_commands(commands: &[String]) -> Result<()> {
|
||||
// Get logs directory from workspace path or current dir
|
||||
let logs_dir = if let Ok(workspace_path) = std::env::var("G3_WORKSPACE_PATH") {
|
||||
std::path::PathBuf::from(workspace_path).join("logs")
|
||||
} else {
|
||||
std::env::current_dir().unwrap_or_default().join("logs")
|
||||
};
|
||||
|
||||
// Ensure logs directory exists
|
||||
fs::create_dir_all("logs")?;
|
||||
fs::create_dir_all(&logs_dir)?;
|
||||
|
||||
// Generate timestamp in same format as tool_calls log
|
||||
let timestamp = Local::now().format("%Y%m%d_%H%M%S").to_string();
|
||||
let filename = format!("logs/discovery_commands_{}.log", timestamp);
|
||||
let filename = logs_dir.join(format!("discovery_commands_{}.log", timestamp));
|
||||
|
||||
// Write the commands to file
|
||||
let mut file = OpenOptions::new()
|
||||
|
||||
Reference in New Issue
Block a user