Skip to content

Commit 3501470

Browse files
fix: Fix the styling issue on the conversation page
1 parent babd02b commit 3501470

File tree

9 files changed

+147
-100
lines changed

9 files changed

+147
-100
lines changed

ui/src/components/ai-chat/component/operation-button/MobileVoteReasonDrawer.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<template>
2-
<el-drawer v-model="visible" direction="btt" size="-" footer-class="mobile-vote-drawer-footer" :modal="true">
2+
<el-drawer
3+
v-model="visible"
4+
direction="btt"
5+
size="-"
6+
footer-class="mobile-vote-drawer-footer"
7+
:modal="true"
8+
>
39
<template #header>
410
<h4 class="text-center">{{ title }}</h4>
511
</template>
@@ -28,8 +34,8 @@
2834
</template>
2935
<template #footer>
3036
<el-space fill wrap :fill-ratio="40" style="width: 100%">
31-
<el-button @click="visible = false"> {{ $t('common.cancel') }}</el-button>
32-
<el-button :disabled="isSubmitDisabled" type="primary" @click="voteHandle()">
37+
<el-button @click="visible = false" size="large"> {{ $t('common.cancel') }}</el-button>
38+
<el-button :disabled="isSubmitDisabled" type="primary" size="large" @click="voteHandle()">
3339
{{ $t('common.submit') }}</el-button
3440
>
3541
</el-space>
@@ -122,6 +128,6 @@ defineExpose({ open })
122128
<style lang="scss">
123129
.mobile-vote-drawer-footer {
124130
padding: 0 24px 32px 24px;
125-
border: none!important;
131+
border: none !important;
126132
}
127133
</style>

ui/src/components/ai-chat/component/question-content/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
22
<!-- 问题内容 -->
3-
<div @mouseenter.stop="showIcon = true" @mouseleave.stop="showIcon = false">
3+
<div
4+
@mouseenter.stop="showIcon = true"
5+
@mouseleave.stop="showIcon = false"
6+
>
47
<div class="question-content item-content lighter">
58
<div v-if="!isReQuestion" class="content p-12-16 border-r-8" :class="getClassName">
69
<div class="text break-all pre-wrap">
@@ -104,12 +107,12 @@
104107
placement="top"
105108
v-if="props.isLast && props.type !== 'log'"
106109
>
107-
<el-button text @click="handleEdit(chatRecord)">
110+
<el-button text @click.stop="handleEdit(chatRecord)">
108111
<AppIcon class="color-secondary" iconName="app-edit"></AppIcon>
109112
</el-button>
110113
</el-tooltip>
111114
<el-tooltip effect="dark" :content="$t('common.copy')" placement="top">
112-
<el-button text @click="copyClick(chatRecord?.problem_text)">
115+
<el-button text @click.stop="copyClick(chatRecord?.problem_text)">
113116
<AppIcon class="color-secondary" iconName="app-copy"></AppIcon>
114117
</el-button>
115118
</el-tooltip>

