From cbf2376f789b13a449398c53606e2d358423d678 Mon Sep 17 00:00:00 2001 From: Hu Gang <18768366022@163.com> Date: Thu, 13 Mar 2025 20:50:08 +0800 Subject: [PATCH] ai assistant enhance --- ...e-deletion-and-naming-bug-of-history.patch | 0 0005-fix-host-statistics-inaccurate.patch | 39 + 0006-ai-assistant-support-dark-mode.patch | 791 ++++++++++++++++++ aops-hermes.spec | 10 +- 4 files changed, 838 insertions(+), 2 deletions(-) rename 0004-fixed-the-deletion-and-naming-bug-of-smart-Q&A-history.patch => 0004-fixed-the-deletion-and-naming-bug-of-history.patch (100%) create mode 100644 0005-fix-host-statistics-inaccurate.patch create mode 100644 0006-ai-assistant-support-dark-mode.patch diff --git a/0004-fixed-the-deletion-and-naming-bug-of-smart-Q&A-history.patch b/0004-fixed-the-deletion-and-naming-bug-of-history.patch similarity index 100% rename from 0004-fixed-the-deletion-and-naming-bug-of-smart-Q&A-history.patch rename to 0004-fixed-the-deletion-and-naming-bug-of-history.patch diff --git a/0005-fix-host-statistics-inaccurate.patch b/0005-fix-host-statistics-inaccurate.patch new file mode 100644 index 0000000..f7d1035 --- /dev/null +++ b/0005-fix-host-statistics-inaccurate.patch @@ -0,0 +1,39 @@ +From b2e6f4d6825bcc7198ad4b85c85987950efebbe5 Mon Sep 17 00:00:00 2001 +From: Hu Gang <18768366022@163.com> +Date: Tue, 11 Mar 2025 17:37:27 +0800 +Subject: [PATCH 1/2] fix: host statistics inaccurate + +--- + src/api/paths/vulnerability/index.ts | 2 +- + src/views/vulnerability/HostList.vue | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/api/paths/vulnerability/index.ts b/src/api/paths/vulnerability/index.ts +index 2316016..b9577f2 100644 +--- a/src/api/paths/vulnerability/index.ts ++++ b/src/api/paths/vulnerability/index.ts +@@ -239,7 +239,7 @@ function getCveHosts(params: { + Partial) { + return http.post<{ + result: Host[] +- total: number ++ total_count: number + total_page: number + }>('/vulnerabilities/host/list/get', params) + } +diff --git a/src/views/vulnerability/HostList.vue b/src/views/vulnerability/HostList.vue +index 048f2f1..147b97a 100644 +--- a/src/views/vulnerability/HostList.vue ++++ b/src/views/vulnerability/HostList.vue +@@ -148,7 +148,7 @@ async function queryHosts() { + }) + if (res) { + hostTableData.value = res.result +- pagination.total = res.total ++ pagination.total = res.total_count + } + queryHostStatus(hostTableData.value.map(item => item.host_id)) + +-- +2.33.0 + diff --git a/0006-ai-assistant-support-dark-mode.patch b/0006-ai-assistant-support-dark-mode.patch new file mode 100644 index 0000000..aa15605 --- /dev/null +++ b/0006-ai-assistant-support-dark-mode.patch @@ -0,0 +1,791 @@ +From de2353988d6fa2ed6f533a2f80706a2e2d6521e7 Mon Sep 17 00:00:00 2001 +From: Hu Gang <18768366022@163.com> +Date: Thu, 13 Mar 2025 17:02:52 +0800 +Subject: [PATCH 1/1] feat: ai assistant support dark mode + +--- + packages/ops-assistant/index.ts | 7 +- + .../ops-assistant/src/pages/FrontPage.vue | 7 +- + .../ops-assistant/src/pages/chat/Chat.vue | 4 +- + .../ops-assistant/src/pages/chat/Dialogue.vue | 2 +- + .../src/pages/chat/components/UserDialog.vue | 2 +- + .../src/pages/display/ConfRecord.vue | 6 +- + .../ops-assistant/src/pages/display/Cves.vue | 44 ++++++------ + .../src/pages/display/Display.vue | 13 +++- + .../src/pages/display/Domain.vue | 69 +++++++++---------- + .../ops-assistant/src/pages/display/Empty.vue | 1 - + .../src/pages/display/SyncResult.vue | 12 +--- + .../src/pages/display/components/TabBar.vue | 6 +- + .../display/components/TaskDetailPanel.vue | 13 ++-- + .../ops-assistant/src/styles/element.less | 15 ++++ + packages/ops-assistant/src/styles/flow.less | 4 +- + .../ops-assistant/src/styles/markdown.less | 11 ++- + packages/ops-assistant/src/styles/theme.css | 33 +++++---- + src/assets/styles/theme.css | 6 ++ + src/locales/lang/en.json | 2 +- + .../configuration/components/CompareDiff.vue | 42 ++++++----- + 20 files changed, 163 insertions(+), 136 deletions(-) + create mode 100644 packages/ops-assistant/src/styles/element.less + +diff --git a/packages/ops-assistant/index.ts b/packages/ops-assistant/index.ts +index 17595a4..2261e14 100644 +--- a/packages/ops-assistant/index.ts ++++ b/packages/ops-assistant/index.ts +@@ -1,10 +1,11 @@ + import Ops from './src/index.vue' +-import './src/styles/theme.css' +-import './src/styles/markdown.less' +-import './src/styles/flow.less' + import 'element-plus/dist/index.css' + import 'element-plus/theme-chalk/dark/css-vars.css' + import 'highlight.js/styles/github-dark.css' ++import './src/styles/theme.css' ++import './src/styles/markdown.less' ++import './src/styles/flow.less' ++import './src/styles/element.less' + + import type { App, Plugin } from 'vue' + +diff --git a/packages/ops-assistant/src/pages/FrontPage.vue b/packages/ops-assistant/src/pages/FrontPage.vue +index 2a8e355..80a423e 100644 +--- a/packages/ops-assistant/src/pages/FrontPage.vue ++++ b/packages/ops-assistant/src/pages/FrontPage.vue +@@ -190,7 +190,7 @@ onMounted(() => { +
  • + {{ item.question }} +@@ -214,7 +214,7 @@ onMounted(() => { + + + +-
    ++
    +

    { + :deep(.el-select__wrapper.is-focused) { + box-shadow: none; + } ++:deep(.el-select .el-select__wrapper) { ++ background: none; ++} + .placeholder { + position: relative; + &::before { +diff --git a/packages/ops-assistant/src/pages/chat/Chat.vue b/packages/ops-assistant/src/pages/chat/Chat.vue +index 95d947f..36550a6 100644 +--- a/packages/ops-assistant/src/pages/chat/Chat.vue ++++ b/packages/ops-assistant/src/pages/chat/Chat.vue +@@ -37,11 +37,11 @@ function onPageSwitch(key: string) { + +