ollama_chat 0.0.112 → 0.0.113

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: 7e680260fa6eb6e0fb4c81629a962bffba24af8824a3fe6851bf4084e5bd3172
4
- data.tar.gz: 5c615c09ff36858276befde7029956941d8ee275b6da8b5bcffbe00099102d39
3
+ metadata.gz: e618b797bf1b5fa84728816e06b83fe3540424b48256ba107deb29c2beb8a219
4
+ data.tar.gz: f5abee2701f3fc6d7ba09513f0b0bd5133c7ec10ddb511ee5ea4238c14f9988e
5
5
  SHA512:
6
- metadata.gz: 3707cb40694f7dc16cc011e4e57ca73ee282809de7ee4fad0bff69f06749a11444354310f82c9ffc475ff3ace01e054d19dc94b0d71ea849e6db21bfdf56e97b
7
- data.tar.gz: c878bc0af562cf7519469345bb5c800b7382b5b523fa72d5bba6fe2da2d6bebc25e4657068fc02001222f45a1aaea7163ff0e6e28bbe190c0193b47f7f2ac67d
6
+ metadata.gz: 2f2172cc90da0a8b8c1b7f2306abbc8480db92abeb3629e20b2471e88fdd79ca2d18c209c05690167b564b6911685222dce48496e9825330e43500ff520aab74
7
+ data.tar.gz: da6e5e8583b11cb7d766ff0745e97070f2a39ac8f1ca6314a4bcb93d8e9a6c3ec9ef087a055b7c9844317f831fc4a6a590e11f80eaf6b6c80980143ab8385771
data/CHANGES.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-08-25 v0.0.113
4
+
5
+ * Simplified hash syntax by replacing `text: text` with `text:` etc.
6
+ * Removed the `/conversation compact` stub, including its regexp,
7
+ completion list, help text, handler logic, and associated specs.
8
+ * Added specs for `/config edit`, `/config reload`, and `/config diff` in
9
+ `commands_spec.rb`, verifying the ordered sequence of `diff_config`
10
+ followed by the new `reload_config` for the diff command.
11
+ * Removed the unused `collection_descriptions: {}` entry from the
12
+ `embedding:` section in `default_config.yml`.
13
+
3
14
  ## 2026-08-25 v0.0.112
4
15
 
5
16
  * Added a `diff` subcommand to the `/config` command, including updated
@@ -114,7 +114,7 @@ module OllamaChat::Clipboard
114
114
  # @return [TrueClass] if the copying has been performed successfully.
115
115
  def copy_to_clipboard(edit: false)
116
116
  text = last_message_content(content: false)
117
- perform_copy_to_clipboard(text: text, edit:)
117
+ perform_copy_to_clipboard(text:, edit:)
118
118
  log(:info, "Copied to clipboard", data: { bytes: format_bytes(text.bytesize) }) if text
119
119
  STDOUT.puts "The last response has been successfully copied to the system clipboard."
120
120
  true
@@ -76,6 +76,7 @@ module OllamaChat::Commands
76
76
  reload_config
77
77
  when 'diff'
78
78
  diff_config
79
+ reload_config
79
80
  else
80
81
  display_config
81
82
  end
@@ -597,15 +598,14 @@ module OllamaChat::Commands
597
598
 
598
599
  command(
599
600
  name: :conversation,
600
- regexp: %r(^/conversation\s+(clean|compact|save|load)(\s+-c)?(?:\s+([^-].*\.jsonl?))?$),
601
- complete: [ 'conversation', %w[ save load clean compact ] ],
601
+ regexp: %r(^/conversation\s+(clean|save|load)(\s+-c)?(?:\s+([^-].*\.jsonl?))?$),
602
+ complete: [ 'conversation', %w[ save load clean ] ],
602
603
  options: '[-c] [FILENAME]',
603
604
  help: <<~EOT
604
605
  💾 Save/Load conversation state
605
606
  (-c to clean before saving)
606
607
  FILENAME ends with .json or .jsonl
607
608
  Or clean inplace (removes tool content, images, and thinking)
608
- Or compact (summarize old messages, keep recent)
609
609
  EOT
610
610
  ) do |subcommand,opts,path|
