@tom2012/cc-web 1.5.89 → 1.5.90

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.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/backup/config.d.ts.map +1 -1
  3. package/backend/dist/backup/config.js +14 -3
  4. package/backend/dist/backup/config.js.map +1 -1
  5. package/backend/dist/backup/engine.d.ts +1 -1
  6. package/backend/dist/backup/engine.d.ts.map +1 -1
  7. package/backend/dist/backup/engine.js +12 -3
  8. package/backend/dist/backup/engine.js.map +1 -1
  9. package/backend/dist/backup/scheduler.d.ts.map +1 -1
  10. package/backend/dist/backup/scheduler.js +3 -1
  11. package/backend/dist/backup/scheduler.js.map +1 -1
  12. package/backend/dist/index.d.ts.map +1 -1
  13. package/backend/dist/index.js +6 -2
  14. package/backend/dist/index.js.map +1 -1
  15. package/backend/dist/memory-pool/templates.d.ts +4 -0
  16. package/backend/dist/memory-pool/templates.d.ts.map +1 -0
  17. package/backend/dist/memory-pool/templates.js +267 -0
  18. package/backend/dist/memory-pool/templates.js.map +1 -0
  19. package/backend/dist/notify-service.d.ts.map +1 -1
  20. package/backend/dist/notify-service.js +8 -3
  21. package/backend/dist/notify-service.js.map +1 -1
  22. package/backend/dist/plan-control/executor.d.ts.map +1 -1
  23. package/backend/dist/plan-control/executor.js +24 -5
  24. package/backend/dist/plan-control/executor.js.map +1 -1
  25. package/backend/dist/plan-control/templates.d.ts +3 -3
  26. package/backend/dist/plan-control/templates.d.ts.map +1 -1
  27. package/backend/dist/plan-control/templates.js +33 -2
  28. package/backend/dist/plan-control/templates.js.map +1 -1
  29. package/backend/dist/routes/auth.d.ts.map +1 -1
  30. package/backend/dist/routes/auth.js +14 -3
  31. package/backend/dist/routes/auth.js.map +1 -1
  32. package/backend/dist/routes/backup.d.ts.map +1 -1
  33. package/backend/dist/routes/backup.js +57 -3
  34. package/backend/dist/routes/backup.js.map +1 -1
  35. package/backend/dist/routes/filesystem.d.ts.map +1 -1
  36. package/backend/dist/routes/filesystem.js +2 -1
  37. package/backend/dist/routes/filesystem.js.map +1 -1
  38. package/backend/dist/routes/hooks.js +1 -1
  39. package/backend/dist/routes/hooks.js.map +1 -1
  40. package/backend/dist/routes/memory-pool.d.ts +3 -0
  41. package/backend/dist/routes/memory-pool.d.ts.map +1 -0
  42. package/backend/dist/routes/memory-pool.js +159 -0
  43. package/backend/dist/routes/memory-pool.js.map +1 -0
  44. package/backend/dist/routes/plugin-bridge.d.ts.map +1 -1
  45. package/backend/dist/routes/plugin-bridge.js +5 -0
  46. package/backend/dist/routes/plugin-bridge.js.map +1 -1
  47. package/backend/dist/routes/projects.d.ts.map +1 -1
  48. package/backend/dist/routes/projects.js +4 -0
  49. package/backend/dist/routes/projects.js.map +1 -1
  50. package/backend/dist/routes/share.d.ts.map +1 -1
  51. package/backend/dist/routes/share.js +12 -3
  52. package/backend/dist/routes/share.js.map +1 -1
  53. package/backend/dist/routes/shortcuts.d.ts.map +1 -1
  54. package/backend/dist/routes/shortcuts.js +10 -5
  55. package/backend/dist/routes/shortcuts.js.map +1 -1
  56. package/backend/dist/routes/skillhub.d.ts.map +1 -1
  57. package/backend/dist/routes/skillhub.js +6 -1
  58. package/backend/dist/routes/skillhub.js.map +1 -1
  59. package/backend/dist/routes/update.d.ts.map +1 -1
  60. package/backend/dist/routes/update.js +16 -9
  61. package/backend/dist/routes/update.js.map +1 -1
  62. package/backend/dist/terminal-manager.d.ts.map +1 -1
  63. package/backend/dist/terminal-manager.js +5 -2
  64. package/backend/dist/terminal-manager.js.map +1 -1
  65. package/frontend/dist/assets/{GraphPreview-CnQMmS_T.js → GraphPreview-CbixawCn.js} +2 -2
  66. package/frontend/dist/assets/{OfficePreview-Db27f2Es.js → OfficePreview-BKFpUTs8.js} +2 -2
  67. package/frontend/dist/assets/PlanPanel-bUu_sV4H.js +13 -0
  68. package/frontend/dist/assets/{ProjectPage-CNZLsKfo.js → ProjectPage-s1JC2yAP.js} +5 -5
  69. package/frontend/dist/assets/{SettingsPage-xrBDyeRc.js → SettingsPage-VWurD9vD.js} +2 -2
  70. package/frontend/dist/assets/{ShareViewPage-Cc9K_9iX.js → ShareViewPage-BzJceBPR.js} +1 -1
  71. package/frontend/dist/assets/{SkillHubPage-Cr0vqu4x.js → SkillHubPage-z6-QYbeA.js} +2 -2
  72. package/frontend/dist/assets/{bot-D_7Qr78H.js → bot-C6ta8gNS.js} +1 -1
  73. package/frontend/dist/assets/{chevron-down-DN5-GmAC.js → chevron-down-Qw7I16EM.js} +1 -1
  74. package/frontend/dist/assets/{download-Bi_5y42J.js → download-f-UhXlfC.js} +1 -1
  75. package/frontend/dist/assets/{index-DT0eASks.css → index-DI_KxA3y.css} +1 -1
  76. package/frontend/dist/assets/{index-BdDU5nq-.js → index-F8RufYqJ.js} +1 -1
  77. package/frontend/dist/assets/{index-DommEtbo.js → index-eauITBRu.js} +4 -4
  78. package/frontend/dist/assets/{jszip.min-PiLy6gEx.js → jszip.min-CNjQoxL5.js} +1 -1
  79. package/frontend/dist/assets/{maximize-2-DwXtOiRB.js → maximize-2-BKTJzQIz.js} +1 -1
  80. package/frontend/dist/assets/{save-sAn1Pu5b.js → save-y3-fzCMJ.js} +1 -1
  81. package/frontend/dist/assets/{user-hwSxpRKM.js → user-cRXoceLl.js} +1 -1
  82. package/frontend/dist/index.html +2 -2
  83. package/package.json +1 -1
  84. package/frontend/dist/assets/PlanPanel-6D-KtTiV.js +0 -13
