Skip to content

Commit b1bc719

Browse files
committed
fix: 修复showBotName 配置问题
1 parent bd48dbf commit b1bc719

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Page({
214214
| `allowMultiConversation` | `Boolean` || 是否允许客户端界面展示会话列表及新建会话按钮 |
215215
| `showToolCallDetail` | `Boolean` || 是否允许展示 mcp server toolcall 细节 |
216216
| `allowVoice` | `Boolean` || 是否允许客户端界面展示语音按钮 |
217+
| `showBotName` | `Boolean` || 是否允许客户端界面展示 Bot 名称 |
217218

218219
#### ModelConfig
219220

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

355357
### 🚧 进行中开发
356358

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

360361
### 📅 未来计划
361362

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Component({
3030
allowMultiConversation: Boolean,
3131
allowVoice: Boolean,
3232
showToolCallDetail: Boolean,
33+
showBotName: Boolean
3334
},
3435
},
3536
modelConfig: {
@@ -80,6 +81,7 @@ Component({
8081
showPullRefresh: true,
8182
showToolCallDetail: true,
8283
showMultiConversation: true,
84+
showBotName: true,
8385
showVoice: true,
8486
useWebSearch: false,
8587
showFeatureList: false,
@@ -126,7 +128,6 @@ Component({
126128
},
127129
voiceRecognizing: false,
128130
speedList: [2, 1.5, 1.25, 1, 0.75],
129-
showBotName: true,
130131
},
131132
attached: async function () {
132133
const chatMode = this.data.chatMode;
@@ -172,6 +173,7 @@ Component({
172173
showToolCallDetail,
173174
allowMultiConversation,
174175
allowVoice,
176+
showBotName
175177
} = this.data.agentConfig;
176178
allowWebSearch = allowWebSearch === undefined ? true : allowWebSearch;
177179
allowUploadFile = allowUploadFile === undefined ? true : allowUploadFile;
@@ -180,6 +182,7 @@ Component({
180182
showToolCallDetail = showToolCallDetail === undefined ? true : showToolCallDetail;
181183
allowMultiConversation = allowMultiConversation === undefined ? true : allowMultiConversation;
182184
allowVoice = allowVoice === undefined ? true : allowVoice;
185+
showBotName = showBotName === undefined ? true: showBotName;
183186
this.setData({
184187
bot,
185188
questions,
@@ -191,6 +194,7 @@ Component({
191194
showToolCallDetail: showToolCallDetail,
192195
showMultiConversation: allowMultiConversation,
193196
showVoice: allowVoice,
197+
showBotName: showBotName
194198
});
195199
console.log("bot", this.data.bot);
196200
if (chatMode === "bot" && this.data.bot.multiConversationEnable) {

apps/miniprogram-agent-ui/miniprogram/pages/chatBot/chatBot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Page({
2121
allowUploadImage: true, // 允许上传图片
2222
showToolCallDetail: true, // 展示 toolCall 细节
2323
allowMultiConversation: true,
24-
allowVoice: true
24+
allowVoice: true,
25+
showBotName: true
2526
},
2627
modelConfig: {
2728
modelProvider: "deepseek", // 大模型服务厂商

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ Page({
123123
type: "boolean",
124124
desc: "允许展示语音按钮",
125125
},
126+
{
127+
name: "agentConfig.showBotName",
128+
type: "boolean",
129+
desc: "允许展示bot名称",
130+
},
126131
{
127132
name: "envShareConfig.resourceAppid",
128133
type: "boolean",
@@ -153,6 +158,7 @@ Page({
153158
allowMultiConversation: true, // 允许客户端展示查看会话列表/新建会话按钮
154159
showToolCallDetail: true, // 是否展示 mcp server toolCall 细节
155160
allowVoice: true, // 允许客户端展示语音按钮
161+
showBotName: true, // 允许展示bot名称
156162
},
157163
modelConfig: {
158164
modelProvider: "hunyuan-open", // 大模型服务厂商

0 commit comments

Comments
 (0)