Skip to content

Commit 31172ab

Browse files
authored
Merge pull request #61 from TencentCloudBase/dev
Dev
2 parents 847b614 + 290e60b commit 31172ab

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.3](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.2...v1.12.3) (2025-05-12)
6+
7+
8+
### Bug Fixes
9+
10+
* fix toolname parse ([ee872c8](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/ee872c8b9eb1e01e970e0b13ea2f9ecbad30bcac))
11+
512
### [1.12.2](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.12.1...v1.12.2) (2025-05-09)
613

714

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ Page({
147147

148148
![](https://qcloudimg.tencent-cloud.cn/raw/b45a95e06ec0df8dab5c9d9ec7707faa.png)
149149

150-
#### 4. agent-ui 组件工具卡片组件中配置自定义组件映射
150+
#### 4. 实现 Agent UI customCard 组件
151+
152+
- 在agent-ui customCard 组件(agent-ui/customCard/index.wxml) 中添加自定义逻辑,可根据不同 tool 类型渲染不同自定义组件
151153

152154
![](https://qcloudimg.tencent-cloud.cn/raw/b4cd35ccaa3e72189934ed59d35f7ae5.png)
153155

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,8 @@ Component({
398398
},
399399
transformToolName: function (str) {
400400
if (str) {
401-
const strArr = str.split("/");
402-
if (strArr[1]) {
403-
return strArr[1];
404-
} else if (strArr[0]) {
405-
return strArr[0];
406-
}
401+
const strArr = str.split(/\/+/);
402+
return strArr[strArr.length - 1];
407403
}
408404
return "";
409405
},

components/agent-ui/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,8 @@ Component({
398398
},
399399
transformToolName: function (str) {
400400
if (str) {
401-
const strArr = str.split("/");
402-
if (strArr[1]) {
403-
return strArr[1];
404-
} else if (strArr[0]) {
405-
return strArr[0];
406-
}
401+
const strArr = str.split(/\/+/);
402+
return strArr[strArr.length - 1];
407403
}
408404
return "";
409405
},

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudbase-agent-ui",
3-
"version": "1.12.2",
3+
"version": "1.12.3",
44
"description": "微信小程序 Agent UI组件",
55
"main": "index.js",
66
"directories": {

0 commit comments

Comments
 (0)