summaryrefslogtreecommitdiff
path: root/tables.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-07-20 15:57:01 +0300
committerGrail Finder <wohilas@gmail.com>2025-07-20 15:57:01 +0300
commit6c0a290cecf16d96ae95aa8bd3c88fab87bc038d (patch)
treecb429049e5f52eced68ccef2b9f0f8440286d7b5 /tables.go
parente4b8a89f25b1dd2a6ab7a29471e88522c0b08148 (diff)
Fix: new chat from jsonHEADmaster
Diffstat (limited to 'tables.go')
-rw-r--r--tables.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/tables.go b/tables.go
index c4c97b9..ad39396 100644
--- a/tables.go
+++ b/tables.go
@@ -144,13 +144,18 @@ func makeChatTable(chatMap map[string]models.Chat) *tview.Table {
return
}
// Reload card from disk
+ newCard := &models.CharCard{}
newCard, err := pngmeta.ReadCard(cc.FilePath, cfg.UserRole)
if err != nil {
logger.Error("failed to reload charcard", "path", cc.FilePath, "error", err)
- if err := notifyUser("error", "failed to reload card: "+cc.FilePath); err != nil {
- logger.Warn("failed to notify", "error", err)
+ newCard, err = pngmeta.ReadCardJson(cc.FilePath)
+ if err != nil {
+ logger.Error("failed to reload charcard", "path", cc.FilePath, "error", err)
+ if err := notifyUser("error", "failed to reload card: "+cc.FilePath); err != nil {
+ logger.Warn("failed to notify", "error", err)
+ }
+ return
}
- return
}
// Update sysMap with fresh card data
sysMap[agentName] = newCard