(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, status ToolStatus)
| 119 | } |
| 120 | |
| 121 | func ToolCallMessage(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, status ToolStatus) *Message { |
| 122 | msg := &Message{ |
| 123 | Type: MessageTypeToolCall, |
| 124 | Sender: agentName, |
| 125 | ToolCall: toolCall, |
| 126 | ToolDefinition: toolDef, |
| 127 | ToolStatus: status, |
| 128 | } |
| 129 | if status == ToolStatusRunning { |
| 130 | now := time.Now() |
| 131 | msg.StartedAt = &now |
| 132 | } |
| 133 | return msg |
| 134 | } |
| 135 | |
| 136 | func (m *Message) AppendToolOutput(output string) { |
| 137 | if output == "" { |