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 @@
+
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 @@
+
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 @@
+
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(
@@ -415,6 +420,9 @@ watch(
:deep(svg) {
color: #3b82f6;
}
+ img{
+ width: 30px;
+ }
span {
font-weight: 600;
color: #374151;
@@ -434,8 +442,8 @@ watch(
.app-list {
list-style-type: none;
padding: 0;
- margin: 0;
-
+ margin-top: 8px;
+ color: var(--o-text-color-secondary);
li {
height: 32px;
display: flex;
@@ -456,7 +464,7 @@ watch(
&.selected {
background: linear-gradient(127.6deg, rgba(109, 117, 250, 0.2) -1.725%, rgba(90, 179, 255, 0.2) 98.22%);
- color: white;
+ color: var(--o-text-color-primary);
}
}
}
diff --git a/src/views/dialogue/components/DialogueSession.vue b/src/views/dialogue/components/DialogueSession.vue
index 0711ae013837dc11689b0f60a507c18d40e22b05..e76aced33bcc036467e4f1ab9d827cbb60d26443 100644
--- a/src/views/dialogue/components/DialogueSession.vue
+++ b/src/views/dialogue/components/DialogueSession.vue
@@ -830,20 +830,8 @@ const handlePauseAndReGenerate = (cid?: number) => {
{{ $t('feedback.stop') }}
-
-
- -
- {{ $t('question.' + item.question) }}
-
-
-
-
-
+
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');
+}
@@ -113,18 +65,20 @@ const initTerm = () => {
-
-
-
{{ $t('main.smart_shell') }}
-
- {{ $t('main.smart_shell_describe') }}
+
-
-
x
-
+
+
{{$t('main.question')}}
+
+ -
+ {{ item.id }}
+ {{$t('question.'+item.question)}}
+
+
@@ -182,16 +136,31 @@ const initTerm = () => {
margin-left: 50px;
}
+.question-list{
+ margin-top: 16px;
+ li{
+ margin-bottom: 16px;
+ span{
+ margin-right: 3px;
+ }
+ .blue{
+ color: #5ab3ff;
+ }
+ }
+}
+
.container {
display: flex;
justify-content: center;
- .shell {
+ .question {
// display: block;
- width: 264px;
+ width: 492px;
height: auto;
- // background-color: var(--o-bg-color-base);
- background: var(--o-shell-image) no-repeat;
+ box-shadow: 0px 5.18px 20.72px 0px rgba(221,225,240,0.5);
+ background: linear-gradient(270.00deg,rgb(227, 242, 255),rgb(195,227,255) 33.232%,rgb(197, 203, 249)85.699%);
+ // opacity: 0.5;
+ border-radius: 8px;
background-size: 100% 100%;
margin-left: 12px;
padding: 24px;
@@ -210,34 +179,6 @@ const initTerm = () => {
font-size: 14px;
color: var(--o-text-color-secondary);
}
-
- &-btn {
- display: flex;
- height: 100%;
- position: relative;
-
- // align-items: center;
- p {
- display: block;
- align-self: center;
- position: absolute;
- width: 96px;
- line-height: 32px;
- border-radius: 100px;
- height: 32px;
- background-image: linear-gradient(to right, #6d75fa, #5ab3ff);
- height: 32px;
- align-self: center;
- // margin: 0px 0px 12px 12px;
- color: white;
- bottom: 0px;
-
- p {
- text-align: center;
- font-size: 14px;
- }
- }
- }
}
}
@@ -278,12 +219,31 @@ const initTerm = () => {
background-color: var(--o-bg-color-base);
padding: 24px;
border-radius: 8px;
- min-width: 640px;
-
+ width: 492px;
+ height: 320px;
p {
font-size: 16px;
color: var(--o-text-color-secondary);
}
+ &-btn {
+ display: flex;
+ position: relative;
+ top: 50px;
+ p {
+ display: block;
+ align-self: center;
+ position: absolute;
+ width: 120px;
+ line-height: 32px;
+ border-radius: 100px;
+ height: 32px;
+ background-image: linear-gradient(to right, #6d75fa, #5ab3ff);
+ height: 32px;
+ color: white;
+ text-align: center;
+ font-size: 14px;
+ }
+ }
}
.eg-list {
@@ -294,7 +254,7 @@ const initTerm = () => {
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
-
+ margin-top: 8px;
li {
cursor: text;
}
@@ -303,11 +263,11 @@ const initTerm = () => {
display: flex;
align-items: center;
width: calc(50% - 8px);
- height: 64px;
- background-color: transparent;
- margin-top: 20px;
+ height: 80px;
+ background: rgb(244, 246, 250);
+ margin-top: 8px;
overflow: hidden;
-
+ border-radius: 8px;
@media screen and (max-width: 1368px) {
width: calc(50% - 4px);
padding: 10px;
@@ -318,18 +278,21 @@ const initTerm = () => {
padding: 10px;
}
+ &:hover {
+ box-shadow: 0 5.18px 20.72px 0 rgba(221, 225, 240, 0.5);
+ background: linear-gradient(270.00deg,rgb(229, 239, 248),rgb(199,227,250)24.366%,rgba(175, 205, 242) 57.543%,rgb(152,162,247)96.781%);
+ }
+
img {
width: 37px;
height: 37px;
- // align-self: baseline;
- margin-right: 6px;
+ margin: 0 6px 0 8px;
}
&__text {
width: 100%;
display: flex;
flex-direction: column;
- // margin-left: -12px;
font-size: 16px;
font-weight: 700;
color: var(--o-text-color-primary);
diff --git a/src/views/dialogue/constants.ts b/src/views/dialogue/constants.ts
index 9827ebe02bcb6d641c1ac835d76902dd09b93d7b..6fed5e8931547420062b12a8912e9211fd191b07 100644
--- a/src/views/dialogue/constants.ts
+++ b/src/views/dialogue/constants.ts
@@ -118,11 +118,4 @@ export const EG_LIST: EgItem[] = [
title: 'openEuler应用案例',
insertMessage: 'openEuler_use_cases_describe',
},
- {
- icon: COMMAND_GENNERATION,
- iconDark: COMMAND_GENNERATION_DARK,
- key: 'command_generation',
- title: 'shell命令生成',
- insertMessage: 'command_generation_describe',
- },
];
diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue
index 754b8e1061f95962bbc14ff5fd47825b253d6bbc..9e65c7a7735eb7515532c96d504b8105a98e4761 100644
--- a/src/views/dialogue/dialogueView.vue
+++ b/src/views/dialogue/dialogueView.vue
@@ -5,16 +5,21 @@ import { onHtmlEventDispatch } from 'src/utils';
import { useHistorySessionStore, useSessionStore, useAccountStore, useLangStore } from 'src/store';
import { marked } from 'marked';
import { ARGEEMENT_VERSION } from 'src/conf/version';
-import Copilot from './Copilot.vue';
import { useChangeThemeStore } from 'src/store';
import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
import { api } from 'src/apis';
-import { fa } from 'element-plus/es/locale';
import { ElMessage } from 'element-plus';
-import { apiKeyApi } from 'srcapis/paths';
import { watch } from 'vue';
import i18n from 'src/i18n';
-
+import CopilotIcon from '@/assets/images/routerCopilot.png';
+import CopilotIconSelected from '@/assets/images/routerCopilotSelected.png';
+import ApiIcon from '@/assets/images/routerApi.png';
+import ApiIconSelected from '@/assets/svgs/apiIconSelected.svg';
+import AppIcon from '@/assets/images/routerApp.png';
+import AppIconSelected from '@/assets/svgs/appIconSelected.svg';
+import WitchainDIcon from '@/assets/images/WitchainD.png';
+import WitchainDIconSelected from '@/assets/svgs/WitchainDSelected.svg';
+import { useRouter } from 'vue-router';
// 挂载全局事件
window.onHtmlEventDispatch = onHtmlEventDispatch as any;
const { logout } = useAccountStore();
@@ -31,12 +36,12 @@ const hidden = ref(false);
const revoke = ref(true);
const isSubmitDisabled = ref(true);
const ruleFormRef = ref
();
-
+const router = useRouter();
const routerList = [
- { name: '对话', path: '/' },
- { name: '语义中心', path: '/api' },
- { name: '应用中心', path: '/app' },
- { name: '工具', path: '/tools' },
+ { name: '对话', path: '/' , src:CopilotIcon , selectedSrc:CopilotIconSelected ,routerName: 'dialogue' },
+ { name: '语义中心', path: '/api' , src:ApiIcon , selectedSrc:ApiIconSelected ,routerName: 'api' },
+ { name: '应用中心', path: '/app' , src:AppIcon , selectedSrc:AppIconSelected ,routerName: 'app' },
+ { name: '工具', path: '/tools' , src:WitchainDIcon , selectedSrc:WitchainDIconSelected ,routerName: 'witchainD' },
];
export interface ModelForm {
max_tokens?: number;
@@ -184,9 +189,6 @@ watch(
},
{ deep: true },
);
-const handleSelect = (val: any) => {
- console.log(val);
-};
@@ -229,7 +231,10 @@ const handleSelect = (val: any) => {