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:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user