@tom2012/cc-web 1.5.70 → 1.5.72
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/README.md +1 -1
- package/backend/dist/routes/claude.d.ts.map +1 -1
- package/backend/dist/routes/claude.js +46 -0
- package/backend/dist/routes/claude.js.map +1 -1
- package/frontend/dist/assets/{GraphPreview-Bw3Dfm8E.js → GraphPreview-QqDpOEoI.js} +1 -1
- package/frontend/dist/assets/{OfficePreview-Doqf6kiL.js → OfficePreview-BC2woErg.js} +3 -3
- package/frontend/dist/assets/{ProjectPage-CeHXpRBP.js → ProjectPage-B8Tdoz_M.js} +35 -35
- package/frontend/dist/assets/{SettingsPage-beAswfts.js → SettingsPage-C8572fFD.js} +1 -1
- package/frontend/dist/assets/{ShareViewPage-C_SAUX_-.js → ShareViewPage-PTSFe5df.js} +1 -1
- package/frontend/dist/assets/{SkillHubPage-BKMSJ6FQ.js → SkillHubPage-BHgZp94q.js} +2 -2
- package/frontend/dist/assets/{bot-DEz0YI_q.js → bot-CP4ljg4K.js} +1 -1
- package/frontend/dist/assets/{chevron-down-BvnHgiSX.js → chevron-down-BPKbPuX9.js} +1 -1
- package/frontend/dist/assets/{download-DWlC6Rzj.js → download-DJNy8XSX.js} +1 -1
- package/frontend/dist/assets/{index-dpSItQs8.js → index-BPzNyZy4.js} +31 -31
- package/frontend/dist/assets/{index-CrvtQ37j.js → index-CENzb-E2.js} +24 -24
- package/frontend/dist/assets/index-PNcejD9U.css +1 -0
- package/frontend/dist/assets/{jszip.min-CK_j6lPr.js → jszip.min-CPp1Je4B.js} +1 -1
- package/frontend/dist/assets/{save-rY9Wdsw_.js → save-dexIyJWW.js} +1 -1
- package/frontend/dist/assets/{user-BWHKMNkj.js → user-BGUBSa7q.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/index-CeYoiJuE.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Pe,r as l,
|
|
1
|
+
import{c as Pe,r as l,am as re,an as Y,ao as He,j as r,ap as K,aq as z,ar as _e,e as J,as as an,R as Ce,at as We,au as jt,av as Zo,aw as Rt,ax as Qo,ay as Jo,az as er,aA as tr,aB as nr,aC as or,v as rr,aD as sr,L as ir,N as ar,O as cr,Q as lr,T as dr,B as ee,U as ue,I as je,V as ur,aE as $t,aF as mt,aG as fr,aH as pr,aI as mr,a6 as cn,aJ as hr,m as ln,aK as xr,a4 as gr,aL as vr,aM as yr,a5 as wr,aN as Ht,x as br,A as Sr,p as Cr,X as Nr,aO as jr,aP as Rr,aQ as Ar,aR as Tr,aS as Pr,aT as Er,aU as Vt,aV as Ir,t as lt,s as Or,S as kr}from"./index-BPzNyZy4.js";import{C as dn}from"./chevron-down-BPKbPuX9.js";import{a as _r,C as Dr,S as Wt}from"./save-dexIyJWW.js";/**
|
|
2
2
|
* @license lucide-react v0.309.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ai as f,r,aY as g,j as e,e as a}from"./index-BPzNyZy4.js";import{U as j}from"./user-BGUBSa7q.js";import{B as p}from"./bot-CP4ljg4K.js";function v(){const{token:n}=f(),[o,c]=r.useState(!0),[i,l]=r.useState(null),[t,d]=r.useState(null),[m,x]=r.useState("");if(r.useEffect(()=>{n&&(c(!0),g(n).then(s=>{document.title=s.projectName+" — cc-web",d(s.session),x(s.projectName)}).catch(s=>l(s.message||"链接无效或已过期")).finally(()=>c(!1)))},[n]),o)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx("span",{className:"text-muted-foreground text-sm",children:"加载中…"})});if(i||!t)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("p",{className:"text-foreground font-medium",children:"无法加载会话"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:i??"链接无效或已过期"})]})});const u=new Date(t.startedAt).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});return e.jsx("div",{className:"min-h-screen bg-background text-foreground",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-lg font-semibold text-foreground",children:m}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-sm text-muted-foreground",children:[e.jsx("span",{children:u}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[t.messageCount," 条消息"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[t.messages.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:"本次会话暂无记录"}),t.messages.map((s,h)=>e.jsxs("div",{className:a("flex gap-2.5",s.role==="user"?"flex-row-reverse":"flex-row"),children:[e.jsx("div",{className:a("flex-shrink-0 w-7 h-7 rounded-full flex items-center justify-center mt-0.5",s.role==="user"?"bg-blue-500/10":"bg-muted"),children:s.role==="user"?e.jsx(j,{className:"h-3.5 w-3.5 text-blue-400"}):e.jsx(p,{className:"h-3.5 w-3.5 text-muted-foreground"})}),e.jsx("div",{className:a("max-w-[85%] text-sm rounded-lg px-3 py-2 whitespace-pre-wrap break-words",s.role==="user"?"bg-blue-500/10 text-blue-400":"bg-muted text-foreground"),children:s.content})]},h))]})]})})}export{v as ShareViewPage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{c as k,a4 as z,r,
|
|
1
|
+
import{c as k,a4 as z,r,aW as P,j as e,B as S,a5 as U,ab as B,I as F,e as g,p,J as O,A as q,aX as G,t as J}from"./index-BPzNyZy4.js";import{U as R}from"./user-BGUBSa7q.js";import{D as _}from"./download-DJNy8XSX.js";import{C as W}from"./chevron-down-BPKbPuX9.js";/**
|
|
2
2
|
* @license lucide-react v0.309.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const X=k("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);function V(){const C=z(),[o,f]=r.useState([]),[x,I]=r.useState(!0),[i,E]=r.useState(null),[c,L]=r.useState(""),[d,h]=r.useState(null),[D,H]=r.useState(null),[j,w]=r.useState(null),[N,M]=r.useState(new Set);r.useEffect(()=>{P().then(f).catch(t=>E(t instanceof Error?t.message:"Failed to load SkillHub")).finally(()=>I(!1))},[]);const b=r.useMemo(()=>{const t=new Set;return o.forEach(a=>{var s;return(s=a.tags)==null?void 0:s.forEach(n=>t.add(n))}),Array.from(t).sort()},[o]),A=r.useMemo(()=>o.some(t=>!t.tags||t.tags.length===0),[o]),v=r.useMemo(()=>{let t=o;if(d==="__untagged__"?t=t.filter(a=>!a.tags||a.tags.length===0):d&&(t=t.filter(a=>{var s;return(s=a.tags)==null?void 0:s.includes(d)})),c.trim()){const a=c.toLowerCase();t=t.filter(s=>{var n;return s.label.toLowerCase().includes(a)||s.description.toLowerCase().includes(a)||s.command.toLowerCase().includes(a)||s.author.toLowerCase().includes(a)||((n=s.tags)==null?void 0:n.some(m=>m.toLowerCase().includes(a)))})}return t},[o,c,d]),T=async(t,a)=>{if(a.stopPropagation(),!(j||N.has(t.id))){w(t.id);try{await G(t.id),M(s=>new Set(s).add(t.id)),f(s=>s.map(n=>n.id===t.id?{...n,downloads:(n.downloads||0)+1}:n))}catch(s){J.error(s instanceof Error?s.message:"Download failed")}finally{w(null)}}};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b sticky top-0 bg-background z-10",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 h-14 flex items-center gap-4",children:[e.jsxs(S,{variant:"ghost",size:"sm",onClick:()=>C("/"),children:[e.jsx(U,{className:"h-4 w-4 mr-1"}),"返回"]}),e.jsx("h1",{className:"font-semibold text-lg",children:"SkillHub"}),e.jsx("div",{className:"flex-1"}),e.jsxs("div",{className:"relative w-64",children:[e.jsx(B,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(F,{placeholder:"搜索命令...",value:c,onChange:t=>L(t.target.value),className:"pl-8 h-9"})]})]})}),e.jsxs("main",{className:"max-w-4xl mx-auto px-4 py-6",children:[b.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[e.jsx("button",{className:g("px-3 py-1 rounded-full text-xs font-medium transition-colors",d===null?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent"),onClick:()=>h(null),children:"全部"}),b.map(t=>e.jsx("button",{className:g("px-3 py-1 rounded-full text-xs font-medium transition-colors",d===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent"),onClick:()=>h(d===t?null:t),children:t},t)),A&&e.jsx("button",{className:g("px-3 py-1 rounded-full text-xs font-medium transition-colors",d==="__untagged__"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent"),onClick:()=>h(d==="__untagged__"?null:"__untagged__"),children:"无标签"})]}),x&&e.jsx("div",{className:"text-center text-muted-foreground py-20",children:"加载中..."}),i&&e.jsx("div",{className:"text-center text-destructive py-20",children:i}),!x&&!i&&o.length===0&&e.jsxs("div",{className:"text-center text-muted-foreground py-20",children:[e.jsx("p",{className:"text-lg mb-2",children:"SkillHub 还没有命令"}),e.jsx("p",{className:"text-sm",children:"在快捷命令面板中点击分享按钮来提交第一个命令吧!"})]}),!x&&!i&&o.length>0&&v.length===0&&e.jsx("div",{className:"text-center text-muted-foreground py-20",children:"没有匹配的命令"}),e.jsx("div",{className:"space-y-3",children:v.map((t,a)=>{var y;const s=D===t.id,n=N.has(t.id),m=j===t.id,u=t.parentId?o.find(l=>l.id===t.parentId):void 0;return e.jsxs(p.div,{layout:!0,initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.25,delay:a*.03,ease:"easeOut"},className:"rounded-lg border bg-card p-4 cursor-pointer hover:border-muted-foreground/30 transition-colors",onClick:()=>H(s?null:t.id),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-medium text-sm truncate",children:t.label}),(y=t.tags)==null?void 0:y.map(l=>e.jsxs("span",{className:"inline-flex items-center gap-0.5 px-2 py-0.5 rounded-full text-xs bg-muted text-muted-foreground",children:[e.jsx(X,{className:"h-2.5 w-2.5"}),l]},l))]}),u&&e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[e.jsx(O,{className:"h-3 w-3 text-muted-foreground"}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["继承: ",u.label]})]}),t.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:t.description}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(R,{className:"h-3 w-3"}),t.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(_,{className:"h-3 w-3"}),t.downloads||0]}),e.jsx("span",{children:t.createdAt})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs(S,{size:"sm",variant:n?"outline":"default",disabled:m||n,onClick:l=>T(t,l),title:u?`将同时下载继承的「${u.label}」`:void 0,children:[e.jsx(_,{className:"h-3.5 w-3.5 mr-1"}),n?"已下载":m?"下载中...":"下载"]}),e.jsx(p.span,{animate:{rotate:s?180:0},transition:{duration:.2},children:e.jsx(W,{className:"h-4 w-4 text-muted-foreground"})})]})]}),e.jsx(q,{children:s&&e.jsx(p.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:e.jsx("div",{className:"mt-3 pt-3 border-t",children:e.jsx("pre",{className:"text-xs font-mono bg-muted rounded p-3 whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:t.command})})})})]},t.id)})})]})]})}export{V as SkillHubPage};
|