Skip to content

Commit 0f05094

Browse files
wuayeewuayee
andauthored
[frontend] 去除无用的全局变量 (#501)
Co-authored-by: wuayee <wuayee@noreply.gitcode.com>
1 parent 87df55d commit 0f05094

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

frontend/src/store/chatStore/chatStore.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import {
1515
SET_USER_ROLE,
1616
SET_PLUGIN_LIST,
1717
SET_CURRENT_ANSWER,
18-
SET_KNOWLEDGE_CONFIG,
19-
SET_SHOW_CHAT_HISTORY,
2018
SET_IS_CURRENT_ANSWER
2119
} from './action-types';
2220

@@ -71,9 +69,3 @@ export const setCurrentAnswer = (item) => {
7169
export const setIsCurrentAnswer = (item) => {
7270
return { type: SET_IS_CURRENT_ANSWER, payload: item }
7371
}
74-
export const setKnowledgeConfig = (item) => {
75-
return { type: SET_KNOWLEDGE_CONFIG, payload: item }
76-
}
77-
export const setShowChatHistory = (item) => {
78-
return { type: SET_SHOW_CHAT_HISTORY, payload: item }
79-
}

frontend/src/store/chatStore/reducer.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import {
1515
SET_NO_AUTH,
1616
SET_PLUGIN_LIST,
1717
SET_CURRENT_ANSWER,
18-
SET_KNOWLEDGE_CONFIG,
19-
SET_SHOW_CHAT_HISTORY,
2018
SET_IS_CURRENT_ANSWER
2119
} from './action-types';
2220

@@ -37,8 +35,6 @@ const initialState = {
3735
noAuth: false,
3836
pluginList: [],
3937
currentAnswer: '',
40-
knowledgeConfig: null,
41-
showChatHistory: false,
4238
isCurrentAnswer: false
4339
}
4440

@@ -78,10 +74,6 @@ const chatReducers = (state = initialState, action) => {
7874
return { ...state, currentAnswer: action.payload };
7975
case SET_IS_CURRENT_ANSWER:
8076
return { ...state, isCurrentAnswer: action.payload };
81-
case SET_KNOWLEDGE_CONFIG:
82-
return { ...state, knowledgeConfig: action.payload };
83-
case SET_SHOW_CHAT_HISTORY:
84-
return { ...state, showChatHistory: action.payload };
8577
default:
8678
return state
8779
}

0 commit comments

Comments
 (0)