Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
Merge pull request #7408 from janhq/fix/throttle-rendering
Nghia Doane9fb27e7b2e9
diff --git a/web-app/src/constants/providers.ts b/web-app/src/constants/providers.tsindex 630c0efa7..868912e5b 100644--- a/web-app/src/constants/providers.ts+++ b/web-app/src/constants/providers.ts@@ -138,40 +138,6 @@ export const predefinedProviders = [}]},- {- active: true,- api_key: '',- base_url: 'https://api.cohere.ai/v1',- explore_models_url: 'https://docs.cohere.com/v2/docs/models',- provider: 'cohere',- settings: [- {- key: 'api-key',- title: 'API Key',- description:- "The Cohere API uses API keys for authentication. Visit your [API Keys](https://dashboard.cohere.com/api-keys) page to retrieve the API key you'll use in your requests.",- controller_type: 'input',- controller_props: {- placeholder: 'Insert API Key',- value: '',- type: 'password',- input_actions: ['unobscure', 'copy'],- },- },- {- key: 'base-url',- title: 'Base URL',- description:- 'The base OpenAI-compatible endpoint to use. See the [Cohere documentation](https://docs.cohere.com/docs/compatibility-api) for more information.',- controller_type: 'input',- controller_props: {- placeholder: 'https://api.cohere.ai/compatibility/v1',- value: 'https://api.cohere.ai/compatibility/v1',- },- },- ],- models: [],- },{active: true,api_key: '',diff --git a/web-app/src/containers/DropdownAssistant.tsx b/web-app/src/containers/DropdownAssistant.tsxindex e474df9ed..41fdb3531 100644--- a/web-app/src/containers/DropdownAssistant.tsx+++ b/web-app/src/containers/DropdownAssistant.tsx@@ -20,7 +20,9 @@ const DropdownAssistant = () => {updateAssistant,setCurrentAssistant,} = useAssistant()- const { updateCurrentThreadAssistant } = useThreads()+ const updateCurrentThreadAssistant = useThreads(+ (state) => state.updateCurrentThreadAssistant+ )const [dropdownOpen, setDropdownOpen] = useState(false)const [dialogOpen, setDialogOpen] = useState(false)const [editingAssistantId, setEditingAssistantId] = useState<string | null>(diff --git a/web-app/src/hooks/use-chat.ts b/web-app/src/hooks/use-chat.tsindex e14efd48f..38e9bcf50 100644--- a/web-app/src/hooks/use-chat.ts+++ b/web-app/src/hooks/use-chat.ts@@ -121,7 +121,7 @@ export function useChat(...(chat? { chat }: { transport: transportRef.current, ...chatInitOptions }),- // experimental_throttle,+ experimental_throttle: options?.experimental_throttle,resume: false,})diff --git a/web-app/src/hooks/useModelProvider.ts b/web-app/src/hooks/useModelProvider.tsindex 3db51514b..d0c348567 100644--- a/web-app/src/hooks/useModelProvider.ts+++ b/web-app/src/hooks/useModelProvider.ts@@ -444,11 +444,6 @@ export const useModelProvider = create<ModelProviderState>()(}})}- if (version <= 6 && state?.providers) {- // Most of legacy cohere models are deprecated now, remove the provider entirely- // TODO: Default providers should be updated automatically somehow later- state.providers = state.providers.filter((provider) => provider.provider !== 'cohere')- }if (version <= 7 && state?.providers) {// Remove 'proactive' capability from all models as it's now managed in MCP settingsstate.providers.forEach((provider) => {@@ -494,9 +489,15 @@ export const useModelProvider = create<ModelProviderState>()(}})}++ if (version <= 9 && state?.providers) {+ state.providers = state.providers.filter(+ (provider) => provider.provider !== 'cohere'+ )+ }return state},- version: 9,+ version: 10,}))