ollama_chat 0.0.142 → 0.0.143

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: 5df1b778efc290ca00d2228762281fd6b210e44ca63a536620b409a29d73fa93
4
- data.tar.gz: ef1ce21660c446d41fd5e50c9e27ec69b4bbd361b6e3c5d6bb05b328b0c0efad
3
+ metadata.gz: bcd32949a2267da25e4106d1c9a4eea74e11a0822d328a88bfd4848c1ba5bd7b
4
+ data.tar.gz: 6eaa4fcb585bb23425da25e48d38f1e6c066c12149c54033b782835148315db0
5
5
  SHA512:
6
- metadata.gz: b0ea78869a60e2617c3b8d5d990a22121c05c31b46734550429a3bd28806ef0f828b7c664df98f423a744890cf5bdd9e5fccce1236363c62f8364e8d20fbc05d
7
- data.tar.gz: 5f4f76c131783b5d3c4b8071c94285ebab0b64b6350d1f18ea15de2d818e01c388a34477f8245e1bcd0a3db003eb7eab8053dd9b659f84ba099f7f727ae47795
6
+ metadata.gz: 8919a0efaced88d859bb0c003c1e5a21516c582c5e6ae540e3b766eeeca9150fa1a1f0ecd88631dea11247908704ba40e3724cbb2496e83c259010dbccf94ff1
7
+ data.tar.gz: cbdbb312c30ee11c5a5c093c13078b9947298cf1bd612659c2da49b8a6f288f1b96702686546dc1f7b058917cf9356a52422c8d3b4bc9a6b9772c965d7d9179d
data/CHANGES.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-11-11 v0.0.143
4
+
5
+ ### Fixes
6
+
7
+ - Scoped `AppState.acknowledge` to a single prompt context to prevent `/prompt
8
+ sync -c <context>` from clearing the drift warning (`⚠`) for unrelated
9
+ contexts (e.g., `report`, `compaction`).
10
+ - `AppState.acknowledge` now accepts an optional `context:` keyword argument.
11
+ When provided, it surgically updates only the hashes for that specific
12
+ context, preserving the stored hashes for all other contexts.
13
+
14
+ ### Improvements
15
+
16
+ - `prompt_sync` now passes its `context:` argument through to
17
+ `AppState.acknowledge`, ensuring that only the resolved context's nagging
18
+ state is cleared.
19
+
3
20
  ## 2026-11-11 v0.0.142
4
21
 
5
22
  ### 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
- def self.acknowledge(chat)
106
- hashes = compute_hashes(chat.config.prompts)
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
@@ -532,7 +532,7 @@ module OllamaChat::PromptManagement
532
532
  end
533
533
  end
534
534
 
535
- models::AppState.acknowledge(self)
535
+ models::AppState.acknowledge(self, context:)
536
536
  self
537
537
  end
538
538
 
@@ -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.142'
8
+ VERSION = '0.0.143'
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.142 ruby lib
2
+ # stub: ollama_chat 0.0.143 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama_chat".freeze
6
- s.version = "0.0.142".freeze
6
+ s.version = "0.0.143".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.142
4
+ version: 0.0.143
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank