feat: respuestas como reply de Matrix + presencia online/offline
Añade soporte para que las respuestas de los bots sean replies nativos de Matrix (m.in_reply_to) en lugar de mensajes sueltos. Los clientes Matrix mostrarán el mensaje original citado. Cambios: - EventID en MessageContext para capturar el ID del evento entrante - InReplyTo en ReplyAction para indicar a qué evento responder - SendReplyMarkdown en el cliente Matrix (shell/matrix/client.go) - Runner usa SendReplyMarkdown cuando InReplyTo está presente - runtime.go pasa InReplyTo en todas las respuestas LLM y comandos - SetPresence online al arrancar, offline al apagar (graceful) No se tocan: herramientas, TUI, configuración de agentes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ type MessageContext struct {
|
||||
SenderID string
|
||||
SenderName string
|
||||
RoomID string
|
||||
EventID string // Matrix event ID of the incoming message
|
||||
Content string
|
||||
Command string // parsed command name, e.g. "deploy"
|
||||
Args []string // parsed arguments
|
||||
@@ -47,9 +48,10 @@ type Action struct {
|
||||
}
|
||||
|
||||
type ReplyAction struct {
|
||||
Content string
|
||||
ThreadID string // empty = new thread
|
||||
Reaction string // optional Matrix reaction
|
||||
Content string
|
||||
ThreadID string // empty = new thread
|
||||
InReplyTo string // Matrix event ID to reply to (m.in_reply_to)
|
||||
Reaction string // optional Matrix reaction
|
||||
}
|
||||
|
||||
type LLMAction struct {
|
||||
|
||||
Reference in New Issue
Block a user