ollama_chat 0.0.95 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +51 -0
- data/Rakefile +1 -1
- data/lib/ollama_chat/chat.rb +1 -0
- data/lib/ollama_chat/commands.rb +1 -6
- data/lib/ollama_chat/database/models/prompt.rb +1 -3
- data/lib/ollama_chat/follow_chat.rb +4 -5
- data/lib/ollama_chat/message_list.rb +2 -4
- data/lib/ollama_chat/ollama_chat_config/default_config.yml +1 -0
- data/lib/ollama_chat/parsing.rb +10 -6
- data/lib/ollama_chat/personae_management.rb +24 -10
- data/lib/ollama_chat/session_management.rb +22 -28
- data/lib/ollama_chat/source_fetching.rb +1 -1
- data/lib/ollama_chat/token_estimator/crude.rb +25 -0
- data/lib/ollama_chat/token_estimator.rb +36 -0
- data/lib/ollama_chat/tool_calling.rb +1 -1
- data/lib/ollama_chat/tools/compute_bmi.rb +6 -4
- data/lib/ollama_chat/tools/execute_grep.rb +11 -1
- data/lib/ollama_chat/tools/generate_password.rb +4 -1
- data/lib/ollama_chat/tools/get_current_weather.rb +11 -0
- data/lib/ollama_chat/tools/get_time.rb +13 -2
- data/lib/ollama_chat/tools/open_file_in_editor.rb +3 -3
- data/lib/ollama_chat/tools/read_file.rb +3 -0
- data/lib/ollama_chat/tools/retrieve_document_snippets.rb +17 -10
- data/lib/ollama_chat/tools/roll_dice.rb +52 -11
- data/lib/ollama_chat/tools/run_tests.rb +23 -11
- data/lib/ollama_chat/tools/write_file.rb +2 -6
- data/lib/ollama_chat/utils/fetcher.rb +2 -2
- data/lib/ollama_chat/utils/png_metadata_extractor.rb +5 -4
- data/lib/ollama_chat/utils.rb +0 -1
- data/lib/ollama_chat/version.rb +1 -1
- data/lib/ollama_chat.rb +1 -0
- data/ollama_chat.gemspec +6 -6
- data/spec/ollama_chat/database/models/favourite_spec.rb +7 -20
- data/spec/ollama_chat/server_socket_spec.rb +11 -20
- data/spec/ollama_chat/state_selectors_spec.rb +4 -9
- data/spec/ollama_chat/switches_spec.rb +1 -1
- data/spec/ollama_chat/token_estimator_spec.rb +41 -0
- data/spec/ollama_chat/tools/compute_bmi_spec.rb +14 -5
- data/spec/ollama_chat/tools/copy_to_clipboard_spec.rb +5 -5
- data/spec/ollama_chat/tools/execute_grep_spec.rb +10 -0
- data/spec/ollama_chat/tools/generate_image_spec.rb +8 -8
- data/spec/ollama_chat/tools/generate_password_spec.rb +13 -0
- data/spec/ollama_chat/tools/get_current_weather_spec.rb +4 -0
- data/spec/ollama_chat/tools/get_endoflife_spec.rb +3 -3
- data/spec/ollama_chat/tools/get_rfc_spec.rb +2 -2
- data/spec/ollama_chat/tools/get_time_spec.rb +4 -0
- data/spec/ollama_chat/tools/get_url_spec.rb +7 -7
- data/spec/ollama_chat/tools/paste_from_clipboard_spec.rb +4 -4
- data/spec/ollama_chat/tools/read_file_spec.rb +3 -0
- data/spec/ollama_chat/tools/retrieve_document_snippets_spec.rb +36 -1
- data/spec/ollama_chat/tools/roll_dice_spec.rb +4 -4
- data/spec/ollama_chat/tools/run_tests_spec.rb +5 -5
- data/spec/ollama_chat/tools/search_web_spec.rb +3 -3
- data/spec/ollama_chat/tools/write_file_spec.rb +2 -0
- metadata +9 -5
- data/lib/ollama_chat/utils/token_estimator.rb +0 -15
|
@@ -50,7 +50,9 @@ class OllamaChat::Tools::RollDice
|
|
|
50
50
|
# @option opts [ComplexConfig::Settings] :chat the chat instance
|
|
51
51
|
# @return [String] the roll results as a JSON string
|
|
52
52
|
def execute(tool_call, **opts)
|
|
53
|
-
|
|
53
|
+
chat = opts[:chat]
|
|
54
|
+
reroll = chat.config.tools.functions.roll_dice.reroll?
|
|
55
|
+
dice = tool_call.function.arguments.dice.to_s.strip
|
|
54
56
|
|
|
55
57
|
# Parse the dice notation
|
|
56
58
|
match = dice.match(/^(\d*)d(\d+)([+-]\d+)?$/i)
|
|
@@ -61,29 +63,68 @@ class OllamaChat::Tools::RollDice
|
|
|
61
63
|
count = match[1].to_i.nonzero? || 1
|
|
62
64
|
sides = match[2].to_i
|
|
63
65
|
modifier = match[3].to_i
|
|
66
|
+
min = count + modifier
|
|
67
|
+
max = count * sides + modifier
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
rolls = count.times.map { rand(1..sides) }
|
|
67
|
-
total = rolls.sum + modifier
|
|
69
|
+
rolls, total, message = nil, nil, nil
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
loop do
|
|
72
|
+
rolls, total, message = perform_roll(dice, count, sides, modifier, min, max)
|
|
73
|
+
|
|
74
|
+
if reroll
|
|
75
|
+
puts message
|
|
76
|
+
chat.confirm?(prompt: '🛎️ Accept the roll? (y/n) ', yes: /\Ay/i) and break
|
|
77
|
+
else
|
|
78
|
+
break
|
|
79
|
+
end
|
|
74
80
|
end
|
|
75
|
-
message << " = %u" % total
|
|
76
81
|
|
|
77
82
|
{
|
|
78
83
|
dice:,
|
|
79
84
|
rolls:,
|
|
80
85
|
modifier:,
|
|
81
|
-
total
|
|
86
|
+
total:,
|
|
87
|
+
min:,
|
|
88
|
+
max:,
|
|
82
89
|
message:
|
|
83
90
|
}.to_json
|
|
84
91
|
rescue => e
|
|
85
92
|
{ error: e.class, message: e.message }.to_json
|
|
86
93
|
end
|
|
87
94
|
|
|
95
|
+
private
|
|
96
|
+
|
|
97
|
+
# Performs the actual dice roll calculation and generates a result message.
|
|
98
|
+
#
|
|
99
|
+
# @param dice [String] the original dice notation string
|
|
100
|
+
# @param count [Integer] number of dice to roll
|
|
101
|
+
# @param sides [Integer] number of sides per die
|
|
102
|
+
# @param modifier [Integer] value to add/subtract from the total
|
|
103
|
+
# @param min [Integer] minimum possible result for the range display
|
|
104
|
+
# @param max [Integer] maximum possible result for the range display
|
|
105
|
+
# @return [Array(Array<Integer>, Integer, String)] a tuple containing the
|
|
106
|
+
# individual rolls, the total sum, and the formatted message.
|
|
107
|
+
def perform_roll(dice, count, sides, modifier, min, max)
|
|
108
|
+
# Generate rolls
|
|
109
|
+
rolls = count.times.map { rand(1..sides) }
|
|
110
|
+
total = rolls.sum + modifier
|
|
111
|
+
|
|
112
|
+
# Compose message
|
|
113
|
+
message = "Dice roll was: %s = %u…%u = (%s)" % [
|
|
114
|
+
dice,
|
|
115
|
+
min,
|
|
116
|
+
max,
|
|
117
|
+
rolls * ' + '
|
|
118
|
+
]
|
|
119
|
+
if modifier > 0
|
|
120
|
+
message << " + %u" % modifier
|
|
121
|
+
elsif modifier < 0
|
|
122
|
+
message << " - %u" % -modifier
|
|
123
|
+
end
|
|
124
|
+
message << " = %u" % total
|
|
125
|
+
|
|
126
|
+
return rolls, total, message
|
|
127
|
+
end
|
|
128
|
+
|
|
88
129
|
self
|
|
89
130
|
end.register
|
|
@@ -14,7 +14,7 @@ class OllamaChat::Tools::RunTests
|
|
|
14
14
|
def self.register_name = 'run_tests'
|
|
15
15
|
|
|
16
16
|
# Build the OpenAI function schema for the tool.
|
|
17
|
-
# @return [Tool]
|
|
17
|
+
# @return [Tool] a tool definition for running tests
|
|
18
18
|
def tool
|
|
19
19
|
Tool.new(
|
|
20
20
|
type: 'function',
|
|
@@ -56,11 +56,20 @@ class OllamaChat::Tools::RunTests
|
|
|
56
56
|
coverage = tool_call.function.arguments.coverage || false
|
|
57
57
|
path = check_path(path, config)
|
|
58
58
|
output, success = run_tests(path, coverage)
|
|
59
|
+
|
|
60
|
+
message =
|
|
61
|
+
if success
|
|
62
|
+
"✨ All tests passed successfully in #{path.to_s.inspect}!"
|
|
63
|
+
else
|
|
64
|
+
"❌ Some tests failed in #{path.to_s.inspect}. Please check the error messages above."
|
|
65
|
+
end
|
|
66
|
+
|
|
59
67
|
{
|
|
60
|
-
success
|
|
61
|
-
path
|
|
62
|
-
output
|
|
63
|
-
status:
|
|
68
|
+
success: ,
|
|
69
|
+
path: path.to_s,
|
|
70
|
+
output: ,
|
|
71
|
+
status: success ? 'passed' : 'failed',
|
|
72
|
+
message: ,
|
|
64
73
|
}.to_json
|
|
65
74
|
rescue => e
|
|
66
75
|
{ error: e.class, message: e.message }.to_json
|
|
@@ -97,8 +106,8 @@ class OllamaChat::Tools::RunTests
|
|
|
97
106
|
def run_tests(path, coverage)
|
|
98
107
|
env = ENV.to_h | { 'START_SIMPLECOV' => coverage ? '1' : '0' }
|
|
99
108
|
cmd = [ test_runner, Shellwords.escape(path) ].join(' ')
|
|
100
|
-
output = execute_test_command(env, cmd)
|
|
101
|
-
return output,
|
|
109
|
+
output, success = execute_test_command(env, cmd)
|
|
110
|
+
return output, success
|
|
102
111
|
end
|
|
103
112
|
|
|
104
113
|
# Resolve the test runner executable from configuration.
|
|
@@ -113,16 +122,19 @@ class OllamaChat::Tools::RunTests
|
|
|
113
122
|
#
|
|
114
123
|
# @param env [Hash] environment variables for the process
|
|
115
124
|
# @param cmd [String] the command to execute
|
|
116
|
-
# @return [String] the combined output from stdout and stderr
|
|
125
|
+
# @return [String, Boolean] the combined output from stdout and stderr and
|
|
126
|
+
# a success flag
|
|
117
127
|
def execute_test_command(env, cmd)
|
|
118
|
-
output
|
|
119
|
-
|
|
128
|
+
output = +''
|
|
129
|
+
success = false
|
|
130
|
+
Open3.popen2e(env, cmd) do |_,io,waiter|
|
|
120
131
|
while line = io.gets
|
|
121
132
|
STDOUT.puts line
|
|
122
133
|
output << line
|
|
123
134
|
end
|
|
135
|
+
success = waiter.value.success?
|
|
124
136
|
end
|
|
125
|
-
output
|
|
137
|
+
return output, success
|
|
126
138
|
end
|
|
127
139
|
|
|
128
140
|
self.register
|
|
@@ -74,7 +74,7 @@ class OllamaChat::Tools::WriteFile
|
|
|
74
74
|
# Ensure the parent directory exists
|
|
75
75
|
path.dirname.mkpath
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
es = OllamaChat::TokenEstimator.estimate(args.content)
|
|
78
78
|
|
|
79
79
|
backup_path = nil
|
|
80
80
|
|
|
@@ -94,11 +94,7 @@ class OllamaChat::Tools::WriteFile
|
|
|
94
94
|
raise ArgumentError, 'Invalid mode %s' % args.mode.inspect
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
message = <<~EOT % { bytes_written:, path: path.to_s.inspect }
|
|
100
|
-
Wrote %{bytes_written} to file %{path}.
|
|
101
|
-
EOT
|
|
97
|
+
message = "Wrote #{es.bytes_formatted} (#{es.tokens_formatted}) to file #{path.to_s.inspect}."
|
|
102
98
|
|
|
103
99
|
{
|
|
104
100
|
success: true,
|
|
@@ -135,7 +135,7 @@ class OllamaChat::Utils::Fetcher
|
|
|
135
135
|
# @example Fetch a URL with caching
|
|
136
136
|
# cache = RedisCache.new
|
|
137
137
|
# fetcher = OllamaChat::Utils::Fetcher
|
|
138
|
-
# fetcher.get('https://example.com/data.json', cache:
|
|
138
|
+
# fetcher.get('https://example.com/data.json', cache:) do |tmp|
|
|
139
139
|
# JSON.parse(tmp.read)
|
|
140
140
|
# end
|
|
141
141
|
def self.get(url, headers: {}, **options, &block)
|
|
@@ -283,7 +283,7 @@ class OllamaChat::Utils::Fetcher
|
|
|
283
283
|
# @example Fetch a URL with caching
|
|
284
284
|
# cache = RedisCache.new
|
|
285
285
|
# fetcher = OllamaChat::Utils::Fetcher
|
|
286
|
-
# fetcher.get('https://example.com/data.json', cache:
|
|
286
|
+
# fetcher.get('https://example.com/data.json', cache:) do |tmp|
|
|
287
287
|
# JSON.parse(tmp.read)
|
|
288
288
|
# end
|
|
289
289
|
def get(url, **opts, &block)
|
|
@@ -60,15 +60,16 @@ module OllamaChat::Utils::PNGMetadataExtractor
|
|
|
60
60
|
# Decodes a Base64 encoded character profile and validates it as JSON.
|
|
61
61
|
#
|
|
62
62
|
# @param text [String] The raw 'chara' metadata value.
|
|
63
|
-
# @return [String, nil]
|
|
63
|
+
# @return [Array(String, Hash), nil] A tuple of [decoded_string, parsed_json]
|
|
64
|
+
# if valid, otherwise nil.
|
|
64
65
|
def decode_character(text)
|
|
65
66
|
return nil unless text
|
|
66
67
|
|
|
67
68
|
begin
|
|
68
69
|
decoded = Base64.decode64(text)
|
|
69
70
|
decoded = convert_to_utf8(decoded)
|
|
70
|
-
JSON.parse(decoded)
|
|
71
|
-
decoded
|
|
71
|
+
data = JSON.parse(decoded)
|
|
72
|
+
return decoded, data
|
|
72
73
|
rescue JSON::ParserError, ArgumentError
|
|
73
74
|
nil
|
|
74
75
|
end
|
|
@@ -106,6 +107,6 @@ module OllamaChat::Utils::PNGMetadataExtractor
|
|
|
106
107
|
# @return [String, nil] The decoded JSON string if found and valid, otherwise nil.
|
|
107
108
|
def extract_character(io)
|
|
108
109
|
metadata = extract_all(io) or return
|
|
109
|
-
decode_character(metadata['chara'])
|
|
110
|
+
decode_character(metadata['chara'])&.first
|
|
110
111
|
end
|
|
111
112
|
end
|
data/lib/ollama_chat/utils.rb
CHANGED
|
@@ -20,5 +20,4 @@ require 'ollama_chat/utils/path_completer'
|
|
|
20
20
|
require 'ollama_chat/utils/path_validator'
|
|
21
21
|
require 'ollama_chat/utils/png_metadata_extractor'
|
|
22
22
|
require 'ollama_chat/utils/tag_resolver'
|
|
23
|
-
require 'ollama_chat/utils/token_estimator'
|
|
24
23
|
require 'ollama_chat/utils/value_formatter'
|
data/lib/ollama_chat/version.rb
CHANGED
data/lib/ollama_chat.rb
CHANGED
data/ollama_chat.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ollama_chat 0.0.
|
|
2
|
+
# stub: ollama_chat 0.0.96 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama_chat".freeze
|
|
6
|
-
s.version = "0.0.
|
|
6
|
+
s.version = "0.0.96".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
@@ -12,15 +12,15 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
s.description = "The app provides a command-line interface (CLI) to an Ollama AI model,\nallowing users to engage in text-based conversations and generate\nhuman-like responses. Users can import data from local files or web pages,\nwhich are then processed through three different modes: fully importing the\ncontent into the conversation context, summarizing the information for\nconcise reference, or storing it in an embedding vector database for later\nretrieval based on the conversation.\n".freeze
|
|
13
13
|
s.email = "flori@ping.de".freeze
|
|
14
14
|
s.executables = ["ollama_chat".freeze, "ollama_chat_send".freeze]
|
|
15
|
-
s.extra_rdoc_files = ["README.md".freeze, "lib/ollama_chat.rb".freeze, "lib/ollama_chat/chat.rb".freeze, "lib/ollama_chat/clipboard.rb".freeze, "lib/ollama_chat/command_concern.rb".freeze, "lib/ollama_chat/commands.rb".freeze, "lib/ollama_chat/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/database.rb".freeze, "lib/ollama_chat/database/duplicatable.rb".freeze, "lib/ollama_chat/database/migrations.rb".freeze, "lib/ollama_chat/database/migrations/001_initial_schema.rb".freeze, "lib/ollama_chat/database/migrations/002_add_links_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/003_add_history_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/004_add_profile_to_model_options.rb".freeze, "lib/ollama_chat/database/models/favourite.rb".freeze, "lib/ollama_chat/database/models/model_options.rb".freeze, "lib/ollama_chat/database/models/prompt.rb".freeze, "lib/ollama_chat/database/models/session.rb".freeze, "lib/ollama_chat/database/session_locking.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.rb".freeze, "lib/ollama_chat/favourites_management.rb".freeze, "lib/ollama_chat/file_editing.rb".freeze, "lib/ollama_chat/follow_chat.rb".freeze, "lib/ollama_chat/history.rb".freeze, "lib/ollama_chat/http_handling.rb".freeze, "lib/ollama_chat/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/links_set.rb".freeze, "lib/ollama_chat/location_handling.rb".freeze, "lib/ollama_chat/logging.rb".freeze, "lib/ollama_chat/message.rb".freeze, "lib/ollama_chat/message_editing.rb".freeze, "lib/ollama_chat/message_format.rb".freeze, "lib/ollama_chat/message_list.rb".freeze, "lib/ollama_chat/message_output.rb".freeze, "lib/ollama_chat/model_handling.rb".freeze, "lib/ollama_chat/oc.rb".freeze, "lib/ollama_chat/ollama_chat_config.rb".freeze, "lib/ollama_chat/pager.rb".freeze, "lib/ollama_chat/parsing.rb".freeze, "lib/ollama_chat/personae_management.rb".freeze, "lib/ollama_chat/prompt_handling.rb".freeze, "lib/ollama_chat/prompt_management.rb".freeze, "lib/ollama_chat/rag_handling.rb".freeze, "lib/ollama_chat/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.rb".freeze, "lib/ollama_chat/session_management.rb".freeze, "lib/ollama_chat/source_fetching.rb".freeze, "lib/ollama_chat/state_selectors.rb".freeze, "lib/ollama_chat/switches.rb".freeze, "lib/ollama_chat/system_prompt_management.rb".freeze, "lib/ollama_chat/think_control.rb".freeze, "lib/ollama_chat/tool_calling.rb".freeze, "lib/ollama_chat/tools.rb".freeze, "lib/ollama_chat/tools/browse.rb".freeze, "lib/ollama_chat/tools/compute_bmi.rb".freeze, "lib/ollama_chat/tools/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/delete_file.rb".freeze, "lib/ollama_chat/tools/directory_structure.rb".freeze, "lib/ollama_chat/tools/eval_ruby.rb".freeze, "lib/ollama_chat/tools/execute_grep.rb".freeze, "lib/ollama_chat/tools/execute_ri.rb".freeze, "lib/ollama_chat/tools/file_context.rb".freeze, "lib/ollama_chat/tools/gem_path_lookup.rb".freeze, "lib/ollama_chat/tools/generate_image.rb".freeze, "lib/ollama_chat/tools/generate_password.rb".freeze, "lib/ollama_chat/tools/get_current_weather.rb".freeze, "lib/ollama_chat/tools/get_cve.rb".freeze, "lib/ollama_chat/tools/get_endoflife.rb".freeze, "lib/ollama_chat/tools/get_ghr.rb".freeze, "lib/ollama_chat/tools/get_jira_issue.rb".freeze, "lib/ollama_chat/tools/get_location.rb".freeze, "lib/ollama_chat/tools/get_rfc.rb".freeze, "lib/ollama_chat/tools/get_time.rb".freeze, "lib/ollama_chat/tools/get_url.rb".freeze, "lib/ollama_chat/tools/move_file.rb".freeze, "lib/ollama_chat/tools/open_file_in_editor.rb".freeze, "lib/ollama_chat/tools/paste_from_clipboard.rb".freeze, "lib/ollama_chat/tools/paste_into_editor.rb".freeze, "lib/ollama_chat/tools/patch_file.rb".freeze, "lib/ollama_chat/tools/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.rb".freeze, "lib/ollama_chat/tools/retrieve_document_snippets.rb".freeze, "lib/ollama_chat/tools/roll_dice.rb".freeze, "lib/ollama_chat/tools/run_tests.rb".freeze, "lib/ollama_chat/tools/search_web.rb".freeze, "lib/ollama_chat/tools/write_file.rb".freeze, "lib/ollama_chat/utils.rb".freeze, "lib/ollama_chat/utils/analyze_directory.rb".freeze, "lib/ollama_chat/utils/backup.rb".freeze, "lib/ollama_chat/utils/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/json_jsonl_io.rb".freeze, "lib/ollama_chat/utils/path_completer.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/png_metadata_extractor.rb".freeze, "lib/ollama_chat/utils/tag_resolver.rb".freeze, "lib/ollama_chat/utils/
|
|
16
|
-
s.files = [".utilsrc".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ollama_chat".freeze, "bin/ollama_chat_send".freeze, "config/searxng/settings.yml".freeze, "config/sherlock.md".freeze, "docker-compose.yml".freeze, "lib/ollama_chat.rb".freeze, "lib/ollama_chat/chat.rb".freeze, "lib/ollama_chat/clipboard.rb".freeze, "lib/ollama_chat/command_concern.rb".freeze, "lib/ollama_chat/commands.rb".freeze, "lib/ollama_chat/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/database.rb".freeze, "lib/ollama_chat/database/duplicatable.rb".freeze, "lib/ollama_chat/database/migrations.rb".freeze, "lib/ollama_chat/database/migrations/001_initial_schema.rb".freeze, "lib/ollama_chat/database/migrations/002_add_links_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/003_add_history_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/004_add_profile_to_model_options.rb".freeze, "lib/ollama_chat/database/models/favourite.rb".freeze, "lib/ollama_chat/database/models/model_options.rb".freeze, "lib/ollama_chat/database/models/prompt.rb".freeze, "lib/ollama_chat/database/models/session.rb".freeze, "lib/ollama_chat/database/session_locking.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.rb".freeze, "lib/ollama_chat/favourites_management.rb".freeze, "lib/ollama_chat/file_editing.rb".freeze, "lib/ollama_chat/follow_chat.rb".freeze, "lib/ollama_chat/history.rb".freeze, "lib/ollama_chat/http_handling.rb".freeze, "lib/ollama_chat/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/links_set.rb".freeze, "lib/ollama_chat/location_handling.rb".freeze, "lib/ollama_chat/logging.rb".freeze, "lib/ollama_chat/message.rb".freeze, "lib/ollama_chat/message_editing.rb".freeze, "lib/ollama_chat/message_format.rb".freeze, "lib/ollama_chat/message_list.rb".freeze, "lib/ollama_chat/message_output.rb".freeze, "lib/ollama_chat/model_handling.rb".freeze, "lib/ollama_chat/oc.rb".freeze, "lib/ollama_chat/ollama_chat_config.rb".freeze, "lib/ollama_chat/ollama_chat_config/default_config.yml".freeze, "lib/ollama_chat/pager.rb".freeze, "lib/ollama_chat/parsing.rb".freeze, "lib/ollama_chat/personae_management.rb".freeze, "lib/ollama_chat/prompt_handling.rb".freeze, "lib/ollama_chat/prompt_management.rb".freeze, "lib/ollama_chat/rag_handling.rb".freeze, "lib/ollama_chat/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.rb".freeze, "lib/ollama_chat/session_management.rb".freeze, "lib/ollama_chat/source_fetching.rb".freeze, "lib/ollama_chat/state_selectors.rb".freeze, "lib/ollama_chat/switches.rb".freeze, "lib/ollama_chat/system_prompt_management.rb".freeze, "lib/ollama_chat/think_control.rb".freeze, "lib/ollama_chat/tool_calling.rb".freeze, "lib/ollama_chat/tools.rb".freeze, "lib/ollama_chat/tools/browse.rb".freeze, "lib/ollama_chat/tools/compute_bmi.rb".freeze, "lib/ollama_chat/tools/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/delete_file.rb".freeze, "lib/ollama_chat/tools/directory_structure.rb".freeze, "lib/ollama_chat/tools/eval_ruby.rb".freeze, "lib/ollama_chat/tools/execute_grep.rb".freeze, "lib/ollama_chat/tools/execute_ri.rb".freeze, "lib/ollama_chat/tools/file_context.rb".freeze, "lib/ollama_chat/tools/gem_path_lookup.rb".freeze, "lib/ollama_chat/tools/generate_image.rb".freeze, "lib/ollama_chat/tools/generate_password.rb".freeze, "lib/ollama_chat/tools/get_current_weather.rb".freeze, "lib/ollama_chat/tools/get_cve.rb".freeze, "lib/ollama_chat/tools/get_endoflife.rb".freeze, "lib/ollama_chat/tools/get_ghr.rb".freeze, "lib/ollama_chat/tools/get_jira_issue.rb".freeze, "lib/ollama_chat/tools/get_location.rb".freeze, "lib/ollama_chat/tools/get_rfc.rb".freeze, "lib/ollama_chat/tools/get_time.rb".freeze, "lib/ollama_chat/tools/get_url.rb".freeze, "lib/ollama_chat/tools/move_file.rb".freeze, "lib/ollama_chat/tools/open_file_in_editor.rb".freeze, "lib/ollama_chat/tools/paste_from_clipboard.rb".freeze, "lib/ollama_chat/tools/paste_into_editor.rb".freeze, "lib/ollama_chat/tools/patch_file.rb".freeze, "lib/ollama_chat/tools/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.rb".freeze, "lib/ollama_chat/tools/retrieve_document_snippets.rb".freeze, "lib/ollama_chat/tools/roll_dice.rb".freeze, "lib/ollama_chat/tools/run_tests.rb".freeze, "lib/ollama_chat/tools/search_web.rb".freeze, "lib/ollama_chat/tools/write_file.rb".freeze, "lib/ollama_chat/utils.rb".freeze, "lib/ollama_chat/utils/analyze_directory.rb".freeze, "lib/ollama_chat/utils/backup.rb".freeze, "lib/ollama_chat/utils/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/json_jsonl_io.rb".freeze, "lib/ollama_chat/utils/path_completer.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/png_metadata_extractor.rb".freeze, "lib/ollama_chat/utils/tag_resolver.rb".freeze, "lib/ollama_chat/utils/
|
|
15
|
+
s.extra_rdoc_files = ["README.md".freeze, "lib/ollama_chat.rb".freeze, "lib/ollama_chat/chat.rb".freeze, "lib/ollama_chat/clipboard.rb".freeze, "lib/ollama_chat/command_concern.rb".freeze, "lib/ollama_chat/commands.rb".freeze, "lib/ollama_chat/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/database.rb".freeze, "lib/ollama_chat/database/duplicatable.rb".freeze, "lib/ollama_chat/database/migrations.rb".freeze, "lib/ollama_chat/database/migrations/001_initial_schema.rb".freeze, "lib/ollama_chat/database/migrations/002_add_links_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/003_add_history_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/004_add_profile_to_model_options.rb".freeze, "lib/ollama_chat/database/models/favourite.rb".freeze, "lib/ollama_chat/database/models/model_options.rb".freeze, "lib/ollama_chat/database/models/prompt.rb".freeze, "lib/ollama_chat/database/models/session.rb".freeze, "lib/ollama_chat/database/session_locking.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.rb".freeze, "lib/ollama_chat/favourites_management.rb".freeze, "lib/ollama_chat/file_editing.rb".freeze, "lib/ollama_chat/follow_chat.rb".freeze, "lib/ollama_chat/history.rb".freeze, "lib/ollama_chat/http_handling.rb".freeze, "lib/ollama_chat/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/links_set.rb".freeze, "lib/ollama_chat/location_handling.rb".freeze, "lib/ollama_chat/logging.rb".freeze, "lib/ollama_chat/message.rb".freeze, "lib/ollama_chat/message_editing.rb".freeze, "lib/ollama_chat/message_format.rb".freeze, "lib/ollama_chat/message_list.rb".freeze, "lib/ollama_chat/message_output.rb".freeze, "lib/ollama_chat/model_handling.rb".freeze, "lib/ollama_chat/oc.rb".freeze, "lib/ollama_chat/ollama_chat_config.rb".freeze, "lib/ollama_chat/pager.rb".freeze, "lib/ollama_chat/parsing.rb".freeze, "lib/ollama_chat/personae_management.rb".freeze, "lib/ollama_chat/prompt_handling.rb".freeze, "lib/ollama_chat/prompt_management.rb".freeze, "lib/ollama_chat/rag_handling.rb".freeze, "lib/ollama_chat/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.rb".freeze, "lib/ollama_chat/session_management.rb".freeze, "lib/ollama_chat/source_fetching.rb".freeze, "lib/ollama_chat/state_selectors.rb".freeze, "lib/ollama_chat/switches.rb".freeze, "lib/ollama_chat/system_prompt_management.rb".freeze, "lib/ollama_chat/think_control.rb".freeze, "lib/ollama_chat/token_estimator.rb".freeze, "lib/ollama_chat/token_estimator/crude.rb".freeze, "lib/ollama_chat/tool_calling.rb".freeze, "lib/ollama_chat/tools.rb".freeze, "lib/ollama_chat/tools/browse.rb".freeze, "lib/ollama_chat/tools/compute_bmi.rb".freeze, "lib/ollama_chat/tools/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/delete_file.rb".freeze, "lib/ollama_chat/tools/directory_structure.rb".freeze, "lib/ollama_chat/tools/eval_ruby.rb".freeze, "lib/ollama_chat/tools/execute_grep.rb".freeze, "lib/ollama_chat/tools/execute_ri.rb".freeze, "lib/ollama_chat/tools/file_context.rb".freeze, "lib/ollama_chat/tools/gem_path_lookup.rb".freeze, "lib/ollama_chat/tools/generate_image.rb".freeze, "lib/ollama_chat/tools/generate_password.rb".freeze, "lib/ollama_chat/tools/get_current_weather.rb".freeze, "lib/ollama_chat/tools/get_cve.rb".freeze, "lib/ollama_chat/tools/get_endoflife.rb".freeze, "lib/ollama_chat/tools/get_ghr.rb".freeze, "lib/ollama_chat/tools/get_jira_issue.rb".freeze, "lib/ollama_chat/tools/get_location.rb".freeze, "lib/ollama_chat/tools/get_rfc.rb".freeze, "lib/ollama_chat/tools/get_time.rb".freeze, "lib/ollama_chat/tools/get_url.rb".freeze, "lib/ollama_chat/tools/move_file.rb".freeze, "lib/ollama_chat/tools/open_file_in_editor.rb".freeze, "lib/ollama_chat/tools/paste_from_clipboard.rb".freeze, "lib/ollama_chat/tools/paste_into_editor.rb".freeze, "lib/ollama_chat/tools/patch_file.rb".freeze, "lib/ollama_chat/tools/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.rb".freeze, "lib/ollama_chat/tools/retrieve_document_snippets.rb".freeze, "lib/ollama_chat/tools/roll_dice.rb".freeze, "lib/ollama_chat/tools/run_tests.rb".freeze, "lib/ollama_chat/tools/search_web.rb".freeze, "lib/ollama_chat/tools/write_file.rb".freeze, "lib/ollama_chat/utils.rb".freeze, "lib/ollama_chat/utils/analyze_directory.rb".freeze, "lib/ollama_chat/utils/backup.rb".freeze, "lib/ollama_chat/utils/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/json_jsonl_io.rb".freeze, "lib/ollama_chat/utils/path_completer.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/png_metadata_extractor.rb".freeze, "lib/ollama_chat/utils/tag_resolver.rb".freeze, "lib/ollama_chat/utils/utf8_converter.rb".freeze, "lib/ollama_chat/utils/value_formatter.rb".freeze, "lib/ollama_chat/version.rb".freeze, "lib/ollama_chat/vim.rb".freeze, "lib/ollama_chat/web_searching.rb".freeze]
|
|
16
|
+
s.files = [".utilsrc".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ollama_chat".freeze, "bin/ollama_chat_send".freeze, "config/searxng/settings.yml".freeze, "config/sherlock.md".freeze, "docker-compose.yml".freeze, "lib/ollama_chat.rb".freeze, "lib/ollama_chat/chat.rb".freeze, "lib/ollama_chat/clipboard.rb".freeze, "lib/ollama_chat/command_concern.rb".freeze, "lib/ollama_chat/commands.rb".freeze, "lib/ollama_chat/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/database.rb".freeze, "lib/ollama_chat/database/duplicatable.rb".freeze, "lib/ollama_chat/database/migrations.rb".freeze, "lib/ollama_chat/database/migrations/001_initial_schema.rb".freeze, "lib/ollama_chat/database/migrations/002_add_links_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/003_add_history_to_sessions.rb".freeze, "lib/ollama_chat/database/migrations/004_add_profile_to_model_options.rb".freeze, "lib/ollama_chat/database/models/favourite.rb".freeze, "lib/ollama_chat/database/models/model_options.rb".freeze, "lib/ollama_chat/database/models/prompt.rb".freeze, "lib/ollama_chat/database/models/session.rb".freeze, "lib/ollama_chat/database/session_locking.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.rb".freeze, "lib/ollama_chat/favourites_management.rb".freeze, "lib/ollama_chat/file_editing.rb".freeze, "lib/ollama_chat/follow_chat.rb".freeze, "lib/ollama_chat/history.rb".freeze, "lib/ollama_chat/http_handling.rb".freeze, "lib/ollama_chat/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/links_set.rb".freeze, "lib/ollama_chat/location_handling.rb".freeze, "lib/ollama_chat/logging.rb".freeze, "lib/ollama_chat/message.rb".freeze, "lib/ollama_chat/message_editing.rb".freeze, "lib/ollama_chat/message_format.rb".freeze, "lib/ollama_chat/message_list.rb".freeze, "lib/ollama_chat/message_output.rb".freeze, "lib/ollama_chat/model_handling.rb".freeze, "lib/ollama_chat/oc.rb".freeze, "lib/ollama_chat/ollama_chat_config.rb".freeze, "lib/ollama_chat/ollama_chat_config/default_config.yml".freeze, "lib/ollama_chat/pager.rb".freeze, "lib/ollama_chat/parsing.rb".freeze, "lib/ollama_chat/personae_management.rb".freeze, "lib/ollama_chat/prompt_handling.rb".freeze, "lib/ollama_chat/prompt_management.rb".freeze, "lib/ollama_chat/rag_handling.rb".freeze, "lib/ollama_chat/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.rb".freeze, "lib/ollama_chat/session_management.rb".freeze, "lib/ollama_chat/source_fetching.rb".freeze, "lib/ollama_chat/state_selectors.rb".freeze, "lib/ollama_chat/switches.rb".freeze, "lib/ollama_chat/system_prompt_management.rb".freeze, "lib/ollama_chat/think_control.rb".freeze, "lib/ollama_chat/token_estimator.rb".freeze, "lib/ollama_chat/token_estimator/crude.rb".freeze, "lib/ollama_chat/tool_calling.rb".freeze, "lib/ollama_chat/tools.rb".freeze, "lib/ollama_chat/tools/browse.rb".freeze, "lib/ollama_chat/tools/compute_bmi.rb".freeze, "lib/ollama_chat/tools/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/delete_file.rb".freeze, "lib/ollama_chat/tools/directory_structure.rb".freeze, "lib/ollama_chat/tools/eval_ruby.rb".freeze, "lib/ollama_chat/tools/execute_grep.rb".freeze, "lib/ollama_chat/tools/execute_ri.rb".freeze, "lib/ollama_chat/tools/file_context.rb".freeze, "lib/ollama_chat/tools/gem_path_lookup.rb".freeze, "lib/ollama_chat/tools/generate_image.rb".freeze, "lib/ollama_chat/tools/generate_password.rb".freeze, "lib/ollama_chat/tools/get_current_weather.rb".freeze, "lib/ollama_chat/tools/get_cve.rb".freeze, "lib/ollama_chat/tools/get_endoflife.rb".freeze, "lib/ollama_chat/tools/get_ghr.rb".freeze, "lib/ollama_chat/tools/get_jira_issue.rb".freeze, "lib/ollama_chat/tools/get_location.rb".freeze, "lib/ollama_chat/tools/get_rfc.rb".freeze, "lib/ollama_chat/tools/get_time.rb".freeze, "lib/ollama_chat/tools/get_url.rb".freeze, "lib/ollama_chat/tools/move_file.rb".freeze, "lib/ollama_chat/tools/open_file_in_editor.rb".freeze, "lib/ollama_chat/tools/paste_from_clipboard.rb".freeze, "lib/ollama_chat/tools/paste_into_editor.rb".freeze, "lib/ollama_chat/tools/patch_file.rb".freeze, "lib/ollama_chat/tools/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.rb".freeze, "lib/ollama_chat/tools/retrieve_document_snippets.rb".freeze, "lib/ollama_chat/tools/roll_dice.rb".freeze, "lib/ollama_chat/tools/run_tests.rb".freeze, "lib/ollama_chat/tools/search_web.rb".freeze, "lib/ollama_chat/tools/write_file.rb".freeze, "lib/ollama_chat/utils.rb".freeze, "lib/ollama_chat/utils/analyze_directory.rb".freeze, "lib/ollama_chat/utils/backup.rb".freeze, "lib/ollama_chat/utils/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/json_jsonl_io.rb".freeze, "lib/ollama_chat/utils/path_completer.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/png_metadata_extractor.rb".freeze, "lib/ollama_chat/utils/tag_resolver.rb".freeze, "lib/ollama_chat/utils/utf8_converter.rb".freeze, "lib/ollama_chat/utils/value_formatter.rb".freeze, "lib/ollama_chat/version.rb".freeze, "lib/ollama_chat/vim.rb".freeze, "lib/ollama_chat/web_searching.rb".freeze, "ollama_chat.gemspec".freeze, "redis/redis.conf".freeze, "spec/assets/api_show.json".freeze, "spec/assets/api_tags.json".freeze, "spec/assets/api_version.json".freeze, "spec/assets/conversation.json".freeze, "spec/assets/conversation.jsonl".freeze, "spec/assets/deep/deeper/empty.txt".freeze, "spec/assets/deep/deeper/not-empty.txt".freeze, "spec/assets/deep/empty.txt".freeze, "spec/assets/duckduckgo.html".freeze, "spec/assets/example.atom".freeze, "spec/assets/example.csv".freeze, "spec/assets/example.html".freeze, "spec/assets/example.pdf".freeze, "spec/assets/example.ps".freeze, "spec/assets/example.rb".freeze, "spec/assets/example.rss".freeze, "spec/assets/example.xml".freeze, "spec/assets/example_with_quote.html".freeze, "spec/assets/fluffy.png".freeze, "spec/assets/kitten.jpg".freeze, "spec/assets/miyu.png".freeze, "spec/assets/pirateweather.json".freeze, "spec/assets/prompt.txt".freeze, "spec/assets/searxng.json".freeze, "spec/ollama_chat/chat_spec.rb".freeze, "spec/ollama_chat/clipboard_spec.rb".freeze, "spec/ollama_chat/database/models/favourite_spec.rb".freeze, "spec/ollama_chat/file_editing_spec.rb".freeze, "spec/ollama_chat/follow_chat_spec.rb".freeze, "spec/ollama_chat/history_spec.rb".freeze, "spec/ollama_chat/information_spec.rb".freeze, "spec/ollama_chat/input_content_spec.rb".freeze, "spec/ollama_chat/kramdown_ansi_spec.rb".freeze, "spec/ollama_chat/message_editing_spec.rb".freeze, "spec/ollama_chat/message_list_spec.rb".freeze, "spec/ollama_chat/message_output_spec.rb".freeze, "spec/ollama_chat/model_handling_spec.rb".freeze, "spec/ollama_chat/parsing_spec.rb".freeze, "spec/ollama_chat/redis_cache_spec.rb".freeze, "spec/ollama_chat/server_socket_spec.rb".freeze, "spec/ollama_chat/source_fetching_spec.rb".freeze, "spec/ollama_chat/state_selectors_spec.rb".freeze, "spec/ollama_chat/switches_spec.rb".freeze, "spec/ollama_chat/think_control_spec.rb".freeze, "spec/ollama_chat/token_estimator_spec.rb".freeze, "spec/ollama_chat/tool_calling_spec.rb".freeze, "spec/ollama_chat/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/compute_bmi_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/delete_file_spec.rb".freeze, "spec/ollama_chat/tools/directory_structure_spec.rb".freeze, "spec/ollama_chat/tools/execute_grep_spec.rb".freeze, "spec/ollama_chat/tools/execute_ri_spec.rb".freeze, "spec/ollama_chat/tools/file_context_spec.rb".freeze, "spec/ollama_chat/tools/gem_path_lookup_spec.rb".freeze, "spec/ollama_chat/tools/generate_image_spec.rb".freeze, "spec/ollama_chat/tools/generate_password_spec.rb".freeze, "spec/ollama_chat/tools/get_current_weather_spec.rb".freeze, "spec/ollama_chat/tools/get_cve_spec.rb".freeze, "spec/ollama_chat/tools/get_endoflife_spec.rb".freeze, "spec/ollama_chat/tools/get_ghr_spec.rb".freeze, "spec/ollama_chat/tools/get_jira_issue_spec.rb".freeze, "spec/ollama_chat/tools/get_location_spec.rb".freeze, "spec/ollama_chat/tools/get_rfc_spec.rb".freeze, "spec/ollama_chat/tools/get_time_spec.rb".freeze, "spec/ollama_chat/tools/get_url_spec.rb".freeze, "spec/ollama_chat/tools/move_file_spec.rb".freeze, "spec/ollama_chat/tools/open_file_in_editor_spec.rb".freeze, "spec/ollama_chat/tools/paste_from_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/paste_into_editor_spec.rb".freeze, "spec/ollama_chat/tools/patch_file_spec.rb".freeze, "spec/ollama_chat/tools/read_file_spec.rb".freeze, "spec/ollama_chat/tools/resolve_tag_spec.rb".freeze, "spec/ollama_chat/tools/retrieve_document_snippets_spec.rb".freeze, "spec/ollama_chat/tools/roll_dice_spec.rb".freeze, "spec/ollama_chat/tools/run_tests_spec.rb".freeze, "spec/ollama_chat/tools/search_web_spec.rb".freeze, "spec/ollama_chat/tools/write_file_spec.rb".freeze, "spec/ollama_chat/utils/analyze_directory_spec.rb".freeze, "spec/ollama_chat/utils/cache_fetcher_spec.rb".freeze, "spec/ollama_chat/utils/fetcher_spec.rb".freeze, "spec/ollama_chat/utils/path_completer_spec.rb".freeze, "spec/ollama_chat/utils/png_metadata_extractor_spec.rb".freeze, "spec/ollama_chat/vim_spec.rb".freeze, "spec/ollama_chat/web_searching_spec.rb".freeze, "spec/spec_helper.rb".freeze, "tmp/.keep".freeze]
|
|
17
17
|
s.homepage = "https://github.com/flori/ollama_chat".freeze
|
|
18
18
|
s.licenses = ["MIT".freeze]
|
|
19
19
|
s.rdoc_options = ["--title".freeze, "OllamaChat - A command-line interface (CLI) for interacting with an Ollama AI model.".freeze, "--main".freeze, "README.md".freeze]
|
|
20
20
|
s.required_ruby_version = Gem::Requirement.new(">= 3.2".freeze)
|
|
21
21
|
s.rubygems_version = "4.0.10".freeze
|
|
22
22
|
s.summary = "A command-line interface (CLI) for interacting with an Ollama AI model.".freeze
|
|
23
|
-
s.test_files = ["spec/assets/example.rb".freeze, "spec/ollama_chat/chat_spec.rb".freeze, "spec/ollama_chat/clipboard_spec.rb".freeze, "spec/ollama_chat/database/models/favourite_spec.rb".freeze, "spec/ollama_chat/file_editing_spec.rb".freeze, "spec/ollama_chat/follow_chat_spec.rb".freeze, "spec/ollama_chat/history_spec.rb".freeze, "spec/ollama_chat/information_spec.rb".freeze, "spec/ollama_chat/input_content_spec.rb".freeze, "spec/ollama_chat/kramdown_ansi_spec.rb".freeze, "spec/ollama_chat/message_editing_spec.rb".freeze, "spec/ollama_chat/message_list_spec.rb".freeze, "spec/ollama_chat/message_output_spec.rb".freeze, "spec/ollama_chat/model_handling_spec.rb".freeze, "spec/ollama_chat/parsing_spec.rb".freeze, "spec/ollama_chat/redis_cache_spec.rb".freeze, "spec/ollama_chat/server_socket_spec.rb".freeze, "spec/ollama_chat/source_fetching_spec.rb".freeze, "spec/ollama_chat/state_selectors_spec.rb".freeze, "spec/ollama_chat/switches_spec.rb".freeze, "spec/ollama_chat/think_control_spec.rb".freeze, "spec/ollama_chat/tool_calling_spec.rb".freeze, "spec/ollama_chat/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/compute_bmi_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/delete_file_spec.rb".freeze, "spec/ollama_chat/tools/directory_structure_spec.rb".freeze, "spec/ollama_chat/tools/execute_grep_spec.rb".freeze, "spec/ollama_chat/tools/execute_ri_spec.rb".freeze, "spec/ollama_chat/tools/file_context_spec.rb".freeze, "spec/ollama_chat/tools/gem_path_lookup_spec.rb".freeze, "spec/ollama_chat/tools/generate_image_spec.rb".freeze, "spec/ollama_chat/tools/generate_password_spec.rb".freeze, "spec/ollama_chat/tools/get_current_weather_spec.rb".freeze, "spec/ollama_chat/tools/get_cve_spec.rb".freeze, "spec/ollama_chat/tools/get_endoflife_spec.rb".freeze, "spec/ollama_chat/tools/get_ghr_spec.rb".freeze, "spec/ollama_chat/tools/get_jira_issue_spec.rb".freeze, "spec/ollama_chat/tools/get_location_spec.rb".freeze, "spec/ollama_chat/tools/get_rfc_spec.rb".freeze, "spec/ollama_chat/tools/get_time_spec.rb".freeze, "spec/ollama_chat/tools/get_url_spec.rb".freeze, "spec/ollama_chat/tools/move_file_spec.rb".freeze, "spec/ollama_chat/tools/open_file_in_editor_spec.rb".freeze, "spec/ollama_chat/tools/paste_from_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/paste_into_editor_spec.rb".freeze, "spec/ollama_chat/tools/patch_file_spec.rb".freeze, "spec/ollama_chat/tools/read_file_spec.rb".freeze, "spec/ollama_chat/tools/resolve_tag_spec.rb".freeze, "spec/ollama_chat/tools/retrieve_document_snippets_spec.rb".freeze, "spec/ollama_chat/tools/roll_dice_spec.rb".freeze, "spec/ollama_chat/tools/run_tests_spec.rb".freeze, "spec/ollama_chat/tools/search_web_spec.rb".freeze, "spec/ollama_chat/tools/write_file_spec.rb".freeze, "spec/ollama_chat/utils/analyze_directory_spec.rb".freeze, "spec/ollama_chat/utils/cache_fetcher_spec.rb".freeze, "spec/ollama_chat/utils/fetcher_spec.rb".freeze, "spec/ollama_chat/utils/path_completer_spec.rb".freeze, "spec/ollama_chat/utils/png_metadata_extractor_spec.rb".freeze, "spec/ollama_chat/vim_spec.rb".freeze, "spec/ollama_chat/web_searching_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
|
23
|
+
s.test_files = ["spec/assets/example.rb".freeze, "spec/ollama_chat/chat_spec.rb".freeze, "spec/ollama_chat/clipboard_spec.rb".freeze, "spec/ollama_chat/database/models/favourite_spec.rb".freeze, "spec/ollama_chat/file_editing_spec.rb".freeze, "spec/ollama_chat/follow_chat_spec.rb".freeze, "spec/ollama_chat/history_spec.rb".freeze, "spec/ollama_chat/information_spec.rb".freeze, "spec/ollama_chat/input_content_spec.rb".freeze, "spec/ollama_chat/kramdown_ansi_spec.rb".freeze, "spec/ollama_chat/message_editing_spec.rb".freeze, "spec/ollama_chat/message_list_spec.rb".freeze, "spec/ollama_chat/message_output_spec.rb".freeze, "spec/ollama_chat/model_handling_spec.rb".freeze, "spec/ollama_chat/parsing_spec.rb".freeze, "spec/ollama_chat/redis_cache_spec.rb".freeze, "spec/ollama_chat/server_socket_spec.rb".freeze, "spec/ollama_chat/source_fetching_spec.rb".freeze, "spec/ollama_chat/state_selectors_spec.rb".freeze, "spec/ollama_chat/switches_spec.rb".freeze, "spec/ollama_chat/think_control_spec.rb".freeze, "spec/ollama_chat/token_estimator_spec.rb".freeze, "spec/ollama_chat/tool_calling_spec.rb".freeze, "spec/ollama_chat/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/compute_bmi_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/delete_file_spec.rb".freeze, "spec/ollama_chat/tools/directory_structure_spec.rb".freeze, "spec/ollama_chat/tools/execute_grep_spec.rb".freeze, "spec/ollama_chat/tools/execute_ri_spec.rb".freeze, "spec/ollama_chat/tools/file_context_spec.rb".freeze, "spec/ollama_chat/tools/gem_path_lookup_spec.rb".freeze, "spec/ollama_chat/tools/generate_image_spec.rb".freeze, "spec/ollama_chat/tools/generate_password_spec.rb".freeze, "spec/ollama_chat/tools/get_current_weather_spec.rb".freeze, "spec/ollama_chat/tools/get_cve_spec.rb".freeze, "spec/ollama_chat/tools/get_endoflife_spec.rb".freeze, "spec/ollama_chat/tools/get_ghr_spec.rb".freeze, "spec/ollama_chat/tools/get_jira_issue_spec.rb".freeze, "spec/ollama_chat/tools/get_location_spec.rb".freeze, "spec/ollama_chat/tools/get_rfc_spec.rb".freeze, "spec/ollama_chat/tools/get_time_spec.rb".freeze, "spec/ollama_chat/tools/get_url_spec.rb".freeze, "spec/ollama_chat/tools/move_file_spec.rb".freeze, "spec/ollama_chat/tools/open_file_in_editor_spec.rb".freeze, "spec/ollama_chat/tools/paste_from_clipboard_spec.rb".freeze, "spec/ollama_chat/tools/paste_into_editor_spec.rb".freeze, "spec/ollama_chat/tools/patch_file_spec.rb".freeze, "spec/ollama_chat/tools/read_file_spec.rb".freeze, "spec/ollama_chat/tools/resolve_tag_spec.rb".freeze, "spec/ollama_chat/tools/retrieve_document_snippets_spec.rb".freeze, "spec/ollama_chat/tools/roll_dice_spec.rb".freeze, "spec/ollama_chat/tools/run_tests_spec.rb".freeze, "spec/ollama_chat/tools/search_web_spec.rb".freeze, "spec/ollama_chat/tools/write_file_spec.rb".freeze, "spec/ollama_chat/utils/analyze_directory_spec.rb".freeze, "spec/ollama_chat/utils/cache_fetcher_spec.rb".freeze, "spec/ollama_chat/utils/fetcher_spec.rb".freeze, "spec/ollama_chat/utils/path_completer_spec.rb".freeze, "spec/ollama_chat/utils/png_metadata_extractor_spec.rb".freeze, "spec/ollama_chat/vim_spec.rb".freeze, "spec/ollama_chat/web_searching_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
|
24
24
|
|
|
25
25
|
s.specification_version = 4
|
|
26
26
|
|
|
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
|
|
|
51
51
|
s.add_runtime_dependency(%q<bigdecimal>.freeze, ["~> 3.1".freeze])
|
|
52
52
|
s.add_runtime_dependency(%q<csv>.freeze, ["~> 3.0".freeze])
|
|
53
53
|
s.add_runtime_dependency(%q<const_conf>.freeze, ["~> 0.3".freeze])
|
|
54
|
-
s.add_runtime_dependency(%q<context_spook>.freeze, ["~> 1.
|
|
54
|
+
s.add_runtime_dependency(%q<context_spook>.freeze, ["~> 1.6".freeze])
|
|
55
55
|
s.add_runtime_dependency(%q<infobar>.freeze, [">= 0.13.1".freeze])
|
|
56
56
|
s.add_runtime_dependency(%q<rubyzip>.freeze, ["~> 3.0".freeze])
|
|
57
57
|
s.add_runtime_dependency(%q<sequel>.freeze, ["~> 5.0".freeze])
|
|
@@ -5,16 +5,13 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
5
5
|
describe 'database constraints' do
|
|
6
6
|
it 'enforces uniqueness of context and name' do
|
|
7
7
|
OllamaChat::Database::Models::Favourite.create(
|
|
8
|
-
context:
|
|
9
|
-
name: name,
|
|
10
|
-
metadata: { key: 'value' }
|
|
8
|
+
context:, name:, metadata: { key: 'value' }
|
|
11
9
|
)
|
|
12
10
|
|
|
13
11
|
# Attempting to create a duplicate should raise a Sequel error
|
|
14
12
|
expect {
|
|
15
13
|
OllamaChat::Database::Models::Favourite.create(
|
|
16
|
-
context:
|
|
17
|
-
name: name
|
|
14
|
+
context:, name:
|
|
18
15
|
)
|
|
19
16
|
}.to raise_error(Sequel::ValidationFailed)
|
|
20
17
|
end
|
|
@@ -26,9 +23,7 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
26
23
|
|
|
27
24
|
# The create call triggers before_save
|
|
28
25
|
fav = OllamaChat::Database::Models::Favourite.create(
|
|
29
|
-
context:
|
|
30
|
-
name: name,
|
|
31
|
-
metadata: metadata_payload
|
|
26
|
+
context:, name:, metadata: metadata_payload
|
|
32
27
|
)
|
|
33
28
|
|
|
34
29
|
# We reload to trigger after_load
|
|
@@ -53,9 +48,7 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
53
48
|
it 'does nothing in after_load if metadata is already a Hash' do
|
|
54
49
|
# This tests the 'if metadata.is_a?(String)' condition
|
|
55
50
|
fav = OllamaChat::Database::Models::Favourite.create(
|
|
56
|
-
context:
|
|
57
|
-
name: name,
|
|
58
|
-
metadata: { 'already' => 'hash' }
|
|
51
|
+
context:, name:, metadata: { 'already' => 'hash' }
|
|
59
52
|
)
|
|
60
53
|
|
|
61
54
|
# Accessing metadata directly without a fresh reload from DB
|
|
@@ -67,9 +60,7 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
67
60
|
describe 'update metadata' do
|
|
68
61
|
let!(:fav) do
|
|
69
62
|
OllamaChat::Database::Models::Favourite.create(
|
|
70
|
-
context:
|
|
71
|
-
name: name,
|
|
72
|
-
metadata: { 'existing' => 'data' }
|
|
63
|
+
context:, name:, metadata: { 'existing' => 'data' }
|
|
73
64
|
)
|
|
74
65
|
end
|
|
75
66
|
|
|
@@ -87,9 +78,7 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
87
78
|
context "nil and non‑hash metadata handling" do
|
|
88
79
|
it "keeps nil metadata after reload" do
|
|
89
80
|
f = OllamaChat::Database::Models::Favourite.create(
|
|
90
|
-
context:
|
|
91
|
-
name: "nil_test",
|
|
92
|
-
metadata: nil
|
|
81
|
+
context:, name: "nil_test", metadata: nil
|
|
93
82
|
)
|
|
94
83
|
reload = OllamaChat::Database::Models::Favourite.first(id: f.id)
|
|
95
84
|
expect(reload.metadata).to be_nil
|
|
@@ -98,9 +87,7 @@ describe 'OllamaChat::Database::Models::Favourite', type: :model do
|
|
|
98
87
|
it "serialises and deserialises an array" do
|
|
99
88
|
arr = %w[foo bar baz]
|
|
100
89
|
f = OllamaChat::Database::Models::Favourite.create(
|
|
101
|
-
context:
|
|
102
|
-
name: "array_test",
|
|
103
|
-
metadata: arr
|
|
90
|
+
context:, name: "array_test", metadata: arr
|
|
104
91
|
)
|
|
105
92
|
reload = OllamaChat::Database::Models::Favourite.first(id: f.id)
|
|
106
93
|
expect(reload.metadata).to eq(arr)
|
|
@@ -11,7 +11,7 @@ describe OllamaChat::ServerSocket do
|
|
|
11
11
|
|
|
12
12
|
before do
|
|
13
13
|
expect(OllamaChat::ServerSocket).to receive(:create_socket_server).
|
|
14
|
-
with(config
|
|
14
|
+
with(config:, runtime_dir: nil, working_dir: nil).and_return(server)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
context 'with default parameters' do
|
|
@@ -20,7 +20,7 @@ describe OllamaChat::ServerSocket do
|
|
|
20
20
|
|
|
21
21
|
expect(server).to receive(:transmit).with(message).and_return(nil)
|
|
22
22
|
|
|
23
|
-
result = OllamaChat::ServerSocket.send_to_server_socket('test', config:
|
|
23
|
+
result = OllamaChat::ServerSocket.send_to_server_socket('test', config:)
|
|
24
24
|
|
|
25
25
|
expect(result).to be_nil
|
|
26
26
|
end
|
|
@@ -33,10 +33,7 @@ describe OllamaChat::ServerSocket do
|
|
|
33
33
|
expect(server).to receive(:transmit).with(message).and_return(nil)
|
|
34
34
|
|
|
35
35
|
result = OllamaChat::ServerSocket.send_to_server_socket(
|
|
36
|
-
'test',
|
|
37
|
-
config: config,
|
|
38
|
-
type: :socket_input,
|
|
39
|
-
parse: true
|
|
36
|
+
'test', config:, type: :socket_input, parse: true
|
|
40
37
|
)
|
|
41
38
|
|
|
42
39
|
expect(result).to be_nil
|
|
@@ -52,10 +49,7 @@ describe OllamaChat::ServerSocket do
|
|
|
52
49
|
and_return(response)
|
|
53
50
|
|
|
54
51
|
result = OllamaChat::ServerSocket.send_to_server_socket(
|
|
55
|
-
'test',
|
|
56
|
-
config: config,
|
|
57
|
-
type: :socket_input_with_response,
|
|
58
|
-
parse: false
|
|
52
|
+
'test', config:, type: :socket_input_with_response, parse: false
|
|
59
53
|
)
|
|
60
54
|
|
|
61
55
|
expect(result).to eq(response)
|
|
@@ -71,10 +65,7 @@ describe OllamaChat::ServerSocket do
|
|
|
71
65
|
and_return(response)
|
|
72
66
|
|
|
73
67
|
result = OllamaChat::ServerSocket.send_to_server_socket(
|
|
74
|
-
'test',
|
|
75
|
-
config: config,
|
|
76
|
-
type: :socket_input_with_response,
|
|
77
|
-
parse: true
|
|
68
|
+
'test', config:, type: :socket_input_with_response, parse: true
|
|
78
69
|
)
|
|
79
70
|
|
|
80
71
|
expect(result).to eq(response)
|
|
@@ -85,7 +76,7 @@ describe OllamaChat::ServerSocket do
|
|
|
85
76
|
context 'with working_dir' do
|
|
86
77
|
before do
|
|
87
78
|
expect(OllamaChat::ServerSocket).to receive(:create_socket_server).
|
|
88
|
-
with(config
|
|
79
|
+
with(config:, runtime_dir: nil, working_dir: 'foo/path').
|
|
89
80
|
and_return(server)
|
|
90
81
|
end
|
|
91
82
|
|
|
@@ -95,7 +86,7 @@ describe OllamaChat::ServerSocket do
|
|
|
95
86
|
expect(server).to receive(:transmit).with(message).and_return(nil)
|
|
96
87
|
|
|
97
88
|
result = OllamaChat::ServerSocket.send_to_server_socket(
|
|
98
|
-
'test', config
|
|
89
|
+
'test', config:, working_dir: 'foo/path'
|
|
99
90
|
)
|
|
100
91
|
|
|
101
92
|
expect(result).to be_nil
|
|
@@ -106,7 +97,7 @@ describe OllamaChat::ServerSocket do
|
|
|
106
97
|
context 'with runtime_dir parameter' do
|
|
107
98
|
before do
|
|
108
99
|
expect(OllamaChat::ServerSocket).to receive(:create_socket_server).
|
|
109
|
-
with(config
|
|
100
|
+
with(config:, runtime_dir: '/foo/bar', working_dir: nil).
|
|
110
101
|
and_return(server)
|
|
111
102
|
end
|
|
112
103
|
|
|
@@ -117,7 +108,7 @@ describe OllamaChat::ServerSocket do
|
|
|
117
108
|
|
|
118
109
|
|
|
119
110
|
result = OllamaChat::ServerSocket.send_to_server_socket(
|
|
120
|
-
'test', config
|
|
111
|
+
'test', config:, runtime_dir: '/foo/bar'
|
|
121
112
|
)
|
|
122
113
|
|
|
123
114
|
expect(result).to be_nil
|
|
@@ -133,7 +124,7 @@ describe OllamaChat::ServerSocket do
|
|
|
133
124
|
socket_name: /\Aollama_chat-\h{32}.sock\z/,
|
|
134
125
|
).and_return :unix_socks_server
|
|
135
126
|
|
|
136
|
-
result = OllamaChat::ServerSocket.create_socket_server(config:
|
|
127
|
+
result = OllamaChat::ServerSocket.create_socket_server(config:)
|
|
137
128
|
expect(result).to eq :unix_socks_server
|
|
138
129
|
end
|
|
139
130
|
end
|
|
@@ -145,7 +136,7 @@ describe OllamaChat::ServerSocket do
|
|
|
145
136
|
socket_name: 'ollama_chat.sock'
|
|
146
137
|
).and_return :unix_socks_server
|
|
147
138
|
|
|
148
|
-
result = OllamaChat::ServerSocket.create_socket_server(config:
|
|
139
|
+
result = OllamaChat::ServerSocket.create_socket_server(config:)
|
|
149
140
|
expect(result).to eq :unix_socks_server
|
|
150
141
|
end
|
|
151
142
|
end
|
|
@@ -5,12 +5,7 @@ describe OllamaChat::StateSelectors::StateSelector do
|
|
|
5
5
|
let(:off) { %w[ disabled ] }
|
|
6
6
|
|
|
7
7
|
let(:selector) do
|
|
8
|
-
described_class.new(
|
|
9
|
-
name: name,
|
|
10
|
-
states: states,
|
|
11
|
-
default: default,
|
|
12
|
-
off: off
|
|
13
|
-
)
|
|
8
|
+
described_class.new(name:, states:, default:, off:)
|
|
14
9
|
end
|
|
15
10
|
|
|
16
11
|
describe '#initialize' do
|
|
@@ -82,9 +77,9 @@ describe OllamaChat::StateSelectors::StateSelector do
|
|
|
82
77
|
context 'when allow_empty is true' do
|
|
83
78
|
let(:selector) do
|
|
84
79
|
described_class.new(
|
|
85
|
-
name:
|
|
86
|
-
states:
|
|
87
|
-
default:
|
|
80
|
+
name: ,
|
|
81
|
+
states: ,
|
|
82
|
+
default: nil,
|
|
88
83
|
allow_empty: true
|
|
89
84
|
)
|
|
90
85
|
end
|