feat(server,web): DB-served session list, CLI-session visibility toggle, and sidebar group paging (#158)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-08-03 13:51:14 +08:00
committed by GitHub
parent e6a58ac131
commit aeffc8a02f
16 changed files with 359 additions and 42 deletions
+10 -2
View File
@@ -221,12 +221,20 @@ export const getAgentTraces = (projectId: string, agentId: string) =>
export const listSessions = (
projectId: string,
agentId: string,
opts?: { offset: number; limit: number; category?: SessionCategory; withCounts?: boolean },
opts?: {
offset: number;
limit: number;
category?: SessionCategory;
withCounts?: boolean;
/** Also list CLI-created Sessions (Trace discovery + adoption); default = web rows straight from the DB. */
cli?: boolean;
},
) => {
const qs = opts
? `?limit=${opts.limit}&offset=${opts.offset}` +
(opts.category ? `&category=${opts.category}` : "") +
(opts.withCounts ? "&counts=1" : "")
(opts.withCounts ? "&counts=1" : "") +
(opts.cli ? "&cli=1" : "")
: "";
return apiFetch<SessionsResponse>(
`/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}/sessions${qs}`,