fix(tui): distinguish variant switch notices (#35315)

This commit is contained in:
Kit Langton 2026-07-04 10:58:56 -04:00 committed by GitHub
commit 62af66a74f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 98 additions and 21 deletions

View file

@ -1231,7 +1231,8 @@ function SessionSwitchMessageV2(props: { message: SessionMessage }) {
const { theme } = useTheme()
const text = () => {
if (props.message.type === "agent-switched") return `Switched agent to ${props.message.agent}`
if (props.message.type === "model-switched") return switchLabel(props.message.model, ctx.models())
if (props.message.type === "model-switched")
return switchLabel(props.message.model, ctx.models(), props.message.previous)
return ""
}
return <text fg={theme.textMuted}>{text()}</text>