diff --git a/datacenter/.eslintrc.json b/datacenter/.eslintrc.json index bffb357a7..fb3c42820 100644 --- a/datacenter/.eslintrc.json +++ b/datacenter/.eslintrc.json @@ -1,3 +1,8 @@ { - "extends": "next/core-web-vitals" + "extends": "next/core-web-vitals", + "rules": { + "indent": ["warning", 2, { + "SwitchCase": 1 + }] + } } diff --git a/datacenter/app/agents/[agentId]/page.tsx b/datacenter/app/agents/[agentId]/page.tsx new file mode 100644 index 000000000..113bbb6a7 --- /dev/null +++ b/datacenter/app/agents/[agentId]/page.tsx @@ -0,0 +1,25 @@ +"use client" +import { useRequest } from 'ahooks'; +import { sendGetRequest } from '@/utils/request'; +import useAgentChat from '@/hooks/useAgentChat'; +import ChatBoxComp from '@/components/chatBox'; + +const AgentPage = (props) => { + const { data: historyList } = useRequest(async () => await sendGetRequest('/v1/chat/dialogue/messages/history', { + con_uid: props.params?.agentId + }), { + ready: !!props.params?.agentId + }); + + const { handleChatSubmit, history } = useAgentChat({ + queryAgentURL: `/v1/chat/completions`, + queryBody: {} + }); + + return ( +
+ +
+ Select or Drop file +
+ PDF, PowerPoint, Excel, Word, Text, Markdown, +
Scenes