@@ -1,13 +0,0 @@
1
- import{c as e,r as s,j as t,b3 as a,b4 as n,b5 as l,t as r,b6 as i,b7 as o,b8 as c,b9 as d,ba as h,B as x}from"./index-DommEtbo.js";import{Z as u,a as m,L as f,P as y,A as g}from"./ProjectPage-CNZLsKfo.js";import{M as b}from"./maximize-2-DwXtOiRB.js";import"./save-sAn1Pu5b.js";import"./download-Bi_5y42J.js";import"./chevron-down-DN5-GmAC.js";import"./bot-D_7Qr78H.js";import"./user-hwSxpRKM.js";
2
- /**
3
- * @license lucide-react v0.309.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */const p=e("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),j=e("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),k=e("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),v=e("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),w=140,N=36,C={pending:{fill:"#71717a20",stroke:"#71717a"},running:{fill:"#3b82f633",stroke:"#3b82f6"},success:{fill:"#22c55e26",stroke:"#22c55e"},failed:{fill:"#ef444426",stroke:"#ef4444"},blocked:{fill:"#eab30826",stroke:"#eab308"},skipped:{fill:"#71717a14",stroke:"#71717a"}},M={fill:"#71717a15",stroke:"#52525b"};
8
- /**
9
- * @license lucide-react v0.309.0 - ISC
10
- *
11
- * This source code is licensed under the ISC license.
12
- * See the LICENSE file in the root directory of this source tree.
13
- */function _({tree:e,currentLine:a}){const n=s.useRef(null),[l,r]=s.useState(1),[i,o]=s.useState({x:0,y:0}),[c,d]=s.useState(!1),[h,x]=s.useState({x:0,y:0}),[f,y]=s.useState(null),{layoutNodes:g,edges:p,bounds:j}=s.useMemo(()=>{const s=[],t=[];const a=function e(a,n,l,r){const i=[];let o=l;for(const c of a){const a=40+160*r,n={id:c.id,x:a,y:o,w:w,h:N,type:c.type,label:c.label,status:c.status,node_id:c.node_id,line:c.line,children:[]};if(c.children.length>0){const s=e(c.children,a,o+N+16,r+1);n.children=s.nodes,o=Math.max(o+N+16,o+N+16+s.height);for(const e of s.nodes)t.push({x1:n.x+70,y1:n.y+N,x2:e.x+70,y2:e.y,dashed:"call"===c.type})}else o+=52;i.push(n),s.push(n)}return{nodes:i,height:o-l}}(e,0,20,0);for(let e=1;e<a.nodes.length;e++){const s=a.nodes[e-1],n=a.nodes[e];if(s.x===n.x){const e=z(s);t.push({x1:s.x+70,y1:e,x2:n.x+70,y2:n.y})}}let n=1/0,l=1/0,r=-1/0,i=-1/0;for(const e of s)n=Math.min(n,e.x),l=Math.min(l,e.y),r=Math.max(r,e.x+e.w),i=Math.max(i,e.y+e.h);return{layoutNodes:s,edges:t,bounds:{minX:n,minY:l,maxX:r+40,maxY:i+20}}},[e]),k=s.useCallback(()=>{if(!n.current||0===g.length)return;const e=n.current.getBoundingClientRect(),s=j.maxX-j.minX,t=j.maxY-j.minY;if(0===s||0===t)return;const a=.9*Math.min(e.width/s,e.height/t,2);r(a),o({x:(e.width-s*a)/2-j.minX*a,y:(e.height-t*a)/2-j.minY*a})},[g,j]);s.useEffect(()=>{k()},[e,k]),s.useEffect(()=>{if(null===a)return;const e=g.find(e=>e.line===a);if(!e||!n.current)return;const s=n.current.getBoundingClientRect(),t=e.x+70,r=e.y+18;o({x:s.width/2-t*l,y:s.height/2-r*l})},[a,g,l]);const v=s.useCallback(e=>{e.preventDefault(),r(s=>Math.max(.2,Math.min(3,s+(e.deltaY>0?-.1:.1))))},[]),_=s.useCallback(e=>{0===e.button&&(d(!0),x({x:e.clientX-i.x,y:e.clientY-i.y}))},[i]),S=s.useCallback(e=>{c&&o({x:e.clientX-h.x,y:e.clientY-h.y})},[c,h]),P=s.useCallback(()=>d(!1),[]);return t.jsxs("div",{className:"relative w-full h-full",children:[t.jsxs("div",{className:"absolute top-1 right-1 z-10 flex gap-0.5",children:[t.jsx("button",{className:"p-1 rounded bg-muted/50 hover:bg-muted",onClick:()=>r(e=>Math.min(3,e+.2)),children:t.jsx(u,{className:"h-3 w-3"})}),t.jsx("button",{className:"p-1 rounded bg-muted/50 hover:bg-muted",onClick:()=>r(e=>Math.max(.2,e-.2)),children:t.jsx(m,{className:"h-3 w-3"})}),t.jsx("button",{className:"p-1 rounded bg-muted/50 hover:bg-muted",onClick:k,children:t.jsx(b,{className:"h-3 w-3"})})]}),t.jsxs("svg",{ref:n,className:"w-full h-full",onWheel:v,onMouseDown:_,onMouseMove:S,onMouseUp:P,onMouseLeave:P,style:{cursor:c?"grabbing":"grab"},children:[t.jsx("defs",{children:t.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:t.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:"#71717a"})})}),t.jsxs("g",{transform:`translate(${i.x},${i.y}) scale(${l})`,children:[p.map((e,s)=>t.jsx("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:"#71717a",strokeWidth:1,strokeDasharray:e.dashed?"4,2":void 0,markerEnd:"url(#arrow)"},`e${s}`)),g.map(e=>{const s=C[e.status??""]??M,n=a===e.line;return t.jsxs("g",{onClick:()=>y(e),style:{cursor:"pointer"},children:[t.jsx("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:6,fill:s.fill,stroke:n?"#60a5fa":s.stroke,strokeWidth:n?2:1,strokeDasharray:"skipped"===e.status?"4,2":void 0}),"running"===e.status&&t.jsx("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:6,fill:"none",stroke:"#3b82f6",strokeWidth:2,opacity:.5,children:t.jsx("animate",{attributeName:"opacity",values:"0.5;0;0.5",dur:"2s",repeatCount:"indefinite"})}),t.jsx("text",{x:e.x+6,y:e.y+13,fontSize:9,fill:"#a1a1aa",fontFamily:"monospace",children:e.type}),t.jsx("text",{x:e.x+6,y:e.y+26,fontSize:10,fill:"#e4e4e7",clipPath:"inset(0 0 0 0)",children:e.label.length>16?e.label.slice(0,16)+"…":e.label}),e.node_id&&t.jsxs("text",{x:e.x+e.w-4,y:e.y+10,fontSize:7,fill:"#71717a",textAnchor:"end",children:["#",e.node_id]})]},e.id)})]})]}),f&&t.jsxs("div",{className:"absolute bottom-2 left-2 right-2 bg-background/95 border border-border rounded-lg p-3 text-xs shadow-lg z-20",onClick:e=>e.stopPropagation(),children:[t.jsxs("div",{className:"flex justify-between items-start mb-1",children:[t.jsxs("span",{className:"font-mono text-muted-foreground",children:[f.type," L",f.line]}),t.jsx("button",{className:"text-muted-foreground hover:text-foreground",onClick:()=>y(null),children:"✕"})]}),t.jsx("div",{className:"text-foreground mb-1",children:f.label}),f.status&&t.jsxs("div",{className:"text-muted-foreground",children:["状态: ",f.status]}),f.node_id&&t.jsxs("div",{className:"text-muted-foreground",children:["节点 ID: #",f.node_id]})]})]})}function z(e){return 0===e.children.length?e.y+e.h:Math.max(e.y+e.h,...e.children.map(z))}function S({projectId:e,planStatus:u,planNodeUpdate:m,planReplan:b}){const[w,N]=s.useState(null),[C,M]=s.useState(null),[z,S]=s.useState(null),[L,Y]=s.useState(!1);s.useEffect(()=>{let s=!1;return(async()=>{try{const t=await a(e);if(s||N(t),t.hasMainPc){const t=await n(e);s||S(t.tree)}}catch{}})(),()=>{s=!0}},[e]),s.useEffect(()=>{m&&S(e=>e?P(e,m.node_id,m.status):e)},[m]),s.useEffect(()=>{u&&N(e=>e?{...e,state:e.state?{...e.state,...u}:{status:u.status,current_line:u.current_line,executed_tasks:u.executed_tasks,estimated_tasks:u.estimated_tasks}}:e)},[u]),s.useEffect(()=>{b&&n(e).then(e=>S(e.tree)).catch(()=>{})},[b,e]);const X=s.useCallback(async()=>{Y(!0);try{await l(e);const s=await a(e);N(s),r.success("Plan Control 已初始化")}catch(s){r.error(s.message)}finally{Y(!1)}},[e]),E=s.useCallback(async()=>{Y(!0);try{const s=await i(e);if(M(s),s.valid){r.success("语法检查通过");const s=await n(e);S(s.tree)}else r.error(`${s.errors.length} 个语法错误`)}catch(s){r.error(s.message)}finally{Y(!1)}},[e]),D=s.useCallback(async()=>{try{await o(e);const s=await a(e);N(s)}catch(s){r.error(s.message)}},[e]),R=s.useCallback(async()=>{try{await c(e)}catch(s){r.error(s.message)}},[e]),W=s.useCallback(async()=>{try{await d(e);const s=await a(e);N(s)}catch(s){r.error(s.message)}},[e]),$=s.useCallback(async()=>{try{await h(e)}catch(s){r.error(s.message)}},[e]),B=null==w?void 0:w.state,q=(null==B?void 0:B.status)??((null==w?void 0:w.hasMainPc)?"ready":(null==w?void 0:w.initialized)?"editing":"none");return t.jsxs("div",{className:"h-full flex flex-col",children:[t.jsxs("div",{className:"flex-none h-8 flex items-center gap-1 px-2 border-b border-border text-xs",children:["none"===q&&t.jsxs(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:X,disabled:L,children:[L?t.jsx(f,{className:"h-3 w-3 animate-spin mr-1"}):null,"初始化"]}),("editing"===q||"ready"===q)&&t.jsxs(t.Fragment,{children:[t.jsxs(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:E,disabled:L,children:[L?t.jsx(f,{className:"h-3 w-3 animate-spin mr-1"}):t.jsx(p,{className:"h-3 w-3 mr-1"}),"检查"]}),(null==C?void 0:C.valid)&&t.jsxs(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:D,children:[t.jsx(y,{className:"h-3 w-3 mr-1"}),"启动"]})]}),("running"===q||"waiting"===q)&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-muted-foreground",children:["已完成 ",(null==B?void 0:B.executed_tasks)??0,"(≥",(null==B?void 0:B.estimated_tasks)??0,")"]}),t.jsx("div",{className:"flex-1"}),t.jsx(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:R,children:t.jsx(j,{className:"h-3 w-3"})}),t.jsx(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:$,children:t.jsx(v,{className:"h-3 w-3"})})]}),("paused"===q||"stopped"===q)&&t.jsxs(x,{size:"sm",variant:"ghost",className:"h-6 text-xs",onClick:W,children:[t.jsx(k,{className:"h-3 w-3 mr-1"}),"继续"]}),"completed"===q&&t.jsxs("span",{className:"text-green-500 flex items-center gap-1",children:[t.jsx(p,{className:"h-3 w-3"})," 已完成"]})]}),C&&!C.valid&&t.jsx("div",{className:"flex-none max-h-24 overflow-y-auto px-2 py-1 border-b border-border bg-red-500/5",children:C.errors.map((e,s)=>t.jsxs("div",{className:"text-[10px] text-red-400 flex gap-1",children:[t.jsx(g,{className:"h-3 w-3 flex-shrink-0 mt-0.5"}),t.jsxs("span",{children:["第",e.line,"行: ",e.message]})]},s))}),t.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:z?t.jsx(_,{tree:z,currentLine:(null==B?void 0:B.current_line)??null}):t.jsx("div",{className:"flex items-center justify-center h-full text-xs text-muted-foreground",children:(null==w?void 0:w.initialized)?(null==w?void 0:w.hasMainPc)?'点击"检查"查看任务树':"等待 AI 编写计划...":'点击"初始化"开始'})})]})}function P(e,s,t){return e.map(e=>e.node_id===s?{...e,status:t}:e.children.length>0?{...e,children:P(e.children,s,t)}:e)}export{S as PlanPanel};