Module: OllamaChat::History
- Included in:
- Chat
- Defined in:
- lib/ollama_chat/history.rb
Overview
A module that provides history management functionality for OllamaChat sessions.
The History module encapsulates methods for initializing, saving, and clearing command-line history within the OllamaChat application. It handles persistence of user input history to a file and ensures that chat sessions can maintain state across invocations by loading previous command histories.
Class Attribute Summary collapse
-
.current_history ⇒ Symbol
The currently active history namespace.
-
.histories ⇒ Object
A hash storing multiple history namespaces.
Class Attribute Details
.current_history ⇒ Symbol
The currently active history namespace.
17 18 19 |
# File 'lib/ollama_chat/history.rb', line 17 def current_history @current_history end |
.histories ⇒ Object
A hash storing multiple history namespaces. Keys are symbols representing the namespace (e.g., :chat, :session_name), and values are arrays of strings containing the command history.
13 14 15 |
# File 'lib/ollama_chat/history.rb', line 13 def histories @histories end |