add Reactions() method to Core interface

This commit is contained in:
ollie 2026-07-27 19:47:16 +02:00
parent af9a22b1db
commit 05524b8aa7
2 changed files with 13 additions and 0 deletions

View File

@ -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)
}

View File

@ -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.