mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-07-25 15:37:53 +00:00
fix(frontend): carry feedback across the RunMessage conversion
The message-list page rows attach the current user's feedback on the wrapper level, next to run_id; flattening RunMessage into Message kept run_id but dropped feedback, so thumb state was lost after a reload.
This commit is contained in:
parent
808e31e2ee
commit
c9e6aa830b
@ -254,6 +254,9 @@ export function buildVisibleHistoryMessages(
|
||||
...visibleRows.map((message) => ({
|
||||
...message.content,
|
||||
run_id: message.run_id,
|
||||
// feedback also lives on the RunMessage wrapper (backend attaches it to
|
||||
// the run's last AI row); carry it over or the thumbs lose their echo.
|
||||
feedback: message.feedback ?? null,
|
||||
})),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import type { Message, Thread } from "@langchain/langgraph-sdk";
|
||||
|
||||
import type { FeedbackData } from "@/core/api/feedback";
|
||||
|
||||
import type { Todo } from "../todos";
|
||||
|
||||
export interface GoalState {
|
||||
@ -54,6 +56,9 @@ export interface AgentThread extends Thread<AgentThreadState> {
|
||||
export interface RunMessage {
|
||||
run_id: string;
|
||||
seq?: number;
|
||||
/** Current user's feedback for the run, attached by the backend to the
|
||||
* run's last AI message row (echo path for the thumb buttons). */
|
||||
feedback?: FeedbackData | null;
|
||||
content: Message;
|
||||
metadata: {
|
||||
caller: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user