Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
niwsa committed Jul 29, 2024
1 parent b33cea6 commit 2cd47dd
Showing 1 changed file with 17 additions and 30 deletions.
47 changes: 17 additions & 30 deletions internal-ui/src/chat/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
SparklesIcon,
UserIcon,
ChatBubbleOvalLeftEllipsisIcon,
} from '@heroicons/react/24/outline';
import { SparklesIcon, UserIcon, ChatBubbleOvalLeftEllipsisIcon } from '@heroicons/react/24/outline';

const Message = (props: any) => {
const { message } = props;
Expand All @@ -13,40 +9,31 @@ const Message = (props: any) => {
return (
<div
className={`group w-full text-gray-800 dark:text-gray-100 border-b border-black/10 dark:border-gray-900/50 ${
isUser
? 'dark:bg-gray-800 bg-gray-50'
: 'bg-secondary-content dark:bg-[#444654]'
isUser ? 'dark:bg-gray-800 bg-gray-50' : 'bg-secondary-content dark:bg-[#444654]'
}
}`}
>
<div className="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl flex lg:px-0 m-auto w-full">
<div className="flex flex-row gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 lg:px-0 m-auto w-full">
<div className="w-8 flex flex-col relative items-end">
<div className="relative h-7 w-7 p-1 rounded-sm text-white flex items-center justify-center bg-black/75 text-opacity-100r">
}`}>
<div className='text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl flex lg:px-0 m-auto w-full'>
<div className='flex flex-row gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 lg:px-0 m-auto w-full'>
<div className='w-8 flex flex-col relative items-end'>
<div className='relative h-7 w-7 p-1 rounded-sm text-white flex items-center justify-center bg-black/75 text-opacity-100r'>
{isUser ? (
<UserIcon className="h-5 w-5 text-white" />
<UserIcon className='h-5 w-5 text-white' />
) : (
<SparklesIcon className="h-5 w-5 text-white" />
<SparklesIcon className='h-5 w-5 text-white' />
)}
</div>
<div className="text-xs flex items-center justify-center gap-1 absolute left-0 top-2 -ml-4 -translate-x-full group-hover:visible !invisible">
<button
disabled
className="text-gray-300 dark:text-gray-400"
></button>
<div className='text-xs flex items-center justify-center gap-1 absolute left-0 top-2 -ml-4 -translate-x-full group-hover:visible !invisible'>
<button disabled className='text-gray-300 dark:text-gray-400'></button>
{/* <span className="flex-grow flex-shrink-0">1 / 1</span> */}
<button
disabled
className="text-gray-300 dark:text-gray-400"
></button>
<button disabled className='text-gray-300 dark:text-gray-400'></button>
</div>
</div>
<div className="relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]">
<div className="flex flex-grow flex-col gap-3">
<div className="min-h-20 flex flex-col items-start gap-4 whitespace-pre-wrap break-words">
<div className="prose w-full break-words dark:prose-invert dark">
<div className='relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]'>
<div className='flex flex-grow flex-col gap-3'>
<div className='min-h-20 flex flex-col items-start gap-4 whitespace-pre-wrap break-words'>
<div className='prose w-full break-words dark:prose-invert dark'>
{!isUser && text === null ? (
<ChatBubbleOvalLeftEllipsisIcon className="h-6 w-6 animate-pulse" />
<ChatBubbleOvalLeftEllipsisIcon className='h-6 w-6 animate-pulse' />
) : (
<p>{text}</p>
)}
Expand Down

0 comments on commit 2cd47dd

Please sign in to comment.