chore: temporary hidden import model (#3270)
This commit is contained in:
parent
91c77eda78
commit
db5d8aba45
@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react'
|
|||||||
|
|
||||||
import { Button, Input } from '@janhq/joi'
|
import { Button, Input } from '@janhq/joi'
|
||||||
import { useSetAtom } from 'jotai'
|
import { useSetAtom } from 'jotai'
|
||||||
import { ImportIcon, SearchIcon } from 'lucide-react'
|
import { SearchIcon } from 'lucide-react'
|
||||||
import { FoldersIcon } from 'lucide-react'
|
import { FoldersIcon } from 'lucide-react'
|
||||||
import { useDebouncedCallback } from 'use-debounce'
|
import { useDebouncedCallback } from 'use-debounce'
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import { toaster } from '@/containers/Toast'
|
|||||||
|
|
||||||
import { useGetHFRepoData } from '@/hooks/useGetHFRepoData'
|
import { useGetHFRepoData } from '@/hooks/useGetHFRepoData'
|
||||||
|
|
||||||
import { setImportModelStageAtom } from '@/hooks/useImportModel'
|
// import { setImportModelStageAtom } from '@/hooks/useImportModel'
|
||||||
|
|
||||||
import { MainViewState, mainViewStateAtom } from '@/helpers/atoms/App.atom'
|
import { MainViewState, mainViewStateAtom } from '@/helpers/atoms/App.atom'
|
||||||
import {
|
import {
|
||||||
@ -28,7 +28,7 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
|
|||||||
const { getHfRepoData } = useGetHFRepoData()
|
const { getHfRepoData } = useGetHFRepoData()
|
||||||
const setMainViewState = useSetAtom(mainViewStateAtom)
|
const setMainViewState = useSetAtom(mainViewStateAtom)
|
||||||
const setSelectedSetting = useSetAtom(selectedSettingAtom)
|
const setSelectedSetting = useSetAtom(selectedSettingAtom)
|
||||||
const setImportModelStage = useSetAtom(setImportModelStageAtom)
|
// const setImportModelStage = useSetAtom(setImportModelStageAtom)
|
||||||
|
|
||||||
const setImportingHuggingFaceRepoData = useSetAtom(
|
const setImportingHuggingFaceRepoData = useSetAtom(
|
||||||
importingHuggingFaceRepoDataAtom
|
importingHuggingFaceRepoDataAtom
|
||||||
@ -37,9 +37,9 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
|
|||||||
importHuggingFaceModelStageAtom
|
importHuggingFaceModelStageAtom
|
||||||
)
|
)
|
||||||
|
|
||||||
const onImportModelClick = useCallback(() => {
|
// const onImportModelClick = useCallback(() => {
|
||||||
setImportModelStage('SELECTING_MODEL')
|
// setImportModelStage('SELECTING_MODEL')
|
||||||
}, [setImportModelStage])
|
// }, [setImportModelStage])
|
||||||
|
|
||||||
const debounced = useDebouncedCallback(async (searchText: string) => {
|
const debounced = useDebouncedCallback(async (searchText: string) => {
|
||||||
if (searchText.indexOf('/') === -1) {
|
if (searchText.indexOf('/') === -1) {
|
||||||
@ -97,14 +97,15 @@ const ModelSearchBar: React.FC<Props> = ({ onSearchChanged }) => {
|
|||||||
<FoldersIcon size={16} />
|
<FoldersIcon size={16} />
|
||||||
<span>My models</span>
|
<span>My models</span>
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{/* Temporary hidden button import model */}
|
||||||
|
{/* <Button
|
||||||
className="flex gap-2 bg-[hsla(var(--app-bg))] text-[hsla(var(--text-primary))]"
|
className="flex gap-2 bg-[hsla(var(--app-bg))] text-[hsla(var(--text-primary))]"
|
||||||
theme="ghost"
|
theme="ghost"
|
||||||
onClick={onImportModelClick}
|
onClick={onImportModelClick}
|
||||||
>
|
>
|
||||||
<ImportIcon size={16} />
|
<ImportIcon size={16} />
|
||||||
<span>Import model</span>
|
<span>Import model</span>
|
||||||
</Button>
|
</Button> */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user