Picker options: ``auto`` plus the persistable levels, marking the option equal to ``current`` with ``description="current"`` (the same marker ``/theme`` uses). Labels are the raw values.
(current: str)
| 133 | |
| 134 | |
| 135 | def _effort_options(current: str) -> list[UIOption]: |
| 136 | """Picker options: ``auto`` plus the persistable levels, marking the option equal to |
| 137 | ``current`` with ``description="current"`` (the same marker ``/theme`` uses). Labels |
| 138 | are the raw values.""" |
| 139 | options: list[UIOption] = [ |
| 140 | UIOption( |
| 141 | value="auto", |
| 142 | label="auto", |
| 143 | description="current" if current == "auto" else None, |
| 144 | ) |
| 145 | ] |
| 146 | for level in _levels(): |
| 147 | options.append( |
| 148 | UIOption( |
| 149 | value=level, |
| 150 | label=level, |
| 151 | description="current" if level == current else None, |
| 152 | ) |
| 153 | ) |
| 154 | # Ultracode (workflow-engine §4.1) — workflow auto-orchestration mode. Only in |
| 155 | # the menu when workflows are enabled (§4.8: removed when off). |
| 156 | from src.workflow.gating import is_workflows_enabled |
| 157 | from src.workflow.ultracode import is_ultracode_session |
| 158 | |
| 159 | if is_workflows_enabled(): |
| 160 | options.append( |
| 161 | UIOption( |
| 162 | value="ultracode", |
| 163 | label="ultracode", |
| 164 | description="on" if is_ultracode_session() else "workflow auto-orchestration", |
| 165 | ) |
| 166 | ) |
| 167 | return options |
| 168 | |
| 169 | |
| 170 | def _show_current() -> str: |