feat: enhance error handling in OAuth URL building and client creation; improve tool argument sanitization

This commit is contained in:
asepharyana
2026-07-12 10:23:26 +07:00
parent 0cc60c12ce
commit bb621fdff2
10 changed files with 79 additions and 43 deletions
+3
View File
@@ -56,6 +56,9 @@ impl Tool for Edit {
if reason.trim().is_empty() {
anyhow::bail!("reason must be a non-empty string");
}
if old.is_empty() {
anyhow::bail!("'old' must be a non-empty string; use 'write' to replace entire file contents");
}
let check_matches = check_graduated_checks(&rel, &new_str, &ctx.graduated_checks);
let replace_all = args.get("replace_all").and_then(|v| v.as_bool()).unwrap_or(false);
let path: PathBuf = resolve_path(&ctx.workspaces, &rel)?;