ollama_chat 0.0.79 → 0.0.81

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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.utilsrc +1 -0
  3. data/CHANGES.md +149 -0
  4. data/README.md +100 -44
  5. data/bin/ollama_chat_send +1 -1
  6. data/lib/ollama_chat/chat.rb +603 -286
  7. data/lib/ollama_chat/command_concern.rb +159 -0
  8. data/lib/ollama_chat/config_handling.rb +3 -3
  9. data/lib/ollama_chat/conversation.rb +1 -1
  10. data/lib/ollama_chat/dialog.rb +39 -0
  11. data/lib/ollama_chat/follow_chat.rb +16 -2
  12. data/lib/ollama_chat/http_handling.rb +63 -0
  13. data/lib/ollama_chat/information.rb +47 -90
  14. data/lib/ollama_chat/input_content.rb +58 -14
  15. data/lib/ollama_chat/location_handling.rb +0 -3
  16. data/lib/ollama_chat/message_output.rb +1 -1
  17. data/lib/ollama_chat/oc.rb +5 -0
  18. data/lib/ollama_chat/ollama_chat_config/default_config.yml +2 -5
  19. data/lib/ollama_chat/pager.rb +3 -3
  20. data/lib/ollama_chat/personae_management.rb +36 -6
  21. data/lib/ollama_chat/server_socket.rb +1 -1
  22. data/lib/ollama_chat/source_fetching.rb +15 -31
  23. data/lib/ollama_chat/state_selectors.rb +4 -2
  24. data/lib/ollama_chat/switches.rb +8 -6
  25. data/lib/ollama_chat/tools/browse.rb +1 -0
  26. data/lib/ollama_chat/tools/concern.rb +2 -0
  27. data/lib/ollama_chat/tools/copy_to_clipboard.rb +1 -2
  28. data/lib/ollama_chat/tools/directory_structure.rb +14 -3
  29. data/lib/ollama_chat/tools/execute_grep.rb +4 -3
  30. data/lib/ollama_chat/tools/execute_ri.rb +1 -1
  31. data/lib/ollama_chat/tools/file_context.rb +4 -3
  32. data/lib/ollama_chat/tools/generate_password.rb +3 -4
  33. data/lib/ollama_chat/tools/get_current_weather.rb +6 -11
  34. data/lib/ollama_chat/tools/get_cve.rb +10 -13
  35. data/lib/ollama_chat/tools/get_endoflife.rb +5 -4
  36. data/lib/ollama_chat/tools/get_jira_issue.rb +2 -1
  37. data/lib/ollama_chat/tools/get_location.rb +1 -6
  38. data/lib/ollama_chat/tools/get_rfc.rb +5 -4
  39. data/lib/ollama_chat/tools/get_time.rb +1 -5
  40. data/lib/ollama_chat/tools/get_url.rb +5 -7
  41. data/lib/ollama_chat/tools/open_file_in_editor.rb +1 -0
  42. data/lib/ollama_chat/tools/paste_from_clipboard.rb +2 -2
  43. data/lib/ollama_chat/tools/paste_into_editor.rb +1 -1
  44. data/lib/ollama_chat/tools/patch_file.rb +7 -8
  45. data/lib/ollama_chat/tools/read_file.rb +4 -3
  46. data/lib/ollama_chat/tools/resolve_tag.rb +1 -1
  47. data/lib/ollama_chat/tools/run_tests.rb +2 -3
  48. data/lib/ollama_chat/tools/search_web.rb +4 -3
  49. data/lib/ollama_chat/tools/write_file.rb +4 -3
  50. data/lib/ollama_chat/utils/analyze_directory.rb +14 -6
  51. data/lib/ollama_chat/utils/fetcher.rb +0 -9
  52. data/lib/ollama_chat/utils/path_completer.rb +62 -0
  53. data/lib/ollama_chat/utils/path_validator.rb +41 -20
  54. data/lib/ollama_chat/utils.rb +1 -0
  55. data/lib/ollama_chat/version.rb +1 -1
  56. data/lib/ollama_chat/web_searching.rb +2 -11
  57. data/lib/ollama_chat.rb +2 -0
  58. data/ollama_chat.gemspec +5 -5
  59. data/spec/ollama_chat/chat_spec.rb +142 -45
  60. data/spec/ollama_chat/information_spec.rb +9 -7
  61. data/spec/ollama_chat/tools/browse_spec.rb +4 -8
  62. data/spec/ollama_chat/tools/copy_to_clipboard_spec.rb +0 -4
  63. data/spec/ollama_chat/tools/directory_structure_spec.rb +6 -7
  64. data/spec/ollama_chat/tools/execute_grep_spec.rb +7 -7
  65. data/spec/ollama_chat/tools/file_context_spec.rb +2 -6
  66. data/spec/ollama_chat/tools/generate_password_spec.rb +5 -9
  67. data/spec/ollama_chat/tools/get_current_weather_spec.rb +2 -2
  68. data/spec/ollama_chat/tools/get_cve_spec.rb +2 -2
  69. data/spec/ollama_chat/tools/get_endoflife_spec.rb +2 -2
  70. data/spec/ollama_chat/tools/get_rfc_spec.rb +2 -2
  71. data/spec/ollama_chat/tools/get_url_spec.rb +3 -7
  72. data/spec/ollama_chat/tools/open_file_in_editor_spec.rb +0 -4
  73. data/spec/ollama_chat/tools/paste_from_clipboard_spec.rb +0 -4
  74. data/spec/ollama_chat/tools/paste_into_editor_spec.rb +5 -9
  75. data/spec/ollama_chat/tools/patch_file_spec.rb +6 -10
  76. data/spec/ollama_chat/tools/read_file_spec.rb +5 -9
  77. data/spec/ollama_chat/tools/run_tests_spec.rb +4 -8
  78. data/spec/ollama_chat/tools/search_web_spec.rb +3 -7
  79. data/spec/ollama_chat/tools/write_file_spec.rb +5 -9
  80. data/spec/ollama_chat/utils/analyze_directory_spec.rb +8 -0
  81. data/spec/ollama_chat/utils/path_completer_spec.rb +34 -0
  82. data/spec/spec_helper.rb +9 -0
  83. metadata +9 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 982588e8a14a4bb35aebd365a9dea99fb7c7b474f4d1293436fa97d1258eec79
4
- data.tar.gz: 0a0410940246c4d9d260256e02373f002aeadba778a2097aefc97f190dc17e68
3
+ metadata.gz: 5fb8acfbab42d7afd6b6bf67dfe087cfb3c12a61719834713c9cd2f095dd7ce8
4
+ data.tar.gz: efdba3f26df1ae84df62f2aa2a2f48e914baf2a5dd1430691e55be9f01a23774
5
5
  SHA512:
6
- metadata.gz: f15c28d9980519078af9b27d5706edfa91df2c4c13ac235377dd97623c62a40c9b8014c06373f093ef473e5c9553e20a949fa4488afb7be06b94ebd006c2eb1c
7
- data.tar.gz: 8bc4b5bd4880ab46ea227379ff4786681a7f7bef67d81df35628f5aea238c250f0842de5408fdb94056828c792080ce0ee0793a3a74e13d8a78c6d504b005f9d
6
+ metadata.gz: b5042b32617e390e4cad869c2356dc0a12c5a8cc55a57c6f3d6f84fa20f2342a91afcddeb24898947b9a3d73d083b3b4ce666b13cab1e339a37ba76ecb3ec961
7
+ data.tar.gz: c3ada9646a5580fe07c463c62348e972a50f69cc563ae240b0000e18db917af160adc9e3234e4bbdbfda68907421f3445e18c61db1b25ccba393f670652938b9
data/.utilsrc CHANGED
@@ -56,6 +56,7 @@ code_indexer do
56
56
  more_math
57
57
  ollama-ruby
58
58
  ostruct
59
+ reline
59
60
  reverse_markdown
60
61
  rspec
61
62
  rspec-core
data/CHANGES.md CHANGED
@@ -1,5 +1,154 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-20 v0.0.81
4
+
5
+ - Added `http_handling.rb` and `path_completer.rb` to gemspec
6
+ `s.extra_rdoc_files`, `s.files`, and `s.test_files` lists, ensuring these
7
+ modules are documented and packaged.
8
+ - Updated `http_options` to build SSL and proxy settings.
9
+ - Completed `get_url` to merge headers, pass cache, debug, and reraise flags.
10
+ - Updated YARD comments with parameter and return details.
11
+ - Fixed `config.request_headers` usage and added `merge`.
12
+ - Declared `proxy` variable in options hash.
13
+ - Added `debug` flag from `config` to fetcher call.
14
+ - Added `PathCompleter` utility in `lib/ollama_chat/utils/path_completer.rb`
15
+ that expands `./` and `~/` paths using `Dir.glob` and `File.expand_path`.
16
+ - Updated `lib/ollama_chat/utils.rb` to require the new helper.
17
+ - Replaced inline path completion logic in `lib/ollama_chat/chat.rb` with
18
+ `OllamaChat::Utils::PathCompleter.new(pre, input).complete`.
19
+ - Added tests for `PathCompleter` in
20
+ `spec/ollama_chat/utils/path_completer_spec.rb`, stubbing `expand_path` for
21
+ home‑directory case.
22
+ - Added duration metric to tool call results: recorded `start = Time.now`
23
+ before each tool call, stored `tools_used[name]` as a hash with `size` and
24
+ `duration` keys, calculated `duration` with `Time.now - start` and formatted
25
+ as `Tins::Duration.new(...).to_s`, kept size formatting using
26
+ `Tins::Unit.format(..., unit: ?B, prefix: 1024, format: '%.1f %U')`.
27
+ - Added `./` file path completion to Reline: updated
28
+ `OllamaChat::Chat#enable_command_completion` to add `./` path completion,
29
+ replaced old `RELINE` completion proc with a new `case before` block that
30
+ checks for `^/` and `./` patterns, ensuring file path completions are only
31
+ offered when the user starts with `./`.
32
+ - Added user name to runtime info and prompts: added `OC::USER` config variable
33
+ with default from `ENV['USER']`, included `user` in the hash returned by
34
+ `runtime_information_values`, extended default prompts in
35
+ `lib/ollama_chat/ollama_chat_config/default_config.yml` to show “Name of the
36
+ chat user: %{user}”, updated tests in `spec/ollama_chat/chat_spec.rb` to set
37
+ `OC::PAGER` to `nil` for cleaner output.
38
+
39
+ ## 2026-03-18 v0.0.80
40
+
41
+ ### Output & Paging
42
+
43
+ - Remove the automatic `info` call from the main flow
44
+ - Wrap all output handling inside a `use_pager do |output|` block
45
+ - Pass the `output:` keyword to sub‑methods (`collection_stats`,
46
+ `Switches.show`, etc.)
47
+ - Adjust `Pager` to use a local `buffer` variable and `output.puts buffer`
48
+ - Update `StateSelectors.show` and `Switches.show` to accept `output: STDOUT`
49
+ and use `output.puts`
50
+ - Modify `Switches.set` to accept `output: STDOUT` and call
51
+ `self.show(output:)`
52
+
53
+ ### Collection & Runtime Info
54
+
55
+ - Change `collection_stats` signature to `output: STDOUT` and replace
56
+ `STDOUT.puts` with `output.puts`
57
+ - Show runtime‑information only when `runtime_info.on? && content` is true
58
+ - Append a JSON line for runtime‑info instead of a plain‑text list
59
+
60
+ ### Tool Call Handling
61
+
62
+ - Initialize `tools_used` hash in `OllamaChat::FollowChat#handle_tool_calls`
63
+ - Store the formatted size of each tool result using `Tins::Unit.format`
64
+ - Replace the non‑existent `full?` check with `size ==
65
+ response.message.tool_calls.size`
66
+ - Show a summary of tool call results and pause for user confirmation
67
+
68
+ ### Confirmation Prompt
69
+
70
+ - Add `confirm?` method to `OllamaChat::Dialog` for single‑character
71
+ confirmation prompts
72
+ - Replace all `ask?` calls with `confirm?`
73
+
74
+ ### Command DSL
75
+
76
+ - Add a `command` DSL in `command_concern.rb` for registering chat commands
77
+ - Include `OllamaChat::CommandConcern` in `chat.rb` and drop the old
78
+ `handle_input` logic
79
+ - Replace hard‑coded command handling with the new DSL (e.g., `/toggle`,
80
+ `/input`, `/revise`, etc.)
81
+
82
+ ### Documentation & README
83
+
84
+ - Update `README.md` to show the new `/toggle` syntax and expanded command
85
+ table
86
+ - Update `bin/ollama_chat_send` help text to reflect the renamed `/input`
87
+ command
88
+
89
+ ### Utility Helpers
90
+
91
+ - Add `go_command` helper in `dialog.rb` for parsing command‑line options
92
+ - Add `file_set_each`, `all_file_set`, and `provide_file_set_content` to
93
+ `input_content.rb`
94
+ - Update `context_spook` to use `file_set_each` and accept an `all` flag
95
+ - Add `strip_internal_json_markers` helper in `chat.rb`
96
+ - Add `choose_file_set` helper in `OllamaChat::Dialog` returning a `Set` of
97
+ expanded `Pathname` objects
98
+
99
+ ### Source Fetching & Links
100
+
101
+ - Refactor `source_fetching.rb` to coerce sources to string
102
+ - Add a lazy `links` method and remove the old `links` method from `Chat`
103
+
104
+ ### Retrieval Snippets
105
+
106
+ - Update retrieval‑snippet injection to use a JSON block instead of a
107
+ plain‑text list
108
+ - Use `strip_internal_json_markers` for `:ollama_chat_retrieval_snippets` and
109
+ `:ollama_chat_runtime_information`
110
+ - Truncate user query to `config.embedding.model.context_length` before calling
111
+ `@documents.find_where`
112
+
113
+ ### Directory Structure Tool
114
+
115
+ - Add `suffix` parameter to `directory_structure` function
116
+ - Update `OllamaChat::Utils::AnalyzeDirectory.generate_structure` to accept a
117
+ `suffix:` argument and filter files accordingly
118
+ - Ensure only files matching the given extension are included; hidden files and
119
+ symlinks remain excluded
120
+
121
+ ### Persona Management
122
+
123
+ - Update persona option labels to `keep`, `reload_default`, `choose_different`
124
+ - Add interactive persona reload options via a menu in `reload_default_persona`
125
+ - Use `SearchUI::Wrapper` and `OllamaChat::Utils::Chooser` for selection
126
+ - Update `@default_persona` when selecting “load_new”
127
+
128
+ ### Path Validation
129
+
130
+ - Add `check_file` flag to `path_validator.rb` method signature
131
+ - Guard against non‑directory parents and file existence when `check_file:true`
132
+ - Propagate `check_file` flag in calls from `file_context`, `patch_file`, and
133
+ `read_file`
134
+
135
+ ### Tests & Specs
136
+
137
+ - Adjust specs to stub `OC::PAGER`, expect `use_pager` yielding a `StringIO`,
138
+ and verify `STDOUT.puts` calls
139
+ - Update test expectations for new command handling and help output
140
+ - Expect `OllamaChat::InvalidPathError` instead of `Errno::ENOENT` in relevant
141
+ specs
142
+ - Add `asset_pathname` helper in `spec_helper.rb`
143
+
144
+ ### Miscellaneous
145
+
146
+ - Add `reline` gem to `.utilsrc` dependency list
147
+ - Consider `-c` flag to skip persona setup when loading an existing
148
+ conversation
149
+ - Standardize `register_name` method comments to `@return [String] the
150
+ registered name for this tool`
151
+
3
152
  ## 2026-03-13 v0.0.79
4
153
 
5
154
  - Added `tmp/*` to Rakefile ignore list for cleaner builds.
data/README.md CHANGED
@@ -152,48 +152,104 @@ subject - the young, blue-eyed cat.
152
152
  The following commands can be given inside the chat, if prefixed by a `/`:
153
153
 
154
154
  ```
155
- /reconnect reconnect to current ollama server
156
- /copy to copy last response to clipboard
157
- /paste to paste content
158
- /markdown toggle markdown output
159
- /stream toggle stream output
160
- /location toggle location submission
161
- /runtime_info toggle runtime information in prompts
162
- /voice [change] toggle voice output or change the voice
163
- /last [n] show the last n / 1 system/assistant message
164
- /list [n] list the last n / all conversation exchanges
165
- /clear [what] clear what=messages|links|history|tags|all
166
- /clobber clear the conversation, links, and collection
167
- /drop [n] drop the last n exchanges, defaults to 1
168
- /model change the model
169
- /system [show] change/show system prompt
170
- /prompt prefill user prompt with preset prompts
171
- /persona [add|delete|edit|file|info|list|load|play] manage and load/play personas for roleplay
172
- /revise [edit] the last answer message
173
- /collection [clear|change] change (default) collection or clear
174
- /info show information for current session
175
- /config [edit|reload] output/edit/reload current configuration ("/Users/flori/.config/ollama_chat/config.yml")
176
- /document_policy pick a scan policy for document references
177
- /think choose ollama think mode setting for models
178
- /think_loud enable to think out loud instead of silently
179
- /import source import the source's content
180
- /summarize [n] source summarize the source's content in n words
181
- /embedding toggle embedding paused or not
182
- /embed source embed the source's content
183
- /web [n] query query web & for n(=1) results (policy: importing)
184
- /links [clear] display (or clear) links used in the chat
185
- /save filename store conversation messages
186
- /load filename load conversation messages
187
- /compose compose content using an EDITOR
188
- /input [pattern] select and read content from a file (default: **/*)
189
- /context [pattern...] collect context with glob patterns
190
- /change_response edit the last response in an external editor
191
- /output filename save last response to filename
192
- /pipe command write last response to command's stdin
193
- /tools [enable|disable|on|off] list enabled, enable/disable tools, support on/off
194
- /vim insert the last message into a vim server
195
- /quit to quit
196
- /help [me] to view this help (me = interactive ai help)
155
+ ╭──────────────────┬────────────────────┬──────────────────┬──────────────────────────────────────────────────────────╮
156
+ CMD │ SUBCMD │ OPTS │ HELP │
157
+ ╞══════════════════╪════════════════════╪══════════════════╪══════════════════════════════════════════════════════════╡
158
+ /copy │ │ │ to copy last response to clipboard │
159
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
160
+ /paste │ │ │ to paste content from the clipboard │
161
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
162
+ /config │ edit │ │ output/edit/reload configuration │
163
+ │ │ reload │ │ │
164
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
165
+ /document_policy │ │ │ pick a scan policy for documents │
166
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
167
+ /toggle │ embedding﹡ │ │ toggle switch │
168
+ │ │ location﹡ │ │ │
169
+ │ │ markdown﹡ │ │ │
170
+ │ │ runtime_info﹡ │ │ │
171
+ │ │ stream﹡ │ │ │
172
+ │ │ think_loud﹡ │ │ │
173
+ │ │ voice﹡ │ │ │
174
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
175
+ /model │ │ │ change the model │
176
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
177
+ /system │ change │ │ change/show system prompt │
178
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
179
+ /think │ │ │ choose ollama think mode setting for models │
180
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
181
+ /tools │ disable │ │ list enabled, enable/disable tools, │
182
+ │ │ enable │ │ support on/off │
183
+ │ │ off │ │ │
184
+ │ │ on │ │ │
185
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
186
+ /voice │ │ │ change the voice │
187
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
188
+ /list │ │ [n=1] list the last n / all conversation exchanges │
189
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
190
+ /last │ │ [n=1] │ show the last n / 1 system/assistant message │
191
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
192
+ /drop │ │ [n=1] │ drop the last n exchanges, defaults to 1 │
193
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
194
+ /clear │ all﹡ │ │ clear these records │
195
+ │ │ history﹡ │ │ │
196
+ │ │ links﹡ │ │ │
197
+ │ │ messages﹡ │ │ │
198
+ │ │ tags﹡ │ │ │
199
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
200
+ │ /links │ clear﹡ │ │ display (or clear) links used in the chat │
201
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
202
+ │ /revise │ edit﹡ │ │ revise the last message (and/or edit the query) │
203
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
204
+ │ /prompt │ │ │ prefill user prompt with preset prompts │
205
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
206
+ │ /change_response │ │ │ edit the last response in EDITOR │
207
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
208
+ │ /save │ │ path │ store conversation messages │
209
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
210
+ │ /load │ │ path │ load conversation messages │
211
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
212
+ │ /collection │ change﹡ │ │ change (default) collection or clear │
213
+ │ │ clear﹡ │ │ │
214
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
215
+ │ /persona │ add │ │ manage and load/play personae for roleplay │
216
+ │ │ delete │ │ │
217
+ │ │ edit │ │ │
218
+ │ │ file │ │ │
219
+ │ │ info │ │ │
220
+ │ │ list │ │ │
221
+ │ │ load │ │ │
222
+ │ │ play │ │ │
223
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
224
+ │ /compose │ │ │ compose content using an EDITOR │
225
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
226
+ │ /web │ │ [number=1] query │ query web for so many results │
227
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
228
+ │ /input │ context │ [-w|-a] [arg…] │ Read content from files, URLs, or glob patterns │
229
+ │ │ context pattern │ │ and optionally transform it. │
230
+ │ │ embedding │ │ Use subcommands: context, embedding, path, summary, │
231
+ │ │ embedding pattern │ │ import (the default). │
232
+ │ │ path │ │ Use pattern mode for local files. │
233
+ │ │ path pattern │ │ Options: │
234
+ │ │ pattern │ │ -w <words> (summary subcommand only, default 100) │
235
+ │ │ summary │ │ -a (pattern mode only, include all files for patterns) │
236
+ │ │ summary pattern │ │ │
237
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
238
+ │ /pipe │ │ path │ write last response to command's stdin │
239
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
240
+ │ /vim │ │ │ insert the last message into a vim (server) │
241
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
242
+ │ /output │ │ path │ save last response to path │
243
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
244
+ │ /reconnect │ │ │ reconnect to current ollama server │
245
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
246
+ │ /quit │ │ │ quit/exit the application │
247
+ │ /exit │ │ │ │
248
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
249
+ │ /info │ │ │ show information for current session │
250
+ ├──────────────────┼────────────────────┼──────────────────┼──────────────────────────────────────────────────────────┤
251
+ │ /help │ me │ │ to view this help (me=interactive ai help) │
252
+ ╰──────────────────┴────────────────────┴──────────────────┴──────────────────────────────────────────────────────────╯
197
253
  ```
