diff --git a/.eslintrc.js b/.eslintrc.js index 3dddeb8ea5..72ed417d5f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,6 +13,9 @@ module.exports = { 'plugin:jest/recommended', 'prettier' ], + ignorePatterns: [ + 'packages/data-provider/types/**/*', + ], parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', diff --git a/client/src/components/Auth/Login.tsx b/client/src/components/Auth/Login.tsx index 2999c6a220..5e7562bbcf 100644 --- a/client/src/components/Auth/Login.tsx +++ b/client/src/components/Auth/Login.tsx @@ -19,7 +19,7 @@ function Login() { useEffect(() => { if (isAuthenticated) { - navigate('/chat/new'); + navigate('/chat/new', { replace: true }); } }, [isAuthenticated, navigate]); diff --git a/client/src/components/Input/SubmitButton.jsx b/client/src/components/Input/SubmitButton.jsx index 6f80277ff8..44c892d64e 100644 --- a/client/src/components/Input/SubmitButton.jsx +++ b/client/src/components/Input/SubmitButton.jsx @@ -16,6 +16,7 @@ export default function SubmitButton({ const { getToken } = store.useToken(endpoint); const isTokenProvided = endpointsConfig?.[endpoint]?.userProvide ? !!getToken() : true; + const endpointsToHideSetTokens = new Set(['openAI', 'azureOpenAI', 'bingAI']); const clickHandler = (e) => { e.preventDefault(); @@ -38,7 +39,7 @@ export default function SubmitButton({ ); - } else if (!isTokenProvided && (endpoint !== 'openAI' || endpoint !== 'azureOpenAI' )) { + } else if (!isTokenProvided && (!endpointsToHideSetTokens.has(endpoint))) { return ( <>