diff --git a/mobile/src/components/MobileAgentIcon.tsx b/mobile/src/components/MobileAgentIcon.tsx index 7f0cf0e0f91..ff43c35de5a 100644 --- a/mobile/src/components/MobileAgentIcon.tsx +++ b/mobile/src/components/MobileAgentIcon.tsx @@ -1,13 +1,14 @@ import { Image, StyleSheet, Text, View } from 'react-native' import type { ImageSourcePropType } from 'react-native' import { Terminal } from 'lucide-react-native' -import type { TuiAgent } from '../../../src/shared/tui-agent' import Svg, { Defs, G, LinearGradient, Path, Stop } from 'react-native-svg' import { colors } from '../theme/mobile-theme' import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog' import { MOBILE_AGENT_ICON_ASSETS } from './mobile-agent-icon-assets' import { ClaudeIcon, OpenAIIcon } from './AgentIcons' +const iconAssets: Partial> = MOBILE_AGENT_ICON_ASSETS + // Why: agent branding should match the desktop/new-worktree picker everywhere // mobile lets users choose the agent that will own a workspace. @@ -107,7 +108,8 @@ export function MobileAgentIcon({ agentId, size = 16 }: { agentId: string; size? // Why: prefer the favicon bundled into the app over Google's favicon service, // which is unreachable in some regions and offline (#8451). - const bundledIcon = MOBILE_AGENT_ICON_ASSETS[agentId as TuiAgent] + const iconAgentId = agentId === 'dsb' ? 'dsh' : agentId + const bundledIcon = iconAssets[iconAgentId] if (bundledIcon) { return }