611
611
  if %w[ save load ].include?(subcommand) && path.blank?
@@ -631,18 +631,6 @@ module OllamaChat::Commands
631
631
  else
632
632
  STDOUT.puts 'Cancelled.'
633
633
  end
634
- when 'compact'
635
- if confirm?(
636
- prompt: '🔔 Compact conversation? Old messages will be summarized. (y/n) ',
637
- yes: /\Ay/i
638
- )
639
- then
640
- messages.compact!
641
- session_sync
642
- STDOUT.puts "Conversation compacted."
643
- else
644
- STDOUT.puts 'Cancelled.'
645
- end
646
634
  end
647
635
  :next
648
636
  end
@@ -378,7 +378,6 @@ embedding:
378
378
  batch_size: 100
379
379
  database_filename: null # ':memory:'
380
380
  collection: <%= OC::OLLAMA::CHAT::COLLECTION %>
381
- collection_descriptions: {}
382
381
  found_texts_size: 16384
383
382
  found_texts_count: 10
384
383
  splitter:
@@ -267,7 +267,7 @@ module OllamaChat::RAGHandling
267
267
  update_collection(name.to_s)
268
268
  end
269
269
  STDOUT.puts "✅ Created collection '#{name}'."
270
- log(:info, "Collection created", data: { name: name, description:, patterns: })
270
+ log(:info, "Collection created", data: { name:, description:, patterns: })
271
271
  rescue Sequel::UniqueConstraintViolation
272
272
  STDERR.puts "❌ Collection #{name.inspect} already exists."
273
273
  rescue Sequel::Error => e
@@ -170,7 +170,7 @@ class OllamaChat::Tools::PatchFile
170
170
 
171
171
  (result | {
172
172
  path: path.to_s,
173
- message: message,
173
+ message: ,
174
174
  mtime: ,
175
175
  checksum: ,
176
176
  }).to_json
@@ -1,6 +1,6 @@
1
1
  module OllamaChat
2
2
  # OllamaChat version
3
- VERSION = '0.0.112'
3
+ VERSION = '0.0.113'
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.112 ruby lib
2
+ # stub: ollama_chat 0.0.113 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama_chat".freeze
6
- s.version = "0.0.112".freeze
6
+ s.version = "0.0.113".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]
@@ -532,18 +532,6 @@ describe OllamaChat::Commands, protect_env: true do
532
532
  expect(chat).to receive(:confirm?).and_return false
533
533
  expect(chat.handle_input("/conversation clean")).to eq :next
534
534
  end
535
-
536
- it 'returns :next when input is "/conversation compact"' do
537
- expect(chat).to receive(:confirm?).and_return true
538
- expect(chat.messages).to receive(:compact!)
539
- expect(chat).to receive(:session_sync)
540
- expect(chat.handle_input("/conversation compact")).to eq :next
541
- end
542
-
543
- it 'returns :next when input is "/conversation compact" and user cancels' do
544
- expect(chat).to receive(:confirm?).and_return false
545
- expect(chat.handle_input("/conversation compact")).to eq :next
546
- end
547
535
  end
548
536
 
549
537
  describe 'tools' do
@@ -568,6 +556,22 @@ describe OllamaChat::Commands, protect_env: true do
568
556
  expect(chat).to receive(:display_config)
569
557
  expect(chat.handle_input("/config")).to eq :next
570
558
  end
559
+
560
+ it 'returns :next when input is "/config edit"' do
561
+ expect(chat).to receive(:edit_config)
562
+ expect(chat.handle_input("/config edit")).to eq :next
563
+ end
564
+
565
+ it 'returns :next when input is "/config reload"' do
566
+ expect(chat).to receive(:reload_config)
567
+ expect(chat.handle_input("/config reload")).to eq :next
568
+ end
569
+
570
+ it 'returns :next when input is "/config diff"' do
571
+ expect(chat).to receive(:diff_config)
572
+ expect(chat).to receive(:reload_config)
573
+ expect(chat.handle_input("/config diff")).to eq :next
574
+ end
571
575
  end
572
576
 
573
577
  describe '/quit' do
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.112
4
+ version: 0.0.113
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank