Remove outdated plans and implement new features for bot tools, memory, interaction, avatar management, and cron scheduling
- Deleted old plan files for bot memory, interaction, avatar, and cron. - Added new task files for bot tools, memory, interaction, avatar, and cron scheduling with detailed designs and implementation notes. - Updated `agents/runtime.go` to support memory clearing and message deletion from SQLite. - Created necessary shell and package files for implementing bot tools and cron scheduling functionalities.
This commit is contained in:
@@ -5,7 +5,7 @@ Que cada bot recuerde conversaciones anteriores, hechos importantes sobre usuari
|
||||
y contexto de salas. Memoria a corto plazo (ventana de conversación) y largo plazo
|
||||
(SQLite persistente).
|
||||
|
||||
## Estado: pendiente
|
||||
## Estado: completado ✓
|
||||
|
||||
---
|
||||
|
||||
+11
-2
@@ -51,11 +51,20 @@ type Agent struct {
|
||||
roomCtx *tools.RoomContext
|
||||
}
|
||||
|
||||
// ClearWindow resets the conversation window for a room. Implements tools.WindowClearer.
|
||||
// ClearWindow resets the conversation window for a room and deletes persisted
|
||||
// messages from SQLite so the agent starts fresh. Implements tools.WindowClearer.
|
||||
func (a *Agent) ClearWindow(roomID string) {
|
||||
a.windowsMu.Lock()
|
||||
defer a.windowsMu.Unlock()
|
||||
a.windows[roomID] = memory.NewWindow(a.windowSize)
|
||||
a.windowsMu.Unlock()
|
||||
|
||||
if a.memStore != nil {
|
||||
if err := a.memStore.DeleteMessages(
|
||||
context.Background(), a.cfg.Agent.ID, &roomID,
|
||||
); err != nil {
|
||||
a.logger.Warn("failed to delete persisted messages on clear", "room", roomID, "err", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// New assembles an Agent from its config, rules, and logger.
|
||||
|
||||
Reference in New Issue
Block a user