Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
pickPrimaryPreviewTarget
} from '@/components/assistant-ui/thread/content'
import { MESSAGE_PARTS_COMPONENTS } from '@/components/assistant-ui/thread/message-parts'
import { StreamStallIndicator } from '@/components/assistant-ui/thread/status'
import { ResponseLoadingIndicator, StreamStallIndicator } from '@/components/assistant-ui/thread/status'
import { formatMessageTimestamp } from '@/components/assistant-ui/thread/timestamp'
import { TooltipIconButton } from '@/components/assistant-ui/tooltip-icon-button'
import { PreviewAttachment } from '@/components/chat/preview-attachment'
Expand Down Expand Up @@ -83,10 +83,6 @@ export const AssistantMessage: FC<{

const enterRef = useEnterAnimation(isRunning, `assistant-message:${messageId}`)

if (isPlaceholder) {
return null
}

return (
<MessagePrimitive.Root
className="group flex w-full min-w-0 max-w-full flex-col gap-0 self-start overflow-hidden"
Expand All @@ -101,7 +97,7 @@ export const AssistantMessage: FC<{
>
{/* Todos render in the composer status stack now, not inline. */}
<MessagePrimitive.Parts components={MESSAGE_PARTS_COMPONENTS} />
{isRunning && <StreamStallIndicator />}
{isPlaceholder ? <ResponseLoadingIndicator /> : isRunning && <StreamStallIndicator />}
{previewTargets.length > 0 && (
<div className="mt-3 flex flex-wrap gap-2">
{previewTargets.map(target => (
Expand Down
8 changes: 2 additions & 6 deletions apps/desktop/src/components/assistant-ui/thread/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { type FC, useCallback, useMemo, useState } from 'react'

import { AssistantMessage } from '@/components/assistant-ui/thread/assistant-message'
import { ThreadMessageList } from '@/components/assistant-ui/thread/list'
import {
BackgroundResumeNotice,
CenteredThreadSpinner,
ResponseLoadingIndicator
} from '@/components/assistant-ui/thread/status'
import { BackgroundResumeNotice, CenteredThreadSpinner } from '@/components/assistant-ui/thread/status'
import { SystemMessage } from '@/components/assistant-ui/thread/system-message'
import { ThreadTimeline } from '@/components/assistant-ui/thread/timeline'
import { type RestoreMessageTarget } from '@/components/assistant-ui/thread/types'
Expand Down Expand Up @@ -100,7 +96,7 @@ export const Thread: FC<{
clampToComposer={clampToComposer}
components={messageComponents}
emptyPlaceholder={emptyPlaceholder}
loadingIndicator={loading === 'response' ? <ResponseLoadingIndicator /> : <BackgroundResumeNotice />}
loadingIndicator={<BackgroundResumeNotice />}
sessionKey={sessionKey}
/>
{loading === 'session' && <CenteredThreadSpinner />}
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/components/assistant-ui/thread/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const ResponseLoadingIndicator: FC = () => {

return (
<StatusRow
className="text-[length:var(--conversation-text-font-size)] leading-(--dt-line-height)"
data-slot="aui_response-loading"
label={compacting ? COMPACTION_LABEL : t.assistant.thread.loadingResponse}
>
Expand Down
Loading