NamH f36d740b1e
feat: add quick ask (#2197)
* feat: add quick ask

Signed-off-by: James <james@jan.ai>

---------

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
Co-authored-by: Louis <louis@jan.ai>
2024-03-08 10:01:37 +07:00

30 lines
686 B
TypeScript

'use client'
import { ReactNode } from 'react'
import { Provider, atom } from 'jotai'
type Props = {
children: ReactNode
}
export const editPromptAtom = atom<string>('')
export const currentPromptAtom = atom<string>('')
export const fileUploadAtom = atom<FileInfo[]>([])
export const appDownloadProgress = atom<number>(-1)
export const updateVersionError = atom<string | undefined>(undefined)
export const searchAtom = atom<string>('')
export const selectedTextAtom = atom('')
export default function JotaiWrapper({ children }: Props) {
return <Provider>{children}</Provider>
}
export type FileType = 'image' | 'pdf'
export type FileInfo = {
file: File
type: FileType
}