fix(session): prevent consumed follow-ups from replaying after restart (#6299)

* fix(session): atomically acknowledge consumed follow-ups

* refactor(webui): drop legacy follow-up replay compatibility
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-19 11:31:19 +08:00
1 parent 743d40bbba
commit 53e0edf709
17 files changed
+645 -215

No files matched your search

@@ -3,6 +3,7 @@ import type { UIMessage } from "@/lib/types";
export interface PromptAnchor {
answerPreview: string;
id: string;
turnId?: string;
label: string;
preview: string;
createdAt: number;
@@ -17,6 +18,7 @@ export function userPromptAnchors(messages: UIMessage[]): PromptAnchor[] {
const anchor: PromptAnchor = {
answerPreview: nextAssistantPreview(messages, messageIndex),
id: message.id,
...(message.turnId ? { turnId: message.turnId } : {}),
label: promptLabel(message.content, index),
preview: promptPreview(message.content, index),
createdAt: message.createdAt,