Commit ccbf688

mo khan <mo@mokhan.ca>
2026-01-17 06:15:00
refactor: rename tc to tool_call
1 parent f3d4b57
Changed files (1)
lib
elelem
lib/elelem/agent.rb
@@ -54,12 +54,12 @@ module Elelem
 
         break if tool_calls.empty?
 
-        tool_calls.each do |tc|
-          name, args = tc[:name], tc[:arguments]
+        tool_calls.each do |tool_call|
+          name, args = tool_call[:name], tool_call[:arguments]
           terminal.say "\n#{format_tool_display(name, args)}"
           result = truncate(toolbox.run(name, args))
           terminal.say format_tool_result(name, result)
-          ctx << { role: "tool", tool_call_id: tc[:id], content: result.to_json }
+          ctx << { role: "tool", tool_call_id: tool_call[:id], content: result.to_json }
           errors += 1 if result[:error]
         end