feat: enhance context gathering in auto-review engine and agent runner
This commit is contained in:
@@ -194,11 +194,17 @@ pub fn build_workspace_tree(root: &Path, max_files: usize) -> String {
|
||||
// Rich Context Builder
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Gathers essential project context (OS, Time, Git, Tech Stack, Rules) into a string.
|
||||
/// Gathers essential project context (OS, Time, PWD, Git, Tech Stack, Rules) into a string.
|
||||
pub fn build_rich_context(root: &Path) -> String {
|
||||
use std::process::Command;
|
||||
let mut ctx = String::new();
|
||||
|
||||
// 0. Current working directory (PWD)
|
||||
let cwd = std::env::current_dir()
|
||||
.map(|p| p.to_string_lossy().to_string())
|
||||
.unwrap_or_else(|_| "unknown".to_string());
|
||||
ctx.push_str(&format!("### Current Directory (PWD)\n`{cwd}`\n\n"));
|
||||
|
||||
// 1. Time and OS
|
||||
let os = std::env::consts::OS;
|
||||
let arch = std::env::consts::ARCH;
|
||||
|
||||
Reference in New Issue
Block a user