From aa68813b0afc3442807722b11d21e2c25bf7e698 Mon Sep 17 00:00:00 2001
From: junleea <354425203@qq.com>
Date: Wed, 26 Mar 2025 21:43:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=A7=E8=BE=B9=E4=BC=9A?=
=?UTF-8?q?=E8=AF=9D=E5=8F=8A=E4=BC=9A=E8=AF=9D=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/gen-chat.vue | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/views/system/gen-chat.vue b/src/views/system/gen-chat.vue
index e4684f5..a977163 100644
--- a/src/views/system/gen-chat.vue
+++ b/src/views/system/gen-chat.vue
@@ -2,6 +2,9 @@
+
+ 新会话
+
当前会话
@@ -39,9 +42,6 @@
-
- 新会话
-
@@ -72,9 +72,10 @@
placeholder="输入消息..."
@keyup.enter="sendMessage"
/>
+
- 发送
+ 发送
@@ -88,6 +89,7 @@ import { ElCard, ElInput, ElButton } from "element-plus";
import { WSMessage, AIQMessage, OllamaMessage } from "@/types/im";
import { ElMessage } from "element-plus";
import { GetMessageService } from "@/api/im";
+import {Check, Loading} from '@element-plus/icons-vue'
import MarkdownIt from "markdown-it";
import markdownItMermaid from "markdown-it-mermaid";
import hljs from "highlight.js";
@@ -208,6 +210,8 @@ onMounted(() => {
socket.value.onclose = () => {
console.log("WebSocket 连接已关闭");
ElMessage.error("连接已关闭");
+ //重新连接
+ socket.value = new WebSocket(url);
};
socket.value.onerror = (error) => {
@@ -353,6 +357,7 @@ const getMessage = async (session_id: number) => {
overflow-y: auto; /* 允许垂直滚动 */
padding: 10px;
margin-bottom: 20px;
+ scrollbar-width: 20px;
position: relative;
display: flex;
flex-direction: column;