ollama_chat 0.0.44 → 0.0.45

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: d0c9a525754d546b6d7cd0fa88e20c4767bd1dae51313d1f2c2409c06762f4b0
4
- data.tar.gz: fc9ddde83495908f965c9225246b6668b01c40fe7391fb83c54beb3ce46321d2
3
+ metadata.gz: 2cea88b35f4e6aec1cc59628b482483af5b8cb692a07a7a0f44c5a0b0c379e84
4
+ data.tar.gz: dccc2ea134cbc9c34b0c2484d265e69fb3bec7b313893f0a7692a4ec5aab4079
5
5
  SHA512:
6
- metadata.gz: 97dc5c42b59b3f0d7abf50a0647ff3a3c79681e88e4e9b61c37f706fadc450731ed0240795362e6a061f07ada56502934f5992e796c602b01c27f3b20e6c575f
7
- data.tar.gz: 34c1f4dded9b54155b407913290354707cb63104b3ea126ca438a245d03458ee868962068f85398954cf6be0ff17f826bdc627985168817d55642cb231732459
6
+ metadata.gz: 8670b04279892f1da316908e5df1f15c10adfc3dc6e2b727a0a4debabc35d0083b697c442815d90d1078c214f67d0654e2f6ddf5ce3293fc0b63ad273ef14632
7
+ data.tar.gz: 461308bbd61624f130cc5090421197e0573b40d1516d383f4973179259c66b652163be5976fd9400a51cfe17a271450727527c97b9bd81d1168d7ff974f4c619
data/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-12-10 v0.0.45
4
+
5
+ - Enhanced `OllamaChat::FollowChat` class output formatting
6
+ - Made `display_formatted_terminal_output` method accept optional output parameter
7
+ - Improved handling of chomping content and thinking text to prevent trailing whitespace
8
+ - Properly routed markdown vs non-markdown output through correct display methods
9
+ - Added extra blank line before evaluation statistics for better visual separation
10
+ - Updated bundle command to include --all flag
11
+
3
12
  ## 2025-12-10 v0.0.44
4
13
 
5
14
  - Fixed `stream` option in `spec/ollama_chat/follow_chat_spec.rb` from `on?
@@ -161,7 +161,7 @@ class OllamaChat::FollowChat
161
161
  content = talk_annotate { content }
162
162
  @chat.think? and thinking = think_annotate { thinking }
163
163
  end
164
- return content, thinking
164
+ return content&.chomp, thinking&.chomp
165
165
  end
166
166
 
167
167
  # The last_message_with_user method constructs a formatted message array by
@@ -183,8 +183,9 @@ class OllamaChat::FollowChat
183
183
  # move home commands. The method takes into account whether markdown and
184
184
  # thinking modes are enabled to determine how to process and display the
185
185
  # content.
186
- def display_formatted_terminal_output
187
- @output.print(*([ clear_screen, move_home, *last_message_with_user ].compact))
186
+ def display_formatted_terminal_output(output = nil)
187
+ output ||= @output
188
+ output.print(*([ clear_screen, move_home, *last_message_with_user ].compact))
188
189
  end
189
190
 
190
191
  # The display_output method shows the last message in the conversation.
@@ -197,7 +198,11 @@ class OllamaChat::FollowChat
197
198
  # performed.
198
199
  def display_output
199
200
  @messages.use_pager do |output|
200
- output.print(*last_message_with_user)
201
+ if @chat.markdown.on?
202
+ display_formatted_terminal_output(output)
203
+ else
204
+ output.print(*last_message_with_user)
205
+ end
201
206
  end
202
207
  end
203
208
 
@@ -233,7 +238,7 @@ class OllamaChat::FollowChat
233
238
  # @param response [ Object ] the response object containing evaluation data
234
239
  def output_eval_stats(response)
235
240
  response.done or return
236
- @output.puts "", eval_stats(response)
241
+ @output.puts "", "", eval_stats(response)
237
242
  end
238
243
 
239
244
  # The debug_output method conditionally outputs the response object using jj
@@ -1,6 +1,6 @@
1
1
  module OllamaChat
2
2
  # OllamaChat version
3
- VERSION = '0.0.44'
3
+ VERSION = '0.0.45'
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.44 ruby lib
2
+ # stub: ollama_chat 0.0.45 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama_chat".freeze
6
- s.version = "0.0.44".freeze
6
+ s.version = "0.0.45".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.44
4
+ version: 0.0.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank