修复: 文件日志 + G1 日志增强 + 清理死代码
- 文件日志: tracing-subscriber + tracing-appender 写入 %TEMP%/devflow-trace.log - G1 日志: 增加 first_goal 字段显示首条目标内容 - 清理: 删 workspace_root_str / data_dir_path 死代码 - 标注: default_with_root 加 cfg_attr 抑制 non-test 编译警告
This commit is contained in:
@@ -437,24 +437,6 @@ fn normalize_dir_key(dir: &str) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// workspace_root 字符串(作 run_command working_dir 缺省时的 trust key 回退)。
|
||||
///
|
||||
/// 与 tool_registry.rs workspace_root() 同源(CARGO_MANIFEST_DIR 上两级),canonicalize 后
|
||||
/// 保证与 run_command handler 默认 working_dir = workspace_root().to_string() 生成的 key 一致。
|
||||
fn workspace_root_str() -> String {
|
||||
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.and_then(|p| p.parent())
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|| PathBuf::from("."));
|
||||
root.canonicalize()
|
||||
.map(|c| c.to_string_lossy().to_string())
|
||||
.unwrap_or_else(|_| root.to_string_lossy().to_string())
|
||||
}
|
||||
|
||||
// 引入 PathBuf 供 workspace_root_str / dir_of_path_normalized 使用
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// AI 会话内状态(Mutex 保护)
|
||||
///
|
||||
/// F-260616-09 B 批4(决策 e 真并发上线):会话级状态全部迁入 [`per_conv`](Self::per_conv)
|
||||
|
||||
Reference in New Issue
Block a user