diff --git a/frontend/.env b/frontend/.env index 6719e82..2727fcc 100755 --- a/frontend/.env +++ b/frontend/.env @@ -1,6 +1,8 @@ # 打包路径 VITE_BASE_URL = / VITE_IS_REQUEST_PROXY = true -VITE_API_URL = http://47.121.220.134 +VITE_API_URL = http://159.75.70.95 VITE_API_URL_PREFIX = /matagent -VITE_WB_BASE_URL = ws://47.121.220.134:8000/matagent/chat \ No newline at end of file +VITE_WB_BASE_URL = ws://8.210.37.238:8000/ws/chat +VITE_WB_CAMERA_ONE_URL = ws://159.75.70.95:8000/video_stream/camera1 +VITE_WB_CAMERA_TWO_URL = ws://159.75.70.95:8000/video_stream/camera2 \ No newline at end of file diff --git a/frontend/.env.development b/frontend/.env.development index b047a66..faa2c0f 100755 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -3,4 +3,6 @@ VITE_BASE_URL = / VITE_IS_REQUEST_PROXY = true VITE_API_URL = http://159.75.91.126 VITE_API_URL_PREFIX = /matagent -VITE_WB_BASE_URL = ws://47.121.220.134:8000/matagent/chat \ No newline at end of file +VITE_WB_BASE_URL = ws://8.210.37.238:8000/ws/chat +VITE_WB_CAMERA_ONE_URL = ws://159.75.70.95:8000/video_stream/camera1 +VITE_WB_CAMERA_TWO_URL = ws://159.75.70.95:8000/video_stream/camera2 diff --git a/frontend/.env.prod b/frontend/.env.prod index b047a66..d231c60 100755 --- a/frontend/.env.prod +++ b/frontend/.env.prod @@ -3,4 +3,6 @@ VITE_BASE_URL = / VITE_IS_REQUEST_PROXY = true VITE_API_URL = http://159.75.91.126 VITE_API_URL_PREFIX = /matagent -VITE_WB_BASE_URL = ws://47.121.220.134:8000/matagent/chat \ No newline at end of file +VITE_WB_BASE_URL = ws://47.121.220.134:8000/matagent/chat +VITE_WB_CAMERA_ONE_URL = ws://159.75.70.95:8000/video_stream/camera1 +VITE_WB_CAMERA_TWO_URL = ws://159.75.70.95:8000/video_stream/camera2 \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 1d79ff4..84dee5d 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -5,8 +5,6 @@ - \ No newline at end of file + diff --git a/frontend/src/api/user.ts b/frontend/src/api/user.ts index 89807f5..0d0ad80 100755 --- a/frontend/src/api/user.ts +++ b/frontend/src/api/user.ts @@ -20,3 +20,16 @@ export function getModelList() { url: `/model` }) } +// 获取历史消息列表 +export function getSessionsList() { + return request.get({ + url: `/sessions` + }) +} + +// 获取单条历史消息的聊天历史 +export function getSessionsInfoList(session_uuid: any) { + return request.get({ + url: `/history/${session_uuid}` + }) +} diff --git a/frontend/src/assets/chart/chart.png b/frontend/src/assets/chart/chart.png new file mode 100644 index 0000000..339b59c Binary files /dev/null and b/frontend/src/assets/chart/chart.png differ diff --git a/frontend/src/assets/chart/dashed_line_arrow.png b/frontend/src/assets/chart/dashed_line_arrow.png new file mode 100644 index 0000000..0951651 Binary files /dev/null and b/frontend/src/assets/chart/dashed_line_arrow.png differ diff --git a/frontend/src/assets/chart/down_arrow.png b/frontend/src/assets/chart/down_arrow.png new file mode 100644 index 0000000..67b06c1 Binary files /dev/null and b/frontend/src/assets/chart/down_arrow.png differ diff --git a/frontend/src/assets/chart/five_arrow.png b/frontend/src/assets/chart/five_arrow.png new file mode 100644 index 0000000..e32df74 Binary files /dev/null and b/frontend/src/assets/chart/five_arrow.png differ diff --git a/frontend/src/assets/chart/five_round.png b/frontend/src/assets/chart/five_round.png new file mode 100644 index 0000000..c159d34 Binary files /dev/null and b/frontend/src/assets/chart/five_round.png differ diff --git a/frontend/src/assets/chart/four_arrow.png b/frontend/src/assets/chart/four_arrow.png new file mode 100644 index 0000000..5d1a961 Binary files /dev/null and b/frontend/src/assets/chart/four_arrow.png differ diff --git a/frontend/src/assets/chart/four_round.png b/frontend/src/assets/chart/four_round.png new file mode 100644 index 0000000..0166788 Binary files /dev/null and b/frontend/src/assets/chart/four_round.png differ diff --git a/frontend/src/assets/chart/one_arrow.png b/frontend/src/assets/chart/one_arrow.png new file mode 100644 index 0000000..5eeba61 Binary files /dev/null and b/frontend/src/assets/chart/one_arrow.png differ diff --git a/frontend/src/assets/chart/one_round.png b/frontend/src/assets/chart/one_round.png new file mode 100644 index 0000000..1d37695 Binary files /dev/null and b/frontend/src/assets/chart/one_round.png differ diff --git a/frontend/src/assets/chart/person.png b/frontend/src/assets/chart/person.png new file mode 100644 index 0000000..a84d59c Binary files /dev/null and b/frontend/src/assets/chart/person.png differ diff --git a/frontend/src/assets/chart/three_arrow.png b/frontend/src/assets/chart/three_arrow.png new file mode 100644 index 0000000..b177b3e Binary files /dev/null and b/frontend/src/assets/chart/three_arrow.png differ diff --git a/frontend/src/assets/chart/three_round.png b/frontend/src/assets/chart/three_round.png new file mode 100644 index 0000000..36c6a36 Binary files /dev/null and b/frontend/src/assets/chart/three_round.png differ diff --git a/frontend/src/assets/chart/two_arrow.png b/frontend/src/assets/chart/two_arrow.png new file mode 100644 index 0000000..0da6f3d Binary files /dev/null and b/frontend/src/assets/chart/two_arrow.png differ diff --git a/frontend/src/assets/chart/two_round.png b/frontend/src/assets/chart/two_round.png new file mode 100644 index 0000000..5ca4c67 Binary files /dev/null and b/frontend/src/assets/chart/two_round.png differ diff --git a/frontend/src/assets/chart/up_arrow.png b/frontend/src/assets/chart/up_arrow.png new file mode 100644 index 0000000..d923b82 Binary files /dev/null and b/frontend/src/assets/chart/up_arrow.png differ diff --git a/frontend/src/assets/chart/user.png b/frontend/src/assets/chart/user.png new file mode 100644 index 0000000..c9531e2 Binary files /dev/null and b/frontend/src/assets/chart/user.png differ diff --git a/frontend/src/components/CameraView/index.less b/frontend/src/components/CameraView/index.less new file mode 100644 index 0000000..caca907 --- /dev/null +++ b/frontend/src/components/CameraView/index.less @@ -0,0 +1,45 @@ +.camera_box { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + z-index: 99; + background: rgba(0, 0, 0, 0.4); + + .header_box { + width: 50%; + display: flex; + justify-content: flex-end; + padding: 10px 0; + box-sizing: border-box; + } + + .img_box { + width: 50vh; + height: 50vh; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + margin: 0; + + .icon_box { + animation: spin 2s linear infinite; + } + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} \ No newline at end of file diff --git a/frontend/src/components/CameraView/index.vue b/frontend/src/components/CameraView/index.vue new file mode 100644 index 0000000..a7d1eac --- /dev/null +++ b/frontend/src/components/CameraView/index.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/frontend/src/components/ProcessView/index.less b/frontend/src/components/ProcessView/index.less new file mode 100644 index 0000000..52b3e10 --- /dev/null +++ b/frontend/src/components/ProcessView/index.less @@ -0,0 +1,459 @@ +.process_box { + position: fixed; + bottom: 20px; + right: 6px; + width: 230px; + height: 230px; + // background: url('../../assets/chart/chart.png') no-repeat; + // background-size: cover; + + .body-box { + position: relative; + width: 100%; + height: 100%; + + .out_list { + width: 100%; + position: relative; + + .out_item { + position: absolute; + + .item_text { + position: relative; + width: 55px; + height: 52px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-top: 5px; + + .item_round { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + } + + .p { + font-size: 12px; + width: 22px; + height: 16px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + transform: scale(0.8); + font-weight: 600; + } + + .span { + transform: scale(0.6); + font-size: 12px; + margin-top: -4px; + } + + .dashed_line { + position: absolute; + width: 14px; + + img { + width: 100%; + } + } + } + + &:nth-child(1) { + top: 82px; + left: 84px; + + .item_text { + width: 68px; + height: 63px; + } + + .p { + width: 18px; + height: 18px; + background: #bfd8ee; + color: #fff; + } + + .span { + color: #649ed2; + margin-top: -6px; + } + } + + &:nth-child(2) { + top: 2px; + left: 2px; + + .p { + background: #FBEEB7; + color: #DAA600; + } + + .span { + color: #DAA600; + } + + .dashed_line { + transform: rotate(-90deg); + top: -38px; + left: 113px; + } + } + + &:nth-child(3) { + top: 1px; + right: -2px; + + .p { + background: #c5e0b4; + color: #e58881; + } + + .span { + color: #5e913b; + } + + .dashed_line { + top: 61px; + left: 28px; + width: 13.4px; + } + } + + &:nth-child(4) { + top: 173px; + right: -2px; + + .p { + background: #cccfde; + color: #5e913b; + } + + .span { + color: #5e913b; + } + + .dashed_line { + transform: rotate(90deg); + top: -23px; + left: -70.6px; + } + } + + &:nth-child(5) { + top: 173px; + left: 1px; + + .p { + background: #edd1cf; + color: #e58881; + } + + .span { + color: #e58881; + } + + .dashed_line { + transform: rotate(180deg); + top: -117px; + left: 14px; + width: 13.4px; + } + } + + .centent_box { + position: relative; + + .sector_box { + position: absolute; + z-index: 1; + + &:nth-child(2) { + top: -50px; + left: 15px; + } + + .one_box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + img:nth-child(1) { + width: 19px; + height: 20px; + } + + p { + width: 39px; + height: 16px; + border-radius: 50%; + background: #bfd7ec; + color: #447cb8; + margin-top: -3px; + margin-bottom: -1px; + text-align: center; + line-height: 13px; + + span { + display: inline-block; + font-size: 12px; + transform: scale(0.6); + margin-left: -2px; + } + } + + img:nth-child(3) { + width: 2px; + height: 37px; + } + } + + .two_box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + position: relative; + + .top_box { + display: flex; + justify-content: center; + column-gap: 4px; + height: 19px; + + .arrow_box_left { + + img { + width: 4px; + height: 15px; + } + } + + .person { + width: 7px; + height: 15px; + transform: rotate(45deg); + margin-top: 2px; + } + + .arrow_box_right { + img { + width: 4px; + height: 15px; + } + } + } + + .admin_box { + position: absolute; + top: 19px; + left: 3px; + width: 34px; + height: 16px; + border-radius: 50%; + background: #fcf7d9; + line-height: 12px; + + span { + display: inline-block; + font-size: 12px; + transform: scale(0.6); + margin-left: -2px; + } + } + + .bottom_box { + position: absolute; + top: 37px; + left: -12px; + display: flex; + justify-content: center; + + p { + width: 2px; + height: 8px; + display: flex; + writing-mode: vertical-rl; + + span { + font-size: 12px; + transform: scale(0.5); + display: inline-block; + width: 100%; + height: 100%; + line-height: 4px; + } + } + + .sit { + width: 15px; + height: 19px; + transform: rotate(46deg) + } + + .down_arrow { + width: 14px; + height: 29px; + margin-left: -3px; + } + + .up_arrow { + width: 14px; + height: 29px; + margin-left: -2px; + } + + .stand { + width: 15px; + height: 18px; + transform: rotate(46deg); + margin-top: 4px; + margin-left: -2px; + } + } + } + + &:nth-child(3) { + top: -32px; + left: -46px; + transform: rotate(315deg); + } + + &:nth-child(4) { + top: -33px; + right: -43px; + transform: rotate(45deg); + + .two_box { + .top_box { + .person { + transform: rotate(-43deg); + } + } + + .admin_box { + top: 18px; + left: -12px; + background: #daefdb; + } + + .bottom_box { + top: 36px; + left: -23px; + + .stand { + transform: rotate(-43deg); + margin-top: 7px; + margin-left: 0; + } + + .sit { + transform: rotate(-46deg); + margin-top: 4px; + margin-left: 1px; + } + } + } + } + + &:nth-child(5) { + bottom: -28px; + right: -46px; + transform: rotate(133deg); + + .two_box { + .top_box { + .person { + transform: rotate(-135deg); + margin-top: 4px; + } + } + + .admin_box { + top: 17px; + left: -3px; + transform: rotate(10deg); + background: #d8dae8; + } + + .bottom_box { + top: 35px; + left: -11px; + + .stand { + transform: rotate(-43deg); + margin-top: 7px; + margin-left: 0; + } + + .sit { + transform: rotate(-123deg); + margin-top: 1px; + margin-left: 2px; + } + + .up_arrow { + margin-left: -3px; + } + } + } + } + + &:nth-child(6) { + bottom: -28px; + left: -48px; + transform: rotate(230deg); + + .two_box { + .top_box { + .person { + transform: rotate(-231deg); + margin-top: 5px; + margin-left: 1px + } + } + + .admin_box { + top: 20px; + left: -15px; + transform: rotate(-9deg); + background: #fceeed; + } + + .bottom_box { + top: 36px; + left: -25px; + transform: rotate(-5deg); + + .stand { + transform: rotate(109deg); + margin-top: 6px; + margin-left: 0px; + } + + .sit { + transform: rotate(137deg); + margin-top: 6px; + margin-left: 2px; + } + + .up_arrow { + margin-left: -3px; + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/frontend/src/components/ProcessView/index.vue b/frontend/src/components/ProcessView/index.vue new file mode 100644 index 0000000..53fe2d4 --- /dev/null +++ b/frontend/src/components/ProcessView/index.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/frontend/src/components/ReasoningView/index.vue b/frontend/src/components/ReasoningView/index.vue index a5bb272..ebde032 100755 --- a/frontend/src/components/ReasoningView/index.vue +++ b/frontend/src/components/ReasoningView/index.vue @@ -7,7 +7,7 @@ :id="`${num}title`" >
-

