Files
eosphoros-ai--db-gpt/web/components/chat/header/chat-excel.tsx
T
wehub-resource-sync d13100ebf3
Update draft releases / main (push) Has been cancelled
Build and push docs image / build-image (push) Has been cancelled
Build Web Application / build-web (macos-latest) (push) Has been cancelled
Build Web Application / build-web (ubuntu-latest) (push) Has been cancelled
Python Code Quality Checks / build (push) Has been cancelled
Test Python / test-python (macos-latest, 3.10) (push) Has been cancelled
Test Python / test-python (macos-latest, 3.11) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.10) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.11) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:27:08 +08:00

34 lines
1.0 KiB
TypeScript

import { ChatContext } from '@/app/chat-context';
import { LinkOutlined } from '@ant-design/icons';
import { useContext } from 'react';
import ExcelUpload from './excel-upload';
interface Props {
onComplete?: () => void;
}
function ChatExcel({ onComplete }: Props) {
const { currentDialogue, scene, chatId } = useContext(ChatContext);
if (scene !== 'chat_excel') return null;
return (
<div className='max-w-md h-full relative'>
{currentDialogue ? (
<div className='flex h-8 overflow-hidden rounded'>
<div className='flex items-center justify-center px-2 bg-gray-600 text-lg'>
<LinkOutlined className='text-white' />
</div>
<div className='flex items-center justify-center px-3 bg-gray-100 text-xs rounded-tr rounded-br dark:text-gray-800 truncate'>
{currentDialogue.select_param}
</div>
</div>
) : (
<ExcelUpload convUid={chatId} chatMode={scene} onComplete={onComplete} />
)}
</div>
);
}
export default ChatExcel;