diff --git a/src/chatbox.tsx b/src/chatbox.tsx index d9ad636..2f9a9b1 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -722,7 +722,7 @@ export default function ChatBOX(props: { /> ))} {showGenerating && ( -

+

{generatingMessage || Tr("Generating...")} ...

diff --git a/src/logprob.tsx b/src/logprob.tsx index 5089d3e..2d20404 100644 --- a/src/logprob.tsx +++ b/src/logprob.tsx @@ -6,7 +6,7 @@ const logprobToColor = (logprob: number) => { // 绿色的RGB值为(0, 255, 0),红色的RGB值为(255, 0, 0) const red = Math.round(255 * (1 - percent / 100)); const green = Math.round(255 * (percent / 100)); - const color = `rgb(${red}, ${green}, 0)`; + const color = `rgba(${red}, ${green}, 0, 0.5)`; return color; }; diff --git a/src/message.tsx b/src/message.tsx index 7cb378d..caa2ebe 100644 --- a/src/message.tsx +++ b/src/message.tsx @@ -51,17 +51,26 @@ export default function Message(props: Props) { setChatStore({ ...chatStore }); }} > - 🗑️ + Delete ); const CopiedHint = () => ( - - {Tr("Message copied to clipboard!")} - + ); const copyToClipboard = (text: string) => { @@ -78,7 +87,7 @@ export default function Message(props: Props) { copyToClipboard(textToCopy); }} > - 📋 + Copy ); @@ -105,51 +114,62 @@ export default function Message(props: Props) { >
- {chat.hide ? ( - - ) : typeof chat.content !== "string" ? ( - - ) : chat.tool_calls ? ( - - ) : chat.role === "tool" ? ( - - ) : renderMarkdown ? ( - // @ts-ignore - - ) : ( -
- { - // only show when content is string or list of message - // this check is used to avoid rendering tool call - chat.content && - (chat.logprobs && renderColor - ? chat.logprobs.content - .filter((c) => c.token) - .map((c) => ( -
- {c.token} -
- )) - : getMessageText(chat)) - } -
- )} -
- -
+
+ {chat.hide ? ( + + ) : typeof chat.content !== "string" ? ( + + ) : chat.tool_calls ? ( + + ) : chat.role === "tool" ? ( + + ) : renderMarkdown ? ( + // @ts-ignore + + ) : ( +
+ { + // only show when content is string or list of message + // this check is used to avoid rendering tool call + chat.content && + (chat.logprobs && renderColor + ? chat.logprobs.content + .filter((c) => c.token) + .map((c) => ( +
+ {c.token} +
+ )) + : getMessageText(chat)) + } +
+ )} +
+