cc-viewer 1.6.92 → 1.6.94
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/cli.js +150 -16
- package/dist/assets/{App-D4nsyVOs.js → App-CpDREOeV.js} +16 -16
- package/dist/assets/AppHeader-B2WxpwwK.css +41 -0
- package/dist/assets/{AppHeader.module-S7b16Luh.js → AppHeader.module-CmeLfozP.js} +176 -176
- package/dist/assets/Mobile-dzPMTNzK.js +10 -0
- package/dist/assets/{_basePickBy-uFgBWU_1.js → _basePickBy-DtCw5KGL.js} +1 -1
- package/dist/assets/{_baseUniq-D9OrCsW-.js → _baseUniq-ImoXbuWJ.js} +1 -1
- package/dist/assets/{arc-B5paIHbL.js → arc-DPeHTMnU.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-CVR0S5_A.js → architectureDiagram-2XIMDMQ5-CBXj01rK.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-DbExq97J.js → blockDiagram-WCTKOSBZ-D7wcf1pW.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-CyyZQH7U.js → c4Diagram-IC4MRINW-BRPLIdn4.js} +1 -1
- package/dist/assets/channel-CIlWz43T.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-D-TxZu2j.js → chunk-4BX2VUAB-BXdgQxSh.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-BpiK1KHs.js → chunk-55IACEB6-CGjaWrfY.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BsVETng4.js → chunk-FMBD7UC4-mMdkjRFC.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-ByEZLFF3.js → chunk-JSJVCQXG-C6OK5M-I.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-DGedEdfQ.js → chunk-KX2RTZJC-AEEd0Ryd.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-CVuE5E20.js → chunk-NQ4KR5QH-B-8p6H36.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BDDf3H2l.js → chunk-QZHKN3VN-B-CVp8R8.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-D57kZtSM.js → chunk-WL4C6EOR-A-wxrsg9.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-CFFsxNG8.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-CFFsxNG8.js +1 -0
- package/dist/assets/clone-CKeKraNB.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CF2LKXX0.js → cose-bilkent-S5V4N54A-8lbzR16F.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-AKm2eMFa.js → dagre-KLK3FWXG-DMayMOCq.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-Dy0ZpqYE.js → diagram-E7M64L7V-ChHSZyAh.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-BwulOlMM.js → diagram-IFDJBPK2-BwUoLoNA.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-BlGWqbdU.js → diagram-P4PSJMXO-W3hHvhQv.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-DlKoWq8q.js → erDiagram-INFDFZHY-ToaX7NX1.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-fbS7K31R.js → flowDiagram-PKNHOUZH-D2ZMeP7M.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-CrXC6aZY.js → ganttDiagram-A5KZAMGK-B3G9qGij.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-DgL6ifkO.js → gitGraphDiagram-K3NZZRJ6-DVPNEMEl.js} +1 -1
- package/dist/assets/{graph-D8OSNuBb.js → graph-7WxqTkFG.js} +1 -1
- package/dist/assets/{index-vXPJvGyq.js → index-BJPMV8pJ.js} +2 -2
- package/dist/assets/{infoDiagram-LFFYTUFH-D-yXUDBn.js → infoDiagram-LFFYTUFH-BpGp_HF2.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-BSLzUZNI.js → ishikawaDiagram-PHBUUO56-B5VsmnNJ.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-BsZGTLTS.js → journeyDiagram-4ABVD52K-C2z-HVVr.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-qHcQ8IDf.js → kanban-definition-K7BYSVSG-BD5yr9Bu.js} +1 -1
- package/dist/assets/{layout-BT82KtcO.js → layout-CE4RECIN.js} +1 -1
- package/dist/assets/{linear-C-NY3Tys.js → linear-D1KJlzdf.js} +1 -1
- package/dist/assets/{mermaid.core-Iu-Haj2d.js → mermaid.core-CUfJ0HRg.js} +4 -4
- package/dist/assets/{mindmap-definition-YRQLILUH-bYKflbjM.js → mindmap-definition-YRQLILUH-DxHuRKwL.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-EBV2nFfI.js → pieDiagram-SKSYHLDU-D9WiCCJ-.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-CDbCpLQ6.js → quadrantDiagram-337W2JSQ-CZ8WY2Jp.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-DTepHdzH.js → requirementDiagram-Z7DCOOCP-D0DF0apq.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-BDGKah3z.js → sankeyDiagram-WA2Y5GQK--FyELbOO.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-DOTt340N.js → sequenceDiagram-2WXFIKYE-BCuHKjuI.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-C-dx3ZVl.js → stateDiagram-RAJIS63D-Luke3XUg.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-BKK8D7Gx.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-CQuH8MMr.js → timeline-definition-YZTLITO2-5YJwGq5n.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-Bh6K3rqD.js → treemap-KZPCXAKY-sJliY-5m.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-B4Avwovu.js → vennDiagram-LZ73GAT5-BU34zfK3.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-CNDvIAFk.js → xychartDiagram-JWTSCODW-ALa7ypHt.js} +1 -1
- package/dist/index.html +2 -2
- package/i18n.js +3 -3
- package/lib/perm-bridge.js +128 -0
- package/lib/sdk-adapter.js +77 -0
- package/lib/sdk-manager.js +458 -0
- package/package.json +5 -2
- package/server.js +216 -4
- package/dist/assets/AppHeader-q5FApoep.css +0 -41
- package/dist/assets/Mobile-ZoUy632Q.js +0 -10
- package/dist/assets/channel-Bk-jFRd9.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-BIEQkv07.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BIEQkv07.js +0 -1
- package/dist/assets/clone-CDtWj5DG.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-Dn8gbgvz.js +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var Fe=Object.defineProperty;var He=(t,l,o)=>l in t?Fe(t,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[l]=o;var me=(t,l,o)=>He(t,typeof l!="symbol"?l+"":l,o);import{r as x,j as e,i as G}from"./index-vXPJvGyq.js";import{g as Te,m as We,a as _e,r as $e,K as X,u as B,C as ge,i as Le,c as R,b as Ve,d as Ue,I as Ge,_ as Ze,e as be,t as u,F as qe,f as Xe,h as Ke,j as Ye,k as Je,l as Qe,s as n,n as ie,o as Z,A as et,q as tt,v as st,w as it,x as r,B as E,R as lt,y as ot,T as ve,z as he,D as Ce,O as nt,E as at,G as rt,S as ct,H as ue,J as dt}from"./AppHeader.module-S7b16Luh.js";const mt=new X("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),ht=new X("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),ut=new X("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),bt=new X("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),gt=new X("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),ft=new X("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),xt=t=>{const{componentCls:l,iconCls:o,antCls:s,badgeShadowSize:i,textFontSize:d,textFontSizeSM:a,statusSize:c,dotSize:m,textFontWeight:p,indicatorHeight:f,indicatorHeightSM:h,marginXS:N,calc:w}=t,v=`${s}-scroll-number`,S=_e(t,(j,{darkColor:b})=>({[`&${l} ${l}-color-${j}`]:{background:b,[`&:not(${l}-count)`]:{color:b},"a:hover &":{background:b}}}));return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${l}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:f,height:f,color:t.badgeTextColor,fontWeight:p,fontSize:d,lineHeight:B(f),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:w(f).div(2).equal(),boxShadow:`0 0 0 ${B(i)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${l}-count-sm`]:{minWidth:h,height:h,fontSize:a,lineHeight:B(h),borderRadius:w(h).div(2).equal()},[`${l}-multiple-words`]:{padding:`0 ${B(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${l}-dot`]:{zIndex:t.indicatorZIndex,width:m,minWidth:m,height:m,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${B(i)} ${t.badgeShadowColor}`},[`${l}-count, ${l}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${o}-spin`]:{animationName:ft,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${l}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${l}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${l}-status-success`]:{backgroundColor:t.colorSuccess},[`${l}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:mt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${l}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${l}-status-error`]:{backgroundColor:t.colorError},[`${l}-status-warning`]:{backgroundColor:t.colorWarning},[`${l}-status-text`]:{marginInlineStart:N,color:t.colorText,fontSize:t.fontSize}}}),S),{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:ht,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${l}-zoom-leave`]:{animationName:ut,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${l}-not-a-wrapper`]:{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:bt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${l}-zoom-leave`]:{animationName:gt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${l}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${l}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:f,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${l}-count, ${l}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Oe=t=>{const{fontHeight:l,lineWidth:o,marginXS:s,colorBorderBg:i}=t,d=l,a=o,c=t.colorTextLightSolid,m=t.colorError,p=t.colorErrorHover;return We(t,{badgeFontHeight:d,badgeShadowSize:a,badgeTextColor:c,badgeColor:m,badgeColorHover:p,badgeShadowColor:i,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Me=t=>{const{fontSize:l,lineHeight:o,fontSizeSM:s,lineWidth:i}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(l*o)-2*i,indicatorHeightSM:l,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},pt=Te("Badge",t=>{const l=Oe(t);return xt(l)},Me),jt=t=>{const{antCls:l,badgeFontHeight:o,marginXS:s,badgeRibbonOffset:i,calc:d}=t,a=`${l}-ribbon`,c=`${l}-ribbon-wrapper`,m=_e(t,(p,{darkColor:f})=>({[`&${a}-color-${p}`]:{background:f,color:f}}));return{[c]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"absolute",top:s,padding:`0 ${B(t.paddingXS)}`,color:t.colorPrimary,lineHeight:B(o),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${a}-text`]:{color:t.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${B(d(i).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),m),{[`&${a}-placement-end`]:{insetInlineEnd:d(i).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:d(i).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Nt=Te(["Badge","Ribbon"],t=>{const l=Oe(t);return jt(l)},Me),vt=t=>{const{className:l,prefixCls:o,style:s,color:i,children:d,text:a,placement:c="end",rootClassName:m}=t,{getPrefixCls:p,direction:f}=x.useContext(ge),h=p("ribbon",o),N=`${h}-wrapper`,[w,v,S]=Nt(h,N),j=Le(i,!1),b=R(h,`${h}-placement-${c}`,{[`${h}-rtl`]:f==="rtl",[`${h}-color-${i}`]:j},l),g={},L={};return i&&!j&&(g.background=i,L.color=i),w(x.createElement("div",{className:R(N,m,v,S)},d,x.createElement("div",{className:R(b,v),style:Object.assign(Object.assign({},g),s)},x.createElement("span",{className:`${h}-text`},a),x.createElement("div",{className:`${h}-corner`,style:L}))))},ye=t=>{const{prefixCls:l,value:o,current:s,offset:i=0}=t;let d;return i&&(d={position:"absolute",top:`${i}00%`,left:0}),x.createElement("span",{style:d,className:R(`${l}-only-unit`,{current:s})},o)};function Ct(t,l,o){let s=t,i=0;for(;(s+10)%10!==l;)s+=o,i+=o;return i}const yt=t=>{const{prefixCls:l,count:o,value:s}=t,i=Number(s),d=Math.abs(o),[a,c]=x.useState(i),[m,p]=x.useState(d),f=()=>{c(i),p(d)};x.useEffect(()=>{const w=setTimeout(f,1e3);return()=>clearTimeout(w)},[i]);let h,N;if(a===i||Number.isNaN(i)||Number.isNaN(a))h=[x.createElement(ye,Object.assign({},t,{key:i,current:!0}))],N={transition:"none"};else{h=[];const w=i+10,v=[];for(let g=i;g<=w;g+=1)v.push(g);const S=m<d?1:-1,j=v.findIndex(g=>g%10===a);h=(S<0?v.slice(0,j+1):v.slice(j)).map((g,L)=>{const I=g%10;return x.createElement(ye,Object.assign({},t,{key:g,value:I,offset:S<0?L-j:L,current:L===j}))}),N={transform:`translateY(${-Ct(a,i,S)}00%)`}}return x.createElement("span",{className:`${l}-only`,style:N,onTransitionEnd:f},h)};var St=function(t,l){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)l.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(o[s[i]]=t[s[i]]);return o};const wt=x.forwardRef((t,l)=>{const{prefixCls:o,count:s,className:i,motionClassName:d,style:a,title:c,show:m,component:p="sup",children:f}=t,h=St(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:N}=x.useContext(ge),w=N("scroll-number",o),v=Object.assign(Object.assign({},h),{"data-show":m,style:a,className:R(w,i,d),title:c});let S=s;if(s&&Number(s)%1===0){const j=String(s).split("");S=x.createElement("bdi",null,j.map((b,g)=>x.createElement(yt,{prefixCls:w,count:Number(s),value:b,key:j.length-g})))}return a!=null&&a.borderColor&&(v.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),f?Ve(f,j=>({className:R(`${w}-custom-component`,j==null?void 0:j.className,d)})):x.createElement(p,Object.assign({},v,{ref:l}),S)});var Tt=function(t,l){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)l.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(o[s[i]]=t[s[i]]);return o};const _t=x.forwardRef((t,l)=>{var o,s,i,d,a;const{prefixCls:c,scrollNumberPrefixCls:m,children:p,status:f,text:h,color:N,count:w=null,overflowCount:v=99,dot:S=!1,size:j="default",title:b,offset:g,style:L,className:I,rootClassName:D,classNames:O,styles:M,showZero:A=!1}=t,K=Tt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:z,badge:C}=x.useContext(ge),T=F("badge",c),[Y,Q,le]=pt(T),_=w>v?`${v}+`:w,$=_==="0"||_===0||h==="0"||h===0,P=w===null||$&&!A,oe=(f!=null||N!=null)&&P,Ie=f!=null||!$,J=S&&!$,H=J?"":_,W=x.useMemo(()=>((H==null||H==="")&&(h==null||h==="")||$&&!A)&&!J,[H,$,A,J,h]),fe=x.useRef(w);W||(fe.current=w);const U=fe.current,xe=x.useRef(H);W||(xe.current=H);const ne=xe.current,pe=x.useRef(J);W||(pe.current=J);const ee=x.useMemo(()=>{if(!g)return Object.assign(Object.assign({},C==null?void 0:C.style),L);const k={marginTop:g[1]};return z==="rtl"?k.left=Number.parseInt(g[0],10):k.right=-Number.parseInt(g[0],10),Object.assign(Object.assign(Object.assign({},k),C==null?void 0:C.style),L)},[z,g,L,C==null?void 0:C.style]),Pe=b??(typeof U=="string"||typeof U=="number"?U:void 0),je=!W&&(h===0?A:!!h&&h!==!0),Ee=je?x.createElement("span",{className:`${T}-status-text`},h):null,Be=!U||typeof U!="object"?void 0:Ve(U,k=>({style:Object.assign(Object.assign({},ee),k.style)})),te=Le(N,!1),ze=R(O==null?void 0:O.indicator,(o=C==null?void 0:C.classNames)===null||o===void 0?void 0:o.indicator,{[`${T}-status-dot`]:oe,[`${T}-status-${f}`]:!!f,[`${T}-color-${N}`]:te}),ae={};N&&!te&&(ae.color=N,ae.background=N);const Ne=R(T,{[`${T}-status`]:oe,[`${T}-not-a-wrapper`]:!p,[`${T}-rtl`]:z==="rtl"},I,D,C==null?void 0:C.className,(s=C==null?void 0:C.classNames)===null||s===void 0?void 0:s.root,O==null?void 0:O.root,Q,le);if(!p&&oe&&(h||Ie||!P)){const k=ee.color;return Y(x.createElement("span",Object.assign({},K,{className:Ne,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.root),(i=C==null?void 0:C.styles)===null||i===void 0?void 0:i.root),ee)}),x.createElement("span",{className:ze,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(d=C==null?void 0:C.styles)===null||d===void 0?void 0:d.indicator),ae)}),je&&x.createElement("span",{style:{color:k},className:`${T}-status-text`},h)))}return Y(x.createElement("span",Object.assign({ref:l},K,{className:Ne,style:Object.assign(Object.assign({},(a=C==null?void 0:C.styles)===null||a===void 0?void 0:a.root),M==null?void 0:M.root)}),p,x.createElement(Ue,{visible:!W,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:k})=>{var re,ce;const De=F("scroll-number",m),de=pe.current,Ae=R(O==null?void 0:O.indicator,(re=C==null?void 0:C.classNames)===null||re===void 0?void 0:re.indicator,{[`${T}-dot`]:de,[`${T}-count`]:!de,[`${T}-count-sm`]:j==="small",[`${T}-multiple-words`]:!de&&ne&&ne.toString().length>1,[`${T}-status-${f}`]:!!f,[`${T}-color-${N}`]:te});let se=Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(ce=C==null?void 0:C.styles)===null||ce===void 0?void 0:ce.indicator),ee);return N&&!te&&(se=se||{},se.background=N),x.createElement(wt,{prefixCls:De,show:!W,motionClassName:k,className:Ae,count:ne,title:Pe,style:se,key:"scrollNumber"},Be)}),Ee))}),ke=_t;ke.Ribbon=vt;var $t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},Lt=function(l,o){return x.createElement(Ge,Ze({},l,{ref:o,icon:$t}))},Vt=x.forwardRef(Lt);const Ot="_container_md63t_1",Mt="_fileListSection_md63t_10",kt="_header_md63t_19",Rt="_headerTitle_md63t_28",It="_fileCount_md63t_36",Pt="_changesContainer_md63t_44",Et="_changeItem_md63t_51",Bt="_changeItemActive_md63t_68",zt="_dirItem_md63t_77",Dt="_dirArrow_md63t_88",At="_dirName_md63t_97",Ft="_status_md63t_102",Ht="_icon_md63t_111",Wt="_fileName_md63t_120",Ut="_diffSection_md63t_127",Gt="_diffHeader_md63t_135",Zt="_diffFilePath_md63t_145",qt="_diffBadge_md63t_155",Xt="_diffContent_md63t_167",Kt="_diffPlaceholder_md63t_173",Yt="_statusText_md63t_184",Jt="_errorText_md63t_191",Qt="_emptyText_md63t_198",es="_warningText_md63t_205",ts="_fileSizeNote_md63t_217",ss="_statusTextItalic_md63t_222",is="_rotated90_md63t_226",y={container:Ot,fileListSection:Mt,header:kt,headerTitle:Rt,fileCount:It,changesContainer:Pt,changeItem:Et,changeItemActive:Bt,dirItem:zt,dirArrow:Dt,dirName:At,status:Ft,icon:Ht,fileName:Wt,diffSection:Ut,diffHeader:Gt,diffFilePath:Zt,diffBadge:qt,diffContent:Xt,diffPlaceholder:Kt,statusText:Yt,errorText:Jt,emptyText:Qt,warningText:es,fileSizeNote:ts,statusTextItalic:ss,rotated90:is},ls={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},os={"??":"U"},ns={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function as(t){const l=t.includes(".")?t.split(".").pop().toLowerCase():"",o=ns[l]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function rs(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function cs(t){const l={dirs:{},files:[]};for(const o of t){const s=o.file.split("/");let i=l;for(let d=0;d<s.length-1;d++)i.dirs[s[d]]||(i.dirs[s[d]]={dirs:{},files:[]}),i=i.dirs[s[d]];i.files.push({name:s[s.length-1],status:o.status,fullPath:o.file})}return l}function Re({name:t,node:l,depth:o,selectedFile:s,onFileClick:i}){const d=Object.keys(l.dirs).sort(),a=[...l.files].sort((c,m)=>c.name.localeCompare(m.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:y.dirItem,style:{paddingLeft:8+o*16},children:[e.jsx("span",{className:y.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:y.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:y.icon,children:rs()}),e.jsx("span",{className:y.dirName,children:t})]}),d.map(c=>e.jsx(Re,{name:c,node:l.dirs[c],depth:t?o+1:o,selectedFile:s,onFileClick:i},c)),a.map(c=>e.jsxs("div",{className:`${y.changeItem} ${s===c.fullPath?y.changeItemActive:""}`,style:{paddingLeft:8+(t?o+1:o)*16},onClick:()=>i&&i(c.fullPath),children:[e.jsx("span",{className:y.icon,children:as(c.name)}),e.jsx("span",{className:y.fileName,children:c.name}),e.jsx("span",{className:y.status,style:{color:ls[c.status]||"#888"},children:os[c.status]||c.status})]},c.fullPath))]})}function ds({visible:t}){const[l,o]=x.useState(null),[s,i]=x.useState(null),[d,a]=x.useState(!0),[c,m]=x.useState(null),[p,f]=x.useState(null),[h,N]=x.useState(null),[w,v]=x.useState(!1),S=x.useRef(!0);return x.useEffect(()=>{if(S.current=!0,!!t)return a(!0),i(null),fetch(be("/api/git-status")).then(j=>j.ok?j.json():Promise.reject()).then(j=>{S.current&&(o(j.changes||[]),a(!1))}).catch(()=>{S.current&&(i("Failed to load git status"),a(!1))}),()=>{S.current=!1}},[t]),x.useEffect(()=>{if(!c){f(null),N(null);return}v(!0),f(null),N(null),fetch(be(`/api/git-diff?files=${encodeURIComponent(c)}`)).then(j=>{if(!j.ok)throw new Error(`HTTP ${j.status}`);return j.json()}).then(j=>{S.current&&(j.diffs&&j.diffs[0]?f(j.diffs[0]):N("No diff data available"),v(!1))}).catch(j=>{S.current&&(N(`${u("ui.fileLoadError")}: ${j.message}`),v(!1))})},[c]),e.jsxs("div",{className:y.container,children:[e.jsxs("div",{className:y.fileListSection,children:[e.jsxs("div",{className:y.header,children:[e.jsx("span",{className:y.headerTitle,children:u("ui.gitChanges")}),e.jsx("span",{className:y.fileCount,children:l?l.length:0})]}),e.jsxs("div",{className:y.changesContainer,children:[d&&e.jsx("div",{className:y.statusText,children:"Loading..."}),s&&e.jsx("div",{className:y.errorText,children:s}),!d&&!s&&l&&l.length===0&&e.jsx("div",{className:y.emptyText,children:"No changes"}),!d&&!s&&l&&l.length>0&&e.jsx(Re,{name:"",node:cs(l),depth:0,selectedFile:c,onFileClick:m})]})]}),e.jsx("div",{className:y.diffSection,children:c?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:y.diffHeader,children:[e.jsx("span",{className:y.diffFilePath,children:c}),e.jsx("span",{className:y.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:y.diffContent,children:[w&&e.jsx("div",{className:y.statusText,children:u("ui.loading")}),h&&e.jsx("div",{className:y.errorText,children:h}),!w&&!h&&p&&e.jsx(e.Fragment,{children:p.is_large?e.jsxs("div",{className:y.warningText,children:[e.jsx("p",{children:u("ui.largeFileWarning")}),e.jsxs("p",{className:y.fileSizeNote,children:[u("ui.fileSize"),": ",(p.size/(1024*1024)).toFixed(2)," MB"]})]}):p.is_binary?e.jsx("div",{className:`${y.statusText} ${y.statusTextItalic}`,children:u("ui.binaryFileNotice")}):e.jsx(qe,{file_path:c,old_string:p.old_content,new_string:p.new_content})})]})]}):e.jsxs("div",{className:y.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:u("ui.mobileGitDiffHint")})]})})]})}const ms="_container_16ddt_1",hs="_header_16ddt_9",us="_headerTitle_16ddt_18",bs="_closeBtn_16ddt_24",gs="_content_16ddt_38",fs="_empty_16ddt_47",xs="_fixedTable_16ddt_54",ps="_ellipsisCell_16ddt_58",js="_thLeft_16ddt_65",Ns="_colWide_16ddt_69",vs="_colNarrow_16ddt_73",V={container:ms,header:hs,headerTitle:us,closeBtn:bs,content:gs,empty:fs,fixedTable:xs,ellipsisCell:ps,thLeft:js,colWide:Ns,colNarrow:vs},Cs=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],Se={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function ys({requests:t=[],visible:l,onClose:o}){const{byModel:s,models:i,toolStats:d,skillStats:a,cacheStats:c,activeReasons:m,totalCount:p,totalCache:f,hasCacheStats:h,subAgentEntries:N,hasSubAgentStats:w,teammateEntries:v,hasTeammateStats:S,isEmpty:j}=x.useMemo(()=>{const b=Xe(t),g=Object.keys(b),L=Ke(t),I=Ye(t),D=Je(t),O=Cs.filter(_=>D[_].count>0),M=O.reduce((_,$)=>_+D[$].count,0),A=O.reduce((_,$)=>_+D[$].cacheCreate,0),K=O.length>0,F={},z={};for(let _=0;_<t.length;_++){const $=Qe(t[_],t[_+1]);if($.type==="SubAgent"){const P=$.subType||"Other";F[P]=(F[P]||0)+1}else if($.type==="Teammate"){const P=$.subType||"Teammate";z[P]=(z[P]||0)+1}}const C=Object.entries(F).sort((_,$)=>$[1]-_[1]),T=C.length>0,Y=Object.entries(z).sort((_,$)=>$[1]-_[1]),Q=Y.length>0,le=g.length===0&&L.length===0&&!K&&!T&&!Q&&I.length===0;return{byModel:b,models:g,toolStats:L,skillStats:I,cacheStats:D,activeReasons:O,totalCount:M,totalCache:A,hasCacheStats:K,subAgentEntries:C,hasSubAgentStats:T,teammateEntries:Y,hasTeammateStats:Q,isEmpty:le}},[t]);return l?e.jsxs("div",{className:V.container,children:[e.jsxs("div",{className:V.header,children:[e.jsx("span",{className:V.headerTitle,children:u("ui.tokenStats")}),e.jsx("button",{className:V.closeBtn,onClick:o,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:V.content,children:j?e.jsx("div",{className:V.empty,children:"—"}):e.jsxs(e.Fragment,{children:[a.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:u("ui.skillUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${V.thLeft}`,children:"Skill"}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[a.map(([b,g])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:b}),e.jsx("td",{className:n.td,children:g})]},b)),a.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:a.reduce((b,g)=>b+g[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:u("ui.subAgentStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${V.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([b,g])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[b," ",e.jsx(ie,{doc:`SubAgent-${b}`})]}),e.jsx("td",{className:n.td,children:g})]},b)),N.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:N.reduce((b,g)=>b+g[1],0)})]})]})]})]}),S&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:"Teammate"}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${V.thLeft}`,children:"Name"}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([b,g])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:b}),e.jsx("td",{className:n.td,children:g})]},b)),v.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:v.reduce((b,g)=>b+g[1],0)})]})]})]})]}),d.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:u("ui.toolUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${V.thLeft}`,children:"Tool"}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[d.map(([b,g])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[b," ",e.jsx(ie,{doc:`Tool-${b}`})]}),e.jsx("td",{className:n.td,children:g})]},b)),d.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:d.reduce((b,g)=>b+g[1],0)})]})]})]})]}),h&&e.jsxs("div",{className:n.modelCard,children:[e.jsxs("div",{className:n.modelName,children:["MainAgent",e.jsx(ie,{doc:"MainAgent"})," ",u("ui.cacheRebuildStats"),e.jsx(ie,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${n.statsTable} ${V.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:V.colWide}),e.jsx("col",{className:V.colNarrow}),e.jsx("col",{className:V.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${V.thLeft}`,children:u("ui.cacheRebuild.reason")}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.count")}),e.jsx("td",{className:n.th,children:u("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[m.map(b=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:`${n.label} ${V.ellipsisCell}`,title:u(`ui.${Se[b]}`),children:u(`ui.${Se[b]}`)}),e.jsx("td",{className:n.td,children:c[b].count}),e.jsx("td",{className:n.td,children:Z(c[b].cacheCreate)})]},b)),m.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:p}),e.jsx("td",{className:n.td,children:Z(f)})]})]})]})]}),i.map(b=>{const g=s[b],L=g.input+g.cacheCreation+g.cacheRead,I=L>0?(g.cacheRead/L*100).toFixed(1):"0.0";return e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b}),e.jsx("table",{className:n.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Token"}),e.jsx("td",{className:n.th,children:"input"}),e.jsx("td",{className:n.th,children:"output"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:Z(L)}),e.jsx("td",{className:n.td,children:Z(g.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Cache"}),e.jsx("td",{className:n.th,children:"create"}),e.jsx("td",{className:n.th,children:"read"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:Z(g.cacheCreation)}),e.jsx("td",{className:n.td,children:Z(g.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:u("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:n.td,children:[I,"%"]})]})]})})]},b)})]})})]}):null}const q=class q extends et{constructor(o){super(o);me(this,"handleExportPromptsTxt",o=>{if(!o||o.length===0)return;const s=[];for(const c of o){const m=[],p=c.timestamp?new Date(c.timestamp).toLocaleString():"";p&&m.push(`${p}:
|
|
2
|
-
`);const f=(c.segments||[]).filter(h=>h.type==="text").map(h=>h.content);f.length>0&&m.push(f.join(`
|
|
3
|
-
`)),s.push(m.join(`
|
|
4
|
-
`))}if(s.length===0)return;const i=new Blob([s.join(`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
`)],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(i),a=document.createElement("a");a.href=d,a.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,a.click(),URL.revokeObjectURL(d)});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1})}componentDidMount(){super.componentDidMount(),G&&window.visualViewport&&(this._onVisualViewportChange=()=>{const o=this._layoutRef.current;if(!o)return;const s=window.visualViewport;o.style.position="fixed",o.style.top=`${s.offsetTop}px`,o.style.height=`${s.height}px`,o.style.width="100%",o.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange())}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),super.componentWillUnmount()}static parseSegments(o){const s=[],i=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let d=0,a;for(;(a=i.exec(o))!==null;){const m=o.slice(d,a.index).trim();m&&s.push({type:"text",content:m});const p=a[1];if(d=a.index+a[0].length,q.COMMAND_TAGS.has(p))continue;const f=new RegExp(`^<${p}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${p}>$`),h=a[0].match(f),N=h?h[1].trim():a[0].trim();s.push({type:"system",content:N,label:p})}const c=o.slice(d).trim();return c&&s.push({type:"text",content:c}),s}static extractUserTexts(o){const s=[],i=[];let d=null;for(const a of o)if(a.role==="user"){if(typeof a.content=="string"){const c=a.content.trim();if(!c)continue;if(!tt(c)){if(/Implement the following plan:/i.test(c))continue;s.push(c),i.push(c)}}else if(Array.isArray(a.content)){const{commands:c,textBlocks:m}=st(a.content);c.length>0&&(d=c[c.length-1]);const p=[];for(const h of m)/Implement the following plan:/i.test((h.text||"").trim())||p.push(h.text.trim());const f=a.content.filter(h=>{var N;return h.type==="text"&&((N=h.text)==null?void 0:N.trim())}).map(h=>h.text.trim());p.length>0&&(s.push(p.join(`
|
|
9
|
-
`)),i.push(f.join(`
|
|
10
|
-
`)))}}return{userMsgs:s,fullTexts:i,slashCmd:d}}extractUserPrompts(o){var c;const s=[],i=new Set;let d=null;const a=o.filter(m=>it(m));for(let m=0;m<a.length;m++){const p=a[m],f=((c=p.body)==null?void 0:c.messages)||[],h=p.timestamp||"",{userMsgs:N,fullTexts:w,slashCmd:v}=q.extractUserTexts(f);v&&v!=="/compact"&&v!==d&&s.push({type:"prompt",segments:[{type:"text",content:v}],timestamp:h}),d=v;for(let S=0;S<N.length;S++){const j=N[S];if(i.has(j))continue;i.add(j);const b=w[S]||j;s.push({type:"prompt",segments:q.parseSegments(b),timestamp:h})}}return s}renderOriginalPrompt(o){const s=o.segments.filter(i=>i.type==="text");return s.length===0?null:e.jsx("div",{className:r.mobilePromptCard,children:s.map((i,d)=>e.jsx("pre",{className:r.mobilePromptPreText,children:i.content},d))})}render(){const{filteredRequests:o,fileLoading:s,fileLoadingCount:i,mainAgentSessions:d}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const a=!!this._isLocalLog,c=a||this.state.mobileChatVisible;return e.jsxs("div",{className:r.mobileCLIRoot,ref:this._layoutRef,children:[e.jsxs("div",{className:r.mobileCLIHeader,children:[e.jsxs("div",{className:r.mobileCLIHeaderLeft,children:[e.jsx("button",{className:r.mobileMenuBtn,onClick:()=>this.setState(m=>({mobileMenuVisible:!m.mobileMenuVisible})),"aria-label":u("ui.mobileMenu"),children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e.jsx(ke,{status:"processing",color:"green"}),e.jsx("span",{className:r.mobileCLIStatusLabel,children:a?u("ui.historyLog",{file:this._localLogFile}):u("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:r.mobileCLIHeaderRight,children:[a?e.jsx(E,{type:"text",size:"small",icon:e.jsx(Vt,{}),onClick:()=>history.back(),className:r.mobileNavBtn,children:u("ui.mobileGoBack")}):e.jsx(E,{type:"text",size:"small",icon:e.jsx(lt,{}),onClick:()=>this.setState(m=>({mobileGitDiffVisible:!m.mobileGitDiffVisible,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileGitDiffVisible?"#fff":"#888",fontSize:12},children:this.state.mobileGitDiffVisible?u("ui.mobileGitDiffExit"):u("ui.mobileGitDiffBrowse")}),!a&&(G?e.jsx(E,{type:"text",size:"small",icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(m=>({mobileTerminalVisible:!m.mobileTerminalVisible,mobileGitDiffVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileTerminalVisible?"#fff":"#888",fontSize:12},children:this.state.mobileTerminalVisible?u("ui.mobileTerminalExit"):u("ui.mobileTerminalBrowse")}):e.jsx(E,{type:"text",size:"small",icon:e.jsx(ot,{}),onClick:()=>this.setState(m=>({mobileChatVisible:!m.mobileChatVisible,mobileGitDiffVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileChatVisible?"#fff":"#888",fontSize:12},children:this.state.mobileChatVisible?u("ui.mobileChatExit"):u("ui.mobileChatBrowse")}))]}),this.state.mobileMenuVisible&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:r.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),e.jsxs("div",{className:r.mobileMenuDropdown,children:[e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileLogMgmtVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1}),this.handleImportLocalLogs()},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),u("ui.logManagement")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileStatsVisible:!0,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),u("ui.tokenStats")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileSettingsVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),u("ui.settings")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobilePromptVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),e.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),u("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:r.mobileCLIBody,children:[!a&&!G&&e.jsx(ve,{}),G&&!a&&e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:r.mobileLoadingOverlay,children:[e.jsx("div",{className:r.mobileLoadingSpinner}),e.jsxs("div",{className:r.mobileLoadingLabel,children:[u("ui.loadingChat"),i>0?` (${i})`:""]})]}),e.jsx(he,{theme:this.darkThemeConfig,children:e.jsx("div",{className:r.mobileChatInner,children:e.jsx(Ce,{requests:o,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,terminalVisible:!1,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:m=>this.loadSession(m)})})})]}),G&&!a&&e.jsx("div",{className:`${r.mobileChatOverlay} ${this.state.mobileTerminalVisible?r.mobileChatOverlayVisible:""}`,children:e.jsx(ve,{})}),e.jsx("div",{className:`${r.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?r.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileGitDiffInner,children:e.jsx(ds,{visible:this.state.mobileGitDiffVisible})})}),!G&&e.jsxs("div",{className:`${r.mobileChatOverlay} ${c?r.mobileChatOverlayVisible:""}`,children:[s&&e.jsxs("div",{className:r.mobileLoadingOverlay,children:[e.jsx("div",{className:r.mobileLoadingSpinner}),e.jsxs("div",{className:r.mobileLoadingLabel,children:[u("ui.loadingChat"),i>0?` (${i})`:""]})]}),e.jsx(he,{theme:this.darkThemeConfig,children:e.jsx("div",{className:r.mobileChatInner,children:e.jsx(Ce,{requests:o,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,terminalVisible:!1,mobileChatVisible:this.state.mobileChatVisible,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:m=>this.loadSession(m)})})})]}),e.jsx("div",{className:`${r.mobileStatsOverlay} ${this.state.mobileStatsVisible?r.mobileStatsOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileStatsInner,children:e.jsx(ys,{requests:o,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),e.jsxs("div",{className:`${r.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?r.mobileLogMgmtOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsxs("span",{className:r.mobileLogMgmtTitle,children:[e.jsx(nt,{apiEndpoint:be("/api/open-log-dir"),title:u("ui.openLogDir"),size:14}),u("ui.importLocalLogs")]}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileLogMgmtActions,children:[e.jsx(E,{size:"small",type:this.state.selectedLogs.size>=2?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2?{color:"#666",borderColor:"#333"}:void 0,children:u("ui.mergeLogs")}),e.jsx(E,{size:"small",icon:e.jsx(at,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"#666",borderColor:"#333"}:{color:"#ff4d4f",borderColor:"#ff4d4f"},children:u("ui.deleteLogs")}),e.jsx(E,{size:"small",icon:e.jsx(rt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:u("ui.refreshStats")})]}),e.jsx("div",{className:r.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:r.spinCenter,children:e.jsx(ct,{})}):(()=>{const m=this.state.localLogs[this.state.currentProject];return!m||m.length===0?e.jsx("div",{className:r.emptyCenter,children:u("ui.noLogs")}):e.jsx(he,{theme:this.darkThemeConfig,children:e.jsx("div",{className:r.logListContainer,children:this.renderLogTable(m,!0)})})})()})]}),e.jsxs("div",{className:`${r.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?r.mobileSettingsOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:u("ui.settings")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileSettingsBody,children:[e.jsx("div",{className:r.mobileSettingsSectionTitle,children:u("ui.chatDisplaySwitches")}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:u("ui.collapseToolResults")}),e.jsx(ue,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:u("ui.expandThinking")}),e.jsx(ue,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:u("ui.showFullToolContent")}),e.jsx(ue,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]})]})]}),e.jsxs("div",{className:`${r.mobilePromptOverlay} ${this.state.mobilePromptVisible?r.mobilePromptOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:u("ui.userPrompt")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:r.mobilePromptBody,children:(()=>{const m=this.extractUserPrompts(o);return m.length===0?e.jsx("div",{className:r.mobilePromptEmpty,children:u("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:r.mobilePromptHeader,children:[e.jsxs("span",{className:r.mobilePromptCount,children:[m.length," ",u("ui.promptCountUnit")]}),e.jsx(E,{size:"small",icon:e.jsx(dt,{}),onClick:()=>this.handleExportPromptsTxt(m),children:u("ui.exportPromptsTxt")})]}),e.jsx("div",{className:r.mobilePromptList,children:m.map((p,f)=>e.jsxs("div",{className:r.mobilePromptItem,children:[p.timestamp&&e.jsx("div",{className:r.mobilePromptTimestamp,children:new Date(p.timestamp).toLocaleString()}),this.renderOriginalPrompt(p)]},f))})]})})()})]})]})]})}};me(q,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let we=q;export{we as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ap as o,aq as n}from"./mermaid.core-Iu-Haj2d.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-WL4C6EOR-D57kZtSM.js";import{_ as i}from"./mermaid.core-Iu-Haj2d.js";import"./chunk-FMBD7UC4-BsVETng4.js";import"./chunk-JSJVCQXG-ByEZLFF3.js";import"./chunk-55IACEB6-BpiK1KHs.js";import"./chunk-KX2RTZJC-DGedEdfQ.js";import"./AppHeader.module-S7b16Luh.js";import"./index-vXPJvGyq.js";var f={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{f as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-D57kZtSM.js";import{_ as i}from"./mermaid.core-Iu-Haj2d.js";import"./chunk-FMBD7UC4-BsVETng4.js";import"./chunk-JSJVCQXG-ByEZLFF3.js";import"./chunk-55IACEB6-BpiK1KHs.js";import"./chunk-KX2RTZJC-DGedEdfQ.js";import"./AppHeader.module-S7b16Luh.js";import"./index-vXPJvGyq.js";var f={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{f as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-D9OrCsW-.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-NQ4KR5QH-CVuE5E20.js";import{_ as i}from"./mermaid.core-Iu-Haj2d.js";import"./chunk-55IACEB6-BpiK1KHs.js";import"./chunk-KX2RTZJC-DGedEdfQ.js";import"./index-vXPJvGyq.js";import"./AppHeader.module-S7b16Luh.js";var u={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{u as diagram};
|