Refactor to use hooks (#436)
This commit is contained in:
parent
124efca9a1
commit
cb60f8b143
139 changed files with 8871 additions and 8726 deletions
41
lib/types.ts
41
lib/types.ts
|
|
@ -1,41 +0,0 @@
|
|||
import { CoreMessage } from 'ai'
|
||||
|
||||
export type Message = CoreMessage & {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface Chat extends Record<string, any> {
|
||||
id: string
|
||||
title: string
|
||||
createdAt: Date
|
||||
userId: string
|
||||
path: string
|
||||
messages: Message[]
|
||||
sharePath?: string
|
||||
}
|
||||
|
||||
export type ServerActionResult<Result> = Promise<
|
||||
| Result
|
||||
| {
|
||||
error: string
|
||||
}
|
||||
>
|
||||
|
||||
export interface Session {
|
||||
user: {
|
||||
id: string
|
||||
email: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface AuthResult {
|
||||
type: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface User extends Record<string, any> {
|
||||
id: string
|
||||
email: string
|
||||
password: string
|
||||
salt: string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue