Module: OllamaChat::InputContent
- Included in:
- Chat
- Defined in:
- lib/ollama_chat/input_content.rb
Overview
A module that provides input content processing functionality for OllamaChat.
The InputContent module encapsulates methods for reading and returning content from selected files, selecting files from a list of matching files, and collecting project context using the context_spook library. It supports interactive file selection and context collection for enhancing chat interactions with local or remote content.
Instance Method Summary collapse
-
#file_set_each(patterns, all: false) {|file| ... } ⇒ Array<File>
The file_set_each method iterates over a set of files matched by the given patterns, optionally including all files, and yields each file to the supplied block.
Instance Method Details
#file_set_each(patterns, all: false) {|file| ... } ⇒ Array<File>
The file_set_each method iterates over a set of files matched by the given patterns, optionally including all files, and yields each file to the supplied block. It returns the array of files that were processed.
20 21 22 23 24 |
# File 'lib/ollama_chat/input_content.rb', line 20 def file_set_each(patterns, all: false, &block) files = all ? all_file_set(patterns) : choose_file_set(patterns) block and files.each(&block) files end |