fix: Library thumbnail guard, Search People/Agent modes, People pagination debug
This commit is contained in:
@@ -78,7 +78,28 @@ async function search() {
|
||||
loading.value = true
|
||||
searched.value = false
|
||||
try {
|
||||
results.value = await invoke('search_llm_smart', { query: query.value, limit: 20 })
|
||||
if (mode.value === 'people') {
|
||||
const result: any = await invoke('search_identities', { query: query.value, limit: 50 })
|
||||
results.value = (Array.isArray(result) ? result : []).map((p: any) => ({
|
||||
file_uuid: p.identity_uuid,
|
||||
file_name: p.name,
|
||||
summary: `Identity - ${p.source}`,
|
||||
similarity: 1.0,
|
||||
start_time: 0,
|
||||
end_time: 0
|
||||
}))
|
||||
} else if (mode.value === 'agent') {
|
||||
results.value = [{
|
||||
file_uuid: '',
|
||||
file_name: 'Agent Mode',
|
||||
summary: 'Agent mode is not yet implemented',
|
||||
similarity: 0,
|
||||
start_time: 0,
|
||||
end_time: 0
|
||||
}]
|
||||
} else {
|
||||
results.value = await invoke('search_llm_smart', { query: query.value, limit: 20 })
|
||||
}
|
||||
searched.value = true
|
||||
} catch (e) {
|
||||
console.error('Search failed:', e)
|
||||
|
||||
Reference in New Issue
Block a user