File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
apps/miniprogram-agent-ui
miniprogram/components/agent-ui Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ Component({
169169 bot,
170170 questions,
171171 chatRecords : [ ...chatRecords , record ] ,
172- showWebSearchSwitch : ! ! ( bot . searchEnable && allowWebSearch ) ,
172+ showWebSearchSwitch : allowWebSearch ,
173173 showUploadFile : allowUploadFile ,
174174 showPullRefresh : allowPullRefresh ,
175175 } ) ;
@@ -573,6 +573,14 @@ Component({
573573 } ) ;
574574 } ,
575575 handleUploadMessageFile : function ( ) {
576+ // 判断agent 配置是否打开上传文件
577+ if ( ! this . data . bot . searchFileEnable ) {
578+ wx . showModal ( {
579+ title : "提示" ,
580+ content : "请前往腾讯云开发平台启用 Agent 文件上传功能" ,
581+ } ) ;
582+ return ;
583+ }
576584 if ( this . data . useWebSearch ) {
577585 wx . showModal ( {
578586 title : "提示" ,
@@ -1030,6 +1038,13 @@ Component({
10301038 } ) ;
10311039 } ,
10321040 handleClickWebSearch : function ( ) {
1041+ if ( ! this . data . useWebSearch && ! this . data . bot . searchEnable ) {
1042+ wx . showModal ( {
1043+ title : "提示" ,
1044+ content : "请前往腾讯云开发平台启用 Agent 联网搜索功能" ,
1045+ } ) ;
1046+ return ;
1047+ }
10331048 if ( this . data . sendFileList . length ) {
10341049 wx . showModal ( {
10351050 title : "提示" ,
Original file line number Diff line number Diff line change 55 },
66 "condition" : {},
77 "description" : " 项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" ,
8- "projectname" : " miniprogram-1 " ,
8+ "projectname" : " cloudbase-agent-ui " ,
99 "libVersion" : " 3.7.8"
1010}
You can’t perform that action at this time.
0 commit comments