Commit c49ed6b

mo khan <mo@mokhan.ca>
2026-03-11 21:15:53
refactor: rename tool_call event to doing
1 parent 4ed703d
Changed files (1)
lib
lib/elelem/openai.rb
@@ -74,13 +74,11 @@ module Elelem
 
       def finalize_tool_calls(tool_calls, &block)
         tool_calls.values.map do |tool_call|
-          result = {
+          {
             id: tool_call[:id],
             name: tool_call[:name],
             arguments: JSON.parse(tool_call[:args])
-          }
-          block.call(type: "tool_call", **result)
-          result
+          }.tap { |result| block.call(result.merge(type: "doing")) }
         end
       end
     end