diff --git a/src/store/historySession.ts b/src/store/historySession.ts index 94f2c3a7ceeef32581eb771ddd42e983a89de369..430789c6d49250716758b5329b1bb9cab5d2190f 100644 --- a/src/store/historySession.ts +++ b/src/store/historySession.ts @@ -21,6 +21,14 @@ export interface HistorySessionItem { title: string; createdTime: string | Date; docCount: number; + appId: string; + debug: boolean; + kbList: string[]; + llm:{ + icon: string; + modelName: string; + llmId: string; + } } export const useHistorySessionStore = defineStore( @@ -32,6 +40,7 @@ export const useHistorySessionStore = defineStore( const user_selected_app = ref(); const selectLLM = ref(); const currentSelectedSession = ref(''); + const { app } = storeToRefs(useSessionStore()); /** * 选择历史会话 * @param conversationId 会话id @@ -87,6 +96,11 @@ export const useHistorySessionStore = defineStore( historySession.value.forEach((item) => { if (item.conversationId === currentSelectedSession.value) { selectLLM.value = item.llm; + if(item.appId){ + app.value.appId = item.appId; + }else{ + app.value.appId = 'f8a0ebc4-79c4-4a81-b96b-fede6c03f309'; + } } }); }; diff --git a/src/views/dialogue/components/DialogueSession.vue b/src/views/dialogue/components/DialogueSession.vue index 73c54bcf205aa09be3ee38245facde58d99033bb..522110395859b117a8f4eb74b0a976c61603835b 100644 --- a/src/views/dialogue/components/DialogueSession.vue +++ b/src/views/dialogue/components/DialogueSession.vue @@ -631,11 +631,9 @@ onMounted(() => { }); watch(selectLLM, (newValue) => { - console.log(selectLLM); if (newValue) { selectedLLM.value.modalName = newValue.modelName; selectedLLM.value.icon = newValue.icon; - console.log(selectedLLM.value); selectedLLM.value = { ...selectLLM.value }; } }); @@ -684,6 +682,7 @@ const getappMode = (appId: string) => { }; } }); + console.log("getappMode", appId, Form.value); }; watch( @@ -705,6 +704,18 @@ watch( }, ); +watch( + () => app, + (val) => { + if (app.value) { + user_selected_app.value = app.value.appId; + } + }, + { + deep: true, + }, +); + watch( () => isCreateApp, (val) => { diff --git a/src/views/dialogue/components/MultiSelectTags.vue b/src/views/dialogue/components/MultiSelectTags.vue index 0891443310db6e09329673e8381ddf3952caa0d2..58e7fa0cc887a7e1ae616f535bc82953507a5da1 100644 --- a/src/views/dialogue/components/MultiSelectTags.vue +++ b/src/views/dialogue/components/MultiSelectTags.vue @@ -100,11 +100,9 @@ const toggleModal = () => { // 待优化 const checkTagsOverflow = () => { const container = document.querySelector('.tags-container'); - console.log(container, 'container'); if (!container) return; const tags = container.querySelectorAll('.tag'); - console.log(tags, 'tags'); if (!tags.length) return; //重置所有标签的样式