diff --git a/components/i/Create.vue b/components/i/Create.vue index 6a34fb190905b58b8cca03cb329acfe62d82df42..6352355175e610d422671310a56ec1482b50d76c 100644 --- a/components/i/Create.vue +++ b/components/i/Create.vue @@ -39,20 +39,20 @@ 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 loading = ref(false); +const loading = ref(false) const handleSearch = async () => { - if (loading.value) return; - loading.value = true; + if (loading.value) return + loading.value = true const result = await fetchRequest('/v1/chat/completion/create', { method: 'post', headers: { 'Content-Type': 'application/x-www-form-urlencoded' } - }); + }) if (result && result.data) { - navigateTo(`/search/${result.data.c_id}?query=${query.value}&repo=${selectedRepo.value}`); + navigateTo(`/search/${result.data.c_id}?query=${query.value}&repo=${selectedRepo.value}`) nextTick(() => { - loading.value = false; + loading.value = false }) } } diff --git a/components/md/renderer.vue b/components/md/renderer.vue index b07a27268be636811867448a6cb1edd2ff46ad80..f1bbd5eba3ee7147ec176dd46652f33e35f04d13 100644 --- a/components/md/renderer.vue +++ b/components/md/renderer.vue @@ -19,17 +19,17 @@ const initMarkdownIt = new MarkdownIt({ try { return `
` +
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
- '';
+ ''
} catch (__) {}
}
- return '' + initMarkdownIt.utils.escapeHtml(str) + '';
+ return '' + initMarkdownIt.utils.escapeHtml(str) + ''
}
})
const handleRenderMd = () => {
- mdHtml.value = initMarkdownIt.render(props.content || '');
+ mdHtml.value = initMarkdownIt.render(props.content || '')
}
watch( () => props.content, () => {
- handleRenderMd();
+ handleRenderMd()
}, { immediate: true })
\ No newline at end of file
diff --git a/composables/useFetchRequest.js b/composables/useFetchRequest.js
index 46d1fd9cc0a7b6bfba1975d1e865afea9a2e97c0..91c9e6d56ad427397bf787ae258901b5031067e9 100644
--- a/composables/useFetchRequest.js
+++ b/composables/useFetchRequest.js
@@ -1,18 +1,18 @@
const BASE_URL = 'https://gpu-pod656e861afe3d944d6b3ce77e-7862.node.inscode.run'
const useFetchRequest = (baseUrl) => {
- baseUrl = baseUrl || BASE_URL;
+ baseUrl = baseUrl || BASE_URL
const config = {
headers: {}
- };
+ }
const fetchRequest = (url, fetchConfig) => {
- url = `${BASE_URL}${url}`;
- fetchConfig = fetchConfig || {};
- fetchConfig.method = (fetchConfig.method || 'get').toLocaleUpperCase();
- fetchConfig = Object.assign(config, fetchConfig);
- return $fetch(url, fetchConfig);
+ url = `${BASE_URL}${url}`
+ fetchConfig = fetchConfig || {}
+ fetchConfig.method = (fetchConfig.method || 'get').toLocaleUpperCase()
+ fetchConfig = Object.assign(config, fetchConfig)
+ return $fetch(url, fetchConfig)
}
return {
fetchRequest
}
}
-export default useFetchRequest;
\ No newline at end of file
+export default useFetchRequest
\ No newline at end of file
diff --git a/layouts/default.vue b/layouts/default.vue
index d407df5ce71f4b396e522582e493717bbaf09f77..4043e5e6527bcab2afb09644ed931d8ba6775005 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -33,6 +33,6 @@
diff --git a/pages/md.vue b/pages/md.vue
index f653d74379946669ce4a645f8927138b6aef5486..33f94b8a74c7bbea323a32fb0fe0ff7fa01808fa 100644
--- a/pages/md.vue
+++ b/pages/md.vue
@@ -7,8 +7,8 @@
\ No newline at end of file
diff --git a/pages/search/[id].vue b/pages/search/[id].vue
index d67ea5a8b886b7aa25f9ab8a05ac4f5f05e1c9ec..7a44fcce93b0a71f51b8e462039aa0fcf54eabed 100644
--- a/pages/search/[id].vue
+++ b/pages/search/[id].vue
@@ -69,7 +69,7 @@