Fix opencode tool-use log parsing (#466)

The log format has changed.
This commit is contained in:
Solomon
2025-08-14 15:37:46 +01:00
committed by GitHub
parent 450d6e87eb
commit bcb7e53607
2 changed files with 179 additions and 76 deletions

View File

@@ -18,7 +18,11 @@ pub fn make_path_relative(path: &str, worktree_path: &str) -> String {
Ok(relative_path) => {
let result = relative_path.to_string_lossy().to_string();
tracing::debug!("Successfully made relative: '{}' -> '{}'", path, result);
result
if result.is_empty() {
".".to_string()
} else {
result
}
}
Err(_) => {
// Handle symlinks by resolving canonical paths
@@ -43,7 +47,11 @@ pub fn make_path_relative(path: &str, worktree_path: &str) -> String {
path,
result
);
result
if result.is_empty() {
".".to_string()
} else {
result
}
}
Err(e) => {
tracing::warn!(