@weppy/roblox-mcp 2.6.4 → 2.7.0
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/CHANGELOG.md +27 -0
- package/README.md +22 -11
- package/install.ps1 +85 -19
- package/install.sh +64 -18
- package/llms-full.txt +1 -2
- package/llms.txt +4 -3
- 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 → ChangelogDetailPage-CIarzJIx.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-C1uCKyqh.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-CNxAGfwG.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-CM3ElkBC.js → ConfirmModal-BDWSInRi.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConnectionPage-DdKcJZt6.js → ConnectionPage-CWDwVCKg.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{GameChangeDetail-DGphCFbI.js → GameChangeDetail-Bk8YUy4G.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-CMSu30c4.js → InfoLabel-BJIFNYA5.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-DM74adCU.js → OverviewPage-Di0p7YY2.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-Dxgz0SKW.js +11 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-Cc9Wnj8M.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DVgxRsfC.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-BhRLY0yK.js → StatusBadge-ilvVufN2.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-Col3nhBp.js → SyncPage-IICMnq8v.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/Tabs-876h0_zB.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/Tabs-pDS5zzr9.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-BXMCd1IB.js +2 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-B3fMk-22.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-DEhsoa36.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TooltipText-Bnvm1FcC.js → TooltipText-bSKcc3-P.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-BHhd3zUv.js +16 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-DQOd5VrU.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{WhatsNewPage-M1EeHSH-.js → WhatsNewPage-ErpENbsZ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BPAvjNNu.js +343 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-Gu7et1DX.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/sample-requests-Bx1zpYdG.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/sample-requests-DDQ3XchF.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ui-studio-sample-DrNTD6yi.png +0 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-Dc2iJiFi.js → useLiveUptime-HYmdQdHf.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +2 -2
- package/plugins/weppy-roblox-mcp/dist/index.js +450 -85
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/.gitattributes +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -60
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -30
- package/.github/ISSUE_TEMPLATE/install_help.yml +0 -48
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- package/.github/workflows/install-test.yml +0 -140
- package/Dockerfile +0 -13
- package/docs/assets/screenshots/antigravity/antigravity_mcp_raw.png +0 -0
- package/docs/assets/screenshots/antigravity/antigravity_mcp_services_menu.png +0 -0
- package/docs/assets/screenshots/antigravity/antigravity_raw_config_menu.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_changelog1.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_changelog2.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_connection.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_overview.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_playtest.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_sync.png +0 -0
- package/docs/assets/screenshots/dashboard/dashboard_tools.png +0 -0
- package/docs/assets/screenshots/plugin/connection/connection-guide.png +0 -0
- package/docs/assets/screenshots/plugin/installation/main-screen.png +0 -0
- package/docs/assets/screenshots/plugin/installation/plugins-menu.png +0 -0
- package/docs/assets/screenshots/plugin/installation/settings-screen.png +0 -0
- package/docs/assets/screenshots/plugin/installation/toolbar-button.png +0 -0
- package/docs/assets/screenshots/plugin/license/dashboard-license-screen.png +0 -0
- package/docs/assets/screenshots/plugin/license/plugin-license-screen.png +0 -0
- package/docs/assets/screenshots/plugin/sync/sync-conflict.png +0 -0
- package/docs/assets/screenshots/plugin/sync/sync-main.png +0 -0
- package/docs/assets/screenshots/plugin/sync/sync-overview.png +0 -0
- package/docs/assets/screenshots/roblox-explorer/roblox-explorer-property-window.png +0 -0
- package/docs/assets/screenshots/roblox-explorer/roblox-explorer-screen.png +0 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-BH87M2hn.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-WFqQ5h8e.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-Dq3kV_rX.js +0 -11
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DTv0NbEY.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-QQd8aPdd.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-CYfIb0tr.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-54vIMfZg.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Ba_6GnUZ.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-B-nqZCE3.js +0 -380
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-COXUWuq2.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
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};
|