提交 ef124255 编写于 作者: D DebugIsFalse

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

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