chore: deprecate preserve thread settings (#3654)

This commit is contained in:
Louis 2024-09-13 15:05:50 +07:00 committed by GitHub
parent e139f88c0a
commit 592b3e69a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 26 deletions

View File

@ -11,8 +11,9 @@ module.exports = {
'plugin:react/recommended',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'react/prop-types': 'off', // In favor of strong typing - no need to dedupe
'react/no-is-mounted': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',

View File

@ -71,6 +71,7 @@ module.exports = {
'@next/next/no-img-element': 'off',
'@next/next/no-html-link-for-pages': 'off',
'react/display-name': 'off',
'react/no-is-mounted': 'off',
'react-hooks/rules-of-hooks': 'error',
'@typescript-eslint/no-unused-vars': ['warn'],
'import/order': [

View File

@ -35,7 +35,6 @@ import {
proxyEnabledAtom,
vulkanEnabledAtom,
quickAskEnabledAtom,
preserveModelSettingsAtom,
} from '@/helpers/atoms/AppConfig.atom'
type GPU = {
@ -65,9 +64,6 @@ const Advanced = () => {
const [proxyEnabled, setProxyEnabled] = useAtom(proxyEnabledAtom)
const quickAskEnabled = useAtomValue(quickAskEnabledAtom)
const [preserveModelSettings, setPreserveModelSettings] = useAtom(
preserveModelSettingsAtom
)
const [proxy, setProxy] = useAtom(proxyAtom)
const [ignoreSSL, setIgnoreSSL] = useAtom(ignoreSslAtom)
@ -389,27 +385,6 @@ const Advanced = () => {
</div>
)}
{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="flex-shrink-0 space-y-1">
<div className="flex gap-x-2">
<h6 className="font-semibold capitalize">
Preserve Model Settings
</h6>
</div>
<p className="font-medium leading-relaxed text-[hsla(var(--text-secondary))]">
Save model settings changes directly to the model file so that
new threads will reuse the previous settings.
</p>
</div>
<Switch
checked={preserveModelSettings}
onChange={(e) => setPreserveModelSettings(e.target.checked)}
/>
</div>
)}
<DataFolder />
{/* Proxy */}