fix: use search/people API (Core Team deployed)

- Remove duplicate search_people case
- Remove search_identities (no longer needed)
- Add search_people response handler
- SearchView already uses search_people
This commit is contained in:
2026-07-25 23:16:59 +08:00
parent 453168f326
commit 2b944cf9d1

View File

@@ -267,16 +267,6 @@ case 'search_keyword': {
if (a.conversationId) body.conversation_id = a.conversationId
return { url: '/api/v1/agents/search', method: 'POST', body }
}
case 'search_identities': {
return { url: `/api/v1/identities/search?q=${encodeURIComponent(a.query)}&limit=${a.limit || 50}`, method: 'GET' }
}
case 'search_people': {
const params = new URLSearchParams()
if (a.query) params.set('query', a.query)
if (a.fileUuid) params.set('file_uuid', a.fileUuid)
if (a.limit) params.set('limit', String(a.limit))
return { url: `/api/v1/search/people?${params.toString()}`, method: 'GET' }
}
// --- Image APIs ---
case 'get_thumbnail': {
@@ -774,6 +764,9 @@ case 'get_unassigned_traces': {
source_type: r.source_type || null,
}))
}
case 'search_people': {
return data || { people: [] }
}
case 'search_identities': {
const results = data.results || data.data || data || []
return results.map((r: any) => ({