ollama_chat 0.0.143 → 0.0.144

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: 012ddf41109738caa952ddec5b5d5152bda1937cc59b3d0c7a246a64f5131713
4
+ data.tar.gz: 5c5b4aaedc1f1f5e6da9a3de45539c04387a72fd521babf855b77d25bd417748
5
5
  SHA512:
6
- metadata.gz: 8919a0efaced88d859bb0c003c1e5a21516c582c5e6ae540e3b766eeeca9150fa1a1f0ecd88631dea11247908704ba40e3724cbb2496e83c259010dbccf94ff1
7
- data.tar.gz: cbdbb312c30ee11c5a5c093c13078b9947298cf1bd612659c2da49b8a6f288f1b96702686546dc1f7b058917cf9356a52422c8d3b4bc9a6b9772c965d7d9179d
6
+ metadata.gz: 79af5f73fa2b0ddde39245f6d0ac32b0876137975e33b61ac8b9cba7beaccf91627406ae5b9a7aea638463a8071add87b91a9d40e983cf63a26620b3a6cee13d
7
+ data.tar.gz: eb585dbcc5c313e0df5a9aa967467cf837cbc3bd7e5be67c78a243d865feef7e322fb8c3ceba1d6ac8f4a802cab7a9d013d1cabf0b85b2c3190ded4d666aa0c6
data/CHANGES.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-11-12 v0.0.144
4
+
5
+ ### Features
6
+
7
+ - Add a `c` (choose) option to the missing-model prompt in `use_model`,
8
+ allowing users to select a different model instead of only confirming a pull
9
+ or cancelling.
10
+
11
+ ### Improvements
12
+
13
+ - Improve the stale context error message in `patch_file` to clarify that the
14
+ issue may be a modified file or an incorrect checksum, and instruct the user
15
+ to re-read the full file to obtain a fresh checksum.
16
+
3
17
  ## 2026-11-11 v0.0.143
4
18
 
5
19
  ### Fixes
@@ -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.144'
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.144 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.144".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]
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.144
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank