fix: persist rectification evidence corrections

This commit is contained in:
Jesse_Chen
2026-07-21 05:23:51 +08:00
parent c68f4e5f4f
commit 887b40df43
16 changed files with 801 additions and 27 deletions
@@ -243,14 +243,33 @@ export function ConversationalRectificationSurface({
submit();
}}
>
{controller.correctionTarget && (
<div className="conversational-correction-target" role="status">
<p>
<strong>{controller.correctionTarget.dateLabel} · {controller.correctionTarget.summary}</strong>
</p>
<span>使</span>
<button
className="button-secondary"
disabled={controller.pending}
type="button"
onClick={() => controller.cancelEvidenceCorrection()}
>
</button>
</div>
)}
<label htmlFor="conversational-rectification-answer">
{controller.correctionTarget ? "填写更正后的真实经历" : "补充真实经历"}
<span></span>
</label>
<textarea
id="conversational-rectification-answer"
disabled={controller.pending || !canAnswer}
maxLength={4_000}
placeholder={controller.correctionTarget
? "例如:其实是 2020 年 11 月离职"
: "请描述一件已经发生的事,并尽量写明年份或月份"}
ref={composer}
rows={4}
value={controller.draft}
@@ -283,13 +302,17 @@ export function ConversationalRectificationSurface({
<ul>
{turn.evidenceRecap.map((entry) => (
<li key={entry.id}>
<div><time>{entry.dateLabel}</time><p>{entry.summary}</p></div>
<div>
<time>{entry.dateLabel}</time>
<p>{entry.summary}</p>
{entry.isCorrection && <span className="conversational-correction-badge"></span>}
</div>
<button
aria-label={`更正这条经历:${entry.summary}`}
disabled={controller.pending || !canAnswer}
type="button"
onClick={() => {
controller.setDraft(`更正「${entry.summary}」(${entry.dateLabel}):`);
controller.beginEvidenceCorrection(entry.id);
focusComposer();
}}
>