mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-08-01 10:56:02 +00:00
fix(frontend): sync feedback test assertion and format dialog
buildVisibleHistoryMessages now carries feedback onto each flattened message (c9e6aa83). Update the superseded-runs test to expect the new feedback: null field, and apply Prettier line wrapping to feedback-dialog.tsx so the format check passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
86f93a18cc
commit
ecc9f26f44
@ -17,7 +17,10 @@ import {
|
|||||||
import { Textarea } from "../../ui/textarea";
|
import { Textarea } from "../../ui/textarea";
|
||||||
|
|
||||||
/** Maps language-neutral tag slugs to their i18n label keys. */
|
/** Maps language-neutral tag slugs to their i18n label keys. */
|
||||||
const TAG_LABEL_KEYS: Record<FeedbackTagSlug, "incorrect" | "notAsExpected" | "slow" | "styleTone" | "safetyLegal" | "other"> = {
|
const TAG_LABEL_KEYS: Record<
|
||||||
|
FeedbackTagSlug,
|
||||||
|
"incorrect" | "notAsExpected" | "slow" | "styleTone" | "safetyLegal" | "other"
|
||||||
|
> = {
|
||||||
incorrect: "incorrect",
|
incorrect: "incorrect",
|
||||||
not_as_expected: "notAsExpected",
|
not_as_expected: "notAsExpected",
|
||||||
slow: "slow",
|
slow: "slow",
|
||||||
@ -58,7 +61,8 @@ export function FeedbackDialog({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const canSubmit = (selected.size > 0 || comment.trim().length > 0) && !isSubmitting;
|
const canSubmit =
|
||||||
|
(selected.size > 0 || comment.trim().length > 0) && !isSubmitting;
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (!canSubmit) return;
|
if (!canSubmit) return;
|
||||||
|
|||||||
@ -611,10 +611,11 @@ test("buildVisibleHistoryMessages filters superseded runs but keeps regenerated
|
|||||||
];
|
];
|
||||||
|
|
||||||
// run_id is carried onto each content message (#3779) so historical subtask
|
// run_id is carried onto each content message (#3779) so historical subtask
|
||||||
// cards can fetch their persisted step history on expand.
|
// cards can fetch their persisted step history on expand. feedback is carried
|
||||||
|
// the same way so thumb state survives the RunMessage->Message flatten.
|
||||||
expect(buildVisibleHistoryMessages(rows, new Set(["run-old"]))).toEqual([
|
expect(buildVisibleHistoryMessages(rows, new Set(["run-old"]))).toEqual([
|
||||||
{ ...newHuman, run_id: "run-new" },
|
{ ...newHuman, run_id: "run-new", feedback: null },
|
||||||
{ ...newAi, run_id: "run-new" },
|
{ ...newAi, run_id: "run-new", feedback: null },
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user