@weppy/roblox-mcp 2.6.0 → 2.6.2
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/.claude-plugin/marketplace.json +2 -2
- package/.github/ISSUE_TEMPLATE/bug_report.yml +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-DYQthxhC.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-WFqQ5h8e.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-BSTYLn14.js → ConfirmModal-CM3ElkBC.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-D_mEFudd.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-DdKcJZt6.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-Cbx8P1zh.css → GameChangeDetail-Be32PRgR.css} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/GameChangeDetail-DGphCFbI.js +6 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-BRbbxjjt.js → InfoLabel-CMSu30c4.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-DM74adCU.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-BiNJCh4I.js → PlaytestPage-Dq3kV_rX.js} +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-QQd8aPdd.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-A72TDL-q.js → StatusBadge-BhRLY0yK.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BmMeN4N9.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Col3nhBp.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-CYfIb0tr.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Ba_6GnUZ.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TooltipText-Bnvm1FcC.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{WhatsNewPage-uLdiNHd0.js → WhatsNewPage-M1EeHSH-.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-B-nqZCE3.js +380 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-COXUWuq2.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-CRLLCM8t.js → useLiveUptime-Dc2iJiFi.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +2 -2
- package/plugins/weppy-roblox-mcp/dist/index.js +66 -66
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-C-ROvHGr.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-CPm4ft8m.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-9bG71eB1.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-BeJEgfmf.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-BHd6yL_8.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PropertyDiff-BKVe7m6g.js +0 -6
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-Cg33y021.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-CLt9jxd8.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-R4Qs9Xt3.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-CQewH4h_.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo-D5n9OoEm.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo.module-CAoUYgIx.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DolZjAqX.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-DRX93nSV.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-YfUJSF5s.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-oz4Gtzz9.js +0 -241
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r,a as q,D as Y,u as tt,k as et}from"./index-B-nqZCE3.js";import{T as M}from"./TooltipText-Bnvm1FcC.js";import{C as st}from"./ConfirmModal-CM3ElkBC.js";const at="_wrapper_hzgda_2",ot="_table_hzgda_7",lt="_sortable_hzgda_32",rt="_sortArrow_hzgda_41",it="_clickable_hzgda_52",nt="_empty_hzgda_57",ct="_expandedRow_hzgda_65",dt="_expandedCell_hzgda_74",S={wrapper:at,table:ot,sortable:lt,sortArrow:rt,clickable:it,empty:nt,expandedRow:ct,expandedCell:dt};function ut({columns:e,data:a,sortBy:m,sortDir:C="asc",onSort:E,onRowClick:j,rowKey:L,emptyMessage:A,expandedKey:P,renderExpandedRow:b}){return s.jsx("div",{className:S.wrapper,children:s.jsxs("table",{className:S.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(c=>s.jsxs("th",{style:c.width?{width:c.width}:void 0,className:c.sortable?S.sortable:void 0,onClick:c.sortable&&E?()=>E(c.key):void 0,children:[s.jsx("span",{children:c.label}),c.sortable&&m===c.key&&s.jsx("span",{className:S.sortArrow,children:C==="asc"?"▴":"▾"})]},c.key))})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:S.empty,children:A||"No data"})}):a.map((c,N)=>{const p=L?L(c):String(N),h=P!=null&&p===P&&b?b(c):null;return s.jsxs(r.Fragment,{children:[s.jsx("tr",{className:j?S.clickable:void 0,onClick:j?()=>j(c):void 0,children:e.map(_=>s.jsx("td",{children:_.render?_.render(c):String(c[_.key]??"")},_.key))}),h&&s.jsx("tr",{className:S.expandedRow,children:s.jsx("td",{colSpan:e.length,className:S.expandedCell,children:h})})]},p)})})]})})}function pt(e){return{...e,sequenceNumber:typeof e.sequenceNumber=="number"?e.sequenceNumber:void 0,executionTimeMs:typeof e.executionTimeMs=="number"?e.executionTimeMs:void 0}}const ht=50;function mt(){const[e,a]=r.useState(null),[m,C]=r.useState(!0),[E,j]=r.useState([]),[L,A]=r.useState(0),[P,b]=r.useState(!1),[c,N]=r.useState(!0),[p,v]=r.useState(0),[h,_]=r.useState(""),F=r.useRef(null),f=r.useCallback(async()=>{C(!0);try{const g=await q.get("/api/dashboard/tool-stats");a(g)}catch{}finally{C(!1)}},[]),y=r.useCallback(async(g,B)=>{N(!0);try{const w={limit:String(ht),offset:String(g)};B&&(w.tool=B);const R=await q.get("/api/dashboard/history",w);j(R.entries.map(pt)),A(R.total),b(R.hasMore)}catch{j([]),A(0),b(!1)}finally{N(!1)}},[]),O=r.useCallback(()=>{f(),y(p,h)},[y,f,p,h]),d=r.useCallback(async()=>{await q.post("/api/dashboard/tools/history/clear"),y(p,h)},[y,p,h]),$=r.useCallback(async()=>{await q.post("/api/dashboard/tools/statistics/clear"),f()},[f]);return r.useEffect(()=>{f()},[f]),r.useEffect(()=>{y(p,h)},[y,p,h]),r.useEffect(()=>{const g=new Y;F.current=g,g.connect();const B=g.on("command",()=>{f(),y(p,h)});return()=>{B(),g.disconnect(),F.current=null}},[y,f,p,h]),{statistics:e,statsLoading:m,history:E,historyTotal:L,historyHasMore:P,historyLoading:c,historyOffset:p,historyToolFilter:h,setHistoryOffset:v,setHistoryToolFilter:_,refresh:O,clearHistory:d,clearStatistics:$}}const xt="_page_1wyl0_2",bt="_tabs_1wyl0_10",_t="_tab_1wyl0_10",ft="_tabActive_1wyl0_34",yt="_card_1wyl0_40",gt="_cardToolbar_1wyl0_47",wt="_sectionTitle_1wyl0_55",Ct="_dangerButton_1wyl0_61",jt="_proBadge_1wyl0_71",kt="_statusOk_1wyl0_85",St="_statusFallback_1wyl0_94",Tt="_statusUnsupported_1wyl0_103",Nt="_statusError_1wyl0_112",vt="_tierBasic_1wyl0_122",Bt="_tierPro_1wyl0_126",Mt="_tierMixed_1wyl0_131",Et="_filterRow_1wyl0_142",Lt="_filterLabel_1wyl0_149",At="_filterSelect_1wyl0_158",Pt="_expandedRow_1wyl0_169",Rt="_expandedSection_1wyl0_174",Ht="_detailList_1wyl0_184",Ft="_detailItem_1wyl0_190",Ot="_detailLabel_1wyl0_196",$t="_detailValue_1wyl0_201",It="_pre_1wyl0_206",Dt="_pagination_1wyl0_223",qt="_pageInfo_1wyl0_231",zt="_btn_1wyl0_237",Wt="_tierDistribution_1wyl0_260",Ut="_tierBarWrap_1wyl0_264",Kt="_tierBarBasic_1wyl0_272",Vt="_tierBarPro_1wyl0_277",Gt="_tierLabels_1wyl0_282",Jt="_statsTableWrap_1wyl0_291",Zt="_statsTable_1wyl0_291",Qt="_sortableHeader_1wyl0_322",Xt="_sortArrow_1wyl0_327",Yt="_statsToolRow_1wyl0_331",te="_statsActionRow_1wyl0_339",ee="_expandButton_1wyl0_343",se="_expandIcon_1wyl0_355",ae="_actionLabel_1wyl0_360",oe="_emptyStats_1wyl0_367",le="_summaryLine_1wyl0_373",o={page:xt,tabs:bt,tab:_t,tabActive:ft,card:yt,cardToolbar:gt,sectionTitle:wt,dangerButton:Ct,proBadge:jt,statusOk:kt,statusFallback:St,statusUnsupported:Tt,statusError:Nt,tierBasic:vt,tierPro:Bt,tierMixed:Mt,filterRow:Et,filterLabel:Lt,filterSelect:At,expandedRow:Pt,expandedSection:Rt,detailList:Ht,detailItem:Ft,detailLabel:Ot,detailValue:$t,pre:It,pagination:Dt,pageInfo:qt,btn:zt,tierDistribution:Wt,tierBarWrap:Ut,tierBarBasic:Kt,tierBarPro:Vt,tierLabels:Gt,statsTableWrap:Jt,statsTable:Zt,sortableHeader:Qt,sortArrow:Xt,statsToolRow:Yt,statsActionRow:te,expandButton:ee,expandIcon:se,actionLabel:ae,emptyStats:oe,summaryLine:le},W=50;function re(e){const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function z(e){return typeof e!="number"||!Number.isFinite(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function H(e,a){return a==="pro"?e("tier.pro","Pro"):a==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function G(e,a){return a!==e&&a.startsWith(`${e}_`)?a.slice(e.length+1):""}function ie(e,a){const m=G(e,a);return m?`${e}.${m}`:e}function V(e){return typeof e=="string"&&e.length>0?e:void 0}function ne(e){if(!Array.isArray(e))return;const a=e.filter(m=>typeof m=="string"&&m.length>0);return a.length>0?a:void 0}function ce(e){const a=e.result??{};return{requestedCommand:e.requestedCommand??V(a.requestedCommand),executedCommand:e.executedCommand??V(a.executedCommand),alternatives:e.alternatives??ne(a.alternatives)}}function de(e,a){switch(e.status){case"fallback":return{label:a("tools.badge.fallback","FALLBACK"),tooltip:a("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:a("tools.badge.unsupported","UNSUPPORTED"),tooltip:a("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"error":return{label:a("tools.badge.err","FAILED"),tooltip:a("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:a("tools.status.ok","OK"),tooltip:a("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function T(e,a){return s.jsxs("div",{className:o.detailItem,children:[s.jsx("span",{className:o.detailLabel,children:e}),s.jsx("span",{className:o.detailValue,children:a})]})}function xe(){const{t:e}=tt(),a=mt(),{show:m}=et(),[C,E]=r.useState("history"),[j,L]=r.useState(null),[A,P]=r.useState(null),[b,c]=r.useState(null),[N,p]=r.useState(!1),[v,h]=r.useState("totalCalls"),[_,F]=r.useState("desc"),f=r.useCallback(t=>{h(l=>l===t?(F(i=>i==="asc"?"desc":"asc"),t):(F("desc"),t))},[]),y=r.useMemo(()=>{var l;const t=new Set;return Object.keys(((l=a.statistics)==null?void 0:l.tools)??{}).forEach(i=>t.add(i)),a.history.forEach(i=>{i.tool&&t.add(i.tool)}),a.historyToolFilter&&t.add(a.historyToolFilter),Array.from(t).sort()},[a.history,a.historyToolFilter,a.statistics]),O=r.useMemo(()=>{var t;return(t=a.statistics)!=null&&t.tools?Object.values(a.statistics.tools).map(l=>{var K;const i=Object.entries(l.commands??{}).map(([u,n])=>({toolName:l.tool,commandName:n.command??u,label:G(l.tool,n.command??u)||(n.command??u),tier:n.tier,totalCalls:n.totalCalls,successCount:n.successCount,fallbackCount:n.fallbackCount,unsupportedCount:n.unsupportedCount,failureCount:n.failureCount,totalExecutionTimeMs:n.totalExecutionTimeMs,avgExecutionTimeMs:n.avgExecutionTimeMs})),x=i.reduce((u,n)=>u+n.totalCalls,0),k=i.reduce((u,n)=>u+n.successCount,0),I=i.reduce((u,n)=>u+n.fallbackCount,0),D=i.reduce((u,n)=>u+n.unsupportedCount,0),Q=i.reduce((u,n)=>u+n.failureCount,0),U=i.reduce((u,n)=>u+n.totalExecutionTimeMs,0),X=new Set(i.map(u=>u.tier)).size>1?"mixed":((K=i[0])==null?void 0:K.tier)??l.tier;return{toolName:l.tool,tier:X,commands:i,totalCalls:x,successCount:k,fallbackCount:I,unsupportedCount:D,failureCount:Q,totalExecutionTimeMs:U,avgExecutionTimeMs:x>0?Math.round(U/x):0}}):[]},[a.statistics]),d=r.useCallback((t,l,i,x)=>s.jsx(M,{text:e(i,x),children:e(t,l)}),[e]),$=r.useMemo(()=>[...O].sort((l,i)=>{const x=l[v],k=i[v];if(typeof x=="number"&&typeof k=="number")return _==="asc"?x-k:k-x;const I=String(x??""),D=String(k??"");return _==="asc"?I.localeCompare(D):D.localeCompare(I)}),[O,v,_]),g=r.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>re(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>s.jsxs("span",{children:[ie(t.tool,t.command),t.tier==="pro"&&s.jsx(M,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:o.proBadge,children:e("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>z(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:t=>{const l=de(t,e);return s.jsx(M,{text:l.tooltip,children:s.jsx("span",{className:l.className,children:l.label})})}},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?o.tierPro:o.tierBasic,children:H(e,t.tier)})}],[e,d]),B=r.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:d("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:d("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:d("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"failureCount",label:d("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:t=>z(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:t=>s.jsx(M,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(e,t.tier)})})}],[e,d]),w=r.useMemo(()=>{if(!a.statistics)return null;const t=a.statistics.tierSummary.basic.totalCalls,l=a.statistics.tierSummary.pro.totalCalls,i=t+l;if(i===0)return null;const x=Math.round(t/i*100),k=100-x;return{basic:t,pro:l,basicPct:x,proPct:k}},[a.statistics]),R=r.useCallback(t=>{P(l=>l===t?null:t)},[]),J=r.useCallback(async()=>{if(b){p(!0);try{b==="history"?await a.clearHistory():await a.clearStatistics(),m(e("toast.clearSuccess","Cleared successfully"),"success"),c(null)}catch{m(e("toast.clearFailed","Failed to clear data"),"error")}finally{p(!1)}}},[b,m,e,a]),Z=r.useCallback(t=>{const l=ce(t);return s.jsxs("div",{className:o.expandedRow,children:[s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(t.result,null,2)})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="error")&&s.jsx("div",{className:o.expandedSection,children:s.jsxs("div",{className:o.detailList,children:[t.status==="fallback"&&(l==null?void 0:l.requestedCommand)&&T(e("tools.detail.requestedCommand","Requested Command"),l.requestedCommand),t.status==="fallback"&&(l==null?void 0:l.executedCommand)&&T(e("tools.detail.executedCommand","Executed Command"),l.executedCommand),t.status==="fallback"&&(l==null?void 0:l.alternatives)&&T(e("tools.detail.alternatives","Alternatives"),l.alternatives.join(", ")),t.status==="unsupported"&&t.blockedMessage&&T(e("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="unsupported"&&T(e("tools.detail.noFallback","No Fallback"),e("tools.detail.noFallback.value","No fallback ran.")),t.status==="error"&&t.errorMessage&&T(e("tools.detail.errorMessage","Error Message"),t.errorMessage),t.status==="error"&&t.blockedMessage&&T(e("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="error"&&t.fallbackCommand&&T(e("tools.detail.executedCommand","Executed Command"),t.fallbackCommand)]})})]})},[e]);return s.jsxs("div",{className:o.page,children:[s.jsx("div",{className:o.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${o.tab} ${C===t?o.tabActive:""}`,onClick:()=>E(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),C==="history"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:o.dangerButton,onClick:()=>c("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:o.filterRow,children:s.jsxs("label",{className:o.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:o.filterSelect,value:a.historyToolFilter,onChange:t=>{a.setHistoryToolFilter(t.target.value),a.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),y.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(ut,{columns:g,data:a.history,rowKey:t=>t.id,onRowClick:t=>L(l=>l===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries"),expandedKey:j,renderExpandedRow:Z}),s.jsxs("div",{className:o.pagination,children:[s.jsx("button",{className:o.btn,disabled:a.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>a.setHistoryOffset(Math.max(0,a.historyOffset-W)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:o.pageInfo,children:[a.historyOffset+1,"–",Math.min(a.historyOffset+W,a.historyTotal)," / ",a.historyTotal]}),s.jsx("button",{className:o.btn,disabled:!a.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>a.setHistoryOffset(a.historyOffset+W),children:e("tools.page.next","Next")})]})]}),C==="statistics"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:o.dangerButton,onClick:()=>c("statistics"),children:e("common.clear","Clear")})]}),w&&s.jsxs("div",{className:o.tierDistribution,children:[s.jsxs("div",{className:o.tierBarWrap,children:[s.jsx("div",{className:o.tierBarBasic,style:{width:`${w.basicPct}%`}}),s.jsx("div",{className:o.tierBarPro,style:{width:`${w.proPct}%`}})]}),s.jsxs("div",{className:o.tierLabels,children:[s.jsxs("span",{children:[H(e,"basic")," ",w.basicPct,"% (",w.basic,")"]}),s.jsxs("span",{children:[H(e,"pro")," ",w.proPct,"% (",w.pro,")"]})]})]}),s.jsx("div",{className:o.statsTableWrap,children:s.jsxs("table",{className:o.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:B.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?o.sortableHeader:void 0,onClick:t.sortable?()=>f(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&v===t.key&&s.jsx("span",{className:o.sortArrow,children:_==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:B.length,className:o.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const l=A===t.toolName;return s.jsxs(r.Fragment,{children:[s.jsxs("tr",{className:o.statsToolRow,onClick:()=>R(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":l,"aria-label":`${t.toolName} ${l?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),R(t.toolName)},children:[s.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:l?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:t.successCount}),s.jsx("td",{children:t.fallbackCount}),s.jsx("td",{children:t.unsupportedCount}),s.jsx("td",{children:t.failureCount}),s.jsx("td",{children:z(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(M,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(e,t.tier)})})})]}),l&&t.commands.map(i=>s.jsxs("tr",{className:o.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:o.actionLabel,children:i.label})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:i.successCount}),s.jsx("td",{children:i.fallbackCount}),s.jsx("td",{children:i.unsupportedCount}),s.jsx("td",{children:i.failureCount}),s.jsx("td",{children:z(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?o.tierPro:o.tierBasic,children:H(e,i.tier)})})]},`${t.toolName}:${i.commandName}`))]},t.toolName)})})]})}),a.statistics&&s.jsxs("div",{className:o.summaryLine,children:[e("tools.summary.total","Total"),": ",a.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",a.statistics.totalSessions]})]}),s.jsx(st,{open:b!==null,title:b==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:b==="history"?e("tools.clear.history.message","This permanently removes the current place tools history."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:N,onCancel:()=>!N&&c(null),onConfirm:J})]})}export{xe as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,T as s}from"./index-B-nqZCE3.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as w,j as e,
|
|
1
|
+
import{u as w,j as e,p as m,r as _,q as h,T as j,L as v}from"./index-B-nqZCE3.js";const T="_card_1vaoq_2",b="_cardUnread_1vaoq_15",C="_cardRead_1vaoq_20",f="_topRow_1vaoq_25",S="_categoryChip_1vaoq_32",R="_versionChip_1vaoq_45",k="_date_1vaoq_57",q="_title_1vaoq_65",H="_body_1vaoq_74",E="_link_1vaoq_83",A="_newBadge_1vaoq_98",n={card:T,cardUnread:b,cardRead:C,topRow:f,categoryChip:S,versionChip:R,date:k,title:q,body:H,link:E,newBadge:A},U={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function x({announcement:s,isNew:d}){const{locale:i,t:c}=w(),o=d?n.cardUnread:n.cardRead,p=s.title[i]??s.title.en,l=s.body[i]??s.body.en,r=s.link?s.link.label[i]??s.link.label.en:null;return e.jsxs("div",{className:`${n.card} ${o}`,children:[e.jsxs("div",{className:n.topRow,children:[e.jsx("span",{className:n.categoryChip,children:c(U[s.category])}),s.version&&e.jsx("span",{className:n.versionChip,children:s.version}),d&&e.jsx("span",{className:n.newBadge,children:c("whatsNew.newBadge","NEW")}),e.jsx("span",{className:n.date,children:s.date})]}),e.jsx("h3",{className:n.title,children:p}),e.jsx("p",{className:n.body,children:l}),s.link&&r&&e.jsxs("a",{className:n.link,href:s.link.url,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",r]})]})}const B="_page_19yl3_2",I="_pageHeader_19yl3_10",$="_pageHeaderText_19yl3_17",L="_pageTitle_19yl3_24",M="_pageSubtitle_19yl3_31",W="_settingsIcon_19yl3_38",z="_section_19yl3_67",O="_sectionTitle_19yl3_73",Y="_unreadCount_19yl3_85",G="_empty_19yl3_100",K="_divider_19yl3_108",t={page:B,pageHeader:I,pageHeaderText:$,pageTitle:L,pageSubtitle:M,settingsIcon:W,section:z,sectionTitle:O,unreadCount:Y,empty:G,divider:K};function D(){const{t:s}=w(),{readSet:d,markRead:i}=m(),c=_.useMemo(()=>{const a=[];for(const u of h)d.has(u.id)||a.push(u.id);return a},[]),o=_.useRef(c);o.current=c,_.useEffect(()=>()=>{o.current.length>0&&i(o.current)},[]);const p=_.useMemo(()=>new Set(c),[c]),l=h.filter(a=>p.has(a.id)),r=h.filter(a=>!p.has(a.id)),g=l.length>0,N=r.length>0,y=e.jsxs("div",{className:t.pageHeader,children:[e.jsxs("div",{className:t.pageHeaderText,children:[e.jsx("h1",{className:t.pageTitle,children:s("whatsNew.pageTitle","What's New")}),e.jsx("p",{className:t.pageSubtitle,children:s("whatsNew.pageSubtitle","Stay up to date with MCP changes")})]}),e.jsx(j,{text:s("sidebar.settings","Settings"),children:e.jsx(v,{to:"/settings","aria-label":s("sidebar.settings","Settings"),className:t.settingsIcon,children:"⚙️"})})]});return h.length===0?e.jsxs("div",{className:t.page,children:[y,e.jsx("p",{className:t.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:t.page,children:[y,g&&e.jsxs("section",{className:t.section,children:[e.jsxs("h2",{className:t.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:t.unreadCount,children:l.length})]}),l.map(a=>e.jsx(x,{announcement:a,isNew:!0},`unread-${a.id}`))]}),g&&N&&e.jsx("hr",{className:t.divider}),N&&e.jsxs("section",{className:t.section,children:[e.jsx("h2",{className:t.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),r.map(a=>e.jsx(x,{announcement:a,isNew:!1},`all-${a.id}`))]})]})}export{D as Component};
|