Add Chatdoc feature (#40)
This commit is contained in:
1 parent
60752af1fb
commit
811a2bca09
51 files changed
+2742
-25
No files matched your search
@@ -76,6 +76,10 @@ import { defineComponent } from 'vue';
|
||||
import { ElButton, ElTooltip, ElMenu, ElMenuItem } from 'element-plus';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import {
|
||||
ROUTE_CHATDOC_INDEX,
|
||||
ROUTE_CHATDOC_CONVERSATION,
|
||||
ROUTE_CHATDOC_MANAGE,
|
||||
ROUTE_CHATDOC_SETTING,
|
||||
ROUTE_CHAT_CONVERSATION,
|
||||
ROUTE_CHAT_CONVERSATION_NEW,
|
||||
ROUTE_CONSOLE_ROOT,
|
||||
@@ -106,7 +110,6 @@ export default defineComponent({
|
||||
},
|
||||
displayName: this.$t('common.nav.chat'),
|
||||
icon: 'fa-regular fa-comment',
|
||||
image: 'https://cdn.zhishuyun.com/9ad12c99b2.png/thumb_100x100',
|
||||
routes: [ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW]
|
||||
});
|
||||
}
|
||||
@@ -117,11 +120,21 @@ export default defineComponent({
|
||||
},
|
||||
displayName: this.$t('common.nav.midjourney'),
|
||||
icon: 'fa-solid fa-palette',
|
||||
image: 'https://cdn.zhishuyun.com/83ee211091.png/thumb_100x100',
|
||||
routes: [ROUTE_MIDJOURNEY_INDEX, ROUTE_MIDJOURNEY_HISTORY]
|
||||
});
|
||||
}
|
||||
|
||||
if (this.$config.navigation?.chatdoc) {
|
||||
links.push({
|
||||
route: {
|
||||
name: ROUTE_CHATDOC_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.chatdoc'),
|
||||
icon: 'fa-solid fa-file-lines',
|
||||
routes: [ROUTE_CHATDOC_INDEX, ROUTE_CHATDOC_CONVERSATION, ROUTE_CHATDOC_MANAGE, ROUTE_CHATDOC_SETTING]
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
links,
|
||||
activeIndex: this.$route.name as string
|
||||
@@ -173,6 +186,7 @@ export default defineComponent({
|
||||
await this.$store.dispatch('resetAll');
|
||||
await this.$store.dispatch('chat/resetAll');
|
||||
await this.$store.dispatch('midjourney/resetAll');
|
||||
await this.$store.dispatch('chatdoc/resetAll');
|
||||
},
|
||||
onConsole() {
|
||||
this.$router.push({ name: ROUTE_CONSOLE_ROOT });
|
||||
|
||||
Reference in new issue
Block a user