fix(desktop): render steer note as a codicon, not an emoji

The inline steer note used a  emoji. Emit a structured `steer:<text>`
system note and render it in SystemMessage as a codicon (compass) row —
same style as slash-status output. No emoji in the transcript.
This commit is contained in:
Brooklyn Nicholson 2026-06-05 21:03:05 -05:00
parent efa53fb3be
commit 7cceead273
2 changed files with 21 additions and 2 deletions

View file

@ -768,8 +768,9 @@ export function usePromptActions({
if (result?.status === 'queued') {
triggerHaptic('submit')
// Inline note (not a toast) so the nudge lives in the transcript next
// to the turn it steered — same centered system-note style as slash output.
appendSessionTextMessage(sessionId, 'system', `⏩ steered · ${text}`)
// to the turn it steered. The `steer:` prefix is rendered as a codicon
// row by SystemMessage (see STEER_NOTE_RE), same style as slash output.
appendSessionTextMessage(sessionId, 'system', `steer:${text}`)
return true
}

View file

@ -820,6 +820,7 @@ const UserMessage: FC<{
}
const SLASH_STATUS_RE = /^slash:(?<command>\/[^\n]+)\n(?<output>[\s\S]*)$/
const STEER_NOTE_RE = /^steer:(?<text>[\s\S]+)$/
const SystemMessage: FC = () => {
const text = useAuiState(s => messageContentText(s.message.content))
@ -828,6 +829,23 @@ const SystemMessage: FC = () => {
return null
}
const steerNote = text.match(STEER_NOTE_RE)
if (steerNote?.groups) {
return (
<MessagePrimitive.Root
className="flex max-w-[min(86%,44rem)] items-center gap-1.5 self-center px-2 py-0.5 text-[0.6875rem] leading-5 text-muted-foreground/60"
data-role="system"
data-slot="aui_system-message-root"
>
<Codicon className="text-muted-foreground/55" name="compass" size="0.75rem" />
<span className="text-muted-foreground/55">steered</span>
<span className="text-muted-foreground/35">·</span>
<span className="whitespace-pre-wrap">{steerNote.groups.text.trim()}</span>
</MessagePrimitive.Root>
)
}
const slashStatus = text.match(SLASH_STATUS_RE)
if (slashStatus?.groups) {