feat(ui): add new messages indicator button
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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`
|
||||
<button
|
||||
class="chat-new-messages"
|
||||
type="button"
|
||||
@click=${props.onScrollToBottom}
|
||||
>
|
||||
New messages ${icons.arrowDown}
|
||||
</button>
|
||||
`
|
||||
: nothing
|
||||
}
|
||||
|
||||
<div class="chat-compose">
|
||||
${renderAttachmentPreview(props)}
|
||||
<div class="chat-compose__row">
|
||||
|
||||
Reference in New Issue
Block a user