瀏覽代碼

添加ai对话框

xiaoguang_li 1 月之前
父節點
當前提交
276a704e77
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      desktop/core/src/desktop/templates/assist.mako

+ 6 - 7
desktop/core/src/desktop/templates/assist.mako

@@ -2849,13 +2849,6 @@ from desktop.views import _ko
         huePubSub.subscribeOnce('set.active.snippet.type', updateType);
         huePubSub.subscribeOnce('set.active.snippet.type', updateType);
         huePubSub.publish('get.active.snippet.type');
         huePubSub.publish('get.active.snippet.type');
 
 
-        var autoResize = function (data, event) {
-          var inputArea = event.target;
-          inputArea.style.height = 'auto';
-          inputArea.style.height = inputArea.scrollHeight + 'px';
-        };
-
-        autoResize();
       }
       }
 
 
       ChatPanel.prototype.dispose = function () {
       ChatPanel.prototype.dispose = function () {
@@ -2886,6 +2879,12 @@ from desktop.views import _ko
 
 
       };
       };
 
 
+      ChatPanel.prototype.autoResize = function (data, event) {
+        let inputArea = event.target;
+        inputArea.style.height = 'auto';
+        inputArea.style.height = inputArea.scrollHeight + 'px';
+      };
+
       ko.components.register('chat-panel', {
       ko.components.register('chat-panel', {
         viewModel: ChatPanel,
         viewModel: ChatPanel,
         template: { element: 'chat-panel-template' }
         template: { element: 'chat-panel-template' }