ollama_chat 0.0.89 → 0.0.91

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 119b526f7f7e18270e2896d68dc8f254e5a27b545f54a3c713fd9778a435b2c7
4
- data.tar.gz: 25906dc5d000f2b419e9a992bb61bb477fdf76e508b88af2b3f3bdaa4d082296
3
+ metadata.gz: 3106d416e537195c72ede3b02c74042b8425f06e53b83982937a1d8134ffe594
4
+ data.tar.gz: 24dd954498837dd1c81d437e5e673d90c0e9bd28130ffe9beef1ddd6fc31604a
5
5
  SHA512:
6
- metadata.gz: 5ea6804f5fb644099b84e563b461439043f32c38d33d1bb8bf7d90241b7b72edc6c5639cb1800e4230aeb161dfab3181f4b754210aa149c7fa796079b7e62d95
7
- data.tar.gz: 9ebbe67e51acb4fd944817e674bc35b69822be59cfff5a74b070039431251b4a1ea23da9308cfebc13aee207f1b8c754b160f3b5c30e36d03100207f004824f2
6
+ metadata.gz: 91ca2b8c628de67a35ea027ac240d101cad0a283295681f012fc6716bce2e60720f36e4bb493edfff77866cda0210e28368cd7f58526afcc112a8b77ff59a59e
7
+ data.tar.gz: ee0fcf6b6575078fc7d3606c68640135e237374ec1673375042a4cfd8174248562431ae9da08e631f1fd4de57e73a3943e5702f1dedc02b8983a0d93165c3331
data/CHANGES.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-17 v0.0.91
4
+
5
+ - Updated `lib/ollama_chat/commands.rb` to ensure the result of
6
+ `choose_prompt.full?` is converted to a string via `(&:to_s)`.
7
+
8
+ ## 2026-06-17 v0.0.90
9
+
10
+ ### Added
11
+
12
+ - Added an edit option to the `/prompt` command via the `-e` flag, allowing
13
+ users to modify a selected prompt using `edit_text`.
14
+
15
+ ### Changed
16
+
17
+ - Updated the minimum `documentrix` dependency to **0.6.0** (previously
18
+ **0.5.0** and **0.4.0**) to leverage SQLite concurrency improvements and
19
+ strong consistency for collection discovery, preventing stale cache issues.
20
+ - Modified `OllamaChat::RAGHandling#update_collection` to accumulate results
21
+ from `embed` and return them as a newline-separated `String`.
22
+ - Updated `lib/ollama_chat/commands.rb` to capture and return the output of the
23
+ collection update command.
24
+
3
25
  ## 2026-06-15 v0.0.89
4
26
 
5
27
  ### 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.4.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'
@@ -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
- @prefill_prompt = choose_prompt&.to_s
443
+ opts = go_command('e', opts)
444
+ if prompt = choose_prompt.full?(&:to_s)
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 [NilClass] always returns nil
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
- nil
158
+ results * "\n"
157
159
  end
158
160
  end
@@ -1,6 +1,6 @@
1
1
  module OllamaChat
2
2
  # OllamaChat version
3
- VERSION = '0.0.89'
3
+ VERSION = '0.0.91'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/ollama_chat.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ollama_chat 0.0.89 ruby lib
2
+ # stub: ollama_chat 0.0.91 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama_chat".freeze
6
- s.version = "0.0.89".freeze
6
+ s.version = "0.0.91".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.4.0".freeze])
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.89
4
+ version: 0.0.91
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.4.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.4.0
179
+ version: 0.6.0
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: unix_socks
182
182
  requirement: !ruby/object:Gem::Requirement