@@ -717,20 +717,20 @@ func (r *TaskReconciler) reconcileExecuteTools(ctx context.Context, taskID uuid.
717717 return Result {Retry : true }, nil
718718}
719719
720- func (r * TaskReconciler ) callTools (ctx context.Context , task * memory.Task , message * memory.Message ) ([]* ToolResult , map [string ]int64 , error ) {
720+ func (r * TaskReconciler ) callTools (ctx context.Context , task * memory.Task , message * memory.Message ) ([]* tooltypes. ToolResult , map [string ]int64 , error ) {
721721 logger := r .logger .With (
722722 KeyTaskID , task .ID ,
723723 KeyMessageID , message .ID ,
724724 )
725725 LogOperationStart (logger , "call tools" )
726726
727- var toolResults []* ToolResult
727+ var toolResults []* tooltypes. ToolResult
728728 toolStats := make (map [string ]int64 )
729729
730730 for _ , block := range message .Content .Blocks {
731731 switch block .Kind {
732732 case types .MessageBlockKindToolCall :
733- var toolCall ToolCall
733+ var toolCall tooltypes. ToolCall
734734 err := json .Unmarshal ([]byte (block .Payload ), & toolCall )
735735 if err != nil {
736736 logger .ErrorContext (ctx , "failed to unmarshal tool call" , "error" , err )
@@ -764,7 +764,7 @@ func (r *TaskReconciler) callTools(ctx context.Context, task *memory.Task, messa
764764 }
765765
766766 // Create unified ToolResult directly
767- toolResult := & ToolResult {
767+ toolResult := & tooltypes. ToolResult {
768768 Tool : toolCall .Tool ,
769769 Output : & tooltypes.ToolOutput {
770770 Interpreter : & tooltypes.InterpreterOutput {
@@ -774,7 +774,7 @@ func (r *TaskReconciler) callTools(ctx context.Context, task *memory.Task, messa
774774 },
775775 },
776776 Succeeded : err == nil ,
777- Provider : & ProviderData {
777+ Provider : & tooltypes. ProviderData {
778778 Kind : toolCall .Provider .Kind ,
779779 ID : toolCall .Provider .ID ,
780780 },
@@ -801,7 +801,7 @@ func (r *TaskReconciler) callTools(ctx context.Context, task *memory.Task, messa
801801 return toolResults , toolStats , nil
802802}
803803
804- func (r * TaskReconciler ) persistToolResults (ctx context.Context , taskID uuid.UUID , toolResults []* ToolResult , tx * memory.Client ) (* memory.Message , error ) {
804+ func (r * TaskReconciler ) persistToolResults (ctx context.Context , taskID uuid.UUID , toolResults []* tooltypes. ToolResult , tx * memory.Client ) (* memory.Message , error ) {
805805 toolBlocks := make ([]types.MessageBlock , 0 , len (toolResults ))
806806 for _ , toolResult := range toolResults {
807807 jsonResult , err := json .Marshal (toolResult )
@@ -842,7 +842,7 @@ func logInterpreterArgs(ctx context.Context, taskID uuid.UUID, toolID string, ar
842842 logInterpreter (ctx , taskID , toolID , a .Script , "args_interpreter" )
843843}
844844
845- func logInterpreterResult (ctx context.Context , taskID uuid.UUID , toolID string , result * ToolResult ) {
845+ func logInterpreterResult (ctx context.Context , taskID uuid.UUID , toolID string , result * tooltypes. ToolResult ) {
846846 jsonResult , err := json .MarshalIndent (result , "" , " " )
847847 if err != nil {
848848 slog .ErrorContext (ctx , "failed to marshal interpreter result" , "error" , err )
0 commit comments