feat(app): show which messages are queued (#15587)

This commit is contained in:
Filip
2026-03-02 08:57:34 +01:00
committed by GitHub
parent 4b9e19f72f
commit bf2cc3aa2f
20 changed files with 77 additions and 6 deletions

View File

@@ -92,6 +92,7 @@ export interface MessageProps {
parts: PartType[]
showAssistantCopyPartID?: string | null
interrupted?: boolean
queued?: boolean
showReasoningSummaries?: boolean
}
@@ -500,6 +501,7 @@ export function Message(props: MessageProps) {
message={userMessage() as UserMessage}
parts={props.parts}
interrupted={props.interrupted}
queued={props.queued}
/>
)}
</Match>
@@ -679,7 +681,12 @@ function ContextToolGroup(props: { parts: ToolPart[]; busy?: boolean }) {
)
}
export function UserMessageDisplay(props: { message: UserMessage; parts: PartType[]; interrupted?: boolean }) {
export function UserMessageDisplay(props: {
message: UserMessage
parts: PartType[]
interrupted?: boolean
queued?: boolean
}) {
const data = useData()
const dialog = useDialog()
const i18n = useI18n()
@@ -759,6 +766,7 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp
<div
data-slot="user-message-attachment"
data-type={file.mime.startsWith("image/") ? "image" : "file"}
data-queued={props.queued ? "" : undefined}
onClick={() => {
if (file.mime.startsWith("image/") && file.url) {
openImagePreview(file.url, file.filename)
@@ -787,9 +795,14 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp
<Show when={text()}>
<>
<div data-slot="user-message-body">
<div data-slot="user-message-text">
<div data-slot="user-message-text" data-queued={props.queued ? "" : undefined}>
<HighlightedText text={text()} references={inlineFiles()} agents={agents()} />
</div>
<Show when={props.queued}>
<div data-slot="user-message-queued-indicator">
<TextShimmer text={i18n.t("ui.message.queued")} />
</div>
</Show>
</div>
<div data-slot="user-message-copy-wrapper" data-interrupted={props.interrupted ? "" : undefined}>
<Show when={metaHead() || metaTail()}>