Skip to content
Merged

Dev #63

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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.

### [1.12.5](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.4...v1.12.5) (2025-05-16)


### Bug Fixes

* 修复showBotName 配置问题 ([b1bc719](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/b1bc7191146d8b37ba683caf7b3bb89e56934720))

### [1.12.4](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.3...v1.12.4) (2025-05-16)


### Bug Fixes

* 优化图文混排问题&双标题问题 ([aa0ca34](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/aa0ca34d41434fcd07f1740722457d81abb81e7f))

### [1.12.3](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.2...v1.12.3) (2025-05-12)


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

#### ModelConfig

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

### 🚧 进行中开发

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

### 📅 未来计划

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Component({
allowMultiConversation: Boolean,
allowVoice: Boolean,
showToolCallDetail: Boolean,
showBotName: Boolean
},
},
modelConfig: {
Expand Down Expand Up @@ -80,6 +81,7 @@ Component({
showPullRefresh: true,
showToolCallDetail: true,
showMultiConversation: true,
showBotName: true,
showVoice: true,
useWebSearch: false,
showFeatureList: false,
Expand Down Expand Up @@ -171,6 +173,7 @@ Component({
showToolCallDetail,
allowMultiConversation,
allowVoice,
showBotName
} = this.data.agentConfig;
allowWebSearch = allowWebSearch === undefined ? true : allowWebSearch;
allowUploadFile = allowUploadFile === undefined ? true : allowUploadFile;
Expand All @@ -179,6 +182,7 @@ Component({
showToolCallDetail = showToolCallDetail === undefined ? true : showToolCallDetail;
allowMultiConversation = allowMultiConversation === undefined ? true : allowMultiConversation;
allowVoice = allowVoice === undefined ? true : allowVoice;
showBotName = showBotName === undefined ? true: showBotName;
this.setData({
bot,
questions,
Expand All @@ -190,6 +194,7 @@ Component({
showToolCallDetail: showToolCallDetail,
showMultiConversation: allowMultiConversation,
showVoice: allowVoice,
showBotName: showBotName
});
console.log("bot", this.data.bot);
if (chatMode === "bot" && this.data.bot.multiConversationEnable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
</view>
<!-- </view> -->
</view>
<view class="navBar" wx:if="{{chatMode === 'bot'}}">
<view class="nav-content" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
<view class="navBar {{showBotName ? 'showBotName' : 'hiddenBotName'}}" wx:if="{{chatMode === 'bot'}}">
<view class="nav-content {{showBotName ? 'showBotName' : 'hiddenBotName'}}" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
<image wx:if="{{bot.botId && showMultiConversation}}" bind:tap="openDrawer" class="con-icon" src="./imgs/indent-right.svg" mode="aspectFill"/>
<!-- <image src="{{bot.avatar}}" mode="aspectFill" class="bot-avatar"/> -->
<text class="bot-name">{{bot.name}}</text>
<text wx:if="{{showBotName}}" class="bot-name">{{bot.name}}</text>
<image wx:if="{{bot.botId && showMultiConversation}}" class="con-icon" bind:tap="createNewConversation" src="./imgs/chat-bubble-add.svg" mode="aspectFill"/>
</view>
</view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
touch-action: none; /* 增强禁止滚动效果 */
}

.showBotName {
height: 62px;
}

.hiddenBotName {
margin-top: 2px;
margin-bottom: 2px;
}

.nav {
width: 750rpx;
padding: 20px 0px 0px 0px;
Expand All @@ -22,7 +31,7 @@
}

.navBar {
height: 62px;
/* height: 62px; */
width: 100%;
box-shadow: 0 16px 16px #fff;
/* background: linear-gradient(to bottom,
Expand Down Expand Up @@ -73,7 +82,7 @@
}

.nav-content {
height:62px;
/* height:62px; */
display: flex;
align-items: center;
justify-content: space-around;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
.wd-markdown ._table ._td > ._p {
min-height: 1em;
}

.wd-markdown image {
width: 480rpx !important;
height: 480rpx !important;
}
/*!
Theme: GitHub
Description: Light theme as seen on github.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Page({
allowUploadImage: true, // 允许上传图片
showToolCallDetail: true, // 展示 toolCall 细节
allowMultiConversation: true,
allowVoice: true
allowVoice: true,
showBotName: true
},
modelConfig: {
modelProvider: "deepseek", // 大模型服务厂商
Expand Down
6 changes: 6 additions & 0 deletions apps/miniprogram-agent-ui/miniprogram/pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ Page({
type: "boolean",
desc: "允许展示语音按钮",
},
{
name: "agentConfig.showBotName",
type: "boolean",
desc: "允许展示bot名称",
},
{
name: "envShareConfig.resourceAppid",
type: "boolean",
Expand Down Expand Up @@ -153,6 +158,7 @@ Page({
allowMultiConversation: true, // 允许客户端展示查看会话列表/新建会话按钮
showToolCallDetail: true, // 是否展示 mcp server toolCall 细节
allowVoice: true, // 允许客户端展示语音按钮
showBotName: true, // 允许展示bot名称
},
modelConfig: {
modelProvider: "hunyuan-open", // 大模型服务厂商
Expand Down
5 changes: 5 additions & 0 deletions components/agent-ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Component({
allowMultiConversation: Boolean,
allowVoice: Boolean,
showToolCallDetail: Boolean,
showBotName: Boolean
},
},
modelConfig: {
Expand Down Expand Up @@ -80,6 +81,7 @@ Component({
showPullRefresh: true,
showToolCallDetail: true,
showMultiConversation: true,
showBotName: true,
showVoice: true,
useWebSearch: false,
showFeatureList: false,
Expand Down Expand Up @@ -171,6 +173,7 @@ Component({
showToolCallDetail,
allowMultiConversation,
allowVoice,
showBotName
} = this.data.agentConfig;
allowWebSearch = allowWebSearch === undefined ? true : allowWebSearch;
allowUploadFile = allowUploadFile === undefined ? true : allowUploadFile;
Expand All @@ -179,6 +182,7 @@ Component({
showToolCallDetail = showToolCallDetail === undefined ? true : showToolCallDetail;
allowMultiConversation = allowMultiConversation === undefined ? true : allowMultiConversation;
allowVoice = allowVoice === undefined ? true : allowVoice;
showBotName = showBotName === undefined ? true: showBotName;
this.setData({
bot,
questions,
Expand All @@ -190,6 +194,7 @@ Component({
showToolCallDetail: showToolCallDetail,
showMultiConversation: allowMultiConversation,
showVoice: allowVoice,
showBotName: showBotName
});
console.log("bot", this.data.bot);
if (chatMode === "bot" && this.data.bot.multiConversationEnable) {
Expand Down
6 changes: 3 additions & 3 deletions components/agent-ui/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
</view>
<!-- </view> -->
</view>
<view class="navBar" wx:if="{{chatMode === 'bot'}}">
<view class="nav-content" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
<view class="navBar {{showBotName ? 'showBotName' : 'hiddenBotName'}}" wx:if="{{chatMode === 'bot'}}">
<view class="nav-content {{showBotName ? 'showBotName' : 'hiddenBotName'}}" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
<image wx:if="{{bot.botId && showMultiConversation}}" bind:tap="openDrawer" class="con-icon" src="./imgs/indent-right.svg" mode="aspectFill"/>
<!-- <image src="{{bot.avatar}}" mode="aspectFill" class="bot-avatar"/> -->
<text class="bot-name">{{bot.name}}</text>
<text wx:if="{{showBotName}}" class="bot-name">{{bot.name}}</text>
<image wx:if="{{bot.botId && showMultiConversation}}" class="con-icon" bind:tap="createNewConversation" src="./imgs/chat-bubble-add.svg" mode="aspectFill"/>
</view>
</view>
Expand Down
13 changes: 11 additions & 2 deletions components/agent-ui/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
touch-action: none; /* 增强禁止滚动效果 */
}

.showBotName {
height: 62px;
}

.hiddenBotName {
margin-top: 2px;
margin-bottom: 2px;
}

.nav {
width: 750rpx;
padding: 20px 0px 0px 0px;
Expand All @@ -22,7 +31,7 @@
}

.navBar {
height: 62px;
/* height: 62px; */
width: 100%;
box-shadow: 0 16px 16px #fff;
/* background: linear-gradient(to bottom,
Expand Down Expand Up @@ -73,7 +82,7 @@
}

.nav-content {
height:62px;
/* height:62px; */
display: flex;
align-items: center;
justify-content: space-around;
Expand Down
5 changes: 5 additions & 0 deletions components/agent-ui/wd-markdown/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
.wd-markdown ._table ._td > ._p {
min-height: 1em;
}

.wd-markdown image {
width: 480rpx !important;
height: 480rpx !important;
}
/*!
Theme: GitHub
Description: Light theme as seen on github.com
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-agent-ui",
"version": "1.12.3",
"version": "1.12.5",
"description": "微信小程序 Agent UI组件",
"main": "index.js",
"directories": {
Expand Down
Loading