mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
wip
This commit is contained in:
@@ -178,12 +178,24 @@ def status():
|
||||
|
||||
# Normalize and colorize status/worktree
|
||||
raw_status = str(meta.status)
|
||||
# Strip enum class prefix if present (e.g. TaskStatus.Done)
|
||||
cls_name = meta.status.__class__.__name__
|
||||
prefix = cls_name + "."
|
||||
if raw_status.startswith(prefix):
|
||||
raw_status = raw_status[len(prefix):]
|
||||
if raw_status in ('Done', 'Merged'):
|
||||
stat_disp = f"\033[32m{raw_status}\033[0m"
|
||||
# Color-map statuses
|
||||
status_colors = {
|
||||
'Not started': '\033[90m', # dim gray
|
||||
'In progress': '\033[33m', # yellow
|
||||
'Needs input': '\033[31m', # red
|
||||
'Needs manual review': '\033[31m',
|
||||
'Done': '\033[32m', # green
|
||||
'Cancelled': '\033[31m', # red
|
||||
'Merged': '\033[34m', # blue
|
||||
}
|
||||
color = status_colors.get(raw_status, '')
|
||||
if color:
|
||||
stat_disp = f"{color}{raw_status}\033[0m"
|
||||
else:
|
||||
stat_disp = raw_status
|
||||
wt_disp = wt_info
|
||||
|
||||
Reference in New Issue
Block a user