feat(home): add AI chat interface with OpenCode integration

This commit is contained in:
2026-03-14 21:53:52 +08:00
parent 88d42b37a6
commit cbc1af7348
17 changed files with 1175 additions and 3 deletions

7
src/lib/utils/uuid.ts Normal file
View 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)
})
}