Handle current OpenCode stream completion
Test / test (3.2) (push) Failing after 1s
Test / test (3.3) (push) Failing after 1s
Test / test (3.4) (push) Failing after 0s
Test / test (3.2) (push) Failing after 1s
Test / test (3.3) (push) Failing after 1s
Test / test (3.4) (push) Failing after 0s
This commit is contained in:
1 parent
8dbd3de81c
commit
2e866a618b
6 files changed
+125
-16
No files matched your search
@@ -27,7 +27,7 @@ module Opencode
|
||||
def self.extract_tool_summary(response_body)
|
||||
parts = response_body[:parts] || []
|
||||
parts
|
||||
.select { |p| p[:type] == "tool" && p.dig(:state, :status).in?(TERMINAL_STATUSES) }
|
||||
.select { |p| p[:type] == "tool" && TERMINAL_STATUSES.include?(p.dig(:state, :status)) }
|
||||
.map { |p| build_tool_summary(p) }
|
||||
end
|
||||
|
||||
@@ -42,7 +42,7 @@ module Opencode
|
||||
{ "type" => "reasoning", "content" => part[:text] }
|
||||
when "tool"
|
||||
status = part.dig(:state, :status)
|
||||
next unless status.in?(TERMINAL_STATUSES)
|
||||
next unless TERMINAL_STATUSES.include?(status)
|
||||
|
||||
build_tool_summary(part)
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user