@tom2012/cc-web 1.5.41 → 1.5.42

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 (35) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/chat-process-manager.d.ts +2 -0
  3. package/backend/dist/chat-process-manager.d.ts.map +1 -1
  4. package/backend/dist/chat-process-manager.js +9 -0
  5. package/backend/dist/chat-process-manager.js.map +1 -1
  6. package/backend/dist/config.d.ts.map +1 -1
  7. package/backend/dist/config.js +14 -3
  8. package/backend/dist/config.js.map +1 -1
  9. package/backend/dist/index.d.ts.map +1 -1
  10. package/backend/dist/index.js +1 -0
  11. package/backend/dist/index.js.map +1 -1
  12. package/backend/dist/routes/projects.d.ts.map +1 -1
  13. package/backend/dist/routes/projects.js +12 -0
  14. package/backend/dist/routes/projects.js.map +1 -1
  15. package/backend/dist/routes/update.d.ts.map +1 -1
  16. package/backend/dist/routes/update.js +21 -18
  17. package/backend/dist/routes/update.js.map +1 -1
  18. package/backend/dist/session-manager.d.ts.map +1 -1
  19. package/backend/dist/session-manager.js +13 -7
  20. package/backend/dist/session-manager.js.map +1 -1
  21. package/frontend/dist/assets/ChatView-CIJkFI_2.js +11 -0
  22. package/frontend/dist/assets/{GraphPreview-0UgP3AnJ.js → GraphPreview-DGkO3W8H.js} +1 -1
  23. package/frontend/dist/assets/{OfficePreview-DhY6Py9Y.js → OfficePreview-iyqJ00Hb.js} +3 -3
  24. package/frontend/dist/assets/{ProjectPage-Ckxkh4Nr.js → ProjectPage-DQgPEyb0.js} +4 -4
  25. package/frontend/dist/assets/{SettingsPage-Dmb7V9a0.js → SettingsPage-CLjiV1zw.js} +1 -1
  26. package/frontend/dist/assets/{SkillHubPage-C5zcxERj.js → SkillHubPage-BJbt7Ls4.js} +1 -1
  27. package/frontend/dist/assets/{chevron-down-BEvQLdWD.js → chevron-down-BzrArAoQ.js} +1 -1
  28. package/frontend/dist/assets/{index-C9_Mp1hE.js → index-BSSodGEm.js} +2 -2
  29. package/frontend/dist/assets/{index-DEta9t2M.js → index-CKu7RWW3.js} +1 -1
  30. package/frontend/dist/assets/{jszip.min-s-54SERU.js → jszip.min-CY-3LamF.js} +1 -1
  31. package/frontend/dist/assets/{select-Cfjj__BG.js → select-C63MH-TY.js} +1 -1
  32. package/frontend/dist/assets/{user-_adqQY3y.js → user-BW8RRkQU.js} +1 -1
  33. package/frontend/dist/index.html +1 -1
  34. package/package.json +1 -1
  35. package/frontend/dist/assets/ChatView-CmGXAs2a.js +0 -11
