diff --git a/src/assets/images/app.png b/src/assets/images/app.png new file mode 100644 index 0000000000000000000000000000000000000000..9242eae6adf105142b8f0c71fe502df65b0f7b58 Binary files /dev/null and b/src/assets/images/app.png differ diff --git a/src/assets/images/routerApi.png b/src/assets/images/routerApi.png new file mode 100644 index 0000000000000000000000000000000000000000..def617ec763588385342540cfaaa4f0708fa73e4 Binary files /dev/null and b/src/assets/images/routerApi.png differ diff --git a/src/assets/images/routerApp.png b/src/assets/images/routerApp.png new file mode 100644 index 0000000000000000000000000000000000000000..0659d36aad1bcdec82c943deb48a4665f81d1826 Binary files /dev/null and b/src/assets/images/routerApp.png differ diff --git a/src/assets/images/routerCopilot.png b/src/assets/images/routerCopilot.png new file mode 100644 index 0000000000000000000000000000000000000000..7e3205580ec0c6710dcf2de0bbee510ec55950f8 Binary files /dev/null and b/src/assets/images/routerCopilot.png differ diff --git a/src/assets/images/routerCopilotSelected.png b/src/assets/images/routerCopilotSelected.png new file mode 100644 index 0000000000000000000000000000000000000000..fb3dd0a7659ded22a612c5cace3fbdc7281477fd Binary files /dev/null and b/src/assets/images/routerCopilotSelected.png differ diff --git a/src/assets/images/witchainD.png b/src/assets/images/witchainD.png new file mode 100644 index 0000000000000000000000000000000000000000..8cfc3bb07403a16cf8d125ba53d0898b0ee71b04 Binary files /dev/null and b/src/assets/images/witchainD.png differ diff --git a/src/assets/svgs/WitchainDSelected.svg b/src/assets/svgs/WitchainDSelected.svg new file mode 100644 index 0000000000000000000000000000000000000000..1b20a6d1711e583bb2dae13709cc26688a86f90a --- /dev/null +++ b/src/assets/svgs/WitchainDSelected.svg @@ -0,0 +1,19 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + diff --git a/src/assets/svgs/apiIconSelected.svg b/src/assets/svgs/apiIconSelected.svg new file mode 100644 index 0000000000000000000000000000000000000000..4beb45578cfec7cb81d13f81a6ad4c2ecb981b8b --- /dev/null +++ b/src/assets/svgs/apiIconSelected.svg @@ -0,0 +1,21 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + + + diff --git a/src/assets/svgs/appIconSelected.svg b/src/assets/svgs/appIconSelected.svg new file mode 100644 index 0000000000000000000000000000000000000000..d0eda062a60f37f70b0de6a612d0d5e19d14eb45 --- /dev/null +++ b/src/assets/svgs/appIconSelected.svg @@ -0,0 +1,18 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 4d8a35834aa73475ec85204498d02a38f9130c3b..2c2601a9ad25c84fc9c009dfb4017cfd9ca7c8d1 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -11,20 +11,20 @@ export default { main: { describe1:"Hi! I'm", describe2:", and I'm happy to be of service.", - left_describe:"Feel free to ask me, your AI assistant, about any of these topics, or anything else that's on your mind!~", - os_knowledge:'General OS Knowledge', - os_knowledge_describe:'I can answer your questions about Linux, upstream communities, and toolchains.', - openEuler_expertise:'openEuler Expertise', - openEuler_expertise_describe:'Ask me anything about the openEuler community, technical details, or how to use openEuler.', - beyond_openEuler:'Beyond openEuler', - beyond_openEuler_describe:'I can also provide information about openEuler-compatible hardware, ISVs, and OSVs.', - openEuler_use_cases:'openEuler Use Cases', - openEuler_use_cases_describe:'Discover how openEuler is used in various technical and industry applications.', + left_describe:"热门应用", + os_knowledge: 'CVE热修复智能助手', + os_knowledge_describe: 'CVE热修复', + openEuler_expertise: '智能诊断智能助手', + openEuler_expertise_describe: '智能诊断', + beyond_openEuler: '智能调优智能助手', + beyond_openEuler_describe: '智能调优', + openEuler_use_cases: 'AI容器栈智能助手', + openEuler_use_cases_describe: 'AI容器栈', command_generation:'Command Generation', command_generation_describe:'Need help crafting the perfect shell command? I can generate single or complex commands for you.', - smart_shell:'Smart Shell', + question:"推荐问题", smart_shell_describe:'Experience the future of OSs with our smart shell! Use natural language to diagnose and optimize your system.', - try_now:'Try Now', + try_app:"进入应用中心", refresh:"Refresh", query_interpretation:"Query Interpretation", Automatic:"Automatic", diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 14764994a11e0b7868ec9942b0b7b73764b84c3b..cb6ecc8d97b2ecd6190b33aa84c114782546119a 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -11,20 +11,20 @@ export default { main: { describe1: '你好,我是', describe2: ',很高兴为你服务', - left_describe: '作为你的智能助手,你可以试着问我关于以下方面的内容哦~', - os_knowledge: 'OS领域通用知识问答', - os_knowledge_describe: '包含Linux常规知识、上游信息和工具链介绍及指导', - openEuler_expertise: 'openEuler专业知识', - openEuler_expertise_describe: '包含openEuler社区信息、技术原理和使用指导', - beyond_openEuler: 'openEuler扩展知识', - beyond_openEuler_describe: '包含openEuler周边硬件特性知识和ISV、OSV相关信息', - openEuler_use_cases: 'openEuler应用案例', - openEuler_use_cases_describe: '包含openEuler技术案例、行业应用案例', + left_describe: '热门应用', + os_knowledge: 'CVE热修复智能助手', + os_knowledge_describe: 'CVE热修复', + openEuler_expertise: '智能诊断智能助手', + openEuler_expertise_describe: '智能诊断', + beyond_openEuler: '智能调优智能助手', + beyond_openEuler_describe: '智能调优', + openEuler_use_cases: 'AI容器栈智能助手', + openEuler_use_cases_describe: 'AI容器栈', command_generation: 'shell命令生成', command_generation_describe: '帮助用户生成单条命令或复杂命令', - smart_shell: '智能shell', + question: '推荐问题', smart_shell_describe: '欢迎探索首款自然语言交互的智能操作系统:一句话,即享智能诊断与优化', - try_now: '立即体验', + try_app: '进入应用中心', refresh: "换一换", query_interpretation: "请选择识别方式", Automatic: "自动识别", diff --git a/src/views/dialogue/components/DialogueAside.vue b/src/views/dialogue/components/DialogueAside.vue index f618f628ec7a952ce680768e0691bb72eff09c58..25bbb1bab04f1a9f94ae6c0771c8061285bc1d22 100644 --- a/src/views/dialogue/components/DialogueAside.vue +++ b/src/views/dialogue/components/DialogueAside.vue @@ -10,7 +10,7 @@ import { ElCollapseItem, ElTooltip, } from 'element-plus'; -import { computed, onMounted, ref, watch } from 'vue'; +import { computed, ref, watch } from 'vue'; import SessionCard from '@/components/sessionCard/SessionCard.vue'; import { useHistorySessionStore, useSessionStore } from '@/store'; import { storeToRefs } from 'pinia'; @@ -18,7 +18,8 @@ import { api } from '@/apis'; import { useI18n } from 'vue-i18n'; import { successMsg } from 'src/components/Message'; import i18n from 'src/i18n'; -import { apiKeyApi } from 'srcapis/paths'; +import appIcon from '@/assets/images/app.png' +import { IconChevronUp } from '@computing/opendesign-icons'; interface HistorySession { conversation_id: string; @@ -223,6 +224,9 @@ const selectApp = id => { selectedAppId.value = id; }; function ensureAppAtFirstPosition() { + if(!app.value.id){ + return; + } const newApp = app.value; const index = apps.value.findIndex(app => app.id === newApp.id); selectApp(newApp.id); @@ -255,10 +259,11 @@ watch(
- + 我的应用
- + +
-
- -
- - - {{ $t('main.refresh') }} -
-
-
+
diff --git a/src/views/dialogue/components/InitalPanel.vue b/src/views/dialogue/components/InitalPanel.vue index fbeb59d51c4bbd0735cf4b1b30e8069d0dc76531..a25e360006a39bf1b8118b6cd73706e342fcea45 100644 --- a/src/views/dialogue/components/InitalPanel.vue +++ b/src/views/dialogue/components/InitalPanel.vue @@ -3,92 +3,44 @@ import { ref } from 'vue'; import { EG_LIST } from '../constants'; import { useChangeThemeStore } from 'src/store'; import 'xterm/css/xterm.css'; -import { Terminal } from 'xterm'; -import { FitAddon } from 'xterm-addon-fit'; -import { AttachAddon } from 'xterm-addon-attach'; -import { successMsg } from 'src/components/Message'; +import router from 'src/router'; const themeStore = useChangeThemeStore(); -const openShell = () => { - isTermShow.value = true; - fnChangeShellBox(true); - document.getElementById('shellView').style.width = 'calc(100% - 48px)'; - document.getElementById('shellView').style.height = 'calc(100% - 104px)'; - document.getElementById('shellView').style.margin = '64px 24px 40px 24px'; - document.getElementById('shellView').style.borderRadius = '8px'; -}; -const closeShell = () => { - isTermShow.value = false; - fnChangeShellBox(false); - // document.getElementById("shellView").style.width = "0%"; -}; - -let socket = ref(null); -const terminal = ref(null); //绑定dom组件 -const fitAddon = new FitAddon(); - -let term = ref(null); -let termLoading = ref(false); -let isTermShow = ref(false); -const activePane = ref('shell'); -const fnChangeShellBox = isShow => { - if (isShow) { - if (!socket.value) { - termLoading.value = true; - createWs(); - } - } else { - // 关闭连接 - if (socket.value) { - socket.value.close(); - socket.value = null; - } - if (term.value) { - term.value.dispose(); - } - } -}; - -const createWs = () => { - const hostname = window.location.host; - socket.value = new WebSocket(`wss://${hostname}/api/shell/ws/0`); - socket.value.onopen = () => { - termLoading.value = false; - // socket.value.send(JSON.stringify({ - // ctrl: 'resize', - // data: { - // width: 500, - // } - // })); - }; - socket.value.onclose = () => { - // console.log('close'); - }; - socket.value.onerror = e => { - term.value.write(`\x1b[31m${e}\x1b[m\r\n`); - termLoading.value = false; - }; - initTerm(); -}; - -const initTerm = () => { - term.value = new Terminal({ - fontSize: 14, - cursorBlink: true, - }); - const attachAddon = new AttachAddon(socket.value); - term.value.open(terminal.value); - fitAddon.activate(term.value); // 自适应尺寸 - attachAddon.activate(term.value); - - setTimeout(() => { - fitAddon.fit(); - }, 5); - term.value.focus(); - window.onresize = () => { - fitAddon.fit(); - }; -}; +const questions = [ + { + groupId: 0, + id: 1, + question: 'open_euler_community_edition_categories', + }, + { + groupId: 0, + id: 2, + question: 'lts_release_cycle_and_support', + }, + { + groupId: 0, + id: 3, + question: 'innovation_release_cycle_and_support', + }, + { + groupId: 0, + id: 4, + question: 'container_cloud_platform_solution', + }, + { + groupId: 1, + id: 5, + question: 'sec_gear_main_functions', + }, + { + groupId: 1, + id: 6, + question: 'dde_description', + }]; + +const routerToAppCenter = () => { + router.push('/app'); +}