fix(web): currentPersona 稳定加载——不再因 mount 时无 token/一次失败就退回默认头像
- useAppStore.partialize 持久化 currentPersona:刷新后保持本角色头像/背景 - App.tsx:token 出现即重拉 + 失败 3s 重试,替代一次性 mount 拉取 - 红线:仍只显示当前角色自己的头像/背景,绝不 fallback 其它角色
This commit is contained in:
1 parent
ba8ff835cd
commit
c42aae7797
2 files changed
+31
-13
No files matched your search
@@ -256,6 +256,10 @@ export const useAppStore = create<AppStore>()(
|
||||
mood: s.mood,
|
||||
context: s.context,
|
||||
backthink: s.backthink,
|
||||
// Persist the resolved persona so a refresh keeps showing THIS persona's
|
||||
// own avatar/background — never falling back to a neutral placeholder or
|
||||
// (worse) another role's image because the mount-time fetch missed.
|
||||
currentPersona: s.currentPersona,
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user