diff --git a/components/i/Create.vue b/components/i/Create.vue
index 3220da996fc518b027470d2884f258b1979018ac..0594657e43a22ea2e62b39dbc356a3a29ae4d54d 100644
--- a/components/i/Create.vue
+++ b/components/i/Create.vue
@@ -14,36 +14,60 @@
:padded="false"
maxlength="2000"
/>
-
-
-
- {{ selectedRepo || '选择 GitHub 项目' }}
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+ {{ selectedRepo }}
+
+
+
+
+
+
+
+
@@ -52,26 +76,28 @@
const { $repos } = storeToRefs(useReposStore())
const { $setRepo } = useReposStore()
const { $setFirstRecordTitle } = useSearchStore()
+const { metaSymbol } = useShortcuts()
const emits = defineEmits([ 'search' ])
const query = ref('')
const selectedRepo = ref('')
const loading = ref(false)
const cardUI = {
body: {
- padding: 'p-4 sm:p-4'
+ padding: 'p-3 sm:p-3'
},
rounded: 'rounded-xl'
}
const menuUI = {
width: 'w-auto'
}
+const isInternet = ref(true)
const handleSearch = async () => {
if (loading.value || query.value === '') return
loading.value = true
const currentRepo = $repos.value.find(item => item.label === selectedRepo.value)
- const repo_path = currentRepo ? currentRepo.url : ''
- const { data, error } = await useRequest('/v1/chat/completion/create', {
+ const repo_path = currentRepo ? currentRepo.url : ''
+ const { data, error } = await useRequest('/v1/chat/completion/create', {
method: 'post',
body: {
repo_path,
@@ -108,6 +134,16 @@ defineShortcuts({
handler: () => {
handleSearch()
}
+ },
+ meta_o: {
+ usingInput: 'createInput',
+ handler: () => {
+ handleToggleInternet()
+ }
}
})
+
+function handleToggleInternet () {
+ isInternet.value = !isInternet.value
+}