mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
refreshes ollama only
This commit is contained in:
parent
7bb0993249
commit
446dede5e4
3 changed files with 4 additions and 4 deletions
|
|
@ -36,7 +36,7 @@ export type RefreshModelStateOfProvider = Record<RefreshableProviderName, Refres
|
|||
|
||||
const refreshBasedOn: { [k in RefreshableProviderName]: (keyof SettingsOfProvider[k])[] } = {
|
||||
ollama: ['_enabled', 'endpoint'],
|
||||
openAICompatible: ['_enabled', 'endpoint', 'apiKey'],
|
||||
// openAICompatible: ['_enabled', 'endpoint', 'apiKey'],
|
||||
}
|
||||
const REFRESH_INTERVAL = 5_000
|
||||
// const COOLDOWN_TIMEOUT = 300
|
||||
|
|
@ -129,7 +129,7 @@ export class RefreshModelService extends Disposable implements IRefreshModelServ
|
|||
|
||||
state: RefreshModelStateOfProvider = {
|
||||
ollama: { state: 'init', timeoutId: null },
|
||||
openAICompatible: { state: 'init', timeoutId: null },
|
||||
// openAICompatible: { state: 'init', timeoutId: null },
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ export const defaultProviderSettings = {
|
|||
export type ProviderName = keyof typeof defaultProviderSettings
|
||||
export const providerNames = Object.keys(defaultProviderSettings) as ProviderName[]
|
||||
|
||||
export const localProviderNames = ['ollama', 'openAICompatible'] satisfies ProviderName[] // all local names
|
||||
export const localProviderNames = ['ollama'] satisfies ProviderName[] // all local names
|
||||
export const nonlocalProviderNames = providerNames.filter((name) => !(localProviderNames as string[]).includes(name)) // all non-local names
|
||||
|
||||
type CustomSettingName = UnionOfKeys<typeof defaultProviderSettings[ProviderName]>
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ const GeneralTab = () => {
|
|||
|
||||
|
||||
<h2 className={`text-2xl mb-2`}>One-click Switch</h2>
|
||||
<h3 className={`text-void-fg-3 mb-2`}>{`Transfer your VS Code settings into Void.`}</h3>
|
||||
<h3 className={`text-void-fg-3 mb-2`}>{`Transfer your settings from VS Code into Void.`}</h3>
|
||||
<OneClickSwitch />
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue