import { workspaceProviderIcon } from '@/client/components/shared/workspace-icon' import type { DiscoveredWorkspace, WorkspaceEntry, WorkspaceType } from '@/lib/types' import { harnessLabel as workspaceTypeLabel } from '@/client/features/harness/harness-presentation' export { harnessLabel as workspaceTypeLabel, harnessDescription as workspaceTypeDescription } from '@/client/features/harness/harness-presentation' type WorkspaceAgentIconsProps = { types: WorkspaceType[] } export function WorkspaceAgentIcons({ types }: WorkspaceAgentIconsProps) { const label = types.map(type => workspaceTypeLabel[type]).join(', ') return ( {types.map(type => ( ))} ) } type WorkspaceDisplaySource = WorkspaceEntry | DiscoveredWorkspace export function workspaceDisplayName(workspace: WorkspaceDisplaySource): string { if ('types' in workspace) return workspace.path.split('/').pop() || workspace.path if (workspace.name) return workspace.name if (workspace.type === 'openclaw') return workspace.agentId ?? 'OpenClaw agent' if (workspace.type === 'hermes') return workspace.agentId ?? 'Hermes agent' return workspace.path.split('/').pop() || workspace.path }