提交 ef124255 编写于 作者: D DebugIsFalse

fix: 关闭历史打开搜索过程

上级 c40f6896
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
</div> </div>
<ISearchContent <ISearchContent
:item="item" :item="item"
ref="historyAskRefs"
:asking="false" :asking="false"
:is-last-index="false" :is-last-index="false"
:index="index" :index="index"
...@@ -104,11 +105,11 @@ const handleReGenerate = () => { ...@@ -104,11 +105,11 @@ const handleReGenerate = () => {
generateFetchData(question) generateFetchData(question)
} }
// todo 唯一key
const data = ref([]) const data = ref([])
const askingData = ref({ question: state.query, desLoading: true }) const askingData = ref({ question: state.query, desLoading: true })
const recommendQuestions = ref([]) const recommendQuestions = ref([])
const askingRef = ref(null) const askingRef = ref(null)
const historyAskRefs = ref([])
// git url // git url
const baseGitUrl = computed(() => { const baseGitUrl = computed(() => {
const endWidthGit = state.gitPath.endsWith('.git') const endWidthGit = state.gitPath.endsWith('.git')
...@@ -119,9 +120,19 @@ let asking = ref(false) ...@@ -119,9 +120,19 @@ let asking = ref(false)
// 处理ai generate // 处理ai generate
let aiChatController = null // 用户取消操作方法 let aiChatController = null // 用户取消操作方法
const markedEnd = '[DONE]' const markedEnd = '[DONE]'
const handleCloseHistoryAsk = () => {
historyAskRefs.value.forEach(item => {
if (item && item.handleCollapse) {
item.handleCollapse(false)
}
})
}
const createGenerateInitItem = (question) => { const createGenerateInitItem = (question) => {
data.value.push(askingData.value) data.value.push(askingData.value)
askingData.value = { question, desLoading: true } nextTick(() => {
handleCloseHistoryAsk()
askingData.value = { question, desLoading: true }
})
} }
const handleContinueAsk = (question) => { const handleContinueAsk = (question) => {
if (asking.value) return if (asking.value) return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册