refactor: change pointer receivers to value types for Conversation and UserMessage in various structs and functions

This commit is contained in:
mlogclub
2026-04-17 18:48:45 +08:00
parent 976b9defde
commit 51884f1bdf
22 changed files with 63 additions and 115 deletions
@@ -26,17 +26,14 @@ type TriageServiceRequestResult struct {
}
type TriageServiceRequestGraph struct {
conversation *models.Conversation
conversation models.Conversation
}
func NewTriageServiceRequestGraph(conversation *models.Conversation) *TriageServiceRequestGraph {
func NewTriageServiceRequestGraph(conversation models.Conversation) *TriageServiceRequestGraph {
return &TriageServiceRequestGraph{conversation: conversation}
}
func (g *TriageServiceRequestGraph) Run(_ context.Context, argumentsInJSON string) (string, error) {
if g == nil || g.conversation == nil {
return "", fmt.Errorf("triage service request graph not initialized")
}
input, err := g.parseInput(argumentsInJSON)
if err != nil {
return "", err