{{generateTitle('问题设定')}}:

+

{{ generateTitle('问题设定') }}:

{{ key.title }}
- {{generateTitle('角色')}}({{ item.group_name }}) - {{generateTitle('模型名称')}}({{ `${item.group_name}: ${item.agent_name}` }}) + {{ generateTitle('角色') }}({{ item.source }}) + {{ generateTitle('模型名称') }}({{ `${item.source}` }}) +

- {{generateTitle('推理中')}}... + {{ generateTitle('推理中') }}...

- +
@@ -53,7 +69,11 @@ class="complete-box" v-if="completeList[num].show && num === completeList[num].index" > - {{ generateTitle('推理完成,如果希望了解更多可继续在下面框中提问或新建对话。')}} + {{ + generateTitle( + '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。' + ) + }}
@@ -62,7 +82,7 @@ import { ref, defineExpose, defineEmits, defineProps } from 'vue' import { Plus, Minus } from '@element-plus/icons-vue' import { MdPreview } from 'md-editor-v3' -import {generateTitle} from '../../utils/i18n' +import { generateTitle } from '../../utils/i18n' import 'md-editor-v3/lib/style.css' const props: any = defineProps({ reasoningList: { diff --git a/frontend/src/components/StepsView.vue b/frontend/src/components/StepsView.vue index 1cd03b2..05ca76b 100755 --- a/frontend/src/components/StepsView.vue +++ b/frontend/src/components/StepsView.vue @@ -13,8 +13,9 @@ @click="toContent(index, num)" v-for="(key, num) in item.children" :key="num" + style="width: 100%;" > -
+
- {{ `${key.group_name?key.group_name+':':''} ${key.agent_name}` }} + {{ `${key.source || ''}` }} +
{{generateTitle('发送')}}{{ generateTitle('发送') }}
@@ -20,7 +23,7 @@ import { ref, defineProps, defineEmits, defineExpose } from 'vue' import { Promotion } from '@element-plus/icons-vue' import { ElMessage } from 'element-plus' -import {generateTitle} from '../utils/i18n' +import { generateTitle } from '../utils/i18n' // import { chat } from "../api/user"; const handleKeydown = (event: any) => { @@ -38,14 +41,15 @@ const props = defineProps({ }) const chatData = ref({ - chat_id: '', - message: '' + // chat_id: '', + source: 'user', + content: '' }) //如何在室温条件下合成CsPbBr3 const disableStatus = ref(false) const emits = defineEmits(['submitFun']) const submitFun = async () => { - if (!chatData.value.message) { + if (!chatData.value.content) { ElMessage.error('请输入问题') return } @@ -53,11 +57,12 @@ const submitFun = async () => { ElMessage.error('回答输出中,暂不能再次提问') return } - chatData.value.chat_id = new Date().getTime() + // chatData.value.chat_id = new Date().getTime() emits('submitFun', JSON.stringify(chatData.value)) chatData.value = { - chat_id: '', - message: '' + // chat_id: '', + source: 'user', + content: '' } } defineExpose({ diff --git a/frontend/src/components/collapseView/index.less b/frontend/src/components/collapseView/index.less index f15d873..ce8b7f3 100755 --- a/frontend/src/components/collapseView/index.less +++ b/frontend/src/components/collapseView/index.less @@ -3,12 +3,13 @@ } .aside-box { - // height: calc(100vh - 175px); + height: calc(100vh - 175px); overflow: inherit; position: relative; .collapse-demo { width: 36px; + // height: 100%; height: calc(100% - 260px); background: #093e7a; border: 1px solid rgba(2, 83, 137, 1); @@ -67,6 +68,9 @@ padding-left: 30px; font-size: 16px; font-weight: 600; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } @@ -287,6 +291,7 @@ margin-top: -3px; } } + .chart-active { .type-box { @@ -295,9 +300,11 @@ text-align: center; z-index: 9; } + .model-title { color: #333; } + .chart-bg { position: absolute; top: 3px; @@ -583,6 +590,7 @@ .model-box { position: relative; } + .chart-active { .type-box { @@ -591,9 +599,11 @@ text-align: center; z-index: 9; } + .model-title { color: #333; } + .chart-bg { position: absolute; top: 3px; diff --git a/frontend/src/components/collapseView/index.vue b/frontend/src/components/collapseView/index.vue index 3fb767e..dda5f93 100755 --- a/frontend/src/components/collapseView/index.vue +++ b/frontend/src/components/collapseView/index.vue @@ -5,23 +5,30 @@ width="230px" >
-
+
-
{{ generateTitle("模型调用流程") }}
+
{{ generateTitle('模型调用流程') }}
+
+ +
-
+
diff --git a/frontend/src/lang/en.ts b/frontend/src/lang/en.ts index 96b2481..474ef27 100755 --- a/frontend/src/lang/en.ts +++ b/frontend/src/lang/en.ts @@ -1,31 +1,33 @@ export default { - routers:{ - logOut:'Log Out', - restore:'Restore data', - '智能协作无界,材料创新无限':'Collaborative Intelligence, Revolutionary Materials', - '问题设定':'Problem Setting', - '模型名称':'Model Name', - '新建对话':'Create New Conversation', - '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。':'The reasoning is complete. If you wish to learn more, you can continue to ask questions or create a new conversation in the box below.', - '推理中':'In Reasoning', - '角色':'Role', - '模型调用流程':'Model Calling Process', - '发送':'send', - '您好,多智能体MARS为您服务':'Hello,multi-agent MARS is at your service', - '推荐问题':'Recommended Questions', - '在此输入您的问题或需求,有问必答,Shift+Enter换行':'Enter your question or requirement here, answer all questions, Shift+Enter line break', - 'MARS多智能体材料创制系统':'MARS Model Creation System', - '账号':'account', - '密码':'password', - '验证码':'code', - '登录':'login', - '请输入账号':'Please enter your account', - '请输入密码':'Please enter your password', - '请输入验证码':'Please enter your code', - '验证码错误':'code error', - '请输入问题':'Please enter the question', - '回答输出中,暂不能再次提问':'Answer output, cannot be asked again temporarily', + routers: { + logOut: 'Log Out', + restore: 'Restore data', + '智能协作无界,材料创新无限': 'Collaborative Intelligence, Revolutionary Materials', + '问题设定': 'Problem Setting', + '模型名称': 'Model Name', + '新建对话': 'Create New Conversation', + '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。': 'The reasoning is complete. If you wish to learn more, you can continue to ask questions or create a new conversation in the box below.', + '推理中': 'In Reasoning', + '角色': 'Role', + '模型调用流程': 'Agent Calling', + '发送': 'send', + '您好,多智能体MARS为您服务': 'Hello,multi-agent MARS is at your service', + '推荐问题': 'Recommended Questions', + '在此输入您的问题或需求,有问必答,Shift+Enter换行': 'Enter your question or requirement here, answer all questions, Shift+Enter line break', + 'MARS多智能体材料创制系统': 'MARS Model Creation System', + '账号': 'account', + '密码': 'password', + '验证码': 'code', + '登录': 'login', + '请输入账号': 'Please enter your account', + '请输入密码': 'Please enter your password', + '请输入验证码': 'Please enter your code', + '验证码错误': 'code error', + '请输入问题': 'Please enter the question', + '回答输出中,暂不能再次提问': 'Answer output, cannot be asked again temporarily', + '监控1': 'monitor one', + '监控2': 'monitor two', } } diff --git a/frontend/src/lang/zh.ts b/frontend/src/lang/zh.ts index ac43b9b..85aa63d 100755 --- a/frontend/src/lang/zh.ts +++ b/frontend/src/lang/zh.ts @@ -1,30 +1,32 @@ export default { - routers:{ - logOut:'退出登录', - restore:'还原数据', - '智能协作无界,材料创新无限':'智能协作无界,材料创新无限', - '问题设定':'问题设定', - '模型名称':'模型名称', - '新建对话':'新建对话', - '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。':'推理完成,如果希望了解更多可继续在下面框中提问或新建对话。', - '推理中':'推理中', - '角色':'角色', - '模型调用流程':'模型调用流程', - '发送':'发送', - '您好,多智能体MARS为您服务':'您好,多智能体MARS为您服务', - '推荐问题':'推荐问题', - '在此输入您的问题或需求,有问必答,Shift+Enter换行':'在此输入您的问题或需求,有问必答,Shift+Enter换行', - 'MARS多智能体材料创制系统':'MARS多智能体材料创制系统', - '账号':'账号', - '密码':'密码', - '验证码':'验证码', - '登录':'登录', - '请输入账号':'请输入账号', - '请输入密码':'请输入密码', - '请输入验证码':'请输入验证码', - '验证码错误':'验证码错误', - '请输入问题':'请输入问题', - '回答输出中,暂不能再次提问':'回答输出中,暂不能再次提问', + routers: { + logOut: '退出登录', + restore: '还原数据', + '智能协作无界,材料创新无限': '智能协作无界,材料创新无限', + '问题设定': '问题设定', + '模型名称': '模型名称', + '新建对话': '新建对话', + '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。': '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。', + '推理中': '推理中', + '角色': '角色', + '模型调用流程': '模型调用流程', + '发送': '发送', + '您好,多智能体MARS为您服务': '您好,多智能体MARS为您服务', + '推荐问题': '推荐问题', + '在此输入您的问题或需求,有问必答,Shift+Enter换行': '在此输入您的问题或需求,有问必答,Shift+Enter换行', + 'MARS多智能体材料创制系统': 'MARS多智能体材料创制系统', + '账号': '账号', + '密码': '密码', + '验证码': '验证码', + '登录': '登录', + '请输入账号': '请输入账号', + '请输入密码': '请输入密码', + '请输入验证码': '请输入验证码', + '验证码错误': '验证码错误', + '请输入问题': '请输入问题', + '回答输出中,暂不能再次提问': '回答输出中,暂不能再次提问', + '监控1': '监控1', + '监控2': '监控2', } } diff --git a/frontend/src/utils/websocket.ts b/frontend/src/utils/websocket.ts index 5ae2b84..53f2e1f 100755 --- a/frontend/src/utils/websocket.ts +++ b/frontend/src/utils/websocket.ts @@ -1,5 +1,5 @@ -function useWebsocket(handleMessage: any) { - const ws = new WebSocket(import.meta.env.VITE_WB_BASE_URL) +function useWebsocket(handleMessage: any,url: any) { + const ws = new WebSocket(url||import.meta.env.VITE_WB_BASE_URL) const init = () => { bindEvent(); } diff --git a/frontend/src/view/home/index.less b/frontend/src/view/home/index.less index 3972d01..beab9c8 100755 --- a/frontend/src/view/home/index.less +++ b/frontend/src/view/home/index.less @@ -74,7 +74,7 @@ display: flex; align-items: center; justify-content: center; - text-align: justify; + text-align: left; } } } diff --git a/frontend/src/view/home/index.vue b/frontend/src/view/home/index.vue index 997cd11..aa3cabe 100755 --- a/frontend/src/view/home/index.vue +++ b/frontend/src/view/home/index.vue @@ -40,13 +40,15 @@ const recommendList = ref>([ const router = useRouter() const submitFun = (e: any) => { let data = { - chat_id: new Date().getTime(), - message: e + // chat_id: new Date().getTime(), + // message: e + content: e, + source: 'user' } - router.push('/reasoning?message=' + JSON.stringify(data)) + router.push('/reasoning?content=' + JSON.stringify(data)) } const reasoningFun = (e: any) => { - router.push('/reasoning?message=' + e) + router.push('/reasoning?content=' + e) } onMounted(() => {}) diff --git a/frontend/src/view/reasoning/index.less b/frontend/src/view/reasoning/index.less index 04fe772..ea0e9e0 100755 --- a/frontend/src/view/reasoning/index.less +++ b/frontend/src/view/reasoning/index.less @@ -27,7 +27,7 @@ } } - .message-box { + .content-box { width: calc(100% - 48px); padding-top: 30px; @@ -71,4 +71,33 @@ } } + .camera_dialog { + position: fixed; + top: 0; + left: 66px; + z-index: 99; + display: flex; + align-items: center; + column-gap: 12px; + + .camera_item { + display: flex; + align-items: center; + flex-direction: column; + cursor: pointer; + width: 72px; + + span { + font-size: 12px; + color: #fff; + } + } + } + + .message_btn { + position: fixed; + top: 0; + left: 150px; + cursor: pointer; + } } \ No newline at end of file diff --git a/frontend/src/view/reasoning/index.vue b/frontend/src/view/reasoning/index.vue index b075a5d..959e07b 100755 --- a/frontend/src/view/reasoning/index.vue +++ b/frontend/src/view/reasoning/index.vue @@ -3,7 +3,7 @@
@@ -13,14 +13,14 @@ :reasoningList="reasoningList" />
-
+

- {{ generateTitle("新建对话") }} + {{ generateTitle('新建对话') }}

- {{ generateTitle("回答输出中,暂不能再次提问") }} + {{ generateTitle('回答输出中,暂不能再次提问') }}
@@ -31,28 +31,70 @@ :reasoningList="reasoningList" @changeStatusFun="changeStatusFun" /> +
+
+ + {{ generateTitle('监控1') }} +
+
+ + {{ generateTitle('监控2') }} +
+
+ + + Hi, there! + +
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index a14cc32..1666705 100755 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ host: '0.0.0.0', proxy: { '/matagent': { - target: 'http://47.121.220.134:8000', + target: 'http://159.75.91.126:8000', changeOrigin: true, rewrite: (path) => path.replace(/^\/matagent/, '/matagent') } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..d3633a7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "matagent", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}