{
expect(disclosure?.querySelector('summary')).not.toHaveTextContent('Check the configuration')
expect(disclosure?.querySelector('pre')).toHaveTextContent('Check the configuration')
})
+ // The host's text is only for a client that can't word the row itself.
+ it.each([
+ ['history-repaired', "Part of this chat's history couldn't be loaded."],
+ ['history-item-too-large', 'This part of the chat was too large to show.']
+ ])('words a %s row itself, as a muted status line', (presentation, words) => {
+ renderStatus({ kind: 'status', text: 'Words an older host wrote', presentation })
+ expect(screen.getByText(words)).toHaveClass('text-muted-foreground', 'text-sm')
+ expect(screen.queryByText('Words an older host wrote')).toBeNull()
+ })
it('renders future presentation and tone values as untinted text', () => {
renderStatus({
kind: 'status',
diff --git a/src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx b/src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
index 8b05f0d2d61..bc9b0a348d6 100644
--- a/src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
+++ b/src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
@@ -5,9 +5,27 @@ import CommentMarkdown, {
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { translate } from '@/i18n/i18n'
import { cn } from '@/lib/utils'
+import {
+ AGENT_SESSION_HOST_STATUS_COPY as HOST_STATUS_COPY,
+ isAgentSessionHostStatusPresentation,
+ type AgentSessionHostStatusPresentation
+} from '../../../../shared/agent-session-host-status-rows'
import type { NativeChatTextBlock } from '../../../../shared/native-chat-types'
import { ProviderFrameRow } from './NativeChatTranscriptChrome'
+const HOST_STATUS_WORDS: Record
string> = {
+ 'history-repaired': () =>
+ translate(
+ 'components.native-chat.notices.historyRepaired',
+ HOST_STATUS_COPY['history-repaired']
+ ),
+ 'history-item-too-large': () =>
+ translate(
+ 'components.native-chat.notices.historyItemTooLarge',
+ HOST_STATUS_COPY['history-item-too-large']
+ )
+}
+
export function NativeChatNoticeRow({
block,
onLinkClick,
@@ -31,6 +49,14 @@ export function NativeChatNoticeRow({
)
}
+ if (isAgentSessionHostStatusPresentation(block.presentation)) {
+ // The look of any other host status line; only the words are the reader's.
+ return (
+
+ )
+ }
if (block.presentation === 'plan-document') {
return (