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 +4 -4
- data/CHANGES.md +11 -0
- data/lib/ollama_chat/clipboard.rb +1 -1
- data/lib/ollama_chat/commands.rb +3 -15
- data/lib/ollama_chat/ollama_chat_config/default_config.yml +0 -1
- data/lib/ollama_chat/rag_handling.rb +1 -1
- data/lib/ollama_chat/tools/patch_file.rb +1 -1
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +2 -2
- data/spec/ollama_chat/commands_spec.rb +16 -12
- 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: e618b797bf1b5fa84728816e06b83fe3540424b48256ba107deb29c2beb8a219
|
|
4
|
+
data.tar.gz: f5abee2701f3fc6d7ba09513f0b0bd5133c7ec10ddb511ee5ea4238c14f9988e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
data/lib/ollama_chat/commands.rb
CHANGED
|
@@ -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|
|
|
601
|
-
complete: [ 'conversation', %w[ save load clean
|
|
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
|
|
@@ -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
|
|
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
|
data/lib/ollama_chat/version.rb
CHANGED
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.113 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.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
|