198
254
 
199
255
  ### Using `ollama_chat_send` to send input to a running `ollama_chat`
@@ -221,10 +277,10 @@ endfunction
221
277
 
222
278
  The `ollama_chat_send` command now supports additional parameters to enhance functionality:
223
279
 
224
- - **Terminal Input (`-t`)**: Sends input as terminal commands, enabling special commands like `/import`.
280
+ - **Terminal Input (`-t`)**: Sends input as terminal commands, enabling special commands like `/input`.
225
281
 
226
282
  ```bash
227
- $ echo "/import https://example.com/some-content" | ollama_chat_send -t
283
+ $ echo "/input https://example.com/some-content" | ollama_chat_send -t
228
284
  ```
229
285
 
230
286
  - **Wait for Response (`-r`)**: Enables two-way communication by waiting for and returning the server's response.
data/bin/ollama_chat_send CHANGED
@@ -19,7 +19,7 @@ def usage(rc = 0)
19
19
 
20
20
  Options:
21
21
  -r Wait for the response from Ollama Chat and output it
22
- -t Send input as terminal input including commands, e. g. /import
22
+ -t Send input as terminal input including commands, e. g. /input
23
23
  -p Send input with source parsing enabled (defaults to disabled)
24
24
  -f CONFIG file to read
25
25
  -d DIR the working directory to derive the socket file from