Skip to content

Commit

Permalink
[Fix] 🐛 Chat History Save Error When Logined Harry-zklcdc#410
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed May 9, 2024
1 parent 8b4876e commit 250f571
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/views/chat/components/Chat/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { usePromptStore, type IPrompt } from '@/stores/modules/prompt';
import { storeToRefs } from 'pinia';
import ChatPromptItem from './ChatPromptItem.vue';
import { isMobile } from '@/utils/utils';
import cookies from '@/utils/cookies';
import LoadingSpinner from '@/components/LoadingSpinner/LoadingSpinner.vue';
import { ApiResultCode } from '@/api/model/ApiResult';
import type { SysConfig } from '@/api/model/sysconf/SysConfig';
Expand Down Expand Up @@ -137,6 +138,11 @@ const initSysConfig = async () => {
return;
}
await afterAuth(res.data);
let MATD_Cookie = cookies.get('MicrosoftApplicationsTelemetryDeviceId');
if (MATD_Cookie == '' || MATD_Cookie == null) {
MATD_Cookie = crypto.randomUUID();
cookies.set('MicrosoftApplicationsTelemetryDeviceId', MATD_Cookie, 60, '/');
}
if (res.data.info != '') {
const info = JSON.parse(res.data.info);
message.create(info['content'], {
Expand Down

0 comments on commit 250f571

Please sign in to comment.