Merge branch 'dev' into feat/path-to-cortexcpp
This commit is contained in:
commit
c92b809883
@ -47,9 +47,6 @@ async function migrateThemes() {
|
||||
const themes = readdirSync(join(appResourcePath(), 'themes'))
|
||||
for (const theme of themes) {
|
||||
const themePath = join(appResourcePath(), 'themes', theme)
|
||||
if (existsSync(themePath) && !lstatSync(themePath).isDirectory()) {
|
||||
continue
|
||||
}
|
||||
await checkAndMigrateTheme(theme, themePath)
|
||||
}
|
||||
}
|
||||
@ -64,21 +61,11 @@ async function checkAndMigrateTheme(
|
||||
)
|
||||
if (existingTheme) {
|
||||
const desTheme = join(janDataThemesFolder, existingTheme)
|
||||
if (!existsSync(desTheme) || !lstatSync(desTheme).isDirectory()) return
|
||||
|
||||
const desThemeData = JSON.parse(
|
||||
readFileSync(join(desTheme, 'theme.json'), 'utf-8')
|
||||
)
|
||||
const sourceThemeData = JSON.parse(
|
||||
readFileSync(join(sourceThemePath, 'theme.json'), 'utf-8')
|
||||
)
|
||||
if (desThemeData.version !== sourceThemeData.version) {
|
||||
console.debug('Updating theme', existingTheme)
|
||||
rmdirSync(desTheme, { recursive: true })
|
||||
cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), {
|
||||
recursive: true,
|
||||
})
|
||||
}
|
||||
console.debug('Updating theme', existingTheme)
|
||||
rmdirSync(desTheme, { recursive: true })
|
||||
cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), {
|
||||
recursive: true,
|
||||
})
|
||||
} else {
|
||||
console.debug('Adding new theme', sourceThemeName)
|
||||
cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
|
||||
import { extractInferenceParams, extractModelLoadParams } from '@janhq/core'
|
||||
import { Accordion, AccordionItem, Input, Tooltip } from '@janhq/joi'
|
||||
import { Accordion, AccordionItem, Input } from '@janhq/joi'
|
||||
import { useAtomValue, useSetAtom } from 'jotai'
|
||||
import { AlertTriangleIcon, CheckIcon, CopyIcon, InfoIcon } from 'lucide-react'
|
||||
|
||||
@ -95,7 +95,7 @@ const LocalServerRightPanel = () => {
|
||||
<div className="mt-2">
|
||||
<Input
|
||||
value={selectedModel?.id || ''}
|
||||
className="cursor-pointer"
|
||||
className="cursor-pointer text-[hsla(var(--text-secondary))]"
|
||||
readOnly
|
||||
suffixIcon={
|
||||
clipboard.copied ? (
|
||||
@ -104,17 +104,12 @@ const LocalServerRightPanel = () => {
|
||||
className="text-[hsla(var(--success-bg))]"
|
||||
/>
|
||||
) : (
|
||||
<Tooltip
|
||||
trigger={
|
||||
<CopyIcon
|
||||
size={14}
|
||||
className="text-[hsla(var(--text-secondary))]"
|
||||
onClick={() => {
|
||||
clipboard.copy(selectedModel?.id)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
content="Copy Model ID"
|
||||
<CopyIcon
|
||||
size={14}
|
||||
className="cursor-pointer text-[hsla(var(--text-secondary))]"
|
||||
onClick={() => {
|
||||
clipboard.copy(selectedModel?.id)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ const ModelDownloadRow: React.FC<Props> = ({
|
||||
return (
|
||||
<div className="flex flex-col gap-4 rounded border border-[hsla(var(--app-border))] p-3 md:flex-row md:items-center md:justify-between xl:w-full">
|
||||
<div className="flex max-w-[50%] justify-between">
|
||||
<div className="flex">
|
||||
<div className="flex min-w-[280px] max-w-[280px]">
|
||||
{quantization && (
|
||||
<Badge variant="soft" className="mr-1">
|
||||
{quantization}
|
||||
@ -109,9 +109,11 @@ const ModelDownloadRow: React.FC<Props> = ({
|
||||
{fileName}
|
||||
</h1>
|
||||
</div>
|
||||
<Badge theme="secondary" className="hidden md:flex">
|
||||
{toGibibytes(fileSize)}
|
||||
</Badge>
|
||||
<div className="md:min-w-[90px] md:max-w-[90px]">
|
||||
<Badge theme="secondary" className="ml-4 hidden md:flex">
|
||||
{toGibibytes(fileSize)}
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{downloadedModel ? (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user