refactor(ui): simplify model button and optimize session index loading

- StatusBar model button: show model name instead of provider, click opens
  settings directly (scrolls to default model section), remove dropdown
- SessionIndexSection: replace N serial pluginQuery calls with single batch
  API (GET /_web/sessions/index-stats), add IntersectionObserver lazy loading
- Full-stack implementation: CLI route, Electron IPC/Worker, frontend adapters

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
diguaandCursor committed 2026-05-31 10:28:29 +08:00
1 parent 783d61f742
commit 9bc0c4279d
15 files changed
+140 -109

No files matched your search

@@ -2,6 +2,10 @@ import type { FastifyInstance } from 'fastify'
import { sessionIndexService, type SessionRuntimeAdapter } from '@openchatlab/node-runtime'
export function registerSessionIndexRoutes(server: FastifyInstance, adapter: SessionRuntimeAdapter): void {
server.get('/_web/sessions/index-stats', async () => {
return sessionIndexService.getAllIndexStats(adapter)
})
server.post<{
Params: { id: string }
Body: { gapThreshold?: number }