mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
fix(chat): refresh agent list on chat page reactivation
The chat page is kept alive by the router so navigating away and back only fires an activation hook, not a fresh mount. An agent created, edited, or deleted elsewhere (e.g. the employee management page) never reached the chat page's own agent list, and stayed invisible or unselectable in the agent picker until a full page reload forced a fresh mount. The agent list is now refetched on every reactivation.
This commit is contained in:
parent
22a61e6e78
commit
ae62faee4e
@ -1254,6 +1254,12 @@ onActivated(async () => {
|
||||
startECharts()
|
||||
startKatex()
|
||||
startMermaid()
|
||||
// Issue #538: ChatConsole is kept alive by the router (meta.keepAlive), so
|
||||
// navigating away and back only fires onActivated, not onMounted — an
|
||||
// agent created/edited/deleted elsewhere (e.g. the Employees page) never
|
||||
// reached this component's own `agents` list otherwise, and stayed
|
||||
// invisible in the picker until a full page reload forced a fresh mount.
|
||||
await loadAgents()
|
||||
activityPollTimer = window.setInterval(pollActivity, ACTIVITY_POLL_MS)
|
||||
elapsedTickTimer = window.setInterval(() => {
|
||||
if (activeCronRuns.value.length > 0) elapsedNow.value = Date.now()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user