diff --git a/pages/search/[id].vue b/pages/search/[id].vue index bd734cf9eaed4f6185c84e5c1b5746864c019885..649c3e6e218198cf900e7dd973d21a74d5aa9690 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -230,6 +230,9 @@ const handleFormFetchData = (fetchData) => { if (Object.keys(message).length === 0) return; const { meta, choices } = message; const index = editIndex.value; + nextTick(() => { + scrollToView(); + }) if (meta.type === 'answer') { Object.assign(data.value[index], { ansLoading: true, @@ -249,9 +252,6 @@ const handleFormFetchData = (fetchData) => { let source = choices[0].message.content; storeSource = source.split('\n'); } - nextTick(() => { - scrollToView(); - }) } const handleUpdateSource = () => { const index = editIndex.value; @@ -262,7 +262,7 @@ const handleUpdateSource = () => { storeSource = storeSource.map((item) => { return { repo: state.repo, - link: `${baseUrl}/blob/${state.branch}/${item.label}`, + link: `${baseUrl}/blob/${state.branch}/${item}`, label: item } }) @@ -289,7 +289,6 @@ const handleStopGenerate = () => { asking.value = false; } const handleError = (event) => { - console.log(`error`, event) handleStopGenerate(); } const generateFetchData = (query) => {