ui/src/locales/lang/en-US/views/application.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export default {
88
senior: 'WORKFLOW',
99
simpleAgent: 'Simple Agent',
1010
AdvancedAgent: 'Advanced Agent',
11-
simplePlaceholder: 'Suitable for beginners to create assistant using form settings',
11+
simplePlaceholder: 'Quickly build intelligent agents with basic functions through form settings',
1212
advancedPlaceholder:
13-
'Suitable for advanced users to build complex logic AI assistants using low-code drag-and-drop',
13+
'Using low-code drag-and-drop methods, flexibly orchestrate complex logic and feature-rich agents',
1414
appTest: 'Debug Preview',
1515
skill: 'Skill',
1616
operation: {

ui/src/locales/lang/zh-CN/views/application.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default {
88
senior: '高级',
99
simpleAgent: '简易智能体',
1010
AdvancedAgent: '高级智能体',
11-
simplePlaceholder: '适用于初级用户使用表单设置构建AI对话助手',
12-
advancedPlaceholder: '适用于高级用户使用低代码拖拉拽方式构建复杂逻辑的AI对话助手',
11+
simplePlaceholder: '通过表单设置方式,快速搭建基础功能的智能体',
12+
advancedPlaceholder: '使用低代码拖拉拽方式,灵活编排复杂逻辑、功能丰富的智能体',
1313
appTest: '调试预览',
1414
skill: '技能',
1515

ui/src/locales/lang/zh-Hant/views/application.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default {
88
simpleAgent: '簡易智能體',
99
simple: '簡易',
1010
senior: '進階',
11-
simplePlaceholder: '適用於初級用戶使用表單設定構建AI對話助手',
12-
advancedPlaceholder: '適用於高階用戶使用低代碼拖拉拽方式構建複雜邏輯的AI對話助手',
11+
simplePlaceholder: '通過表單設置方式,快速搭建基礎功能的智能體',
12+
advancedPlaceholder: '使用低代碼拖拉拽方式,靈活編排複雜邏輯、功能豐富的智能體',
1313
appTest: '調試預覽',
1414
skill: '技能',
1515
operation: {

ui/src/views/application/ApplicationSetting.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,14 @@
269269
</div>
270270

271271
<div>
272-
<el-button type="primary" link @click="openParamSettingDialog">
273-
<AppIcon iconName="app-setting" class="mr-4"></AppIcon>
274-
{{ $t('common.paramSetting') }}
275-
</el-button>
272+
<span class="mr-4">
273+
<el-button type="primary" link @click="openParamSettingDialog">
274+
<AppIcon iconName="app-setting"></AppIcon>
275+
</el-button>
276+
</span>
277+
276278
<el-button type="primary" link @click="openKnowledgeDialog">
277-
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon>
278-
{{ $t('common.add') }}
279+
<AppIcon iconName="app-add-outlined"></AppIcon>
279280
</el-button>
280281
</div>
281282
</div>
@@ -349,7 +350,6 @@
349350
@refreshForm="refreshParam"
350351
>
351352
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon>
352-
{{ $t('common.add') }}
353353
</el-button>
354354
</div>
355355
</div>
@@ -415,14 +415,14 @@
415415
style="padding: 5px 8px"
416416
>
417417
<div class="flex align-center" style="line-height: 20px">
418-
<ToolIcon type="MCP" class="mr-8" :size="20"/>
418+
<ToolIcon type="MCP" class="mr-8" :size="20" />
419419
<div class="ellipsis">
420420
{{ $t('common.custom') + ' MCP' }}
421421
</div>
422422
</div>
423-
<el-button text @click="applicationForm.mcp_servers=''">
423+
<el-button text @click="applicationForm.mcp_servers = ''">
424424
<el-icon>
425-
<Close/>
425+
<Close />
426426
</el-icon>
427427
</el-button>
428428
</div>
@@ -452,7 +452,6 @@
452452
@refreshForm="refreshParam"
453453
>
454454
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon>
455-
{{ $t('common.add') }}
456455
</el-button>
457456
</div>
458457
</div>
@@ -527,7 +526,6 @@
527526
@refreshForm="refreshParam"
528527
>
529528
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon>
530-
{{ $t('common.add') }}
531529
</el-button>
532530
</div>
533531
</div>
@@ -1054,6 +1052,7 @@ function submitMcpServersDialog(config: any) {
10541052
applicationForm.value.mcp_servers = config.mcp_servers
10551053
applicationForm.value.mcp_tool_ids = config.mcp_tool_ids
10561054
applicationForm.value.mcp_source = config.mcp_source
1055+
collapseData.MCP = true
10571056
}
10581057
10591058
const toolDialogRef = ref()
@@ -1063,6 +1062,7 @@ function openToolDialog() {
10631062
10641063
function submitToolDialog(config: any) {
10651064
applicationForm.value.tool_ids = config.tool_ids
1065+
collapseData.tool = true
10661066
}
10671067
10681068
const applicationDialogRef = ref()
@@ -1072,6 +1072,7 @@ function openApplicationDialog() {
10721072
10731073
function submitApplicationDialog(config: any) {
10741074
applicationForm.value.application_ids = config.application_ids
1075+
collapseData.agent = true
10751076
}
10761077
10771078
const applicationSelectOptions = ref<any[]>([])

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

Lines changed: 65 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -120,56 +120,74 @@
120120
<template #title>
121121
<AppIcon iconName="app-history-outlined" />
122122
</template>
123+
<div class="flex-between p-8 ml-8">
124+
<span>{{ $t('chat.history') }}</span>
125+
<el-tooltip effect="dark" :content="$t('chat.clearChat')" placement="right">
126+
<el-button text @click.stop="clearChat">
127+
<AppIcon
128+
iconName="app-delete"
129+
class="color-secondary"
130+
style="font-size: 16px"
131+
></AppIcon>
132+
</el-button>
133+
</el-tooltip>
134+
</div>
135+
123136
<div class="left-height">
124137
<el-scrollbar>
125-
<el-menu-item-group v-loading="leftLoading">
126-
<template #title>
127-
<div class="flex-between w-full">
128-
<span>{{ $t('chat.history') }}</span>
129-
<el-tooltip effect="dark" :content="$t('chat.clearChat')" placement="right">
130-
<el-button text @click.stop="clearChat">
131-
<AppIcon
132-
iconName="app-delete"
133-
class="color-secondary"
134-
style="font-size: 16px"
135-
></AppIcon>
136-
</el-button>
137-
</el-tooltip>
138-
</div>
139-
</template>
138+
<InfiniteScroll
139+
:size="chatLogData.length"
140+
:total="_chatLogPagination?.total || 0"
141+
:page_size="_chatLogPagination?.page_size || 20"
142+
v-model:current_page="_chatLogPagination.current_page"
143+
@load="scrollData"
144+
:loading="leftLoading"
145+
>
146+
<div v-loading="leftLoading">
147+
<el-menu-item
148+
v-for="row in chatLogData"
149+
:index="row.id"
150+
:key="row.id"
151+
@click="handleClickList(row)"
152+
@mouseenter="mouseenter(row)"
153+
@mouseleave="mouseId = ''"
154+
>
155+
<div class="flex-between w-full lighter">
156+
<span :title="row.abstract" class="ellipsis">
157+
{{ row.abstract }}
158+
</span>
159+
<div @click.stop class="flex" v-show="mouseId === row.id && row.id !== 'new'">
160+
<el-dropdown trigger="click" :teleported="false">
161+
<el-button text class="lighter" style="padding: 1px !important">
162+
<AppIcon iconName="app-more" style="margin-right: 0"></AppIcon>
163+
</el-button>
140164

141-
<el-menu-item
142-
v-for="row in chatLogData"
143-
:index="row.id"
144-
:key="row.id"
145-
@click="handleClickList(row)"
146-
@mouseenter="mouseenter(row)"
147-
@mouseleave="mouseId = ''"
148-
>
149-
<div class="flex-between w-full lighter">
150-
<span :title="row.abstract" class="ellipsis">
151-
{{ row.abstract }}
152-
</span>
153-
<div @click.stop class="flex" v-show="mouseId === row.id && row.id !== 'new'">
154-
<el-dropdown trigger="click" :teleported="false">
155-
<AppIcon iconName="app-more" class="mt-4 lighter"></AppIcon>
156-
<template #dropdown>
157-
<el-dropdown-menu>
158-
<el-dropdown-item @click.stop="editLogTitle(row)">
159-
<AppIcon iconName="app-edit" class="color-secondary"></AppIcon>
160-
{{ $t('common.edit') }}
161-
</el-dropdown-item>
162-
<el-dropdown-item @click.stop="deleteChatLog(row)">
163-
<AppIcon iconName="app-delete" class="color-secondary"></AppIcon>
164-
{{ $t('common.delete') }}
165-
</el-dropdown-item>
166-
</el-dropdown-menu>
167-
</template>
168-
</el-dropdown>
165+
<template #dropdown>
166+
<el-dropdown-menu>
167+
<el-dropdown-item @click.stop="editLogTitle(row)">
168+
<AppIcon
169+
iconName="app-edit"
170+
style="color: var(--app-text-color-secondary)"
171+
class="mr-4"
172+
></AppIcon>
173+
{{ $t('common.edit') }}
174+
</el-dropdown-item>
175+
<el-dropdown-item @click.stop="deleteChatLog(row)">
176+
<AppIcon
177+
iconName="app-delete"
178+
style="color: var(--app-text-color-secondary)"
179+
class="mr-4"
180+
></AppIcon>
181+
{{ $t('common.delete') }}
182+
</el-dropdown-item>
183+
</el-dropdown-menu>
184+
</template>
185+
</el-dropdown>
186+
</div>
169187
</div>
170-
</div>
171-
</el-menu-item>
172-
</el-menu-item-group>
188+
</el-menu-item>
189+
</div>
190+
</InfiniteScroll>
173191
</el-scrollbar>
174192
</div>
175193
<div v-if="!chatLogData?.length" class="text-center">
@@ -289,6 +307,7 @@ function refreshFieldTitle(chatId: string, abstract: string) {
289307
</style>
290308
<style lang="scss">
291309
.chat-pc-popper {
310+
background: #eef1f4;
292311
.el-menu {
293312
background: var(--el-color-primary-light-06) !important;
294313
}

0 commit comments

Comments
 (0)