提交 0d19a12d 编写于 作者: D DebugIsFalse

fix: error

上级 9363212f
...@@ -57,13 +57,14 @@ const handleSearch = async () => { ...@@ -57,13 +57,14 @@ const handleSearch = async () => {
loading.value = true loading.value = true
const currentRepo = $repos.value.find(item => item.label === selectedRepo.value) const currentRepo = $repos.value.find(item => item.label === selectedRepo.value)
const repo_path = currentRepo ? currentRepo.url : '' const repo_path = currentRepo ? currentRepo.url : ''
const { data } = await useRequest('/v1/chat/completion/create', { const { data, error } = await useRequest('/v1/chat/completion/create', {
method: 'post', method: 'post',
body: { body: {
repo_path, repo_path,
title: query.value title: query.value
} }
}) })
if (error.value) return
navigateTo(`/search/${data.value.data.c_id}`) navigateTo(`/search/${data.value.data.c_id}`)
emits('search') emits('search')
nextTick(() => { nextTick(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册