13 auto input = Input(input_str,
"Type command...");
15 return Renderer(input, [input, input_str, engine] {
18 Elements suggestion_list;
19 for (
size_t i = 0; i < std::min(suggestions.size(),
size_t(5)); ++i) {
20 const auto& s = suggestions[i];
21 suggestion_list.push_back(
23 text(
"→ ") | color(Color::Cyan),
26 text(s.description) | dim,
33 text(
"❯ ") | color(Color::GreenLight),
34 input->Render() | flex,
37 (suggestions.empty() ? text(
"") :
40 text(
"Suggestions:") | dim,
41 vbox(suggestion_list),
42 }) | size(HEIGHT, LESS_THAN, 8)
53 std::vector<std::string> actions = {
54 "Quick Actions Menu - Not Yet Implemented",
59 auto state = std::make_shared<MenuState>();
60 auto menu = Menu(&state->actions, &state->selected);
62 return CatchEvent(menu, [&screen, state](
const Event& e) {
63 if (e == Event::Return && state->selected == 1) {
64 screen.ExitLoopClosure()();