fix: preserve explicit tool response content
This commit is contained in:
parent
f6ab1e2366
commit
43a0ba6266
1 changed files with 109 additions and 20 deletions
|
|
@ -16,6 +16,12 @@ module MCP
|
|||
refute response.error?
|
||||
end
|
||||
|
||||
test "#content_provided? distinguishes empty content from omitted or nil content" do
|
||||
assert Response.new([]).content_provided?
|
||||
refute Response.new.content_provided?
|
||||
refute Response.new(nil).content_provided?
|
||||
end
|
||||
|
||||
test "#initialize with content and error set to true" do
|
||||
content = [{
|
||||
type: "text",
|
||||
|
|
|
|||
Loading…
Reference in a new issue