ollama_chat 0.0.89 → 0.0.90
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 +17 -0
- data/Rakefile +1 -1
- data/lib/ollama_chat/commands.rb +13 -4
- data/lib/ollama_chat/rag_handling.rb +5 -3
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1a85a50e65a4b71a0fac74cb020ac5590bcc96cb57cda7b070abf08f4b92abb
|
|
4
|
+
data.tar.gz: 6abae5b317129a93bb128b7debca31fbef03c3c2b8180d7820c76cfb6754d1df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f0852acd78509cf852f5db907d907724a90d698038b265c585983336f3fa0b9911690a52052ca56f0eb4a34cfe80df2bec0a23d701238e6b65c15d0ed2050aa
|
|
7
|
+
data.tar.gz: 4604b567234fbcd236e6568e11bc714cca7e5bf67902b5bf9e893323a0ce5ac9118fcdcf804af6c0fc00a558381d68d5e2994daf10c7d830090b0096836a4181
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-06-17 v0.0.90
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Added an edit option to the `/prompt` command via the `-e` flag, allowing
|
|
8
|
+
users to modify a selected prompt using `edit_text`.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Updated the minimum `documentrix` dependency to **0.6.0** (previously
|
|
13
|
+
**0.5.0** and **0.4.0**) to leverage SQLite concurrency improvements and
|
|
14
|
+
strong consistency for collection discovery, preventing stale cache issues.
|
|
15
|
+
- Modified `OllamaChat::RAGHandling#update_collection` to accumulate results
|
|
16
|
+
from `embed` and return them as a newline-separated `String`.
|
|
17
|
+
- Updated `lib/ollama_chat/commands.rb` to capture and return the output of the
|
|
18
|
+
collection update command.
|
|
19
|
+
|
|
3
20
|
## 2026-06-15 v0.0.89
|
|
4
21
|
|
|
5
22
|
### New Features
|
data/Rakefile
CHANGED
|
@@ -40,7 +40,7 @@ GemHadar do
|
|
|
40
40
|
|
|
41
41
|
dependency 'excon', '~> 1.0'
|
|
42
42
|
dependency 'ollama-ruby', '~> 1.21'
|
|
43
|
-
dependency 'documentrix', '>= 0.
|
|
43
|
+
dependency 'documentrix', '>= 0.6.0'
|
|
44
44
|
dependency 'unix_socks', '>= 0.4'
|
|
45
45
|
dependency 'rss', '~> 0.3'
|
|
46
46
|
dependency 'term-ansicolor', '~> 1.11'
|
data/lib/ollama_chat/commands.rb
CHANGED
|
@@ -405,14 +405,15 @@ module OllamaChat::Commands
|
|
|
405
405
|
|
|
406
406
|
command(
|
|
407
407
|
name: :prompt,
|
|
408
|
-
regexp: %r(^/prompt(?:\s+(edit|info|add|delete|list|duplicate|import|export|reset))?(?:\s+(\S+))?$),
|
|
408
|
+
regexp: %r(^/prompt(\s+-e)?(?:\s+(edit|info|add|delete|list|duplicate|import|export|reset))?(?:\s+(\S+))?$),
|
|
409
409
|
complete: [ 'prompt', %w[ edit info add delete list duplicate import export reset ] ],
|
|
410
410
|
optional: true,
|
|
411
411
|
help: <<~EOT,
|
|
412
412
|
Manage preset prompt templates or prefill the prompt (edit, info, add,
|
|
413
413
|
delete, list, duplicate, import, export, reset)
|
|
414
|
+
Options: -e to edit the next prompt instead of prefilling
|
|
414
415
|
EOT
|
|
415
|
-
) do |subcommand, filename|
|
|
416
|
+
) do |opts, subcommand, filename|
|
|
416
417
|
case subcommand
|
|
417
418
|
when 'add'
|
|
418
419
|
add_new_prompt
|
|
@@ -439,7 +440,15 @@ module OllamaChat::Commands
|
|
|
439
440
|
end
|
|
440
441
|
end
|
|
441
442
|
when nil
|
|
442
|
-
|
|
443
|
+
opts = go_command('e', opts)
|
|
444
|
+
if prompt = choose_prompt.full?
|
|
445
|
+
if opts[?e]
|
|
446
|
+
prompt = edit_text(prompt)
|
|
447
|
+
next prompt
|
|
448
|
+
else
|
|
449
|
+
@prefill_prompt = prompt
|
|
450
|
+
end
|
|
451
|
+
end
|
|
443
452
|
end
|
|
444
453
|
:next
|
|
445
454
|
end
|
|
@@ -493,7 +502,7 @@ module OllamaChat::Commands
|
|
|
493
502
|
when 'rename'
|
|
494
503
|
rename_collection(collection)
|
|
495
504
|
when 'update'
|
|
496
|
-
update_collection
|
|
505
|
+
results = update_collection and next results
|
|
497
506
|
when nil
|
|
498
507
|
collection_stats
|
|
499
508
|
end
|
|
@@ -138,8 +138,9 @@ module OllamaChat::RAGHandling
|
|
|
138
138
|
# existing tags, removes the stale records, and re-embeds the current
|
|
139
139
|
# version of the source.
|
|
140
140
|
#
|
|
141
|
-
# @return [
|
|
141
|
+
# @return [String] a newline-separated string of embedding result messages.
|
|
142
142
|
def update_collection
|
|
143
|
+
results = []
|
|
143
144
|
seen = {}
|
|
144
145
|
@documents.each_record do |record|
|
|
145
146
|
source = @documents.normalize_source(record.source) or next
|
|
@@ -151,8 +152,9 @@ module OllamaChat::RAGHandling
|
|
|
151
152
|
end
|
|
152
153
|
tags = record.tags_set
|
|
153
154
|
@documents.source_remove(source)
|
|
154
|
-
embed(source, tags:)
|
|
155
|
+
r = embed(source, tags:) or next
|
|
156
|
+
results << r
|
|
155
157
|
end
|
|
156
|
-
|
|
158
|
+
results * "\n"
|
|
157
159
|
end
|
|
158
160
|
end
|
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.90 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.90".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]
|
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
|
|
|
35
35
|
s.add_development_dependency(%q<utils>.freeze, [">= 0".freeze])
|
|
36
36
|
s.add_runtime_dependency(%q<excon>.freeze, ["~> 1.0".freeze])
|
|
37
37
|
s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 1.21".freeze])
|
|
38
|
-
s.add_runtime_dependency(%q<documentrix>.freeze, [">= 0.
|
|
38
|
+
s.add_runtime_dependency(%q<documentrix>.freeze, [">= 0.6.0".freeze])
|
|
39
39
|
s.add_runtime_dependency(%q<unix_socks>.freeze, [">= 0.4".freeze])
|
|
40
40
|
s.add_runtime_dependency(%q<rss>.freeze, ["~> 0.3".freeze])
|
|
41
41
|
s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.11".freeze])
|
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.90
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -169,14 +169,14 @@ dependencies:
|
|
|
169
169
|
requirements:
|
|
170
170
|
- - ">="
|
|
171
171
|
- !ruby/object:Gem::Version
|
|
172
|
-
version: 0.
|
|
172
|
+
version: 0.6.0
|
|
173
173
|
type: :runtime
|
|
174
174
|
prerelease: false
|
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
|
176
176
|
requirements:
|
|
177
177
|
- - ">="
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
|
-
version: 0.
|
|
179
|
+
version: 0.6.0
|
|
180
180
|
- !ruby/object:Gem::Dependency
|
|
181
181
|
name: unix_socks
|
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|