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

Update Create.vue

上级 b117a5de
......@@ -35,10 +35,7 @@ const { fetchRequest } = useFetchRequest()
const emits = defineEmits([ 'search' ])
const query = ref('')
const selectedRepo = ref('keycloak')
const repos = ref([
// { url: 'https://github.com/allwefantasy/byzer-llm.git', label: 'byzer-llm', branch: 'master' },
{ url: 'https://github.com/keycloak/keycloak.git', label: 'keycloak', branch: 'master' }
])
const repos = ref([])
const loading = ref(false)
const handleSearch = async () => {
if (loading.value || query.value === '') return
......@@ -57,6 +54,20 @@ const handleSearch = async () => {
})
}
}
const repoData = await fetchRequest('/v1/chat/repository', {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
repos.value = repoData.data.map(item => {
return {
label: item.name,
url: item.path,
branch: item.branch
}
})
defineShortcuts({
meta_enter: {
usingInput: 'createInput',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册