Upgrade Alias-Agent to 0.2.0 (#51)
Upgrade Alias-Agent to 0.2.0 --------- Co-authored-by: ZiTao-Li <zitao.l@alibaba-inc.com> Co-authored-by: xieyxclack <yuexiang.xyx@alibaba-inc.com> Co-authored-by: Zexi Li <tomleeze@qq.com> Co-authored-by: SSSuperDan <dlaura2218@gmail.com> Co-authored-by: lalaliat <78087788+lalaliat@users.noreply.github.com> Co-authored-by: jinli.yl <jinli.yl@alibaba-inc.com> Co-authored-by: Dengjiaji <dengjiaji.djj@alibaba-inc.com> Co-authored-by: 于南 <zengtianjing.ztj@alibaba-inc.com> Co-authored-by: JustinDing <166603159+sleepy-bird-world@users.noreply.github.com> Co-authored-by: y1y5 <269557841@qq.com> Co-authored-by: 柳佚 <yly287738@alibaba-inc.com> Co-authored-by: LiangguiWeng <347185100@qq.com> Co-authored-by: 潜星 <zhijian.mzj@alibaba-inc.com> Co-authored-by: StCarmen <1106135234@qq.com> Co-authored-by: LuYi <yilu_2000@outlook.com> Co-authored-by: 刺葳 <ciwei.cy@alibaba-inc.com>
This commit is contained in:
26
alias/frontend/src/components/Chat/ResponseMessage.tsx
Normal file
26
alias/frontend/src/components/Chat/ResponseMessage.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from "react";
|
||||
import { ResponseMessage as ResponseMessageType } from "@/types/message";
|
||||
import { BaseMessage } from "./BaseMessage";
|
||||
import styles from "./Message.module.scss";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
interface ResponseMessageProps {
|
||||
message: ResponseMessageType;
|
||||
onFeedback?: (messageId: string, feedback: "like" | "dislike" | null) => void;
|
||||
}
|
||||
|
||||
export const ResponseMessage: React.FC<ResponseMessageProps> = ({
|
||||
message,
|
||||
onFeedback,
|
||||
}) => {
|
||||
return (
|
||||
<BaseMessage message={message} onFeedback={onFeedback}>
|
||||
<div className={styles.markdown}>
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
{message.content}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
</BaseMessage>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user