tmex-cli 0.15.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -8
- package/dist/runtime/server.js +891 -165
- package/package.json +1 -1
- package/resources/fe-dist/assets/DevicePage-Ccz8gNji.js +24 -0
- package/resources/fe-dist/assets/{DevicesPage-DVAiqqAb.js → DevicesPage-sJHXbS_f.js} +1 -1
- package/resources/fe-dist/assets/{FilePage-DzKIB_pN.js → FilePage-7FFd1YcW.js} +1 -1
- package/resources/fe-dist/assets/{SettingsPage-BTLab-Z3.js → SettingsPage-FrEtqZyI.js} +1 -1
- package/resources/fe-dist/assets/{agent-tab-DRxXq67W.js → agent-tab-9THUj7Cf.js} +4 -4
- package/resources/fe-dist/assets/{api-B_pG5Lrn.js → api-DV7-9Pvt.js} +1 -1
- package/resources/fe-dist/assets/{arc-Bct5uFHQ.js → arc-PDHKfnGP.js} +1 -1
- package/resources/fe-dist/assets/{architectureDiagram-3BPJPVTR-BRDZ_iL7.js → architectureDiagram-3BPJPVTR-BiPHTh1e.js} +1 -1
- package/resources/fe-dist/assets/{blockDiagram-GPEHLZMM-COe9KyYv.js → blockDiagram-GPEHLZMM-DP_BRHKg.js} +1 -1
- package/resources/fe-dist/assets/{c4Diagram-AAUBKEIU-DtQTgbwo.js → c4Diagram-AAUBKEIU-D16QYgyT.js} +1 -1
- package/resources/fe-dist/assets/{card-DAJtOO99.js → card-DmfNw0hd.js} +1 -1
- package/resources/fe-dist/assets/channel-Dzz9b4fW.js +1 -0
- package/resources/fe-dist/assets/{chunk-2J33WTMH-D4_zLlF4.js → chunk-2J33WTMH-DOjtL7ww.js} +1 -1
- package/resources/fe-dist/assets/{chunk-4BX2VUAB-C3M9MnUk.js → chunk-4BX2VUAB-BbT67ZXa.js} +1 -1
- package/resources/fe-dist/assets/{chunk-55IACEB6-D5BgUYDW.js → chunk-55IACEB6-CnnXwmY_.js} +1 -1
- package/resources/fe-dist/assets/{chunk-727SXJPM-C03K3kUu.js → chunk-727SXJPM-TyUdLEW5.js} +1 -1
- package/resources/fe-dist/assets/{chunk-AQP2D5EJ-DLv4_X-p.js → chunk-AQP2D5EJ-BMpK4dqa.js} +1 -1
- package/resources/fe-dist/assets/{chunk-FMBD7UC4-CXm-3D35.js → chunk-FMBD7UC4-Dx0HVCZZ.js} +1 -1
- package/resources/fe-dist/assets/{chunk-ND2GUHAM-DH_J0yjP.js → chunk-ND2GUHAM-BQCoMEti.js} +1 -1
- package/resources/fe-dist/assets/{chunk-QZHKN3VN-D5HtoYCj.js → chunk-QZHKN3VN-ilmf5OgK.js} +1 -1
- package/resources/fe-dist/assets/classDiagram-4FO5ZUOK-BB9_4XLL.js +1 -0
- package/resources/fe-dist/assets/classDiagram-v2-Q7XG4LA2-BB9_4XLL.js +1 -0
- package/resources/fe-dist/assets/{copy-BfLwocwm.js → copy-Ct5TNzGp.js} +1 -1
- package/resources/fe-dist/assets/{cose-bilkent-S5V4N54A-be9ShD_r.js → cose-bilkent-S5V4N54A-CpWhM7Za.js} +1 -1
- package/resources/fe-dist/assets/{dagre-BM42HDAG-CC-KfeHH.js → dagre-BM42HDAG-CWJttTzC.js} +1 -1
- package/resources/fe-dist/assets/{diagram-2AECGRRQ-BwKHXV4n.js → diagram-2AECGRRQ-BD8ny_Yg.js} +1 -1
- package/resources/fe-dist/assets/{diagram-5GNKFQAL-Bqwpz1fr.js → diagram-5GNKFQAL-CeHcPWRz.js} +1 -1
- package/resources/fe-dist/assets/{diagram-KO2AKTUF-CeMGb0yy.js → diagram-KO2AKTUF-tVlrBE8C.js} +1 -1
- package/resources/fe-dist/assets/{diagram-LMA3HP47-Bsi1wTvw.js → diagram-LMA3HP47-DGUn-oQn.js} +1 -1
- package/resources/fe-dist/assets/{diagram-OG6HWLK6-B4t3XGFO.js → diagram-OG6HWLK6-xKCd1kwA.js} +1 -1
- package/resources/fe-dist/assets/{en_US-Cf2EOKiI.js → en_US-CjVU4anP.js} +1 -1
- package/resources/fe-dist/assets/{erDiagram-TEJ5UH35-3Mvka2ky.js → erDiagram-TEJ5UH35-C6M5qkGl.js} +1 -1
- package/resources/fe-dist/assets/{files-tab-CozXv_f8.js → files-tab-BWkYfaye.js} +5 -5
- package/resources/fe-dist/assets/{flowDiagram-I6XJVG4X-DkGA4Ke1.js → flowDiagram-I6XJVG4X-D0MZDHnB.js} +1 -1
- package/resources/fe-dist/assets/{ganttDiagram-6RSMTGT7-3vhFpRP7.js → ganttDiagram-6RSMTGT7-YeduSSa_.js} +1 -1
- package/resources/fe-dist/assets/{gitGraphDiagram-PVQCEYII-CQV7XGpo.js → gitGraphDiagram-PVQCEYII-Nem1Mvvg.js} +1 -1
- package/resources/fe-dist/assets/index-B3ddLSja.js +314 -0
- package/resources/fe-dist/assets/index-CuFTSN9i.css +1 -0
- package/resources/fe-dist/assets/{index-CxrkvaQh.js → index-iee3U_rD.js} +1 -1
- package/resources/fe-dist/assets/{infoDiagram-5YYISTIA-Do4YMzZB.js → infoDiagram-5YYISTIA-Bh6bbh_V.js} +1 -1
- package/resources/fe-dist/assets/{ishikawaDiagram-YF4QCWOH-D0s__l6a.js → ishikawaDiagram-YF4QCWOH-CsZHu48j.js} +1 -1
- package/resources/fe-dist/assets/{ja_JP-s3e_OwvM.js → ja_JP-Bq-BwOH_.js} +1 -1
- package/resources/fe-dist/assets/{journeyDiagram-JHISSGLW-DZWnugOc.js → journeyDiagram-JHISSGLW-CPgnovXt.js} +1 -1
- package/resources/fe-dist/assets/{kanban-definition-UN3LZRKU-BgRtdsFS.js → kanban-definition-UN3LZRKU-D4OAuDsS.js} +1 -1
- package/resources/fe-dist/assets/{linear-yx1vNDZX.js → linear-CcA4wV7f.js} +1 -1
- package/resources/fe-dist/assets/{markdown-preview-BE4zuZfN.js → markdown-preview-CBGlxpTs.js} +3 -3
- package/resources/fe-dist/assets/{mermaid.core-DE3GlZm2.js → mermaid.core-D-CshtYr.js} +5 -5
- package/resources/fe-dist/assets/{mindmap-definition-RKZ34NQL-25O7ch2Y.js → mindmap-definition-RKZ34NQL-DBpI1nMC.js} +1 -1
- package/resources/fe-dist/assets/{pieDiagram-4H26LBE5-Nsg0nJjf.js → pieDiagram-4H26LBE5-D4kh0_Y0.js} +1 -1
- package/resources/fe-dist/assets/{quadrantDiagram-W4KKPZXB-vf_qGk-r.js → quadrantDiagram-W4KKPZXB-DNw3oGHQ.js} +1 -1
- package/resources/fe-dist/assets/{requirementDiagram-4Y6WPE33-BFfrHVO7.js → requirementDiagram-4Y6WPE33-DqtMaND0.js} +1 -1
- package/resources/fe-dist/assets/{sankeyDiagram-5OEKKPKP-Ce_HayCK.js → sankeyDiagram-5OEKKPKP-D-m9Pyie.js} +1 -1
- package/resources/fe-dist/assets/{selection-clipboard-Dq6Zemfd.js → selection-clipboard-D3gUQQ7L.js} +1 -1
- package/resources/fe-dist/assets/{send-CKtMOmLP.js → send-DaOB9hLq.js} +1 -1
- package/resources/fe-dist/assets/{sequenceDiagram-3UESZ5HK-C2vovJ8X.js → sequenceDiagram-3UESZ5HK-CjrimNJf.js} +1 -1
- package/resources/fe-dist/assets/{stateDiagram-AJRCARHV-CLu4laAA.js → stateDiagram-AJRCARHV-BT5d8Z8W.js} +1 -1
- package/resources/fe-dist/assets/stateDiagram-v2-BHNVJYJU-kSh9IuUW.js +1 -0
- package/resources/fe-dist/assets/terminal-settings-panel-DDhlnbRH.js +25 -0
- package/resources/fe-dist/assets/{timeline-definition-PNZ67QCA-DkWMKmAT.js → timeline-definition-PNZ67QCA-BeocAFDX.js} +1 -1
- package/resources/fe-dist/assets/{transfer-toast-CHZr1a7O.js → transfer-toast-DXl4RHsV.js} +1 -1
- package/resources/fe-dist/assets/{triangle-alert-03d4TB5d.js → triangle-alert-FQRTtbTP.js} +1 -1
- package/resources/fe-dist/assets/{vennDiagram-CIIHVFJN-BBlcBoH2.js → vennDiagram-CIIHVFJN-CYlmUB5_.js} +1 -1
- package/resources/fe-dist/assets/{wardley-L42UT6IY-BnzmzjjA.js → wardley-L42UT6IY-CTyaodt9.js} +1 -1
- package/resources/fe-dist/assets/{wardleyDiagram-YWT4CUSO-B3u1V3qc.js → wardleyDiagram-YWT4CUSO-DNlEcEwQ.js} +1 -1
- package/resources/fe-dist/assets/{xychartDiagram-2RQKCTM6-BTm5HZXX.js → xychartDiagram-2RQKCTM6-7Zi-6P-I.js} +1 -1
- package/resources/fe-dist/assets/{zap-CBeeCQFr.js → zap-BFIAXPXd.js} +1 -1
- package/resources/fe-dist/assets/{zh_CN-6UyMkvZM.js → zh_CN-BuxyXhCT.js} +1 -1
- package/resources/fe-dist/index.html +2 -2
- package/resources/fe-dist/assets/DevicePage-BvwXdfhK.js +0 -19
- package/resources/fe-dist/assets/channel-CIG-CxyN.js +0 -1
- package/resources/fe-dist/assets/classDiagram-4FO5ZUOK-CNRZMNkk.js +0 -1
- package/resources/fe-dist/assets/classDiagram-v2-Q7XG4LA2-CNRZMNkk.js +0 -1
- package/resources/fe-dist/assets/index-CEPc0i5O.js +0 -304
- package/resources/fe-dist/assets/index-CHeveVji.css +0 -1
- package/resources/fe-dist/assets/stateDiagram-v2-BHNVJYJU-CIfUS4rj.js +0 -1
- package/resources/fe-dist/assets/terminal-settings-panel-DAWL48fe.js +0 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./mermaid.core-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./mermaid.core-D-CshtYr.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-BENe2yWM.js";import{l as zt}from"./linear-CcA4wV7f.js";import"./index-B3ddLSja.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse('{"common":{"loading":"加载中...","save":"保存","saving":"保存中...","cancel":"取消","add":"添加","delete":"删除","edit":"修改","confirm":"确认","close":"关闭","expand":"展开","collapse":"收起","refresh":"刷新","test":"测试","send":"发送","success":"成功","error":"错误","warning":"警告","info":"信息","yes":"是","no":"否","enabled":"已启用","disabled":"已禁用","pending":"待授权","authorized":"已授权","unknown":"未知","empty":"空","none":"无","default":"默认","optional":"可选","required":"必填","pwaInstallTitle":"安装为应用","pwaInstallHintIOSSafari":"iOS Safari 不会自动弹出安装提示。请点击「分享」,再选择「添加到主屏幕」。","pwaInstallHintIOSChrome":"iOS Chrome 不会自动弹出安装提示。请点击「分享」,再选择「添加到主屏幕」"},"nav":{"manageDevices":"管理设备","settings":"设置","sidebarExpand":"展开侧边栏","sidebarCollapse":"收起侧边栏","openSidebar":"打开侧边栏","closeSidebar":"关闭侧边栏","jumpToLatest":"跳转到最新","switchToEditor":"切换到编辑器输入","switchToDirect":"切换到直接输入","refreshPage":"刷新页面","refreshPageConfirm":"确定要刷新页面吗?未保存的内容将会丢失。"},"device":{"title":"设备管理","devices":"设备","addDevice":"添加设备","addDeviceDescription":"填写设备信息并选择连接方式","addFirstDevice":"添加第一个设备","editDevice":"修改设备","editDeviceDescription":"更新设备配置","sectionBasic":"基本信息","sectionConnection":"连接信息","sectionAuth":"认证信息","noDevices":"暂无设备","noDevicesDescription":"添加本地或 SSH 设备开始使用","name":"设备名称","namePlaceholder":"例如:我的服务器","type":"类型","typeLocal":"本地设备","typeSSH":"SSH 远程设备","typeSSHBadge":"SSH","host":"主机","hostPlaceholder":"example.com","port":"端口","username":"用户名","usernamePlaceholder":"root","session":"Tmux 会话名称","sessionPlaceholder":"tmex","sessionHint":"留空将使用默认值 \\"tmex\\"","defaultWorkingDir":"默认工作目录","defaultWorkingDirPlaceholder":"留空使用用户 home 目录","authMode":"认证方式","authPassword":"密码","authKey":"私钥","authAgent":"SSH Agent","authConfigRef":"SSH Config","sshConfigRefPlaceholder":"Host 别名,如 my-server","sshConfigRefHint":"填 ssh config 里的 Host 别名,经 `ssh -G` 解析;不是 config 文件路径。","password":"密码","privateKey":"私钥","privateKeyPlaceholder":"-----BEGIN OPENSSH PRIVATE KEY-----","privateKeyPassphrase":"私钥密码(可选)","passphrase":"私钥密码(可选)","connect":"连接","connected":"已连接","disconnect":"断开","disconnected":"已断开","connecting":"连接中...","dragHandle":"拖动以调整设备顺序","reorderFailed":"设备排序失败","deleteConfirm":"删除此设备?","deleteDescription":"设备 \\"{{name}}\\" 将被永久移除,此操作无法撤销。","deleteSuccess":"设备已删除","createSuccess":"设备已创建","updateSuccess":"设备已更新","deleteFailed":"删除设备失败","createFailed":"创建设备失败","updateFailed":"更新设备失败","loadFailed":"加载设备列表失败","localDevice":"本地设备","subtitle":"{{username}}@{{host}}:{{port}}","modify":"修改设备","delete":"删除"},"terminal":{"keyboardBehavior":{"title":"键盘行为","description":"选择手机键盘弹出时页面的避让方式","modeLift":"页面平移","modeLiftDesc":"键盘弹出时整页上移,终端大小不变","modeResize":"终端缩放","modeResizeDesc":"缩小终端铺满键盘上方区域(会调整远端窗口行数)","modeFollow":"光标对齐","modeFollowDesc":"按光标位置上移,光标始终在键盘正上方,终端大小不变"},"initializing":"初始化终端...","connecting":"连接设备...","initFailed":"终端初始化失败","inputPlaceholder":"在此输入命令...","clear":"清空","deviceError":"设备错误","deviceErrorWithType":"[{{type}}] 设备错误","noDeviceSelected":"未选择设备","windowClosed":"当前窗口已关闭,请在侧边栏重新选择窗口。","paneClosed":"当前 Pane 已关闭,请在侧边栏重新选择 Pane。","bellNotification":"终端 Bell","bellDescriptionWithTitle":"窗口 {{window}} · {{paneLabel}}","bellFallback":"收到 tmux bell","notificationFallbackTitle":"终端通知","notificationSourceLabel":"来自 {{source}}","notificationFallbackDetail":"终端通知","paneTitle":"Pane {{index}}","activePane":"当前 pane","activeWindow":"当前窗口","editorPlaceholder":"在此输入命令...","editorClear":"清空","editorSendWithEnter":"发送附带回车","editorSendLineByLine":"逐行发送","editorSend":"发送","sendShortcut":"发送 {{key}}","inputModeDirect":"直接输入","inputModeEditor":"编辑器","newWindow":"新建窗口","closeWindow":"关闭窗口","closePane":"关闭 pane","copy":"复制","paste":"粘贴","copied":"已复制到剪贴板","copyFailed":"复制失败","pasteFailed":"无法读取剪贴板,请检查浏览器权限","clearSelection":"取消选择"},"settings":{"title":"系统设置","siteSettings":"站点设置","siteName":"站点名称","siteNamePlaceholder":"tmex","siteUrl":"站点访问 URL","siteUrlPlaceholder":"http://localhost:3000","bellThrottle":"Bell 频控(秒)","notificationThrottle":"通知频控(秒)","enableBrowserBellToast":"开启浏览器 Bell Toast","enableBrowserNotificationToast":"开启浏览器通知 Toast","enableTelegramBellPush":"开启 Telegram Bell 推送","enableTelegramNotificationPush":"开启 Telegram 通知推送","enableWeixinBellPush":"启用微信响铃推送","enableWeixinNotificationPush":"启用微信通知推送","sshReconnectRetries":"SSH 重连次数","sshReconnectDelay":"SSH 重连等待(秒)","language":"语言","languagePlaceholder":"选择语言","language_en_US":"English","language_zh_CN":"简体中文","language_ja_JP":"日本語","theme":"深色模式","themeLight":"浅色","themeDark":"深色","siteTab":"站点","notificationsTab":"通知","tabGroup":{"general":"通用","devicesAndFiles":"设备与文件","notifications":"通知","ai":"AI","terminal":"终端"},"terminal":{"title":"终端设置","description":"调整终端的字号、行高、字体与手机键盘避让行为。字体选择对全应用所有等宽文本生效。","fontSize":"字号","lineHeight":"行高","fontFamily":"字体","preview":"预览","savedInBrowser":"这些设置仅保存在当前浏览器中。","shortcuts":{"title":"自定义快捷键","savedOnServer":"保存在服务器、多端共享——修改后需点「保存」才生效。","preview":"预览","useIcons":"用图标展示快捷键","useIconsDesc":"把 Ctrl/Shift/回车 等按键名替换为苹果风格符号(⌃⇧⏎)。","dragHandle":"拖动排序","delete":"删除","labelPlaceholder":"显示文字","payloadPlaceholder":"序列,如 \\\\x1b[A","addShortcut":"添加快捷键","capturePrompt":"请按下目标组合键……","captureHint":"点此,然后按下要录制的按键","advanced":"高级:手动输入序列","add":"添加","reset":"重置为默认","save":"保存","saved":"快捷键已保存","saveFailed":"保存快捷键失败","loading":"加载中……","action":{"paste":"粘贴","toggleKeyboard":"切换文本框/键盘","newAgentSession":"新建 Agent 会话","scrollToBottom":"终端回到最下方"},"loadFailed":"加载快捷键失败","retry":"重试"}},"deviceManagement":{"title":"设备管理","description":"添加、编辑并连接你的本地与 SSH 设备。","openButton":"打开设备管理"},"refreshToApply":"刷新后生效","saveSettings":"保存设置","settingsSaved":"站点设置已保存","saveFailed":"保存设置失败","loadFailed":"加载设置失败","restartGateway":"重启 Gateway","restartScheduled":"Gateway 重启请求已发送","restartConfirm":"确定要重启 Gateway 吗?这将中断所有活动连接。","restartFailed":"重启请求失败","sshReconnectMaxRetries":"SSH 重连次数","llm":{"title":"LLM 提供商","name":"名称","namePlaceholder":"如 OpenAI","baseUrl":"Base URL","baseUrlPlaceholder":"https://api.openai.com","baseUrlHint":"默认自动补全 /v1;以 / 结尾则按原路径不补 /v1","protocol":"协议","apiKey":"API Key","apiKeyPlaceholder":"输入 API Key","apiKeySetPlaceholder":"已设置,留空不修改","addProvider":"添加提供商","editProvider":"编辑供应商","formHint":"配置供应商连接信息","models":"模型","modelsTitle":"{{name}} 的模型","modelsHint":"管理该供应商可用的模型,启停与手动添加","modelManual":"手动","addModelPlaceholder":"添加模型 ID","empty":"暂无提供商","refreshModels":"刷新模型","modelsCount":"{{total}} 个模型","modelsNotFetched":"尚未获取模型列表","modelsFetchFailed":"模型列表获取失败:{{error}}","deleteProvider":"删除提供商","deleteConfirm":"确定要删除提供商「{{name}}」吗?","defaults":"全局默认","defaultProvider":"默认提供商","defaultProviderNone":"未设置","defaultModel":"默认模型","defaultModelPlaceholder":"输入或选择模型 ID","saveDefaults":"保存默认设置","loadFailed":"加载 LLM 提供商失败","createFailed":"创建提供商失败","updateFailed":"更新提供商失败","deleteFailed":"删除提供商失败","refreshModelsFailed":"刷新模型失败","settingsLoadFailed":"加载 LLM 设置失败","settingsSaveFailed":"保存 LLM 设置失败"},"search":{"title":"搜索","provider":"搜索提供商","responsesApiHint":"若 LLM Provider 使用 OpenAI Responses API 协议,可直接使用其内置的 hosted 搜索工具;下方第三方搜索为可选补充。","providerNone":"不启用","tavilyApiKey":"Tavily API Key","braveApiKey":"Brave API Key","keyPlaceholder":"输入 API Key","keySetPlaceholder":"已设置,留空不修改","clearKey":"清除","clearKeyConfirm":"确定要清除此 API Key 吗?清除后需要重新填写。","loadFailed":"加载搜索设置失败","saveFailed":"保存搜索设置失败"},"files":{"title":"文件","description":"配置各设备下可在「文件」标签页浏览的目录。本地设备直接读取,SSH 设备走 rsync。","addRoot":"添加目录","roots":"目录","empty":"尚未配置任何目录","missing":"设备已失效","modalAddTitle":"添加目录","modalEditTitle":"编辑目录","device":"设备","devicePlaceholder":"选择设备","noDevices":"还没有设备,请先添加设备","path":"路径","pathPlaceholder":"/绝对路径/到/目录","pathHint":"所选设备上的绝对路径。","enabled":"启用","addFailed":"添加目录失败","updateFailed":"更新目录失败","deleteFailed":"移除目录失败","toggleFailed":"更新目录失败","deleteTitle":"移除目录?","deleteDesc":"将「{{path}}」移出白名单?该目录下的文件将不再可访问。"},"version":{"title":"版本与更新","currentVersion":"当前版本","installMethod":"安装方式","installMethodCli":"通过 CLI 安装","installMethodNonCli":"非 CLI 安装","deployment":"部署方式","deploymentLaunchd":"launchd(macOS)","deploymentSystemd":"systemd(Linux)","deploymentNone":"无","checkUpdate":"检查更新","checking":"检查中…","upToDate":"已是最新版本。","updateAvailable":"有可用更新:{{version}}","changelog":"更新日志","changelogUnavailable":"该版本暂无更新日志。","publishedAt":"发布于 {{date}}","upgrade":"立即升级","upgradeDisabledDev":"非 production 环境已禁用程序内更新。","upgradeDisabledNonCli":"程序内更新仅在通过 CLI 安装时可用。","upgradeWarningTitle":"确认升级","upgradeWarningBody":"升级会重启服务并中断当前访问,还可能影响该服务托管的 tmux 进程的存活。是否继续?","upgradeStarted":"升级已开始","stateDownloading":"正在下载新版本…","stateExecuting":"正在执行升级,服务即将重启…","interruptNotice":"服务重启期间连接会断开,稍候即可恢复。","checkFailed":"检查更新失败","terminalHint":"或通过终端升级:npx tmex-cli@<version> upgrade"}},"telegram":{"title":"Telegram Bot 管理","botName":"Bot 名称","botNamePlaceholder":"如:ops-bot","botToken":"Bot Token","botTokenPlaceholder":"123456:AA...","addBot":"新增 Bot","editBot":"编辑 Bot","enableBot":"启用 Bot","allowAuthRequests":"允许申请授权","pendingChats":"待授权","chats":"已授权","authorizedChats":"已授权","noPendingChats":"暂无待授权 chat","noAuthorizedChats":"暂无已授权 chat","approve":"批准","authorize":"授权","reject":"拒绝","revokeAuth":"撤销授权","testMessage":"测试消息","sendTestMessage":"发送测试消息","deleteBot":"删除 Bot","tokenOptional":"Token(留空不改)","tokenPlaceholder":"输入新 token","botCreated":"Bot 已创建","botUpdated":"Bot 已更新","botDeleted":"Bot 已删除","authApproved":"授权已批准","chatRemoved":"chat 已移除","testMessageSent":"测试消息已发送","createFailed":"新增 Bot 失败","updateFailed":"更新 Bot 失败","deleteFailed":"删除 Bot 失败","approveFailed":"批准授权失败","removeFailed":"删除 chat 失败","testMessageFailed":"发送测试消息失败","loadBotsFailed":"加载 Bot 列表失败","loadChatsFailed":"加载 chat 列表失败","noBots":"暂无 Bot,先添加一个。","expand":"展开","collapse":"收起","authCount":"已授权 {{authorized}} / 待授权 {{pending}}(总上限 8)","chatId":"chatId","applyTime":"申请时间","gatewayOnline":"🟢 Gateway online @ {{siteName}}","deviceConnectionError":"🔴 {{siteName}}:设备「{{deviceName}}」({{host}}) 连接异常 [{{category}}]\\n{{error}}","agentCredentialWarning":"⚠️ {{siteName}}:Agent 会话「{{sessionTitle}}」的一条消息疑似包含凭证({{types}})。该内容将发送至 LLM 并存储,存在泄露风险。","authSuccess":"✅ 已授权,可接收通知。","authPending":"⏳ 已收到授权申请,请在 tmex 设置页审批。","authFailed":"❌ 授权申请失败,请联系管理员。","testMessageTemplate":"🧪 测试消息\\n站点:{{siteName}}\\n时间:{{time}}","approveMessageTemplate":"✅ 已通过 tmex 授权。\\nBot:{{botName}}\\n时间:{{time}}","botNotFound":"Bot 未启动或不可用","botNotRunning":"Bot 未启动或不可用"},"weixin":{"title":"微信 (ClawBot) 管理","subtitle":"通过 iLink bot 协议把 tmex 告警推送到你的个人微信。","replyOnlyNotice":"iLink 只能在会话激活窗口内回复——先给 bot 发条消息激活,告警随后复用该会话;闲置过久会话会过期,需再给 bot 发条消息重新激活。","accountName":"账号名称","accountNamePlaceholder":"如:我的微信","addAccount":"添加账号","editAccount":"编辑账号","enableAccount":"启用账号","allowAuthRequests":"允许授权申请","scanToLogin":"扫码登录","relogin":"重新登录(重新扫码)","loggedIn":"已登录","notLoggedIn":"未登录","scanQrcodeHint":"打开微信扫描二维码,并在手机上确认。","loginPending":"等待扫码…","loginConfirmed":"登录已确认。","loginExpired":"二维码已过期,请重试。","loginError":"登录失败:{{message}}","loginFailed":"登录失败","refreshQrcode":"刷新二维码","closeLogin":"关闭","pendingUsers":"待授权","authorizedUsers":"已授权用户","noPendingUsers":"暂无待授权用户","noAuthorizedUsers":"暂无已授权用户","needsReactivation":"会话已过期","reactivationHint":"请该用户给 bot 发条消息以重新激活告警。","approve":"批准","revokeAuth":"撤销授权","removeUser":"移除","testMessage":"测试消息","sendTestMessage":"发送测试消息","deleteAccount":"删除账号","accountCreated":"账号已创建","accountUpdated":"账号已更新","accountDeleted":"账号已删除","authApproved":"授权已批准","userRemoved":"用户已移除","testMessageSent":"测试消息已发送","createFailed":"创建账号失败","updateFailed":"更新账号失败","deleteFailed":"删除账号失败","approveFailed":"批准失败","removeFailed":"移除用户失败","testMessageFailed":"发送测试消息失败","loadAccountsFailed":"加载账号列表失败","loadUsersFailed":"加载用户列表失败","noAccounts":"还没有账号,先添加一个。","userCount":"{{authorized}} 已授权 / {{pending}} 待授权(上限 16)","userId":"微信用户 ID","applyTime":"首次联系时间","expand":"展开","collapse":"收起","accountNameRequired":"账号名称不能为空","accountNotFound":"账号不存在或不可用","accountNotRunning":"账号未登录或未运行","userNotFound":"用户不存在","authSuccess":"✅ 已授权,你将开始收到通知。","authPending":"⏳ 已收到授权申请,请在 tmex 设置中批准。","testMessageTemplate":"🧪 测试消息\\n站点:{{siteName}}\\n时间:{{time}}","approveMessageTemplate":"✅ 已通过 tmex 授权。\\n账号:{{accountName}}\\n时间:{{time}}","keepalivePrompt":"【tmex】为确保你能正常收到通知,请回复任意内容即可保持连接 🙏","scanConfirmedSendHint":"扫码成功!请在微信里给该 bot 发送任意一条消息以完成绑定。","bindingInProgress":"已收到消息,正在完成绑定…","bindSuccess":"微信已绑定,开始接收通知。","bound":"已绑定","unbound":"未绑定","bindAction":"扫码绑定","gatewayOnline":"🟢 tmex 已上线 @ {{siteName}}"},"webhook":{"title":"Webhooks","url":"Webhook 地址","secret":"密钥","secretPlaceholder":"用于签名(HMAC-SHA256)","enabled":"启用","eventMask":"事件","add":"添加 Webhook","empty":"暂无 Webhook。","createFailed":"创建 Webhook 失败","deleteFailed":"删除 Webhook 失败","loadFailed":"加载 Webhook 失败"},"sshError":{"sshConfigRefNotSupported":"当前版本暂不支持 SSH Config 引用,请改为填写 host + username,并选择 Agent/私钥/密码认证","configRefNotSupported":"当前版本暂不支持 SSH Config 引用,请改为填写 host + username,并选择 Agent/私钥/密码认证","agentUnavailable":"SSH Agent 不可用:未检测到 SSH_AUTH_SOCK,请检查 agent 环境","agentNoIdentity":"SSH Agent 未加载可用密钥,请先执行 ssh-add","agentNoIdentities":"SSH Agent 未加载可用密钥,请先执行 ssh-add","authFailed":"认证失败:用户名、密码或密钥不正确,请检查设备配置","authFailedGeneric":"认证失败:用户名、密码或密钥不正确,请检查设备配置","networkUnreachable":"网络不可达:请检查路由、防火墙或 VPN 配置","connectionRefused":"连接被拒绝:无法连接到目标主机,请检查主机地址和端口是否正确","timeout":"连接超时:无法连接到设备,请检查网络或防火墙设置","connectionTimeout":"连接超时:无法连接到设备,请检查网络或防火墙设置","hostNotFound":"主机未找到:无法解析主机地址,请检查 DNS 或主机名是否正确","handshakeFailed":"握手失败:无法建立安全连接,可能是密钥交换算法不兼容","tmuxUnavailable":"远端 tmux 不可用或启动失败,请检查远端是否已安装 tmux,且远端 shell PATH 可找到 tmux","connectionClosed":"连接已断开,尝试重连中","unknown":"连接失败:{{message}}","reconnecting":"连接中断,{{delay}} 秒后自动重连({{attempt}}/{{maxRetries}})","reconnectFailed":"自动重连失败,请手动重试","reconnected":"设备已自动重连"},"deviceStatus":{"reconnecting":"重连中 {{delay}}s","offline":"离线","errorBadge":{"authFailed":"认证失败","agentUnavailable":"Agent 不可用","agentNoIdentity":"Agent 无密钥","configRefNotSupported":"不支持 SSH Config","networkUnreachable":"网络不可达","connectionRefused":"连接被拒","timeout":"连接超时","hostNotFound":"主机未找到","handshakeFailed":"握手失败","tmuxUnavailable":"tmux 不可用","connectionClosed":"连接已断开","unknown":"连接异常"}},"websocket":{"error":"WebSocket 连接错误","checkGateway":"请检查 Gateway 状态","upgradeFailed":"Upgrade failed","invalidMessage":"Invalid message format","reconnecting":"重连中","reconnect":"重新连接"},"wsError":{"checkGateway":"请检查 Gateway 状态"},"apiError":{"siteNameRequired":"站点名称不能为空","siteUrlInvalid":"站点 URL 必须以 http:// 或 https:// 开头","bellThrottleInvalid":"Bell 频控秒数需在 0-300 之间","sshRetriesInvalid":"SSH 重连次数需在 0-20 之间","sshDelayInvalid":"SSH 重连等待时间需在 1-300 秒之间","languageInvalid":"语言必须是受支持的区域设置之一","botNameRequired":"Bot 名称不能为空","botTokenRequired":"Bot token 不能为空","missingFields":"缺少必填字段","sshRequiresHost":"SSH 设备需要 host 或 sshConfigRef","invalidRequest":"请求无效","deviceNotFound":"Device not found","botNotFound":"Bot 不存在","chatNotFound":"Chat 不存在","urlAndSecretRequired":"URL and secret required","notFound":"Not found","llmProviderNameRequired":"Provider 名称不能为空","llmProviderProtocolInvalid":"协议必须是 openai-chat 或 openai-responses","llmProviderBaseUrlInvalid":"Base URL 必须以 http:// 或 https:// 开头","llmProviderApiKeyRequired":"API key 不能为空","llmProviderNotFound":"LLM provider 不存在","llmProviderDisabled":"LLM provider {{name}} 已被禁用","llmNoDefaultProvider":"未指定 LLM provider 且未配置默认 provider","llmNoDefaultModel":"未指定模型且未配置默认模型","llmDefaultProviderNotFound":"默认 provider 不存在","llmSearchProviderInvalid":"搜索服务必须是 none、tavily 或 brave","llmFetchModelsFailed":"拉取模型列表失败:{{detail}}","agentSessionNotFound":"Agent 会话不存在","agentSessionBusy":"Agent 会话正在运行中,请先停止或等待完成","agentSessionAwaitingConfirmation":"Agent 会话有待处理的确认请求,请先处理","agentDeviceRequired":"必须指定设备","agentPaneRequired":"必须指定终端 pane","agentWriteModeInvalid":"写入模式必须是 confirm 或 auto","agentMaxStepsInvalid":"每回合最大步数必须在 1-100 之间","agentProviderWebSearchRequiresResponses":"Provider 内置搜索仅支持 openai-responses 协议","agentHostedToolUnknown":"未知的 hosted 工具:{{name}}","agentHostedToolRequiresResponses":"Provider hosted 工具仅支持 openai-responses 协议","agentSessionOrphaned":"该 Agent 会话已孤立(绑定终端已不存在),仅可只读查看","agentQueuedMessageNotFound":"排队消息不存在","agentConfirmationNotFound":"确认请求不存在","agentConfirmationAlreadyDecided":"确认请求已被处理","agentMessageTextRequired":"消息内容不能为空","watchRuleNotFound":"Watch 规则不存在","watchNameRequired":"规则名称不能为空","watchTriggerTypeInvalid":"触发类型必须是 match、unchanged 或 llm","watchPatternRequired":"match/unchanged 规则必须提供正则表达式","watchPatternInvalid":"正则表达式无效:{{detail}}","watchUnchangedMinutesInvalid":"unchanged 规则的未变化分钟数必须大于 0","watchExtractGroupInvalid":"捕获组序号必须是不小于 0 的整数","watchConditionPromptRequired":"llm 规则必须提供条件描述","watchIntervalInvalid":"采样间隔不能小于 {{min}} 秒","watchNoMatchBehaviorInvalid":"无命中行为必须是 reset 或 ignore","watchFireModeInvalid":"触发模式必须是 once 或 repeat","watchCooldownInvalid":"冷却秒数必须是不小于 0 的整数","watchAssistDescriptionRequired":"请描述要匹配的内容","watchAssistModelUnavailable":"模型调用失败:{{detail}}","fileRootInvalid":"路径必须是已存在的绝对目录","fileOutsideRoots":"路径不在允许的目录范围内","fileNotADirectory":"不是目录","fileTooLarge":"文件过大","fileBinary":"不支持二进制文件","fileRootDeviceInvalid":"无效或未知的设备","fileRootDuplicate":"该设备下已添加过此目录","upgradeNotAllowed":"当前安装方式不支持程序内更新。","upgradeInProgress":"已有升级任务正在进行。","upgradeVersionRequired":"缺少目标版本号。","updateCheckFailed":"查询 npm registry 失败。","terminalShortcutsTooMany":"快捷键数量过多","terminalShortcutInvalid":"快捷键配置不合法"},"notification":{"clickToJump":"点击跳转到对应 Pane","eventType":{"terminal_bell":"🔔 终端 Bell","terminal_notification":"🔔 终端通知","tmux_window_close":"🪟 窗口关闭","tmux_pane_close":"📱 Pane 关闭","device_tmux_missing":"⚠️ Tmux 不可用","device_disconnect":"🔌 设备断开","session_created":"🆕 会话创建","session_closed":"🚪 会话关闭","agent_confirmation_pending":"🤖 Agent 等待确认","agent_turn_finished":"🤖 Agent 回合完成","agent_error":"🤖 Agent 错误","watch_triggered":"👁️ Watch 规则触发","watch_model_unavailable":"👁️ Watch 模型不可用","watch_rule_error":"👁️ Watch 规则错误"},"site":"站点","device":"设备","window":"窗口","pane":"Pane","time":"时间","directLink":"直达","message":"信息","paneTitle":"标题","process":"进程","telegramBell":{"title":"🔔 来自 {{siteName}} 的 Bell:{{terminalTopbarLabel}}","viewLink":"点击查看","terminalTopbarLabel":"窗口 {{window}} · Pane {{pane}} @ {{device}}"},"telegramNotification":{},"agent":{"confirmationPending":"Agent「{{title}}」请求执行工具 {{toolName}},等待确认","turnFinished":"Agent「{{title}}」回合完成","error":"Agent「{{title}}」出错:{{message}}"},"watch":{"matchTriggered":"监控「{{name}}」命中:{{text}}","unchangedTriggered":"监控「{{name}}」的值「{{value}}」已 {{minutes}} 分钟未变化","llmTriggered":"监控「{{name}}」条件满足:{{reason}}","summaryTriggered":"监控「{{name}}」:{{summary}}","unconfirmedSuffix":"(模型不可用,未经 LLM 二次确认)","modelUnavailable":"监控「{{name}}」模型调用失败:{{message}}","ruleError":"监控「{{name}}」连续失败 {{count}} 次,已自动停用:{{message}}","paneGone":"监控「{{name}}」的 Pane({{paneId}})已销毁,规则已自动删除"}},"sidebar":{"noWindows":"暂无窗口","noDevices":"暂无设备","addDeviceLink":"添加设备","openSettingsLink":"打开设置","openSettings":"打开设置","manageDevices":"管理设备","settings":"设置","currentWindow":"当前窗口","currentPane":"当前 pane","newWindow":"新建窗口","closeWindow":"关闭窗口","closePane":"关闭 pane","addDevice":"添加设备","tab":{"panes":"Panes","agent":"Agent","files":"Files"},"orphanedSessions":"孤立会话"},"agent":{"error":{"streamStalled":"模型停止响应(上游流无响应),请重试。"},"model":{"select":"选择模型","placeholder":"模型","noProviders":"暂无模型 — 请先在设置中配置供应商"},"queue":{"title":"队列({{count}})","steer":"立即注入","steerHint":"中断当前步骤并立即注入队列","withdraw":"撤回"},"orphan":{"readonly":"该会话已孤立(绑定终端已不存在),仅可只读查看","title":"孤立会话","process":"进程","startedAt":"创建于"},"files":{"comingSoon":"Coming Soon"},"panel":{"title":"Agent","empty":"选择或创建一个会话","inputPlaceholder":"输入消息…","send":"发送","stop":"停止","retry":"重试","scrollToBottom":"回到底部"},"welcome":{"title":"新建 Agent 对话","subtitle":"向 Agent 描述你的需求,开始在所选终端中协作"},"session":{"none":"未选择会话","new":"新建 Agent 会话","switch":"切换会话","selectPaneHint":"请在 Panes 标签中选择一个 pane 来开启会话","noSessions":"暂无会话","showAll":"显示全部会话","rename":"重命名会话","renameTitle":"重命名会话","renamePlaceholder":"会话标题","save":"保存","cancel":"取消","delete":"删除会话","deleteTitle":"删除此会话?","deleteDesc":"“{{title}}”及其全部消息将被永久删除。","deleteConfirm":"删除","createDisabledNoPane":"请先打开一个终端 pane 再创建会话","privacyNotice":"会话将把终端屏幕内容发送给配置的 LLM 服务。"},"binding":{"invalid":"已失效","mismatchTitle":"此会话绑定的 pane 与当前终端不一致","goTo":"跳转过去","rebind":"重绑到当前"},"writeMode":{"confirm":"写入需确认","auto":"自动执行"},"confirm":{"title":"等待确认","approve":"允许","deny":"拒绝"},"tool":{"input":"输入","result":"结果","screen":"屏幕快照","send_input":"发送输入","read_screen":"读取屏幕","web_search":"网络搜索","fetch_url":"抓取网页","denied":"已拒绝"},"reasoning":{"title":"思考过程"},"toast":{"errorTitle":"Agent“{{title}}”出错","credentialWarningTitle":"消息疑似包含凭证","credentialWarningDescription":"检测到 {{types}}。内容不会被修改,但会发送至 LLM 并存储,存在泄露风险。"}},"window":{"noWindows":"暂无窗口","new":"新建窗口","newInCwd":"在此目录新建窗口","close":"关闭窗口","closePane":"关闭面板","closeConfirmTitle":"关闭此窗口?","closePaneConfirmTitle":"关闭此面板?","closeConfirmDesc":"\\"{{name}}\\" 中运行的进程将被终止,此操作无法撤销。","menu":"窗口操作","dragHandle":"拖动以调整窗口顺序","dragHandlePane":"拖动以调整 pane 顺序","rename":"重命名窗口","renamePlaceholder":"输入名称","renameDesc":"自定义名称会覆盖终端设置的标题,并保留至 gateway 重启。","renameReset":"恢复自动名称"},"watch":{"title":"监控规则","dialogDesc":"监控该终端屏幕,条件满足时发送通知","openMonitor":"监控此终端","rules":{"empty":"该终端还没有监控规则","addRule":"新建规则","edit":"编辑","delete":"删除","viewState":"状态","lastTriggered":"最近触发:{{time}}","neverTriggered":"从未触发","deleteTitle":"删除该规则?","deleteDesc":"“{{name}}”将被永久删除。","deleteConfirm":"删除"},"type":{"match":"匹配","unchanged":"卡住","llm":"LLM"},"typeDesc":{"match":"正则命中屏幕内容时触发","unchanged":"提取值连续 N 分钟不变时触发(如下载卡住)","llm":"由 LLM 周期查看屏幕并判断自然语言条件"},"form":{"createTitle":"新建监控规则","editTitle":"编辑监控规则","name":"规则名称","namePlaceholder":"如:下载卡住提醒","triggerType":"触发类型","pattern":"正则表达式","patternPlaceholder":"如:(\\\\d+)%","flags":"标志","flagsPlaceholder":"如:i","extractGroup":"捕获组序号","extractGroupHint":"0 = 整个匹配;该组的值将被持续跟踪","unchangedMinutes":"不变持续(分钟)","noMatchBehavior":"无命中时","noMatchReset":"重置计时(进度行消失视为任务结束)","noMatchIgnore":"忽略(保留上次值)","conditionPrompt":"条件(自然语言)","conditionPromptPlaceholder":"如:构建因编译错误而失败","model":"模型","followGlobalDefault":"跟随全局默认","modelPlaceholder":"模型 ID","modelRequiredHint":"该规则会调用 LLM,请确保所选(或全局默认)模型可用。","confirmWithLlm":"通知前 LLM 二次确认","confirmWithLlmDesc":"减少误报;模型不可用时直接通知","summarizeWithLlm":"LLM 生成通知摘要","summarizeWithLlmDesc":"由模型总结屏幕内容作为通知正文","intervalSeconds":"采样间隔(秒)","intervalHint":"最低 {{min}} 秒","fireMode":"触发模式","fireOnce":"单次(触发后自动停用)","fireRepeat":"重复","cooldownSeconds":"冷却时间(秒)","enabled":"启用","assistLabel":"用描述生成正则","assistPlaceholder":"如:匹配下载进度百分比","assistButton":"生成","assistExplanation":"说明","assistPreview":"当前屏幕命中","assistPreviewEmpty":"当前屏幕样本无命中","create":"创建","save":"保存","providerUnavailable":"原提供商已不可用","providerDisabled":"已禁用"},"validation":{"nameRequired":"规则名称不能为空","patternRequired":"正则表达式不能为空","patternInvalid":"正则表达式无效:{{detail}}","unchangedMinutesInvalid":"不变持续分钟数必须大于 0","conditionPromptRequired":"条件描述不能为空","intervalMin":"采样间隔不能低于 {{min}} 秒"},"state":{"title":"规则状态","back":"返回","lastSampledAt":"最近采样","lastValue":"最近值","lastValueChangedAt":"值最近变化","lastTriggeredAt":"最近触发","consecutiveErrors":"连续错误次数","lastError":"最近错误","samples":"近期样本","samplesEmpty":"暂无样本","hit":"命中","none":"—"},"toast":{"created":"监控规则已创建","updated":"监控规则已更新","deleted":"监控规则已删除","triggeredTitle":"监控触发","openTerminal":"打开终端","modelUnavailableTitle":"监控模型不可用","modelUnavailableHint":"规则将以降级方式继续运行。","ruleErrorTitle":"监控规则已自动停用"},"notifPermission":{"title":"启用浏览器通知?","desc":"即使页面在后台,监控触发时也能收到通知。","enable":"启用","dismiss":"暂不"}},"validation":{"deviceNameRequired":"设备名称为必填项","hostRequired":"SSH 设备需要填写主机地址","portRequired":"SSH 设备需要填写有效端口","usernameRequired":"SSH 设备需要填写用户名","sshConfigRequired":"SSH 设备需要填写 ssh config 路径"},"files":{"title":"文件","refresh":"刷新文件列表","noRoots":"没有可访问的目录。请在「设置 → 文件」中添加。","emptyDir":"空目录","truncated":"条目过多,列表已截断","download":"下载","error":{"invalid":"无效请求","outside_roots":"路径超出允许的目录范围","not_found":"已不存在","not_a_directory":"不是目录","is_directory":"这是一个目录","too_large":"文件过大,无法预览","binary":"二进制文件无法预览","permission_denied":"无访问权限","device_not_found":"设备不存在","root_not_found":"目录项不存在","root_disabled":"该目录已禁用","connection_failed":"连接设备失败","auth_unsupported":"该设备的认证方式不支持文件访问(请用密钥或 ssh-agent)","rsync_missing_local":"服务器上未安装 rsync","rsync_missing_remote":"远程设备上未安装 rsync","timeout":"已超时","unknown":"加载失败"},"retry":"重试(收起后再展开)","menu":{"copyAbsolute":"复制绝对位置","copyRelative":"复制相对位置","sendToAgent":"发送到 Agent","expand":"展开","collapse":"收起","upload":"上传文件到这个文件夹","open":"打开"},"copied":"已复制到剪贴板","copyFailed":"复制失败","sendToAgent":{"prompt":"请处理这个路径:`{{path}}`"},"upload":{"uploading":"正在上传 {{name}}…","success":"已上传 {{name}}","fail":"上传 {{name}} 失败"},"transfer":{"legUserToTmex":"用户 → tmex","legTmexToServer":"tmex → 服务器","legServerToTmex":"服务器 → tmex","legTmexToUser":"tmex → 用户","cancel":"取消","canceled":"已取消 {{name}}","downloaded":"已下载 {{name}}","downloadFailed":"下载 {{name}} 失败","dragDownloadStarted":"已开始下载 {{name}}(由浏览器接管)","tooLarge":"{{name}} 超过大小上限({{max}})"},"agentLaunch":{"connectFailed":"连接设备失败","windowFailed":"创建窗口失败"},"install":{"button":"安装 rsync","scopeLocal":"服务器","scopeRemote":"远程","prompt":"设备 {{device}}({{scope}})上未检测到 rsync。请根据系统选择合适的命令安装 rsync(例如 `brew install rsync`、`sudo apt-get install -y rsync` 或 `sudo yum install -y rsync`),安装完成后回复我。"}},"file":{"invalidRef":"无效的文件引用","notFound":"文件已不存在","accessDenied":"无访问权限","loadFailed":"加载文件失败","isDirectory":"这是一个目录","notPreviewable":"该文件类型不支持预览","tooLarge":"文件过大,无法预览","binary":"二进制文件无法预览","download":"下载","openRaw":"打开原始文件"}}'),t={translation:e};export{t as default,e as translation};
|
|
1
|
+
const e=JSON.parse('{"common":{"loading":"加载中...","save":"保存","saving":"保存中...","cancel":"取消","add":"添加","delete":"删除","edit":"修改","confirm":"确认","close":"关闭","expand":"展开","collapse":"收起","refresh":"刷新","test":"测试","send":"发送","success":"成功","error":"错误","warning":"警告","info":"信息","yes":"是","no":"否","enabled":"已启用","disabled":"已禁用","pending":"待授权","authorized":"已授权","unknown":"未知","empty":"空","none":"无","default":"默认","optional":"可选","required":"必填","pwaInstallTitle":"安装为应用","pwaInstallHintIOSSafari":"iOS Safari 不会自动弹出安装提示。请点击「分享」,再选择「添加到主屏幕」。","pwaInstallHintIOSChrome":"iOS Chrome 不会自动弹出安装提示。请点击「分享」,再选择「添加到主屏幕」"},"nav":{"manageDevices":"管理设备","settings":"设置","sidebarExpand":"展开侧边栏","sidebarCollapse":"收起侧边栏","openSidebar":"打开侧边栏","closeSidebar":"关闭侧边栏","jumpToLatest":"跳转到最新","switchToEditor":"切换到编辑器输入","switchToDirect":"切换到直接输入","refreshPage":"刷新页面","refreshPageConfirm":"确定要刷新页面吗?未保存的内容将会丢失。"},"device":{"title":"设备管理","devices":"设备","addDevice":"添加设备","addDeviceDescription":"填写设备信息并选择连接方式","addFirstDevice":"添加第一个设备","editDevice":"修改设备","editDeviceDescription":"更新设备配置","sectionBasic":"基本信息","sectionConnection":"连接信息","sectionAuth":"认证信息","noDevices":"暂无设备","noDevicesDescription":"添加本地或 SSH 设备开始使用","name":"设备名称","namePlaceholder":"例如:我的服务器","type":"类型","typeLocal":"本地设备","typeSSH":"SSH 远程设备","typeSSHBadge":"SSH","host":"主机","hostPlaceholder":"example.com","port":"端口","username":"用户名","usernamePlaceholder":"root","session":"Tmux 会话名称","sessionPlaceholder":"tmex","sessionHint":"留空将使用默认值 \\"tmex\\"","defaultWorkingDir":"默认工作目录","defaultWorkingDirPlaceholder":"留空使用用户 home 目录","authMode":"认证方式","authPassword":"密码","authKey":"私钥","authAgent":"SSH Agent","authConfigRef":"SSH Config","sshConfigRefPlaceholder":"Host 别名,如 my-server","sshConfigRefHint":"填 ssh config 里的 Host 别名,经 `ssh -G` 解析;不是 config 文件路径。","password":"密码","privateKey":"私钥","privateKeyPlaceholder":"-----BEGIN OPENSSH PRIVATE KEY-----","privateKeyPassphrase":"私钥密码(可选)","passphrase":"私钥密码(可选)","connect":"连接","connected":"已连接","disconnect":"断开","disconnected":"已断开","connecting":"连接中...","dragHandle":"拖动以调整设备顺序","reorderFailed":"设备排序失败","deleteConfirm":"删除此设备?","deleteDescription":"设备 \\"{{name}}\\" 将被永久移除,此操作无法撤销。","deleteSuccess":"设备已删除","createSuccess":"设备已创建","updateSuccess":"设备已更新","deleteFailed":"删除设备失败","createFailed":"创建设备失败","updateFailed":"更新设备失败","loadFailed":"加载设备列表失败","localDevice":"本地设备","subtitle":"{{username}}@{{host}}:{{port}}","modify":"修改设备","delete":"删除"},"terminal":{"keyboardBehavior":{"title":"键盘行为","description":"选择手机键盘弹出时页面的避让方式","modeLift":"页面平移","modeLiftDesc":"键盘弹出时整页上移,终端大小不变","modeResize":"终端缩放","modeResizeDesc":"缩小终端铺满键盘上方区域(会调整远端窗口行数)","modeFollow":"光标对齐","modeFollowDesc":"按光标位置上移,光标始终在键盘正上方,终端大小不变"},"initializing":"初始化终端...","connecting":"连接设备...","initFailed":"终端初始化失败","inputPlaceholder":"在此输入命令...","clear":"清空","deviceError":"设备错误","deviceErrorWithType":"[{{type}}] 设备错误","noDeviceSelected":"未选择设备","windowClosed":"当前窗口已关闭,请在侧边栏重新选择窗口。","paneClosed":"当前 Pane 已关闭,请在侧边栏重新选择 Pane。","bellNotification":"终端 Bell","bellDescriptionWithTitle":"窗口 {{window}} · {{paneLabel}}","bellFallback":"收到 tmux bell","notificationFallbackTitle":"终端通知","notificationSourceLabel":"来自 {{source}}","notificationFallbackDetail":"终端通知","paneTitle":"Pane {{index}}","activePane":"当前 pane","activeWindow":"当前窗口","editorPlaceholder":"在此输入命令...","editorClear":"清空","editorSendWithEnter":"发送附带回车","editorSendLineByLine":"逐行发送","editorSend":"发送","sendShortcut":"发送 {{key}}","inputModeDirect":"直接输入","inputModeEditor":"编辑器","newWindow":"新建窗口","closeWindow":"关闭窗口","closePane":"关闭 pane","copy":"复制","paste":"粘贴","copied":"已复制到剪贴板","copyFailed":"复制失败","pasteFailed":"无法读取剪贴板,请检查浏览器权限","clearSelection":"取消选择"},"settings":{"title":"系统设置","siteSettings":"站点设置","siteName":"站点名称","siteNamePlaceholder":"tmex","siteUrl":"站点访问 URL","siteUrlPlaceholder":"http://localhost:3000","bellThrottle":"Bell 频控(秒)","notificationThrottle":"通知频控(秒)","enableBrowserBellToast":"开启浏览器 Bell Toast","enableBrowserNotificationToast":"开启浏览器通知 Toast","enableTelegramBellPush":"开启 Telegram Bell 推送","enableTelegramNotificationPush":"开启 Telegram 通知推送","enableWeixinBellPush":"启用微信响铃推送","enableWeixinNotificationPush":"启用微信通知推送","sshReconnectRetries":"SSH 重连次数","sshReconnectDelay":"SSH 重连等待(秒)","language":"语言","languagePlaceholder":"选择语言","language_en_US":"English","language_zh_CN":"简体中文","language_ja_JP":"日本語","theme":"深色模式","themeLight":"浅色","themeDark":"深色","siteTab":"站点","notificationsTab":"通知","tabGroup":{"general":"通用","devicesAndFiles":"设备与文件","notifications":"通知","ai":"AI","terminal":"终端"},"terminal":{"title":"终端设置","description":"调整终端的字号、行高、字体与手机键盘避让行为。字体选择对全应用所有等宽文本生效。","fontSize":"字号","lineHeight":"行高","fontFamily":"字体","preview":"预览","savedInBrowser":"这些设置仅保存在当前浏览器中。","shortcuts":{"title":"自定义快捷键","savedOnServer":"保存在服务器、多端共享——修改后需点「保存」才生效。","preview":"预览","useIcons":"用图标展示快捷键","useIconsDesc":"把 Ctrl/Shift/回车 等按键名替换为苹果风格符号(⌃⇧⏎)。","dragHandle":"拖动排序","delete":"删除","labelPlaceholder":"显示文字","payloadPlaceholder":"序列,如 \\\\x1b[A","addShortcut":"添加快捷键","capturePrompt":"请按下目标组合键……","captureHint":"点此,然后按下要录制的按键","advanced":"高级:手动输入序列","add":"添加","reset":"重置为默认","save":"保存","saved":"快捷键已保存","saveFailed":"保存快捷键失败","loading":"加载中……","action":{"paste":"粘贴","toggleKeyboard":"切换文本框/键盘","newAgentSession":"新建 Agent 会话","scrollToBottom":"终端回到最下方"},"loadFailed":"加载快捷键失败","retry":"重试"}},"deviceManagement":{"title":"设备管理","description":"添加、编辑并连接你的本地与 SSH 设备。","openButton":"打开设备管理"},"refreshToApply":"刷新后生效","saveSettings":"保存设置","settingsSaved":"站点设置已保存","saveFailed":"保存设置失败","loadFailed":"加载设置失败","restartGateway":"重启 Gateway","restartScheduled":"Gateway 重启请求已发送","restartConfirm":"确定要重启 Gateway 吗?这将中断所有活动连接。","restartFailed":"重启请求失败","sshReconnectMaxRetries":"SSH 重连次数","llm":{"title":"LLM 提供商","name":"名称","namePlaceholder":"如 OpenAI","baseUrl":"Base URL","baseUrlPlaceholder":"https://api.openai.com","baseUrlHint":"默认自动补全 /v1;以 / 结尾则按原路径不补 /v1","protocol":"协议","apiKey":"API Key","apiKeyPlaceholder":"输入 API Key","apiKeySetPlaceholder":"已设置,留空不修改","addProvider":"添加提供商","editProvider":"编辑供应商","formHint":"配置供应商连接信息","models":"模型","modelsTitle":"{{name}} 的模型","modelsHint":"管理该供应商可用的模型,启停与手动添加","modelManual":"手动","addModelPlaceholder":"添加模型 ID","empty":"暂无提供商","refreshModels":"刷新模型","modelsCount":"{{total}} 个模型","modelsNotFetched":"尚未获取模型列表","modelsFetchFailed":"模型列表获取失败:{{error}}","deleteProvider":"删除提供商","deleteConfirm":"确定要删除提供商「{{name}}」吗?","defaults":"全局默认","defaultProvider":"默认提供商","defaultProviderNone":"未设置","defaultModel":"默认模型","defaultModelPlaceholder":"输入或选择模型 ID","saveDefaults":"保存默认设置","loadFailed":"加载 LLM 提供商失败","createFailed":"创建提供商失败","updateFailed":"更新提供商失败","deleteFailed":"删除提供商失败","refreshModelsFailed":"刷新模型失败","settingsLoadFailed":"加载 LLM 设置失败","settingsSaveFailed":"保存 LLM 设置失败"},"search":{"title":"搜索","provider":"搜索提供商","responsesApiHint":"若 LLM Provider 使用 OpenAI Responses API 协议,可直接使用其内置的 hosted 搜索工具;下方第三方搜索为可选补充。","providerNone":"不启用","tavilyApiKey":"Tavily API Key","braveApiKey":"Brave API Key","keyPlaceholder":"输入 API Key","keySetPlaceholder":"已设置,留空不修改","clearKey":"清除","clearKeyConfirm":"确定要清除此 API Key 吗?清除后需要重新填写。","loadFailed":"加载搜索设置失败","saveFailed":"保存搜索设置失败"},"files":{"title":"文件","description":"配置各设备下可在「文件」标签页浏览的目录。本地设备直接读取,SSH 设备走 rsync。","addRoot":"添加目录","roots":"目录","empty":"尚未配置任何目录","missing":"设备已失效","modalAddTitle":"添加目录","modalEditTitle":"编辑目录","device":"设备","devicePlaceholder":"选择设备","noDevices":"还没有设备,请先添加设备","path":"路径","pathPlaceholder":"/绝对路径/到/目录","pathHint":"所选设备上的绝对路径。","enabled":"启用","addFailed":"添加目录失败","updateFailed":"更新目录失败","deleteFailed":"移除目录失败","toggleFailed":"更新目录失败","deleteTitle":"移除目录?","deleteDesc":"将「{{path}}」移出白名单?该目录下的文件将不再可访问。"},"version":{"title":"版本与更新","currentVersion":"当前版本","installMethod":"安装方式","installMethodCli":"通过 CLI 安装","installMethodNonCli":"非 CLI 安装","deployment":"部署方式","deploymentLaunchd":"launchd(macOS)","deploymentSystemd":"systemd(Linux)","deploymentNone":"无","checkUpdate":"检查更新","checking":"检查中…","upToDate":"已是最新版本。","updateAvailable":"有可用更新:{{version}}","changelog":"更新日志","changelogUnavailable":"该版本暂无更新日志。","publishedAt":"发布于 {{date}}","upgrade":"立即升级","upgradeDisabledDev":"非 production 环境已禁用程序内更新。","upgradeDisabledNonCli":"程序内更新仅在通过 CLI 安装时可用。","upgradeWarningTitle":"确认升级","upgradeWarningBody":"升级会重启服务并中断当前访问,还可能影响该服务托管的 tmux 进程的存活。是否继续?","upgradeStarted":"升级已开始","stateDownloading":"正在下载新版本…","stateExecuting":"正在执行升级,服务即将重启…","interruptNotice":"服务重启期间连接会断开,稍候即可恢复。","checkFailed":"检查更新失败","terminalHint":"或通过终端升级:npx tmex-cli@<version> upgrade"}},"telegram":{"title":"Telegram Bot 管理","botName":"Bot 名称","botNamePlaceholder":"如:ops-bot","botToken":"Bot Token","botTokenPlaceholder":"123456:AA...","addBot":"新增 Bot","editBot":"编辑 Bot","enableBot":"启用 Bot","allowAuthRequests":"允许申请授权","pendingChats":"待授权","chats":"已授权","authorizedChats":"已授权","noPendingChats":"暂无待授权 chat","noAuthorizedChats":"暂无已授权 chat","approve":"批准","authorize":"授权","reject":"拒绝","revokeAuth":"撤销授权","testMessage":"测试消息","sendTestMessage":"发送测试消息","deleteBot":"删除 Bot","tokenOptional":"Token(留空不改)","tokenPlaceholder":"输入新 token","botCreated":"Bot 已创建","botUpdated":"Bot 已更新","botDeleted":"Bot 已删除","authApproved":"授权已批准","chatRemoved":"chat 已移除","testMessageSent":"测试消息已发送","createFailed":"新增 Bot 失败","updateFailed":"更新 Bot 失败","deleteFailed":"删除 Bot 失败","approveFailed":"批准授权失败","removeFailed":"删除 chat 失败","testMessageFailed":"发送测试消息失败","loadBotsFailed":"加载 Bot 列表失败","loadChatsFailed":"加载 chat 列表失败","noBots":"暂无 Bot,先添加一个。","expand":"展开","collapse":"收起","authCount":"已授权 {{authorized}} / 待授权 {{pending}}(总上限 8)","chatId":"chatId","applyTime":"申请时间","gatewayOnline":"🟢 Gateway online @ {{siteName}}","deviceConnectionError":"🔴 {{siteName}}:设备「{{deviceName}}」({{host}}) 连接异常 [{{category}}]\\n{{error}}","agentCredentialWarning":"⚠️ {{siteName}}:Agent 会话「{{sessionTitle}}」的一条消息疑似包含凭证({{types}})。该内容将发送至 LLM 并存储,存在泄露风险。","authSuccess":"✅ 已授权,可接收通知。","authPending":"⏳ 已收到授权申请,请在 tmex 设置页审批。","authFailed":"❌ 授权申请失败,请联系管理员。","testMessageTemplate":"🧪 测试消息\\n站点:{{siteName}}\\n时间:{{time}}","approveMessageTemplate":"✅ 已通过 tmex 授权。\\nBot:{{botName}}\\n时间:{{time}}","botNotFound":"Bot 未启动或不可用","botNotRunning":"Bot 未启动或不可用"},"weixin":{"title":"微信 (ClawBot) 管理","subtitle":"通过 iLink bot 协议把 tmex 告警推送到你的个人微信。","replyOnlyNotice":"iLink 只能在会话激活窗口内回复——先给 bot 发条消息激活,告警随后复用该会话;闲置过久会话会过期,需再给 bot 发条消息重新激活。","accountName":"账号名称","accountNamePlaceholder":"如:我的微信","addAccount":"添加账号","editAccount":"编辑账号","enableAccount":"启用账号","allowAuthRequests":"允许授权申请","scanToLogin":"扫码登录","relogin":"重新登录(重新扫码)","loggedIn":"已登录","notLoggedIn":"未登录","scanQrcodeHint":"打开微信扫描二维码,并在手机上确认。","loginPending":"等待扫码…","loginConfirmed":"登录已确认。","loginExpired":"二维码已过期,请重试。","loginError":"登录失败:{{message}}","loginFailed":"登录失败","refreshQrcode":"刷新二维码","closeLogin":"关闭","pendingUsers":"待授权","authorizedUsers":"已授权用户","noPendingUsers":"暂无待授权用户","noAuthorizedUsers":"暂无已授权用户","needsReactivation":"会话已过期","reactivationHint":"请该用户给 bot 发条消息以重新激活告警。","approve":"批准","revokeAuth":"撤销授权","removeUser":"移除","testMessage":"测试消息","sendTestMessage":"发送测试消息","deleteAccount":"删除账号","accountCreated":"账号已创建","accountUpdated":"账号已更新","accountDeleted":"账号已删除","authApproved":"授权已批准","userRemoved":"用户已移除","testMessageSent":"测试消息已发送","createFailed":"创建账号失败","updateFailed":"更新账号失败","deleteFailed":"删除账号失败","approveFailed":"批准失败","removeFailed":"移除用户失败","testMessageFailed":"发送测试消息失败","loadAccountsFailed":"加载账号列表失败","loadUsersFailed":"加载用户列表失败","noAccounts":"还没有账号,先添加一个。","userCount":"{{authorized}} 已授权 / {{pending}} 待授权(上限 16)","userId":"微信用户 ID","applyTime":"首次联系时间","expand":"展开","collapse":"收起","accountNameRequired":"账号名称不能为空","accountNotFound":"账号不存在或不可用","accountNotRunning":"账号未登录或未运行","userNotFound":"用户不存在","authSuccess":"✅ 已授权,你将开始收到通知。","authPending":"⏳ 已收到授权申请,请在 tmex 设置中批准。","testMessageTemplate":"🧪 测试消息\\n站点:{{siteName}}\\n时间:{{time}}","approveMessageTemplate":"✅ 已通过 tmex 授权。\\n账号:{{accountName}}\\n时间:{{time}}","keepalivePrompt":"【tmex】为确保你能正常收到通知,请回复任意内容即可保持连接 🙏","scanConfirmedSendHint":"扫码成功!请在微信里给该 bot 发送任意一条消息以完成绑定。","bindingInProgress":"已收到消息,正在完成绑定…","bindSuccess":"微信已绑定,开始接收通知。","bound":"已绑定","unbound":"未绑定","bindAction":"扫码绑定","gatewayOnline":"🟢 tmex 已上线 @ {{siteName}}"},"webhook":{"title":"Webhooks","url":"Webhook 地址","secret":"密钥","secretPlaceholder":"用于签名(HMAC-SHA256)","enabled":"启用","eventMask":"事件","add":"添加 Webhook","empty":"暂无 Webhook。","createFailed":"创建 Webhook 失败","deleteFailed":"删除 Webhook 失败","loadFailed":"加载 Webhook 失败"},"sshError":{"sshConfigRefNotSupported":"当前版本暂不支持 SSH Config 引用,请改为填写 host + username,并选择 Agent/私钥/密码认证","configRefNotSupported":"当前版本暂不支持 SSH Config 引用,请改为填写 host + username,并选择 Agent/私钥/密码认证","agentUnavailable":"SSH Agent 不可用:未检测到 SSH_AUTH_SOCK,请检查 agent 环境","agentNoIdentity":"SSH Agent 未加载可用密钥,请先执行 ssh-add","agentNoIdentities":"SSH Agent 未加载可用密钥,请先执行 ssh-add","authFailed":"认证失败:用户名、密码或密钥不正确,请检查设备配置","authFailedGeneric":"认证失败:用户名、密码或密钥不正确,请检查设备配置","networkUnreachable":"网络不可达:请检查路由、防火墙或 VPN 配置","connectionRefused":"连接被拒绝:无法连接到目标主机,请检查主机地址和端口是否正确","timeout":"连接超时:无法连接到设备,请检查网络或防火墙设置","connectionTimeout":"连接超时:无法连接到设备,请检查网络或防火墙设置","hostNotFound":"主机未找到:无法解析主机地址,请检查 DNS 或主机名是否正确","handshakeFailed":"握手失败:无法建立安全连接,可能是密钥交换算法不兼容","tmuxUnavailable":"远端 tmux 不可用或启动失败,请检查远端是否已安装 tmux,且远端 shell PATH 可找到 tmux","connectionClosed":"连接已断开,尝试重连中","unknown":"连接失败:{{message}}","reconnecting":"连接中断,{{delay}} 秒后自动重连({{attempt}}/{{maxRetries}})","reconnectFailed":"自动重连失败,请手动重试","reconnected":"设备已自动重连"},"deviceStatus":{"reconnecting":"重连中 {{delay}}s","offline":"离线","errorBadge":{"authFailed":"认证失败","agentUnavailable":"Agent 不可用","agentNoIdentity":"Agent 无密钥","configRefNotSupported":"不支持 SSH Config","networkUnreachable":"网络不可达","connectionRefused":"连接被拒","timeout":"连接超时","hostNotFound":"主机未找到","handshakeFailed":"握手失败","tmuxUnavailable":"tmux 不可用","connectionClosed":"连接已断开","unknown":"连接异常"}},"websocket":{"error":"WebSocket 连接错误","checkGateway":"请检查 Gateway 状态","upgradeFailed":"Upgrade failed","invalidMessage":"Invalid message format","reconnecting":"重连中","reconnect":"重新连接"},"wsError":{"checkGateway":"请检查 Gateway 状态"},"apiError":{"siteNameRequired":"站点名称不能为空","siteUrlInvalid":"站点 URL 必须以 http:// 或 https:// 开头","bellThrottleInvalid":"Bell 频控秒数需在 0-300 之间","sshRetriesInvalid":"SSH 重连次数需在 0-20 之间","sshDelayInvalid":"SSH 重连等待时间需在 1-300 秒之间","languageInvalid":"语言必须是受支持的区域设置之一","botNameRequired":"Bot 名称不能为空","botTokenRequired":"Bot token 不能为空","missingFields":"缺少必填字段","sshRequiresHost":"SSH 设备需要 host 或 sshConfigRef","invalidRequest":"请求无效","deviceNotFound":"Device not found","botNotFound":"Bot 不存在","chatNotFound":"Chat 不存在","urlAndSecretRequired":"URL and secret required","notFound":"Not found","llmProviderNameRequired":"Provider 名称不能为空","llmProviderProtocolInvalid":"协议必须是 openai-chat 或 openai-responses","llmProviderBaseUrlInvalid":"Base URL 必须以 http:// 或 https:// 开头","llmProviderApiKeyRequired":"API key 不能为空","llmProviderNotFound":"LLM provider 不存在","llmProviderDisabled":"LLM provider {{name}} 已被禁用","llmNoDefaultProvider":"未指定 LLM provider 且未配置默认 provider","llmNoDefaultModel":"未指定模型且未配置默认模型","llmDefaultProviderNotFound":"默认 provider 不存在","llmSearchProviderInvalid":"搜索服务必须是 none、tavily 或 brave","llmFetchModelsFailed":"拉取模型列表失败:{{detail}}","agentSessionNotFound":"Agent 会话不存在","agentSessionBusy":"Agent 会话正在运行中,请先停止或等待完成","agentSessionAwaitingConfirmation":"Agent 会话有待处理的确认请求,请先处理","agentDeviceRequired":"必须指定设备","agentPaneRequired":"必须指定终端 pane","agentWriteModeInvalid":"写入模式必须是 confirm 或 auto","agentMaxStepsInvalid":"每回合最大步数必须在 1-100 之间","agentProviderWebSearchRequiresResponses":"Provider 内置搜索仅支持 openai-responses 协议","agentHostedToolUnknown":"未知的 hosted 工具:{{name}}","agentHostedToolRequiresResponses":"Provider hosted 工具仅支持 openai-responses 协议","agentSessionOrphaned":"该 Agent 会话已孤立(绑定终端已不存在),仅可只读查看","agentQueuedMessageNotFound":"排队消息不存在","agentConfirmationNotFound":"确认请求不存在","agentConfirmationAlreadyDecided":"确认请求已被处理","agentMessageTextRequired":"消息内容不能为空","watchRuleNotFound":"Watch 规则不存在","watchNameRequired":"规则名称不能为空","watchTriggerTypeInvalid":"触发类型必须是 match、unchanged 或 llm","watchPatternRequired":"match/unchanged 规则必须提供正则表达式","watchPatternInvalid":"正则表达式无效:{{detail}}","watchUnchangedMinutesInvalid":"unchanged 规则的未变化分钟数必须大于 0","watchExtractGroupInvalid":"捕获组序号必须是不小于 0 的整数","watchConditionPromptRequired":"llm 规则必须提供条件描述","watchIntervalInvalid":"采样间隔不能小于 {{min}} 秒","watchNoMatchBehaviorInvalid":"无命中行为必须是 reset 或 ignore","watchFireModeInvalid":"触发模式必须是 once 或 repeat","watchCooldownInvalid":"冷却秒数必须是不小于 0 的整数","watchAssistDescriptionRequired":"请描述要匹配的内容","watchAssistModelUnavailable":"模型调用失败:{{detail}}","fileRootInvalid":"路径必须是已存在的绝对目录","fileOutsideRoots":"路径不在允许的目录范围内","fileNotADirectory":"不是目录","fileTooLarge":"文件过大","fileBinary":"不支持二进制文件","fileRootDeviceInvalid":"无效或未知的设备","fileRootDuplicate":"该设备下已添加过此目录","upgradeNotAllowed":"当前安装方式不支持程序内更新。","upgradeInProgress":"已有升级任务正在进行。","upgradeVersionRequired":"缺少目标版本号。","updateCheckFailed":"查询 npm registry 失败。","terminalShortcutsTooMany":"快捷键数量过多","terminalShortcutInvalid":"快捷键配置不合法"},"notification":{"clickToJump":"点击跳转到对应 Pane","eventType":{"terminal_bell":"🔔 终端 Bell","terminal_notification":"🔔 终端通知","tmux_window_close":"🪟 窗口关闭","tmux_pane_close":"📱 Pane 关闭","device_tmux_missing":"⚠️ Tmux 不可用","device_disconnect":"🔌 设备断开","session_created":"🆕 会话创建","session_closed":"🚪 会话关闭","agent_confirmation_pending":"🤖 Agent 等待确认","agent_turn_finished":"🤖 Agent 回合完成","agent_error":"🤖 Agent 错误","watch_triggered":"👁️ Watch 规则触发","watch_model_unavailable":"👁️ Watch 模型不可用","watch_rule_error":"👁️ Watch 规则错误"},"site":"站点","device":"设备","window":"窗口","pane":"Pane","time":"时间","directLink":"直达","message":"信息","paneTitle":"标题","process":"进程","telegramBell":{"title":"🔔 来自 {{siteName}} 的 Bell:{{terminalTopbarLabel}}","viewLink":"点击查看","terminalTopbarLabel":"窗口 {{window}} · Pane {{pane}} @ {{device}}"},"telegramNotification":{},"agent":{"confirmationPending":"Agent「{{title}}」请求执行工具 {{toolName}},等待确认","turnFinished":"Agent「{{title}}」回合完成","error":"Agent「{{title}}」出错:{{message}}"},"watch":{"matchTriggered":"监控「{{name}}」命中:{{text}}","unchangedTriggered":"监控「{{name}}」的值「{{value}}」已 {{minutes}} 分钟未变化","llmTriggered":"监控「{{name}}」条件满足:{{reason}}","summaryTriggered":"监控「{{name}}」:{{summary}}","unconfirmedSuffix":"(模型不可用,未经 LLM 二次确认)","modelUnavailable":"监控「{{name}}」模型调用失败:{{message}}","ruleError":"监控「{{name}}」连续失败 {{count}} 次,已自动停用:{{message}}","paneGone":"监控「{{name}}」的 Pane({{paneId}})已销毁,规则已自动删除"}},"sidebar":{"noWindows":"暂无窗口","noDevices":"暂无设备","addDeviceLink":"添加设备","openSettingsLink":"打开设置","openSettings":"打开设置","manageDevices":"管理设备","settings":"设置","currentWindow":"当前窗口","currentPane":"当前 pane","newWindow":"新建窗口","closeWindow":"关闭窗口","closePane":"关闭 pane","addDevice":"添加设备","tab":{"panes":"Panes","agent":"Agent","files":"Files"},"orphanedSessions":"孤立会话"},"agent":{"error":{"streamStalled":"模型停止响应(上游流无响应),请重试。"},"model":{"select":"选择模型","placeholder":"模型","noProviders":"暂无模型 — 请先在设置中配置供应商"},"queue":{"title":"队列({{count}})","steer":"立即注入","steerHint":"中断当前步骤并立即注入队列","withdraw":"撤回"},"orphan":{"readonly":"该会话已孤立(绑定终端已不存在),仅可只读查看","title":"孤立会话","process":"进程","startedAt":"创建于"},"files":{"comingSoon":"Coming Soon"},"panel":{"title":"Agent","empty":"选择或创建一个会话","inputPlaceholder":"输入消息…","send":"发送","stop":"停止","retry":"重试","scrollToBottom":"回到底部"},"welcome":{"title":"新建 Agent 对话","subtitle":"向 Agent 描述你的需求,开始在所选终端中协作"},"session":{"none":"未选择会话","new":"新建 Agent 会话","switch":"切换会话","selectPaneHint":"请在 Panes 标签中选择一个 pane 来开启会话","noSessions":"暂无会话","showAll":"显示全部会话","rename":"重命名会话","renameTitle":"重命名会话","renamePlaceholder":"会话标题","save":"保存","cancel":"取消","delete":"删除会话","deleteTitle":"删除此会话?","deleteDesc":"“{{title}}”及其全部消息将被永久删除。","deleteConfirm":"删除","createDisabledNoPane":"请先打开一个终端 pane 再创建会话","privacyNotice":"会话将把终端屏幕内容发送给配置的 LLM 服务。"},"binding":{"invalid":"已失效","mismatchTitle":"此会话绑定的 pane 与当前终端不一致","goTo":"跳转过去","rebind":"重绑到当前"},"writeMode":{"confirm":"写入需确认","auto":"自动执行"},"confirm":{"title":"等待确认","approve":"允许","deny":"拒绝"},"tool":{"input":"输入","result":"结果","screen":"屏幕快照","send_input":"发送输入","read_screen":"读取屏幕","web_search":"网络搜索","fetch_url":"抓取网页","denied":"已拒绝"},"reasoning":{"title":"思考过程"},"toast":{"errorTitle":"Agent“{{title}}”出错","credentialWarningTitle":"消息疑似包含凭证","credentialWarningDescription":"检测到 {{types}}。内容不会被修改,但会发送至 LLM 并存储,存在泄露风险。"}},"window":{"noWindows":"暂无窗口","new":"新建窗口","newInCwd":"在此目录新建窗口","close":"关闭窗口","closePane":"关闭面板","closeConfirmTitle":"关闭此窗口?","closePaneConfirmTitle":"关闭此面板?","closeConfirmDesc":"\\"{{name}}\\" 中运行的进程将被终止,此操作无法撤销。","menu":"窗口操作","dragHandle":"拖动以调整窗口顺序","dragHandlePane":"拖动以调整 pane 顺序","rename":"重命名窗口","renamePlaceholder":"输入名称","renameDesc":"自定义名称会覆盖终端设置的标题,并保留至 gateway 重启。","renameReset":"恢复自动名称","switchPane":"切换 Pane","splitRight":"向右分屏","splitDown":"向下分屏","paneCount":"{{count}} 个 pane","pane":"Pane","moveToWindow":"移入此窗口","breakToWindow":"拆为独立窗口"},"watch":{"title":"监控规则","dialogDesc":"监控该终端屏幕,条件满足时发送通知","openMonitor":"监控此终端","rules":{"empty":"该终端还没有监控规则","addRule":"新建规则","edit":"编辑","delete":"删除","viewState":"状态","lastTriggered":"最近触发:{{time}}","neverTriggered":"从未触发","deleteTitle":"删除该规则?","deleteDesc":"“{{name}}”将被永久删除。","deleteConfirm":"删除"},"type":{"match":"匹配","unchanged":"卡住","llm":"LLM"},"typeDesc":{"match":"正则命中屏幕内容时触发","unchanged":"提取值连续 N 分钟不变时触发(如下载卡住)","llm":"由 LLM 周期查看屏幕并判断自然语言条件"},"form":{"createTitle":"新建监控规则","editTitle":"编辑监控规则","name":"规则名称","namePlaceholder":"如:下载卡住提醒","triggerType":"触发类型","pattern":"正则表达式","patternPlaceholder":"如:(\\\\d+)%","flags":"标志","flagsPlaceholder":"如:i","extractGroup":"捕获组序号","extractGroupHint":"0 = 整个匹配;该组的值将被持续跟踪","unchangedMinutes":"不变持续(分钟)","noMatchBehavior":"无命中时","noMatchReset":"重置计时(进度行消失视为任务结束)","noMatchIgnore":"忽略(保留上次值)","conditionPrompt":"条件(自然语言)","conditionPromptPlaceholder":"如:构建因编译错误而失败","model":"模型","followGlobalDefault":"跟随全局默认","modelPlaceholder":"模型 ID","modelRequiredHint":"该规则会调用 LLM,请确保所选(或全局默认)模型可用。","confirmWithLlm":"通知前 LLM 二次确认","confirmWithLlmDesc":"减少误报;模型不可用时直接通知","summarizeWithLlm":"LLM 生成通知摘要","summarizeWithLlmDesc":"由模型总结屏幕内容作为通知正文","intervalSeconds":"采样间隔(秒)","intervalHint":"最低 {{min}} 秒","fireMode":"触发模式","fireOnce":"单次(触发后自动停用)","fireRepeat":"重复","cooldownSeconds":"冷却时间(秒)","enabled":"启用","assistLabel":"用描述生成正则","assistPlaceholder":"如:匹配下载进度百分比","assistButton":"生成","assistExplanation":"说明","assistPreview":"当前屏幕命中","assistPreviewEmpty":"当前屏幕样本无命中","create":"创建","save":"保存","providerUnavailable":"原提供商已不可用","providerDisabled":"已禁用"},"validation":{"nameRequired":"规则名称不能为空","patternRequired":"正则表达式不能为空","patternInvalid":"正则表达式无效:{{detail}}","unchangedMinutesInvalid":"不变持续分钟数必须大于 0","conditionPromptRequired":"条件描述不能为空","intervalMin":"采样间隔不能低于 {{min}} 秒"},"state":{"title":"规则状态","back":"返回","lastSampledAt":"最近采样","lastValue":"最近值","lastValueChangedAt":"值最近变化","lastTriggeredAt":"最近触发","consecutiveErrors":"连续错误次数","lastError":"最近错误","samples":"近期样本","samplesEmpty":"暂无样本","hit":"命中","none":"—"},"toast":{"created":"监控规则已创建","updated":"监控规则已更新","deleted":"监控规则已删除","triggeredTitle":"监控触发","openTerminal":"打开终端","modelUnavailableTitle":"监控模型不可用","modelUnavailableHint":"规则将以降级方式继续运行。","ruleErrorTitle":"监控规则已自动停用"},"notifPermission":{"title":"启用浏览器通知?","desc":"即使页面在后台,监控触发时也能收到通知。","enable":"启用","dismiss":"暂不"}},"validation":{"deviceNameRequired":"设备名称为必填项","hostRequired":"SSH 设备需要填写主机地址","portRequired":"SSH 设备需要填写有效端口","usernameRequired":"SSH 设备需要填写用户名","sshConfigRequired":"SSH 设备需要填写 ssh config 路径"},"files":{"title":"文件","refresh":"刷新文件列表","noRoots":"没有可访问的目录。请在「设置 → 文件」中添加。","emptyDir":"空目录","truncated":"条目过多,列表已截断","download":"下载","error":{"invalid":"无效请求","outside_roots":"路径超出允许的目录范围","not_found":"已不存在","not_a_directory":"不是目录","is_directory":"这是一个目录","too_large":"文件过大,无法预览","binary":"二进制文件无法预览","permission_denied":"无访问权限","device_not_found":"设备不存在","root_not_found":"目录项不存在","root_disabled":"该目录已禁用","connection_failed":"连接设备失败","auth_unsupported":"该设备的认证方式不支持文件访问(请用密钥或 ssh-agent)","rsync_missing_local":"服务器上未安装 rsync","rsync_missing_remote":"远程设备上未安装 rsync","timeout":"已超时","unknown":"加载失败"},"retry":"重试(收起后再展开)","menu":{"copyAbsolute":"复制绝对位置","copyRelative":"复制相对位置","sendToAgent":"发送到 Agent","expand":"展开","collapse":"收起","upload":"上传文件到这个文件夹","open":"打开"},"copied":"已复制到剪贴板","copyFailed":"复制失败","sendToAgent":{"prompt":"请处理这个路径:`{{path}}`"},"upload":{"uploading":"正在上传 {{name}}…","success":"已上传 {{name}}","fail":"上传 {{name}} 失败"},"transfer":{"legUserToTmex":"用户 → tmex","legTmexToServer":"tmex → 服务器","legServerToTmex":"服务器 → tmex","legTmexToUser":"tmex → 用户","cancel":"取消","canceled":"已取消 {{name}}","downloaded":"已下载 {{name}}","downloadFailed":"下载 {{name}} 失败","dragDownloadStarted":"已开始下载 {{name}}(由浏览器接管)","tooLarge":"{{name}} 超过大小上限({{max}})"},"agentLaunch":{"connectFailed":"连接设备失败","windowFailed":"创建窗口失败"},"install":{"button":"安装 rsync","scopeLocal":"服务器","scopeRemote":"远程","prompt":"设备 {{device}}({{scope}})上未检测到 rsync。请根据系统选择合适的命令安装 rsync(例如 `brew install rsync`、`sudo apt-get install -y rsync` 或 `sudo yum install -y rsync`),安装完成后回复我。"}},"file":{"invalidRef":"无效的文件引用","notFound":"文件已不存在","accessDenied":"无访问权限","loadFailed":"加载文件失败","isDirectory":"这是一个目录","notPreviewable":"该文件类型不支持预览","tooLarge":"文件过大,无法预览","binary":"二进制文件无法预览","download":"下载","openRaw":"打开原始文件"}}'),t={translation:e};export{t as default,e as translation};
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<link rel="apple-touch-icon" href="/tmex.png" />
|
|
20
20
|
<meta name="description" content="tmex - Web 接入多设备 tmux 的终端控制平台" />
|
|
21
21
|
<title>tmex</title>
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-B3ddLSja.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CuFTSN9i.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="root"></div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{Y as Fe,u as je,j as o,$ as tt,a0 as nt,a1 as rt,a2 as st,a3 as ot,a4 as it,r,d as H,a5 as J,a6 as Xe,a7 as Ke,a8 as ct,a9 as at,aa as lt,ab as Oe,o as xe,ac as ut,ad as Be,ae as dt,b as Ge,af as We,ag as ft,c as $e,ah as Ve,ai as Ee,aj as mt,ak as ht,al as ze,y as wt,am as pt,B as me,T as xt,an as vt,ao as gt,ap as St,aq as bt,A as Et,f as Rt,g as Tt,i as yt,k as jt,l as It,m as Ct,n as Nt}from"./index-CEPc0i5O.js";import{T as kt,C as Mt,c as Pt,F as At,a as Qe,R as Lt,A as _t,f as zt,t as Dt,S as Ft}from"./terminal-settings-panel-DAWL48fe.js";import{w as Bt}from"./selection-clipboard-Dq6Zemfd.js";import{C as Wt}from"./copy-BfLwocwm.js";import{S as qe,K as $t}from"./send-CKtMOmLP.js";/**
|
|
2
|
-
* @license lucide-react v0.564.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Ht=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ot=Fe("search-x",Ht);/**
|
|
7
|
-
* @license lucide-react v0.564.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const qt=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ut=Fe("settings-2",qt);/**
|
|
12
|
-
* @license lucide-react v0.564.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Yt=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Xt=Fe("smartphone",Yt);function Kt({open:n,onOpenChange:e}){const{t:i}=je();return o.jsx(tt,{open:n,onOpenChange:e,children:o.jsxs(nt,{side:"bottom",className:"max-h-[88dvh] overflow-y-auto pb-[var(--tmex-safe-area-bottom)] sm:mx-auto sm:max-w-md sm:rounded-t-2xl sm:border sm:border-b-0","data-testid":"keyboard-behavior-sheet",children:[o.jsxs(rt,{children:[o.jsx(st,{children:i("settings.terminal.title")}),o.jsx(ot,{children:i("settings.terminal.savedInBrowser")})]}),o.jsx("div",{className:"px-4 pb-4",children:o.jsx(kt,{})})]})})}function Gt({visible:n,canPaste:e,onCopy:i,onPaste:a,onDismiss:w}){const{t:y}=je();if(!n)return null;const k=v=>{v.preventDefault()};return o.jsxs("div",{className:"absolute top-2 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1 rounded-lg border bg-background/95 p-1 shadow-md backdrop-blur","data-testid":"terminal-selection-toolbar",children:[o.jsxs("button",{type:"button",className:"flex h-9 items-center gap-1.5 rounded-md px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground",onMouseDown:k,onClick:i,"data-testid":"terminal-selection-copy",children:[o.jsx(Wt,{className:"h-4 w-4"}),y("terminal.copy")]}),e&&o.jsxs("button",{type:"button",className:"flex h-9 items-center gap-1.5 rounded-md px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground",onMouseDown:k,onClick:a,"data-testid":"terminal-selection-paste",children:[o.jsx(Mt,{className:"h-4 w-4"}),y("terminal.paste")]}),o.jsx("button",{type:"button",className:"flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground",onMouseDown:k,onClick:w,"aria-label":y("terminal.clearSelection"),"data-testid":"terminal-selection-dismiss",children:o.jsx(it,{className:"h-4 w-4"})})]})}function Je(n){if(!n)return n;const e=n.replace(/\r\n/g,`
|
|
17
|
-
`);return(e.endsWith(`
|
|
18
|
-
`)?e.slice(0,-1):e).replace(/\n/g,`\r
|
|
19
|
-
`)}const Vt="\x1B[?1049h\x1B[H\x1B[2J";function Qt(n){return Vt+Je(n)}function Ue(n,e){let i=e,a=0;for(const v of n)v===10&&!i&&(a+=1),i=v===13;const w=i;if(a===0)return{normalized:n,endedWithCR:w};const y=new Uint8Array(n.length+a);let k=0;i=e;for(const v of n)v===10&&!i&&(y[k]=13,k+=1),y[k]=v,k+=1,i=v===13;return{normalized:y,endedWithCR:w}}const Jt=1.3,Zt=36,en=500,tn=12;function nn(n,e){const i=r.useRef(!1);return r.useEffect(()=>{const a=n.current;if(!a||!(window.innerWidth<768||navigator.maxTouchPoints>0||"ontouchstart"in window))return;i.current=!0;let y=0,k=null,v=!1,R=0,X=0,s=0,C=null,L=!1;const K=()=>{C!==null&&(clearTimeout(C),C=null)},W=m=>m?!!(m.closest(".scrollbar")||m.closest(".slider")||m.closest(".xterm-scroll-area")):!1,b=(m,h,g)=>{const N=g instanceof Element?g:null;if(W(N))return!0;const O=document.elementFromPoint(m,h);if(W(O))return!0;const x=a.querySelector(".xterm");if(!(x instanceof HTMLElement))return!1;const S=x.getBoundingClientRect(),P=m>=S.left&&m<=S.right,T=h>=S.top&&h<=S.bottom;return!P||!T?!1:m>=S.right-Zt},Z=()=>[a.querySelector(".xterm-viewport"),a.querySelector(".xterm-scrollable-element")].filter(h=>h instanceof HTMLElement),ee=m=>{if(k===null)return null;for(let h=0;h<m.length;h+=1){const g=m.item(h);if(g&&g.identifier===k)return g}return null},te=m=>{if(K(),m.touches.length!==1)return;const h=m.touches.item(0);h&&(k=h.identifier,y=h.clientY,R=0,v=b(h.clientX,h.clientY,m.target),X=h.clientX,s=h.clientY,L=!1,v||(C=setTimeout(()=>{var N;C=null;const g=(e==null?void 0:e())??null;(N=g==null?void 0:g.startTouchSelection)!=null&&N.call(g,X,s,"word")&&(L=!0)},en)))},q=m=>{var P,T,j,D,V,$,le,Q,oe;const h=ee(m.touches)??m.touches.item(0);if(!h)return;if(L){const _=(e==null?void 0:e())??null;(P=_==null?void 0:_.updateTouchSelection)==null||P.call(_,h.clientX,h.clientY),m.cancelable&&m.preventDefault();return}if(C!==null&&Math.hypot(h.clientX-X,h.clientY-s)>tn&&K(),v||(v=b(h.clientX,h.clientY,m.target),v&&(R=0)),v)return;const g=h.clientY,N=y-g;if(y=g,N===0)return;let O=!1,x=!1;const S=(e==null?void 0:e())??null;if(S){const _=S==null?void 0:S._core,p=((V=(D=(j=(T=_==null?void 0:_._renderService)==null?void 0:T.dimensions)==null?void 0:j.css)==null?void 0:D.cell)==null?void 0:V.height)??18;R+=N*Jt;const F=R>0?Math.floor(R/p):Math.ceil(R/p);if(typeof S.handleViewportGesture=="function")F!==0&&(O=S.handleViewportGesture({source:"touch",deltaY:F*p,clientX:h.clientX,clientY:h.clientY}),R-=F*p);else if(F!==0){const B=((le=($=S.buffer)==null?void 0:$.active)==null?void 0:le.viewportY)??0;S.scrollLines(F);const ne=((oe=(Q=S.buffer)==null?void 0:Q.active)==null?void 0:oe.viewportY)??0;O=B!==ne,x=F<0&&B<=0&&ne<=0,R-=F*p}}else{const _=Z();if(_.length===0)return;for(const p of _){const F=p.scrollTop;p.scrollTop+=N;const B=p.scrollTop;Math.abs(B-F)>0&&(O=!0),N<0&&B<=0&&(x=!0)}if(!O){const p=a.querySelector(".xterm");if(p instanceof HTMLElement){const F=new WheelEvent("wheel",{bubbles:!0,cancelable:!0,deltaMode:WheelEvent.DOM_DELTA_PIXEL,deltaY:N}),B=p.dispatchEvent(F);O=F.defaultPrevented||!B}}}m.cancelable&&(O||x)&&m.preventDefault()},c=m=>{var g;if(K(),!(k===null||!ee(m.changedTouches))&&(k=null,R=0,v=!1,L)){L=!1;const N=(e==null?void 0:e())??null;(g=N==null?void 0:N.endTouchSelection)==null||g.call(N)}},A=m=>{L&&m.preventDefault()};return a.addEventListener("touchstart",te,{passive:!0}),a.addEventListener("touchmove",q,{passive:!1}),a.addEventListener("touchend",c,{passive:!0}),a.addEventListener("touchcancel",c,{passive:!0}),a.addEventListener("contextmenu",A),()=>{i.current=!1,K(),a.removeEventListener("touchstart",te),a.removeEventListener("touchmove",q),a.removeEventListener("touchend",c),a.removeEventListener("touchcancel",c),a.removeEventListener("contextmenu",A)}},[n,e]),i}function rn({now:n,remoteSize:e,pendingLocalSize:i,ttlMs:a=2e3}){return!i||n-i.at>a?!0:i.cols===e.cols&&i.rows===e.rows}function sn({currentSize:n,containerSize:e,force:i=!1}){return i?!0:n.cols!==e.cols||n.rows!==e.rows}function on({deviceId:n,paneId:e,deviceConnected:i,isSelectionInvalid:a,onResize:w,onSync:y,getContainerRect:k}){const v=r.useRef(null),R=r.useRef(null),X=r.useRef(null),s=r.useRef(null),C=r.useRef(0),L=r.useRef([]),K=r.useRef(null),W=r.useRef(null),b=r.useRef(k),Z=r.useRef(!1),ee=r.useRef(w),te=r.useRef(y);r.useEffect(()=>{ee.current=w},[w]),r.useEffect(()=>{te.current=y},[y]),r.useEffect(()=>{b.current=k},[k]);const q=r.useCallback(()=>{var $,le,Q,oe,_,p,F,B,ne,re;const x=W.current,S=K.current;if(!x||!S||!x.element)return null;let P;try{const U=S.proposeDimensions();if(!U)throw new Error("fitAddon.proposeDimensions() returned null");P=Math.max(2,U.cols)}catch{const U=x._core,ve=((oe=(Q=(le=($=U==null?void 0:U._renderService)==null?void 0:$.dimensions)==null?void 0:le.css)==null?void 0:Q.cell)==null?void 0:oe.width)??9,l=(_=b.current)==null?void 0:_.call(b);if(!l||l.width===0)return null;P=Math.max(2,Math.floor(l.width/ve))}const T=(p=b.current)==null?void 0:p.call(b);if(!T||T.height===0)return null;const j=x._core,D=((re=(ne=(B=(F=j==null?void 0:j._renderService)==null?void 0:F.dimensions)==null?void 0:B.css)==null?void 0:ne.cell)==null?void 0:re.height)??17,V=Math.max(2,Math.floor(T.height/D));return{cols:P,rows:V}},[]),c=r.useCallback((x,S)=>{const P=W.current;P&&(P.cols===x&&P.rows===S||P.resize(x,S))},[]),A=r.useCallback((x,S=!1)=>{if(!n||!e||!i||a&&x!=="sync"||!S&&Date.now()<C.current||!W.current)return!1;const T=q();if(!T)return!1;const{cols:j,rows:D}=T,V=X.current;return!S&&V&&V.cols===j&&V.rows===D?(c(j,D),!0):(c(j,D),x==="sync"?te.current(j,D):ee.current(j,D),X.current={cols:j,rows:D},s.current={cols:j,rows:D,at:Date.now()},!0)},[c,i,n,a,q,e]),m=r.useCallback((x="resize",S={})=>{const{immediate:P=!1,force:T=!1}=S;R.current!==null&&(window.clearTimeout(R.current),R.current=null),v.current!==null&&(cancelAnimationFrame(v.current),v.current=null);const j=()=>{v.current=requestAnimationFrame(()=>{v.current=null,A(x,T)})};if(P){j();return}R.current=window.setTimeout(()=>{R.current=null,j()},150)},[A]),h=r.useCallback(()=>{for(const x of L.current)window.clearTimeout(x);L.current=[]},[]),g=r.useCallback(()=>{var S;h(),m("sync",{immediate:!0,force:!0});const x=window.setTimeout(()=>{m("sync",{immediate:!0,force:!0})},60);L.current.push(x),typeof document<"u"&&"fonts"in document&&((S=document.fonts)!=null&&S.ready)&&document.fonts.ready.then(()=>{m("sync",{immediate:!0,force:!0})}).catch(()=>{})},[h,m]);r.useEffect(()=>{let x=null;const S=()=>{x!==null&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{x=null,m("resize")})};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S),x!==null&&cancelAnimationFrame(x)}},[m]),r.useEffect(()=>{const x=()=>{var $;const j=W.current,D=q();if(!j||!D)return;if(!sn({currentSize:{cols:Math.max(2,j.cols),rows:Math.max(2,j.rows)},containerSize:D})){($=j.refresh)==null||$.call(j);return}m("sync",{force:!0})},S=()=>{if(document.visibilityState!=="visible"){Z.current=!0;return}Z.current&&(Z.current=!1,x())},P=()=>{Z.current=!0},T=()=>{Z.current&&(Z.current=!1,x())};return document.addEventListener("visibilitychange",S),window.addEventListener("blur",P),window.addEventListener("focus",T),()=>{document.removeEventListener("visibilitychange",S),window.removeEventListener("blur",P),window.removeEventListener("focus",T)}},[q,m]),r.useEffect(()=>()=>{h(),R.current!==null&&window.clearTimeout(R.current),v.current!==null&&cancelAnimationFrame(v.current)},[h]);const N=r.useCallback(x=>{K.current=x},[]),O=r.useCallback(x=>{W.current=x},[]);return{scheduleResize:m,runPostSelectResize:g,clearPostSelectResizeTimers:h,setFitAddon:N,setTerminal:O,lastReportedSize:X,pendingLocalSize:s,suppressLocalResizeUntil:C}}const cn=1e4,De="tmex:terminal-mode-cache";function an(n,e){try{const i=sessionStorage.getItem(De);return i?JSON.parse(i)[`${n}:${e}`]??null:null}catch{return null}}function ln(n,e,i){try{const a=sessionStorage.getItem(De),w=a?JSON.parse(a):{},y=`${n}:${e}`;i?w[y]=i:delete w[y],sessionStorage.setItem(De,JSON.stringify(w))}catch{}}function un(){return{mouseX10:!1,mouseNormal:!0,mouseButton:!1,mouseAny:!1,mouseUtf8:!1,mouseSgr:!0,mouseSgrPixels:!1,mouseUrxvt:!1,altScroll:!0,altScreen1047:!1,altScreen1049:!1}}function dn(n,e){if(!e)return n?{...n,mouseX10:!1,mouseNormal:!1,mouseButton:!1,mouseAny:!1,mouseUtf8:!1,mouseSgrPixels:!1,mouseUrxvt:!1,altScreen1047:!1,altScreen1049:!1}:null;const i=un();if(!n)return i;const a=n.mouseNormal||n.mouseButton||n.mouseAny;return{...n,mouseX10:!1,mouseUtf8:!1,mouseSgr:!0,mouseSgrPixels:!1,mouseUrxvt:!1,altScroll:!0,altScreen1047:!1,altScreen1049:!1,mouseNormal:a?n.mouseNormal:i.mouseNormal}}function fn(n){var i;const e=globalThis;e.__tmexE2eXterm=n,e.__tmexE2eTerminal=n,e.__tmexE2eTerminalEngine=Qe,e.__tmexE2eTerminalRenderer=((i=n.getRendererKind)==null?void 0:i.call(n))??null}function mn(n){if(!n)return;const e=globalThis;e.__tmexE2eTerminal!==n&&e.__tmexE2eXterm!==n||(e.__tmexE2eXterm=null,e.__tmexE2eTerminal=null,e.__tmexE2eTerminalEngine=null,e.__tmexE2eTerminalRenderer=null,e.__tmexE2eTerminalSelectionText=null)}const Ze=r.forwardRef(({deviceId:n,paneId:e,theme:i,inputMode:a,deviceConnected:w,isSelectionInvalid:y,onResize:k,onSync:v,children:R},X)=>{const[s,C]=r.useState(null),[L,K]=r.useState(!1),W=H(l=>l.sendInput),b=J(l=>l.terminalFontId),Z=J(l=>l.terminalFontSize),ee=J(l=>l.terminalLineHeight),{t:te}=je(),q=r.useMemo(()=>{switch(i){case"light":return Ke;default:return Xe}},[i]),c=r.useRef(null),A=r.useRef(null),m=r.useRef(null),h=r.useRef(n),g=r.useRef(e),N=r.useRef(n),O=r.useRef(e),x=r.useRef(w&&!y),S=r.useRef(a),P=r.useRef(q),T=r.useRef(!1),j=r.useRef(!1),D=r.useRef(null),V=r.useRef(!1),$=r.useCallback((l,f,I)=>{!(l!=null&&l.exportModeSnapshot)||!f||!I||ln(f,I,l.exportModeSnapshot())},[]),le=r.useCallback(()=>s,[s]);nn(c,le),r.useEffect(()=>{h.current=n,g.current=e,j.current=!1},[n,e]),r.useEffect(()=>{x.current=w&&!y},[w,y]),r.useEffect(()=>{S.current=a},[a]),r.useEffect(()=>{P.current=q},[q]);const Q=r.useCallback(l=>{if(!l||a!=="direct"||!x.current)return;const f=h.current,I=g.current;!f||!I||W(f,I,l,!1)},[a,W]),{pendingLocalSize:oe,scheduleResize:_,runPostSelectResize:p,setFitAddon:F,setTerminal:B}=on({deviceId:n,paneId:e,deviceConnected:w,isSelectionInvalid:y,onResize:k,onSync:v,getContainerRect:()=>{const l=c.current;if(!l)return null;const f=l.getBoundingClientRect();return{width:f.width,height:f.height}}});r.useEffect(()=>{let l=!1,f=null;return(async()=>{if(await ct(b,Z),l)return;const I=await Pt({fontFamily:at(b),fontSize:Z,lineHeight:ee,scrollback:cn,theme:P.current,disableStdin:S.current==="editor"});if(l){I.dispose();return}f=I,A.current&&I.open(A.current),fn(I),C(I)})(),()=>{l=!0,C(null),mn(f),f==null||f.dispose()}},[b,Z,ee]),r.useEffect(()=>{!s||!("setTheme"in s)||s.setTheme(q)},[s,q]),r.useEffect(()=>{!s||!("setDisableStdin"in s)||s.setDisableStdin(a==="editor")},[s,a]),r.useEffect(()=>{if(!(s!=null&&s.getCursorViewportRect))return;const l=()=>{var f;return((f=s.getCursorViewportRect)==null?void 0:f.call(s))??null};return ut(l),()=>lt(l)},[s]),r.useEffect(()=>{!s||a!=="direct"||window.innerWidth<768||"ontouchstart"in window||s.focus()},[s,a]);const ne=r.useMemo(()=>s?{onResetTerminal:l=>{h.current===l&&($(s,N.current,O.current),V.current=!0,s.reset(),T.current=!1,p())},onApplyHistory:(l,f,I)=>{var ie;if(h.current!==l)return;const z=dn(an(h.current,g.current),I);z&&((ie=s.restoreModeSnapshot)==null||ie.call(s,z));const M=I?Qt(f):Je(f);j.current=!0,s.write(M),V.current=!1,N.current=h.current,O.current=g.current,$(s,h.current,g.current)},onFlushBuffer:(l,f)=>{if(h.current===l){for(const I of f){const z=Ue(I,T.current);T.current=z.endedWithCR,s.write(z.normalized)}j.current&&(s.buffer.active.baseY<=1&&s.scrollToTop(),j.current=!1),N.current=h.current,O.current=g.current,$(s,h.current,g.current)}},onOutput:(l,f,I)=>{if(h.current!==l||g.current!==f)return;const z=Ue(I,T.current);T.current=z.endedWithCR,s.write(z.normalized),j.current&&(s.buffer.active.baseY<=1&&s.scrollToTop(),j.current=!1),N.current=h.current,O.current=g.current,$(s,h.current,g.current)}}:{},[s,$,p]);r.useEffect(()=>{s?D.current!==s&&(T.current=!1,N.current=h.current,O.current=g.current,D.current=s):D.current=null},[s]),r.useEffect(()=>{if(!(!s||!n||!e))return()=>{if(V.current){V.current=!1;return}$(s,N.current,O.current)}},[n,s,e,$]),r.useEffect(()=>{Oe(ne)},[ne]),r.useEffect(()=>()=>{Oe({})},[]),r.useEffect(()=>{if(!s){m.current=null,F(null),B(null);return}const l=new At;return s.loadAddon(l),m.current=l,F(l),B(s),p(),()=>{try{l.dispose()}finally{m.current=null,F(null),B(null)}}},[s,p,F,B]),r.useEffect(()=>{const l=c.current;if(!l)return;let f=null;const I=new ResizeObserver(()=>{f!==null&&cancelAnimationFrame(f),f=requestAnimationFrame(()=>{f=null,_("resize")})});return I.observe(l),()=>{I.disconnect(),f!==null&&cancelAnimationFrame(f)}},[_]),r.useEffect(()=>{if(!s||!n||!e)return;const l=s.onData(f=>{!w||y||Q(f)});return s.attachCustomKeyEventHandler(f=>!w||y||f.type!=="keydown"||a!=="direct"?!0:f.shiftKey&&f.key==="Enter"?(f.preventDefault(),Q("\x1B[13;2u"),!1):!0),()=>{l.dispose(),s.attachCustomKeyEventHandler(()=>!0)}},[s,w,y,a,Q,n,e]),r.useEffect(()=>{if(!(s!=null&&s.onLinkActivated))return;const l=s.onLinkActivated(f=>{window.open(f,"_blank","noopener,noreferrer")});return()=>l.dispose()},[s]),r.useEffect(()=>{if(!(s!=null&&s.onSelectionChange)){K(!1);return}const l=s.onSelectionChange(f=>{K(!!f)});return()=>{l.dispose(),K(!1)}},[s]);const re=r.useCallback(()=>{var f;if(!s)return;const l=((f=s.getSelection)==null?void 0:f.call(s))??"";l&&Bt(l).then(()=>{xe.success(te("terminal.copied"))}).catch(()=>{xe.error(te("terminal.copyFailed"))}).finally(()=>{var I;(I=s.clearSelection)==null||I.call(s),s.focus()})},[s,te]),U=r.useCallback(()=>{var f;if(!s)return;((f=navigator.clipboard)!=null&&f.readText?navigator.clipboard.readText():Promise.reject(new Error("clipboard unavailable"))).then(I=>{var z;I&&s.paste(I),(z=s.clearSelection)==null||z.call(s),s.focus()}).catch(()=>{xe.error(te("terminal.pasteFailed"))})},[s,te]),ve=r.useCallback(()=>{var l;(l=s==null?void 0:s.clearSelection)==null||l.call(s),s==null||s.focus()},[s]);return r.useImperativeHandle(X,()=>({write:l=>s==null?void 0:s.write(l),reset:()=>{s==null||s.reset(),T.current=!1},scrollToBottom:()=>s==null?void 0:s.scrollToBottom(),resize:(l,f)=>s==null?void 0:s.resize(l,f),getTerminal:()=>s??null,getSize:()=>s?{cols:Math.max(2,s.cols),rows:Math.max(2,s.rows)}:null,runPostSelectResize:()=>p(),scheduleResize:(l,f)=>_(l,f),calculateSizeFromContainer:()=>{var Ie,ce,ge,ue,ae,G,Se,de,be,Re,Te,Ce,Ne,ke,Me,Pe;const l=c.current,f=s,I=m.current;if(!l||!f)return null;const z=l.getBoundingClientRect();if(z.width===0||z.height===0)return null;const M=f._core;let ie;if(I)try{const fe=I.proposeDimensions();if(fe)ie=Math.max(2,fe.cols);else{const Ae=((ue=(ge=(ce=(Ie=M==null?void 0:M._renderService)==null?void 0:Ie.dimensions)==null?void 0:ce.css)==null?void 0:ge.cell)==null?void 0:ue.width)??9;ie=Math.max(2,Math.floor(z.width/Ae))}}catch{const fe=((de=(Se=(G=(ae=M==null?void 0:M._renderService)==null?void 0:ae.dimensions)==null?void 0:G.css)==null?void 0:Se.cell)==null?void 0:de.width)??9;ie=Math.max(2,Math.floor(z.width/fe))}else{const fe=((Ce=(Te=(Re=(be=M==null?void 0:M._renderService)==null?void 0:be.dimensions)==null?void 0:Re.css)==null?void 0:Te.cell)==null?void 0:Ce.width)??9;ie=Math.max(2,Math.floor(z.width/fe))}const we=((Pe=(Me=(ke=(Ne=M==null?void 0:M._renderService)==null?void 0:Ne.dimensions)==null?void 0:ke.css)==null?void 0:Me.cell)==null?void 0:Pe.height)??17,Le=Math.max(2,Math.floor(z.height/we));return{cols:ie,rows:Le}},getPendingLocalSize:()=>oe.current}),[s,oe,p,_]),o.jsxs("div",{className:"flex h-full w-full flex-col",style:{backgroundColor:q.background},"data-terminal-engine":Qe,children:[o.jsxs("div",{ref:c,className:"relative min-h-0 w-full flex-1",children:[o.jsx("div",{ref:A,className:"absolute inset-0"}),o.jsx(Gt,{visible:L,canPaste:a==="direct"&&w&&!y,onCopy:re,onPaste:U,onDismiss:ve})]}),R]})});Ze.displayName="Terminal";const hn=1200,wn=2e3;function he(n,e){return!n||!e?!1:n.windowId===e.windowId&&n.paneId===e.paneId}function et(n,e){const i=n.filter(a=>e-a.at<hn);return i.length===0?null:i.reduce((a,w)=>w.at>a.at?w:a)}function ye(n,e=Date.now()){return!n||e-n.at>wn?null:n}function pn(n){const e=n.now??Date.now(),i=et(n.recentSelectRequests,e);if(i&&!he(i,n.activePaneFromEvent)||he(n.currentRoute,n.activePaneFromEvent)||he(n.lastHandledActive,n.activePaneFromEvent))return!0;const a=ye(n.pendingUserSelection,e);return!!(a&&!he(a,n.activePaneFromEvent))}function xn(n){const e=n.now??Date.now(),i=et(n.recentSelectRequests,e),a=ye(n.pendingUserSelection,e);return!!(a&&!he(a,n.snapshotActive)||i&&!he(i,n.snapshotActive))}function vn(n){const e=n.now??Date.now(),i=ye(n.pendingUserSelection,e);return!(i&&he(i,n.routeTarget)||n.snapshotActive&&he(n.snapshotActive,n.routeTarget))}const Ye=r.memo(function({onActivate:e,disabled:i}){const{data:a}=$e({queryKey:Dt,queryFn:zt,staleTime:6e4}),w=(a==null?void 0:a.items)??[];return w.length===0?null:o.jsx("div",{className:"terminal-shortcuts-strip","data-testid":"terminal-shortcuts-strip",children:o.jsx(Ft,{items:w,useIcons:(a==null?void 0:a.useIcons)??!1,onActivate:e,disabled:i,preventFocusSteal:!0,rowTestId:"terminal-shortcuts-row",idPrefix:"terminal-shortcut"})})});function Tn(){var He;const{t:n}=je(),{deviceId:e,windowId:i,paneId:a}=Be(),w=dt(),y=r.useRef(null),k=r.useRef(null),v=r.useRef(null),R=r.useRef(null),X=r.useRef(!1),s=r.useRef(!1),C=r.useRef(null),L=H(t=>t.selectPane),K=H(t=>e?t.snapshots[e]:void 0),W=H(t=>{var u;return e?(u=t.deviceErrors)==null?void 0:u[e]:void 0}),b=H(t=>{var u;return e?((u=t.deviceConnected)==null?void 0:u[e])??!1:!1}),ee=!!H(t=>{var u;return e?(u=t.deviceReconnecting)==null?void 0:u[e]:void 0}),te=H(t=>e?t.connectedDevices.has(e):!1),q=Ge(t=>{var u;return((u=t.settings)==null?void 0:u.siteName)??"tmex"}),c=r.useMemo(()=>We(a),[a]),A=r.useMemo(()=>e&&c?`${e}:${c}`:null,[e,c]),[m,h]=r.useState(!1),[g,N]=r.useState(""),O=r.useRef(!1),x=!b||!c,[S,P]=r.useState(!1),T=J(t=>t.inputMode),j=J(t=>t.theme),D=J(t=>t.editorSendWithEnter),V=J(t=>t.setEditorSendWithEnter),$=J(t=>t.addEditorHistory),le=J(t=>t.setEditorDraft),Q=J(t=>t.removeEditorDraft),oe=J(t=>A?t.editorDrafts[A]??"":""),_=r.useMemo(()=>ft(),[]),p=(He=K==null?void 0:K.session)==null?void 0:He.windows,F=j==="light"?Ke:Xe,{data:B}=$e({queryKey:["devices"],queryFn:async()=>{const t=await fetch("/api/devices");if(!t.ok)throw new Error("Failed to fetch devices");return t.json()},throwOnError:!1}),ne=r.useMemo(()=>{if(e)return B==null?void 0:B.devices.find(t=>t.id===e)},[e,B==null?void 0:B.devices]),re=r.useMemo(()=>{if(!(!i||!p))return p.find(t=>t.id===i)},[i,p]),U=r.useMemo(()=>{if(!(!c||!re))return re.panes.find(t=>t.id===c)},[c,re]),ve=!!p,I=ve&&!!i&&!re?n("terminal.windowClosed"):ve&&!!i&&!!c&&!!re&&!U?n("terminal.paneClosed"):null,z=!!I,M=!!(b&&c&&!z),ie=r.useMemo(()=>{if(!re||!U)return null;const t=(ne==null?void 0:ne.name)??e;return Ve({paneIdx:U.index,windowIdx:re.index,paneTitle:U.title,windowName:re.name,windowCustomName:re.customName,deviceName:t})},[ne==null?void 0:ne.name,e,U,re]),we=r.useMemo(()=>{if(!p||p.length===0)return null;const t=p.find(d=>d.active),u=t==null?void 0:t.panes.find(d=>d.active);return!t||!u?null:{windowId:t.id,paneId:u.id}},[p]),Le=r.useCallback((t,u)=>{!e||!c||H.getState().resizePane(e,c,t,u)},[e,c]),Ie=r.useCallback((t,u)=>{!e||!c||H.getState().syncPaneSize(e,c,t,u)},[e,c]),ce=r.useCallback((t,u)=>{const d=R.current,E=(d==null?void 0:d.calculateSizeFromContainer())??(d==null?void 0:d.getSize())??void 0;if(E)return E;if(!t||!u||!p)return;const Y=p.find(pe=>pe.id===t),se=Y==null?void 0:Y.panes.find(pe=>pe.id===u);if(!(!se||se.width<=1||se.height<=1))return{cols:se.width,rows:se.height}},[p]);r.useEffect(()=>{const t=()=>{h(window.innerWidth<768||"ontouchstart"in window)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r.useEffect(()=>{if(!m||!_||s.current)return;s.current=!0;const t=()=>{window.scrollTo(0,1)},u=window.requestAnimationFrame(t),d=window.setTimeout(t,120),E=window.setTimeout(t,420);return()=>{window.cancelAnimationFrame(u),window.clearTimeout(d),window.clearTimeout(E)}},[_,m]),r.useEffect(()=>{e&&(X.current=!1,Se.current=null,de.current=null,C.current=null,ue.current=[])},[e]),r.useEffect(()=>{b||(X.current=!1)},[b]),r.useEffect(()=>{if(!e||!b||!i||!p)return;if(p.length===0){w("/devices",{replace:!0});return}const t=p.find(d=>d.id===i);if(!t)return;if(!c){const d=t.panes.find(E=>E.active)??t.panes[0];d&&w(`/devices/${e}/windows/${i}/panes/${Ee(d.id)}`,{replace:!0});return}if(!t.panes.find(d=>d.id===c)){const d=t.panes.find(E=>E.active)??t.panes[0];d&&w(`/devices/${e}/windows/${i}/panes/${Ee(d.id)}`,{replace:!0});return}},[e,b,p,i,c,w]),r.useEffect(()=>{if(!e||!b||!p||p.length===0||i&&c||X.current)return;const t=p.find(d=>d.active)??p[0],u=t.panes.find(d=>d.active)??t.panes[0];u&&(X.current=!0,w(`/devices/${e}/windows/${t.id}/panes/${Ee(u.id)}`,{replace:!0}))},[b,e,w,c,i,p]);const ge=r.useRef(null);r.useEffect(()=>{ge.current=null},[e,c]),r.useEffect(()=>{if(!e||!i||!c||x||!b)return;const t=`${e}:${i}:${c}`;if(ge.current===t)return;ge.current=t;const u=ce(i,c);ae(i,c),L(e,i,c,u)},[b,e,ce,x,c,L,i]),r.useEffect(()=>{if(!e||!b||!i||!c)return;const t={windowId:i,paneId:c};vn({routeTarget:t,snapshotActive:we,pendingUserSelection:C.current})&&(C.current={windowId:t.windowId,paneId:t.paneId,at:Date.now()})},[b,e,c,we,i]);const ue=r.useRef([]),ae=r.useCallback((t,u)=>{const d=Date.now(),E=[...ue.current.filter(Y=>d-Y.at<2e3),{windowId:t,paneId:u,at:d}];ue.current=E.slice(-8)},[]),G=H(t=>e?t.activePaneFromEvent[e]:void 0),Se=r.useRef(null);r.useEffect(()=>{if(!e||!b||!i||!c||!G)return;const t=Date.now(),u=ye(C.current,t);if(C.current=u,pn({now:t,pendingUserSelection:u,activePaneFromEvent:G,currentRoute:{windowId:i,paneId:c},recentSelectRequests:ue.current,lastHandledActive:Se.current}))return;Se.current={...G},u&&u.windowId===G.windowId&&u.paneId===G.paneId&&(C.current=null);const d=ce(G.windowId,G.paneId);ae(G.windowId,G.paneId),L(e,G.windowId,G.paneId,d),w(`/devices/${e}/windows/${G.windowId}/panes/${Ee(G.paneId)}`,{replace:!0})},[e,b,i,c,G,ae,ce,L,w]);const de=r.useRef(null);r.useEffect(()=>{if(!e||!b||!p||p.length===0)return;const t=ue.current,u=p.find(_e=>_e.active);if(!u)return;const d=u.panes.find(_e=>_e.active);if(!d)return;const E={windowId:u.id,paneId:d.id},Y=Date.now(),se=ye(C.current,Y);if(C.current=se,xn({now:Y,pendingUserSelection:se,snapshotActive:E,recentSelectRequests:t})||de.current&&de.current.windowId===E.windowId&&de.current.paneId===E.paneId||(de.current={...E},se&&se.windowId===E.windowId&&se.paneId===E.paneId&&(C.current=null),i===E.windowId&&c===E.paneId))return;const pe=ce(E.windowId,E.paneId);ae(E.windowId,E.paneId),L(e,E.windowId,E.paneId,pe),w(`/devices/${e}/windows/${E.windowId}/panes/${Ee(E.paneId)}`,{replace:!0})},[e,b,p,i,c,ae,ce,L,w]);const be=H(t=>e?t.pendingCreateWindowAt[e]:void 0);r.useEffect(()=>{if(!e||!b||!be)return;const t=5e3,u=Date.now()-be;if(u>t){H.getState().clearPendingCreateWindow(e);return}if(!we){const Y=window.setTimeout(()=>{H.getState().clearPendingCreateWindow(e)},t-u);return()=>window.clearTimeout(Y)}const d=we;if(i===d.windowId&&c===d.paneId){const Y=window.setTimeout(()=>{H.getState().clearPendingCreateWindow(e)},t-u);return()=>window.clearTimeout(Y)}C.current={windowId:d.windowId,paneId:d.paneId,at:Date.now()};const E=ce(d.windowId,d.paneId);ae(d.windowId,d.paneId),L(e,d.windowId,d.paneId,E),w(`/devices/${e}/windows/${d.windowId}/panes/${Ee(d.paneId)}`,{replace:!0}),H.getState().clearPendingCreateWindow(e)},[e,b,be,we,i,c,ae,ce,L,w]),r.useEffect(()=>{if(!M||!U||x)return;const t=R.current,u=t==null?void 0:t.getTerminal();if(!u)return;const d=Math.max(2,Math.floor(U.width||0)),E=Math.max(2,Math.floor(U.height||0));if(!d||!E)return;const Y=Date.now(),se={cols:d,rows:E},pe=(t==null?void 0:t.getPendingLocalSize())??null;rn({now:Y,remoteSize:se,pendingLocalSize:pe})&&(u.cols===d&&u.rows===E||u.resize(d,E))},[M,x,U]),r.useEffect(()=>{const t=window.requestAnimationFrame(()=>{var d;(d=R.current)==null||d.scrollToBottom()}),u=window.setTimeout(()=>{var d;(d=R.current)==null||d.scrollToBottom()},120);return()=>{window.cancelAnimationFrame(t),window.clearTimeout(u)}},[T]),r.useEffect(()=>{W!=null&&W.message&&xe.error(W.message)},[W==null?void 0:W.message]),r.useEffect(()=>(document.title=mt(ie),()=>{document.title=q}),[q,ie]),r.useEffect(()=>{const t=()=>{var u;(u=R.current)==null||u.scrollToBottom()};return window.addEventListener("tmex:jump-to-latest",t),()=>{window.removeEventListener("tmex:jump-to-latest",t)}},[]),r.useEffect(()=>{const t=u=>{const{deviceId:d,windowId:E,paneId:Y}=u.detail;d===e&&(C.current={windowId:E,paneId:Y,at:Date.now()})};return window.addEventListener("tmex:user-initiated-selection",t),()=>{window.removeEventListener("tmex:user-initiated-selection",t)}},[e]),r.useEffect(()=>{N(oe)},[oe]);const Re=r.useCallback(t=>{if(!e||!c||!M)return;H.getState().sendInput(e,c,t,!1)},[M,e,c]),Te=r.useCallback(t=>{var u,d;if(t.type==="action"){if(t.action==="toggleKeyboard"){J.getState().setInputMode(T==="direct"?"editor":"direct");return}if(t.action==="scrollToBottom"){(u=R.current)==null||u.scrollToBottom();return}}if(t.type==="send"){t.payload&&Re(t.payload);return}if(!(!e||!c||!M))switch(t.action){case"paste":{((d=navigator.clipboard)!=null&&d.readText?navigator.clipboard.readText():Promise.reject(new Error("clipboard unavailable"))).then(Y=>{Y&&H.getState().paste(e,c,Y)}).catch(()=>xe.error(n("terminal.pasteFailed")));break}case"newAgentSession":ht.getState().startDraft(e,c,null),J.getState().setSidebarCollapsed(!1),J.getState().setSidebarTab("agent");break}},[M,e,Re,T,c,n]),Ce=r.useCallback(()=>{if(!M){xe.error(n("wsError.checkGateway"));return}if(!e||!c||!g.trim())return;P(!0),window.setTimeout(()=>P(!1),150);const t=D?`${g}\r`:g;H.getState().sendInput(e,c,t,!1),$(g),A&&Q(A),N("")},[$,M,e,A,D,g,Q,c,n]),Ne=r.useCallback(()=>{if(!M){xe.error(n("wsError.checkGateway"));return}if(!e||!c||!g.trim())return;P(!0),window.setTimeout(()=>P(!1),150);const t=g.split(/\r?\n/),u=H.getState();for(const d of t)d.trim()&&u.sendInput(e,c,`${d}\r`,!1);$(g),A&&Q(A),N("")},[$,M,e,A,g,Q,c,n]),ke=r.useCallback(()=>{var t;(t=v.current)==null||t.focus({preventScroll:!0})},[]);if(!e)return o.jsx("div",{className:"flex h-full items-center justify-center p-4",children:o.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground",children:n("device.noDevices")})});const Me=!!c&&!z&&(b||ee),Pe=b&&!!c&&!z&&!U,fe=te&&!b&&!W&&!ee,Ae=o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-12 w-12 rounded-full bg-muted flex items-center justify-center mx-auto",children:o.jsx(ze,{className:"h-6 w-6 text-muted-foreground animate-spin"})}),o.jsx("h3",{className:"text-lg font-medium",children:n("terminal.connecting")})]});return o.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-background","data-testid":"device-page",children:[o.jsx("div",{className:`flex-1 relative overflow-hidden min-h-0 min-w-0 ${m&&T==="editor"?"pb-1":""}`,children:o.jsxs("div",{className:"h-full px-3 py-1 min-h-0 min-w-0 w-full relative flex rounded-xl",style:{backgroundColor:F.background},children:[z?o.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-8 text-center",children:o.jsxs("div",{className:"max-w-sm space-y-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-full bg-muted flex items-center justify-center mx-auto",children:o.jsx(Ot,{className:"h-6 w-6 text-muted-foreground"})}),o.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"terminal-selection-invalid",children:I})]})}):Me&&c?o.jsx("div",{ref:y,className:"flex-1 h-full min-h-0 w-full","data-virtual-keyboard-avoid":!0,children:o.jsx(Ze,{ref:R,deviceId:e,paneId:c,theme:j,inputMode:T,deviceConnected:b,isSelectionInvalid:z,onResize:Le,onSync:Ie,children:T==="direct"&&o.jsx("div",{className:"kb-floating-shortcuts",style:{backgroundColor:F.background},children:o.jsx(Ye,{onActivate:Te,disabled:!M})})},`${e}:${c}`)}):o.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-8 text-center",children:o.jsx("div",{className:"max-w-sm space-y-4",children:fe?Ae:!b&&!ee?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-12 w-12 rounded-full bg-muted flex items-center justify-center mx-auto",children:o.jsx("span",{className:"text-2xl text-muted-foreground",children:"🔌"})}),o.jsx("h3",{className:"text-lg font-medium",children:n("device.disconnected")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:n("device.connectToStart")})]}):i?Ae:o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-12 w-12 rounded-full bg-muted flex items-center justify-center mx-auto",children:o.jsx("span",{className:"text-2xl text-muted-foreground",children:"📋"})}),o.jsx("h3",{className:"text-lg font-medium",children:n("window.noWindowSelected")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:n("window.selectWindowToStart")})]})})}),ee&&o.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center","data-testid":"terminal-reconnecting-indicator",children:o.jsx(wt,{deviceId:e,className:"shadow-sm"})}),Pe&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/85 backdrop-blur-sm","data-testid":"terminal-status-overlay",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-card/90 px-4 py-3 shadow-sm",children:[o.jsx("div",{className:"h-7 w-7 rounded-full border-2 border-primary border-t-transparent animate-spin"}),o.jsx("span",{className:"text-xs text-muted-foreground","data-testid":"terminal-status-text",children:n("terminal.connecting")})]})})]})}),T==="editor"&&o.jsxs("div",{ref:k,"data-virtual-keyboard-avoid":!0,className:"editor-mode-input bg-card/85 backdrop-blur-sm",children:[m&&o.jsx(Ye,{onActivate:t=>{Te(t),t.type==="send"&&ke()},disabled:!M}),o.jsx("textarea",{ref:v,"data-testid":"editor-input",className:"min-h-[88px] max-h-[28vh] w-full resize-y rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground shadow-xs outline-none transition-colors focus:border-ring",value:g,onChange:t=>{const u=t.target.value;if(N(u),!!A){if(u){le(A,u);return}Q(A)}},placeholder:n("terminal.inputPlaceholder"),onCompositionStart:()=>{O.current=!0},onCompositionEnd:()=>{O.current=!1}}),o.jsx("div",{className:"actions mt-2",children:o.jsxs("div",{className:"send-row flex flex-wrap items-center justify-end gap-2","data-testid":"editor-send-row",children:[o.jsxs("div",{className:"send-with-enter-toggle mr-auto flex items-center gap-2 text-xs text-muted-foreground","data-testid":"editor-send-with-enter-toggle",children:[o.jsx(pt,{size:"sm",checked:D,onCheckedChange:t=>V(!!t)}),o.jsx("span",{children:n("terminal.editorSendWithEnter")})]}),o.jsxs(me,{variant:"outline",size:"sm","data-testid":"editor-clear",onMouseDown:t=>t.preventDefault(),onClick:()=>{var t;N(""),A&&Q(A),m&&T==="editor"&&((t=v.current)==null||t.focus({preventScroll:!0}))},title:n("terminal.clear"),children:[o.jsx(xt,{className:"h-4 w-4"}),n("terminal.clear")]}),o.jsxs(me,{variant:"secondary",size:"sm","data-testid":"editor-send-line-by-line",onMouseDown:t=>t.preventDefault(),onClick:()=>{var t;Ne(),m&&T==="editor"&&((t=v.current)==null||t.focus({preventScroll:!0}))},disabled:!M||S,children:[S?o.jsx(ze,{className:"h-4 w-4 animate-spin"}):o.jsx(qe,{className:"h-4 w-4"}),n("terminal.editorSendLineByLine")]}),o.jsxs(me,{variant:"default",size:"sm","data-testid":"editor-send",onMouseDown:t=>t.preventDefault(),onClick:()=>{var t;Ce(),m&&T==="editor"&&((t=v.current)==null||t.focus({preventScroll:!0}))},disabled:!M||S,children:[S?o.jsx(ze,{className:"h-4 w-4 animate-spin"}):o.jsx(qe,{className:"h-4 w-4"}),n("common.send")]})]})})]})]})}function yn(){const{deviceId:n,windowId:e,paneId:i}=Be(),a=i?We(i):void 0,w=H(s=>s.snapshots),y=Ge(s=>{var C;return((C=s.settings)==null?void 0:C.siteName)??"tmex"}),k=n?w[n]:void 0,v=r.useMemo(()=>{var s;if(!(!e||!((s=k==null?void 0:k.session)!=null&&s.windows)))return k.session.windows.find(C=>C.id===e)},[e,k]),R=r.useMemo(()=>{if(!(!a||!v))return v.panes.find(s=>s.id===a)},[a,v]),X=r.useMemo(()=>v&&R?Ve({paneIdx:R.index,windowIdx:v.index,paneTitle:R.title,windowName:v.name,windowCustomName:v.customName,deviceName:y}):n??"",[v,R,y,n]);return o.jsx(o.Fragment,{children:X})}function jn(){const{t:n}=je(),{deviceId:e,paneId:i}=Be(),a=i?We(i):void 0,w=J(c=>c.inputMode),y=J(c=>c.setInputMode),k=H(c=>{var A;return e?((A=c.deviceConnected)==null?void 0:A[e])??!1:!1}),[v,R]=r.useState(!1),[X,s]=r.useState(!1),[C,L]=r.useState(!1),K=!!(a&&k),b=($e({queryKey:gt(e??"",a??""),queryFn:()=>vt(e??"",a??""),enabled:!!(e&&a),throwOnError:!1}).data??[]).some(c=>c.enabled),Z=()=>{y(w==="direct"?"editor":"direct")},ee=()=>{window.dispatchEvent(new CustomEvent("tmex:jump-to-latest"))},te=()=>{R(!0)},q=()=>{window.location.reload()};return o.jsxs(o.Fragment,{children:[o.jsx(me,{variant:"ghost",size:"icon-sm",onClick:te,"aria-label":n("nav.refreshPage"),title:n("nav.refreshPage"),children:o.jsx(Lt,{className:"h-4 w-4"})}),o.jsx(me,{variant:"ghost",size:"icon-sm",onClick:Z,disabled:!K,"data-testid":"terminal-input-mode-toggle","aria-label":n(w==="direct"?"nav.switchToEditor":"nav.switchToDirect"),title:n(w==="direct"?"nav.switchToEditor":"nav.switchToDirect"),children:w==="direct"?o.jsx($t,{className:"h-4 w-4"}):o.jsx(Xt,{className:"h-4 w-4"})}),o.jsx(me,{variant:"ghost",size:"icon-sm",onClick:ee,disabled:!K,"aria-label":n("nav.jumpToLatest"),title:n("nav.jumpToLatest"),children:o.jsx(_t,{className:"h-4 w-4"})}),o.jsxs(me,{variant:"ghost",size:"icon-sm",className:"relative",onClick:()=>s(!0),disabled:!a,"data-testid":"watch-open-button","aria-label":n("watch.title"),title:n("watch.title"),children:[o.jsx(St,{className:"h-4 w-4"}),b&&o.jsx("span",{className:"absolute right-1 top-1 h-1.5 w-1.5 rounded-full bg-primary","data-testid":"watch-active-indicator"})]}),o.jsx(me,{variant:"ghost",size:"icon-sm",onClick:()=>L(!0),"data-testid":"keyboard-behavior-open-button","aria-label":n("settings.terminal.title"),title:n("settings.terminal.title"),children:o.jsx(Ut,{className:"h-4 w-4"})}),o.jsx(Kt,{open:C,onOpenChange:L}),e&&a&&o.jsx(bt,{open:X,onOpenChange:s,deviceId:e,paneId:a}),o.jsx(Et,{open:v,onOpenChange:R,children:o.jsxs(Rt,{children:[o.jsxs(Tt,{children:[o.jsx(yt,{children:n("nav.refreshPage")}),o.jsx(jt,{children:n("nav.refreshPageConfirm")})]}),o.jsxs(It,{children:[o.jsx(Ct,{onClick:()=>R(!1),children:n("common.cancel")}),o.jsx(Nt,{onClick:q,children:n("common.confirm")})]})]})})]})}export{jn as PageActions,yn as PageTitle,Tn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai as o,aj as n}from"./mermaid.core-DE3GlZm2.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-C03K3kUu.js";import{_ as i}from"./mermaid.core-DE3GlZm2.js";import"./chunk-FMBD7UC4-CXm-3D35.js";import"./chunk-ND2GUHAM-DH_J0yjP.js";import"./chunk-55IACEB6-D5BgUYDW.js";import"./chunk-2J33WTMH-D4_zLlF4.js";import"./index-CEPc0i5O.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-C03K3kUu.js";import{_ as i}from"./mermaid.core-DE3GlZm2.js";import"./chunk-FMBD7UC4-CXm-3D35.js";import"./chunk-ND2GUHAM-DH_J0yjP.js";import"./chunk-55IACEB6-D5BgUYDW.js";import"./chunk-2J33WTMH-D4_zLlF4.js";import"./index-CEPc0i5O.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|