From b2aecdbec0b151fd3b747f31d44cfd0a45d56ef0 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:09:45 +0800 Subject: [PATCH] feat: Set display history (#3937) Co-authored-by: wangdan-fit2cloud --- ui/src/assets/fileType/web-link-icon.svg | 1 + .../knowledge-source-component/index.vue | 8 +++++++- .../resource-authorization-drawer/index.vue | 3 +-- ui/src/stores/modules/chat-user.ts | 3 +-- ui/src/styles/component.scss | 2 +- .../XPackDisplaySettingDialog.vue | 7 ++++--- ui/src/views/application-workflow/index.vue | 1 - ui/src/views/chat/component/HistoryPanel.vue | 18 ++++++++++++++---- .../tool/component/McpToolConfigDialog.vue | 8 +++----- ui/src/workflow/nodes/form-node/index.vue | 4 ++-- 10 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 ui/src/assets/fileType/web-link-icon.svg diff --git a/ui/src/assets/fileType/web-link-icon.svg b/ui/src/assets/fileType/web-link-icon.svg new file mode 100644 index 000000000..f09fab5ad --- /dev/null +++ b/ui/src/assets/fileType/web-link-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/src/components/ai-chat/component/knowledge-source-component/index.vue b/ui/src/components/ai-chat/component/knowledge-source-component/index.vue index b414ab5b6..10de2e02e 100644 --- a/ui/src/components/ai-chat/component/knowledge-source-component/index.vue +++ b/ui/src/components/ai-chat/component/knowledge-source-component/index.vue @@ -23,7 +23,13 @@
- + +
() -const permissionOptions = computed(() => { +const permissionOptions = computed(() => { return getPermissionOptions() }) const drawerVisible = ref(false) diff --git a/ui/src/stores/modules/chat-user.ts b/ui/src/stores/modules/chat-user.ts index 6ee648cf2..a6168ecac 100644 --- a/ui/src/stores/modules/chat-user.ts +++ b/ui/src/stores/modules/chat-user.ts @@ -4,8 +4,6 @@ import type {ChatProfile, ChatUserProfile} from '@/api/type/chat' import type {LoginRequest} from '@/api/type/user' import type {Ref} from 'vue' import {getBrowserLang} from '@/locales/index' -import LoginApi from "@/api/user/login.ts"; -import useUserStore from "@/stores/modules/user.ts"; interface ChatUser { // 用户id @@ -46,6 +44,7 @@ const useChatUserStore = defineStore('chat-user', { }, applicationProfile() { return ChatAPI.applicationProfile().then((ok) => { + console.log('applicationProfile', ok.data) this.application = ok.data localStorage.setItem(`${this.accessToken}-locale`, ok.data?.language || this.getLanguage()) }) diff --git a/ui/src/styles/component.scss b/ui/src/styles/component.scss index 4726a6011..c046a8ae7 100644 --- a/ui/src/styles/component.scss +++ b/ui/src/styles/component.scss @@ -156,7 +156,7 @@ // radio-button-group .app-radio-button-group { background: #ffffff; - border: 1px solid var(--app-border-color-dark); + border: 1px solid var(--el-border-color); border-radius: var(--el-border-radius-base); .el-radio-button { padding: 3px; diff --git a/ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue b/ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue index 2b9fcd67e..d464a0d71 100644 --- a/ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue +++ b/ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue @@ -442,6 +442,10 @@ $t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail') " /> + { diff --git a/ui/src/views/chat/component/HistoryPanel.vue b/ui/src/views/chat/component/HistoryPanel.vue index c91d2a5c7..471239c38 100644 --- a/ui/src/views/chat/component/HistoryPanel.vue +++ b/ui/src/views/chat/component/HistoryPanel.vue @@ -3,7 +3,7 @@ @@ -37,7 +37,11 @@ {{ $t('chat.createChat') }} -
+
{{ $t('chat.history') }} @@ -46,7 +50,11 @@
-
+
{{ $t('chat.createChat') }} - + @@ -163,6 +171,8 @@ import { ref } from 'vue' import { isAppIcon } from '@/utils/common' import EditTitleDialog from './EditTitleDialog.vue' +import { EditionConst } from '@/utils/permission/data' +import { hasPermission } from '@/utils/permission/index' const props = defineProps<{ applicationDetail: any chatLogData: any[] diff --git a/ui/src/views/tool/component/McpToolConfigDialog.vue b/ui/src/views/tool/component/McpToolConfigDialog.vue index a8cdd2373..ee6e061cf 100644 --- a/ui/src/views/tool/component/McpToolConfigDialog.vue +++ b/ui/src/views/tool/component/McpToolConfigDialog.vue @@ -11,18 +11,16 @@ class="mcp-config-dialog" > - + - - + + diff --git a/ui/src/workflow/nodes/form-node/index.vue b/ui/src/workflow/nodes/form-node/index.vue index 9249e0beb..d9f28add2 100644 --- a/ui/src/workflow/nodes/form-node/index.vue +++ b/ui/src/workflow/nodes/form-node/index.vue @@ -111,14 +111,14 @@ }} - + - +