ollama_chat 0.0.142 → 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 +4 -4
- data/CHANGES.md +31 -0
- data/lib/ollama_chat/database/models/app_state.rb +17 -2
- data/lib/ollama_chat/model_handling.rb +9 -2
- data/lib/ollama_chat/prompt_management.rb +1 -1
- data/lib/ollama_chat/tools/patch_file.rb +4 -2
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 012ddf41109738caa952ddec5b5d5152bda1937cc59b3d0c7a246a64f5131713
|
|
4
|
+
data.tar.gz: 5c5b4aaedc1f1f5e6da9a3de45539c04387a72fd521babf855b77d25bd417748
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79af5f73fa2b0ddde39245f6d0ac32b0876137975e33b61ac8b9cba7beaccf91627406ae5b9a7aea638463a8071add87b91a9d40e983cf63a26620b3a6cee13d
|
|
7
|
+
data.tar.gz: eb585dbcc5c313e0df5a9aa967467cf837cbc3bd7e5be67c78a243d865feef7e322fb8c3ceba1d6ac8f4a802cab7a9d013d1cabf0b85b2c3190ded4d666aa0c6
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
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
|
+
|
|
17
|
+
## 2026-11-11 v0.0.143
|
|
18
|
+
|
|
19
|
+
### Fixes
|
|
20
|
+
|
|
21
|
+
- Scoped `AppState.acknowledge` to a single prompt context to prevent `/prompt
|
|
22
|
+
sync -c <context>` from clearing the drift warning (`⚠`) for unrelated
|
|
23
|
+
contexts (e.g., `report`, `compaction`).
|
|
24
|
+
- `AppState.acknowledge` now accepts an optional `context:` keyword argument.
|
|
25
|
+
When provided, it surgically updates only the hashes for that specific
|
|
26
|
+
context, preserving the stored hashes for all other contexts.
|
|
27
|
+
|
|
28
|
+
### Improvements
|
|
29
|
+
|
|
30
|
+
- `prompt_sync` now passes its `context:` argument through to
|
|
31
|
+
`AppState.acknowledge`, ensuring that only the resolved context's nagging
|
|
32
|
+
state is cleared.
|
|
33
|
+
|
|
3
34
|
## 2026-11-11 v0.0.142
|
|
4
35
|
|
|
5
36
|
### Features
|
|
@@ -101,9 +101,24 @@ class OllamaChat::Database::Models::AppState < Sequel::Model(OllamaChat::DB)
|
|
|
101
101
|
# drift notification. Called after `/prompt sync` so the user is not
|
|
102
102
|
# nagged again on the next launch.
|
|
103
103
|
#
|
|
104
|
+
# When a specific `context` is given, only that context's hashes are
|
|
105
|
+
# refreshed; the remaining contexts keep their stored hashes so their
|
|
106
|
+
# ⚠ marker persists until they are individually synced.
|
|
107
|
+
#
|
|
104
108
|
# @param chat [OllamaChat::Chat] the chat instance providing the config
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
# @param context [String, nil] optionally scope the acknowledge to a
|
|
110
|
+
# single prompt context
|
|
111
|
+
def self.acknowledge(chat, context: nil)
|
|
112
|
+
hashes = compute_hashes(chat.config.prompts)
|
|
113
|
+
|
|
114
|
+
if context
|
|
115
|
+
prefix = "#{context}/"
|
|
116
|
+
stored = get(:prompt_defaults_fingerprint)
|
|
117
|
+
existing = stored&.dig('hashes') || {}
|
|
118
|
+
hashes = existing.reject { |k, _| k.start_with?(prefix) }
|
|
119
|
+
.merge(hashes.select { |k, _| k.start_with?(prefix) })
|
|
120
|
+
end
|
|
121
|
+
|
|
107
122
|
fingerprint = fingerprint_from(hashes)
|
|
108
123
|
store_fingerprint(fingerprint, hashes)
|
|
109
124
|
end
|
|
@@ -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
|
-
|
|
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}`
|
|
145
|
-
"
|
|
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
|
data/lib/ollama_chat/version.rb
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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]
|