3d9b76cea4
Check Cross-Plugin Imports / check (push) Has been cancelled
- SPIKE-E: FTS+Vector+Permission benchmark on 10k records (all <30ms) - E-PROV: supports_fts/vector/rag/graph capability flags on all providers - E-FTS/VEC: All 11 providers refactored to BaseSearchProvider with permission filtering - E-PERM: Over-fetch strategy for vector+permission (15x faster than ANY() filter) - E-FUSE: rrf_fusion_multi() for N-way RRF over FTS+Vector+RAG+Graph - E-LLM: Query understanding cleaned up to use central llm_complete() - E-CHUNK: Document chunking module + document_chunks table with HNSW index - E-EMB: Chunk embedding ARQ jobs (index_file_chunks, reindex_chunks) - E-RAG: RAG retrieval via FileSearchProvider.search_rag() - E-GRAPH: GraphRAG BFS traversal via GraphRAGSearchProvider.search_graph() - E-IX-EVT: Auto-indexing via outbox events + delete/cleanup handlers - E-IX-RE: Batch reindex with progress tracking + reindex_all job - E-DATA-LIFE: Lifecycle module (remove/rebuild/restore/correct) + API endpoints - E-K-MEM: AgentMemorySearchProvider - E-P-AI: AIChatSearchProvider - E-P-WF: WorkflowSearchProvider - E-P-COMM: ConversationSearchProvider verified (already on BaseSearchProvider) - E-API: Filter params (date_from/to, tags, sort) + /facets endpoint - E-TOOL: unified_search AI tool registered in ToolRegistry - E-MCP: Search tool in MCP server with normal RBAC/tenant checks - E-UI-CMD: CommandPalette (Cmd+K) with debounced search + recent searches - E-UI-FAC: SearchFacets, SearchResultCard, SavedSearches components - E-TEST: 40 new tests in test_unified_search_phase_e.py (105 total green) - E-DOC: api-documentation.md, plugin-development-guide.md, test-strategy.md updated 105 tests passing, TypeScript clean.
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
/**
|
|
* hooks.ts — Re-Export Hub (Company hooks removed in Phase 1C)
|
|
*
|
|
* This file re-exports all hooks from their dedicated modules so that
|
|
* existing imports `from '@/api/hooks'` continue to work without change.
|
|
*/
|
|
|
|
import { useQuery } from '@tanstack/react-query';
|
|
|
|
// ── Re-exports from dedicated modules ──
|
|
export * from './types';
|
|
export * from './auth';
|
|
export * from './users';
|
|
export * from './contacts';
|
|
export * from './roles';
|
|
export * from './groups';
|
|
export * from './audit';
|
|
export * from './notifications';
|
|
export * from './plugins';
|
|
export * from './settings';
|
|
export * from './attachments';
|
|
export * from './unifiedContacts';
|
|
export * from './automation';
|
|
|
|
// ── Search hook (uses dynamic import, kept inline) ──
|
|
|
|
import type { SearchFilters, SearchResult } from './search';
|
|
export type { SearchResult, SearchFilters };
|
|
|
|
export function useGlobalSearch(query: string, filters: SearchFilters = {}) {
|
|
return useQuery({
|
|
queryKey: ['globalSearch', query, filters],
|
|
queryFn: async (): Promise<SearchResult[]> => {
|
|
if (!query.trim()) return [];
|
|
const { search } = await import('@/api/search');
|
|
const response = await search(query, filters, 20);
|
|
return response.results || [];
|
|
},
|
|
enabled: query.trim().length > 0,
|
|
staleTime: 30 * 1000,
|
|
});
|
|
}
|