ollama_chat 0.0.76 → 0.0.77
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 +19 -0
- data/lib/ollama_chat/chat.rb +2 -0
- data/lib/ollama_chat/ollama_chat_config/default_config.yml +10 -6
- data/lib/ollama_chat/tools/get_current_weather.rb +2 -2
- data/lib/ollama_chat/tools/{insert_into_editor.rb → paste_into_editor.rb} +10 -10
- data/lib/ollama_chat/tools.rb +1 -1
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +5 -5
- data/spec/ollama_chat/tools/{insert_into_editor_spec.rb → paste_into_editor_spec.rb} +9 -9
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 368f0f36682a4570b76fead6a43e797a8c450f983921dfab46ca7d6d4cb5759b
|
|
4
|
+
data.tar.gz: aadd0d681c682ce97a670b48d706f0dfc71a3a65ed6cd4390c3e663892db1e8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9b72a1b63e771e0574b7028a205936f2c3cf2213fb9f85c54f4d4c5d11a5dad99d0ae6461f16b656f8b36f13a42c7237b953a1be305176c0b12766881d087e4
|
|
7
|
+
data.tar.gz: 1986df4ed7e098d6561674e7d8406bc1db73b55884b4eedbd411c33f5777009ae88864828905c55f4c057b44895fef4e8d5552e89ac2c83bc4a6c0a5ffdce255
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-03-09 v0.0.77
|
|
4
|
+
|
|
5
|
+
- Add runtime Git and time placeholders: added `git_current_branch` and
|
|
6
|
+
`git_remote_origin` to `runtime_info_values` in `lib/ollama_chat/chat.rb`;
|
|
7
|
+
inserted `%{time}` placeholder into prompts section of `default_config.yml`;
|
|
8
|
+
added Git placeholders (`%{git_current_branch}`, `%{git_remote_origin}`)
|
|
9
|
+
under **Git** key; reformatted terminal info under a single **Terminal**
|
|
10
|
+
heading with height and width.
|
|
11
|
+
- Extend weather tool to include six‑day forecast: updated `GetCurrentWeather`
|
|
12
|
+
description to mention a six‑day forecast; functionality unchanged; tool
|
|
13
|
+
still requires no arguments.
|
|
14
|
+
- Rename `insert_into_editor` tool to `paste_into_editor`: updated
|
|
15
|
+
`lib/ollama_chat/tools.rb` to require `paste_into_editor`; renamed and
|
|
16
|
+
updated class from `InsertIntoEditor` to `PasteIntoEditor` in
|
|
17
|
+
`paste_into_editor.rb`, changing its register name, description text, and
|
|
18
|
+
method logic; switched default config key in `default_config.yml` from
|
|
19
|
+
`insert_into_editor` to `paste_into_editor`; refactored spec files; adjusted
|
|
20
|
+
all internal references.
|
|
21
|
+
|
|
3
22
|
## 2026-03-09 v0.0.76
|
|
4
23
|
|
|
5
24
|
- Added `client:` and `current_directory:` keys to `runtime_info_values` in
|
data/lib/ollama_chat/chat.rb
CHANGED
|
@@ -711,6 +711,8 @@ class OllamaChat::Chat
|
|
|
711
711
|
runtime_info_values = {
|
|
712
712
|
languages: config.languages * ', ',
|
|
713
713
|
location: location.on? ? location_description.inspect : 'n/a',
|
|
714
|
+
git_current_branch: `git rev-parse --abbrev-ref HEAD 2>/dev/null`.chomp.full? || 'n/a',
|
|
715
|
+
git_remote_origin: `git remote get-url origin 2>/dev/null`.chomp.full? || 'n/a',
|
|
714
716
|
client: ,
|
|
715
717
|
current_directory: Pathname.pwd.expand_path.to_path.inspect,
|
|
716
718
|
terminal_rows: Tins::Terminal.rows,
|
|
@@ -45,14 +45,18 @@ prompts:
|
|
|
45
45
|
asked about it.
|
|
46
46
|
|
|
47
47
|
- Languages the user prefers: %{languages}.
|
|
48
|
+
- Current time is %{time}.
|
|
48
49
|
- Location is %{location}.
|
|
49
50
|
- Current directory is %{current_directory}.
|
|
51
|
+
- **Git**:
|
|
52
|
+
- Current branch is %{git_current_branch}
|
|
53
|
+
- Current remote origin is %{git_remote_origin}
|
|
50
54
|
- Client is %{client}.
|
|
51
|
-
- Terminal
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
- **Terminal**:
|
|
56
|
+
- The height is %{terminal_rows} rows.
|
|
57
|
+
- The width is %{terminal_cols} columns. **Always** aim to stay within
|
|
58
|
+
80%% of this width in your output of responses, especially when using
|
|
59
|
+
markdown tables.
|
|
56
60
|
- Markdown output is %{markdown}. **Never** output markdown as your
|
|
57
61
|
responses if it is disabled.
|
|
58
62
|
- Voice output is %{voice}. Speak naturally and short if voice
|
|
@@ -225,7 +229,7 @@ tools:
|
|
|
225
229
|
default: true
|
|
226
230
|
paste_from_clipboard:
|
|
227
231
|
default: true
|
|
228
|
-
|
|
232
|
+
paste_into_editor:
|
|
229
233
|
require_confirmation: true
|
|
230
234
|
default: true
|
|
231
235
|
execute_ri:
|
|
@@ -26,8 +26,8 @@ class OllamaChat::Tools::GetCurrentWeather
|
|
|
26
26
|
name:,
|
|
27
27
|
description: <<~EOT,
|
|
28
28
|
Weather fetcher – Retrieves a short report of local meteorological
|
|
29
|
-
conditions based on your preset location coordinates.
|
|
30
|
-
needed.
|
|
29
|
+
conditions based on your preset location coordinates. This includes a
|
|
30
|
+
forecast for the next six days. No arguments needed.
|
|
31
31
|
EOT
|
|
32
32
|
parameters: Tool::Function::Parameters.new(
|
|
33
33
|
type: 'object',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# A lightweight LLM‑driven tool that
|
|
1
|
+
# A lightweight LLM‑driven tool that pastes a snippet directly into an open
|
|
2
2
|
# Vim session.
|
|
3
|
-
class OllamaChat::Tools::
|
|
3
|
+
class OllamaChat::Tools::PasteIntoEditor
|
|
4
4
|
include OllamaChat::Tools::Concern
|
|
5
5
|
|
|
6
6
|
# Name of the tool used to register it with OllamaChat's tool registry.
|
|
7
|
-
def self.register_name = '
|
|
7
|
+
def self.register_name = 'paste_into_editor'
|
|
8
8
|
|
|
9
9
|
# Returns a `OllamaChat::Tool` instance describing this function‑based tool.
|
|
10
10
|
#
|
|
@@ -15,8 +15,8 @@ class OllamaChat::Tools::InsertIntoEditor
|
|
|
15
15
|
function: Tool::Function.new(
|
|
16
16
|
name:,
|
|
17
17
|
description: <<~EOT,
|
|
18
|
-
Editor helper –
|
|
19
|
-
into the User’s editor
|
|
18
|
+
Editor helper – Pastes a string (or last reply if omitted) straight
|
|
19
|
+
into the User’s running editor.
|
|
20
20
|
If no `text` is supplied, the tool will automatically use the last assistant
|
|
21
21
|
response. No output; Do not not call this tool function unless
|
|
22
22
|
explicitly requested by the user.
|
|
@@ -26,7 +26,7 @@ class OllamaChat::Tools::InsertIntoEditor
|
|
|
26
26
|
properties: {
|
|
27
27
|
text: Tool::Function::Parameters::Property.new(
|
|
28
28
|
type: 'string',
|
|
29
|
-
description: 'Text to
|
|
29
|
+
description: 'Text to paste into the editor (nil = last response)'
|
|
30
30
|
)
|
|
31
31
|
},
|
|
32
32
|
required: []
|
|
@@ -35,22 +35,22 @@ class OllamaChat::Tools::InsertIntoEditor
|
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
# Executes the tool by
|
|
38
|
+
# Executes the tool by pasting text into Vim.
|
|
39
39
|
#
|
|
40
40
|
# @param [OllamaChat::ToolCall] tool_call The LLM-generated tool call object.
|
|
41
41
|
# @option opts [OllamaChat::Chat] :chat Reference to the current chat instance.
|
|
42
42
|
# @return [String] JSON‑encoded response indicating success or failure.
|
|
43
43
|
def execute(tool_call, **opts)
|
|
44
|
-
text = tool_call.function.arguments.text
|
|
44
|
+
text = tool_call.function.arguments.text.full?
|
|
45
45
|
|
|
46
46
|
chat = opts[:chat]
|
|
47
47
|
chat.perform_insert(text:, content: true)
|
|
48
48
|
|
|
49
49
|
message =
|
|
50
50
|
if text.nil?
|
|
51
|
-
"The last response has been successfully
|
|
51
|
+
"The last response has been successfully pasted into the editor."
|
|
52
52
|
else
|
|
53
|
-
"The provided text has been successfully
|
|
53
|
+
"The provided text has been successfully pasted into the editor."
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
{
|
data/lib/ollama_chat/tools.rb
CHANGED
|
@@ -56,9 +56,9 @@ require 'ollama_chat/tools/get_location'
|
|
|
56
56
|
require 'ollama_chat/tools/get_rfc'
|
|
57
57
|
require 'ollama_chat/tools/get_time'
|
|
58
58
|
require 'ollama_chat/tools/get_url'
|
|
59
|
-
require 'ollama_chat/tools/insert_into_editor'
|
|
60
59
|
require 'ollama_chat/tools/open_file_in_editor'
|
|
61
60
|
require 'ollama_chat/tools/paste_from_clipboard'
|
|
61
|
+
require 'ollama_chat/tools/paste_into_editor'
|
|
62
62
|
require 'ollama_chat/tools/read_file'
|
|
63
63
|
require 'ollama_chat/tools/resolve_tag'
|
|
64
64
|
require 'ollama_chat/tools/run_tests'
|
data/lib/ollama_chat/version.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.77 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.77".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/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.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/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/location_handling.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/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.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/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/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/directory_structure.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_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_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/
|
|
16
|
-
s.files = [".utilsrc".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ollama_chat".freeze, "bin/ollama_chat_send".freeze, "config/searxng/settings.yml".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/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.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/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/location_handling.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/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.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/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/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/directory_structure.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_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_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/
|
|
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/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.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/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/location_handling.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/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.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/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/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/directory_structure.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_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_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/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/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.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/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/file_argument.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/tag_resolver.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, "README.md".freeze, "Rakefile".freeze, "bin/ollama_chat".freeze, "bin/ollama_chat_send".freeze, "config/searxng/settings.yml".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/config_handling.rb".freeze, "lib/ollama_chat/conversation.rb".freeze, "lib/ollama_chat/dialog.rb".freeze, "lib/ollama_chat/document_cache.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/information.rb".freeze, "lib/ollama_chat/input_content.rb".freeze, "lib/ollama_chat/kramdown_ansi.rb".freeze, "lib/ollama_chat/location_handling.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/redis_cache.rb".freeze, "lib/ollama_chat/server_socket.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/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/concern.rb".freeze, "lib/ollama_chat/tools/copy_to_clipboard.rb".freeze, "lib/ollama_chat/tools/directory_structure.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_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_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/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/read_file.rb".freeze, "lib/ollama_chat/tools/resolve_tag.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/cache_fetcher.rb".freeze, "lib/ollama_chat/utils/chooser.rb".freeze, "lib/ollama_chat/utils/fetcher.rb".freeze, "lib/ollama_chat/utils/file_argument.rb".freeze, "lib/ollama_chat/utils/path_validator.rb".freeze, "lib/ollama_chat/utils/tag_resolver.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/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/kitten.jpg".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/follow_chat_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/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_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_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_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/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/read_file_spec.rb".freeze, "spec/ollama_chat/tools/resolve_tag_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/file_argument_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.3".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/follow_chat_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/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_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_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_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/
|
|
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/follow_chat_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/tools/browse_spec.rb".freeze, "spec/ollama_chat/tools/copy_to_clipboard_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_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_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/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/read_file_spec.rb".freeze, "spec/ollama_chat/tools/resolve_tag_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/file_argument_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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe OllamaChat::Tools::
|
|
3
|
+
describe OllamaChat::Tools::PasteIntoEditor do
|
|
4
4
|
let :chat do
|
|
5
5
|
OllamaChat::Chat.new(argv: chat_default_config)
|
|
6
6
|
end
|
|
@@ -12,7 +12,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
12
12
|
connect_to_ollama_server
|
|
13
13
|
|
|
14
14
|
it 'has the correct name' do
|
|
15
|
-
expect(described_class.new.name).to eq('
|
|
15
|
+
expect(described_class.new.name).to eq('paste_into_editor')
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it 'provides a Tool instance for the LLM' do
|
|
@@ -28,7 +28,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
28
28
|
double(
|
|
29
29
|
'ToolCall',
|
|
30
30
|
function: double(
|
|
31
|
-
name: '
|
|
31
|
+
name: 'paste_into_editor',
|
|
32
32
|
arguments: double(text: nil)
|
|
33
33
|
)
|
|
34
34
|
)
|
|
@@ -44,7 +44,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
44
44
|
expect(json.error).to be_nil
|
|
45
45
|
expect(json.success).to eq(true)
|
|
46
46
|
expect(json.message).to eq(
|
|
47
|
-
'The last response has been successfully
|
|
47
|
+
'The last response has been successfully pasted into the editor.'
|
|
48
48
|
)
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -63,7 +63,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
63
63
|
double(
|
|
64
64
|
'ToolCall',
|
|
65
65
|
function: double(
|
|
66
|
-
name: '
|
|
66
|
+
name: 'paste_into_editor',
|
|
67
67
|
arguments: double(text: custom_text)
|
|
68
68
|
)
|
|
69
69
|
)
|
|
@@ -79,7 +79,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
79
79
|
expect(json.error).to be_nil
|
|
80
80
|
expect(json.success).to eq(true)
|
|
81
81
|
expect(json.message).to eq(
|
|
82
|
-
'The provided text has been successfully
|
|
82
|
+
'The provided text has been successfully pasted into the editor.'
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
85
|
end
|
|
@@ -89,7 +89,7 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
89
89
|
double(
|
|
90
90
|
'ToolCall',
|
|
91
91
|
function: double(
|
|
92
|
-
name: :
|
|
92
|
+
name: :paste_into_editor,
|
|
93
93
|
arguments: double(text: nil)
|
|
94
94
|
)
|
|
95
95
|
)
|
|
@@ -118,9 +118,9 @@ describe OllamaChat::Tools::InsertIntoEditor do
|
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
context 'when configuration requires confirmation (
|
|
121
|
+
context 'when configuration requires confirmation (paste_into_editor)' do
|
|
122
122
|
it 'is registered and respects the configuration' do
|
|
123
|
-
expect(OllamaChat::Tools.registered?('
|
|
123
|
+
expect(OllamaChat::Tools.registered?('paste_into_editor')).to be true
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ollama_chat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.77
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -499,9 +499,9 @@ extra_rdoc_files:
|
|
|
499
499
|
- lib/ollama_chat/tools/get_rfc.rb
|
|
500
500
|
- lib/ollama_chat/tools/get_time.rb
|
|
501
501
|
- lib/ollama_chat/tools/get_url.rb
|
|
502
|
-
- lib/ollama_chat/tools/insert_into_editor.rb
|
|
503
502
|
- lib/ollama_chat/tools/open_file_in_editor.rb
|
|
504
503
|
- lib/ollama_chat/tools/paste_from_clipboard.rb
|
|
504
|
+
- lib/ollama_chat/tools/paste_into_editor.rb
|
|
505
505
|
- lib/ollama_chat/tools/read_file.rb
|
|
506
506
|
- lib/ollama_chat/tools/resolve_tag.rb
|
|
507
507
|
- lib/ollama_chat/tools/run_tests.rb
|
|
@@ -578,9 +578,9 @@ files:
|
|
|
578
578
|
- lib/ollama_chat/tools/get_rfc.rb
|
|
579
579
|
- lib/ollama_chat/tools/get_time.rb
|
|
580
580
|
- lib/ollama_chat/tools/get_url.rb
|
|
581
|
-
- lib/ollama_chat/tools/insert_into_editor.rb
|
|
582
581
|
- lib/ollama_chat/tools/open_file_in_editor.rb
|
|
583
582
|
- lib/ollama_chat/tools/paste_from_clipboard.rb
|
|
583
|
+
- lib/ollama_chat/tools/paste_into_editor.rb
|
|
584
584
|
- lib/ollama_chat/tools/read_file.rb
|
|
585
585
|
- lib/ollama_chat/tools/resolve_tag.rb
|
|
586
586
|
- lib/ollama_chat/tools/run_tests.rb
|
|
@@ -653,9 +653,9 @@ files:
|
|
|
653
653
|
- spec/ollama_chat/tools/get_rfc_spec.rb
|
|
654
654
|
- spec/ollama_chat/tools/get_time_spec.rb
|
|
655
655
|
- spec/ollama_chat/tools/get_url_spec.rb
|
|
656
|
-
- spec/ollama_chat/tools/insert_into_editor_spec.rb
|
|
657
656
|
- spec/ollama_chat/tools/open_file_in_editor_spec.rb
|
|
658
657
|
- spec/ollama_chat/tools/paste_from_clipboard_spec.rb
|
|
658
|
+
- spec/ollama_chat/tools/paste_into_editor_spec.rb
|
|
659
659
|
- spec/ollama_chat/tools/read_file_spec.rb
|
|
660
660
|
- spec/ollama_chat/tools/resolve_tag_spec.rb
|
|
661
661
|
- spec/ollama_chat/tools/run_tests_spec.rb
|
|
@@ -729,9 +729,9 @@ test_files:
|
|
|
729
729
|
- spec/ollama_chat/tools/get_rfc_spec.rb
|
|
730
730
|
- spec/ollama_chat/tools/get_time_spec.rb
|
|
731
731
|
- spec/ollama_chat/tools/get_url_spec.rb
|
|
732
|
-
- spec/ollama_chat/tools/insert_into_editor_spec.rb
|
|
733
732
|
- spec/ollama_chat/tools/open_file_in_editor_spec.rb
|
|
734
733
|
- spec/ollama_chat/tools/paste_from_clipboard_spec.rb
|
|
734
|
+
- spec/ollama_chat/tools/paste_into_editor_spec.rb
|
|
735
735
|
- spec/ollama_chat/tools/read_file_spec.rb
|
|
736
736
|
- spec/ollama_chat/tools/resolve_tag_spec.rb
|
|
737
737
|
- spec/ollama_chat/tools/run_tests_spec.rb
|