diff --git a/components.d.ts b/components.d.ts index 41df77f..dca6114 100644 --- a/components.d.ts +++ b/components.d.ts @@ -18,6 +18,7 @@ declare module 'vue' { ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] + MultiLineTooltip: typeof import('./src/components/MultiLineTooltip/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default'] diff --git a/public/config.json b/public/config.json new file mode 100644 index 0000000..fc2bd32 --- /dev/null +++ b/public/config.json @@ -0,0 +1,19 @@ +{ + "title": "数联网", + "subTitle": "众创智能体", + "centerTitle": "多智能体协同平台", + "taskPromptWords": [ + "如何快速筛选慢性肾脏病药物潜在受试者?", + "如何补充“丹芍活血胶囊”不良反应数据?", + "如何快速研发用于战场失血性休克的药物?", + "二维材料的光电性质受哪些关键因素影响?", + "如何通过AI模拟的方法分析材料的微观结构?", + "如何分析获取液态金属热力学参数?", + "如何解决固态电池的成本和寿命难题?", + "如何解决船舶制造中的材料腐蚀难题?", + "如何解决船舶制造中流体模拟和建模优化难题?" + ], + "agentRepository": { + "storageVersionIdentifier": "1" + } +} diff --git a/src/components/MultiLineTooltip/index.vue b/src/components/MultiLineTooltip/index.vue new file mode 100644 index 0000000..7396b5b --- /dev/null +++ b/src/components/MultiLineTooltip/index.vue @@ -0,0 +1,93 @@ + + + + + {{ text }} + + + + + + + + diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue index 4b370c0..fe15026 100644 --- a/src/layout/components/Header.vue +++ b/src/layout/components/Header.vue @@ -1,15 +1,21 @@ - - 数联网众创智能体 + + {{ configStore.config.title }}{{ configStore.config.subTitle }} + + + {{ configStore.config.centerTitle }} - 多智能体协同平台 diff --git a/src/layout/components/Main/Task.vue b/src/layout/components/Main/Task.vue index 525e6c6..0a5aaa2 100644 --- a/src/layout/components/Main/Task.vue +++ b/src/layout/components/Main/Task.vue @@ -2,7 +2,7 @@ import { ref } from 'vue' import SvgIcon from '@/components/SvgIcon/index.vue' -import { useAgentsStore } from '@/stores' +import { useAgentsStore, useConfigStore } from '@/stores' import api from '@/api' import { changeBriefs } from '@/utils/collaboration_Brief_FrontEnd.ts' import { ElMessage } from 'element-plus' @@ -13,6 +13,7 @@ const emit = defineEmits<{ }>() const agentsStore = useAgentsStore() +const configStore = useConfigStore() const searchValue = ref('') const triggerOnFocus = ref(true) @@ -41,22 +42,10 @@ async function handleSearch() { } } -const restaurants = ref([ - '如何快速筛选慢性肾脏病药物潜在受试者?', - '如何补充“丹芍活血胶囊”不良反应数据?', - '如何快速研发用于战场失血性休克的药物?', - '二维材料的光电性质受哪些关键因素影响?', - '如何通过AI模拟的方法分析材料的微观结构?', - '如何分析获取液态金属热力学参数?', - '如何解决固态电池的成本和寿命难题?', - '如何解决船舶制造中的材料腐蚀难题?', - '如何解决船舶制造中流体模拟和建模优化难题?', -]) const querySearch = (queryString: string, cb: (v: { value: string }[]) => void) => { - console.log(queryString) const results = queryString - ? restaurants.value.filter(createFilter(queryString)) - : restaurants.value + ? configStore.config.taskPromptWords.filter(createFilter(queryString)) + : configStore.config.taskPromptWords // call callback function to return suggestions cb(results.map((item) => ({ value: item }))) } diff --git a/src/layout/components/Main/TaskTemplate/TaskResult/ExecutePlan.vue b/src/layout/components/Main/TaskTemplate/TaskResult/ExecutePlan.vue index 1c3c03b..9823d72 100644 --- a/src/layout/components/Main/TaskTemplate/TaskResult/ExecutePlan.vue +++ b/src/layout/components/Main/TaskTemplate/TaskResult/ExecutePlan.vue @@ -15,14 +15,19 @@ const md = new MarkdownIt({ html: true, linkify: true, typographer: true, + breaks: true, }) function sanitize(str?: string) { if (!str) { return '' } - const html = md.render(str) - return DOMPurify.sanitize(html) + const cleanStr = str + .replace(/\\n/g, '\n') + .replace(/\n\s*\d+\./g, '\n$&') + const html = md.render(cleanStr) + return html + // return DOMPurify.sanitize(html) } interface Data { diff --git a/src/layout/components/Main/TaskTemplate/TaskSyllabus/Bg.vue b/src/layout/components/Main/TaskTemplate/TaskSyllabus/Bg.vue new file mode 100644 index 0000000..e6b0a2a --- /dev/null +++ b/src/layout/components/Main/TaskTemplate/TaskSyllabus/Bg.vue @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/layout/components/Main/TaskTemplate/TaskSyllabus/index.vue b/src/layout/components/Main/TaskTemplate/TaskSyllabus/index.vue index 2f1e039..1e44563 100644 --- a/src/layout/components/Main/TaskTemplate/TaskSyllabus/index.vue +++ b/src/layout/components/Main/TaskTemplate/TaskSyllabus/index.vue @@ -1,14 +1,13 @@