Pick the best available CLI for the task type. Falls back through preference list, skipping excluded names.
(self, task_type: str, exclude: List[str] = None)
| 151 | return "default" |
| 152 | |
| 153 | def select_cli(self, task_type: str, exclude: List[str] = None) -> Optional[PeerCLI]: |
| 154 | """ |
| 155 | Pick the best available CLI for the task type. |
| 156 | Falls back through preference list, skipping excluded names. |
| 157 | """ |
| 158 | exclude = exclude or [] |
| 159 | available_names = {c.name for c in self.available()} |
| 160 | preference = TASK_CLI_PREFERENCE.get(task_type, TASK_CLI_PREFERENCE["default"]) |
| 161 | for name in preference: |
| 162 | if name not in exclude and name in available_names: |
| 163 | return next(c for c in self.available() if c.name == name) |
| 164 | return None |
| 165 | |
| 166 | def build_prompt(self, user_message: str, errors: List[str], files: List[str]) -> str: |
| 167 | """Build a context-rich, directive prompt to pass to the external CLI. |
no test coverage detected