feat: add chat history MCP tools
Adds save/get/list/delete tools for persisting and retrieving agent chat histories in AMCS. Changes: - migrations/018_chat_histories.sql: new chat_histories table with indexes on session_id, project_id, channel, agent_id, created_at, and FTS over title+summary - internal/types/extensions.go: ChatMessage and ChatHistory types - internal/store/chat_histories.go: SaveChatHistory, GetChatHistory, GetChatHistoryBySessionID, ListChatHistories, DeleteChatHistory - internal/tools/chat_history.go: ChatHistoryTool with four handlers (save_chat_history, get_chat_history, list_chat_histories, delete_chat_history) - internal/mcpserver/server.go: ChatHistory field in ToolSet, registerChatHistoryTools registration function - internal/app/app.go: wire ChatHistoryTool into ToolSet
This commit is contained in:
@@ -187,6 +187,7 @@ func routes(logger *slog.Logger, cfg *config.Config, info buildinfo.Info, db *st
|
||||
Meals: tools.NewMealsTool(db),
|
||||
CRM: tools.NewCRMTool(db),
|
||||
Skills: tools.NewSkillsTool(db, activeProjects),
|
||||
ChatHistory: tools.NewChatHistoryTool(db, activeProjects),
|
||||
}
|
||||
|
||||
mcpHandler, err := mcpserver.New(cfg.MCP, logger, toolSet, activeProjects.Clear)
|
||||
|
||||
Reference in New Issue
Block a user