ollama_chat 0.0.94 → 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 +146 -42
- data/README.md +9 -5
- data/Rakefile +1 -1
- data/lib/ollama_chat/chat.rb +2 -0
- data/lib/ollama_chat/commands.rb +157 -44
- data/lib/ollama_chat/database/models/prompt.rb +1 -3
- data/lib/ollama_chat/follow_chat.rb +4 -5
- data/lib/ollama_chat/information.rb +0 -4
- data/lib/ollama_chat/input_content.rb +1 -1
- data/lib/ollama_chat/message_list.rb +2 -4
- data/lib/ollama_chat/oc.rb +0 -7
- data/lib/ollama_chat/ollama_chat_config/default_config.yml +2 -1
- data/lib/ollama_chat/parsing.rb +54 -21
- data/lib/ollama_chat/personae_management.rb +28 -14
- data/lib/ollama_chat/session_management.rb +23 -31
- 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 -6
- 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 +55 -5
- 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 +112 -0
- data/lib/ollama_chat/utils/utf8_converter.rb +13 -0
- data/lib/ollama_chat/utils.rb +2 -2
- data/lib/ollama_chat/version.rb +1 -1
- data/lib/ollama_chat.rb +1 -0
- data/ollama_chat.gemspec +6 -6
- data/spec/assets/miyu.png +0 -0
- data/spec/ollama_chat/database/models/favourite_spec.rb +7 -20
- data/spec/ollama_chat/parsing_spec.rb +1 -1
- 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/directory_structure_spec.rb +1 -1
- 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 +6 -1
- 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
- data/spec/ollama_chat/utils/png_metadata_extractor_spec.rb +122 -0
- metadata +16 -9
- data/lib/ollama_chat/utils/png_character_extractor.rb +0 -65
- data/lib/ollama_chat/utils/token_estimator.rb +0 -15
- data/spec/ollama_chat/utils/png_character_extractor_spec.rb +0 -61
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54aa30ed02a44f43f0f197247d4e7f5377007802025ddc55632f60965e6d0548
|
|
4
|
+
data.tar.gz: aa6e058dd8135e265fbfbc848620ece0730182ff6c11e4b0e9c87a8b68e97590
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96d53286b971b4863f688a8613e9ca3fe3e0ee65b9c5f18b042ea3a910ea8ef8cdb4b2e2b26750c08aae6bcbbdd43371e8f0fd9598f24c494256f58f42ddd8ef
|
|
7
|
+
data.tar.gz: 1d5aa2eadaa9723f6a20f1019f6965249e9d526d38bd6de5d5e86ed1b76ac82e86bf0e59915330f35a2a48f0ce99c6a4109a50c94d38e30965f4d658be768ce3
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-07-03 v0.0.96
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
- Added reroll capability to the `roll_dice` tool, including a new `reroll`
|
|
8
|
+
configuration option in `default_config.yml` and implementation of a reroll
|
|
9
|
+
loop using `chat.confirm?`.
|
|
10
|
+
- Enhanced the `roll_dice` tool output to include `min` and `max` bounds in the
|
|
11
|
+
JSON response and result range in the summary message.
|
|
12
|
+
- Improved character importing by implementing `import_persona_from_json` in
|
|
13
|
+
`PersonaeManagement`, removing temporary file dependencies.
|
|
14
|
+
- Added the ability to offer new sessions during session selection via
|
|
15
|
+
`offer_new_session: true` in `SessionManagement`.
|
|
16
|
+
|
|
17
|
+
### Improvements
|
|
18
|
+
|
|
19
|
+
- **Tool Messaging**: Added or enhanced human-readable summary `message` fields
|
|
20
|
+
for several tools to improve user experience:
|
|
21
|
+
- `GetTime`: Now includes time-of-day greetings and formatted weekdays.
|
|
22
|
+
- `GetCurrentWeather`: Now incorporates temperature, conditions, and daily
|
|
23
|
+
forecasts.
|
|
24
|
+
- `ReadFile` & `WriteFile`: Integrated `OllamaChat::TokenEstimator` for
|
|
25
|
+
formatted byte and token counts.
|
|
26
|
+
- `GeneratePassword`: Added summaries covering various alphabet types and
|
|
27
|
+
errors.
|
|
28
|
+
- `RetrieveDocumentSnippets`: Added counts and collection details.
|
|
29
|
+
- `ExecuteGrep`: Added logic to distinguish between found matches and blank
|
|
30
|
+
results.
|
|
31
|
+
- `RunTests`: Added emoji-based result summaries and removed reliance on
|
|
32
|
+
the global `$?` variable.
|
|
33
|
+
- `ComputeBMI`: Enhanced summary messages and simplified calculation logic.
|
|
34
|
+
- **Character Personalization**:
|
|
35
|
+
- Updated `convert_json_character_to_markdown` to replace `{{char}}`
|
|
36
|
+
placeholders with actual names.
|
|
37
|
+
- Enhanced `personalize_character_profile` using case-insensitive regexes
|
|
38
|
+
for `{{user}} and {{char}}`.
|
|
39
|
+
- Refactored `PNGMetadataExtractor.decode_character` to return a tuple of
|
|
40
|
+
the decoded string and parsed JSON data.
|
|
41
|
+
- **Token Estimation**:
|
|
42
|
+
- Relocated `TokenEstimator` to a primary domain module and introduced an
|
|
43
|
+
`Estimate` struct for formatted bytes and tokens.
|
|
44
|
+
- Implemented `OllamaChat::TokenEstimator::Crude` as the estimation engine.
|
|
45
|
+
|
|
46
|
+
### Refactoring & Maintenance
|
|
47
|
+
|
|
48
|
+
- Updated Ruby syntax across the project to use shorthand hash syntax (e.g., in
|
|
49
|
+
`.where`, object initialization, and method calls).
|
|
50
|
+
- Improved compatibility by replacing the `it` parameter with `_1` in the
|
|
51
|
+
`tools` method within `ToolCalling`.
|
|
52
|
+
- Bumped `context_spook` dependency from **1.5** to **1.6**.
|
|
53
|
+
|
|
54
|
+
## 2026-06-29 v0.0.95
|
|
55
|
+
|
|
56
|
+
### New Features & Enhancements
|
|
57
|
+
|
|
58
|
+
- **PNG Metadata Extraction**:
|
|
59
|
+
- Implemented `OllamaChat::Utils::PNGMetadataExtractor` to support
|
|
60
|
+
extraction of characters, prompts, and workflows from `tEXt` chunks.
|
|
61
|
+
- Added support for Automatic1111 Stable Diffusion WebUI parameters via
|
|
62
|
+
`parse_a1111_parameters`.
|
|
63
|
+
- Consolidated metadata extraction logic into a new `parse_png` method
|
|
64
|
+
within `OllamaChat::Parsing`.
|
|
65
|
+
- Introduced `OllamaChat::Utils::UTF8Converter` to ensure safe UTF-8
|
|
66
|
+
encoding across the system.
|
|
67
|
+
- **Tool Improvements**:
|
|
68
|
+
- Enhanced the `roll_dice` tool by adding a human-readable `message` field
|
|
69
|
+
to its JSON output and increasing the `result_display_timeout` in
|
|
70
|
+
`default_config.yml`.
|
|
71
|
+
- **Command Interface**:
|
|
72
|
+
- Overhauled help texts for numerous commands (including `/model`,
|
|
73
|
+
`/system`, `/tools`, `/session`, `/prompt`, and `/persona`) using
|
|
74
|
+
squiggly heredocs for better formatting and clarity.
|
|
75
|
+
- Added comprehensive YARD documentation to the `OllamaChat::Commands`
|
|
76
|
+
module.
|
|
77
|
+
|
|
78
|
+
### Bug Fixes & Refactoring
|
|
79
|
+
|
|
80
|
+
- **Stability & Logic**:
|
|
81
|
+
- Updated `OllamaChat::InputContent#all_file_set` to filter out directories
|
|
82
|
+
using `.select(&:file?)` and return a `Set`.
|
|
83
|
+
- Improved session name validation in
|
|
84
|
+
`lib/ollama_chat/session_management.rb` by replacing `.nil?` with
|
|
85
|
+
`.blank?`.
|
|
86
|
+
- Added `io.rewind` within an `ensure` block in the PNG extraction logic to
|
|
87
|
+
prevent read errors.
|
|
88
|
+
- **Cleanup**:
|
|
89
|
+
- Removed the unused `json` dependency from `compute_bmi`.
|
|
90
|
+
- Removed the `PATCH_TOOL` definition and its corresponding documentation
|
|
91
|
+
in `README.md`.
|
|
92
|
+
- Pruned redundant convenience methods `extract_prompt` and
|
|
93
|
+
`extract_workflow` from `OllamaChat::Utils::PNGMetadataExtractor`.
|
|
94
|
+
|
|
95
|
+
### Documentation & CI
|
|
96
|
+
|
|
97
|
+
- **README Updates**:
|
|
98
|
+
- Expanded the available tools table to include `delete_file`, `move_file`,
|
|
99
|
+
`eval_ruby`, `get_ghr`, and `get_jira_issue`.
|
|
100
|
+
- Refined descriptions for the **Knowledge** category, specifically
|
|
101
|
+
distinguishing between `retrieve_document_snippets` and `file_context`.
|
|
102
|
+
- **CI/CD**:
|
|
103
|
+
- Optimized dependency installation in `.all_images.yml` by replacing
|
|
104
|
+
`getconf _NPROCESSORS_ONLN` with `nproc` for better parallel job
|
|
105
|
+
compatibility.
|
|
106
|
+
|
|
3
107
|
## 2026-06-22 v0.0.94
|
|
4
108
|
|
|
5
109
|
### Added
|
|
@@ -110,7 +214,7 @@
|
|
|
110
214
|
|
|
111
215
|
- **Model Option Profiles**: Added support for model option profiles, including
|
|
112
216
|
a new `profile` column in the database with a composite unique index on
|
|
113
|
-
`[:model_name, :profile]`.
|
|
217
|
+
`[:model_name, :profile]`.
|
|
114
218
|
- Enhanced `OllamaChat::ModelHandling` methods (`get_stored_model_options`,
|
|
115
219
|
`store_model_options`) to support a `profile` parameter.
|
|
116
220
|
- Implemented `choose_profile_for_model` for interactive profile selection.
|
|
@@ -126,20 +230,20 @@
|
|
|
126
230
|
|
|
127
231
|
### Enhancements & Refactoring
|
|
128
232
|
|
|
129
|
-
- **Command Standardization**:
|
|
233
|
+
- **Command Standardization**:
|
|
130
234
|
- Standardized the use of the `-e` flag for editing across multiple
|
|
131
235
|
commands: `/input`, `/regenerate`, `/pipe`, `/output`, `/copy`, and
|
|
132
236
|
`/paste`.
|
|
133
237
|
- Replaced "Flags:" with "Options:" in help text for several chat commands.
|
|
134
238
|
- Added a specific editor hook using `edit_text` for the `/input` command
|
|
135
239
|
to allow editing imported content.
|
|
136
|
-
- **Code Architecture**:
|
|
240
|
+
- **Code Architecture**:
|
|
137
241
|
- Extracted all chat command definitions into a new separate module
|
|
138
242
|
`OllamaChat::Commands` located in `lib/ollama_chat/commands.rb`.
|
|
139
243
|
- Updated `OllamaChat::Chat` and the main library entry point to utilize
|
|
140
244
|
this new module instead of inline definitions or
|
|
141
245
|
`OllamaChat::CommandConcern`.
|
|
142
|
-
- **Message Output**:
|
|
246
|
+
- **Message Output**:
|
|
143
247
|
- Enhanced `OllamaChat::MessageOutput#pipe` and `#output` to accept an
|
|
144
248
|
`edit` parameter.
|
|
145
249
|
- Refactored `OllamaChat::MessageOutput#attempt_to_write_file` to receive
|
|
@@ -282,42 +386,42 @@
|
|
|
282
386
|
## 2026-04-02 v0.0.86
|
|
283
387
|
|
|
284
388
|
- Updated `play_persona_prompt` in `lib/ollama_chat/personae_management.rb` to
|
|
285
|
-
include “(no need to read the file)” in the roleplay prompt template string.
|
|
286
|
-
- Added `optional: true` to the `/links` command in `lib/ollama_chat/chat.rb`.
|
|
389
|
+
include “(no need to read the file)” in the roleplay prompt template string.
|
|
390
|
+
- Added `optional: true` to the `/links` command in `lib/ollama_chat/chat.rb`.
|
|
287
391
|
- Made the `edit` subcommand of `/revise` optional by adding `optional: true`
|
|
288
|
-
to its command definition in `lib/ollama_chat/chat.rb`.
|
|
289
|
-
- Added a `backup` subcommand for persona management:
|
|
392
|
+
to its command definition in `lib/ollama_chat/chat.rb`.
|
|
393
|
+
- Added a `backup` subcommand for persona management:
|
|
290
394
|
- Updated the `:persona` command regex and completion options in
|
|
291
|
-
`lib/ollama_chat/chat.rb`.
|
|
292
|
-
- Added a case handler to invoke the new `backup_persona` method.
|
|
395
|
+
`lib/ollama_chat/chat.rb`.
|
|
396
|
+
- Added a case handler to invoke the new `backup_persona` method.
|
|
293
397
|
- Implemented `backup_persona` in `lib/ollama_chat/personae_management.rb`
|
|
294
|
-
with YARD documentation.
|
|
295
|
-
- Removed the redundant assignment `persona = persona` in `edit_persona`.
|
|
398
|
+
with YARD documentation.
|
|
399
|
+
- Removed the redundant assignment `persona = persona` in `edit_persona`.
|
|
296
400
|
- Fixed the rescue exception class name in the `use_model` block of
|
|
297
401
|
`lib/ollama_chat/chat.rb`, changing from `OllamaChatError::UnknownModelError`
|
|
298
|
-
to `OllamaChat::UnknownModelError`.
|
|
402
|
+
to `OllamaChat::UnknownModelError`.
|
|
299
403
|
- Ensured float division for duration calculations in `FollowChat` by
|
|
300
404
|
converting operands to float in the `eval_stats` method of
|
|
301
|
-
`lib/ollama_chat/follow_chat.rb`.
|
|
405
|
+
`lib/ollama_chat/follow_chat.rb`.
|
|
302
406
|
- Used `Pathname.new(file).expand_path.directory?` for tilde expansion in
|
|
303
|
-
directory checks in `lib/ollama_chat/parsing.rb`.
|
|
304
|
-
- Refactored command registration formatting in `lib/ollama_chat/chat.rb`.
|
|
407
|
+
directory checks in `lib/ollama_chat/parsing.rb`.
|
|
408
|
+
- Refactored command registration formatting in `lib/ollama_chat/chat.rb`.
|
|
305
409
|
- Added YARD documentation to the `OllamaChat::CommandConcern::Command` class
|
|
306
|
-
in `lib/ollama_chat/command_concern.rb`.
|
|
410
|
+
in `lib/ollama_chat/command_concern.rb`.
|
|
307
411
|
- Removed the deprecated `-d` flag from the `/input` command in
|
|
308
|
-
`lib/ollama_chat/chat.rb`.
|
|
309
|
-
- Removed tag support from `parse_content`:
|
|
412
|
+
`lib/ollama_chat/chat.rb`.
|
|
413
|
+
- Removed tag support from `parse_content`:
|
|
310
414
|
- Updated `OllamaChat::Chat` to call `parse_content` without expecting a
|
|
311
|
-
`tags` array.
|
|
312
|
-
- Simplified handling of `@parse_content`.
|
|
313
|
-
- Removed tag recognition logic from `OllamaChat::Parsing`.
|
|
314
|
-
- Changed `parse_content` to return a single `String`.
|
|
315
|
-
- Deleted tag‑specific example from the spec.
|
|
316
|
-
- Updated the `file_context` tool description for accuracy.
|
|
317
|
-
- Added an interactive loop to enable/disable tools:
|
|
415
|
+
`tags` array.
|
|
416
|
+
- Simplified handling of `@parse_content`.
|
|
417
|
+
- Removed tag recognition logic from `OllamaChat::Parsing`.
|
|
418
|
+
- Changed `parse_content` to return a single `String`.
|
|
419
|
+
- Deleted tag‑specific example from the spec.
|
|
420
|
+
- Updated the `file_context` tool description for accuracy.
|
|
421
|
+
- Added an interactive loop to enable/disable tools:
|
|
318
422
|
- Wrapped `enable_tool` and `disable_tool` in a `loop do` in
|
|
319
|
-
`lib/ollama_chat/tool_calling.rb`.
|
|
320
|
-
- Modified `select_tools` to place `[EXIT]` at the start.
|
|
423
|
+
`lib/ollama_chat/tool_calling.rb`.
|
|
424
|
+
- Modified `select_tools` to place `[EXIT]` at the start.
|
|
321
425
|
- Handled user choice with `choose(select_tools)`
|
|
322
426
|
and exited on `[EXIT]` or `nil`.
|
|
323
427
|
|
|
@@ -348,24 +452,24 @@
|
|
|
348
452
|
## 2026-03-26 v0.0.84
|
|
349
453
|
|
|
350
454
|
- Added `OllamaChat::Utils::ValueFormatter` with helper `format_bytes` in
|
|
351
|
-
`lib/ollama_chat/utils/value_formatter.rb`.
|
|
352
|
-
- Added `require 'ollama_chat/utils/value_formatter'` where needed.
|
|
455
|
+
`lib/ollama_chat/utils/value_formatter.rb`.
|
|
456
|
+
- Added `require 'ollama_chat/utils/value_formatter'` where needed.
|
|
353
457
|
- Updated `write_file`, `patch_file`, `paste_from_clipboard` to use
|
|
354
|
-
`format_bytes` for byte‑size messages.
|
|
458
|
+
`format_bytes` for byte‑size messages.
|
|
355
459
|
- Implemented new tool `RetrieveDocumentSnippets` in
|
|
356
460
|
`lib/ollama_chat/tools/retrieve_document_snippets.rb` and its spec
|
|
357
|
-
`spec/ollama_chat/tools/retrieve_document_snippets_spec.rb`.
|
|
461
|
+
`spec/ollama_chat/tools/retrieve_document_snippets_spec.rb`.
|
|
358
462
|
- Updated `default_config.yml` to enable `retrieve_document_snippets` by
|
|
359
|
-
default.
|
|
463
|
+
default.
|
|
360
464
|
- Rewrote tool payloads to include a `message` key for `browse`, `search_web`,
|
|
361
|
-
`paste_from_clipboard`, `resolve_tag`, and others.
|
|
362
|
-
- `browse` now returns `"Opened \"<url>\" in browser."` or a failure message.
|
|
465
|
+
`paste_from_clipboard`, `resolve_tag`, and others.
|
|
466
|
+
- `browse` now returns `"Opened \"<url>\" in browser."` or a failure message.
|
|
363
467
|
- Refactored `confirm?` in `lib/ollama_chat/dialog.rb` to accept keyword `yes:`
|
|
364
468
|
for a confirmation regex and display a coloured emoji matching the response
|
|
365
|
-
or timeout/default.
|
|
366
|
-
- Updated all calls to `confirm?` to use `yes: /\Ay/i` syntax.
|
|
469
|
+
or timeout/default.
|
|
470
|
+
- Updated all calls to `confirm?` to use `yes: /\Ay/i` syntax.
|
|
367
471
|
- Updated `lib/ollama_chat/message_output.rb` to add `yes:` keyword to
|
|
368
|
-
`confirm?` calls and refine the emoji shown when a file already exists.
|
|
472
|
+
`confirm?` calls and refine the emoji shown when a file already exists.
|
|
369
473
|
|
|
370
474
|
## 2026-03-24 v0.0.83
|
|
371
475
|
|
|
@@ -387,13 +491,13 @@
|
|
|
387
491
|
## 2026-03-21 v0.0.82
|
|
388
492
|
|
|
389
493
|
- Add a `before` block setting `OC::OLLAMA::CHAT::TOOLS::CTAGS_TOOL` to `ctags`
|
|
390
|
-
in the `resolve_tag` spec.
|
|
494
|
+
in the `resolve_tag` spec.
|
|
391
495
|
- Updated `OllamaChat::Tools::PasteIntoEditor` description to use `text`
|
|
392
496
|
instead of `string` and clarified that no file or line is required when
|
|
393
|
-
pasting into the editor.
|
|
497
|
+
pasting into the editor.
|
|
394
498
|
- Added bell and question mark emojis to various `confirm?` and `ask?` prompts
|
|
395
|
-
across multiple modules for clearer UX.
|
|
396
|
-
- Updated prompt string to `⏎ Press …` for better display.
|
|
499
|
+
across multiple modules for clearer UX.
|
|
500
|
+
- Updated prompt string to `⏎ Press …` for better display.
|
|
397
501
|
- Enhanced `OllamaChat::Tools::ResolveTag` and `OllamaChat::Utils::TagResolver`
|
|
398
502
|
with a new `kinds` method, updated `kind` parameter description, refactored
|
|
399
503
|
`kind_of`, and fixed tag‑parsing regex to capture all columns.
|
data/README.md
CHANGED
|
@@ -42,7 +42,6 @@ The following environment variables can be used to configure behavior:
|
|
|
42
42
|
- `OLLAMA_CHAT_TOOLS_TEST_RUNNER` - Configured test runner for `run_tests` (default: `rspec`)
|
|
43
43
|
- `OLLAMA_CHAT_TOOLS_CTAGS_TOOL` - Path to the ctags tool
|
|
44
44
|
- `OLLAMA_CHAT_TOOLS_TAGS_FILE` - Location of the tags file
|
|
45
|
-
- `OLLAMA_CHAT_TOOLS_PATCH_TOOL` - Patch tool to use
|
|
46
45
|
- `OLLAMA_CHAT_TOOLS_JIRA_URL` - Base URL for Jira instance
|
|
47
46
|
- `OLLAMA_CHAT_TOOLS_JIRA_USER` - Username for Jira authentication
|
|
48
47
|
- `OLLAMA_CHAT_TOOLS_JIRA_API_TOKEN` - API token for Jira authentication
|
|
@@ -253,14 +252,19 @@ context, manipulate files, and retrieve external information.
|
|
|
253
252
|
|
|
254
253
|
| Category | Tools | Description |
|
|
255
254
|
| :--- | :--- | :--- |
|
|
256
|
-
| **Filesystem** | `read_file`, `write_file`, `patch_file`, `directory_structure`, `execute_grep` | Read, write, and search files within allowed directories. |
|
|
257
|
-
| **Ruby/Dev** | `resolve_tag`, `execute_ri`, `gem_path_lookup`, `run_tests` | Introspect Ruby code, check documentation, and run test suites. |
|
|
258
|
-
| **Web/External** | `search_web`, `get_url`, `browse`, `get_rfc`, `get_cve`, `get_endoflife` | Access the internet, fetch specific URLs, and look up technical standards. |
|
|
255
|
+
| **Filesystem** | `read_file`, `write_file`, `patch_file`, `delete_file`, `move_file`, `directory_structure`, `execute_grep` | Read, write, and search files within allowed directories. |
|
|
256
|
+
| **Ruby/Dev** | `resolve_tag`, `execute_ri`, `gem_path_lookup`, `run_tests`, `eval_ruby` | Introspect Ruby code, check documentation, and run test suites. |
|
|
257
|
+
| **Web/External** | `search_web`, `get_url`, `browse`, `get_rfc`, `get_cve`, `get_endoflife`, `get_ghr`, `get_jira_issue` | Access the internet, fetch specific URLs, and look up technical standards. |
|
|
259
258
|
| **System/Util** | `get_time`, `get_location`, `get_current_weather`, `generate_password`, `compute_bmi`, `roll_dice` | General utility functions for time, location, and simple calculations. |
|
|
260
259
|
| **Editor/Clip** | `copy_to_clipboard`, `paste_from_clipboard`, `paste_into_editor`, `open_file_in_editor` | Bridge the gap between the chat and the system clipboard or editor. |
|
|
261
|
-
| **Knowledge** | `retrieve_document_snippets` |
|
|
260
|
+
| **Knowledge** | `retrieve_document_snippets`, `file_context` | Semantic search for specific snippets vs. broad retrieval of structured project context. |
|
|
262
261
|
| **Multimodal** | `generate_image` | Generate images via a local ComfyUI server. |
|
|
263
262
|
|
|
263
|
+
***Note on Knowledge Tools**: Use `retrieve_document_snippets` for precise,
|
|
264
|
+
low-token semantic discovery and `file_context` for a comprehensive view of
|
|
265
|
+
modules or patterns. Be cautious with broad patterns in `file_context`, as
|
|
266
|
+
importing too many files can exceed the LLM's context window.*
|
|
267
|
+
|
|
264
268
|
## Download
|
|
265
269
|
|
|
266
270
|
The homepage of this app is located at
|
data/Rakefile
CHANGED
|
@@ -56,7 +56,7 @@ GemHadar do
|
|
|
56
56
|
dependency 'bigdecimal', '~> 3.1'
|
|
57
57
|
dependency 'csv', '~> 3.0'
|
|
58
58
|
dependency 'const_conf', '~> 0.3'
|
|
59
|
-
dependency 'context_spook', '~> 1.
|
|
59
|
+
dependency 'context_spook', '~> 1.6'
|
|
60
60
|
dependency 'infobar', '>= 0.13.1'
|
|
61
61
|
dependency 'rubyzip', '~> 3.0'
|
|
62
62
|
dependency 'sequel', '~> 5.0'
|
data/lib/ollama_chat/chat.rb
CHANGED
|
@@ -33,6 +33,7 @@ require 'context_spook'
|
|
|
33
33
|
class OllamaChat::Chat
|
|
34
34
|
include Tins::GO
|
|
35
35
|
include Term::ANSIColor
|
|
36
|
+
include OllamaChat::TokenEstimator
|
|
36
37
|
include OllamaChat::HTTPHandling
|
|
37
38
|
include OllamaChat::Commands
|
|
38
39
|
include OllamaChat::Logging
|
|
@@ -69,6 +70,7 @@ class OllamaChat::Chat
|
|
|
69
70
|
include OllamaChat::PromptManagement
|
|
70
71
|
include OllamaChat::Utils::Chooser
|
|
71
72
|
include OllamaChat::Utils::ValueFormatter
|
|
73
|
+
include OllamaChat::Utils::UTF8Converter
|
|
72
74
|
|
|
73
75
|
# Initializes a new OllamaChat::Chat instance with the given command-line
|
|
74
76
|
# arguments.
|