Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Improve [UI/UX] [Front End] [Chats] attach image #284

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ import { appWindow } from '@tauri-apps/api/window';
import { sendDesktopNotification } from "../utils/taurinotification";
import { clearUnfinishedInputForSession, debouncedSave } from "../utils/storageHelper";
import { MultimodalContent } from "../client/api";
import Image from 'next/image';


const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
loading: () => <LoadingIcon />,
Expand Down Expand Up @@ -1725,10 +1727,11 @@ function _Chat() {
defaultShow={i >= messages.length - 6}
/>
{getMessageImages(message).length == 1 && (
<img
<Image
className={styles["chat-message-item-image"]}
src={getMessageImages(message)[0]}
alt=""
layout="responsive"
/>
)}
{getMessageImages(message).length > 1 && (
Expand All @@ -1742,13 +1745,14 @@ function _Chat() {
>
{getMessageImages(message).map((image, index) => {
return (
<img
<Image
className={
styles["chat-message-item-image-multi"]
}
key={index}
src={image}
alt=""
layout="responsive"
/>
);
})}
Expand Down
Loading