MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _menu_lines

Method _menu_lines

uncommon_route/onboarding.py:169–184  ·  view source on GitHub ↗
(
        self,
        prompt: str,
        options: list[MenuOption],
        selected_index: int,
    )

Source from the content-addressed store, hash-verified

167 self.stdout.flush()
168
169 def _menu_lines(
170 self,
171 prompt: str,
172 options: list[MenuOption],
173 selected_index: int,
174 ) -> list[str]:
175 lines = [prompt, ""]
176 for index, option in enumerate(options):
177 prefix = "›" if index == selected_index else " "
178 label = option.label
179 if option.hint:
180 label = f"{label} — {option.hint}"
181 lines.append(f" {prefix} {label}")
182 lines.append("")
183 lines.append(" Use ↑/↓ to move, Enter to select.")
184 return lines
185
186 def _read_key(self) -> str:
187 if os.name == "nt":

Callers 1

_choose_ttyMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected