feat(context): tambah context::dedup untuk hasil tool yang berulang
Panggilan tool read-only (read, grep, glob, dst) dengan argumen persis sama menyisakan satu salinan penuh saja di context; entri lama diganti placeholder tapi tool-call-nya sendiri tetap terlihat di riwayat. Tool bersifat mutasi (write/edit/bash/dll) tidak pernah disentuh. Jadikan tool_scope::READ_TOOLS pub supaya jadi satu-satunya sumber klasifikasi read-only, dipakai ulang bukan didaftar dua kali. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
059ca8ea24
commit
12a03fd3d1
@@ -18,7 +18,10 @@ pub mod tool_scope {
|
||||
/// Write-tier plus delete, git, and the remaining LSP actions.
|
||||
pub const FULL: &str = "full";
|
||||
|
||||
const READ_TOOLS: &[&str] = &[
|
||||
/// The read-only tool set — reused by `context::dedup` as the
|
||||
/// authoritative "safe to deduplicate" classification, so there's a
|
||||
/// single list of read-only tool names in the codebase instead of two.
|
||||
pub const READ_TOOLS: &[&str] = &[
|
||||
"read", "grep", "glob", "search", "seqthink", "recall",
|
||||
"lsp_connect", "lsp_diagnostics", "lsp_hover", "lsp_definition",
|
||||
"lsp_references", "read_findings",
|
||||
|
||||
Reference in New Issue
Block a user