feat: add Status and RagChat pages with corresponding components and styles
- Created StatusPage component with system stats, configuration, and indexed documents overview. - Added RagChatPage component for chat functionality. - Introduced global CSS styles for light and dark themes, including utility classes and animations. - Defined TypeScript types for compliance, documents, and themes. - Configured Tailwind CSS for dynamic theming and custom animations. - Set up TypeScript configuration for app and node environments. - Initialized Vite configuration for React project.
This commit is contained in:
34
src/types/doc.ts
Normal file
34
src/types/doc.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
// Document types
|
||||
export interface Doc {
|
||||
id: number;
|
||||
name: string;
|
||||
chunks: number;
|
||||
size: string;
|
||||
status: 'indexed' | 'parsing' | 'pending';
|
||||
}
|
||||
|
||||
// Search result types
|
||||
export interface SearchResult {
|
||||
id: number;
|
||||
score: number;
|
||||
law: string;
|
||||
preview: string;
|
||||
source: string;
|
||||
}
|
||||
|
||||
// Chat message types
|
||||
export interface ChatMessage {
|
||||
id: number;
|
||||
role: 'user' | 'assistant';
|
||||
content: string;
|
||||
retrievalIds?: number[];
|
||||
}
|
||||
|
||||
// Retrieval data types
|
||||
export interface RetrievalData {
|
||||
id: number;
|
||||
file: string;
|
||||
clause: string;
|
||||
score: number;
|
||||
content: string;
|
||||
}
|
||||
Reference in New Issue
Block a user