chore: playground api request

This commit is contained in:
jialin
2024-06-12 18:13:23 +08:00
parent 405d95c81f
commit c9ea96e078
25 changed files with 594 additions and 147 deletions
@@ -12,24 +12,30 @@ interface ChatFooterProps {
onClear: () => void;
onNewMessage: () => void;
onView: () => void;
disabled?: boolean;
feedback?: React.ReactNode;
}
const ChatFooter: React.FC<ChatFooterProps> = (props) => {
const { onSubmit, onClear, onNewMessage, onView, feedback } = props;
const { onSubmit, onClear, onNewMessage, onView, feedback, disabled } = props;
return (
<div className="chat-footer">
<Row style={{ width: '100%' }}>
<Col span={8}>
<Space size={20}>
<Button
disabled={disabled}
type="primary"
icon={<PlusOutlined />}
onClick={onNewMessage}
>
New Message
</Button>
<Button icon={<DeleteOutlined></DeleteOutlined>} onClick={onClear}>
<Button
icon={<DeleteOutlined></DeleteOutlined>}
onClick={onClear}
disabled={disabled}
>
Clear
</Button>
</Space>
@@ -37,10 +43,15 @@ const ChatFooter: React.FC<ChatFooterProps> = (props) => {
<Col span={8}>{feedback}</Col>
<Col span={8} style={{ textAlign: 'right' }}>
<Space size={20}>
<Button icon={<CodeOutlined></CodeOutlined>} onClick={onView}>
<Button
icon={<CodeOutlined></CodeOutlined>}
onClick={onView}
disabled={disabled}
>
View
</Button>
<Button
disabled={disabled}
type="primary"
icon={<SaveOutlined></SaveOutlined>}
onClick={onSubmit}