move lightrag_webui folder to top directory

This commit is contained in:
ArnoChen
2025-02-13 17:29:51 +08:00
parent c50c581767
commit 85e6989abc
52 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { ButtonVariantType } from '@/components/ui/Button'
export const backendBaseUrl = ''
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 = 20
export const minNodeSize = 4
export const maxNodeSize = 20
export const healthCheckInterval = 15 // seconds
export const defaultQueryLabel = '*'

View File

@@ -0,0 +1,34 @@
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
import { StoreApi, UseBoundStore } from 'zustand'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function randomColor() {
const digits = '0123456789abcdef'
let code = '#'
for (let i = 0; i < 6; i++) {
code += digits.charAt(Math.floor(Math.random() * 16))
}
return code
}
export function errorMessage(error: any) {
return error instanceof Error ? error.message : `${error}`
}
type WithSelectors<S> = S extends { getState: () => infer T }
? S & { use: { [K in keyof T]: () => T[K] } }
: never
export const createSelectors = <S extends UseBoundStore<StoreApi<object>>>(_store: S) => {
const store = _store as WithSelectors<typeof _store>
store.use = {}
for (const k of Object.keys(store.getState())) {
;(store.use as any)[k] = () => store((s) => s[k as keyof typeof s])
}
return store
}