feat: display chunk token number when category of knowledge as general and unavailable llm models appear disabled and if the backend returns 401, it will jump to the login page and fixed the issue where the greeting would disappear when clicking on a new dialog (#117)

* feat: Fixed the issue where the greeting would disappear when clicking on a new dialog

* feat: replace favicon with logo.svg

* feat: if the backend returns 401, it will jump to the login page.

* feat: unavailable llm models appear disabled

* feat: display chunk token number when category of knowledge as general
This commit is contained in:
balibabu
2024-03-11 16:13:34 +08:00
committed by GitHub
parent c7c451bb9f
commit 7c0fb078f8
12 changed files with 219 additions and 69 deletions

View File

@ -1,11 +1,8 @@
import { message, notification } from 'antd';
import { RequestMethod, extend } from 'umi-request';
import { Authorization } from '@/constants/authorization';
import api from '@/utils/api';
import authorizationUtil from '@/utils/authorizationUtil';
const { login } = api;
import { message, notification } from 'antd';
import { history } from 'umi';
import { RequestMethod, extend } from 'umi-request';
const ABORT_REQUEST_ERR_MESSAGE = 'The user aborted a request.'; // 手动中断请求。errorHandler 抛出的error message
@ -120,7 +117,7 @@ request.interceptors.response.use(async (response: any, options) => {
duration: 3,
});
authorizationUtil.removeAll();
// history.push('/login'); // Will not jump to the login page
history.push('/login'); // Will not jump to the login page
} else if (data.retcode !== 0) {
if (data.retcode === 100) {
message.error(data.retmsg);