HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/terminal-ai-legacy.js
!function(){function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.toStringTag||"@@toStringTag";function s(e,a,i,o){var s=a&&a.prototype instanceof c?a:c,u=Object.create(s.prototype);return t(u,"_invoke",function(e,t,a){var i,o,s,c=0,u=a||[],m=!1,f={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,o=0,s=n,f.n=t,l}};function p(e,t){for(o=e,s=t,r=0;!m&&c&&!a&&r<u.length;r++){var a,i=u[r],p=f.p,d=i[2];e>3?(a=d===t)&&(s=i[(o=i[4])?5:(o=3,3)],i[4]=i[5]=n):i[0]<=p&&((a=e<2&&p<i[1])?(o=0,f.v=t,f.n=i[1]):p<d&&(a=e<3||i[0]>t||t>d)&&(i[4]=e,i[5]=t,f.n=d,o=0))}if(a||e>1)return l;throw m=!0,t}return function(a,u,d){if(c>1)throw TypeError("Generator is already running");for(m&&1===u&&p(u,d),o=u,s=d;(r=o<2?n:s)||!m;){i||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(c=2,i){if(o||(a="next"),r=i[a]){if(!(r=r.call(i,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,o<2&&(o=0)}else 1===o&&(r=i.return)&&r.call(i),o<2&&(s=TypeError("The iterator does not provide a '"+a+"' method"),o=1);i=n}else if((r=(m=f.n<0)?s:e.call(t,f))!==l)break}catch(r){i=n,o=1,s=r}finally{c=1}}return{value:r,done:m}}}(e,i,o),!0),u}var l={};function c(){}function u(){}function m(){}r=Object.getPrototypeOf;var f=[][i]?r(r([][i]())):(t(r={},i,function(){return this}),r),p=m.prototype=c.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,t(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=m,t(p,"constructor",m),t(m,"constructor",u),u.displayName="GeneratorFunction",t(m,o,"GeneratorFunction"),t(p),t(p,o,"Generator"),t(p,i,function(){return this}),t(p,"toString",function(){return"[object Generator]"}),(e=function(){return{w:s,m:d}})()}function t(e,n,r,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}t=function(e,n,r,a){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?i?i(e,n,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},t(e,n,r,a)}function n(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var o=e.apply(t,r);function s(e){n(o,a,i,s,l,"next",e)}function l(e){n(o,a,i,s,l,"throw",e)}s(void 0)})}}System.register(["./base-lib-legacy.js?v=1777008528","./index-legacy98.js?v=1777008528","./utils-lib-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index.vue_vue_type_style_index_0_lang-legacy.js?v=1777008528","./add-host.vue_vue_type_script_setup_true_lang-legacy.js?v=1777008528","./form-item-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./useController-legacy3.js?v=1777008528","./marked.esm-legacy.js?v=1777008528","./default-legacy.js?v=1777008528","./useStore-legacy.js?v=1777008528","./config-legacy.js?v=1777008528","./index-legacy3.js?v=1777008528","./index-legacy116.js?v=1777008528","./index-legacy118.js?v=1777008528"],function(t,n){"use strict";var a,i,o,s,l,c,u,m,f,p,d,_,y,g,v,h,b,j,k,x,w,T,O,P,V;return{setters:[function(e){a=e.c,i=e.aK,o=e.r,s=e.o,l=e.j,c=e.k,u=e.q,m=e.e,f=e.p,p=e.Q,d=e.J,_=e.K,y=e.v,g=e.F,v=e.B,h=e.s,b=e.aD,j=e.ap,k=e.U,x=e.aW,w=e.ag,T=e.bB},function(e){O=e.u},function(e){P=e.c,V=e.cZ},null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){var n={class:"terminal-theme-settings"},S={class:"terminal-theme-settings__item !mb-[1rem]"},A={class:"flex items-center"},C={class:"terminal-theme-settings__item !mb-[1rem]"},I={class:"flex items-center"},G={class:"tools-section"},U={class:"tools-body"},q={class:"tools-card-content"},B={class:"tools-card-name"},F={class:"terminal-theme-settings__item mt-[1.6rem] !mb-0"},E={class:"terminal-theme-settings__item-content"},D=a({__name:"terminal-ai",setup:function(t){var a=O(),V=a.setTerminalBg,D=a.getPanelTheme,K=a.aiTerminalStatus,L=a.aiTerminalTips,M=a.setAiTerminalStatus,z=a.setAiTerminalTips,H=P().globalTheme,J=i("termAiTools",["get_sites","get_sites_logs","get_mysql_list","get_site_analysis","get_sites_conf","get_server_ip","get_top_processes"]),N=[{key:"get_server_ip",name:"获取服务器IP",risk:"medium",description:"获取服务器的内网和公网 IP 地址"},{key:"get_sites",name:"获取网站列表(不包含Docker站点)",risk:"medium",description:"获取在宝塔面板部署的全部网站列表(域名)"},{key:"get_sites_conf",name:"获取网站配置",risk:"medium",description:"获取网站的nginx或apache配置文件内容"},{key:"get_sites_logs",name:"获取网站访问日志",risk:"medium",description:"获取网站的访问日志(最大1000行)"},{key:"get_site_analysis",name:"获取全部网站流量分析数据",risk:"medium",description:"获取全部网站的流量分析数据(最近7天)"},{key:"get_mysql_list",name:"获取Mysql数据库列表",risk:"medium",description:"获取面板中所有数据库列表(已对密码脱敏)"},{key:"get_top_processes",name:"获取资源占用TOP10进程",risk:"low",description:"获取系统中 CPU 和 内存 占用率最高的 TOP 10 进程"}];o({});var Q=b(function(){var t=r(e().m(function t(n){return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,V("ai_opacity",n);case 1:return e.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),300),W=function(){var t=r(e().m(function t(){return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,M();case 1:K.value||setTimeout(function(){window.location.reload()},2e3);case 2:return e.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),Z=function(){var t=r(e().m(function t(){return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,z();case 1:return e.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return s(function(){D()}),function(e,t){var r=j,a=k,i=x,o=w,s=T;return l(),c("div",n,[u("div",S,[u("span",A,[t[4]||(t[4]=u("span",{class:"mr-[1rem]"},"开启AI分析",-1)),u("span",null,[m(r,{modelValue:f(L),"onUpdate:modelValue":t[0]||(t[0]=function(e){return p(L)?L.value=e:null}),onChange:Z},null,8,["modelValue"])]),t[5]||(t[5]=u("span",{class:"text-small text-secondary ml-[10px]"},"选中终端文本可点击发送给右下角AI助手",-1))])]),u("div",C,[u("span",I,[t[6]||(t[6]=u("span",{class:"mr-[1rem]"},"开启AI终端",-1)),u("span",null,[m(r,{modelValue:f(K),"onUpdate:modelValue":t[1]||(t[1]=function(e){return p(K)?K.value=e:null}),onChange:W},null,8,["modelValue"])]),t[7]||(t[7]=u("span",{class:"text-small text-secondary ml-[10px]"},"智能识别输入的自然语言发送给ai,给出相应的回答",-1))])]),d(u("div",G,[t[11]||(t[11]=u("div",{class:"tools-header"},[u("span",{class:"tools-title"},"工具列表"),u("span",{class:"tools-desc"},"选择需要使用的工具,可以向AI提供更多的信息")],-1)),u("div",U,[m(o,{modelValue:f(J),"onUpdate:modelValue":t[2]||(t[2]=function(e){return p(J)?J.value=e:null}),class:"tools-checkbox-group"},{default:y(function(){return[(l(),c(g,null,v(N,function(e){return m(i,{key:e.key,content:e.description,placement:"top","show-after":300},{default:y(function(){return[m(a,{value:e.key,class:"tools-checkbox-card"},{default:y(function(){return[u("div",q,[u("span",B,h(e.name),1)]),t[8]||(t[8]=u("div",{class:"card-check-mark"},[u("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[u("path",{d:"M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z",fill:"currentColor"})])],-1))]}),_:2},1032,["value"])]}),_:2},1032,["content"])}),64))]}),_:1},8,["modelValue"])]),u("div",F,[t[10]||(t[10]=u("div",{class:"terminal-theme-settings__item-label"},"助手卡片背景透明度",-1)),u("div",E,[m(s,{modelValue:f(H).terminal.ai_opacity,"onUpdate:modelValue":t[3]||(t[3]=function(e){return f(H).terminal.ai_opacity=e}),min:0,max:100,step:5,"show-input":"",style:{width:"300px"},onChange:f(Q)},null,8,["modelValue","onChange"]),t[9]||(t[9]=u("span",{class:"terminal-theme-settings__tip"},"(1-100,数值越小越透明)",-1))])])],512),[[_,f(K)]])])}}});t("default",V(D,[["__scopeId","data-v-ae09dc33"]]))}}})}();