Explorar el Código

添加ai对话框

xiaoguang_li hace 2 meses
padre
commit
3d0af9bad4
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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) {
         self.query.subscribe(function (newValue, oldValue) {
             let inputTextArea = $('.user-input')[0]
             let inputTextArea = $('.user-input')[0]
             if (inputTextArea) {
             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() {
                 ko.tasks.schedule(function() {
                   self.autoResize(null, { target: inputTextArea });
                   self.autoResize(null, { target: inputTextArea });
                 });
                 });
@@ -2902,12 +2902,13 @@ from desktop.views import _ko
 
 
       ChatPanel.prototype.autoResize = function (data, event) {
       ChatPanel.prototype.autoResize = function (data, event) {
         let inputArea = event.target;
         let inputArea = event.target;
+        let value = inputArea.value;
         let oldValue = inputArea.style.height;
         let oldValue = inputArea.style.height;
         inputArea.style.height = 'auto';
         inputArea.style.height = 'auto';
         let newValue = inputArea.scrollHeight;
         let newValue = inputArea.scrollHeight;
         inputArea.style.height = inputArea.scrollHeight -20 + 'px';
         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 )
       };
       };
 
 
       // 滚动到底部函数
       // 滚动到底部函数