lib/ollama/utils/chooser.rb in ollama-ruby-0.3.1 vs lib/ollama/utils/chooser.rb in ollama-ruby-0.3.2

- old
+ new

@@ -1,10 +1,12 @@ require 'amatch' require 'search_ui' +require 'term/ansicolor' module Ollama::Utils::Chooser include SearchUI + include Term::ANSIColor module_function def choose(entries) entry = Search.new( @@ -15,10 +17,10 @@ matches.empty? and matches = entries matches.first(Tins::Terminal.lines - 1) }, query: -> _answer, matches, selector { matches.each_with_index.map { |m, i| - i == selector ? "#{Term::ANSIColor.blue{?⮕}} #{m.on_blue}" : " #{m}" + i == selector ? "#{blue{?⮕}} #{on_blue{m}}" : " #{m}" } * ?\n }, found: -> _answer, matches, selector { matches[selector] },