refactor: change pointer receivers to value types for Conversation and UserMessage in various structs and functions
This commit is contained in:
@@ -2,7 +2,6 @@ package tools
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"cs-agent/internal/ai/runtime/graphs"
|
||||
"cs-agent/internal/ai/runtime/registry"
|
||||
@@ -16,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
type HandoffGraphTool struct {
|
||||
conversation *models.Conversation
|
||||
conversation models.Conversation
|
||||
aiAgent models.AIAgent
|
||||
}
|
||||
|
||||
@@ -75,8 +74,5 @@ func (t *HandoffGraphTool) Info(ctx context.Context) (*schema.ToolInfo, error) {
|
||||
}
|
||||
|
||||
func (t *HandoffGraphTool) InvokableRun(ctx context.Context, argumentsInJSON string, opts ...einotool.Option) (string, error) {
|
||||
if t == nil || t.conversation == nil {
|
||||
return "", fmt.Errorf("handoff graph tool not initialized")
|
||||
}
|
||||
return graphs.NewHandoffGraph(t.conversation, t.aiAgent).Run(ctx, argumentsInJSON)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user