@@ -0,0 +1,11 @@
1
+ import{c as g,r as l,j as e,o as p,e as m,C as v,A as N}from"./index-BSSodGEm.js";import{S as C,M,r as R,B as S}from"./ProjectPage-DQgPEyb0.js";import"./select-C63MH-TY.js";import"./chevron-down-BzrArAoQ.js";import"./user-BW8RRkQU.js";/**
2
+ * @license lucide-react v0.309.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 O=g("FileOutput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v4",key:"702lig"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}]]);/**
7
+ * @license lucide-react v0.309.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 B=g("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);function x({icon:n,label:s,content:r}){const[i,a]=l.useState(!1);return e.jsxs("div",{className:"border border-border rounded mt-1.5",children:[e.jsxs("button",{className:"flex items-center gap-1.5 w-full px-2.5 py-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>a(o=>!o),children:[e.jsx(v,{className:m("h-3 w-3 transition-transform",i&&"rotate-90")}),e.jsx(n,{className:"h-3 w-3"}),e.jsx("span",{className:"truncate",children:s})]}),e.jsx(N,{children:i&&e.jsx(p.pre,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"px-3 pb-2 text-xs text-muted-foreground whitespace-pre-wrap break-words max-h-40 overflow-auto",children:r})})]})}function D({blocks:n}){return e.jsx(e.Fragment,{children:n.map((s,r)=>s.type==="text"?e.jsx("div",{className:"prose dark:prose-invert prose-sm max-w-none",children:e.jsx(M,{remarkPlugins:[R],children:s.content})},r):s.type==="thinking"?e.jsx(x,{icon:S,label:"Thinking...",content:s.content},r):s.type==="tool_use"?e.jsx(x,{icon:B,label:s.content.split("(")[0],content:s.content},r):s.type==="tool_result"?e.jsx(x,{icon:O,label:"Result",content:s.content},r):null)})}function L({messages:n,onSend:s,readOnly:r,hideInput:i,streamingText:a,streamingThinking:o,isGenerating:j,currentToolName:c}){const[d,h]=l.useState(""),f=l.useRef(null),u=l.useRef(null);l.useEffect(()=>{var t;(t=f.current)==null||t.scrollIntoView({behavior:"smooth"})},[n.length]);const y=()=>{const t=d.trim();t&&(s(t+"\r"),h(""),u.current&&(u.current.style.height="auto"))},b=t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),y())},w=t=>{t.style.height="auto",t.style.height=Math.min(t.scrollHeight,120)+"px"};return e.jsxs("div",{className:"flex flex-col h-full bg-background",children:[e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:[n.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"等待对话..."}),n.map((t,k)=>e.jsx(p.div,{initial:{opacity:0,y:10,x:t.role==="user"?12:-12},animate:{opacity:1,y:0,x:0},transition:{duration:.25,ease:"easeOut"},className:m("flex",t.role==="user"?"justify-end":"justify-start"),children:e.jsxs("div",{className:m("max-w-[85%] rounded-lg px-3 py-2 text-sm",t.role==="user"?"bg-blue-100 text-blue-900 dark:bg-blue-600 dark:text-white":"bg-muted"),children:[e.jsx(D,{blocks:t.blocks}),e.jsx("div",{className:"text-[10px] opacity-50 mt-1",children:new Date(t.timestamp).toLocaleTimeString()})]})},k)),j&&(a||o||c)&&e.jsxs("div",{className:"flex flex-col gap-1 px-2",children:[c&&e.jsxs("div",{className:"text-xs text-blue-500 px-3 py-1 bg-blue-50 dark:bg-blue-950/30 rounded-md",children:["🔧 ",c,"..."]}),o&&e.jsxs("div",{className:"text-xs text-muted-foreground italic px-3 py-1 bg-muted/40 rounded-md line-clamp-3",children:["💭 ",o]}),a&&e.jsxs("div",{className:"text-sm px-3 py-2 bg-muted/20 border rounded-lg whitespace-pre-wrap",children:[a,e.jsx("span",{className:"inline-block w-1.5 h-4 bg-foreground/70 ml-0.5 align-middle animate-pulse"})]})]}),e.jsx("div",{ref:f})]}),!r&&!i&&e.jsxs("div",{className:"border-t border-border p-3 flex gap-2 items-end flex-shrink-0",children:[e.jsx("textarea",{ref:u,value:d,onChange:t=>{h(t.target.value),w(t.target)},onKeyDown:b,placeholder:"输入消息...",rows:1,className:"flex-1 resize-none bg-muted rounded-md px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring",style:{maxHeight:"120px"}}),e.jsx(p.button,{onClick:y,disabled:!d.trim(),whileTap:{scale:.93},className:"p-2 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex-shrink-0",children:e.jsx(C,{className:"h-4 w-4"})})]})]})}export{L as ChatView};
@@ -1,4 +1,4 @@
1
- import{c as je,r as C,d as De,j as y,K as q,l as he}from"./index-C9_Mp1hE.js";import{L as Ye,Z as Pe,a as Be}from"./ProjectPage-Ckxkh4Nr.js";import"./select-Cfjj__BG.js";import"./chevron-down-BEvQLdWD.js";import"./user-_adqQY3y.js";/**
1
+ import{c as je,r as C,d as De,j as y,K as q,l as he}from"./index-BSSodGEm.js";import{L as Ye,Z as Pe,a as Be}from"./ProjectPage-DQgPEyb0.js";import"./select-C63MH-TY.js";import"./chevron-down-BzrArAoQ.js";import"./user-BW8RRkQU.js";/**
2
2
  * @license lucide-react v0.309.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DEta9t2M.js","assets/index-C9_Mp1hE.js","assets/index-DjgiG4hc.css","assets/jszip.min-s-54SERU.js"])))=>i.map(i=>d[i]);
2
- import{j as e,r as c,_ as m,b as y,h as S}from"./index-C9_Mp1hE.js";async function h(a){let l=S(a);const s=y();s&&(l+=`${l.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`);const d=await fetch(l);if(!d.ok)throw new Error(`Failed to fetch file: ${d.status}`);return d.arrayBuffer()}function j({filePath:a,zoom:l}){const[s,d]=c.useState(""),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await m(()=>import("./index-DEta9t2M.js").then(f=>f.i),__vite__mapDeps([0,1,2,3])),o=await h(a),p=await r.convertToHtml({arrayBuffer:o});t||d(p.value)}catch(r){t||n(r instanceof Error?r.message:"Failed to render docx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:s}})}function _({filePath:a,zoom:l}){var o;const[s,d]=c.useState([]),[x,n]=c.useState(0),[u,i]=c.useState(null),[t,r]=c.useState(!0);return c.useEffect(()=>{let p=!1;return r(!0),i(null),(async()=>{try{const f=await m(()=>import("./xlsx-D_0l8YDs.js"),[]),v=await h(a),g=f.read(v,{type:"array"}),b=g.SheetNames.map(w=>({name:w,html:f.utils.sheet_to_html(g.Sheets[w],{editable:!1})}));p||(d(b),n(0))}catch(f){p||i(f instanceof Error?f.message:"Failed to render xlsx")}finally{p||r(!1)}})(),()=>{p=!0}},[a]),t?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[s.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:s.map((p,f)=>e.jsx("button",{onClick:()=>n(f),className:`px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap ${f===x?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"}`,children:p.name},f))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:((o=s[x])==null?void 0:o.html)??""}}),e.jsx("style",{children:`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CKu7RWW3.js","assets/index-BSSodGEm.js","assets/index-DjgiG4hc.css","assets/jszip.min-CY-3LamF.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as c,_ as m,b as y,h as S}from"./index-BSSodGEm.js";async function h(a){let l=S(a);const s=y();s&&(l+=`${l.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`);const d=await fetch(l);if(!d.ok)throw new Error(`Failed to fetch file: ${d.status}`);return d.arrayBuffer()}function j({filePath:a,zoom:l}){const[s,d]=c.useState(""),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await m(()=>import("./index-CKu7RWW3.js").then(f=>f.i),__vite__mapDeps([0,1,2,3])),o=await h(a),p=await r.convertToHtml({arrayBuffer:o});t||d(p.value)}catch(r){t||n(r instanceof Error?r.message:"Failed to render docx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:s}})}function _({filePath:a,zoom:l}){var o;const[s,d]=c.useState([]),[x,n]=c.useState(0),[u,i]=c.useState(null),[t,r]=c.useState(!0);return c.useEffect(()=>{let p=!1;return r(!0),i(null),(async()=>{try{const f=await m(()=>import("./xlsx-D_0l8YDs.js"),[]),v=await h(a),g=f.read(v,{type:"array"}),b=g.SheetNames.map(w=>({name:w,html:f.utils.sheet_to_html(g.Sheets[w],{editable:!1})}));p||(d(b),n(0))}catch(f){p||i(f instanceof Error?f.message:"Failed to render xlsx")}finally{p||r(!1)}})(),()=>{p=!0}},[a]),t?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[s.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:s.map((p,f)=>e.jsx("button",{onClick:()=>n(f),className:`px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap ${f===x?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"}`,children:p.name},f))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:((o=s[x])==null?void 0:o.html)??""}}),e.jsx("style",{children:`
3
3
  .xlsx-preview table { border-collapse: collapse; width: auto; min-width: 100%; }
4
4
  .xlsx-preview td, .xlsx-preview th {
5
5
  border: 1px solid hsl(var(--border));
@@ -10,4 +10,4 @@ import{j as e,r as c,_ as m,b as y,h as S}from"./index-C9_Mp1hE.js";async functi
10
10
  }
11
11
  .xlsx-preview th { background: hsl(var(--muted)); font-weight: 600; }
12
12
  .xlsx-preview tr:hover td { background: hsl(var(--accent) / 0.3); }
13
- `})]})}async function E(a){const{default:l}=await m(async()=>{const{default:n}=await import("./jszip.min-s-54SERU.js").then(u=>u.j);return{default:n}},__vite__mapDeps([3,1,2])),s=await l.loadAsync(a),d=[],x=Object.keys(s.files).filter(n=>/^ppt\/slides\/slide\d+\.xml$/i.test(n)).sort((n,u)=>{var r,o;const i=parseInt(((r=n.match(/slide(\d+)/))==null?void 0:r[1])??"0"),t=parseInt(((o=u.match(/slide(\d+)/))==null?void 0:o[1])??"0");return i-t});for(let n=0;n<x.length;n++){const u=await s.file(x[n]).async("text"),i=[],t=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let r;for(;(r=t.exec(u))!==null;){const o=r[1].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').trim();o&&i.push(o)}d.push({index:n+1,texts:i})}return d}function N({filePath:a,zoom:l}){const[s,d]=c.useState([]),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await h(a),o=await E(r);t||d(o)}catch(r){t||n(r instanceof Error?r.message:"Failed to render pptx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:`${12*l/100}px`},children:s.map(t=>e.jsxs("div",{className:"border border-border rounded-lg p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((r,o)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:r},o))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const I=new Set(["docx","xlsx","xls","pptx"]);function L({filePath:a,ext:l,zoom:s}){return l==="docx"?e.jsx(j,{filePath:a,zoom:s}):l==="xlsx"||l==="xls"?e.jsx(_,{filePath:a,zoom:s}):l==="pptx"?e.jsx(N,{filePath:a,zoom:s}):null}export{I as OFFICE_EXTS,L as OfficePreview};
13
+ `})]})}async function E(a){const{default:l}=await m(async()=>{const{default:n}=await import("./jszip.min-CY-3LamF.js").then(u=>u.j);return{default:n}},__vite__mapDeps([3,1,2])),s=await l.loadAsync(a),d=[],x=Object.keys(s.files).filter(n=>/^ppt\/slides\/slide\d+\.xml$/i.test(n)).sort((n,u)=>{var r,o;const i=parseInt(((r=n.match(/slide(\d+)/))==null?void 0:r[1])??"0"),t=parseInt(((o=u.match(/slide(\d+)/))==null?void 0:o[1])??"0");return i-t});for(let n=0;n<x.length;n++){const u=await s.file(x[n]).async("text"),i=[],t=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let r;for(;(r=t.exec(u))!==null;){const o=r[1].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').trim();o&&i.push(o)}d.push({index:n+1,texts:i})}return d}function N({filePath:a,zoom:l}){const[s,d]=c.useState([]),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await h(a),o=await E(r);t||d(o)}catch(r){t||n(r instanceof Error?r.message:"Failed to render pptx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:`${12*l/100}px`},children:s.map(t=>e.jsxs("div",{className:"border border-border rounded-lg p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((r,o)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:r},o))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const I=new Set(["docx","xlsx","xls","pptx"]);function L({filePath:a,ext:l,zoom:s}){return l==="docx"?e.jsx(j,{filePath:a,zoom:s}):l==="xlsx"||l==="xls"?e.jsx(_,{filePath:a,zoom:s}):l==="pptx"?e.jsx(N,{filePath:a,zoom:s}):null}export{I as OFFICE_EXTS,L as OfficePreview};