zen-gitsync 2.12.3 → 2.12.5
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/LICENSE +190 -190
- package/package.json +17 -4
- package/scripts/README_COLOR_CONVERTER.md +196 -196
- package/scripts/README_FONTSIZE_CONVERTER.md +278 -278
- package/scripts/README_SPACING_CONVERTER.md +126 -126
- package/scripts/README_STYLE_VARS.md +180 -180
- package/src/ui/public/assets/EditorView-DDyMmxPI.js +0 -0
- package/src/ui/public/assets/EditorView-DK-Xgt7r.css +1 -0
- package/src/ui/public/assets/SourceMapView-DakscAmd.js +3 -0
- package/src/ui/public/assets/{css.worker-Wv5dxAWO.js → css.worker-CvXBzhp8.js} +1 -1
- package/src/ui/public/assets/{html.worker-CQP8QQsS.js → html.worker-BO6WuOEO.js} +1 -1
- package/src/ui/public/assets/index-CPUqt5Ue.js +73 -0
- package/src/ui/public/assets/index-a-r8YYZJ.css +1 -0
- package/src/ui/public/assets/{json.worker-DzV-CpCQ.js → json.worker-BkJRGcCJ.js} +1 -1
- package/src/ui/public/assets/{ts.worker-METxwbDZ.js → ts.worker-B0J26iPs.js} +31 -16
- package/src/ui/public/assets/{vendor-DITsiaGj.js → vendor-BMFU1ekz.js} +254 -234
- package/src/ui/public/assets/vendor-BPPhhD0O.css +1 -0
- package/src/ui/public/favicon.svg +75 -75
- package/src/ui/public/index.html +22 -22
- package/src/ui/public/logo.svg +74 -74
- package/src/ui/server/routes/config.js +46 -11
- package/src/ui/public/assets/EditorView-CbqSI9nw.css +0 -1
- package/src/ui/public/assets/EditorView-GS5cmh99.js +0 -21
- package/src/ui/public/assets/SourceMapView-_YRtzmZZ.js +0 -3
- package/src/ui/public/assets/index-ML5Y-5lO.css +0 -1
- package/src/ui/public/assets/index-yky0Sd13.js +0 -73
- package/src/ui/public/assets/vendor-q83wvJns.css +0 -1
- package/src/ui/server/.claude/codediff.txt +0 -6
- /package/src/ui/public/assets/{editor.worker-Bd9IXS8d.js → editor.worker-Cn2oRESe.js} +0 -0
- /package/src/ui/public/assets/{rolldown-runtime-BM3Ffeng.js → rolldown-runtime-CMxvf4Kt.js} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ai as t,Bt as n,Ci as r,Gt as i,Ht as a,Jr as o,Kt as s,Mi as c,Ni as l,Oi as u,Qr as d,Ti as f,Un as ee,Ut as te,Vt as ne,Wt as re,Xr as ie,Yr as p,_i as m,ci as h,ei as g,hi as ae,ii as _,ji as v,ki as oe,mi as se,oi as ce,pi as y,qt as le,ri as b,si as x,sn as ue,t as de,ti as S,ui as C,vt as fe,wi as w,yi as T,zt as E}from"./vendor-DITsiaGj.js";import{a as D,i as pe,n as me,o as O}from"./index-yky0Sd13.js";var he=e(E(),1),ge={class:`source-map-view`},_e={class:`sm-toolbar`},ve={class:`sm-toolbar-left`},ye={class:`sm-title`},be={class:`sm-toolbar-center`},xe=[`placeholder`,`disabled`],Se=[`disabled`],Ce={class:`sm-toolbar-right`},we={class:`sm-body`},Te={class:`sm-panel-header sm-panel-header--tabs`},Ee={key:0,class:`sm-badge`},De={class:`sm-panel-body sm-file-tree`},Oe=[`onClick`],ke={key:1,class:`sm-tree-arrow-spacer`},Ae={key:2,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},je=[`xlink:href`],Me={key:3,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},Ne=[`xlink:href`],Pe=[`title`],Fe={key:1,class:`sm-tree-empty`},Ie={class:`sm-panel-body sm-outline-body`},Le={class:`sm-badge`,style:{"margin-left":`auto`}},Re=[`onClick`],ze=[`title`],Be={key:0,class:`sm-outline-desc`},Ve={key:1,class:`sm-tree-empty`},He={class:`sm-panel sm-panel-graph`},Ue={key:0,class:`sm-project-info`},We={class:`sm-lang-badge`},Ge={class:`sm-summary-text`},Ke={class:`sm-graph-container`},qe={class:`sm-layout-btn-wrap`},Je=[`disabled`],Ye=[`title`],Xe={class:`sm-fn-label`},Ze={key:0,class:`sm-fn-desc`},Qe={key:0,class:`sm-graph-empty`},$e={viewBox:`0 0 24 24`,width:`48`,height:`48`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,style:{opacity:`0.3`}},et={key:1,class:`sm-graph-loading`},tt={class:`sm-log-header`},nt={key:0,class:`sm-log-indicator`},rt={class:`sm-log-body`,ref:`logBodyRef`},it={key:0,class:`sm-empty`},at={class:`sm-panel-header`},ot={key:0,class:`sm-badge sm-badge-amber`},st={key:0,class:`sm-node-detail`},ct={class:`sm-node-name`},lt={class:`sm-node-file`},ut={key:0},dt={key:0,class:`sm-node-desc`},ft={class:`sm-panel-body sm-source-body`},pt={key:0,class:`sm-source-overlay`},mt={key:1,class:`sm-source-overlay sm-source-placeholder`},k=D(C({__name:`SourceMapView`,setup(e){let C=pe(),E=u(C.currentDirectory||``),D=u(`idle`),k=u([]),ht=0,A=u(null),j=u(null),M=u(`files`),N=u(``),P=u(``),F=u(!1),I=u([]),L=u(new Set),R=u({files:!0,graph:!0,source:!0}),z=u(!1),gt=u(220),B=u(360),V=u(140),H=null,U=0,_t=0,W=0;function G(e,t){H=e,U=t.clientX,_t=t.clientY,W=e===`files`?gt.value:e===`source`?B.value:V.value,document.addEventListener(`mousemove`,vt),document.addEventListener(`mouseup`,K),t.preventDefault()}function vt(e){H&&(H===`files`?gt.value=Math.max(120,Math.min(480,W+e.clientX-U)):H===`source`?B.value=Math.max(200,Math.min(700,W+U-e.clientX)):V.value=Math.max(60,Math.min(500,W+_t-e.clientY)))}function K(){H=null,document.removeEventListener(`mousemove`,vt),document.removeEventListener(`mouseup`,K)}let q=u(null),J=oe(null),{fitView:yt,setNodes:Y,setEdges:bt,getNodes:xt,getEdges:St,updateNodeInternals:Ct}=le(),X=g(()=>D.value===`scanning`||D.value===`analyzing`),Z=g(()=>A.value?.nodes.find(e=>e.id===j.value)??null),wt=g(()=>{if(!A.value)return[];let e=new Map;for(let t of A.value.nodes){let n=t.subsystem??`__default__`;if(!e.has(n)){let r=A.value.subsystems?.find(e=>e.name===n);e.set(n,{displayName:r?.displayName||t.subsystem||O(`@SRCMAP:默认`),color:t.subsystemColor||$[0],nodes:[]})}e.get(n).nodes.push(t)}return[...e.entries()].map(([,e])=>e)});function Q(e,t=`info`){k.value.push({id:++ht,message:e,type:t,timestamp:Date.now()}),k.value.length>200&&k.value.splice(0,k.value.length-200)}function Tt(e){let t={name:``,path:``,kind:`dir`,children:[],childMap:new Map};for(let n of e){let e=n.trim().split(`/`).filter(Boolean),r=t,i=``;for(let t=0;t<e.length;t++){let n=e[t];i=i?`${i}/${n}`:n;let a=t===e.length-1,o=r.childMap.get(n);o||(o={name:n,path:i,kind:a?`file`:`dir`,children:[],childMap:new Map},r.childMap.set(n,o),r.children.push(o)),r=o}}let n=e=>{e.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`dir`?-1:1),e.forEach(e=>{e.kind===`dir`&&n(e.children)})};return n(t.children),t.children}let $=[`#f59e0b`,`#3b82f6`,`#10b981`,`#8b5cf6`];function Et(e){return e.subsystemColor?e.subsystemColor:e.subsystemIndex===void 0?e.importance===`high`?`#f59e0b`:e.importance===`low`?`#94a3b8`:`#3b82f6`:$[e.subsystemIndex%$.length]}function Dt(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`javascript`,vue:`html`,svelte:`html`,html:`html`,py:`python`,java:`java`,go:`go`,rs:`rust`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,c:`c`,h:`c`,hpp:`cpp`,cs:`csharp`,rb:`ruby`,php:`php`,swift:`swift`,kt:`kotlin`,sh:`shell`,bash:`shell`,json:`json`,yaml:`yaml`,yml:`yaml`,md:`markdown`,css:`css`,scss:`scss`,less:`less`,sql:`sql`}[e.split(`.`).pop()?.toLowerCase()||``]||`plaintext`}function Ot(){if(!q.value||J.value)return;let e=document.documentElement.getAttribute(`data-theme`)===`dark`;J.value=fe.create(q.value,{value:``,language:`plaintext`,theme:e?`vs-dark`:`vs`,readOnly:!0,fontSize:12,lineHeight:19,fontFamily:`'JetBrains Mono', 'Fira Code', Consolas, monospace`,minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:`off`,padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6}})}function kt(e,t){let n={};t.forEach(e=>{n[e.source]||(n[e.source]=[]),n[e.source].push(e.target)});let r=new Map;e.forEach(e=>{let t=e.subsystem??`__default`;r.has(t)||r.set(t,[]),r.get(t).push(e)});let i=[],a=0;for(let[,e]of r){let t=new Set(e.map(e=>e.id)),r={},o=e.length?[e[0].id]:[];for(o[0]&&(r[o[0]]=0);o.length;){let e=o.shift();(n[e]||[]).filter(e=>t.has(e)).forEach(t=>{r[t]===void 0&&(r[t]=(r[e]??0)+1,o.push(t))})}let s={};e.forEach(e=>{let t=r[e.id]??0;s[t]=(s[t]||0)+1});let c={};e.forEach(e=>{let t=r[e.id]??0;c[t]=(c[t]??-1)+1;let n=c[t],o=s[t]??1,l=a*600+n*220-(o-1)*220/2,u=t*110,d=Et(e);i.push({id:e.id,type:`default`,position:{x:l,y:u},label:e.label,data:{...e},style:{background:`#1e293b`,border:`2px solid ${d}`,borderRadius:`8px`,color:`#e2e8f0`,fontSize:`12px`,padding:`8px 12px`,minWidth:`140px`,maxWidth:`200px`,cursor:`pointer`}})}),a++}return{flowNodes:i,flowEdges:t.map((e,t)=>({id:`e_${t}_${e.source}_${e.target}`,source:e.source,target:e.target,type:`smoothstep`,animated:!1,style:{stroke:`#475569`,strokeWidth:1.5},markerEnd:{type:te.ArrowClosed,color:`#475569`}}))}}async function At(){let e=xt.value,t=St.value;if(e.length!==0){z.value=!0;try{await y(),await new Promise(e=>requestAnimationFrame(()=>e())),Ct(e.map(e=>e.id)),await new Promise(e=>requestAnimationFrame(()=>e()));let n=new Map;e.forEach(e=>{let t=e.data?.subsystem??`__default__`;n.has(t)||n.set(t,[]),n.get(t).push(e)});let r=new Map,i=0;for(let[,e]of n){let n=new he.default.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:`TB`,nodesep:55,ranksep:75,marginx:40,marginy:40});let a=new Set(e.map(e=>e.id));e.forEach(e=>{let t=190,r=e.data?.description?68:48,i=document.querySelector(`.vue-flow__node[data-id="${e.id}"]`);i&&i.offsetWidth>0&&(t=i.offsetWidth,r=i.offsetHeight),n.setNode(e.id,{width:t,height:r})}),t.forEach(e=>{a.has(e.source)&&a.has(e.target)&&n.setEdge(e.source,e.target)}),he.default.layout(n);let o=0;e.forEach(e=>{let t=n.node(e.id);t&&(r.set(e.id,{x:i+t.x-t.width/2,y:t.y-t.height/2}),o=Math.max(o,t.x+t.width/2))}),i+=o+120}Y(e.map(e=>({...e,position:r.get(e.id)??e.position}))),await y(),yt({padding:.18})}finally{z.value=!1}}}async function jt(){if(!E.value.trim()){ue.warning(O(`@SRCMAP:请先输入项目路径`));return}if(!X.value){k.value=[],A.value=null,j.value=null,N.value=``,P.value=``,Y([]),bt([]),D.value=`scanning`,Q(O(`@SRCMAP:开始分析项目...`),`info`);try{let e=await fetch(`/api/code-analysis/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:E.value})});if(!e.ok){let t=await e.json().catch(()=>({error:`请求失败`}));throw Error(t.error||`HTTP ${e.status}`)}let t=e.body.getReader(),n=new TextDecoder,r=``;D.value=`analyzing`;let i=``,a=[];for(;;){let{done:e,value:o}=await t.read();if(e)break;r+=n.decode(o,{stream:!0});let s=r.split(`
|
|
2
|
-
`);r=s.pop()??``;for(let e of s)if(e.startsWith(`event:`))i=e.slice(6).trim(),a=[];else if(e.startsWith(`data:`))a.push(e.slice(5).trim());else if(e===``){if(i&&a.length){let e=a.join(``);try{let t=JSON.parse(e);Mt(i,t)}catch{}}i=``,a=[]}}}catch(e){Q(`${O(`@SRCMAP:分析失败`)}: ${e.message}`,`error`),D.value=`error`}}}function Mt(e,t){if(e===`log`)Q(t.message,t.type||`info`);else if(e===`files`)I.value=Tt(t.files||[]),I.value.forEach(e=>{e.kind===`dir`&&L.value.add(e.path)});else if(e===`result`){A.value={language:t.language||``,entryFile:t.entryFile||``,entryFunction:t.entryFunction||``,nodes:Array.isArray(t.nodes)?t.nodes:[],edges:Array.isArray(t.edges)?t.edges:[],techStack:Array.isArray(t.techStack)?t.techStack:[],summary:t.summary||``,allFiles:Array.isArray(t.allFiles)?t.allFiles:[],codeFiles:Array.isArray(t.codeFiles)?t.codeFiles:[],subsystems:Array.isArray(t.subsystems)?t.subsystems:void 0};let{flowNodes:e,flowEdges:n}=kt(A.value.nodes,A.value.edges);Y(e),bt(n),y(()=>At())}else e===`done`&&(t.error?(Q(`${O(`@SRCMAP:分析失败`)}: ${t.error}`,`error`),D.value=`error`):D.value=`done`)}async function Nt(e){if(!(!e||F.value)&&P.value!==e){F.value=!0,P.value=e,N.value=``;try{let t=await(await fetch(`/api/code-analysis/file-content?path=${encodeURIComponent(E.value)}&file=${encodeURIComponent(e)}`)).json();if(t.error)throw Error(t.error);N.value=t.content||``}catch(e){N.value=`// ${O(`@SRCMAP:加载失败`)}: ${e.message}`}finally{F.value=!1}}}function Pt(e){let t=e.node.data;j.value=t.id,t.file&&Nt(t.file)}function Ft(e){L.value.has(e)?L.value.delete(e):L.value.add(e)}let It=g(()=>{let e=[];function t(n,r){for(let i of n){let n=L.value.has(i.path);e.push({name:i.name,path:i.path,kind:i.kind,depth:r,expanded:n}),i.kind===`dir`&&n&&t(i.children,r+1)}}return t(I.value,0),e});return r(()=>C.currentDirectory,e=>{e&&!E.value&&(E.value=e)}),r([N,P],([e,t])=>{let n=J.value;if(!n)return;let r=Dt(t||``),i=n.getModel(),a=fe.createModel(e||``,r);n.setModel(a),i?.dispose(),n.setScrollPosition({scrollTop:0,scrollLeft:0})}),ae(()=>{Ot(),!E.value&&C.currentDirectory&&(E.value=C.currentDirectory)}),se(()=>{J.value?.getModel()?.dispose(),J.value?.dispose(),K()}),(e,r)=>{let u=ee;return m(),_(`div`,ge,[S(`div`,_e,[S(`div`,ve,[r[9]||=S(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,class:`sm-icon-map`},[S(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`}),S(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`}),S(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`})],-1),S(`span`,ye,l(t(O)(`@SRCMAP:源码地图`)),1)]),S(`div`,be,[f(S(`input`,{"onUpdate:modelValue":r[0]||=e=>E.value=e,class:`sm-path-input`,placeholder:t(O)(`@SRCMAP:输入项目目录路径`),disabled:X.value,onKeydown:ie(jt,[`enter`])},null,40,xe),[[o,E.value]]),S(`button`,{class:`sm-btn sm-btn-primary`,disabled:X.value,onClick:jt},[X.value?(m(),_(d,{key:0},[r[10]||=S(`span`,{class:`sm-spinner`},null,-1),x(` `+l(t(O)(`@SRCMAP:分析中...`)),1)],64)):(m(),_(d,{key:1},[x(l(D.value===`done`?t(O)(`@SRCMAP:重新分析`):t(O)(`@SRCMAP:开始分析`)),1)],64))],8,Se)]),S(`div`,Ce,[h(u,{content:t(O)(`@SRCMAP:文件列表`),placement:`bottom`},{default:w(()=>[S(`button`,{class:v([`sm-panel-btn`,{active:R.value.files}]),onClick:r[1]||=e=>R.value.files=!R.value.files},r[11]||=[S(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1)],2)]),_:1},8,[`content`]),h(u,{content:t(O)(`@SRCMAP:调用图`),placement:`bottom`},{default:w(()=>[S(`button`,{class:v([`sm-panel-btn`,{active:R.value.graph}]),onClick:r[2]||=e=>R.value.graph=!R.value.graph},r[12]||=[S(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`circle`,{cx:`12`,cy:`12`,r:`3`}),S(`circle`,{cx:`3`,cy:`6`,r:`2`}),S(`circle`,{cx:`21`,cy:`6`,r:`2`}),S(`circle`,{cx:`3`,cy:`18`,r:`2`}),S(`circle`,{cx:`21`,cy:`18`,r:`2`}),S(`line`,{x1:`5`,y1:`6`,x2:`9`,y2:`11`}),S(`line`,{x1:`19`,y1:`6`,x2:`15`,y2:`11`}),S(`line`,{x1:`5`,y1:`18`,x2:`9`,y2:`13`}),S(`line`,{x1:`19`,y1:`18`,x2:`15`,y2:`13`})],-1)],2)]),_:1},8,[`content`]),h(u,{content:t(O)(`@SRCMAP:源码面板`),placement:`bottom`},{default:w(()=>[S(`button`,{class:v([`sm-panel-btn`,{active:R.value.source}]),onClick:r[3]||=e=>R.value.source=!R.value.source},r[13]||=[S(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`polyline`,{points:`16 18 22 12 16 6`}),S(`polyline`,{points:`8 6 2 12 8 18`})],-1)],2)]),_:1},8,[`content`])])]),S(`div`,we,[f(S(`div`,{class:`sm-panel sm-panel-files`,style:c({width:gt.value+`px`})},[S(`div`,Te,[S(`button`,{class:v([`sm-tab-btn`,{active:M.value===`files`}]),onClick:r[4]||=e=>M.value=`files`},[r[14]||=S(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1),x(` `+l(t(O)(`@SRCMAP:文件列表`))+` `,1),A.value?(m(),_(`span`,Ee,l(A.value.allFiles.length),1)):b(``,!0)],2),S(`button`,{class:v([`sm-tab-btn`,{active:M.value===`outline`}]),onClick:r[5]||=e=>M.value=`outline`},[r[15]||=ce(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-39b8daed><line x1="8" y1="6" x2="21" y2="6" data-v-39b8daed></line><line x1="8" y1="12" x2="21" y2="12" data-v-39b8daed></line><line x1="8" y1="18" x2="21" y2="18" data-v-39b8daed></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-39b8daed></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-39b8daed></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-39b8daed></line></svg>`,1),x(` `+l(t(O)(`@SRCMAP:大纲`)),1)],2)]),f(S(`div`,De,[It.value.length>0?(m(!0),_(d,{key:0},T(It.value,e=>(m(),_(`div`,{key:e.path,class:v([`sm-tree-node`,{"sm-tree-node--dir":e.kind===`dir`,"sm-tree-node--active":e.kind===`file`&&P.value===e.path}]),style:c({paddingLeft:10+e.depth*14+`px`}),onClick:t=>e.kind===`dir`?Ft(e.path):Nt(e.path)},[e.kind===`dir`?(m(),_(`span`,{key:0,class:v([`sm-tree-arrow`,{expanded:e.expanded}])},r[16]||=[S(`svg`,{viewBox:`0 0 24 24`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`polyline`,{points:`9 18 15 12 9 6`})],-1)],2)):(m(),_(`span`,ke)),e.kind===`dir`?(m(),_(`svg`,Ae,[S(`use`,{"xlink:href":`#${t(me)(e.name)||`icon-folder`}`},null,8,je)])):(m(),_(`svg`,Me,[S(`use`,{"xlink:href":`#${t(me)(e.name)}`},null,8,Ne)])),S(`span`,{class:`sm-tree-name`,title:e.path},l(e.name),9,Pe)],14,Oe))),128)):(m(),_(`div`,Fe,l(t(O)(`@SRCMAP:暂无文件,请先开始分析`)),1))],512),[[p,M.value===`files`]]),f(S(`div`,Ie,[wt.value.length>0?(m(!0),_(d,{key:0},T(wt.value,e=>(m(),_(`div`,{key:e.displayName,class:`sm-outline-group`},[S(`div`,{class:`sm-outline-group-header`,style:c({color:e.color})},[r[17]||=S(`svg`,{viewBox:`0 0 24 24`,width:`8`,height:`8`,fill:`currentColor`},[S(`circle`,{cx:`12`,cy:`12`,r:`6`})],-1),x(` `+l(e.displayName)+` `,1),S(`span`,Le,l(e.nodes.length),1)],4),(m(!0),_(d,null,T(e.nodes,t=>(m(),_(`div`,{key:t.id,class:v([`sm-outline-node`,{"sm-outline-node--active":j.value===t.id}]),onClick:e=>{j.value=t.id,t.file&&Nt(t.file)}},[S(`span`,{class:`sm-outline-dot`,style:c({background:e.color})},null,4),S(`span`,{class:`sm-outline-label`,title:t.file||t.label},l(t.label),9,ze),t.description?(m(),_(`span`,Be,l(t.description.length>18?t.description.slice(0,18)+`…`:t.description),1)):b(``,!0)],10,Re))),128))]))),128)):(m(),_(`div`,Ve,l(t(O)(`@SRCMAP:暂无分析结果`)),1))],512),[[p,M.value===`outline`]])],4),[[p,R.value.files]]),f(S(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:r[6]||=e=>G(`files`,e)},null,544),[[p,R.value.files&&R.value.graph]]),f(S(`div`,He,[A.value?(m(),_(`div`,Ue,[S(`span`,We,l(A.value.language),1),A.value.subsystems&&A.value.subsystems.length>1?(m(!0),_(d,{key:0},T(A.value.subsystems,e=>(m(),_(`span`,{key:e.name,class:`sm-subsystem-tag`,style:c({borderColor:e.color,color:e.color})},`● `+l(e.displayName||e.name),5))),128)):(m(!0),_(d,{key:1},T(A.value.techStack.slice(0,4),e=>(m(),_(`span`,{key:e,class:`sm-tech-tag`},l(e),1))),128)),S(`span`,Ge,l(A.value.summary),1)])):b(``,!0),S(`div`,Ke,[S(`div`,qe,[S(`button`,{class:`sm-layout-btn`,disabled:z.value||!A.value,onClick:At},[r[18]||=ce(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-39b8daed><rect x="3" y="3" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-39b8daed></rect></svg>`,1),x(` `+l(z.value?t(O)(`@SRCMAP:布局中...`):t(O)(`@SRCMAP:优化布局`)),1)],8,Je)]),h(t(i),{class:`sm-vue-flow`,"default-viewport":{zoom:1},"min-zoom":.2,"max-zoom":4,"fit-view-on-init":``,onNodeClick:Pt},{"node-default":w(({data:e,label:n})=>[h(t(s),{type:`target`,position:t(re).Top},null,8,[`position`]),S(`div`,{class:`sm-fn-inner`,title:`${n}${e?.description?`
|
|
3
|
-
`+e.description:``}`},[S(`div`,Xe,l(n),1),e?.description?(m(),_(`div`,Ze,l(e.description.length>22?e.description.slice(0,22)+`…`:e.description),1)):b(``,!0)],8,Ye),h(t(s),{type:`source`,position:t(re).Bottom},null,8,[`position`])]),default:w(()=>[h(t(a),{variant:t(ne).Dots,gap:20,size:1,"pattern-color":`#334155`},null,8,[`variant`]),h(t(n)),h(t(de),{"node-color":`#3b82f6`})]),_:1}),!A.value&&!X.value?(m(),_(`div`,Qe,[(m(),_(`svg`,$e,r[19]||=[S(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`},null,-1),S(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`},null,-1),S(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`},null,-1)])),S(`p`,null,l(t(O)(`@SRCMAP:输入项目路径后点击开始分析`)),1)])):b(``,!0),X.value&&!A.value?(m(),_(`div`,et,[r[20]||=S(`span`,{class:`sm-spinner sm-spinner-lg`},null,-1),S(`p`,null,l(t(O)(`@SRCMAP:AI 正在分析项目结构...`)),1)])):b(``,!0)]),S(`div`,{class:`sm-resizer sm-resizer-h`,onMousedown:r[7]||=e=>G(`log`,e)},null,32),S(`div`,{class:`sm-log-panel`,style:c({height:V.value+`px`})},[S(`div`,tt,[r[21]||=S(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`polyline`,{points:`4 17 10 11 4 5`}),S(`line`,{x1:`12`,y1:`19`,x2:`20`,y2:`19`})],-1),x(` `+l(t(O)(`@SRCMAP:Agent 日志`))+` `,1),X.value?(m(),_(`span`,nt)):b(``,!0)]),S(`div`,rt,[(m(!0),_(d,null,T(k.value.slice(-50),e=>(m(),_(`div`,{key:e.id,class:v([`sm-log-entry`,`sm-log-entry--${e.type}`])},l(e.message),3))),128)),k.value.length===0?(m(),_(`div`,it,l(t(O)(`@SRCMAP:等待开始分析`)),1)):b(``,!0)],512)],4)],512),[[p,R.value.graph]]),f(S(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:r[8]||=e=>G(`source`,e)},null,544),[[p,R.value.graph&&R.value.source]]),f(S(`div`,{class:`sm-panel sm-panel-source`,style:c({width:B.value+`px`})},[S(`div`,at,[r[22]||=S(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[S(`polyline`,{points:`16 18 22 12 16 6`}),S(`polyline`,{points:`8 6 2 12 8 18`})],-1),x(` `+l(P.value||t(O)(`@SRCMAP:源码面板`))+` `,1),Z.value?(m(),_(`span`,ot,l(Z.value.label),1)):b(``,!0)]),Z.value?(m(),_(`div`,st,[S(`div`,ct,l(Z.value.label),1),S(`div`,lt,[x(l(Z.value.file),1),Z.value.line?(m(),_(`span`,ut,` :`+l(Z.value.line),1)):b(``,!0)]),Z.value.description?(m(),_(`div`,dt,l(Z.value.description),1)):b(``,!0)])):b(``,!0),S(`div`,ft,[F.value?(m(),_(`div`,pt,r[23]||=[S(`span`,{class:`sm-spinner`},null,-1)])):b(``,!0),!F.value&&!N.value?(m(),_(`div`,mt,l(t(O)(`@SRCMAP:点击调用图中的节点查看源码`)),1)):b(``,!0),S(`div`,{ref_key:`monacoContainerRef`,ref:q,class:`sm-monaco-container`},null,512)])],4),[[p,R.value.source]])])])}}}),[[`__scopeId`,`data-v-39b8daed`]]);export{k as default};
|