@myun/gimi-chat 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/file-card/index.js +8 -6
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +10 -8
- package/dist/components/reasoning-search/index.js +8 -6
- package/dist/components/templates/CommonChat.js +23 -32
- package/dist/components/unified-sidebar/FileListContent.d.ts +6 -0
- package/dist/components/unified-sidebar/FileListContent.js +26 -0
- package/dist/components/unified-sidebar/KnowledgeTraceContent.d.ts +7 -0
- package/dist/components/unified-sidebar/KnowledgeTraceContent.js +105 -0
- package/dist/components/unified-sidebar/ReasoningSearchContent.d.ts +3 -0
- package/dist/components/unified-sidebar/ReasoningSearchContent.js +75 -0
- package/dist/components/unified-sidebar/SearchCourseListContent.d.ts +3 -0
- package/dist/components/unified-sidebar/SearchCourseListContent.js +21 -0
- package/dist/components/unified-sidebar/index.d.ts +10 -0
- package/dist/components/unified-sidebar/index.js +64 -0
- package/dist/hooks/useCommonChatAPI.js +4 -7
- package/dist/store/slices/gimiMenuSlice.d.ts +14 -1
- package/dist/store/slices/gimiMenuSlice.js +65 -6
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
|
@@ -49,6 +49,17 @@ var initialState = {
|
|
|
49
49
|
showSidebarReasoningSearch: false,
|
|
50
50
|
sidebarReasoningSearchList: [],
|
|
51
51
|
sidebarFileList: [],
|
|
52
|
+
sidebar: {
|
|
53
|
+
type: null,
|
|
54
|
+
knowledgeTrace: {
|
|
55
|
+
type: 'video',
|
|
56
|
+
resources: [],
|
|
57
|
+
messageId: null
|
|
58
|
+
},
|
|
59
|
+
fileList: [],
|
|
60
|
+
reasoningSearchList: [],
|
|
61
|
+
searchCourseList: []
|
|
62
|
+
},
|
|
52
63
|
filePreviewState: {
|
|
53
64
|
show: false,
|
|
54
65
|
url: '',
|
|
@@ -226,6 +237,48 @@ var gimiMenuSlice = createSlice({
|
|
|
226
237
|
},
|
|
227
238
|
setAutoLoadConversation: function setAutoLoadConversation(state, action) {
|
|
228
239
|
state.autoLoadConversation = action.payload.autoLoadConversation;
|
|
240
|
+
},
|
|
241
|
+
openSidebar: function openSidebar(state, action) {
|
|
242
|
+
var _action$payload = action.payload,
|
|
243
|
+
type = _action$payload.type,
|
|
244
|
+
data = _action$payload.data;
|
|
245
|
+
state.sidebar.type = type;
|
|
246
|
+
if (data !== null && data !== void 0 && data.knowledgeTrace) {
|
|
247
|
+
state.sidebar.knowledgeTrace = data.knowledgeTrace;
|
|
248
|
+
}
|
|
249
|
+
if (data !== null && data !== void 0 && data.fileList) {
|
|
250
|
+
state.sidebar.fileList = data.fileList;
|
|
251
|
+
}
|
|
252
|
+
if (data !== null && data !== void 0 && data.reasoningSearchList) {
|
|
253
|
+
state.sidebar.reasoningSearchList = data.reasoningSearchList;
|
|
254
|
+
}
|
|
255
|
+
if (data !== null && data !== void 0 && data.searchCourseList) {
|
|
256
|
+
state.sidebar.searchCourseList = data.searchCourseList;
|
|
257
|
+
}
|
|
258
|
+
state.filePreviewState.show = false;
|
|
259
|
+
},
|
|
260
|
+
closeSidebar: function closeSidebar(state) {
|
|
261
|
+
state.sidebar.type = null;
|
|
262
|
+
state.sidebar.knowledgeTrace = {
|
|
263
|
+
type: 'video',
|
|
264
|
+
resources: [],
|
|
265
|
+
messageId: null
|
|
266
|
+
};
|
|
267
|
+
state.sidebar.fileList = [];
|
|
268
|
+
state.sidebar.reasoningSearchList = [];
|
|
269
|
+
state.sidebar.searchCourseList = [];
|
|
270
|
+
},
|
|
271
|
+
setSidebarKnowledgeTrace: function setSidebarKnowledgeTrace(state, action) {
|
|
272
|
+
state.sidebar.knowledgeTrace = action.payload;
|
|
273
|
+
},
|
|
274
|
+
setSidebarFileListData: function setSidebarFileListData(state, action) {
|
|
275
|
+
state.sidebar.fileList = action.payload;
|
|
276
|
+
},
|
|
277
|
+
setSidebarReasoningSearchListData: function setSidebarReasoningSearchListData(state, action) {
|
|
278
|
+
state.sidebar.reasoningSearchList = action.payload;
|
|
279
|
+
},
|
|
280
|
+
setSidebarSearchCourseList: function setSidebarSearchCourseList(state, action) {
|
|
281
|
+
state.sidebar.searchCourseList = action.payload;
|
|
229
282
|
}
|
|
230
283
|
},
|
|
231
284
|
extraReducers: function extraReducers(builder) {
|
|
@@ -237,10 +290,10 @@ var gimiMenuSlice = createSlice({
|
|
|
237
290
|
state.loading = true;
|
|
238
291
|
}
|
|
239
292
|
}).addCase(getChatHistoryList.fulfilled, function (state, action) {
|
|
240
|
-
var _action$
|
|
241
|
-
data = _action$
|
|
242
|
-
last = _action$
|
|
243
|
-
loadMore = _action$
|
|
293
|
+
var _action$payload2 = action.payload,
|
|
294
|
+
data = _action$payload2.data,
|
|
295
|
+
last = _action$payload2.last,
|
|
296
|
+
loadMore = _action$payload2.loadMore;
|
|
244
297
|
if (loadMore) {
|
|
245
298
|
state.historyList = [].concat(_toConsumableArray(state.historyList), _toConsumableArray(data));
|
|
246
299
|
} else {
|
|
@@ -278,7 +331,13 @@ var _gimiMenuSlice$action = gimiMenuSlice.actions,
|
|
|
278
331
|
setBusinessParams = _gimiMenuSlice$action.setBusinessParams,
|
|
279
332
|
setAutoLoadConversation = _gimiMenuSlice$action.setAutoLoadConversation,
|
|
280
333
|
setShowSidebarReasoningSearch = _gimiMenuSlice$action.setShowSidebarReasoningSearch,
|
|
281
|
-
setSidebarReasoningSearchList = _gimiMenuSlice$action.setSidebarReasoningSearchList
|
|
282
|
-
|
|
334
|
+
setSidebarReasoningSearchList = _gimiMenuSlice$action.setSidebarReasoningSearchList,
|
|
335
|
+
openSidebar = _gimiMenuSlice$action.openSidebar,
|
|
336
|
+
closeSidebar = _gimiMenuSlice$action.closeSidebar,
|
|
337
|
+
setSidebarKnowledgeTrace = _gimiMenuSlice$action.setSidebarKnowledgeTrace,
|
|
338
|
+
setSidebarFileListData = _gimiMenuSlice$action.setSidebarFileListData,
|
|
339
|
+
setSidebarReasoningSearchListData = _gimiMenuSlice$action.setSidebarReasoningSearchListData,
|
|
340
|
+
setSidebarSearchCourseList = _gimiMenuSlice$action.setSidebarSearchCourseList;
|
|
341
|
+
export { setAgentDetail, setConversationId, setIsMsgRecieving, setBaseUrl, setToken, setPlatform, updateState, setMessageList, setFileList, setCurrentMessageId, updateParams, setShowKonwledgeTrace, setShowSidebarFileList, setSidebarFileList, setKonwledgeTraceState, setFilePreviewState, setQuoteProductList, setQuoteTeachModelList, setShowMicWarning, setBusinessParams, setAutoLoadConversation, setShowSidebarReasoningSearch, setSidebarReasoningSearchList, openSidebar, closeSidebar, setSidebarKnowledgeTrace, setSidebarFileListData, setSidebarReasoningSearchListData, setSidebarSearchCourseList };
|
|
283
342
|
var reducer = gimiMenuSlice.reducer;
|
|
284
343
|
export default reducer;
|