From 9eaaa4270d2c570d00c725c290f34fc7b808835b Mon Sep 17 00:00:00 2001 From: ekko Date: Wed, 15 Apr 2026 10:28:53 +0800 Subject: [PATCH] fix: resolve streaming messages splitting into individual bubbles Simplify addMessage/updateMessage to only write to messages.value, add syncMessagesToSession() to copy messages back on session switch and stream completion. Also fix mobile viewport, session list overlay, hamburger logo, and various responsive improvements. Co-Authored-By: Claude Opus 4.6 --- src/App.vue | 6 +-- src/components/chat/ChatInput.vue | 3 ++ src/components/chat/ChatPanel.vue | 75 ++++++++++++++++++++++++++-- src/components/chat/MessageItem.vue | 12 ++--- src/components/layout/AppSidebar.vue | 13 ++++- src/stores/chat.ts | 56 +++++++++++++++------ src/styles/global.scss | 11 ++++ src/views/ChannelsView.vue | 2 +- src/views/ChatView.vue | 2 +- src/views/JobsView.vue | 2 +- src/views/LoginView.vue | 2 +- src/views/LogsView.vue | 2 +- src/views/MemoryView.vue | 2 +- src/views/ModelsView.vue | 2 +- src/views/SettingsView.vue | 2 +- src/views/SkillsView.vue | 29 ++++++++--- 16 files changed, 179 insertions(+), 42 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9552aff..3c66534 100644 --- a/src/App.vue +++ b/src/App.vue @@ -45,7 +45,7 @@ useKeyboard()
@@ -64,7 +64,7 @@ useKeyboard() .app-layout { display: flex; - height: 100vh; + height: calc(100 * var(--vh)); width: 100vw; overflow: hidden; @@ -79,7 +79,7 @@ useKeyboard() background-color: $bg-primary; .no-sidebar & { - height: 100vh; + height: calc(100 * var(--vh)); } } diff --git a/src/components/chat/ChatInput.vue b/src/components/chat/ChatInput.vue index a3a5a88..56482b4 100644 --- a/src/components/chat/ChatInput.vue +++ b/src/components/chat/ChatInput.vue @@ -379,6 +379,9 @@ function isImage(type: string): boolean { &::placeholder { color: $text-muted; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } diff --git a/src/components/chat/ChatPanel.vue b/src/components/chat/ChatPanel.vue index 6149f58..c64750c 100644 --- a/src/components/chat/ChatPanel.vue +++ b/src/components/chat/ChatPanel.vue @@ -14,6 +14,11 @@ const { t } = useI18n() const showSessions = ref(true) let mobileQuery: MediaQueryList | null = null +function handleSessionClick(sessionId: string) { + chatStore.switchSession(sessionId) + if (mobileQuery?.matches) showSessions.value = false +} + function handleMobileChange(e: MediaQueryListEvent | MediaQueryList) { if (e.matches && showSessions.value) { showSessions.value = false @@ -265,14 +270,20 @@ async function handleRenameConfirm() {