Skip to content

Commit b2aecdb

Browse files
feat: Set display history (#3937)
Co-authored-by: wangdan-fit2cloud <[email protected]>
1 parent c082dae commit b2aecdb

File tree

10 files changed

+34
-21
lines changed

10 files changed

+34
-21
lines changed
Lines changed: 1 addition & 0 deletions
Loading

ui/src/components/ai-chat/component/knowledge-source-component/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323
<el-card shadow="never" style="--el-card-padding: 8px">
2424
<div class="flex-between">
2525
<div class="flex align-center">
26-
<img :src="getImgUrl(item && item?.document_name)" alt="" width="24" />
26+
<img
27+
src="@/assets/fileType/web-link-icon.svg"
28+
alt=""
29+
width="24"
30+
v-if="item?.meta?.source_file_id || item?.meta?.source_url"
31+
/>
32+
<img v-else :src="getImgUrl(item && item?.document_name)" alt="" width="24" />
2733
<div
2834
class="ml-4 ellipsis-1"
2935
:title="item?.document_name"

ui/src/components/resource-authorization-drawer/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
:title="$t('views.system.resourceAuthorization.title')"
55
size="60%"
66
:append-to-body="true"
7-
:modal="false"
87
>
98
<div class="flex-between mb-16">
109
<el-button
@@ -159,7 +158,7 @@ const { user } = useStore()
159158
const props = defineProps<{
160159
type: string
161160
}>()
162-
const permissionOptions = computed(() => {
161+
const permissionOptions = computed(() => {
163162
return getPermissionOptions()
164163
})
165164
const drawerVisible = ref(false)

ui/src/stores/modules/chat-user.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type {ChatProfile, ChatUserProfile} from '@/api/type/chat'
44
import type {LoginRequest} from '@/api/type/user'
55
import type {Ref} from 'vue'
66
import {getBrowserLang} from '@/locales/index'
7-
import LoginApi from "@/api/user/login.ts";
8-
import useUserStore from "@/stores/modules/user.ts";
97

108
interface ChatUser {
119
// 用户id
@@ -46,6 +44,7 @@ const useChatUserStore = defineStore('chat-user', {
4644
},
4745
applicationProfile() {
4846
return ChatAPI.applicationProfile().then((ok) => {
47+
console.log('applicationProfile', ok.data)
4948
this.application = ok.data
5049
localStorage.setItem(`${this.accessToken}-locale`, ok.data?.language || this.getLanguage())
5150
})

ui/src/styles/component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
// radio-button-group
157157
.app-radio-button-group {
158158
background: #ffffff;
159-
border: 1px solid var(--app-border-color-dark);
159+
border: 1px solid var(--el-border-color);
160160
border-radius: var(--el-border-radius-base);
161161
.el-radio-button {
162162
padding: 3px;

ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@
442442
$t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')
443443
"
444444
/>
445+
<el-checkbox
446+
v-model="xpackForm.show_history"
447+
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showHistory')"
448+
/>
445449
<el-checkbox
446450
v-model="xpackForm.show_guide"
447451
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.displayGuide')"
@@ -483,12 +487,9 @@ import type { FormInstance, FormRules, UploadFiles } from 'element-plus'
483487
import { isAppIcon } from '@/utils/common'
484488
import { MsgSuccess, MsgError } from '@/utils/message'
485489
import { langList, t } from '@/locales'
486-
import useStore from '@/stores'
487490
import { cloneDeep } from 'lodash'
488491
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
489492
490-
const { user } = useStore()
491-
492493
const route = useRoute()
493494
const {
494495
params: { id },

ui/src/views/application-workflow/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ function back() {
211211
MsgConfirm(t('common.tip'), t('views.applicationWorkflow.tip.saveMessage'), {
212212
confirmButtonText: t('views.applicationWorkflow.setting.exitSave'),
213213
cancelButtonText: t('views.applicationWorkflow.setting.exit'),
214-
type: 'warning',
215214
distinguishCancelAndClose: true,
216215
})
217216
.then(() => {

ui/src/views/chat/component/HistoryPanel.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<el-menu
44
:default-active="currentChatId"
55
:collapse="isPcCollapse"
6-
collapse-transition
6+
:collapse-transition="false"
77
popper-class="chat-pc-popper"
88
class="h-full"
99
>
@@ -37,7 +37,11 @@
3737
<AppIcon iconName="app-create-chat"></AppIcon>
3838
<span class="ml-4">{{ $t('chat.createChat') }}</span>
3939
</el-button>
40-
<div v-show="!isPcCollapse" class="flex-between p-8 pb-0 color-secondary mt-8">
40+
<div
41+
v-show="!isPcCollapse"
42+
class="flex-between p-8 pb-0 color-secondary mt-8"
43+
v-if="applicationDetail.show_history || hasPermission(EditionConst.IS_CE, 'OR')"
44+
>
4145
<span>{{ $t('chat.history') }}</span>
4246
<el-tooltip effect="dark" :content="$t('chat.clearChat')" placement="right">
4347
<el-button text @click.stop="clearChat">
@@ -46,7 +50,11 @@
4650
</el-tooltip>
4751
</div>
4852
</div>
49-
<div v-show="!isPcCollapse" class="left-height">
53+
<div
54+
v-show="!isPcCollapse"
55+
class="left-height"
56+
v-if="applicationDetail.show_history || hasPermission(EditionConst.IS_CE, 'OR')"
57+
>
5058
<el-scrollbar>
5159
<div class="p-16 pt-0">
5260
<common-list
@@ -103,7 +111,7 @@
103111
<template #title>{{ $t('chat.createChat') }}</template>
104112
</el-menu-item>
105113

106-
<el-sub-menu v-show="isPcCollapse" index="2">
114+
<el-sub-menu v-show="isPcCollapse" index="2" v-if="applicationDetail.show_history || hasPermission(EditionConst.IS_CE, 'OR')">
107115
<template #title>
108116
<AppIcon iconName="app-history-outlined" />
109117
</template>
@@ -163,6 +171,8 @@
163171
import { ref } from 'vue'
164172
import { isAppIcon } from '@/utils/common'
165173
import EditTitleDialog from './EditTitleDialog.vue'
174+
import { EditionConst } from '@/utils/permission/data'
175+
import { hasPermission } from '@/utils/permission/index'
166176
const props = defineProps<{
167177
applicationDetail: any
168178
chatLogData: any[]

ui/src/views/tool/component/McpToolConfigDialog.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@
1111
class="mcp-config-dialog"
1212
>
1313
<el-form label-width="auto" label-position="top">
14-
<el-form-item>
14+
<el-form-item @mouseenter.stop="showIcon = true" @mouseleave.stop="showIcon = false">
1515
<el-input
1616
type="textarea"
1717
v-model="mcp_servers"
1818
rows="8"
1919
disabled
2020
class="config-textarea"
21-
@mouseenter.stop="showIcon = true"
22-
@mouseleave.stop="showIcon = false"
2321
></el-input>
24-
<el-button circle class="copy-icon" v-if="showIcon" @click="copyClick(mcp_servers)">
25-
<AppIcon iconName="app-copy" class="color-secondary"/>
22+
<el-button circle class="copy-icon" v-show="showIcon" @click.stop="copyClick(mcp_servers)">
23+
<AppIcon iconName="app-copy" class="color-secondary" />
2624
</el-button>
2725
</el-form-item>
2826
</el-form>

ui/src/workflow/nodes/form-node/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@
111111
}}</span>
112112
</template>
113113
</el-table-column>
114-
<el-table-column :label="$t('common.required')" width="85">
114+
<el-table-column :label="$t('common.required')" width="55">
115115
<template #default="{ row }">
116116
<div @click.stop>
117117
<el-switch disabled size="small" v-model="row.required" />
118118
</div>
119119
</template>
120120
</el-table-column>
121-
<el-table-column :label="$t('common.operation')" align="left" width="90">
121+
<el-table-column :label="$t('common.operation')" align="left" width="80">
122122
<template #default="{ row, $index }">
123123
<span class="mr-4">
124124
<el-tooltip effect="dark" :content="$t('common.modify')" placement="top">

0 commit comments

Comments
 (0)