task_display
task_display
¶
Presentation tables for task lifecycle, mode, and project badges.
Maps the domain status keys produced by
effective_status (and
the mode/security-class strings carried by project metadata) to display
attributes — emoji, color, label.
Domain logic (TaskState, effective_status, container_name,
has_gpu) lives in
task_state.
STATUS_DISPLAY = {'running': StatusInfo(label='running', emoji='🟢', color='green'), 'init': StatusInfo(label='init', emoji='🟡', color='yellow'), 'starting': StatusInfo(label='starting', emoji='⏳', color='yellow'), 'stopped': StatusInfo(label='stopped', emoji='🔴', color='red'), 'completed': StatusInfo(label='completed', emoji='✅', color='green'), 'failed': StatusInfo(label='failed', emoji='❌', color='red'), 'created': StatusInfo(label='created', emoji='🆕', color='yellow'), 'not found': StatusInfo(label='not found', emoji='❓', color='yellow'), 'deleting': StatusInfo(label='deleting', emoji='🧹', color='yellow')}
module-attribute
¶
MODE_DISPLAY = {'cli': ModeInfo(emoji='💻', label='CLI'), 'run': ModeInfo(emoji='🚀', label='Autopilot'), 'toad': ModeInfo(emoji='🐸', label='Toad'), None: ModeInfo(emoji='🦗', label='')}
module-attribute
¶
SECURITY_CLASS_DISPLAY = {'gatekeeping': ProjectBadge(emoji='🚪', label='gate'), 'online': ProjectBadge(emoji='🌐', label='online')}
module-attribute
¶
ISOLATION_DISPLAY = {'shared': ProjectBadge(emoji='📂', label='shared'), 'sealed': ProjectBadge(emoji='🔒', label='sealed')}
module-attribute
¶
GPU_DISPLAY = {True: ProjectBadge(emoji='🎮', label='GPU'), False: ProjectBadge(emoji='💿', label='CPU')}
module-attribute
¶
StatusInfo(label, emoji, color)
dataclass
¶
ModeInfo(emoji, label)
dataclass
¶
ProjectBadge(emoji, label)
dataclass
¶
mode_info(mode)
¶
Return the display info for a task mode string.