feat(home): add AI chat interface with OpenCode integration
This commit is contained in:
6
src/lib/utils/cn.ts
Normal file
6
src/lib/utils/cn.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { type ClassValue, clsx } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
@@ -3,3 +3,5 @@ export { resolveImagePath } from './images'
|
||||
export { stripMarkdown, generateHeadingId, extractLocalImagePathsFromMarkdown } from './markdown'
|
||||
export type { TOCItem } from './markdown'
|
||||
export { generatePrintHtml } from './print'
|
||||
export { cn } from './cn'
|
||||
export { generateUUID } from './uuid'
|
||||
|
||||
7
src/lib/utils/uuid.ts
Normal file
7
src/lib/utils/uuid.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function generateUUID(): string {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
const r = (Math.random() * 16) | 0
|
||||
const v = c === 'x' ? r : (r & 0x3) | 0x8
|
||||
return v.toString(16)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user