浏览代码

添加ai对话框

xiaoguang_li 1 月之前
父节点
当前提交
b416803185
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      desktop/core/src/desktop/templates/assist.mako

+ 3 - 1
desktop/core/src/desktop/templates/assist.mako

@@ -2790,7 +2790,7 @@ from desktop.views import _ko
         <!-- 显示区域 -->
         <!-- 显示区域 -->
         <div class="display-area" data-bind="foreach: messages">
         <div class="display-area" data-bind="foreach: messages">
             <!-- 消息 -->
             <!-- 消息 -->
-            <div class="message" data-bind="html: content, css:{ 'ai-message': type==='ai', user-message: type==='user'}"></div>
+            <div class="message" data-bind="html: content, css:{ 'ai-message': type==='ai', 'user-message': type==='user'}"></div>
         </div>
         </div>
 
 
         <!-- 输入区域 -->
         <!-- 输入区域 -->
@@ -2872,6 +2872,8 @@ from desktop.views import _ko
         }
         }
         self.messages.push({type:'user', content: self.query().trim()});
         self.messages.push({type:'user', content: self.query().trim()});
         self.messages.push({type:'ai', content: '感谢提问!我已经收到你的消息:' + self.query().trim()});
         self.messages.push({type:'ai', content: '感谢提问!我已经收到你的消息:' + self.query().trim()});
+
+        self.query = '';
       };
       };
 
 
       ChatPanel.prototype.initFunctions = function (dialect) {
       ChatPanel.prototype.initFunctions = function (dialect) {