Skip to content

The agent that grows with you

fix(desktop): answered clarify cards show their question and answer icons again

alt-glitch91ac326878ea
diff --git a/apps/desktop/src/components/assistant-ui/clarify/core/shell.tsx b/apps/desktop/src/components/assistant-ui/clarify/core/shell.tsx
index 10fd97e9068..8e611042145 100644
--- a/apps/desktop/src/components/assistant-ui/clarify/core/shell.tsx
+++ b/apps/desktop/src/components/assistant-ui/clarify/core/shell.tsx
@@ -3,6 +3,7 @@
import type { ComponentProps } from 'react'
import { WIDGET_SHELL_CLASS } from '@/components/chat/widget-shell'
+import type { MessageQuestion } from '@/lib/icons'
import { cn } from '@/lib/utils'
// field-sizing on top of Textarea's shared chrome; kill min-h-16 for one-liners.
@@ -19,3 +20,17 @@ export function ClarifyShell({ children, className, ...props }: ComponentProps<'
</div>
)
}
+
+export function ClarifyLine({
+ children,
+ className,
+ icon: Icon,
+ ...props
+}: ComponentProps<'div'> & { icon: typeof MessageQuestion }) {
+ return (
+ <div className={cn('flex items-start gap-2', className)} {...props}>
+ <div className="min-w-0 flex-1">{children}</div>
+ <Icon aria-hidden className={CLARIFY_ICON_CLASS} />
+ </div>
+ )
+}
diff --git a/apps/desktop/src/components/assistant-ui/clarify/settled.tsx b/apps/desktop/src/components/assistant-ui/clarify/settled.tsx
index b4253f1b7c1..9c89d282743 100644
--- a/apps/desktop/src/components/assistant-ui/clarify/settled.tsx
+++ b/apps/desktop/src/components/assistant-ui/clarify/settled.tsx
@@ -4,9 +4,10 @@ import type { ToolCallMessagePartProps } from '@assistant-ui/react'
import { ToolFallback } from '@/components/assistant-ui/tool/fallback'
import { useI18n } from '@/i18n'
+import { CircleLetterA, MessageQuestion } from '@/lib/icons'
import { cn } from '@/lib/utils'
-import { ClarifyShell } from './core/shell'
+import { ClarifyLine, ClarifyShell } from './core/shell'
import { readClarifyResult } from './parse'
/** Settled batch card: every question with its locked (or absent) answer. */
@@ -31,19 +32,23 @@ export function ClarifyToolSettled(props: ToolCallMessagePartProps) {
return (
<div className="grid gap-1" key={`${index}-${row.question ?? ''}`}>
{row.question ? (
- <span className="whitespace-pre-wrap font-medium leading-(--conversation-line-height)">
- {row.question}
- </span>
+ <ClarifyLine icon={MessageQuestion}>
+ <span className="whitespace-pre-wrap font-medium leading-(--conversation-line-height)">
+ {row.question}
+ </span>
+ </ClarifyLine>
) : null}
- <p
- className={cn(
- 'whitespace-pre-wrap leading-(--conversation-line-height)',
- blank ? 'italic text-(--ui-text-tertiary)' : 'text-(--ui-text-secondary)'
- )}
- data-clarify-answer=""
- >
- {blank ? (row.unanswered && !cancelled ? copy.noAnswer : copy.skipped) : answer}
- </p>
+ <ClarifyLine icon={CircleLetterA}>
+ <p
+ className={cn(
+ 'whitespace-pre-wrap leading-(--conversation-line-height)',
+ blank ? 'italic text-(--ui-text-tertiary)' : 'text-(--ui-text-secondary)'
+ )}
+ data-clarify-answer=""
+ >
+ {blank ? (row.unanswered && !cancelled ? copy.noAnswer : copy.skipped) : answer}
+ </p>
+ </ClarifyLine>
</div>
)
})}