feat(frontend): add session source filter to sidebar (#1560)

IM-channel sessions were mixed in with the user's own chats. The sidebar
now defaults to web sessions; tenants with a configured IM channel get a
source switcher in the "对话" header to reach a specific platform.

- getSessionsList: optional `source` query param
- getMessageList: token-guarded loads (racing source switches / route
  changes can't append stale rows) + per-source pagination reset
- SourceSwitcherDropdown: scope dropdown mirroring KBSwitcherDropdown,
  scales to many platforms, reuses platform logos, closes on select
- empty state when a source has no sessions
- pure logic in sessionSourceFilter.ts with unit tests; zh/en/ko/ru i18n
This commit is contained in:
nullkey
2026-06-10 16:42:31 +08:00
committed by lyingbug
parent 232280d959
commit ac84dacc00
9 changed files with 398 additions and 8 deletions
+2
View File
@@ -27,6 +27,8 @@ export default {
collapseSidebar: 'Collapse Sidebar',
expandSidebar: 'Expand Sidebar',
logoutSuccess: 'Logged out successfully',
myChats: 'My chats',
noSessions: 'No conversations yet',
},
newUserGuide: {
stepOf: '{current} / {total}',