Enha: charlist in cards

This commit is contained in:
Grail Finder
2026-01-21 21:01:01 +03:00
parent 4e597e944e
commit a28e8ef9e2
5 changed files with 38 additions and 14 deletions

7
tui.go
View File

@@ -836,7 +836,7 @@ func init() {
if injectRole {
status = "enabled"
}
if err := notifyUser("injectRole", fmt.Sprintf("Role injection %s", status)); err != nil {
if err := notifyUser("injectRole", "Role injection "+status); err != nil {
logger.Error("failed to send notification", "error", err)
}
updateStatusLine()
@@ -1218,7 +1218,8 @@ func init() {
if cfg.WriteNextMsgAsCompletionAgent != "" {
botPersona = cfg.WriteNextMsgAsCompletionAgent
}
roles := chatBody.ListRoles()
// roles := chatBody.ListRoles()
roles := listChatRoles()
if len(roles) == 0 {
logger.Warn("empty roles in chat")
}
@@ -1229,11 +1230,9 @@ func init() {
if strings.EqualFold(role, botPersona) {
if i == len(roles)-1 {
cfg.WriteNextMsgAsCompletionAgent = roles[0] // reached last, get first
botPersona = cfg.WriteNextMsgAsCompletionAgent
break
}
cfg.WriteNextMsgAsCompletionAgent = roles[i+1] // get next role
botPersona = cfg.WriteNextMsgAsCompletionAgent
// logger.Info("picked role", "roles", roles, "index", i+1)
break
}