Merge pull request #4226 from janhq/chore/hide-vulkan-option-when-there-is-no-gpu-detected
fix: hide Vulkan option for users who don't have GPU
This commit is contained in:
commit
41e0d4cddc
@ -4,6 +4,8 @@ import { PropsWithChildren } from 'react'
|
||||
|
||||
import { Provider, atom } from 'jotai'
|
||||
|
||||
import { FileInfo } from '@/types/file'
|
||||
|
||||
export const editPromptAtom = atom<string>('')
|
||||
export const currentPromptAtom = atom<string>('')
|
||||
export const fileUploadAtom = atom<FileInfo[]>([])
|
||||
@ -15,10 +17,3 @@ export const selectedTextAtom = atom('')
|
||||
export default function JotaiWrapper({ children }: PropsWithChildren) {
|
||||
return <Provider>{children}</Provider>
|
||||
}
|
||||
|
||||
export type FileType = 'image' | 'pdf'
|
||||
|
||||
export type FileInfo = {
|
||||
file: File
|
||||
type: FileType
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ const Advanced = () => {
|
||||
)}
|
||||
|
||||
{/* Vulkan for AMD GPU/ APU and Intel Arc GPU */}
|
||||
{!isMac && experimentalEnabled && (
|
||||
{!isMac && gpuList.length > 0 && experimentalEnabled && (
|
||||
<div className="flex w-full flex-col items-start justify-between gap-4 border-b border-[hsla(var(--app-border))] py-4 first:pt-0 last:border-none sm:flex-row">
|
||||
<div className="space-y-1">
|
||||
<div className="flex gap-x-2">
|
||||
|
||||
6
web/types/file.d.ts
vendored
Normal file
6
web/types/file.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export type FileType = 'image' | 'pdf'
|
||||
|
||||
export type FileInfo = {
|
||||
file: File
|
||||
type: FileType
|
||||
}
|
||||
@ -13,10 +13,10 @@ import {
|
||||
} from '@janhq/core'
|
||||
import { ulid } from 'ulidx'
|
||||
|
||||
import { FileType } from '@/containers/Providers/Jotai'
|
||||
|
||||
import { Stack } from '@/utils/Stack'
|
||||
|
||||
import { FileType } from '@/types/file'
|
||||
|
||||
export class MessageRequestBuilder {
|
||||
msgId: string
|
||||
type: MessageRequestType
|
||||
|
||||
@ -6,10 +6,10 @@ import {
|
||||
ThreadMessage,
|
||||
} from '@janhq/core'
|
||||
|
||||
import { FileInfo } from '@/containers/Providers/Jotai'
|
||||
|
||||
import { MessageRequestBuilder } from './messageRequestBuilder'
|
||||
|
||||
import { FileInfo } from '@/types/file'
|
||||
|
||||
export class ThreadMessageBuilder {
|
||||
messageRequest: MessageRequestBuilder
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user