Skip to content

Commit

Permalink
add chat icon
Browse files Browse the repository at this point in the history
  • Loading branch information
greywen committed Dec 26, 2024
1 parent 402d1d3 commit c06739d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
23 changes: 0 additions & 23 deletions src/FE/components/Icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1514,28 +1514,6 @@ var IconMinus = (props: IconProps) => {
);
};

var IconMore = (props: IconProps) => {
const { className, size = 20, strokeWidth = 2, stroke, onClick } = props;

return (
<svg
xmlns="http://www.w3.org/2000/svg"
onClick={onClick}
className={className}
width={size}
height={size}
strokeWidth={strokeWidth}
stroke={stroke || 'hsl(var(--foreground))'}
viewBox="0 0 24 24"
fill="none"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z"></path>
</svg>
);
};

var Icon = (props: IconProps) => {
const { className, size = 20, strokeWidth = 2, stroke, onClick } = props;

Expand Down Expand Up @@ -1612,5 +1590,4 @@ export {
IconLoader,
IconModelSearch,
IconMinus,
IconMore,
};
9 changes: 4 additions & 5 deletions src/FE/pages/home/_components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ const Chat = memo(() => {
} else if (value.k === SseResponseKind.UserMessage) {
messageList.push(value.r);
} else if (value.k === SseResponseKind.ResponseMessage) {
console.log('----------');
const { r: msg, i: spanId } = value;
const msgId = `${ResponseMessageTempId}-${spanId}`;
updateSelectedResponseMessage(
Expand Down Expand Up @@ -495,12 +496,10 @@ const Chat = memo(() => {
'border-primary/50',
)}
>
{/* <ChatIcon
<ChatIcon
className="w-7 h-7 mr-1"
providerId={
modelMap[message.modelId!].modelProviderId
}
/> */}
providerId={message.modelProviderId!}
/>
<div className="prose dark:prose-invert rounded-r-md">
{message.status === ChatStatus.Failed && (
<ChatError error={message.content.error} />
Expand Down
1 change: 1 addition & 0 deletions src/FE/types/chatMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface ChatMessage {
isActive?: boolean;
modelName?: string;
modelId?: number;
modelProviderId?: number;
inputPrice?: number;
outputPrice?: number;
inputTokens?: number;
Expand Down

0 comments on commit c06739d

Please sign in to comment.