mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:18:26 +00:00
fix: clear matched tool errors and dedupe reasoning end
This commit is contained in:
committed by
Vignesh
parent
221d50bc18
commit
0ff506140d
@@ -151,6 +151,7 @@ export function buildToolActionFingerprint(
|
||||
if (action) {
|
||||
parts.push(`action=${action}`);
|
||||
}
|
||||
let hasStableTarget = false;
|
||||
for (const key of [
|
||||
"path",
|
||||
"filePath",
|
||||
@@ -167,10 +168,14 @@ export function buildToolActionFingerprint(
|
||||
const value = normalizeFingerprintValue(record?.[key]);
|
||||
if (value) {
|
||||
parts.push(`${key.toLowerCase()}=${value}`);
|
||||
hasStableTarget = true;
|
||||
}
|
||||
}
|
||||
const normalizedMeta = meta?.trim().replace(/\s+/g, " ").toLowerCase();
|
||||
if (normalizedMeta) {
|
||||
// Meta text often carries volatile details (for example "N chars").
|
||||
// Prefer stable arg-derived keys for matching; only fall back to meta
|
||||
// when no stable target key is available.
|
||||
if (normalizedMeta && !hasStableTarget) {
|
||||
parts.push(`meta=${normalizedMeta}`);
|
||||
}
|
||||
return parts.join("|");
|
||||
|
||||
Reference in New Issue
Block a user