fix(integrations): polish agent filter UX and embed session rebind

Add compact agent filter beside channel list titles with selected name
display, fix embed localStorage agentId read on rebind, add IM agent
rebind tests, and deep-link agent editor counts to the matching tab.
This commit is contained in:
wizardchen
2026-06-24 20:08:14 +08:00
committed by lyingbug
parent ec5c3ac638
commit babe3f2315
11 changed files with 309 additions and 120 deletions
+6 -1
View File
@@ -33,7 +33,12 @@ function readStoredSession(channelId: string): StoredSession | null {
if (!raw) return null
const parsed = JSON.parse(raw)
if (parsed && typeof parsed.id === 'string' && typeof parsed.sig === 'string' && parsed.id) {
return { id: parsed.id, sig: parsed.sig }
const agentId = typeof parsed.agentId === 'string' ? parsed.agentId.trim() : ''
return {
id: parsed.id,
sig: parsed.sig,
...(agentId ? { agentId } : {}),
}
}
} catch {
// Malformed / legacy (plain-string) entry: ignore so a fresh signed