From 13db0489c871ff2b0da3a9d0563524137aecf9e1 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 2 Feb 2026 16:17:09 +0000 Subject: [PATCH] feat(ui): add new messages indicator button --- ui/src/ui/app-render.ts | 2 ++ ui/src/ui/views/chat.ts | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ui/src/ui/app-render.ts b/ui/src/ui/app-render.ts index 2c03dd1ab..2312040da 100644 --- a/ui/src/ui/app-render.ts +++ b/ui/src/ui/app-render.ts @@ -480,6 +480,8 @@ export function renderApp(state: AppViewState) { onAbort: () => void state.handleAbortChat(), onQueueRemove: (id) => state.removeQueuedMessage(id), onNewSession: () => state.handleSendChat("/new", { restoreDraft: true }), + showNewMessages: state.chatNewMessagesBelow, + onScrollToBottom: () => state.scrollToBottom(), // Sidebar props for tool output viewing sidebarOpen: state.sidebarOpen, sidebarContent: state.sidebarContent, diff --git a/ui/src/ui/views/chat.ts b/ui/src/ui/views/chat.ts index b94d2f5cc..13fb74012 100644 --- a/ui/src/ui/views/chat.ts +++ b/ui/src/ui/views/chat.ts @@ -53,6 +53,9 @@ export type ChatProps = { // Image attachments attachments?: ChatAttachment[]; onAttachmentsChange?: (attachments: ChatAttachment[]) => void; + // Scroll control + showNewMessages?: boolean; + onScrollToBottom?: () => void; // Event handlers onRefresh: () => void; onToggleFocusMode: () => void; @@ -340,6 +343,20 @@ export function renderChat(props: ChatProps) { : nothing } + ${ + props.showNewMessages + ? html` + + ` + : nothing + } +
${renderAttachmentPreview(props)}