diff --git a/CHANGELOG.md b/CHANGELOG.md index 09099bf..cf97314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ 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.14.3](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.14.1...v1.14.3) (2025-10-11) + + +### Bug Fixes + +* 改造对话接口 ([2795b5a](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/2795b5a1e0d8a920c1733a9dfb268edd53cd719f)) +* 修改对话接口 ([f6ebe9d](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/f6ebe9dfe20327ba3ea9afab172e199a9f31847a)) +* fix bug ([40e4412](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/40e441257b040126ffb3763945bfa01f0d05be9b)) + ### [1.14.1](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.14.0...v1.14.1) (2025-07-30) diff --git a/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/chatFile/index.js b/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/chatFile/index.js index 3d3d7ab..0fbc10a 100644 --- a/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/chatFile/index.js +++ b/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/chatFile/index.js @@ -34,32 +34,36 @@ Component({ success: async (res) => { const appBaseInfo = wx.getAppBaseInfo(); const fileId = res.fileID; - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" }); console.log("当前版本", appBaseInfo.SDKVersion); - commonRequest({ - path: `bots/${botId}/files`, - data: { - fileList: [ - { - fileName: rawFileName || tempFileName, - fileId, - type: rawType, - }, - ], - }, // any - method: "POST", - timeout: 60000, - success: (res) => { - console.log("resolve agent file res", res); - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); - }, - fail: (e) => { - console.log("e", e); - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" }); - }, - complete: () => {}, - header: {}, - }) + if (botId.startsWith("ibot")) { + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); + } else { + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" }); + commonRequest({ + path: `bots/${botId}/files`, + data: { + fileList: [ + { + fileName: rawFileName || tempFileName, + fileId, + type: rawType, + }, + ], + }, // any + method: "POST", + timeout: 60000, + success: (res) => { + console.log("resolve agent file res", res); + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); + }, + fail: (e) => { + console.log("e", e); + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" }); + }, + complete: () => {}, + header: {}, + }); + } }, fail: (err) => { console.error("上传失败:", err); diff --git a/components/agent-ui/chatFile/index.js b/components/agent-ui/chatFile/index.js index 3d3d7ab..0fbc10a 100644 --- a/components/agent-ui/chatFile/index.js +++ b/components/agent-ui/chatFile/index.js @@ -34,32 +34,36 @@ Component({ success: async (res) => { const appBaseInfo = wx.getAppBaseInfo(); const fileId = res.fileID; - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" }); console.log("当前版本", appBaseInfo.SDKVersion); - commonRequest({ - path: `bots/${botId}/files`, - data: { - fileList: [ - { - fileName: rawFileName || tempFileName, - fileId, - type: rawType, - }, - ], - }, // any - method: "POST", - timeout: 60000, - success: (res) => { - console.log("resolve agent file res", res); - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); - }, - fail: (e) => { - console.log("e", e); - this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" }); - }, - complete: () => {}, - header: {}, - }) + if (botId.startsWith("ibot")) { + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); + } else { + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, status: "parsing" }); + commonRequest({ + path: `bots/${botId}/files`, + data: { + fileList: [ + { + fileName: rawFileName || tempFileName, + fileId, + type: rawType, + }, + ], + }, // any + method: "POST", + timeout: 60000, + success: (res) => { + console.log("resolve agent file res", res); + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parsed" }); + }, + fail: (e) => { + console.log("e", e); + this.triggerEvent("changeChild", { tempId: this.data.fileData.tempId, fileId, status: "parseFailed" }); + }, + complete: () => {}, + header: {}, + }); + } }, fail: (err) => { console.error("上传失败:", err); diff --git a/package-lock.json b/package-lock.json index 40def1d..5318d2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cloudbase-agent-ui", - "version": "1.14.2", + "version": "1.14.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cloudbase-agent-ui", - "version": "1.14.2", + "version": "1.14.3", "license": "MIT", "dependencies": { "standard-version": "^9.5.0" diff --git a/package.json b/package.json index 16bdbb3..3e83608 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudbase-agent-ui", - "version": "1.14.2", + "version": "1.14.3", "description": "微信小程序 Agent UI组件", "main": "index.js", "directories": {