feat(search): add structured filters to AI session list endpoint and frontend
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,8 +43,23 @@ export const aiSessionsApi = {
|
||||
return response.data
|
||||
},
|
||||
|
||||
async listSessions(params?: { status?: string; skip?: number; limit?: number }): Promise<AISessionSummary[]> {
|
||||
const response = await apiClient.get<AISessionSummary[]>('/ai-sessions', { params })
|
||||
async listSessions(params?: {
|
||||
status?: string
|
||||
skip?: number
|
||||
limit?: number
|
||||
problem_domain?: string
|
||||
matched_flow_id?: string
|
||||
confidence_tier?: string
|
||||
ticket_id?: string
|
||||
date_from?: string
|
||||
date_to?: string
|
||||
q?: string
|
||||
}): Promise<AISessionSummary[]> {
|
||||
// Strip empty string values so they aren't sent as empty query params
|
||||
const cleanParams = params
|
||||
? Object.fromEntries(Object.entries(params).filter(([, v]) => v !== '' && v !== undefined))
|
||||
: undefined
|
||||
const response = await apiClient.get<AISessionSummary[]>('/ai-sessions', { params: cleanParams })
|
||||
return response.data
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user