summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-03-21 18:58:13 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-03-21 18:58:13 +0300
commite8f2fe7809b4b63738ad9e11cc589dace072bc0b (patch)
tree121be4eb656829f58cc1fe15f9957d3224cbd88b
parentd05cea050ca8a2028ee0aec0e4def3802c3d56b6 (diff)
fix: initialize Cluedo state when enabled and role is CluedoPlayer
-rw-r--r--bot.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot.go b/bot.go
index 24c2bcf..931e70d 100644
--- a/bot.go
+++ b/bot.go
@@ -415,6 +415,11 @@ func removeThinking(chatBody *models.ChatBody) {
func applyCharCard(cc *models.CharCard) {
cfg.AssistantRole = cc.Role
+ // Initialize Cluedo if enabled and matching role
+ if cfg.EnableCluedo && cc.Role == "CluedoPlayer" {
+ playerOrder = []string{cfg.UserRole, cfg.AssistantRole, cfg.CluedoRole2}
+ cluedoState = extra.CluedoPrepCards(playerOrder)
+ }
history, err := loadAgentsLastChat(cfg.AssistantRole)
if err != nil {
logger.Warn("failed to load last agent chat;", "agent", cc.Role, "err", err)