提交 edae4927 编写于 作者: D DebugIsFalse

Update [id].vue

上级 86af343a
...@@ -177,10 +177,11 @@ const isAutoToBottom = ref(true) ...@@ -177,10 +177,11 @@ const isAutoToBottom = ref(true)
let markedWindowScrollTop = 0 let markedWindowScrollTop = 0
const handleScroll = () => { const handleScroll = () => {
// 在asking操作的时候生效 // 在asking操作的时候生效
if (!asking.value) return if (!asking.value || !isAutoToBottom.value) return
const offsetValue = 5; const offsetValue = 5;
const top = window.scrollY; const top = window.scrollY;
if (top + offsetValue < markedWindowScrollTop) { // console.log(`top + offsetValue:`, top, markedWindowScrollTop, top < markedWindowScrollTop)
if (top < markedWindowScrollTop) {
isAutoToBottom.value = false isAutoToBottom.value = false
} else { } else {
markedWindowScrollTop = top markedWindowScrollTop = top
...@@ -191,7 +192,6 @@ const scrollToView = () => { ...@@ -191,7 +192,6 @@ const scrollToView = () => {
const $target = document.querySelector('#scrollElement') const $target = document.querySelector('#scrollElement')
if (!$target) return; if (!$target) return;
const height = $target.clientHeight const height = $target.clientHeight
console.log(`height:`, height)
y.value = height y.value = height
} }
const isEditTitle = ref(false) const isEditTitle = ref(false)
...@@ -353,7 +353,7 @@ const fetchLinkedQuestion = (query) => { ...@@ -353,7 +353,7 @@ const fetchLinkedQuestion = (query) => {
repo_path: gitPath, repo_path: gitPath,
c_id: id, c_id: id,
messages, messages,
rephrase_question: true // rephrase_question: true
} }
}).then((res) => { }).then((res) => {
if (res && res.data && res.data.items) { if (res && res.data && res.data.items) {
...@@ -375,7 +375,7 @@ const generateFetchData = (query) => { ...@@ -375,7 +375,7 @@ const generateFetchData = (query) => {
c_id: id, c_id: id,
stream: true, stream: true,
messages, messages,
rephrase_question: true // rephrase_question: true
}, },
onmessage: handleMessage, onmessage: handleMessage,
onerror: handleError, onerror: handleError,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册