+
+
+
+
Hello, I'm
AstrBot ⭐
@@ -139,6 +149,7 @@ const isMobile = ref(false);
const mobileMenuOpen = ref(false);
const imagePreviewDialog = ref(false);
const previewImageUrl = ref('');
+const isLoadingMessages = ref(false);
// 使用 composables
const {
@@ -295,7 +306,14 @@ async function handleSelectConversation(sessionIds: string[]) {
// 清除引用状态
clearReply();
- await getSessionMsg(sessionIds[0], router);
+ // 开始加载消息
+ isLoadingMessages.value = true;
+
+ try {
+ await getSessionMsg(sessionIds[0], router);
+ } finally {
+ isLoadingMessages.value = false;
+ }
nextTick(() => {
messageList.value?.scrollToBottom();
@@ -540,6 +558,7 @@ onBeforeUnmount(() => {
justify-content: center;
align-items: center;
flex-direction: column;
+ position: relative;
}
.welcome-title {
@@ -547,6 +566,12 @@ onBeforeUnmount(() => {
margin-bottom: 16px;
}
+.loading-overlay-welcome {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
.bot-name {
font-weight: 700;
margin-left: 8px;
diff --git a/dashboard/src/components/chat/ConversationSidebar.vue b/dashboard/src/components/chat/ConversationSidebar.vue
index b3af11f50..c7e948ae5 100644
--- a/dashboard/src/components/chat/ConversationSidebar.vue
+++ b/dashboard/src/components/chat/ConversationSidebar.vue
@@ -113,8 +113,19 @@
{{ chatboxMode ? tm('actions.exitFullscreen') : tm('actions.fullscreen') }}
+
+
+