ollama_chat 0.0.143 → 0.0.145

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: bcd32949a2267da25e4106d1c9a4eea74e11a0822d328a88bfd4848c1ba5bd7b
4
- data.tar.gz: 6eaa4fcb585bb23425da25e48d38f1e6c066c12149c54033b782835148315db0
3
+ metadata.gz: 6e716f767311601aaacead9a9a5cddebaa97236e6a24ca5e6937431bbf421ad0
4
+ data.tar.gz: e7ca2ef80988b4ed6754e75ab491c8c74ce6314e94f12e026fb31f313aa12051
5
5
  SHA512:
6
- metadata.gz: 8919a0efaced88d859bb0c003c1e5a21516c582c5e6ae540e3b766eeeca9150fa1a1f0ecd88631dea11247908704ba40e3724cbb2496e83c259010dbccf94ff1
7
- data.tar.gz: cbdbb312c30ee11c5a5c093c13078b9947298cf1bd612659c2da49b8a6f288f1b96702686546dc1f7b058917cf9356a52422c8d3b4bc9a6b9772c965d7d9179d
6
+ metadata.gz: 8514366fa439e66195e7ca0ad2e29191c0cde6624c892a194ad1313ddbafa6633bd17e14f869d290738a9a85b97ef45015d7e31b77c23493f1795718f4e5b332
7
+ data.tar.gz: fd5847c16bcf409600524231d4dedc15244e88e85fc9a7d6d1e13a90bbbf32bc081b1bef649957cf1b3259023db74d3404d14fefdbb2e4e8d8576d618a532683
data/CHANGES.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-11-13 v0.0.145
4
+
5
+ ### Fix
6
+
7
+ - Raised the minimum `ollama-ruby` dependency constraint from `~> 1.26` to `~>
8
+ 1.26, >= 1.26.1` in `Rakefile` and `ollama_chat.gemspec` to ensure the JSONL
9
+ streaming buffer fix from **v1.26.1** is present.
10
+
11
+ ## 2026-11-12 v0.0.144
12
+
13
+ ### Features
14
+
15
+ - Add a `c` (choose) option to the missing-model prompt in `use_model`,
16
+ allowing users to select a different model instead of only confirming a pull
17
+ or cancelling.
18
+
19
+ ### Improvements
20
+
21
+ - Improve the stale context error message in `patch_file` to clarify that the
22
+ issue may be a modified file or an incorrect checksum, and instruct the user
23
+ to re-read the full file to obtain a fresh checksum.
24
+
3
25
  ## 2026-11-11 v0.0.143
4
26
 
5
27
  ### Fixes
data/Rakefile CHANGED
@@ -39,7 +39,7 @@ GemHadar do
39
39
  )
40
40
 
41
41
  dependency 'excon', '~> 1.0'
42
- dependency 'ollama-ruby', '~> 1.26'
42
+ dependency 'ollama-ruby', '~> 1.26', '>= 1.26.1'
43
43
  dependency 'documentrix', '>= 0.8.0'
44
44
  dependency 'unix_socks', '>= 0.4'
45
45
  dependency 'rss', '~> 0.3'
@@ -594,13 +594,20 @@ module OllamaChat::ModelHandling
594
594
 
595
595
  unless model_metadata = model_present?(new_model, ollama:)
596
596
  feedback("Model #{bold{new_model}} not found locally.", type: :warn)
597
- unless confirm?(prompt: "Pull it from remote? (y/n) ", yes: /\Ay/i)
597
+ answer = confirm?(prompt: "Pull it? ✅[y]es / 🎯[c]hoose / ⛔️[n]o? %s", yes: nil)
598
+ case answer
599
+ when /\Ay/i
600
+ model_metadata = pull_model_unless_present(new_model, ollama:)
601
+ when /\Ac/i
602
+ new_model = choose_model('', old_model)
603
+ model_metadata = model_present?(new_model, ollama:) ||
604
+ pull_model_unless_present(new_model, ollama:)
605
+ else
598
606
  feedback("Cancelled.", type: :cancel)
599
607
  old_model.full? && model_present?(old_model, ollama:) or
600
608
  raise OllamaChat::UnknownModelError, "no usable model after cancel"
601
609
  return @model_metadata
602
610
  end
603
- model_metadata = pull_model_unless_present(new_model, ollama:)
604
611
  end
605
612
 
606
613
  @model, @model_metadata = new_model, model_metadata
@@ -141,8 +141,10 @@ class OllamaChat::Tools::PatchFile
141
141
 
142
142
  if args.checksum != current_checksum
143
143
  raise OllamaChat::ToolFunctionArgumentError,
144
- "Stale context: File `#{path}` has been modified since your last read. " \
145
- "Unexpected checksum `#{args.checksum}`, I cannot patch!"
144
+ "Stale context: File `#{path}` might have been modified since your " \
145
+ "last read and/or you passed the wrong checksum `#{args.checksum}`. " \
146
+ "Re-read the full file (no line range) to get a fresh checksum " \
147
+ "and verify your edit ranges."
146
148
  end
147
149
 
148
150
  # We use the content we just read for the patch, as it's verified fresh
@@ -5,7 +5,7 @@
5
5
  # by hand; it is rewritten on every `rake version` invocation.
6
6
  module OllamaChat
7
7
  # The current version of the OllamaChat gem as a String.
8
- VERSION = '0.0.143'
8
+ VERSION = '0.0.145'
9
9
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
10
10
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
11
11
  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.143 ruby lib
2
+ # stub: ollama_chat 0.0.145 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama_chat".freeze
6
- s.version = "0.0.143".freeze
6
+ s.version = "0.0.145".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]
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
34
34
  s.add_development_dependency(%q<utils>.freeze, [">= 0".freeze])
35
35
  s.add_runtime_dependency(%q<excon>.freeze, ["~> 1.0".freeze])
36
- s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 1.26".freeze])
36
+ s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 1.26".freeze, ">= 1.26.1".freeze])
37
37
  s.add_runtime_dependency(%q<documentrix>.freeze, [">= 0.8.0".freeze])
38
38
  s.add_runtime_dependency(%q<unix_socks>.freeze, [">= 0.4".freeze])
39
39
  s.add_runtime_dependency(%q<rss>.freeze, ["~> 0.3".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.143
4
+ version: 0.0.145
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -142,6 +142,9 @@ dependencies:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
144
  version: '1.26'
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: 1.26.1
145
148
  type: :runtime
146
149
  prerelease: false
147
150
  version_requirements: !ruby/object:Gem::Requirement
@@ -149,6 +152,9 @@ dependencies:
149
152
  - - "~>"
150
153
  - !ruby/object:Gem::Version
151
154
  version: '1.26'
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: 1.26.1
152
158
  - !ruby/object:Gem::Dependency
153
159
  name: documentrix
154
160
  requirement: !ruby/object:Gem::Requirement