From 987e1dd8a8430bd86f2426425869b104d601e597 Mon Sep 17 00:00:00 2001 From: xion Date: Wed, 2 Oct 2024 14:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=BF=98=E8=A6=81=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ai-agent/edit/List.tsx | 1 - src/pages/ai-chat/AiModule.tsx | 84 ++++++++++++++++++++++++----- src/pages/ai-chat/store/ai-store.ts | 5 ++ src/pages/container/edit/List.tsx | 6 ++- 4 files changed, 80 insertions(+), 16 deletions(-) diff --git a/src/pages/ai-agent/edit/List.tsx b/src/pages/ai-agent/edit/List.tsx index 674a3bb..cc88d39 100644 --- a/src/pages/ai-agent/edit/List.tsx +++ b/src/pages/ai-agent/edit/List.tsx @@ -90,7 +90,6 @@ export const List = () => { deleteData: state.deleteData, getList: state.getList, loading: state.loading, - publishData: state.publishData, updateData: state.updateData, formData: state.formData, }; diff --git a/src/pages/ai-chat/AiModule.tsx b/src/pages/ai-chat/AiModule.tsx index 1c0a2f6..4c82f95 100644 --- a/src/pages/ai-chat/AiModule.tsx +++ b/src/pages/ai-chat/AiModule.tsx @@ -2,7 +2,7 @@ import { useShallow } from 'zustand/react/shallow'; import { useAiStore } from './store/ai-store'; import { CloseOutlined, HistoryOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Dropdown, Form, Input, message, Modal, Tooltip } from 'antd'; -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import { TextArea } from '../container/components/TextArea'; import clsx from 'clsx'; import { query } from '@/modules'; @@ -11,7 +11,23 @@ import { ChatMessage } from './module/ChatMessage'; import { isObjectNull } from '@/utils/is-null'; import { useNavigate } from 'react-router'; const testId = '60aca66b-4be9-4266-9568-6001032c7e13'; - +const NormalMessage = ({ onSend }: { onSend: any }) => { + const [message, setMessage] = useState(''); + const onClick = () => { + onSend(message); + setMessage(''); + }; + return ( +
+