提交 ca7b4fa1 编写于 作者: View Design's avatar View Design

Merge branch 'main' of gitcode.com:git_bot/ai-fe

...@@ -230,6 +230,9 @@ const handleFormFetchData = (fetchData) => { ...@@ -230,6 +230,9 @@ const handleFormFetchData = (fetchData) => {
if (Object.keys(message).length === 0) return; if (Object.keys(message).length === 0) return;
const { meta, choices } = message; const { meta, choices } = message;
const index = editIndex.value; const index = editIndex.value;
nextTick(() => {
scrollToView();
})
if (meta.type === 'answer') { if (meta.type === 'answer') {
Object.assign(data.value[index], { Object.assign(data.value[index], {
ansLoading: true, ansLoading: true,
...@@ -249,9 +252,6 @@ const handleFormFetchData = (fetchData) => { ...@@ -249,9 +252,6 @@ const handleFormFetchData = (fetchData) => {
let source = choices[0].message.content; let source = choices[0].message.content;
storeSource = source.split('\n'); storeSource = source.split('\n');
} }
nextTick(() => {
scrollToView();
})
} }
const handleUpdateSource = () => { const handleUpdateSource = () => {
const index = editIndex.value; const index = editIndex.value;
...@@ -262,7 +262,7 @@ const handleUpdateSource = () => { ...@@ -262,7 +262,7 @@ const handleUpdateSource = () => {
storeSource = storeSource.map((item) => { storeSource = storeSource.map((item) => {
return { return {
repo: state.repo, repo: state.repo,
link: `${baseUrl}/blob/${state.branch}/${item.label}`, link: `${baseUrl}/blob/${state.branch}/${item}`,
label: item label: item
} }
}) })
...@@ -289,7 +289,6 @@ const handleStopGenerate = () => { ...@@ -289,7 +289,6 @@ const handleStopGenerate = () => {
asking.value = false; asking.value = false;
} }
const handleError = (event) => { const handleError = (event) => {
console.log(`error`, event)
handleStopGenerate(); handleStopGenerate();
} }
const generateFetchData = (query) => { const generateFetchData = (query) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册