Integrate Streamdown and optimize chat layout

- Replace react-markdown with Streamdown for better streaming support
- Fix input box positioning with proper sidebar offset
- Optimize scrolling behavior with main container handling scroll
- Add max-width constraint for assistant messages
- Ensure proper spacing to prevent input box overlap

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
lyzno1
2025-09-10 22:58:00 +08:00
parent 2d426902bd
commit 672ad29e5d
2 changed files with 11 additions and 13 deletions

View File

@ -174,7 +174,7 @@ const Chat: FC<IChatProps> = ({
</div>
{
!isHideSendInput && (
<div className={cn(!feedbackDisabled && '!left-3.5 !right-3.5', 'absolute z-10 bottom-0 left-0 right-0')}>
<div className='fixed z-10 bottom-0 left-1/2 transform -translate-x-1/2 pc:ml-[122px] tablet:ml-[96px] mobile:ml-0 pc:w-[794px] tablet:w-[794px] max-w-full mobile:w-full px-3.5'>
<div className='p-[5.5px] max-h-[150px] bg-white border-[1.5px] border-gray-200 rounded-xl overflow-y-auto'>
{
visionConfig?.enabled && (

View File

@ -703,8 +703,7 @@ const Main: FC<IMainProps> = () => {
{
hasSetInputs && (
<div className='relative grow h-[200px] pc:w-[794px] max-w-full mobile:w-full pb-[120px] mx-auto mb-3.5 overflow-hidden'>
<div className='h-full overflow-y-auto' ref={chatListDomRef}>
<div className='relative grow pc:w-[794px] max-w-full mobile:w-full pb-[180px] mx-auto mb-3.5' ref={chatListDomRef}>
<Chat
chatList={chatList}
onSend={handleSend}
@ -714,7 +713,6 @@ const Main: FC<IMainProps> = () => {
visionConfig={visionConfig}
fileConfig={fileConfig}
/>
</div>
</div>)
}
</div>