diff --git a/src/mobile-web/src/components/SessionTypeIcon.tsx b/src/mobile-web/src/components/SessionTypeIcon.tsx new file mode 100644 index 0000000000..506068a67b --- /dev/null +++ b/src/mobile-web/src/components/SessionTypeIcon.tsx @@ -0,0 +1,31 @@ +import { + Bot as LucideBot, + MessageSquare as LucideMessageSquare, + Users as LucideUsers, +} from 'lucide-react'; +import React from 'react'; +import type { RecentWorkspaceEntry } from '../services/RemoteSessionManager'; +import { sessionIconKind, type SessionIconKind } from '../services/workspaceIdentity'; + +const SESSION_ICONS: Record = { + assistant: LucideBot, + cowork: LucideUsers, + code: LucideMessageSquare, +}; + +/** + * Shared session-type icon: assistant entries, Claw history rows, the resume + * card and the compact sidebar all resolve through `sessionIconKind`. + */ +export function SessionTypeIcon({ + agentType, + workspaceKind, + size = 18, +}: { + agentType?: string; + workspaceKind?: RecentWorkspaceEntry['workspace_kind']; + size?: number; +}) { + const Icon = SESSION_ICONS[sessionIconKind(agentType, workspaceKind)]; + return