mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-08 00:10:24 +08:00
fix: review comments and frontend build issue in label_initial_prompt.tsx due to previous message_id changes
This commit is contained in:
@@ -12,8 +12,8 @@ export interface Message {
|
||||
|
||||
export const Messages = ({ messages, post_id }: { messages: Message[]; post_id: string }) => {
|
||||
const items = messages.map((messageProps: Message, i: number) => {
|
||||
const { text } = messageProps;
|
||||
const { message_id } = messageProps;
|
||||
const { text } = messageProps;
|
||||
return (
|
||||
<FlaggableElement text={text} post_id={post_id} message_id={message_id} key={i + text}>
|
||||
<MessageView {...messageProps} />
|
||||
@@ -24,7 +24,7 @@ export const Messages = ({ messages, post_id }: { messages: Message[]; post_id:
|
||||
return <Grid gap={2}>{items}</Grid>;
|
||||
};
|
||||
|
||||
export const MessageView = ({ is_assistant, text }: Message) => {
|
||||
export const MessageView = ({ is_assistant, text, message_id }: Message) => {
|
||||
const { colorMode } = useColorMode();
|
||||
|
||||
const bgColor = useMemo(() => {
|
||||
|
||||
@@ -43,7 +43,7 @@ const LabelInitialPrompt = () => {
|
||||
<>
|
||||
<h5 className="text-lg font-semibold">Label Initial Prompt</h5>
|
||||
<p className="text-lg py-1">Provide labels for the following prompt</p>
|
||||
<MessageView text={task.prompt} is_assistant />
|
||||
<MessageView text={task.prompt} is_assistant message_id={task.message_id} />
|
||||
</>
|
||||
<CheckboxSliderGroup labelIDs={task.valid_labels} onChange={setSliderValues} />
|
||||
</TwoColumnsWithCards>
|
||||
|
||||
Reference in New Issue
Block a user