@weppy/roblox-mcp 2.0.0 → 2.0.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 +3 -3
- package/CHANGELOG.md +19 -0
- package/COMMERCIAL-LICENSE.md +13 -0
- package/Dockerfile +13 -0
- package/LICENSE +648 -40
- package/README.md +31 -2
- package/TRADEMARKS.md +18 -0
- package/docs/assets/screenshots/license/license-dashboard.png +3 -0
- package/docs/assets/screenshots/license/license-plugin.png +3 -0
- package/docs/compatibility.md +1 -1
- package/docs/en/installation/README.md +25 -2
- package/docs/en/installation/ai-apps/cursor.md +77 -0
- package/docs/en/installation/roblox-explorer.md +5 -5
- package/docs/en/installation/roblox-plugin.md +1 -0
- package/docs/en/pro-upgrade.md +36 -12
- package/docs/es/README.md +29 -10
- package/docs/es/installation/README.md +25 -2
- package/docs/es/installation/ai-apps/cursor.md +77 -0
- package/docs/es/installation/roblox-plugin.md +1 -0
- package/docs/es/pro-upgrade.md +37 -13
- package/docs/id/README.md +29 -10
- package/docs/id/installation/README.md +25 -2
- package/docs/id/installation/ai-apps/cursor.md +77 -0
- package/docs/id/installation/roblox-plugin.md +1 -0
- package/docs/id/pro-upgrade.md +36 -12
- package/docs/ja/README.md +29 -10
- package/docs/ja/installation/README.md +25 -2
- package/docs/ja/installation/ai-apps/cursor.md +77 -0
- package/docs/ja/installation/roblox-plugin.md +1 -0
- package/docs/ja/pro-upgrade.md +35 -11
- package/docs/ko/README.md +28 -9
- package/docs/ko/installation/README.md +25 -2
- package/docs/ko/installation/ai-apps/cursor.md +77 -0
- package/docs/ko/installation/roblox-explorer.md +5 -5
- package/docs/ko/installation/roblox-plugin.md +1 -0
- package/docs/ko/pro-upgrade.md +35 -11
- package/docs/pt-br/README.md +29 -10
- package/docs/pt-br/installation/README.md +25 -2
- package/docs/pt-br/installation/ai-apps/cursor.md +77 -0
- package/docs/pt-br/installation/roblox-plugin.md +1 -0
- package/docs/pt-br/pro-upgrade.md +37 -13
- package/glama.json +7 -0
- package/install.ps1 +277 -0
- package/install.sh +307 -0
- package/llms-full.txt +92 -7
- package/llms.txt +13 -1
- package/package.json +14 -3
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-BOp7G4Fi.js → ChangelogDetailPage-IgHLnaEX.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Br-A5H5t.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Dao4jPQA.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-CvXLNYq0.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-tvPLhSO9.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Bl7tLgL2.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CN3LYLAT.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-vz7vtbbV.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-DS-g_EC0.js → OverviewPage-BDDctbAl.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C0iCoAQp.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-LnuHE5FL.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-qdFEmTM4.js → PropertyDiff-CbDafceC.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-CJs9ctOf.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DP9OFhNb.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-CC_OzjmT.js → StatusBadge-BMTgkxDJ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Bf1SdHGg.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BfXIBNVS.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoPanel-DzFynur7.js → TierPromoPanel-CUrTMsXB.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DBA-FZGE.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-BZZZ3FXe.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-O4dXhEU-.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-CkXvRg-O.js +69 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-CckH43fU.js → tier-promo-config-B9lIKWCQ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-DZCw70vn.js → useLiveUptime-DXXyWm6j.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +58 -57
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +3 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-ByQDwNhh.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DGhZm1j7.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CkQVyTc5.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-DXv_C7i6.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-CszBT8rJ.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C4X6-jp-.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-emQ5xjZz.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-BtjNT-j0.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-NF_CPSvZ.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BNHvpQxD.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BOYoftuM.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DkpXj7Ui.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-CZsA-7CL.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-cVoMPYAn.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BYvG5KEz.js +0 -69
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._card_z2aep_2{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 18px;cursor:pointer;transition:border-color var(--transition),box-shadow var(--transition)}._card_z2aep_2:hover{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-dim)}._header_z2aep_17{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}._statusBadge_z2aep_24{display:flex;align-items:center;gap:6px;font-family:var(--font-label);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}._statusDot_z2aep_35{width:7px;height:7px;border-radius:50%}._active_z2aep_41 ._statusDot_z2aep_35{background:var(--success);box-shadow:0 0 6px var(--success)}._active_z2aep_41{color:var(--success)}._completed_z2aep_50 ._statusDot_z2aep_35{background:var(--text-muted)}._completed_z2aep_50{color:var(--text-secondary)}._timeRange_z2aep_58{font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._summaryList_z2aep_65{display:flex;flex-direction:column;gap:4px}._summaryItem_z2aep_71{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:12px;color:var(--text-primary)}._summaryIcon_z2aep_80{width:20px;text-align:center;flex-shrink:0}._summaryText_z2aep_86{color:var(--text-secondary)}._progressBar_z2aep_91{margin-top:10px;height:3px;background:var(--bg-secondary);border-radius:2px;overflow:hidden}._progressFill_z2aep_99{height:100%;background:var(--accent);border-radius:2px;animation:_pulse_z2aep_1 2s ease-in-out infinite}@keyframes _pulse_z2aep_1{0%,to{opacity:.6;width:30%}50%{opacity:1;width:70%}}._emptySummary_z2aep_112{font-family:var(--font-label);font-size:12px;color:var(--text-muted);text-align:center;padding:8px 0}._page_59srx_2{display:flex;flex-direction:column;gap:16px;max-width:700px}._header_59srx_10{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-primary);letter-spacing:.05em;text-transform:uppercase}._headerSub_59srx_19{font-size:11px;font-weight:400;color:var(--text-muted);text-transform:none;letter-spacing:0;margin-left:8px}._filterTabs_59srx_29{display:flex;gap:2px;border-bottom:1px solid var(--border)}._filterTab_59srx_29{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._filterTab_59srx_29:hover{color:var(--text-primary)}._filterTabActive_59srx_52{color:var(--accent);border-bottom-color:var(--accent)}._list_59srx_58{display:flex;flex-direction:column;gap:10px}._empty_59srx_65{text-align:center;padding:40px 20px;color:var(--text-muted);font-family:var(--font-label);font-size:13px}._loading_59srx_74{text-align:center;padding:40px 20px;color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._pagination_59srx_83{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:4px}._pageInfo_59srx_91{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_59srx_97{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_59srx_97:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_59srx_97:disabled{opacity:.4;cursor:default}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,b as N,D as I,u as $,j as t,T,c as k}from"./index-BYvG5KEz.js";const z=10;function M(){const[a,g]=i.useState([]),[e,s]=i.useState(0),[m,u]=i.useState(!1),[r,f]=i.useState(!0),[l,y]=i.useState(0),[p,b]=i.useState("all"),_=i.useRef(null),h=i.useCallback(async(n,d)=>{f(!0);try{const C={limit:String(z),offset:String(n)};d!=="all"&&(C.status=d);const S=await N.get("/api/dashboard/changelog",C);g(S.entries),s(S.total),u(S.hasMore)}catch{g([]),s(0),u(!1)}finally{f(!1)}},[]),v=i.useCallback(()=>{h(l,p)},[h,l,p]);return i.useEffect(()=>{h(l,p)},[h,l,p]),i.useEffect(()=>{const n=new I;_.current=n,n.connect();const d=n.on("command",()=>{h(l,p)});return()=>{d(),n.disconnect(),_.current=null}},[h,l,p]),{entries:a,total:e,hasMore:m,loading:r,offset:l,statusFilter:p,setOffset:y,setStatusFilter:b,refresh:v}}const B="_card_z2aep_2",L="_header_z2aep_17",A="_statusBadge_z2aep_24",D="_statusDot_z2aep_35",E="_active_z2aep_41",F="_completed_z2aep_50",R="_timeRange_z2aep_58",w="_summaryList_z2aep_65",O="_summaryItem_z2aep_71",P="_summaryIcon_z2aep_80",G="_summaryText_z2aep_86",H="_progressBar_z2aep_91",Z="_progressFill_z2aep_99",U="_emptySummary_z2aep_112",o={card:B,header:L,statusBadge:A,statusDot:D,active:E,completed:F,timeRange:R,summaryList:w,summaryItem:O,summaryIcon:P,summaryText:G,progressBar:H,progressFill:Z,emptySummary:U};function j(a){if(!a)return"--:--";const g=new Date(a);return`${String(g.getHours()).padStart(2,"0")}:${String(g.getMinutes()).padStart(2,"0")}`}function q({entry:a,onClick:g}){const{t:e}=$(),s=a.changeSummary,m=a.status==="active",u=a.isBootstrapOnly===!0,r=[],f=s.scriptsModified+s.scriptsCreated;if(f>0){const n=[];s.scriptsModified>0&&n.push(`${s.scriptsModified} ${e("changelog.card.modified","modified")}`),s.scriptsCreated>0&&n.push(`${s.scriptsCreated} ${e("changelog.card.created","created")}`);const d=`${f} ${e("changelog.card.scripts","scripts")} ${n.join(", ")}`;r.push({icon:"📝",text:d,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const l=s.instancesCreated+s.instancesDeleted+s.instancesMoved;if(l>0){const n=[];s.instancesCreated>0&&n.push(`${s.instancesCreated} ${e("changelog.card.created","created")}`),s.instancesDeleted>0&&n.push(`${s.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),s.instancesMoved>0&&n.push(`${s.instancesMoved} ${e("changelog.card.moved","moved")}`);const d=`${l} ${e("changelog.card.instances","instances")} ${n.join(", ")}`;r.push({icon:"🧱",text:d,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}s.propertiesChanged>0&&r.push({icon:"🎨",text:`${s.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),s.lightingChanged&&r.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),s.terrainChanged&&r.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),s.assetsInserted>0&&r.push({icon:"📦",text:`${s.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const y=j(a.startTime),p=m?e("changelog.card.inProgress","in progress"):a.endTime?j(a.endTime):"--:--",b=u?e("changelog.card.bootstrapStatus","Bootstrap"):m?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),_=u?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):m?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),h=u?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),v=u?e("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):e("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet.");return t.jsxs("div",{className:o.card,onClick:g,children:[t.jsxs("div",{className:o.header,children:[t.jsx(T,{text:_,children:t.jsxs("span",{className:`${o.statusBadge} ${m?o.active:o.completed}`,children:[t.jsx("span",{className:o.statusDot}),b]})}),t.jsxs("span",{className:o.timeRange,children:[y,"~",p]})]}),t.jsx("div",{className:o.summaryList,children:r.length>0?r.map((n,d)=>t.jsxs("div",{className:o.summaryItem,children:[t.jsx("span",{className:o.summaryIcon,children:n.icon}),t.jsx(T,{text:n.tooltip,children:t.jsx("span",{className:o.summaryText,children:n.text})})]},d)):t.jsx(T,{text:v,children:t.jsx("span",{className:o.emptySummary,style:{display:"block"},children:h})})}),m&&t.jsx("div",{className:o.progressBar,children:t.jsx("div",{className:o.progressFill})})]})}const J="_page_59srx_2",K="_header_59srx_10",Q="_headerSub_59srx_19",V="_filterTabs_59srx_29",W="_filterTab_59srx_29",X="_filterTabActive_59srx_52",Y="_list_59srx_58",ee="_empty_59srx_65",se="_loading_59srx_74",te="_pagination_59srx_83",ae="_pageInfo_59srx_91",ne="_btn_59srx_97",c={page:J,header:K,headerSub:Q,filterTabs:V,filterTab:W,filterTabActive:X,list:Y,empty:ee,loading:se,pagination:te,pageInfo:ae,btn:ne},x=10,oe=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function ie(){const{t:a}=$(),g=k(),e=M();return t.jsxs("div",{className:c.page,children:[t.jsxs("h2",{className:c.header,children:[a("sidebar.changelog","Changelog"),t.jsx("span",{className:c.headerSub,children:a("changelog.subtitle","Game Change History")})]}),t.jsx("div",{className:c.filterTabs,children:oe.map(s=>t.jsx("button",{className:`${c.filterTab} ${e.statusFilter===s.key?c.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(s.key),e.setOffset(0)},children:a(s.label,s.key.charAt(0).toUpperCase()+s.key.slice(1))},s.key))}),e.loading&&e.entries.length===0&&t.jsx("div",{className:c.loading,children:a("common.loading","Loading...")}),!e.loading&&e.entries.length===0?t.jsx("div",{className:c.empty,children:a("changelog.empty","No changelog entries yet")}):t.jsx("div",{className:c.list,children:e.entries.map(s=>t.jsx(q,{entry:s,onClick:()=>g(`/changelog/${s.entryId}`)},s.entryId))}),e.total>x&&t.jsxs("div",{className:c.pagination,children:[t.jsx("button",{className:c.btn,disabled:e.offset===0,onClick:()=>e.setOffset(Math.max(0,e.offset-x)),children:a("tools.page.prev","Prev")}),t.jsxs("span",{className:c.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+x,e.total)," / ",e.total]}),t.jsx("button",{className:c.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+x),children:a("tools.page.next","Next")})]})]})}export{ie as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._container_1h084_2{max-height:200px;overflow-y:auto;font-family:var(--font-code);font-size:12px;line-height:1.6;padding:8px 12px;background:var(--bg-secondary);border-radius:4px}._entry_1h084_14{display:flex;gap:8px;white-space:nowrap}._timestamp_1h084_21{color:var(--text-muted);flex-shrink:0}._message_1h084_27{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis}._warn_1h084_34 ._message_1h084_27{color:var(--warning)}._error_1h084_39 ._message_1h084_27{color:var(--error)}._empty_1h084_44{color:var(--text-muted);font-style:italic;padding:8px 0}._page_10i40_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_10i40_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._disabled_10i40_18{opacity:.4;pointer-events:none}._cardHeader_10i40_24{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._serverGrid_10i40_38{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-family:var(--font-code);font-size:13px}._serverGrid_10i40_38 dt{color:var(--text-muted)}._serverGrid_10i40_38 dd{color:var(--text-primary);margin:0}._statusRow_10i40_56{display:flex;align-items:center;gap:16px;margin-bottom:12px}._metaItem_10i40_63{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._table_10i40_70{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_10i40_70 th{text-align:left;color:var(--text-muted);font-weight:400;padding:4px 8px 4px 0;border-bottom:1px solid var(--border)}._table_10i40_70 td{padding:6px 8px 6px 0;color:var(--text-primary)}._table_10i40_70 tr:hover td{background:var(--accent-dim)}._toggleBtn_10i40_95{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:0 4px;transition:color var(--transition)}._toggleBtn_10i40_95:hover{color:var(--accent)}._disconnected_10i40_110{text-align:center;padding:32px 16px}._disconnected_10i40_110 h3{color:var(--error);font-size:16px;margin:0 0 8px}._disconnected_10i40_110 p{color:var(--text-secondary);font-size:13px;margin:0 0 4px}._disconnectedActions_10i40_127{display:flex;gap:8px;justify-content:center;margin-top:16px}._btn_10i40_134{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_10i40_134:hover{border-color:var(--accent);background:var(--accent-dim)}._emptyRow_10i40_152{color:var(--text-muted);font-style:italic}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as N,r as a,j as e,a as w,b as S,D as y,T as $}from"./index-BYvG5KEz.js";import{I as l}from"./InfoLabel-CszBT8rJ.js";import{S as I}from"./StatusBadge-CC_OzjmT.js";import{u as R,f as A}from"./useLiveUptime-DZCw70vn.js";const E="_container_1h084_2",L="_entry_1h084_14",M="_timestamp_1h084_21",P="_message_1h084_27",k="_warn_1h084_34",H="_error_1h084_39",D="_empty_1h084_44",g={container:E,entry:L,timestamp:M,message:P,warn:k,error:H,empty:D};function T({entries:n}){const{t}=N(),s=a.useRef(null);return a.useEffect(()=>{const i=s.current;i&&(i.scrollTop=i.scrollHeight)},[n.length]),e.jsx("div",{ref:s,className:g.container,children:n.length===0?e.jsx("div",{className:g.empty,children:t("connection.log.empty","No events yet")}):n.map((i,m)=>e.jsxs("div",{className:`${g.entry} ${i.type?g[i.type]:""}`,children:[e.jsx("span",{className:g.timestamp,children:i.timestamp}),e.jsx("span",{className:g.message,children:i.message})]},m))})}const f=50;function F(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function U(){const{level:n,status:t,error:s}=w(),[i,m]=a.useState(null),[u,v]=a.useState([]),j=a.useRef(null),d=a.useCallback((r,o)=>{v(_=>{const p=[..._,{timestamp:F(),message:r,type:o}];return p.length>f?p.slice(-f):p})},[]),x=a.useCallback(async()=>{try{const r=await S.get("/connection-info");m(r)}catch{m(null)}},[]);return a.useEffect(()=>{n!=="L0"&&t&&x()},[n,t,x]),a.useEffect(()=>{const r=new y;j.current=r,r.connect();const o=r.on("connection",p=>{const h=p,b=h.status==="connected"?"connected":"disconnected";d(`Plugin ${b} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),_=r.on("mcp_status",p=>{const h=p,b=h.status==="registered"?"registered":"unregistered";d(`MCP ${b} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),x()});return()=>{o(),_(),r.disconnect(),j.current=null}},[d,x]),{status:t,connectionInfo:i,connectionLog:u,level:n,error:s}}const B="_page_10i40_2",G="_card_10i40_10",O="_disabled_10i40_18",V="_cardHeader_10i40_24",q="_serverGrid_10i40_38",W="_statusRow_10i40_56",X="_table_10i40_70",z="_toggleBtn_10i40_95",J="_disconnected_10i40_110",K="_disconnectedActions_10i40_127",Q="_btn_10i40_134",Y="_emptyRow_10i40_152",c={page:B,card:G,disabled:O,cardHeader:V,serverGrid:q,statusRow:W,table:X,toggleBtn:z,disconnected:J,disconnectedActions:K,btn:Q,emptyRow:Y};function C(n,t){const s=Math.max(0,Math.floor((Date.now()-n)/1e3));return s<60?`${s}${t("connection.time.secondsAgo","s ago")}`:s<3600?`${Math.floor(s/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(s/3600)}${t("connection.time.hoursAgo","h ago")}`}function se(){var r;const{t:n}=N(),{status:t,connectionInfo:s,connectionLog:i,level:m}=U(),[u,v]=a.useState(!0),j=R(t==null?void 0:t.uptime),d=m==="L0",x=d?"offline":"online";return e.jsxs("div",{className:c.page,children:[e.jsxs("div",{className:c.card,children:[e.jsx("div",{className:c.cardHeader,children:n("connection.server.title","Server Status")}),d?e.jsxs("div",{className:c.disconnected,children:[e.jsx("h3",{children:n("level.l0.title")}),e.jsx("p",{children:n("level.l0.message")}),e.jsx("p",{children:n("common.reconnecting")}),e.jsxs("div",{className:c.disconnectedActions,children:[e.jsx("button",{className:c.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:c.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:c.statusRow,children:e.jsx(I,{status:x})}),e.jsxs("dl",{className:c.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx($,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:A(j??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(s==null?void 0:s.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:s.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${c.card} ${d?c.disabled:""}`,children:[e.jsxs("div",{className:c.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(s==null?void 0:s.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:c.toggleBtn,onClick:()=>v(o=>!o),"aria-label":u?n("common.collapse","Collapse"):n("common.expand","Expand"),children:u?"▾":"▸"})]}),u&&e.jsxs("table",{className:c.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(l,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.agents.cwd","Working Dir"),tooltip:n("connection.agents.cwd.tooltip","Current working directory for the connected AI agent")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")})]})}),e.jsx("tbody",{children:s!=null&&s.mcpInstances&&s.mcpInstances.length>0?s.mcpInstances.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.aiClientName??n("connection.agents.unknown","Unknown")}),e.jsx("td",{children:o.pid}),e.jsx("td",{children:o.cwd??"-"}),e.jsx("td",{children:C(o.connectedAt,n)})]},o.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:c.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${c.card} ${d?c.disabled:""}`,children:[e.jsxs("div",{className:c.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((r=t==null?void 0:t.pluginClients)==null?void 0:r.length)??0,")"]}),e.jsxs("table",{className:c.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.placeName??o.projectName??"-"}),e.jsx("td",{children:o.clientId.slice(0,10)}),e.jsx("td",{children:C(o.lastSeen,n)}),e.jsx("td",{children:o.pluginVersion??"-"})]},o.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:c.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${c.card} ${d?c.disabled:""}`,children:[e.jsx("div",{className:c.cardHeader,children:n("connection.log.title","Connection Log")}),e.jsx(T,{entries:i})]})]})}export{se as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,e as r}from"./index-BYvG5KEz.js";function s({label:t,tooltip:o}){return e.jsx(r,{text:o,children:t})}export{s as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,b as _,u as N,j as e,T as c,a as w}from"./index-BYvG5KEz.js";import{u as v,T as L}from"./tier-promo-config-CckH43fU.js";import{T}from"./TierPromoPanel-DzFynur7.js";import{I as g}from"./InfoLabel-CszBT8rJ.js";const M=5e3;function k(){const[t,a]=o.useState({state:"NotRunning"}),[d,i]=o.useState([]),[r,p]=o.useState(null),[f,b]=o.useState(!0),y=o.useRef(null),n=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/status");a(u)}catch{}},[]),m=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/history");i(u.entries??[])}catch{i([])}},[]),l=o.useCallback(async()=>{await Promise.all([n(),m()]),b(!1)},[n,m]),j=o.useCallback(()=>{l()},[l]),S=o.useCallback(async u=>{try{const P=await _.get(`/api/dashboard/playtest/report/${u}`);p(P)}catch{p(null)}},[]),h=o.useCallback(async u=>{try{await _.post("/api/dashboard/playtest/control",{action:u}),setTimeout(n,500)}catch{}},[n]);return o.useEffect(()=>(l(),y.current=setInterval(l,M),()=>{y.current&&clearInterval(y.current)}),[l]),{status:t,history:d,selectedReport:r,loading:f,loadReport:S,control:h,refresh:j}}const H="_page_9936t_2",C="_card_9936t_10",D="_cardHeader_9936t_17",$="_statusRow_9936t_29",E="_statusIndicator_9936t_36",A="_statusRunning_9936t_44",z="_statusPaused_9936t_49",B="_statusNotRunning_9936t_53",U="_statusLabel_9936t_57",O="_statusMeta_9936t_64",V="_controlButtons_9936t_70",F="_btn_9936t_77",G="_btnPrimary_9936t_99",q="_btnDanger_9936t_109",J="_historyList_9936t_119",K="_historyItem_9936t_127",Q="_historyItemSelected_9936t_146",W="_historyItemHeader_9936t_151",X="_historyIcon_9936t_157",Y="_historyTimestamp_9936t_162",Z="_historyName_9936t_169",tt="_historyItemMeta_9936t_179",et="_historyMode_9936t_188",st="_historyDuration_9936t_192",at="_historyStatus_9936t_196",rt="_status_passed_9936t_203",nt="_status_failed_9936t_207",ot="_status_running_9936t_211",it="_historyError_9936t_215",lt="_reportContainer_9936t_226",ct="_reportSection_9936t_232",ut="_reportSectionHeader_9936t_238",dt="_reportMarkdown_9936t_250",pt="_reportLogs_9936t_263",yt="_emptyState_9936t_278",mt="_emptyStateTitle_9936t_285",ht="_emptyStateMessage_9936t_293",_t="_upgradePanel_9936t_302",gt="_upgradePanelIcon_9936t_310",xt="_upgradePanelTitle_9936t_315",ft="_upgradePanelDesc_9936t_323",bt="_benefitList_9936t_333",jt="_benefitItem_9936t_344",St="_upgradeActions_9936t_359",s={page:H,card:C,cardHeader:D,statusRow:$,statusIndicator:E,statusRunning:A,statusPaused:z,statusNotRunning:B,statusLabel:U,statusMeta:O,controlButtons:V,btn:F,btnPrimary:G,btnDanger:q,historyList:J,historyItem:K,historyItemSelected:Q,historyItemHeader:W,historyIcon:X,historyTimestamp:Y,historyName:Z,historyItemMeta:tt,historyMode:et,historyDuration:st,historyStatus:at,status_passed:rt,status_failed:nt,status_running:ot,historyError:it,reportContainer:lt,reportSection:ct,reportSectionHeader:ut,reportMarkdown:dt,reportLogs:pt,emptyState:yt,emptyStateTitle:mt,emptyStateMessage:ht,upgradePanel:_t,upgradePanelIcon:gt,upgradePanelTitle:xt,upgradePanelDesc:ft,benefitList:bt,benefitItem:jt,upgradeActions:St};function x(t){return t.trim().toLowerCase()}function Nt(t){switch(x(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Rt(t,a){switch(x(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function It(t,a){switch(x(a)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function Pt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function wt({entries:t,onSelect:a,selectedTimestamp:d}){const{t:i}=N();return t.length===0?e.jsx("div",{className:s.emptyState,children:i("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(r=>{const p=r.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${p?s.historyItemSelected:""}`,onClick:()=>a(r.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Nt(r.status)}),e.jsx("span",{className:s.historyTimestamp,children:r.timestamp}),e.jsx("span",{className:s.historyName,children:r.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(c,{text:i("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[i("playtest.history.mode","Mode"),": ",Rt(i,r.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Pt(r.durationMs)}),e.jsx(c,{text:i("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${x(r.status)}`]??""}`,children:It(i,r.status)})})]}),r.errorMessage&&e.jsx("div",{className:s.historyError,children:r.errorMessage})]},r.timestamp)})})}function vt({report:t}){const{t:a}=N();return e.jsxs("div",{className:s.reportContainer,children:[t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:a("playtest.report.empty","No report content available")})]})}function I(t){return(t==null?void 0:t.trim().toLowerCase())??""}function R(t){switch(I(t).replace(/[\s_-]+/g,"")){case"running":return"running";case"paused":return"paused";case"notrunning":return"not-running";default:return"not-running"}}function Lt(t){switch(R(t)){case"paused":return s.statusPaused;case"running":return s.statusRunning;default:return s.statusNotRunning}}function Tt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused","Paused");case"running":return t("playtest.status.state.running","Running");default:return t("playtest.status.state.notRunning","Not Running")}}function Mt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused.tooltip","The current Roblox playtest session is paused.");case"running":return t("playtest.status.state.running.tooltip","A Roblox playtest session is currently running.");default:return t("playtest.status.state.notRunning.tooltip","No Roblox playtest session is currently running.")}}function kt(t,a){switch(I(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Et(){const{t}=N(),{level:a}=w(),{tier:d,loading:i}=v(),r=k(),[p,f]=o.useState(null),b=!i&&d==="basic",y=a==="L0"||a==="L1";if(b)return e.jsx("div",{className:s.page,children:e.jsx(T,{icon:t("playtest.basic.icon","🎮"),title:t("playtest.basic.title","Playtest is a Pro-only feature"),description:t("playtest.basic.desc","Control playtesting from the dashboard, run automated tests, and view detailed test reports."),benefits:[t("playtest.basic.benefit1","One-click play/pause/stop controls"),t("playtest.basic.benefit2","Automated test execution via AI agent"),t("playtest.basic.benefit3","Test history with pass/fail tracking"),t("playtest.basic.benefit4","Detailed markdown test reports")],upgradeLabel:t("tier.upgrade","Upgrade to Pro"),upgradeHref:L.playtest})});const{status:n,history:m,selectedReport:l,loading:j}=r,S=h=>{f(h),r.loadReport(h)};return e.jsxs("div",{className:s.page,children:[!y&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.status.title","Playtest Status"),tooltip:t("playtest.status.title.tooltip","Current Roblox playtest session state reported by Studio.")})}),e.jsxs("div",{className:s.statusRow,children:[e.jsx("span",{className:`${s.statusIndicator} ${Lt(n.state)}`}),e.jsx(c,{text:Mt(t,n.state),children:e.jsx("span",{className:s.statusLabel,children:Tt(t,n.state)})}),n.mode&&e.jsxs("span",{className:s.statusMeta,children:[e.jsx(g,{label:`${t("playtest.status.mode","Mode")}:`,tooltip:t("playtest.status.mode.tooltip","Studio playtest launch mode for the current session.")})," ",e.jsx(c,{text:t("playtest.status.mode.value.tooltip","Specific Roblox Studio playtest mode currently in use."),children:e.jsx("span",{children:kt(t,n.mode)})})]}),n.placeName&&e.jsx(c,{text:t("playtest.status.place.tooltip","Roblox place currently associated with this playtest session."),children:e.jsxs("span",{className:s.statusMeta,children:[n.placeName,n.placeId?` (${n.placeId})`:""]})})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")})}),j?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):m.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(c,{text:t("playtest.empty.runTest.tooltip","Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(wt,{entries:m,onSelect:S,selectedTimestamp:p??void 0})]}),l&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(vt,{report:l})]})]})}export{Et as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_9936t_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_9936t_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_9936t_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;gap:8px}._statusRow_9936t_29{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_9936t_36{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_9936t_44{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_9936t_49{background:var(--warning)}._statusNotRunning_9936t_53{background:var(--text-muted)}._statusLabel_9936t_57{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_9936t_64{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_9936t_70{display:flex;gap:8px;margin-top:12px}._btn_9936t_77{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_9936t_77:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_9936t_77:disabled{opacity:.4;pointer-events:none}._btnPrimary_9936t_99{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_9936t_99:hover{opacity:.9}._btnDanger_9936t_109{border-color:var(--error);color:var(--error)}._btnDanger_9936t_109:hover{background:#ef44441a}._historyList_9936t_119{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_9936t_127{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);cursor:pointer;text-align:left;width:100%;font-family:inherit;transition:border-color var(--transition)}._historyItem_9936t_127:hover{border-color:var(--accent)}._historyItemSelected_9936t_146{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_9936t_151{display:flex;align-items:center;gap:8px}._historyIcon_9936t_157{font-size:14px;flex-shrink:0}._historyTimestamp_9936t_162{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_9936t_169{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_9936t_179{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_9936t_188{color:var(--text-muted)}._historyDuration_9936t_192{color:var(--text-secondary)}._historyStatus_9936t_196{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_9936t_203{color:var(--success)}._status_failed_9936t_207{color:var(--error)}._status_running_9936t_211{color:var(--accent)}._historyError_9936t_215{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._reportContainer_9936t_226{display:flex;flex-direction:column;gap:12px}._reportSection_9936t_232{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_9936t_238{font-family:var(--font-label);font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}._reportMarkdown_9936t_250{padding:12px;margin:0;font-family:var(--font-code);font-size:12px;line-height:1.6;color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto}._reportLogs_9936t_263{padding:12px;margin:0;font-family:var(--font-code);font-size:11px;line-height:1.5;color:var(--text-secondary);white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto;background:var(--bg-secondary)}._emptyState_9936t_278{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_9936t_285{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_9936t_293{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_9936t_302{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_9936t_310{font-size:32px;margin-bottom:12px}._upgradePanelTitle_9936t_315{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_9936t_323{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_9936t_333{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_9936t_344{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_9936t_344:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_9936t_359{display:flex;gap:8px;justify-content:center}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,h as S,D as C,b as L,u as T,j as e,T as u,A as E,S as A}from"./index-BYvG5KEz.js";import{I as n}from"./InfoLabel-CszBT8rJ.js";function I(){const[t,_]=c.useState(null),[f,g]=c.useState(null),[i,p]=c.useState(null),[v,x]=c.useState(!1),[j,N]=c.useState(!0),h=c.useCallback(async()=>{try{return await S("gumroad")}catch{return null}},[]);c.useEffect(()=>{let l=!1;async function r(){try{const[o,a,d]=await Promise.all([L.get("/api/dashboard/settings").catch(()=>null),h(),L.get("/sync/config").catch(()=>null)]);if(l)return;o&&_(o),a&&g(a),d&&p(d)}catch{}finally{l||N(!1)}}return r(),()=>{l=!0}},[h]),c.useEffect(()=>{const l=new C;l.connect();const r=l.on("license",()=>{h().then(o=>{o&&g(o)})});return()=>{r(),l.disconnect()}},[h]);const y=c.useCallback(async(l,r)=>{if(t){_(o=>o&&{...o,hot:{...o.hot,[l]:r}}),x(!0);try{await L.patch("/api/dashboard/settings",{[l]:r})}catch{_(o=>o&&{...o,hot:{...o.hot,[l]:t.hot[l]}})}finally{x(!1)}}},[t]),m=c.useCallback(async l=>{x(!0);try{const r=await L.post("/sync/config",l);p(r)}catch{}finally{x(!1)}},[]);return{settings:t,license:f,syncConfig:i,saving:v,updateHotSetting:y,updateSyncConfig:m,loading:j}}const w="_page_ob0tn_2",O="_card_ob0tn_10",R="_licenseCardPro_ob0tn_17",H="_cardHeader_ob0tn_28",B="_headerBadge_ob0tn_42",k="_headerBadgeLive_ob0tn_53",P="_licenseGrid_ob0tn_59",D="_statusDot_ob0tn_77",F="_statusActive_ob0tn_86",G="_statusInactive_ob0tn_91",M="_statusExpired_ob0tn_95",U="_proBadge_ob0tn_100",q="_upgradeLink_ob0tn_114",$="_settingRow_ob0tn_129",V="_settingLabel_ob0tn_143",K="_settingControl_ob0tn_150",Q="_select_ob0tn_157",Y="_numberInput_ob0tn_175",z="_checkbox_ob0tn_193",J="_savedIndicator_ob0tn_201",W="_coldGrid_ob0tn_214",X="_coldHint_ob0tn_232",Z="_syncForm_ob0tn_241",ee="_syncRow_ob0tn_247",te="_syncField_ob0tn_254",se="_saveBtn_ob0tn_268",ae="_langRow_ob0tn_292",ne="_loading_ob0tn_305",ie="_unit_ob0tn_314",s={page:w,card:O,licenseCardPro:R,cardHeader:H,headerBadge:B,headerBadgeLive:k,licenseGrid:P,statusDot:D,statusActive:F,statusInactive:G,statusExpired:M,proBadge:U,upgradeLink:q,settingRow:$,settingLabel:V,settingControl:K,select:Q,numberInput:Y,checkbox:z,savedIndicator:J,coldGrid:W,coldHint:X,syncForm:Z,syncRow:ee,syncField:te,saveBtn:se,langRow:ae,loading:ne,unit:ie},le={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},oe=["debug","info","warn","error"];function ce(t){return t==="active"?s.statusActive:t==="expired"?s.statusExpired:s.statusInactive}function ge(){const{t,selectedLocale:_,setLocale:f}=T(),{settings:g,license:i,syncConfig:p,saving:v,updateHotSetting:x,updateSyncConfig:j,loading:N}=I(),[h,y]=c.useState(null),[m,l]=c.useState({});c.useEffect(()=>{p&&l({maxDepth:p.maxDepth,maxInstances:p.maxInstances})},[p]);const r=c.useCallback(async(a,d)=>{await x(a,d),y(a),setTimeout(()=>y(b=>b===a?null:b),2e3)},[x]),o=c.useCallback(async()=>{await j(m)},[j,m]);return N?e.jsx("div",{className:s.page,children:e.jsx("div",{className:s.loading,children:t("common.loading")})}):e.jsxs("div",{className:s.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[s.card,(i==null?void 0:i.tier)==="pro"?s.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.licenseGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${s.statusDot} ${ce(i.status)}`}),e.jsx(u,{text:t(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:t(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?s.proBadge:"",children:e.jsx(u,{text:t(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),i.maskedKey&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:i.maskedKey})})]}),i.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:i.provider})})]})]}),i.tier==="basic"&&e.jsx("a",{className:s.upgradeLink,href:"https://hope1026.gumroad.com/l/roblox-mcp",target:"_blank",rel:"noopener noreferrer",children:t("tier.upgrade")})]}):e.jsx("div",{className:s.loading,children:t("settings.license.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(u,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${s.headerBadge} ${s.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail the dashboard writes to its logs.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("select",{className:s.select,value:g.hot.LOG_LEVEL,onChange:a=>r("LOG_LEVEL",a.target.value),children:oe.map(a=>e.jsx("option",{value:a,children:a},a))}),h==="LOG_LEVEL"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the dashboard history views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_HISTORY,onChange:a=>r("ENABLE_LOCAL_HISTORY",a.target.checked)}),h==="ENABLE_LOCAL_HISTORY"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for dashboard reporting.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_STATISTICS,onChange:a=>r("ENABLE_LOCAL_STATISTICS",a.target.checked)}),h==="ENABLE_LOCAL_STATISTICS"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.requestTimeout","Request Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time the dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"number",className:s.numberInput,value:g.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||r("REQUEST_TIMEOUT",d)}}),e.jsx(u,{text:t("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:s.unit,children:t("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.coldGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP dashboard HTTP server.")})}),e.jsx("dd",{children:g.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(n,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP dashboard HTTP server binds to.")})}),e.jsx("dd",{children:g.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(n,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether the dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening the dashboard in a browser."),children:String(g.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:s.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.sync.title","Sync Settings"),tooltip:t("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:s.syncForm,children:[e.jsxs("div",{className:s.syncRow,children:[e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxDepth","Max Depth"),tooltip:t("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxDepth??10,min:1,max:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxDepth:d}))}})]}),e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxInstances","Max Instances"),tooltip:t("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxInstances??5e3,min:100,max:5e4,step:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxInstances:d}))}})]})]}),e.jsx("button",{className:s.saveBtn,onClick:o,disabled:v,children:v?t("common.loading"):t("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the dashboard interface text is localized.")})}),e.jsxs("div",{className:s.langRow,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.language.dashboard","Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:s.select,value:_,onChange:a=>f(a.target.value),children:[e.jsx("option",{value:E,children:t("settings.language.auto","Auto")}),A.map(a=>e.jsx("option",{value:a,children:le[a]??a},a))]})]})]})]})}export{ge as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_ob0tn_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_ob0tn_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._licenseCardPro_ob0tn_17{border-color:var(--pro-border);background:linear-gradient(180deg,var(--pro-bg-soft),transparent 28%),var(--bg-card);box-shadow:inset 0 1px #f3d46b2e,0 0 0 1px #8f6f1f24}._cardHeader_ob0tn_28{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._headerBadge_ob0tn_42{font-size:10px;font-weight:400;padding:2px 8px;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);text-transform:none;letter-spacing:0}._headerBadgeLive_ob0tn_53{color:var(--success);border-color:var(--success)}._licenseGrid_ob0tn_59{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._licenseGrid_ob0tn_59 dt{color:var(--text-muted)}._licenseGrid_ob0tn_59 dd{color:var(--text-primary);margin:0}._statusDot_ob0tn_77{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle}._statusActive_ob0tn_86{background:var(--success);box-shadow:0 0 4px var(--success)}._statusInactive_ob0tn_91{background:var(--text-muted)}._statusExpired_ob0tn_95{background:var(--error)}._proBadge_ob0tn_100{color:var(--pro-badge);font-weight:500}._licenseCardPro_ob0tn_17 ._cardHeader_ob0tn_28 span:first-child{color:var(--pro-text)}._licenseCardPro_ob0tn_17 ._licenseGrid_ob0tn_59 dt{color:var(--pro-badge)}._upgradeLink_ob0tn_114{display:inline-block;margin-top:8px;font-family:var(--font-label);font-size:12px;color:var(--accent);cursor:pointer;text-decoration:underline}._upgradeLink_ob0tn_114:hover{opacity:.8}._settingRow_ob0tn_129{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}._settingRow_ob0tn_129:last-child{border-bottom:none}._settingLabel_ob0tn_143{font-family:var(--font-label);color:var(--text-primary);flex:1}._settingControl_ob0tn_150{display:flex;align-items:center;gap:8px}._select_ob0tn_157{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;outline:none;transition:border-color var(--transition)}._select_ob0tn_157:focus{border-color:var(--accent)}._numberInput_ob0tn_175{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);width:80px;outline:none;transition:border-color var(--transition)}._numberInput_ob0tn_175:focus{border-color:var(--accent)}._checkbox_ob0tn_193{width:16px;height:16px;cursor:pointer;accent-color:var(--accent)}._savedIndicator_ob0tn_201{font-family:var(--font-code);font-size:11px;color:var(--success);opacity:1;transition:opacity .3s ease}._savedIndicatorHidden_ob0tn_209{opacity:0}._coldGrid_ob0tn_214{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._coldGrid_ob0tn_214 dt{color:var(--text-muted)}._coldGrid_ob0tn_214 dd{color:var(--text-primary);margin:0}._coldHint_ob0tn_232{margin-top:10px;font-family:var(--font-label);font-size:12px;color:var(--text-muted);font-style:italic}._syncForm_ob0tn_241{display:flex;flex-direction:column;gap:10px}._syncRow_ob0tn_247{display:flex;align-items:center;gap:16px;flex-wrap:wrap}._syncField_ob0tn_254{display:flex;align-items:center;gap:8px;font-size:13px}._syncField_ob0tn_254 label{font-family:var(--font-label);color:var(--text-primary);white-space:nowrap}._saveBtn_ob0tn_268{align-self:flex-end;font-family:var(--font-label);font-size:12px;padding:6px 16px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition)}._saveBtn_ob0tn_268:hover{background:var(--accent);color:var(--bg-primary)}._saveBtn_ob0tn_268:disabled{opacity:.5;cursor:not-allowed}._langRow_ob0tn_292{display:flex;align-items:center;gap:12px;font-size:13px}._langRow_ob0tn_292 label{font-family:var(--font-label);color:var(--text-primary)}._loading_ob0tn_305{color:var(--text-muted);font-family:var(--font-code);font-size:13px;padding:32px 0;text-align:center}._unit_ob0tn_314{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_u3dxa_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_u3dxa_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_u3dxa_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;gap:8px}._statusRow_u3dxa_29{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_u3dxa_36{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_u3dxa_42{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_u3dxa_42 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_u3dxa_42 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._table_u3dxa_61{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_u3dxa_61 th{text-align:left;padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-weight:500;font-size:11px}._table_u3dxa_61 td{padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-primary)}._table_u3dxa_61 tr:last-child td{border-bottom:none}._directionRail_u3dxa_89{display:inline-flex;align-items:center;gap:10px}._endpointLabel_u3dxa_95{color:var(--text-secondary)}._optionRail_u3dxa_99{display:inline-flex;align-items:center;gap:6px}._directionOption_u3dxa_105{display:inline-flex;align-items:center;justify-content:center;width:28px;height:24px;border-radius:6px;border:1px solid var(--border);font-family:var(--font-code);font-size:13px;cursor:help;-webkit-user-select:none;user-select:none}._directionOptionActive_u3dxa_119{background:var(--bg-secondary)}._directionOptionInactive_u3dxa_123{background:transparent;opacity:.45;color:var(--text-muted)}._directionOptionActive_u3dxa_119._direction_forward_u3dxa_129{color:var(--success)}._directionOptionActive_u3dxa_119._direction_bidirectional_u3dxa_133{color:var(--accent)}._directionOptionActive_u3dxa_119._direction_reverse_u3dxa_137{color:var(--warning)}._lockBadge_u3dxa_142{display:inline-block;margin-left:6px;font-size:11px;color:var(--text-muted)}._proBadge_u3dxa_150{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:#1a1407;background:var(--pro-badge);border-radius:3px;vertical-align:middle}._forwardBadge_u3dxa_164{display:inline-block;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px}._configGrid_u3dxa_177{display:flex;flex-wrap:wrap;gap:16px}._configItem_u3dxa_183{display:flex;flex-direction:column;gap:2px}._configLabel_u3dxa_189{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}._configValue_u3dxa_197{font-family:var(--font-code);font-size:13px;color:var(--text-primary)}._logContainer_u3dxa_204{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_u3dxa_211{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_u3dxa_211:last-child{border-bottom:none}._logTime_u3dxa_223{color:var(--text-muted);flex-shrink:0;width:44px}._logType_u3dxa_229{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_u3dxa_238{color:var(--success)}._logTypeUpdate_u3dxa_242{color:var(--accent)}._logTypeDelete_u3dxa_246{color:var(--error)}._logTypeIdle_u3dxa_250{color:var(--text-muted)}._logPath_u3dxa_254{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_u3dxa_261{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_u3dxa_268{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_u3dxa_278{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_u3dxa_285{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_u3dxa_291{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_u3dxa_301{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_u3dxa_301:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_u3dxa_317{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_u3dxa_324{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_u3dxa_332{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_u3dxa_341{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_u3dxa_341:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_u3dxa_356{display:flex;gap:8px}._btn_u3dxa_361{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_u3dxa_361:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_u3dxa_378{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_u3dxa_378:hover{opacity:.9}._disabled_u3dxa_389{opacity:.4;pointer-events:none}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as o,b,D as w,u as T,a as N,j as t,T as g,e as I}from"./index-BYvG5KEz.js";import{I as p}from"./InfoLabel-CszBT8rJ.js";import{S as L}from"./StatusBadge-CC_OzjmT.js";import{u as S,T as R}from"./tier-promo-config-CckH43fU.js";import{T as P}from"./TierPromoPanel-DzFynur7.js";const C=5e3;function k(){const[e,i]=o.useState(null),[f,x]=o.useState(null),[l,r]=o.useState([]),[h,n]=o.useState(!0),y=o.useRef(null),_=o.useRef(null),m=o.useCallback(async()=>{try{const c=await b.get("/sync/status");i(c)}catch{}},[]),a=o.useCallback(async()=>{try{const c=await b.get("/sync/config");x(c)}catch{}},[]),d=o.useCallback(async()=>{try{const c=await b.get("/sync/history",{limit:"30"});r(c.entries??[])}catch{r([])}},[]),u=o.useCallback(async()=>{await Promise.all([m(),a(),d()]),n(!1)},[m,a,d]),j=o.useCallback(()=>{u()},[u]);return o.useEffect(()=>(u(),_.current=setInterval(u,C),()=>{_.current&&clearInterval(_.current)}),[u]),o.useEffect(()=>{const c=new w;y.current=c,c.connect();const v=c.on("sync",()=>{m(),d()});return()=>{v(),c.disconnect(),y.current=null}},[m,d]),{status:e,config:f,history:l,loading:h,refresh:j}}const E="_page_u3dxa_2",$="_card_u3dxa_10",A="_cardHeader_u3dxa_17",B="_statusRow_u3dxa_29",O="_metaItem_u3dxa_36",D="_statusGrid_u3dxa_42",H="_table_u3dxa_61",M="_directionRail_u3dxa_89",U="_endpointLabel_u3dxa_95",F="_optionRail_u3dxa_99",G="_directionOption_u3dxa_105",V="_directionOptionActive_u3dxa_119",W="_directionOptionInactive_u3dxa_123",q="_direction_forward_u3dxa_129",z="_direction_bidirectional_u3dxa_133",Y="_direction_reverse_u3dxa_137",J="_lockBadge_u3dxa_142",K="_proBadge_u3dxa_150",Q="_forwardBadge_u3dxa_164",X="_configGrid_u3dxa_177",Z="_configItem_u3dxa_183",ee="_configLabel_u3dxa_189",te="_configValue_u3dxa_197",se="_logContainer_u3dxa_204",ne="_logEntry_u3dxa_211",ie="_logTime_u3dxa_223",ae="_logType_u3dxa_229",ce="_logTypeWrite_u3dxa_238",oe="_logTypeUpdate_u3dxa_242",le="_logTypeDelete_u3dxa_246",re="_logTypeIdle_u3dxa_250",de="_logPath_u3dxa_254",ue="_logEmpty_u3dxa_261",pe="_overlay_u3dxa_268",ye="_overlayTitle_u3dxa_278",ge="_overlayMessage_u3dxa_285",xe="_checklist_u3dxa_291",he="_checkItem_u3dxa_301",_e="_upgradePanel_u3dxa_317",me="_upgradePanelHeader_u3dxa_324",fe="_benefitList_u3dxa_332",je="_benefitItem_u3dxa_341",be="_upgradeActions_u3dxa_356",ve="_btn_u3dxa_361",we="_btnPrimary_u3dxa_378",Te="_disabled_u3dxa_389",s={page:E,card:$,cardHeader:A,statusRow:B,metaItem:O,statusGrid:D,table:H,directionRail:M,endpointLabel:U,optionRail:F,directionOption:G,directionOptionActive:V,directionOptionInactive:W,direction_forward:q,direction_bidirectional:z,direction_reverse:Y,lockBadge:J,proBadge:K,forwardBadge:Q,configGrid:X,configItem:Z,configLabel:ee,configValue:te,logContainer:se,logEntry:ne,logTime:ie,logType:ae,logTypeWrite:ce,logTypeUpdate:oe,logTypeDelete:le,logTypeIdle:re,logPath:de,logEmpty:ue,overlay:pe,overlayTitle:ye,overlayMessage:ge,checklist:xe,checkItem:he,upgradePanel:_e,upgradePanelHeader:me,benefitList:fe,benefitItem:je,upgradeActions:be,btn:ve,btnPrimary:we,disabled:Te},Ne=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ie(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Le(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(0)}MB`}function Se(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Re(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Pe(e,i,f,x){const l=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),r=e("sync.directions.endpoint.local","Local"),h=e("sync.directions.endpoint.studio","Studio");switch(f){case"forward":return[`${l}: ${r} <- ${h}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
|
-
`);case"bidirectional":return[`${l}: ${r} <-> ${h}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),x?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
|
-
`);case"reverse":return[`${l}: ${r} -> ${h}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),x?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
-
`);default:return l}}const Ce=["scripts","values","containers","data","services"];function ke(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function Ee(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function $e(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function Ae(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function Ue(){const{t:e}=T(),{level:i}=N(),{tier:f,loading:x}=S(),l=k(),r=!x&&f==="basic";if(i==="L0"||i==="L1")return t.jsx("div",{className:s.page,children:t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the Weppy MCP plugin installed?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check3","Are HTTP Requests enabled in Studio settings?")})]})]})})});const n=l.status,y=l.config,_=l.history,m=Re(n==null?void 0:n.state);return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(g,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),r&&t.jsx(g,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(L,{status:m}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(p,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.path","Path"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(g,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:Ce.map(a=>{var j;const d=n.directions[a],u=(j=n.applyModes)==null?void 0:j[a];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${a}-direction-rail`,children:[t.jsx(g,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:Ne.map(c=>t.jsx(I,{text:Pe(e,a,c.key,r),children:t.jsx("span",{className:`${s.directionOption} ${d===c.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${c.key}`]??""}`,"data-active":d===c.key?"true":"false",children:c.symbol})},c.key))}),t.jsx(g,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(g,{text:Ee(e,u),children:ke(e,u)})})]},a)})})]})]}),y&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.config.title","Sync Config")}),t.jsxs("div",{className:s.configGrid,children:[t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxDepth","Max Depth")}),t.jsx("span",{className:s.configValue,children:y.maxDepth})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxInstances","Max Instances")}),t.jsx("span",{className:s.configValue,children:y.maxInstances})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.dirLimit","Dir Limit")}),t.jsx("span",{className:s.configValue,children:Le(y.directorySizeLimit)})]})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.log.title","Sync Log")}),t.jsx("div",{className:s.logContainer,children:_.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):_.map((a,d)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ie(a.timestamp)}),t.jsx(g,{text:Ae(e,a.type),children:t.jsx("span",{className:`${s.logType} ${Se(a.type)}`,children:$e(e,a.type)})}),t.jsxs("span",{className:s.logPath,children:[a.path,a.details?` — ${a.details}`:""]})]},d))})]}),r&&t.jsx(P,{title:e("sync.upgrade.title","Unlock Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:R.sync})]})}export{Ue as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as h,r as x,f as g,g as j,j as s}from"./index-BYvG5KEz.js";import{s as e,a as b}from"./tier-promo-config-CckH43fU.js";function N({basicCalls:t,proCalls:a,totalCalls:l,proUsagePercent:c,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=g(),{pathname:m}=j(),n=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromo,children:[s.jsxs("div",{className:e.progressMain,children:[s.jsxs("div",{className:e.progressLabel,children:[s.jsx("span",{children:r("tier.progress.label","Pro / Total")}),s.jsxs("span",{children:[a," / ",l]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(c,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",t]}),s.jsxs("span",{children:[r("tier.pro")," ",a]})]})]}),s.jsx("span",{className:e.progressText,children:r("tier.banner.save","Save AI tokens with Pro!")}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{i("dashboard_tier_toggle",{page:n}),o(!0)},children:r("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>i("dashboard_upgrade_click",{page:n}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),p&&s.jsx(b,{onClose:()=>o(!1)})]})}export{N as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,r as i,b as D,D as K,u as V,T}from"./index-BYvG5KEz.js";import{u as Z,T as q}from"./tier-promo-config-CckH43fU.js";import{T as z}from"./TierPromoProgress-DkpXj7Ui.js";const Q="_wrapper_1s3lp_2",X="_table_1s3lp_7",Y="_sortable_1s3lp_32",tt="_sortArrow_1s3lp_41",st="_clickable_1s3lp_52",et="_empty_1s3lp_57",B={wrapper:Q,table:X,sortable:Y,sortArrow:tt,clickable:st,empty:et};function at({columns:e,data:o,sortBy:p,sortDir:w="asc",onSort:C,onRowClick:x,rowKey:v,emptyMessage:k}){return s.jsx("div",{className:B.wrapper,children:s.jsxs("table",{className:B.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?B.sortable:void 0,onClick:c.sortable&&C?()=>C(c.key):void 0,children:[s.jsx("span",{children:c.label}),c.sortable&&p===c.key&&s.jsx("span",{className:B.sortArrow,children:w==="asc"?"▴":"▾"})]},c.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:B.empty,children:k||"No data"})}):o.map((c,f)=>s.jsx("tr",{className:x?B.clickable:void 0,onClick:x?()=>x(c):void 0,children:e.map(g=>s.jsx("td",{children:g.render?g.render(c):String(c[g.key]??"")},g.key))},v?v(c):f))})]})})}const G=50;function ot(){const[e,o]=i.useState(null),[p,w]=i.useState(!0),[C,x]=i.useState([]),[v,k]=i.useState(0),[c,f]=i.useState(!1),[g,N]=i.useState(!0),[h,O]=i.useState(0),[b,L]=i.useState(""),[d,E]=i.useState([]),[$,R]=i.useState(0),[_,A]=i.useState(!1),[t,r]=i.useState(!0),[l,u]=i.useState(0),n=i.useRef(null),y=i.useCallback(async()=>{w(!0);try{const m=await D.get("/api/dashboard/tool-stats");o(m)}catch{}finally{w(!1)}},[]),j=i.useCallback(async(m,S)=>{N(!0);try{const W={limit:String(G),offset:String(m)};S&&(W.tool=S);const I=await D.get("/api/dashboard/history",W);x(I.entries),k(I.total),f(I.hasMore)}catch{x([]),k(0),f(!1)}finally{N(!1)}},[]),M=i.useCallback(async m=>{r(!0);try{const S=await D.get("/api/dashboard/failures",{limit:String(G),offset:String(m)});E(S.entries),R(S.total),A(S.hasMore)}catch{E([]),R(0),A(!1)}finally{r(!1)}},[]),J=i.useCallback(()=>{y(),j(h,b),M(l)},[y,j,M,h,b,l]);return i.useEffect(()=>{y()},[y]),i.useEffect(()=>{j(h,b)},[j,h,b]),i.useEffect(()=>{M(l)},[M,l]),i.useEffect(()=>{const m=new K;n.current=m,m.connect();const S=m.on("command",()=>{y(),j(h,b),M(l)});return()=>{S(),m.disconnect(),n.current=null}},[y,j,M,h,b,l]),{statistics:e,statsLoading:p,history:C,historyTotal:v,historyHasMore:c,historyLoading:g,historyOffset:h,historyToolFilter:b,setHistoryOffset:O,setHistoryToolFilter:L,failures:d,failuresTotal:$,failuresHasMore:_,failuresLoading:t,failuresOffset:l,setFailuresOffset:u,refresh:J}}const rt="_page_15wsf_2",it="_tabs_15wsf_10",lt="_tab_15wsf_10",nt="_tabActive_15wsf_34",ct="_card_15wsf_40",dt="_proBadge_15wsf_48",ut="_statusOk_15wsf_62",pt="_tierBasic_15wsf_68",ht="_tierPro_15wsf_72",mt="_tierMixed_15wsf_77",xt="_filterRow_15wsf_88",ft="_filterLabel_15wsf_95",bt="_filterSelect_15wsf_104",_t="_expandedRow_15wsf_115",yt="_expandedSection_15wsf_123",jt="_pre_15wsf_133",wt="_pagination_15wsf_150",gt="_pageInfo_15wsf_158",St="_btn_15wsf_164",Nt="_tierDistribution_15wsf_187",Tt="_tierBarWrap_15wsf_191",Ct="_tierBarBasic_15wsf_199",vt="_tierBarPro_15wsf_204",kt="_tierLabels_15wsf_209",Mt="_statsTableWrap_15wsf_218",Bt="_statsTable_15wsf_218",Pt="_sortableHeader_15wsf_249",Et="_sortArrow_15wsf_254",Rt="_statsToolRow_15wsf_258",At="_statsActionRow_15wsf_266",Lt="_expandButton_15wsf_270",Ht="_expandIcon_15wsf_282",Ot="_actionLabel_15wsf_287",$t="_emptyStats_15wsf_294",It="_summaryLine_15wsf_300",a={page:rt,tabs:it,tab:lt,tabActive:nt,card:ct,proBadge:dt,statusOk:ut,tierBasic:pt,tierPro:ht,tierMixed:mt,filterRow:xt,filterLabel:ft,filterSelect:bt,expandedRow:_t,expandedSection:yt,pre:jt,pagination:wt,pageInfo:gt,btn:St,tierDistribution:Nt,tierBarWrap:Tt,tierBarBasic:Ct,tierBarPro:vt,tierLabels:kt,statsTableWrap:Mt,statsTable:Bt,sortableHeader:Pt,sortArrow:Et,statsToolRow:Rt,statsActionRow:At,expandButton:Lt,expandIcon:Ht,actionLabel:Ot,emptyStats:$t,summaryLine:It},U=50;function Dt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function H(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function F(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Gt(){const{t:e}=V(),o=ot(),p=Z(),[w,C]=i.useState("history"),[x,v]=i.useState(null),[k,c]=i.useState(null),[f,g]=i.useState("totalCalls"),[N,h]=i.useState("desc"),O=i.useCallback(t=>{g(r=>r===t?(h(l=>l==="asc"?"desc":"asc"),t):(h("desc"),t))},[]),b=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),L=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const l=Object.entries(r.actions??{}).map(([u,n])=>({toolName:r.toolName,actionName:n.action??u,tier:n.tier,totalCalls:n.totalCalls,successCount:n.successCount,failureCount:n.failureCount,totalExecutionTimeMs:n.totalExecutionTimeMs,avgExecutionTimeMs:n.avgExecutionTimeMs,firstUsed:n.firstUsed,lastUsed:n.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:l,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=i.useCallback((t,r,l,u)=>s.jsx(T,{text:e(l,u),children:e(t,r)}),[e]),E=i.useMemo(()=>[...L].sort((r,l)=>{const u=r[f],n=l[f];if(typeof u=="number"&&typeof n=="number")return N==="asc"?u-n:n-u;const y=String(u??""),j=String(n??"");return N==="asc"?y.localeCompare(j):j.localeCompare(y)}),[L,f,N]),$=i.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Dt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var l;const r=((l=t.parameters)==null?void 0:l.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(T,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.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=>H(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(T,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{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"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),R=i.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:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>F(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>H(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:"60px",render:t=>s.jsx(T,{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"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),_=i.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,l=t+r;if(l===0)return null;const u=Math.round(t/l*100),n=100-u;return{basic:t,pro:r,total:l,basicPct:u,proPct:n}},[o.statistics]),A=i.useCallback(t=>{c(r=>r===t?null:t)},[]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${w===t?a.tabActive:""}`,onClick:()=>C(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),w==="history"&&s.jsxs("div",{className:a.card,children:[s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),b.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(at,{columns:$,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),x&&(()=>{const t=o.history.find(r=>r.id===x);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-U)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+U,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+U),children:e("tools.page.next","Next")})]})]}),w==="statistics"&&s.jsxs("div",{className:a.card,children:[_&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${_.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${_.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",_.basicPct,"% (",_.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",_.proPct,"% (",_.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:R.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>O(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&f===t.key&&s.jsx("span",{className:a.sortArrow,children:N==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:E.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:R.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):E.map(t=>{const r=k===t.toolName;return s.jsxs(i.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>A(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),A(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:F(t.successCount,t.totalCalls)}),s.jsx("td",{children:H(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(T,{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"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(l=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:l.actionName})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:F(l.successCount,l.totalCalls)}),s.jsx("td",{children:H(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,l.tier)})})]},`${t.toolName}:${l.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!p.loading&&p.tier==="basic"&&s.jsx(z,{basicCalls:p.basicCalls,proCalls:p.proCalls,totalCalls:p.totalCalls,proUsagePercent:p.proUsagePercent,upgradeHref:q.tools})]})}export{Gt as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._wrapper_1s3lp_2{overflow-x:auto}._table_1s3lp_7{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_1s3lp_7 th{text-align:left;color:var(--text-muted);font-weight:500;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--bg-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none}._table_1s3lp_7 td{padding:6px 8px;color:var(--text-primary);border-bottom:1px solid var(--border-dim, rgba(255, 255, 255, .04))}._sortable_1s3lp_32{cursor:pointer;transition:color var(--transition)}._sortable_1s3lp_32:hover{color:var(--accent)}._sortArrow_1s3lp_41{margin-left:4px;font-size:10px}._table_1s3lp_7 tbody tr:hover td{background:var(--accent-dim)}._clickable_1s3lp_52{cursor:pointer}._empty_1s3lp_57{text-align:center;color:var(--text-muted);font-style:italic;padding:24px 8px}._page_15wsf_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._tabs_15wsf_10{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:4px}._tab_15wsf_10{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._tab_15wsf_10:hover{color:var(--text-primary)}._tabActive_15wsf_34{color:var(--accent);border-bottom-color:var(--accent)}._card_15wsf_40{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._proBadge_15wsf_48{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:#1a1407;background:var(--pro-badge);border-radius:3px;vertical-align:middle}._statusOk_15wsf_62{color:var(--success);font-weight:500}._tierBasic_15wsf_68{color:var(--text-secondary)}._tierPro_15wsf_72{color:var(--pro-badge);font-weight:500}._tierMixed_15wsf_77{color:var(--text-primary);font-weight:500}._errorText_15wsf_83{color:var(--error)}._filterRow_15wsf_88{display:flex;align-items:center;gap:12px;margin-bottom:12px}._filterLabel_15wsf_95{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);display:flex;align-items:center;gap:6px}._filterSelect_15wsf_104{font-family:var(--font-code);font-size:12px;padding:3px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary)}._expandedRow_15wsf_115{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;margin-top:8px}._expandedSection_15wsf_123{margin-bottom:8px;font-size:12px;color:var(--text-secondary)}._expandedSection_15wsf_123:last-child{margin-bottom:0}._pre_15wsf_133{font-family:var(--font-code);font-size:11px;color:var(--text-primary);background:var(--bg-card);border:1px solid var(--border);border-radius:4px;padding:8px;margin-top:4px;overflow-x:auto;max-height:200px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}._pagination_15wsf_150{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px}._pageInfo_15wsf_158{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_15wsf_164{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_15wsf_164:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_15wsf_164:disabled{opacity:.4;cursor:default}._tierDistribution_15wsf_187{margin-bottom:16px}._tierBarWrap_15wsf_191{display:flex;height:12px;border-radius:6px;overflow:hidden;background:var(--bg-secondary)}._tierBarBasic_15wsf_199{background:var(--text-secondary);transition:width .3s ease}._tierBarPro_15wsf_204{background:var(--accent);transition:width .3s ease}._tierLabels_15wsf_209{display:flex;justify-content:space-between;margin-top:4px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._statsTableWrap_15wsf_218{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._statsTable_15wsf_218{width:100%;border-collapse:collapse}._statsTable_15wsf_218 th,._statsTable_15wsf_218 td{padding:10px 12px;font-size:12px;text-align:left;border-bottom:1px solid var(--border)}._statsTable_15wsf_218 th{font-family:var(--font-label);font-size:11px;font-weight:500;color:var(--text-secondary);background:var(--bg-secondary)}._statsTable_15wsf_218 tbody tr:last-child td{border-bottom:none}._sortableHeader_15wsf_249{cursor:pointer;-webkit-user-select:none;user-select:none}._sortArrow_15wsf_254{margin-left:4px}._statsToolRow_15wsf_258{cursor:pointer}._statsToolRow_15wsf_258:hover td{background:var(--bg-secondary)}._statsActionRow_15wsf_266 td{background:color-mix(in srgb,var(--bg-secondary) 72%,transparent)}._expandButton_15wsf_270{display:inline-flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}._expandIcon_15wsf_282{width:10px;color:var(--text-secondary)}._actionLabel_15wsf_287{display:inline-block;padding-left:18px;font-family:var(--font-code);color:var(--text-secondary)}._emptyStats_15wsf_294{text-align:center;color:var(--text-muted)}._summaryLine_15wsf_300{margin-top:12px;font-family:var(--font-code);font-size:12px;color:var(--text-muted);text-align:right}
|