From bdc6a53f81d97da4521101efe23374f8330ae6cd Mon Sep 17 00:00:00 2001 From: LuminousRuoxi <2494735589@qq.com> Date: Fri, 11 Sep 2026 10:26:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E6=8E=89=E9=9A=8F=20agent?= =?UTF-8?q?=20=E5=8C=96=E5=A4=B1=E6=95=88=E7=9A=84=20applyUnderstandingCor?= =?UTF-8?q?rection=EF=BC=8C=E5=8E=9F=E4=BD=8D=E7=95=99=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E5=81=8F=E5=B7=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 顾问纠正某段理解时,改造前它会同时改写该段的 semantic_anchor;现在走 record_advisor_note 只落成分段约束,锚点不跟着改。纠正内容仍会进诊断/复检的 paragraph_constraints,所以不是静默丢失,但与原行为有差——写在原函数位置而不是 只记在方案文档里,读代码的人能看见。 --- index.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index ebc156a..3dc40b9 100644 --- a/index.html +++ b/index.html @@ -770,18 +770,11 @@ function handleAction(action){ renderEntryEssay(); } } -function applyUnderstandingCorrection(text){ - const idx = parseParagraphIndex(text); - if(idx===null || !analysis || !analysis.paragraphs[idx]){ - globalConstraints.push(text); - return {scope:'global', label:'文章理解的补充'}; - } - analysis.paragraphs[idx].natural_meaning_zh = text; - analysis.paragraphs[idx].semantic_anchor = text; - const pid = pidOf(idx); - (paragraphConstraints[pid]=paragraphConstraints[pid]||[]).push(text); - return {scope:pid, label:`${paragraphLabel(idx)} 的理解`}; -} +// 原先这里是 applyUnderstandingCorrection:顾问在理解态说「第三段重点不是……」时, +// 它把这句话同时写进 analysis.paragraphs[i] 的 natural_meaning_zh / semantic_anchor 和 +// paragraphConstraints。Agent 化之后这条输入走 record_advisor_note,只落成分段约束, +// **锚点不再跟着改**(纠正内容仍会进诊断/复检的 paragraph_constraints)。 +// 这是已知偏差,不是遗漏:要不要补一个带 anchor 更新的「纠正理解」工具待定。 function applyDiagnosisConstraint(text){ const raw = text.trim(); const idx = parseParagraphIndex(raw);