ask-agent 0.40.9 → 0.40.10

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: a359cbc4d9b9cb872780d7ea61081960576790bfa72f332ba8c7c1b14b9387b1
4
- data.tar.gz: 6120ef23326f8c41dcbb96b52eb80569e2f3c8501434ac860b943cb9bac9efff
3
+ metadata.gz: 3b1f24d900a8eeb212125edd14924ad692bbe1785ef40e655add9515f81ecc6e
4
+ data.tar.gz: 5075ad352f945ede68e998a4b0984c35da209bbaaae50e32f3749e3997569d93
5
5
  SHA512:
6
- metadata.gz: d5b3de915cf2b026bff7d8fccbac92bf217aff092359792e3449cdd4e8383d8bf729270144cc7bd9c166313afb17f66cbde76a8e4b63ee4759605d9608b1c15b
7
- data.tar.gz: 2eca3c640b8a433f5773f82eaaee2bb78bf197f1f812a84713ddce88f6ab0b8166c7a096a9e20d9dac60f14769659f17b8a1487de98ba55401729a9e42885f7b
6
+ metadata.gz: 5895d26572bdbf1950179d8e43384b169d5a7b1cbfdb054bd858dd14262b93fffcfbdb15ec48779d2277664daa72d3737b77d230865a9fe5e87b1044e47e0371
7
+ data.tar.gz: 8dd6a12185ca7a3e4b623584a0331129477a230d00551d15a0d6637da49c44ee30d3b6651256c36e91a424abf150dfbeb9f3082b0be15905f7b4b7085a12c97f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.40.10] — 2026-09-05
2
+
3
+ ### Fixed
4
+
5
+ - **`Chat#ask` no longer appends an empty user message for blank input.** The guard `if message || attachments` passed for empty strings (truthy in Ruby), so tool-result follow-ups (`Session#run_follow_up` → `ask("")`) sent `{"role":"user","content":""}`. Strict OpenAI-compatible gateways (e.g. Command Code / LiteLLM) reject it with 400 "user message must have content". Blank messages are now skipped (whitespace-only included); attachments-only asks are unchanged.
6
+
1
7
  ## [0.40.0] — 2026-08-10
2
8
 
3
9
  ### Fixed
@@ -55,7 +55,13 @@ module Ask
55
55
 
56
56
  def ask(message = nil, attachments: nil, &block)
57
57
  validate_attachment_modalities!(attachments)
58
- @messages << Ask::Message.new(role: :user, content: merge_attachments(message, attachments)) if message || attachments
58
+ # Blank messages carry no content and strict OpenAI-compatible
59
+ # gateways reject `{"role":"user","content":""}` with 400
60
+ # ("user message must have content"). Skip them so tool-result
61
+ # follow-ups (Session#run_follow_up → ask("")) call the LLM with
62
+ # the existing history only.
63
+ has_message = message && !message.to_s.strip.empty?
64
+ @messages << Ask::Message.new(role: :user, content: merge_attachments(message, attachments)) if has_message || attachments
59
65
 
60
66
  stream = block_given?
61
67
  tool_defs = @tools.map { |t| Ask::ToolDef.from_tool(t) }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.40.9"
5
+ VERSION = "0.40.10"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.9
4
+ version: 0.40.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto