Skip to content

Commit e5c152f

Browse files
authored
Merge pull request #81 from TencentCloudBase/dev
Dev
2 parents b375ce6 + 8ba65a3 commit e5c152f

File tree

5 files changed

+70
-53
lines changed

5 files changed

+70
-53
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
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.14.3](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.14.1...v1.14.3) (2025-10-11)
6+
7+
8+
### Bug Fixes
9+
10+
* 改造对话接口 ([2795b5a](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/2795b5a1e0d8a920c1733a9dfb268edd53cd719f))
11+
* 修改对话接口 ([f6ebe9d](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/f6ebe9dfe20327ba3ea9afab172e199a9f31847a))
12+
* fix bug ([40e4412](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/40e441257b040126ffb3763945bfa01f0d05be9b))
13+
514
### [1.14.1](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.14.0...v1.14.1) (2025-07-30)
615

716

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

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,36 @@ Component({
3434
success: async (res) => {
3535
const appBaseInfo = wx.getAppBaseInfo();
3636
const fileId = res.fileID;
37-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" });
3837
console.log("当前版本", appBaseInfo.SDKVersion);
39-
commonRequest({
40-
path: `bots/${botId}/files`,
41-
data: {
42-
fileList: [
43-
{
44-
fileName: rawFileName || tempFileName,
45-
fileId,
46-
type: rawType,
47-
},
48-
],
49-
}, // any
50-
method: "POST",
51-
timeout: 60000,
52-
success: (res) => {
53-
console.log("resolve agent file res", res);
54-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
55-
},
56-
fail: (e) => {
57-
console.log("e", e);
58-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" });
59-
},
60-
complete: () => {},
61-
header: {},
62-
})
38+
if (botId.startsWith("ibot")) {
39+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
40+
} else {
41+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" });
42+
commonRequest({
43+
path: `bots/${botId}/files`,
44+
data: {
45+
fileList: [
46+
{
47+
fileName: rawFileName || tempFileName,
48+
fileId,
49+
type: rawType,
50+
},
51+
],
52+
}, // any
53+
method: "POST",
54+
timeout: 60000,
55+
success: (res) => {
56+
console.log("resolve agent file res", res);
57+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
58+
},
59+
fail: (e) => {
60+
console.log("e", e);
61+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" });
62+
},
63+
complete: () => {},
64+
header: {},
65+
});
66+
}
6367
},
6468
fail: (err) => {
6569
console.error("上传失败:", err);

components/agent-ui/chatFile/index.js

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,36 @@ Component({
3434
success: async (res) => {
3535
const appBaseInfo = wx.getAppBaseInfo();
3636
const fileId = res.fileID;
37-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" });
3837
console.log("当前版本", appBaseInfo.SDKVersion);
39-
commonRequest({
40-
path: `bots/${botId}/files`,
41-
data: {
42-
fileList: [
43-
{
44-
fileName: rawFileName || tempFileName,
45-
fileId,
46-
type: rawType,
47-
},
48-
],
49-
}, // any
50-
method: "POST",
51-
timeout: 60000,
52-
success: (res) => {
53-
console.log("resolve agent file res", res);
54-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
55-
},
56-
fail: (e) => {
57-
console.log("e", e);
58-
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" });
59-
},
60-
complete: () => {},
61-
header: {},
62-
})
38+
if (botId.startsWith("ibot")) {
39+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
40+
} else {
41+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" });
42+
commonRequest({
43+
path: `bots/${botId}/files`,
44+
data: {
45+
fileList: [
46+
{
47+
fileName: rawFileName || tempFileName,
48+
fileId,
49+
type: rawType,
50+
},
51+
],
52+
}, // any
53+
method: "POST",
54+
timeout: 60000,
55+
success: (res) => {
56+
console.log("resolve agent file res", res);
57+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" });
58+
},
59+
fail: (e) => {
60+
console.log("e", e);
61+
this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" });
62+
},
63+
complete: () => {},
64+
header: {},
65+
});
66+
}
6367
},
6468
fail: (err) => {
6569
console.error("上传失败:", err);

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.14.2",
3+
"version": "1.14.3",
44
"description": "微信小程序 Agent UI组件",
55
"main": "index.js",
66
"directories": {

0 commit comments

Comments
 (0)