diff --git a/pkg/agent/core.go b/pkg/agent/core.go index 1e19dcb..baaf280 100644 --- a/pkg/agent/core.go +++ b/pkg/agent/core.go @@ -607,6 +607,15 @@ func (s *agent) InjectSystemEvent(content string) { s.Queue("\n" + content + "\n") } +func (s *agent) React(emoji string) { + if s.session == nil { + return + } + msg := "[reacted " + emoji + " to your previous response]" + s.session.appendUserMessage(msg) + s.emit(Event{Role: "user", Content: msg}) +} + func (s *agent) AgentName() string { v := s.agentName s.log.Debug("AgentName() = %q", v) diff --git a/pkg/agent/types.go b/pkg/agent/types.go index 2192968..d6e2367 100644 --- a/pkg/agent/types.go +++ b/pkg/agent/types.go @@ -167,6 +167,12 @@ type Core interface { // context and emits it on the event bus. The agent sees it on its next // turn; it appears in the chat log immediately. InjectSystemEvent(content string) + + // React records an emoji reaction to the most recent assistant response. + // The reaction is appended to session history as a lightweight user message + // and emitted to the chat bus, but does NOT trigger a new agent turn. + // The agent sees it as context on its next turn. + React(emoji string) } // DetachedInfo describes a detached process for external consumers.