Browse Source

添加ai对话框

xiaoguang_li 1 month ago
parent
commit
3d0af9bad4
1 changed files with 3 additions and 2 deletions
  1. 3 2
      desktop/core/src/desktop/templates/assist.mako

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

@@ -2820,7 +2820,7 @@ from desktop.views import _ko
         self.query.subscribe(function (newValue, oldValue) {
             let inputTextArea = $('.user-input')[0]
             if (inputTextArea) {
-                console.log(new Date() + "  change old:" + oldValue +" -> new:" +newValue )
+                console.log(new Date() + "  change old:" + oldValue +" -> new:" +newValue +" value:" + inputTextArea.value )
                 ko.tasks.schedule(function() {
                   self.autoResize(null, { target: inputTextArea });
                 });
@@ -2902,12 +2902,13 @@ from desktop.views import _ko
 
       ChatPanel.prototype.autoResize = function (data, event) {
         let inputArea = event.target;
+        let value = inputArea.value;
         let oldValue = inputArea.style.height;
         inputArea.style.height = 'auto';
         let newValue = inputArea.scrollHeight;
         inputArea.style.height = inputArea.scrollHeight -20 + 'px';
 
-        console.log(new Date() + "  autoResize old:" + oldValue +" -> new:" +newValue )
+        console.log(new Date() + "  autoResize old:" + oldValue +" -> new:" +newValue +" value:" + value )
       };
 
       // 滚动到底部函数