Add query bar, maintenance panel, and heartbeat system
- Query bar with organized/grouped search results in portal - Maintenance panel UI for triggering and viewing maintenance status - Heartbeat service with periodic maintenance and dirty-tracking - Query organizer for grouping search results by tag/kind/parent - Slide-up animation for query panel
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { CortexNode, CortexEdge, GraphData, NodeWithConnections, SearchResult, NodeKind, EdgeType } from './types';
|
||||
import type { CortexNode, CortexEdge, GraphData, NodeWithConnections, SearchResult, NodeKind, EdgeType, GroupedQueryResult } from './types';
|
||||
|
||||
const BASE = '/api';
|
||||
|
||||
@@ -41,4 +41,13 @@ export const api = {
|
||||
|
||||
search: (text: string, options?: Record<string, any>) =>
|
||||
request<SearchResult[]>('/search', { method: 'POST', body: JSON.stringify({ text, options }) }),
|
||||
|
||||
queryOrganized: (text: string) =>
|
||||
request<GroupedQueryResult>('/query/organize', { method: 'POST', body: JSON.stringify({ text }) }),
|
||||
|
||||
getMaintenanceStatus: () =>
|
||||
request<Record<string, any>>('/maintenance/status'),
|
||||
|
||||
runMaintenance: () =>
|
||||
request<Record<string, any>>('/maintenance/run', { method: 'POST' }),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user