File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
apps/miniprogram-agent-ui/miniprogram/components/agent-ui Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -762,6 +762,7 @@ Component({
762762 knowledge_meta,
763763 knowledge_base,
764764 finish_reason,
765+ search_results
765766 } = dataJson ;
766767 const newValue = [ ...this . data . chatRecords ] ;
767768 // 取最后一条消息更新
@@ -831,6 +832,14 @@ Component({
831832 chatStatus : 2 ,
832833 } ) ;
833834 }
835+ // 数据库,只更新一次
836+ if ( type === "db" && ! lastValue . db_len ) {
837+ lastValue . db_len = search_results . relateTables || 0
838+ this . setData ( {
839+ [ `chatRecords[${ lastValueIndex } ].db_len` ] : lastValue . db_len ,
840+ chatStatus : 2 ,
841+ } )
842+ }
834843 } catch ( e ) {
835844 // console.log('err', event, e)
836845 break ;
Original file line number Diff line number Diff line change 3030 </view>
3131 </block>
3232 <block wx:else>
33+ <!-- 数据库检索 -->
34+ <view wx:if="{{item.db_len}}" style="border-radius: 8px;margin-bottom: 12px;background-color: #f5f5f5;padding: 18rpx 26rpx;display: inline-block;opacity: 0.7;font-size: 14px;">
35+ 已匹配 {{item.db_len}} 张数据表
36+ </view>
3337 <!-- 联网搜索 -->
3438 <FoldedCard wx:if="{{item.search_info}}" initStatus="{{false}}" showBgColor="{{true}}">
3539 <view slot="title" style="opacity: 0.7;font-size: 14px;display: flex; align-items: center; gap: 8px;">
You can’t perform that action at this time.
0 commit comments