static JComponent ele_renderSuggestions(S madeFromInput, Iterable suggestions) { ret jscroll_trackWidth(vstackWithSpacing(map(takeFirst(100, suggestions), s -> { JComponent c = withSideMargin(jLabelWithButtons(s, "+", rThread { ele_logItemFeedback(true, s, madeFromInput) }, "-", rThread { ele_logItemFeedback(false, s, madeFromInput) }, "Say", rThread { ele_logItemFeedback(true, s, madeFromInput, button := "Say"); dm_say(s) }, "Submit", rThread { ele_logItemFeedback(true, s, madeFromInput, button := "Submit"); dm_setAIBarTextAndFireWithInfo(s, "user-chosen in " + dm_moduleLibID()); })); setToolTip(findButton(c, "Submit"), "Submit as new input"); ret c; }))); }