diff --git a/pkg/agent/core.go b/pkg/agent/core.go index 64695f3..3698bf9 100644 --- a/pkg/agent/core.go +++ b/pkg/agent/core.go @@ -639,6 +639,17 @@ func classifyReaction(emoji string) (category, description string, positive bool } } +func (s *agent) Reactions() map[string]string { + result := make(map[string]string) + if s.session == nil { + return result + } + for _, reaction := range s.session.Reactions { + result[reaction.ResponseID] = reaction.Emoji + } + return result +} + func (s *agent) React(emoji string) { _ = s.ReactTo("", emoji) } diff --git a/pkg/agent/types.go b/pkg/agent/types.go index 29bb33d..9f5fdb2 100644 --- a/pkg/agent/types.go +++ b/pkg/agent/types.go @@ -173,6 +173,8 @@ type Core interface { React(emoji string) // ReactTo records an emoji reaction to a specific assistant response. ReactTo(responseID, emoji string) error + // Reactions returns the current response ID to emoji mapping. + Reactions() map[string]string } // DetachedInfo describes a detached process for external consumers.