Skip to content

Commit ad43995

Browse files
authored
Merge pull request #63 from TencentCloudBase/dev
Dev
2 parents 31172ab + 8ff13ee commit ad43995

14 files changed

Lines changed: 75 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.12.5](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.4...v1.12.5) (2025-05-16)
6+
7+
8+
### Bug Fixes
9+
10+
* 修复showBotName 配置问题 ([b1bc719](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/b1bc7191146d8b37ba683caf7b3bb89e56934720))
11+
12+
### [1.12.4](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.3...v1.12.4) (2025-05-16)
13+
14+
15+
### Bug Fixes
16+
17+
* 优化图文混排问题&双标题问题 ([aa0ca34](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/aa0ca34d41434fcd07f1740722457d81abb81e7f))
18+
519
### [1.12.3](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.2...v1.12.3) (2025-05-12)
620

721

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Page({
214214
| `allowMultiConversation` | `Boolean` || 是否允许客户端界面展示会话列表及新建会话按钮 |
215215
| `showToolCallDetail` | `Boolean` || 是否允许展示 mcp server toolcall 细节 |
216216
| `allowVoice` | `Boolean` || 是否允许客户端界面展示语音按钮 |
217+
| `showBotName` | `Boolean` || 是否允许客户端界面展示 Bot 名称 (当设置为false时,用户可手动在组件所属 page中自定义 navigationBarTitleText 为 Bot 名称) |
217218

218219
#### ModelConfig
219220

@@ -351,11 +352,11 @@ Page({
351352
- ✅ 支持文字转语音播放
352353
- ✅ 支持用户语音输入转文字
353354
- ✅ 支持语音音色配置
355+
- ✅ UI 双标题优化
354356

355357
### 🚧 进行中开发
356358

357359
- 多模型(快速响应/深度推理)切换调用配置化
358-
- UI 双标题优化
359360

360361
### 📅 未来计划
361362

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Component({
3030
allowMultiConversation: Boolean,
3131
allowVoice: Boolean,
3232
showToolCallDetail: Boolean,
33+
showBotName: Boolean
3334
},
3435
},
3536
modelConfig: {
@@ -80,6 +81,7 @@ Component({
8081
showPullRefresh: true,
8182
showToolCallDetail: true,
8283
showMultiConversation: true,
84+
showBotName: true,
8385
showVoice: true,
8486
useWebSearch: false,
8587
showFeatureList: false,
@@ -171,6 +173,7 @@ Component({
171173
showToolCallDetail,
172174
allowMultiConversation,
173175
allowVoice,
176+
showBotName
174177
} = this.data.agentConfig;
175178
allowWebSearch = allowWebSearch === undefined ? true : allowWebSearch;
176179
allowUploadFile = allowUploadFile === undefined ? true : allowUploadFile;
@@ -179,6 +182,7 @@ Component({
179182
showToolCallDetail = showToolCallDetail === undefined ? true : showToolCallDetail;
180183
allowMultiConversation = allowMultiConversation === undefined ? true : allowMultiConversation;
181184
allowVoice = allowVoice === undefined ? true : allowVoice;
185+
showBotName = showBotName === undefined ? true: showBotName;
182186
this.setData({
183187
bot,
184188
questions,
@@ -190,6 +194,7 @@ Component({
190194
showToolCallDetail: showToolCallDetail,
191195
showMultiConversation: allowMultiConversation,
192196
showVoice: allowVoice,
197+
showBotName: showBotName
193198
});
194199
console.log("bot", this.data.bot);
195200
if (chatMode === "bot" && this.data.bot.multiConversationEnable) {

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.wxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
</view>
4848
<!-- </view> -->
4949
</view>
50-
<view class="navBar" wx:if="{{chatMode === 'bot'}}">
51-
<view class="nav-content" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
50+
<view class="navBar {{showBotName ? 'showBotName' : 'hiddenBotName'}}" wx:if="{{chatMode === 'bot'}}">
51+
<view class="nav-content {{showBotName ? 'showBotName' : 'hiddenBotName'}}" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
5252
<image wx:if="{{bot.botId && showMultiConversation}}" bind:tap="openDrawer" class="con-icon" src="./imgs/indent-right.svg" mode="aspectFill"/>
5353
<!-- <image src="{{bot.avatar}}" mode="aspectFill" class="bot-avatar"/> -->
54-
<text class="bot-name">{{bot.name}}</text>
54+
<text wx:if="{{showBotName}}" class="bot-name">{{bot.name}}</text>
5555
<image wx:if="{{bot.botId && showMultiConversation}}" class="con-icon" bind:tap="createNewConversation" src="./imgs/chat-bubble-add.svg" mode="aspectFill"/>
5656
</view>
5757
</view>

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.wxss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
touch-action: none; /* 增强禁止滚动效果 */
1313
}
1414

15+
.showBotName {
16+
height: 62px;
17+
}
18+
19+
.hiddenBotName {
20+
margin-top: 2px;
21+
margin-bottom: 2px;
22+
}
23+
1524
.nav {
1625
width: 750rpx;
1726
padding: 20px 0px 0px 0px;
@@ -22,7 +31,7 @@
2231
}
2332

2433
.navBar {
25-
height: 62px;
34+
/* height: 62px; */
2635
width: 100%;
2736
box-shadow: 0 16px 16px #fff;
2837
/* background: linear-gradient(to bottom,
@@ -73,7 +82,7 @@
7382
}
7483

7584
.nav-content {
76-
height:62px;
85+
/* height:62px; */
7786
display: flex;
7887
align-items: center;
7988
justify-content: space-around;

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/wd-markdown/index.wxss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
.wd-markdown ._table ._td > ._p {
120120
min-height: 1em;
121121
}
122+
123+
.wd-markdown image {
124+
width: 480rpx !important;
125+
height: 480rpx !important;
126+
}
122127
/*!
123128
Theme: GitHub
124129
Description: Light theme as seen on github.com

apps/miniprogram-agent-ui/miniprogram/pages/chatBot/chatBot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Page({
2121
allowUploadImage: true, // 允许上传图片
2222
showToolCallDetail: true, // 展示 toolCall 细节
2323
allowMultiConversation: true,
24-
allowVoice: true
24+
allowVoice: true,
25+
showBotName: true
2526
},
2627
modelConfig: {
2728
modelProvider: "deepseek", // 大模型服务厂商

apps/miniprogram-agent-ui/miniprogram/pages/index/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ Page({
123123
type: "boolean",
124124
desc: "允许展示语音按钮",
125125
},
126+
{
127+
name: "agentConfig.showBotName",
128+
type: "boolean",
129+
desc: "允许展示bot名称",
130+
},
126131
{
127132
name: "envShareConfig.resourceAppid",
128133
type: "boolean",
@@ -153,6 +158,7 @@ Page({
153158
allowMultiConversation: true, // 允许客户端展示查看会话列表/新建会话按钮
154159
showToolCallDetail: true, // 是否展示 mcp server toolCall 细节
155160
allowVoice: true, // 允许客户端展示语音按钮
161+
showBotName: true, // 允许展示bot名称
156162
},
157163
modelConfig: {
158164
modelProvider: "hunyuan-open", // 大模型服务厂商

components/agent-ui/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Component({
3030
allowMultiConversation: Boolean,
3131
allowVoice: Boolean,
3232
showToolCallDetail: Boolean,
33+
showBotName: Boolean
3334
},
3435
},
3536
modelConfig: {
@@ -80,6 +81,7 @@ Component({
8081
showPullRefresh: true,
8182
showToolCallDetail: true,
8283
showMultiConversation: true,
84+
showBotName: true,
8385
showVoice: true,
8486
useWebSearch: false,
8587
showFeatureList: false,
@@ -171,6 +173,7 @@ Component({
171173
showToolCallDetail,
172174
allowMultiConversation,
173175
allowVoice,
176+
showBotName
174177
} = this.data.agentConfig;
175178
allowWebSearch = allowWebSearch === undefined ? true : allowWebSearch;
176179
allowUploadFile = allowUploadFile === undefined ? true : allowUploadFile;
@@ -179,6 +182,7 @@ Component({
179182
showToolCallDetail = showToolCallDetail === undefined ? true : showToolCallDetail;
180183
allowMultiConversation = allowMultiConversation === undefined ? true : allowMultiConversation;
181184
allowVoice = allowVoice === undefined ? true : allowVoice;
185+
showBotName = showBotName === undefined ? true: showBotName;
182186
this.setData({
183187
bot,
184188
questions,
@@ -190,6 +194,7 @@ Component({
190194
showToolCallDetail: showToolCallDetail,
191195
showMultiConversation: allowMultiConversation,
192196
showVoice: allowVoice,
197+
showBotName: showBotName
193198
});
194199
console.log("bot", this.data.bot);
195200
if (chatMode === "bot" && this.data.bot.multiConversationEnable) {

components/agent-ui/index.wxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
</view>
4848
<!-- </view> -->
4949
</view>
50-
<view class="navBar" wx:if="{{chatMode === 'bot'}}">
51-
<view class="nav-content" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
50+
<view class="navBar {{showBotName ? 'showBotName' : 'hiddenBotName'}}" wx:if="{{chatMode === 'bot'}}">
51+
<view class="nav-content {{showBotName ? 'showBotName' : 'hiddenBotName'}}" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
5252
<image wx:if="{{bot.botId && showMultiConversation}}" bind:tap="openDrawer" class="con-icon" src="./imgs/indent-right.svg" mode="aspectFill"/>
5353
<!-- <image src="{{bot.avatar}}" mode="aspectFill" class="bot-avatar"/> -->
54-
<text class="bot-name">{{bot.name}}</text>
54+
<text wx:if="{{showBotName}}" class="bot-name">{{bot.name}}</text>
5555
<image wx:if="{{bot.botId && showMultiConversation}}" class="con-icon" bind:tap="createNewConversation" src="./imgs/chat-bubble-add.svg" mode="aspectFill"/>
5656
</view>
5757
</view>

0 commit comments

Comments
 (0)