diff --git a/CHANGELOG.md b/CHANGELOG.md index 2be7ff2..09099bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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.1](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.14.0...v1.14.1) (2025-07-30) + + +### Bug Fixes + +* 额度耗尽的错误提示 ([b6b9580](https://github.com/TencentCloudBase/cloudbase-agent-ui/commit/b6b95800693e5ecac4b64aa5fb7d462ca350bf63)) + ## [1.14.0](https://github.com/TencentCloudBase/cloudbase-agent-ui/compare/v1.13.2...v1.14.0) (2025-06-11) diff --git a/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js b/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js index 4421b68..1a57c80 100644 --- a/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js +++ b/apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js @@ -1425,7 +1425,12 @@ Component({ lastValue.knowledge_meta = []; lastValue.content = this.data.defaultErrorMsg; if (error && error.message) { - lastValue.error = error.message; + if (error.code === "EXCEED_TOKEN_QUOTA_LIMIT") { + lastValue.content = "大模型 Token 已耗尽,请通知开发者前往云开发平台进行处理"; + lastValue.error = lastValue.content; + } else { + lastValue.content = error.message; + } this.setData({ [`chatRecords[${lastValueIndex}].error`]: lastValue.error, }); diff --git a/components/agent-ui/index.js b/components/agent-ui/index.js index 4421b68..1a57c80 100644 --- a/components/agent-ui/index.js +++ b/components/agent-ui/index.js @@ -1425,7 +1425,12 @@ Component({ lastValue.knowledge_meta = []; lastValue.content = this.data.defaultErrorMsg; if (error && error.message) { - lastValue.error = error.message; + if (error.code === "EXCEED_TOKEN_QUOTA_LIMIT") { + lastValue.content = "大模型 Token 已耗尽,请通知开发者前往云开发平台进行处理"; + lastValue.error = lastValue.content; + } else { + lastValue.content = error.message; + } this.setData({ [`chatRecords[${lastValueIndex}].error`]: lastValue.error, }); diff --git a/package-lock.json b/package-lock.json index 4c8579c..065a37a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cloudbase-agent-ui", - "version": "1.14.0", + "version": "1.14.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cloudbase-agent-ui", - "version": "1.14.0", + "version": "1.14.1", "license": "MIT", "dependencies": { "standard-version": "^9.5.0" diff --git a/package.json b/package.json index b9cb64f..d7c3091 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudbase-agent-ui", - "version": "1.14.0", + "version": "1.14.1", "description": "微信小程序 Agent UI组件", "main": "index.js", "directories": {