LightRAG/lightrag_webui/src/lib/constants.ts
2025-08-19 16:23:05 +08:00

76 lines
2.4 KiB
TypeScript

import { ButtonVariantType } from '@/components/ui/Button'
export const backendBaseUrl = ''
export const webuiPrefix = '/webui/'
export const controlButtonVariant: ButtonVariantType = 'ghost'
export const labelColorDarkTheme = '#B2EBF2'
export const LabelColorHighlightedDarkTheme = '#000'
export const nodeColorDisabled = '#E2E2E2'
export const nodeBorderColor = '#EEEEEE'
export const nodeBorderColorSelected = '#F57F17'
export const edgeColorDarkTheme = '#969696'
export const edgeColorSelected = '#F57F17'
export const edgeColorHighlighted = '#B2EBF2'
export const searchResultLimit = 50
export const labelListLimit = 100
export const minNodeSize = 4
export const maxNodeSize = 20
export const healthCheckInterval = 15 // seconds
export const defaultQueryLabel = '*'
// reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types
export const supportedFileTypes = {
'text/plain': [
'.txt',
'.md',
'.rtf', //# Rich Text Format
'.odt', // # OpenDocument Text
'.tex', // # LaTeX
'.epub', // # Electronic Publication
'.html', // # HyperText Markup Language
'.htm', // # HyperText Markup Language
'.csv', // # Comma-Separated Values
'.json', // # JavaScript Object Notation
'.xml', // # eXtensible Markup Language
'.yaml', // # YAML Ain't Markup Language
'.yml', // # YAML
'.log', // # Log files
'.conf', // # Configuration files
'.ini', // # Initialization files
'.properties', // # Java properties files
'.sql', // # SQL scripts
'.bat', // # Batch files
'.sh', // # Shell scripts
'.c', // # C source code
'.cpp', // # C++ source code
'.py', // # Python source code
'.java', // # Java source code
'.js', // # JavaScript source code
'.ts', // # TypeScript source code
'.swift', // # Swift source code
'.go', // # Go source code
'.rb', // # Ruby source code
'.php', // # PHP source code
'.css', // # Cascading Style Sheets
'.scss', //# Sassy CSS
'.less'
],
'application/pdf': ['.pdf'],
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': ['.docx'],
'application/vnd.openxmlformats-officedocument.presentationml.presentation': ['.pptx'],
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['.xlsx']
}
export const SiteInfo = {
name: 'LightRAG',
home: '/',
github: 'https://github.com/HKUDS/LightRAG'
}