@weppy/roblox-mcp 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +16 -0
- package/docs/assets/screenshots/plugin/sync/sync-main.png +0 -0
- package/install.ps1 +164 -22
- package/install.sh +82 -9
- package/package.json +1 -1
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-lzDR6yjY.js → ChangelogDetailPage-2ZPwh_Le.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DW2_STiE.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-BIJpNntn.js → ConfirmModal-CInBBLZW.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConnectionPage-CdLqNY4r.js → ConnectionPage-nNwPIEZw.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-CBAqTqRy.js → InfoLabel-B_Ys60mi.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-BMBzDR4R.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-BDgsWgto.js +11 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-CYSu0pfO.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-D34Apw3G.js → PropertyDiff-BbsF9z4D.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SettingsPage-yWzPPZIB.js → SettingsPage-BPSAA3lu.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-B-pYMpUG.js → StatusBadge-FYpJOX7r.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-E4XZhZn0.js → SyncPage-BcXYv0GI.js} +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-D4uVUGcZ.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-DGh9vLz0.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo-D5n9OoEm.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo.module-CAoUYgIx.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-Cuz1dgcs.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-YGBoDwbQ.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{index-E1cuNPsJ.js → index-BNdn6WpU.js} +18 -18
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-qJDofPOo.js → useLiveUptime-D5Ux8dA5.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +4 -4
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-BscI67Aj.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-BOm0Ai9y.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-DaDbQ6Qa.js +0 -11
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-Dw8nj399.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo-CcQarFkP.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo.module-BBX3CVXn.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-CqxKoPOJ.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-yaahWgTq.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/tier-promo-config-BuGSENUv.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/tier-promo-config-C-Xy3iYW.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,u as $,r as u,d as L,a as D,D as F,T as U}from"./index-BNdn6WpU.js";import{I as V}from"./InfoLabel-B_Ys60mi.js";import{S as A}from"./StatusBadge-FYpJOX7r.js";import{D as z,P as O}from"./PropertyDiff-BbsF9z4D.js";import{u as J,T as X}from"./TierComparison-D4uVUGcZ.js";import{u as q,f as K}from"./useLiveUptime-D5Ux8dA5.js";import{T as Q}from"./TierPromoProgress-Cuz1dgcs.js";import"./TierPromo.module-CAoUYgIx.js";const W="_page_1xgxh_2",Y="_card_1xgxh_10",Z="_cardHeader_1xgxh_17",ee="_disconnectCard_1xgxh_28",te="_disconnectIcon_1xgxh_36",se="_disconnectTitle_1xgxh_41",ne="_disconnectMessage_1xgxh_48",ie="_reconnectGuide_1xgxh_55",re="_guideStep_1xgxh_64",ce="_stepNumber_1xgxh_72",ae="_reconnectIndicator_1xgxh_88",oe="_reconnectDot_1xgxh_98",le="_pulse_1xgxh_1",de="_disconnectActions_1xgxh_112",me="_btn_1xgxh_118",xe="_btnSecondary_1xgxh_134",ge="_metricRow_1xgxh_152",he="_metricGrid_1xgxh_158",ue="_metricCard_1xgxh_164",ve="_metric_ok_1xgxh_174",_e="_metric_warn_1xgxh_179",pe="_metric_error_1xgxh_184",fe="_metricHeader_1xgxh_189",je="_metricIcon_1xgxh_200",Ce="_metricTitle_1xgxh_204",we="_metricValue_1xgxh_208",Ne="_metricSubtitle_1xgxh_215",ye="_guideCard_1xgxh_225",Te="_guideTitle_1xgxh_232",Se="_checklist_1xgxh_239",be="_feedEmpty_1xgxh_263",Ie="_feedList_1xgxh_270",ke="_feedItem_1xgxh_278",De="_feedTime_1xgxh_291",Me="_feedIcon_1xgxh_298",Pe="_feedSummary_1xgxh_304",Ee="_feedText_1xgxh_313",Be="_feedContext_1xgxh_321",He="_feedItemClickable_1xgxh_330",Re="_feedChevron_1xgxh_338",$e="_feedDetail_1xgxh_347",Ge="_feedDetailPre_1xgxh_356",Le="_feedDetailText_1xgxh_365",Fe="_changelogSummary_1xgxh_372",Ue="_changeTag_1xgxh_381",Ve="_tierBar_1xgxh_393",Ae="_tierBarTrack_1xgxh_399",ze="_tierBarFillBasic_1xgxh_407",Oe="_tierBarFillPro_1xgxh_412",Je="_tierLabels_1xgxh_417",s={page:W,card:Y,cardHeader:Z,disconnectCard:ee,disconnectIcon:te,disconnectTitle:se,disconnectMessage:ne,reconnectGuide:ie,guideStep:re,stepNumber:ce,reconnectIndicator:ae,reconnectDot:oe,pulse:le,disconnectActions:de,btn:me,btnSecondary:xe,metricRow:ge,metricGrid:he,metricCard:ue,metric_ok:ve,metric_warn:_e,metric_error:pe,metricHeader:fe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Te,checklist:Se,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedText:Ee,feedContext:Be,feedItemClickable:He,feedChevron:Re,feedDetail:$e,feedDetailPre:Ge,feedDetailText:Le,changelogSummary:Fe,changeTag:Ue,tierBar:Ve,tierBarTrack:Ae,tierBarFillBasic:ze,tierBarFillPro:Oe,tierLabels:Je};function N({title:e,value:i,icon:r,subtitle:c,status:a,children:n}){const d=a?s[`metric_${a}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${d}`,children:[t.jsxs("div",{className:s.metricHeader,children:[r&&t.jsx("span",{className:s.metricIcon,children:r}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),c&&t.jsx("div",{className:s.metricSubtitle,children:c}),n]})}function Xe(e){var r,c;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((c=(r=i==null?void 0:i.affectedAreas)==null?void 0:r[0])==null?void 0:c.label)??(i==null?void 0:i.testScenario)??null}function E({changes:e}){const{t:i}=$(),[r,c]=u.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=r===n,o=a.raw,v=o&&(o.before!=null||o.after!=null||o.details!=null),_=Xe(o);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${v?s.feedItemClickable:""}`,onClick:()=>v&&c(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:a.summary}),_&&t.jsx("span",{className:s.feedContext,children:_})]}),v&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&o&&t.jsx("div",{className:s.feedDetail,children:t.jsx(qe,{change:o})})]},n)})})}function qe({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(z,{before:e.before,after:e.after}):e.category==="property"?t.jsx(O,{before:e.before,after:e.after}):e.details?t.jsx("pre",{className:s.feedDetailPre,children:JSON.stringify(e.details,null,2)}):t.jsx("div",{className:s.feedDetailText,children:e.target})}const B=20;function G(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return G(new Date)}function R(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Ke(){const{level:e,status:i}=L(),r=J(),[c,a]=u.useState(null),[n,d]=u.useState(null),[o,v]=u.useState(null),[_,g]=u.useState([]),y=u.useRef(null),T=u.useCallback(async()=>{try{const l=await D.get("/connection-info");a(l)}catch{a(null)}},[]),S=u.useCallback(async()=>{try{const l=await D.get("/api/dashboard/changelog/active");if(v(l),l.recentChanges&&l.recentChanges.length>0){const p=l.recentChanges.map(h=>({timestamp:h.timestamp?G(new Date(h.timestamp)):H(),icon:R(h.category),summary:h.summary,category:h.category,raw:h}));g(p)}}catch{v(null)}},[]),f=u.useCallback(async()=>{try{const l=await D.get("/sync/status");d(l)}catch{d(null)}},[]);return u.useEffect(()=>{e!=="disconnected"?(T(),S(),f()):(a(null),d(null),v(null));const l=new F;y.current=l,l.connect();const p=l.on("game_change",j=>{const m=j,C={timestamp:H(),icon:R(m.category),summary:m.summary,category:m.category};g(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),S()}),h=l.on("sync",j=>{const m=j;d(C=>({...C,state:m.status,...m.placeId?{placeId:m.placeId}:{}}))});return()=>{p(),h(),l.disconnect(),y.current=null}},[e,T,S,f]),{level:e,status:i,connectionInfo:c,syncStatus:n,changeSummary:o,recentChanges:_,tier:r}}function M(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Qe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function We(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,i,r,c){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:r}),": ",c]},i)}function x(e,i){return t.jsx(U,{text:i,children:e})}function ct(){var w,P;const{t:e}=$(),{level:i,status:r,connectionInfo:c,syncStatus:a,changeSummary:n,recentChanges:d,tier:o}=Ke(),v=q(r==null?void 0:r.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const _=(c==null?void 0:c.mcpInstanceCount)??0,g=((w=c==null?void 0:c.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=c==null?void 0:c.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(r==null?void 0:r.pluginClients)??[],T=y.length>0,S=(r==null?void 0:r.sessionId)??(c==null?void 0:c.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),l=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),p=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),h=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=r?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${r.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(r.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(v??r.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:x(e("overview.metric.server"),f),value:x(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:x(e("overview.metric.agent"),p),value:x((g==null?void 0:g.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:_>1?`${_} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:g?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")}),t.jsx("li",{children:e("overview.l1.check3")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),d.length>0?t.jsx(E,{changes:d}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&M(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",M(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const m=y[0],C=n?M(n):0,k=!!n&&C>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(N,{title:x(e("overview.metric.server"),f),value:x(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:x(e("overview.metric.plugin"),l),value:x(e(T?"status.online":"status.offline"),l),icon:"🔌",subtitle:m?`${m.placeName??m.projectName??"-"} / v${m.pluginVersion??"-"}`:void 0,status:T?"ok":"error"}),t.jsx(N,{title:x(e("overview.metric.agent"),p),value:x((g==null?void 0:g.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:_>1?`${_} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:g?"ok":"warn"}),t.jsx(N,{title:x(e("overview.metric.sync"),h),value:x(Qe(a==null?void 0:a.state,e),h),icon:"🔄",status:We(a==null?void 0:a.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(E,{changes:d})]}),k&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",C]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]}),!o.loading&&o.tier==="basic"&&o.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:o.basicCalls,proCalls:o.proCalls,totalCalls:o.totalCalls,proUsagePercent:o.proUsagePercent,upgradeHref:X.overview})]})]})}export{ct as Component};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{r as n,a as v,u as S,j as e,T as x,i as A}from"./index-BNdn6WpU.js";import{u as H,T as D,D as E,a as U}from"./TierComparison-D4uVUGcZ.js";import{I as R}from"./InfoLabel-B_Ys60mi.js";import{C as $}from"./ConfirmModal-CInBBLZW.js";const O=5e3;function F(t){const o=(t==null?void 0:t.enabled)??!0,[d,r]=n.useState([]),[a,i]=n.useState(null),[m,l]=n.useState(o),c=n.useRef(null),p=n.useCallback(async()=>{try{const _=await v.get("/api/dashboard/playtest/history");r(_.entries??[])}catch{r([])}},[]),u=n.useCallback(async()=>{if(!o){l(!1);return}await p(),l(!1)},[o,p]),y=n.useCallback(async()=>{o&&(await v.post("/api/dashboard/playtest/history/clear"),r([]),i(null))},[o]),w=n.useCallback(async _=>{if(o)try{const g=await v.get(`/api/dashboard/playtest/report/${_}`);i(g)}catch{i(null)}},[o]);return n.useEffect(()=>{if(!o){l(!1);return}return u(),c.current=setInterval(u,O),()=>{c.current&&clearInterval(c.current)}},[o,u]),{history:d,selectedReport:a,loading:m,loadReport:w,clearHistory:y}}function W(t){const o="2026-03-27T15:26:00.000Z",d={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:o,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:d}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
|
|
2
|
+
|
|
3
|
+
- Spawn flow: PASS
|
|
4
|
+
- HUD countdown: PASS
|
|
5
|
+
- Wave bootstrap: PASS
|
|
6
|
+
|
|
7
|
+
This is a sample preview. Upgrade to Pro to save and review real automated playtest reports.`),logs:t("playtest.sample.report.logs",`[sample] boot playtest preview
|
|
8
|
+
[sample] spawn protection active
|
|
9
|
+
[sample] hud countdown rendered
|
|
10
|
+
[sample] wave one completed
|
|
11
|
+
[sample] preview report finished`),contextId:"sample_playtest_preview",contextSummary:d}}}const V="_page_wjm6d_2",z="_sampleBanner_wjm6d_9",G="_sampleBannerRow_wjm6d_21",X="_sampleBannerMain_wjm6d_28",Y="_sampleBadge_wjm6d_35",Z="_sampleTitle_wjm6d_50",q="_sampleMessage_wjm6d_57",J="_sampleActions_wjm6d_64",K="_primaryAction_wjm6d_72",Q="_secondaryAction_wjm6d_73",ee="_card_wjm6d_109",te="_cardHeader_wjm6d_116",se="_clearButton_wjm6d_128",ae="_statusRow_wjm6d_143",oe="_statusIndicator_wjm6d_150",re="_statusRunning_wjm6d_158",ne="_statusPaused_wjm6d_163",le="_statusNotRunning_wjm6d_167",ie="_statusLabel_wjm6d_171",ce="_statusMeta_wjm6d_178",de="_controlButtons_wjm6d_184",me="_btn_wjm6d_191",pe="_btnPrimary_wjm6d_213",ue="_btnDanger_wjm6d_223",he="_historyList_wjm6d_233",ye="_historyItem_wjm6d_241",_e="_historyItemSelected_wjm6d_260",xe="_historyItemHeader_wjm6d_265",je="_historyIcon_wjm6d_271",we="_historyTimestamp_wjm6d_276",ge="_historyName_wjm6d_283",ve="_historyItemMeta_wjm6d_293",Se="_historyMode_wjm6d_302",fe="_historyDuration_wjm6d_306",be="_historyStatus_wjm6d_310",Ne="_status_passed_wjm6d_317",Ce="_status_failed_wjm6d_321",Le="_status_running_wjm6d_325",Ie="_historyError_wjm6d_329",Re="_historyContext_wjm6d_339",Be="_historyContextLine_wjm6d_348",Pe="_historyContextLabel_wjm6d_354",Te="_reportContainer_wjm6d_363",Me="_reportContextPanel_wjm6d_369",ke="_reportContextRow_wjm6d_379",Ae="_reportContextLabel_wjm6d_387",He="_reportSection_wjm6d_395",De="_reportSectionHeader_wjm6d_401",Ee="_reportMarkdown_wjm6d_413",Ue="_reportLogs_wjm6d_426",$e="_emptyState_wjm6d_441",Oe="_emptyStateTitle_wjm6d_448",Fe="_emptyStateMessage_wjm6d_456",We="_upgradePanel_wjm6d_465",Ve="_upgradePanelIcon_wjm6d_473",ze="_upgradePanelTitle_wjm6d_478",Ge="_upgradePanelDesc_wjm6d_486",Xe="_benefitList_wjm6d_496",Ye="_benefitItem_wjm6d_507",Ze="_upgradeActions_wjm6d_522",s={page:V,sampleBanner:z,sampleBannerRow:G,sampleBannerMain:X,sampleBadge:Y,sampleTitle:Z,sampleMessage:q,sampleActions:J,primaryAction:K,secondaryAction:Q,card:ee,cardHeader:te,clearButton:se,statusRow:ae,statusIndicator:oe,statusRunning:re,statusPaused:ne,statusNotRunning:le,statusLabel:ie,statusMeta:ce,controlButtons:de,btn:me,btnPrimary:pe,btnDanger:ue,historyList:he,historyItem:ye,historyItemSelected:_e,historyItemHeader:xe,historyIcon:je,historyTimestamp:we,historyName:ge,historyItemMeta:ve,historyMode:Se,historyDuration:fe,historyStatus:be,status_passed:Ne,status_failed:Ce,status_running:Le,historyError:Ie,historyContext:Re,historyContextLine:Be,historyContextLabel:Pe,reportContainer:Te,reportContextPanel:Me,reportContextRow:ke,reportContextLabel:Ae,reportSection:He,reportSectionHeader:De,reportMarkdown:Ee,reportLogs:Ue,emptyState:$e,emptyStateTitle:Oe,emptyStateMessage:Fe,upgradePanel:We,upgradePanelIcon:Ve,upgradePanelTitle:ze,upgradePanelDesc:Ge,benefitList:Xe,benefitItem:Ye,upgradeActions:Ze};function j(t){return t.trim().toLowerCase()}function qe(t){switch(j(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Je(t,o){switch(j(o)){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 o}}function Ke(t,o){switch(j(o)){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 Qe(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function et({entries:t,onSelect:o,selectedTimestamp:d}){const{t:r}=S();return t.length===0?e.jsx("div",{className:s.emptyState,children:r("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(a=>{var m,l,c,p,u,y;const i=a.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${i?s.historyItemSelected:""}`,onClick:()=>o(a.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:qe(a.status)}),e.jsx("span",{className:s.historyTimestamp,children:a.timestamp}),e.jsx("span",{className:s.historyName,children:a.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(x,{text:r("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[r("playtest.history.mode","Mode"),": ",Je(r,a.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Qe(a.durationMs)}),e.jsx(x,{text:r("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${j(a.status)}`]??""}`,children:Ke(r,a.status)})})]}),a.errorMessage&&e.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((m=a.contextSummary)==null?void 0:m.testScenario)||((l=a.contextSummary)==null?void 0:l.expectedBehavior)||((c=a.contextSummary)==null?void 0:c.observedBehavior))&&e.jsxs("div",{className:s.historyContext,children:[a.contextId&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.contextId","Context ID")}),e.jsx("span",{children:a.contextId})]}),((p=a.contextSummary)==null?void 0:p.testScenario)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.why","Why this test ran")}),e.jsx("span",{children:a.contextSummary.testScenario})]}),((u=a.contextSummary)==null?void 0:u.expectedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.expected","Expected")}),e.jsx("span",{children:a.contextSummary.expectedBehavior})]}),((y=a.contextSummary)==null?void 0:y.observedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.observed","Observed")}),e.jsx("span",{children:a.contextSummary.observedBehavior})]})]})]},a.timestamp)})})}function tt({report:t}){var r,a,i,m,l,c;const{t:o}=S(),d=!!((r=t.contextSummary)!=null&&r.testScenario||(a=t.contextSummary)!=null&&a.expectedBehavior||(i=t.contextSummary)!=null&&i.observedBehavior);return e.jsxs("div",{className:s.reportContainer,children:[d&&e.jsxs("div",{className:s.reportContextPanel,children:[((m=t.contextSummary)==null?void 0:m.testScenario)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.why","Why this test ran")}),e.jsx("span",{children:t.contextSummary.testScenario})]}),((l=t.contextSummary)==null?void 0:l.expectedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.expected","Expected")}),e.jsx("span",{children:t.contextSummary.expectedBehavior})]}),((c=t.contextSummary)==null?void 0:c.observedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.observed","Observed")}),e.jsx("span",{children:t.contextSummary.observedBehavior})]})]}),t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(x,{text:o("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:o("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(x,{text:o("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:o("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:o("playtest.report.empty","No report content available")})]})}function nt(){var L;const{t}=S(),{tier:o,loading:d}=H(),r=!d&&o==="basic",a=F({enabled:!r}),{show:i}=A(),[m,l]=n.useState(null),[c,p]=n.useState(!1),[u,y]=n.useState(!1),[w,_]=n.useState(!1),{history:g,selectedReport:B,loading:P}=a,h=r?W(t):null,f=((L=h==null?void 0:h.history[0])==null?void 0:L.timestamp)??null,b=r?m??f:m,N=(h==null?void 0:h.history)??g,C=h&&b===f?h.report:B,T=r?!1:P,M=I=>{l(I),!r&&a.loadReport(I)},k=async()=>{y(!0);try{await a.clearHistory(),i(t("toast.clearSuccess","Cleared successfully"),"success"),p(!1),l(null)}catch{i(t("toast.clearFailed","Failed to clear data"),"error")}finally{y(!1)}};return e.jsxs("div",{className:s.page,children:[r&&e.jsxs("div",{className:s.sampleBanner,children:[e.jsxs("div",{className:s.sampleBannerRow,children:[e.jsxs("div",{className:s.sampleBannerMain,children:[e.jsx("div",{className:s.sampleBadge,children:t("playtest.sample.badge","Preview of the Pro playtest view")}),e.jsx("div",{className:s.sampleTitle,children:t("playtest.sample.title","You are previewing the report viewer that becomes available after upgrading to Pro.")}),e.jsx("div",{className:s.sampleMessage,children:t("playtest.sample.message","This preview uses sample data. Real playtest history management and stored reports unlock with Pro.")})]}),e.jsxs("div",{className:s.sampleActions,children:[e.jsx("button",{className:s.secondaryAction,onClick:()=>_(!0),children:t("tier.compare","Basic vs Pro")}),e.jsx("a",{className:s.primaryAction,href:D.playtest,target:"_blank",rel:"noreferrer",children:t("tier.upgrade","Upgrade to Pro")})]})]}),e.jsx(E,{variant:"centered"})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(R,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),r?e.jsx(x,{text:t("playtest.sample.clearDisabled","Upgrade to Pro to clear live playtest history."),children:e.jsx("span",{children:e.jsx("button",{className:s.clearButton,disabled:!0,children:t("common.clear","Clear")})})}):e.jsx("button",{className:s.clearButton,onClick:()=>p(!0),children:t("common.clear","Clear")})]}),T?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):N.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(x,{text:t("playtest.empty.runTest.tooltip","WROX 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(et,{entries:N,onSelect:M,selectedTimestamp:b??void 0})]}),C&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(R,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(tt,{report:C})]}),!r&&e.jsx($,{open:c,title:t("playtest.clear.title","Clear test history?"),message:t("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:u,onCancel:()=>!u&&p(!1),onConfirm:k}),w&&e.jsx(U,{onClose:()=>_(!1)})]})}export{nt as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_wjm6d_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._sampleBanner_wjm6d_9{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card)}._sampleBannerRow_wjm6d_21{display:flex;align-items:center;justify-content:space-between;gap:20px}._sampleBannerMain_wjm6d_28{display:flex;flex-direction:column;gap:8px;min-width:0}._sampleBadge_wjm6d_35{width:fit-content;padding:0;border-radius:0;background:none;border:none;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:none;opacity:.92}._sampleTitle_wjm6d_50{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_wjm6d_57{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_wjm6d_64{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_wjm6d_72,._secondaryAction_wjm6d_73{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_wjm6d_73{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_wjm6d_73:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_wjm6d_72{border:1px solid var(--pro-badge);background:var(--pro-badge);color:#1a1407}._primaryAction_wjm6d_72:hover{opacity:.9}._card_wjm6d_109{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_wjm6d_116{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_wjm6d_128{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._clearButton_wjm6d_128:disabled{cursor:not-allowed;opacity:.55}._statusRow_wjm6d_143{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_wjm6d_150{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_wjm6d_158{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_wjm6d_163{background:var(--warning)}._statusNotRunning_wjm6d_167{background:var(--text-muted)}._statusLabel_wjm6d_171{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_wjm6d_178{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_wjm6d_184{display:flex;gap:8px;margin-top:12px}._btn_wjm6d_191{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_wjm6d_191:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_wjm6d_191:disabled{opacity:.4;pointer-events:none}._btnPrimary_wjm6d_213{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_wjm6d_213:hover{opacity:.9}._btnDanger_wjm6d_223{border-color:var(--error);color:var(--error)}._btnDanger_wjm6d_223:hover{background:#ef44441a}._historyList_wjm6d_233{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_wjm6d_241{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_wjm6d_241:hover{border-color:var(--accent)}._historyItemSelected_wjm6d_260{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_wjm6d_265{display:flex;align-items:center;gap:8px}._historyIcon_wjm6d_271{font-size:14px;flex-shrink:0}._historyTimestamp_wjm6d_276{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_wjm6d_283{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_wjm6d_293{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_wjm6d_302{color:var(--text-muted)}._historyDuration_wjm6d_306{color:var(--text-secondary)}._historyStatus_wjm6d_310{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_wjm6d_317{color:var(--success)}._status_failed_wjm6d_321{color:var(--error)}._status_running_wjm6d_325{color:var(--accent)}._historyError_wjm6d_329{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyContext_wjm6d_339{display:flex;flex-direction:column;gap:4px;padding-left:22px;color:var(--text-secondary);font-size:11px}._historyContextLine_wjm6d_348{display:flex;flex-direction:column;gap:2px}._historyContextLabel_wjm6d_354{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportContainer_wjm6d_363{display:flex;flex-direction:column;gap:12px}._reportContextPanel_wjm6d_369{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._reportContextRow_wjm6d_379{display:flex;flex-direction:column;gap:4px;color:var(--text-primary);font-size:12px}._reportContextLabel_wjm6d_387{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportSection_wjm6d_395{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_wjm6d_401{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_wjm6d_413{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_wjm6d_426{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_wjm6d_441{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_wjm6d_448{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_wjm6d_456{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_wjm6d_465{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_wjm6d_473{font-size:32px;margin-bottom:12px}._upgradePanelTitle_wjm6d_478{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_wjm6d_486{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_wjm6d_496{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_wjm6d_507{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_wjm6d_507:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_wjm6d_522{display:flex;gap:8px;justify-content:center}@media(max-width:720px){._sampleBannerRow_wjm6d_21{flex-direction:column;align-items:stretch}._sampleActions_wjm6d_64{justify-content:stretch}._primaryAction_wjm6d_72,._secondaryAction_wjm6d_73{width:100%}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as f,r as h,j as n}from"./index-
|
|
1
|
+
import{u as f,r as h,j as n}from"./index-BNdn6WpU.js";const _="_container_uv8oc_2",p="_header_uv8oc_10",N="_modeBtn_uv8oc_18",x="_modeBtnActive_uv8oc_33",v="_unifiedView_uv8oc_40",j="_diffLine_uv8oc_46",y="_lineNum_uv8oc_55",g="_lineContent_uv8oc_64",C="_lineAdded_uv8oc_68",B="_lineRemoved_uv8oc_73",V="_lineContext_uv8oc_78",w="_sideBySide_uv8oc_83",L="_sidePane_uv8oc_90",$="_sideLabel_uv8oc_100",b="_sideContent_uv8oc_112",A="_empty_uv8oc_117",e={container:_,header:p,modeBtn:N,modeBtnActive:x,unifiedView:v,diffLine:j,lineNum:y,lineContent:g,lineAdded:C,lineRemoved:B,lineContext:V,sideBySide:w,sidePane:L,sideLabel:$,sideContent:b,empty:A};function S(t,c){const d=t.split(`
|
|
2
2
|
`),l=c.split(`
|
|
3
3
|
`),a=[],m=Math.max(d.length,l.length);let s=0,i=0;for(;(s<d.length||i<l.length)&&(s<d.length&&i<l.length?d[s]===l[i]?(a.push({type:"context",content:d[s],lineNum:i+1}),s++,i++):(a.push({type:"removed",content:d[s],lineNum:s+1}),s++,s<d.length&&d[s]===l[i]?(a.push({type:"added",content:l[i],lineNum:i+1}),i++):i<l.length&&(a.push({type:"added",content:l[i],lineNum:i+1}),i++)):s<d.length?(a.push({type:"removed",content:d[s],lineNum:s+1}),s++):i<l.length&&(a.push({type:"added",content:l[i],lineNum:i+1}),i++),!(a.length>m*3)););return a}function E({before:t,after:c}){const{t:d}=f(),[l,a]=h.useState("unified"),m=h.useMemo(()=>S(t??"",c??""),[t,c]);if(!t&&!c)return n.jsx("div",{className:e.container,children:n.jsx("div",{className:e.empty,children:d("changelog.diff.empty","No diff available")})});if(!t&&c){const s=c.split(`
|
|
4
4
|
`);return n.jsx("div",{className:e.container,children:n.jsx("div",{className:e.unifiedView,children:s.map((i,u)=>n.jsxs("div",{className:`${e.diffLine} ${e.lineAdded}`,children:[n.jsx("span",{className:e.lineNum,children:u+1}),n.jsxs("span",{className:e.lineContent,children:["+ ",i]})]},u))})})}return n.jsxs("div",{className:e.container,children:[n.jsxs("div",{className:e.header,children:[n.jsx("button",{className:`${e.modeBtn} ${l==="unified"?e.modeBtnActive:""}`,onClick:()=>a("unified"),children:d("changelog.diff.unified","Unified")}),n.jsx("button",{className:`${e.modeBtn} ${l==="side-by-side"?e.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:d("changelog.diff.sideBySide","Side by Side")})]}),l==="unified"?n.jsx("div",{className:e.unifiedView,children:m.map((s,i)=>n.jsxs("div",{className:`${e.diffLine} ${s.type==="added"?e.lineAdded:s.type==="removed"?e.lineRemoved:e.lineContext}`,children:[n.jsx("span",{className:e.lineNum,children:s.lineNum??""}),n.jsxs("span",{className:e.lineContent,children:[s.type==="added"?"+ ":s.type==="removed"?"- ":" ",s.content]})]},i))}):n.jsxs("div",{className:e.sideBySide,children:[n.jsxs("div",{className:e.sidePane,children:[n.jsx("div",{className:e.sideLabel,children:d("changelog.diff.before","Before")}),n.jsx("div",{className:e.sideContent,children:(t??"").split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,r as c,f as M,D as $,e as F,g as G,h as W,a as w,u as X,j as e,T as b,A as q,S as U}from"./index-E1cuNPsJ.js";import{I as o}from"./InfoLabel-CBAqTqRy.js";function K(){const{level:s}=P(),[r,y]=c.useState(null),[u,i]=c.useState(null),[C,T]=c.useState(null),[A,m]=c.useState(!1),[p,S]=c.useState(!0),[O,f]=c.useState(!1),[B,L]=c.useState(null),g="gumroad",_=s==="disconnected",h=c.useCallback(n=>{n&&i(l=>({...l,...n,maskedKey:n.maskedKey??(l==null?void 0:l.maskedKey),provider:n.provider??(l==null?void 0:l.provider)??g}))},[g]),N=c.useCallback(n=>{if(!n){i(null);return}i({...n,provider:n.provider??g})},[g]),x=c.useCallback(async()=>{try{return await M(g)}catch{return null}},[g]);c.useEffect(()=>{let n=!1;async function l(){try{const[a,d,v]=await Promise.all([w.get("/api/dashboard/settings").catch(()=>null),x(),w.get("/sync/config").catch(()=>null)]);if(n)return;a&&y(a),d&&h(d),v&&T(v)}catch{}finally{n||S(!1)}}return l(),()=>{n=!0}},[x,h]),c.useEffect(()=>{const n=new $;n.connect();const l=n.on("license",a=>{x().then(d=>{if(d){if((a==null?void 0:a.cleared)===!0){N(d);return}h(d)}})});return()=>{l(),n.disconnect()}},[x,h,N]);const j=c.useCallback((n,l)=>{L(n??l)},[]),R=c.useCallback(async n=>{if(_)return!1;if(!n.trim())return L("License key is required."),!1;f(!0);try{const l=await F({provider:g,licenseKey:n.trim()});return h(l.license),j(l.message,l.ok?"License updated.":"License activation failed."),l.ok}catch{return L("License activation failed."),!1}finally{f(!1)}},[j,_,g,h]),I=c.useCallback(async()=>{if(!_){f(!0);try{const n=await G({provider:g});h(n.license),j(n.message,n.ok?"License updated.":"License refresh failed.")}catch{L("License refresh failed.")}finally{f(!1)}}},[j,_,g,h]),D=c.useCallback(async()=>{if(!_){f(!0);try{const n=await W({provider:g});N(n.license),j(n.message,n.ok?"License reset.":"License reset failed.")}catch{L("License reset failed.")}finally{f(!1)}}},[j,_,g,N]),E=c.useCallback(async(n,l)=>{if(r){y(a=>a&&{...a,hot:{...a.hot,[n]:l}}),m(!0);try{await w.patch("/api/dashboard/settings",{[n]:l})}catch{y(a=>a&&{...a,hot:{...a.hot,[n]:r.hot[n]}})}finally{m(!1)}}},[r]),k=c.useCallback(async n=>{m(!0);try{const l=await w.post("/sync/config",n);T(l)}catch{}finally{m(!1)}},[]);return{settings:r,license:u,syncConfig:C,saving:A,licenseProvider:g,licenseControlsDisabled:_,licenseSubmitting:O,licenseMessage:B,activateLicense:R,refreshLicense:I,resetLicense:D,updateHotSetting:E,updateSyncConfig:k,loading:p}}const V="_page_amh3j_2",Q="_card_amh3j_10",Y="_licenseCardPro_amh3j_17",z="_cardHeader_amh3j_28",J="_headerBadge_amh3j_42",Z="_headerBadgeLive_amh3j_53",ee="_licenseGrid_amh3j_59",se="_statusDot_amh3j_77",te="_statusActive_amh3j_86",ae="_statusGrace_amh3j_91",ne="_statusInactive_amh3j_96",ie="_statusError_amh3j_100",le="_proBadge_amh3j_105",ce="_upgradeLink_amh3j_119",oe="_licenseControls_amh3j_133",re="_licenseControlRow_amh3j_142",de="_licenseField_amh3j_149",ge="_licenseFieldGrow_amh3j_155",ue="_controlLabel_amh3j_160",he="_textInput_amh3j_166",me="_actionBtn_amh3j_182",pe="_licenseMessage_amh3j_204",je="_licenseNotice_amh3j_211",_e="_licenseNoticeInfo_amh3j_221",xe="_licenseNoticeWarning_amh3j_227",ve="_licenseNoticeMuted_amh3j_233",be="_settingRow_amh3j_239",fe="_settingLabel_amh3j_253",Le="_settingControl_amh3j_260",ye="_select_amh3j_269",Ne="_numberInput_amh3j_287",Ce="_toggleSwitch_amh3j_305",Te="_toggleInput_amh3j_312",Se="_toggleTrack_amh3j_320",Re="_toggleThumb_amh3j_342",Ie="_savedIndicator_amh3j_391",Ee="_savedIndicatorHidden_amh3j_402",ke="_coldGrid_amh3j_407",we="_coldHint_amh3j_425",Ae="_syncForm_amh3j_434",Oe="_syncRow_amh3j_440",Be="_syncField_amh3j_447",De="_saveBtn_amh3j_461",He="_langRow_amh3j_485",Pe="_loading_amh3j_498",Me="_unit_amh3j_507",t={page:V,card:Q,licenseCardPro:Y,cardHeader:z,headerBadge:J,headerBadgeLive:Z,licenseGrid:ee,statusDot:se,statusActive:te,statusGrace:ae,statusInactive:ne,statusError:ie,proBadge:le,upgradeLink:ce,licenseControls:oe,licenseControlRow:re,licenseField:de,licenseFieldGrow:ge,controlLabel:ue,textInput:he,actionBtn:me,licenseMessage:pe,licenseNotice:je,licenseNoticeInfo:_e,licenseNoticeWarning:xe,licenseNoticeMuted:ve,settingRow:be,settingLabel:fe,settingControl:Le,select:ye,numberInput:Ne,toggleSwitch:Ce,toggleInput:Te,toggleTrack:Se,toggleThumb:Re,savedIndicator:Ie,savedIndicatorHidden:Ee,coldGrid:ke,coldHint:we,syncForm:Ae,syncRow:Oe,syncField:Be,saveBtn:De,langRow:He,loading:Pe,unit:Me},$e={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},Fe=["debug","info","warn","error"];function Ge(s){return s==="active"?t.statusActive:s==="grace"?t.statusGrace:s==="invalid"||s==="revoked"?t.statusError:t.statusInactive}function We(s,r){return s.refreshBlockedReason==="missing_session_token"?{label:r("settings.license.status.activationRequired","Activation Required"),tooltip:r("settings.license.status.activationRequired.tooltip","Manual license activation is required before WROX Dashboard can refresh this status."),detail:r("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:t.licenseNoticeWarning}:s.statusDetail==="grace_provider_unavailable"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:r("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:t.licenseNoticeInfo}:s.statusDetail==="grace_cancelled"||s.statusDetail==="grace_expired"||s.statusDetail==="grace_payment_failed"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:r("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:t.licenseNoticeInfo}:{label:r(`settings.license.${s.status}`,s.status),tooltip:r(`settings.license.${s.status}.tooltip`,"Current license activation state."),detail:s.refreshRequired?r("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:t.licenseNoticeMuted}}function H({checked:s,onChange:r,testId:y,ariaLabel:u}){return e.jsxs("label",{className:t.toggleSwitch,"data-testid":y,children:[e.jsx("input",{type:"checkbox",className:t.toggleInput,checked:s,"aria-label":u,onChange:i=>r(i.target.checked)}),e.jsx("span",{className:t.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:t.toggleThumb})})]})}function Ue(){const{t:s,selectedLocale:r,setLocale:y}=X(),{settings:u,license:i,syncConfig:C,saving:T,licenseProvider:A,licenseControlsDisabled:m,licenseSubmitting:p,licenseMessage:S,activateLicense:O,refreshLicense:f,resetLicense:B,updateHotSetting:L,updateSyncConfig:g,loading:_}=K(),[h,N]=c.useState(null),[x,j]=c.useState({}),[R,I]=c.useState(""),D=i?We(i,s):null,E=(i==null?void 0:i.tier)==="pro",k=(i==null?void 0:i.tier)==="pro"?i.maskedKey:void 0;c.useEffect(()=>{C&&j({maxDepth:C.maxDepth,maxInstances:C.maxInstances})},[C]);const n=c.useCallback(async(a,d)=>{await L(a,d),N(a),setTimeout(()=>N(v=>v===a?null:v),2e3)},[L]),l=c.useCallback(async()=>{await g(x)},[g,x]);return _?e.jsx("div",{className:t.page,children:e.jsx("div",{className:t.loading,children:s("common.loading")})}):e.jsxs("div",{className:t.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[t.card,(i==null?void 0:i.tier)==="pro"?t.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.license.title","License"),tooltip:s("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(b,{text:m?s("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WROX Dashboard."):s("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${t.headerBadge} ${m?"":t.headerBadgeLive}`,children:m?s("settings.license.disconnected","Disconnected"):s("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[i?e.jsxs(e.Fragment,{children:[(()=>{const a=D;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.licenseGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.status","Status"),tooltip:s("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${t.statusDot} ${Ge(i.status)}`}),e.jsx(b,{text:(a==null?void 0:a.tooltip)??s(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:(a==null?void 0:a.label)??s(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.tier","Tier"),tooltip:s("settings.license.tier.tooltip","Current subscription tier for available WROX Dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?t.proBadge:"",children:e.jsx(b,{text:s(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?s("tier.pro","Pro"):s("tier.basic","Basic")})}),k&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.key","Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:k})})]}),i.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.license.providerValue.tooltip","License provider used to validate this key."),children:i.provider})})]})]}),(a==null?void 0:a.detail)&&e.jsx("p",{className:`${t.licenseNotice} ${a.detailTone}`,children:i.refreshBlockedReason==="missing_session_token"?s("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):a.detail}),i.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${t.licenseNotice} ${t.licenseNoticeMuted}`,children:a==null?void 0:a.detail})]})})(),i.tier==="basic"&&e.jsx("a",{className:t.upgradeLink,href:"https://gum.co/u/din5in7h",target:"_blank",rel:"noopener noreferrer",children:s("tier.upgrade")})]}):e.jsx("div",{className:t.loading,children:s("settings.license.unavailable")}),e.jsxs("div",{className:t.licenseControls,children:[e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:t.licenseField,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":s("settings.license.provider","Provider"),className:t.select,value:A,disabled:m||p,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p||!E,onClick:()=>{f()},children:p?s("common.loading"):s("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p||!E,onClick:()=>{B()},children:p?s("common.loading"):s("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:`${t.licenseField} ${t.licenseFieldGrow}`,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.keyInput","License Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":s("settings.license.keyInput","License Key"),className:t.textInput,type:"text",value:R,disabled:m||p,onChange:a=>I(a.target.value)})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p,onClick:()=>{(async()=>await O(R)&&I(""))()},children:p?s("common.loading"):s("settings.license.activate","Activate License")})]}),S&&e.jsx("p",{className:t.licenseMessage,children:S})]})]})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.general.title","General Settings"),tooltip:s("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(b,{text:s("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${t.headerBadge} ${t.headerBadgeLive}`,children:s("settings.general.liveApply","Live Apply")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.logLevel","Log Level"),tooltip:s("settings.general.logLevel.tooltip","Sets how much detail WROX Dashboard writes to its logs.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("select",{className:t.select,value:u.hot.LOG_LEVEL,onChange:a=>n("LOG_LEVEL",a.target.value),children:Fe.map(a=>e.jsx("option",{value:a,children:a},a))}),h==="LOG_LEVEL"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localHistory","Tool History Recording"),tooltip:s("settings.general.localHistory.tooltip","Stores local tool execution history for the WROX Dashboard history views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_LOCAL_HISTORY"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_LOCAL_HISTORY,ariaLabel:s("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:a=>n("ENABLE_LOCAL_HISTORY",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localStatistics","Tool Statistics Collection"),tooltip:s("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WROX Dashboard reporting.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_LOCAL_STATISTICS"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:s("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:a=>n("ENABLE_LOCAL_STATISTICS",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.contextCapture","Context Capture"),tooltip:s("settings.general.contextCapture.tooltip","When enabled, WROX Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_CONTEXT_CAPTURE"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:s("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:a=>n("ENABLE_CONTEXT_CAPTURE",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.requestTimeout","Request Timeout"),tooltip:s("settings.general.requestTimeout.tooltip","Maximum time WROX Dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"number",className:t.numberInput,value:u.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||n("REQUEST_TIMEOUT",d)}}),e.jsx(b,{text:s("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:t.unit,children:s("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.cold.title","Server Environment"),tooltip:s("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(b,{text:s("settings.readOnly.tooltip","This section shows values that cannot be edited from WROX Dashboard."),children:e.jsx("span",{className:t.headerBadge,children:s("settings.readOnly","Read-only")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.coldGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:"HTTP_PORT",tooltip:s("settings.cold.httpPort.tooltip","Port number used by the MCP WROX Dashboard HTTP server.")})}),e.jsx("dd",{children:u.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(o,{label:"HTTP_HOST",tooltip:s("settings.cold.httpHost.tooltip","Host interface that the MCP WROX Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:u.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(o,{label:"DASHBOARD_AUTO_OPEN",tooltip:s("settings.cold.dashboardAutoOpen.tooltip","Controls whether WROX Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WROX Dashboard in a browser."),children:String(u.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:t.coldHint,children:s("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.sync.title","Sync Settings"),tooltip:s("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:t.syncForm,children:[e.jsxs("div",{className:t.syncRow,children:[e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxDepth","Max Depth"),tooltip:s("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:x.maxDepth??10,min:1,max:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||j(v=>({...v,maxDepth:d}))}})]}),e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxInstances","Max Instances"),tooltip:s("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:x.maxInstances??5e3,min:100,max:5e4,step:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||j(v=>({...v,maxInstances:d}))}})]})]}),e.jsx("button",{className:t.saveBtn,onClick:l,disabled:T,children:T?s("common.loading"):s("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.language.title","Language"),tooltip:s("settings.language.title.tooltip","Choose how the WROX Dashboard interface text is localized.")})}),e.jsxs("div",{className:t.langRow,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.language.dashboard","WROX Dashboard Language"),tooltip:s("settings.language.dashboard.tooltip","Overrides the WROX Dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:t.select,value:r,onChange:a=>y(a.target.value),children:[e.jsx("option",{value:q,children:s("settings.language.auto","Auto")}),U.map(a=>e.jsx("option",{value:a,children:$e[a]??a},a))]})]})]})]})}export{Ue as Component};
|
|
1
|
+
import{d as P,r as c,f as M,D as $,e as F,g as G,h as W,a as w,u as X,j as e,T as b,A as q,S as U}from"./index-BNdn6WpU.js";import{I as o}from"./InfoLabel-B_Ys60mi.js";function K(){const{level:s}=P(),[r,y]=c.useState(null),[u,i]=c.useState(null),[C,T]=c.useState(null),[A,m]=c.useState(!1),[p,S]=c.useState(!0),[O,f]=c.useState(!1),[B,L]=c.useState(null),g="gumroad",_=s==="disconnected",h=c.useCallback(n=>{n&&i(l=>({...l,...n,maskedKey:n.maskedKey??(l==null?void 0:l.maskedKey),provider:n.provider??(l==null?void 0:l.provider)??g}))},[g]),N=c.useCallback(n=>{if(!n){i(null);return}i({...n,provider:n.provider??g})},[g]),x=c.useCallback(async()=>{try{return await M(g)}catch{return null}},[g]);c.useEffect(()=>{let n=!1;async function l(){try{const[a,d,v]=await Promise.all([w.get("/api/dashboard/settings").catch(()=>null),x(),w.get("/sync/config").catch(()=>null)]);if(n)return;a&&y(a),d&&h(d),v&&T(v)}catch{}finally{n||S(!1)}}return l(),()=>{n=!0}},[x,h]),c.useEffect(()=>{const n=new $;n.connect();const l=n.on("license",a=>{x().then(d=>{if(d){if((a==null?void 0:a.cleared)===!0){N(d);return}h(d)}})});return()=>{l(),n.disconnect()}},[x,h,N]);const j=c.useCallback((n,l)=>{L(n??l)},[]),R=c.useCallback(async n=>{if(_)return!1;if(!n.trim())return L("License key is required."),!1;f(!0);try{const l=await F({provider:g,licenseKey:n.trim()});return h(l.license),j(l.message,l.ok?"License updated.":"License activation failed."),l.ok}catch{return L("License activation failed."),!1}finally{f(!1)}},[j,_,g,h]),I=c.useCallback(async()=>{if(!_){f(!0);try{const n=await G({provider:g});h(n.license),j(n.message,n.ok?"License updated.":"License refresh failed.")}catch{L("License refresh failed.")}finally{f(!1)}}},[j,_,g,h]),D=c.useCallback(async()=>{if(!_){f(!0);try{const n=await W({provider:g});N(n.license),j(n.message,n.ok?"License reset.":"License reset failed.")}catch{L("License reset failed.")}finally{f(!1)}}},[j,_,g,N]),E=c.useCallback(async(n,l)=>{if(r){y(a=>a&&{...a,hot:{...a.hot,[n]:l}}),m(!0);try{await w.patch("/api/dashboard/settings",{[n]:l})}catch{y(a=>a&&{...a,hot:{...a.hot,[n]:r.hot[n]}})}finally{m(!1)}}},[r]),k=c.useCallback(async n=>{m(!0);try{const l=await w.post("/sync/config",n);T(l)}catch{}finally{m(!1)}},[]);return{settings:r,license:u,syncConfig:C,saving:A,licenseProvider:g,licenseControlsDisabled:_,licenseSubmitting:O,licenseMessage:B,activateLicense:R,refreshLicense:I,resetLicense:D,updateHotSetting:E,updateSyncConfig:k,loading:p}}const V="_page_amh3j_2",Q="_card_amh3j_10",Y="_licenseCardPro_amh3j_17",z="_cardHeader_amh3j_28",J="_headerBadge_amh3j_42",Z="_headerBadgeLive_amh3j_53",ee="_licenseGrid_amh3j_59",se="_statusDot_amh3j_77",te="_statusActive_amh3j_86",ae="_statusGrace_amh3j_91",ne="_statusInactive_amh3j_96",ie="_statusError_amh3j_100",le="_proBadge_amh3j_105",ce="_upgradeLink_amh3j_119",oe="_licenseControls_amh3j_133",re="_licenseControlRow_amh3j_142",de="_licenseField_amh3j_149",ge="_licenseFieldGrow_amh3j_155",ue="_controlLabel_amh3j_160",he="_textInput_amh3j_166",me="_actionBtn_amh3j_182",pe="_licenseMessage_amh3j_204",je="_licenseNotice_amh3j_211",_e="_licenseNoticeInfo_amh3j_221",xe="_licenseNoticeWarning_amh3j_227",ve="_licenseNoticeMuted_amh3j_233",be="_settingRow_amh3j_239",fe="_settingLabel_amh3j_253",Le="_settingControl_amh3j_260",ye="_select_amh3j_269",Ne="_numberInput_amh3j_287",Ce="_toggleSwitch_amh3j_305",Te="_toggleInput_amh3j_312",Se="_toggleTrack_amh3j_320",Re="_toggleThumb_amh3j_342",Ie="_savedIndicator_amh3j_391",Ee="_savedIndicatorHidden_amh3j_402",ke="_coldGrid_amh3j_407",we="_coldHint_amh3j_425",Ae="_syncForm_amh3j_434",Oe="_syncRow_amh3j_440",Be="_syncField_amh3j_447",De="_saveBtn_amh3j_461",He="_langRow_amh3j_485",Pe="_loading_amh3j_498",Me="_unit_amh3j_507",t={page:V,card:Q,licenseCardPro:Y,cardHeader:z,headerBadge:J,headerBadgeLive:Z,licenseGrid:ee,statusDot:se,statusActive:te,statusGrace:ae,statusInactive:ne,statusError:ie,proBadge:le,upgradeLink:ce,licenseControls:oe,licenseControlRow:re,licenseField:de,licenseFieldGrow:ge,controlLabel:ue,textInput:he,actionBtn:me,licenseMessage:pe,licenseNotice:je,licenseNoticeInfo:_e,licenseNoticeWarning:xe,licenseNoticeMuted:ve,settingRow:be,settingLabel:fe,settingControl:Le,select:ye,numberInput:Ne,toggleSwitch:Ce,toggleInput:Te,toggleTrack:Se,toggleThumb:Re,savedIndicator:Ie,savedIndicatorHidden:Ee,coldGrid:ke,coldHint:we,syncForm:Ae,syncRow:Oe,syncField:Be,saveBtn:De,langRow:He,loading:Pe,unit:Me},$e={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},Fe=["debug","info","warn","error"];function Ge(s){return s==="active"?t.statusActive:s==="grace"?t.statusGrace:s==="invalid"||s==="revoked"?t.statusError:t.statusInactive}function We(s,r){return s.refreshBlockedReason==="missing_session_token"?{label:r("settings.license.status.activationRequired","Activation Required"),tooltip:r("settings.license.status.activationRequired.tooltip","Manual license activation is required before WROX Dashboard can refresh this status."),detail:r("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:t.licenseNoticeWarning}:s.statusDetail==="grace_provider_unavailable"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:r("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:t.licenseNoticeInfo}:s.statusDetail==="grace_cancelled"||s.statusDetail==="grace_expired"||s.statusDetail==="grace_payment_failed"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:r("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:t.licenseNoticeInfo}:{label:r(`settings.license.${s.status}`,s.status),tooltip:r(`settings.license.${s.status}.tooltip`,"Current license activation state."),detail:s.refreshRequired?r("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:t.licenseNoticeMuted}}function H({checked:s,onChange:r,testId:y,ariaLabel:u}){return e.jsxs("label",{className:t.toggleSwitch,"data-testid":y,children:[e.jsx("input",{type:"checkbox",className:t.toggleInput,checked:s,"aria-label":u,onChange:i=>r(i.target.checked)}),e.jsx("span",{className:t.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:t.toggleThumb})})]})}function Ue(){const{t:s,selectedLocale:r,setLocale:y}=X(),{settings:u,license:i,syncConfig:C,saving:T,licenseProvider:A,licenseControlsDisabled:m,licenseSubmitting:p,licenseMessage:S,activateLicense:O,refreshLicense:f,resetLicense:B,updateHotSetting:L,updateSyncConfig:g,loading:_}=K(),[h,N]=c.useState(null),[x,j]=c.useState({}),[R,I]=c.useState(""),D=i?We(i,s):null,E=(i==null?void 0:i.tier)==="pro",k=(i==null?void 0:i.tier)==="pro"?i.maskedKey:void 0;c.useEffect(()=>{C&&j({maxDepth:C.maxDepth,maxInstances:C.maxInstances})},[C]);const n=c.useCallback(async(a,d)=>{await L(a,d),N(a),setTimeout(()=>N(v=>v===a?null:v),2e3)},[L]),l=c.useCallback(async()=>{await g(x)},[g,x]);return _?e.jsx("div",{className:t.page,children:e.jsx("div",{className:t.loading,children:s("common.loading")})}):e.jsxs("div",{className:t.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[t.card,(i==null?void 0:i.tier)==="pro"?t.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.license.title","License"),tooltip:s("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(b,{text:m?s("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WROX Dashboard."):s("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${t.headerBadge} ${m?"":t.headerBadgeLive}`,children:m?s("settings.license.disconnected","Disconnected"):s("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[i?e.jsxs(e.Fragment,{children:[(()=>{const a=D;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.licenseGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.status","Status"),tooltip:s("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${t.statusDot} ${Ge(i.status)}`}),e.jsx(b,{text:(a==null?void 0:a.tooltip)??s(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:(a==null?void 0:a.label)??s(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.tier","Tier"),tooltip:s("settings.license.tier.tooltip","Current subscription tier for available WROX Dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?t.proBadge:"",children:e.jsx(b,{text:s(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?s("tier.pro","Pro"):s("tier.basic","Basic")})}),k&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.key","Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:k})})]}),i.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.license.providerValue.tooltip","License provider used to validate this key."),children:i.provider})})]})]}),(a==null?void 0:a.detail)&&e.jsx("p",{className:`${t.licenseNotice} ${a.detailTone}`,children:i.refreshBlockedReason==="missing_session_token"?s("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):a.detail}),i.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${t.licenseNotice} ${t.licenseNoticeMuted}`,children:a==null?void 0:a.detail})]})})(),i.tier==="basic"&&e.jsx("a",{className:t.upgradeLink,href:"https://gum.co/u/din5in7h",target:"_blank",rel:"noopener noreferrer",children:s("tier.upgrade")})]}):e.jsx("div",{className:t.loading,children:s("settings.license.unavailable")}),e.jsxs("div",{className:t.licenseControls,children:[e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:t.licenseField,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":s("settings.license.provider","Provider"),className:t.select,value:A,disabled:m||p,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p||!E,onClick:()=>{f()},children:p?s("common.loading"):s("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p||!E,onClick:()=>{B()},children:p?s("common.loading"):s("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:`${t.licenseField} ${t.licenseFieldGrow}`,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.keyInput","License Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":s("settings.license.keyInput","License Key"),className:t.textInput,type:"text",value:R,disabled:m||p,onChange:a=>I(a.target.value)})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:m||p,onClick:()=>{(async()=>await O(R)&&I(""))()},children:p?s("common.loading"):s("settings.license.activate","Activate License")})]}),S&&e.jsx("p",{className:t.licenseMessage,children:S})]})]})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.general.title","General Settings"),tooltip:s("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(b,{text:s("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${t.headerBadge} ${t.headerBadgeLive}`,children:s("settings.general.liveApply","Live Apply")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.logLevel","Log Level"),tooltip:s("settings.general.logLevel.tooltip","Sets how much detail WROX Dashboard writes to its logs.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("select",{className:t.select,value:u.hot.LOG_LEVEL,onChange:a=>n("LOG_LEVEL",a.target.value),children:Fe.map(a=>e.jsx("option",{value:a,children:a},a))}),h==="LOG_LEVEL"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localHistory","Tool History Recording"),tooltip:s("settings.general.localHistory.tooltip","Stores local tool execution history for the WROX Dashboard history views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_LOCAL_HISTORY"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_LOCAL_HISTORY,ariaLabel:s("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:a=>n("ENABLE_LOCAL_HISTORY",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localStatistics","Tool Statistics Collection"),tooltip:s("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WROX Dashboard reporting.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_LOCAL_STATISTICS"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:s("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:a=>n("ENABLE_LOCAL_STATISTICS",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.contextCapture","Context Capture"),tooltip:s("settings.general.contextCapture.tooltip","When enabled, WROX Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("span",{className:`${t.savedIndicator} ${h==="ENABLE_CONTEXT_CAPTURE"?"":t.savedIndicatorHidden}`,children:s("settings.general.applied","Applied")}),e.jsx(H,{checked:u.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:s("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:a=>n("ENABLE_CONTEXT_CAPTURE",a)})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.requestTimeout","Request Timeout"),tooltip:s("settings.general.requestTimeout.tooltip","Maximum time WROX Dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"number",className:t.numberInput,value:u.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||n("REQUEST_TIMEOUT",d)}}),e.jsx(b,{text:s("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:t.unit,children:s("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.cold.title","Server Environment"),tooltip:s("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(b,{text:s("settings.readOnly.tooltip","This section shows values that cannot be edited from WROX Dashboard."),children:e.jsx("span",{className:t.headerBadge,children:s("settings.readOnly","Read-only")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.coldGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:"HTTP_PORT",tooltip:s("settings.cold.httpPort.tooltip","Port number used by the MCP WROX Dashboard HTTP server.")})}),e.jsx("dd",{children:u.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(o,{label:"HTTP_HOST",tooltip:s("settings.cold.httpHost.tooltip","Host interface that the MCP WROX Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:u.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(o,{label:"DASHBOARD_AUTO_OPEN",tooltip:s("settings.cold.dashboardAutoOpen.tooltip","Controls whether WROX Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(b,{text:s("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WROX Dashboard in a browser."),children:String(u.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:t.coldHint,children:s("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.sync.title","Sync Settings"),tooltip:s("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:t.syncForm,children:[e.jsxs("div",{className:t.syncRow,children:[e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxDepth","Max Depth"),tooltip:s("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:x.maxDepth??10,min:1,max:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||j(v=>({...v,maxDepth:d}))}})]}),e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxInstances","Max Instances"),tooltip:s("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:x.maxInstances??5e3,min:100,max:5e4,step:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||j(v=>({...v,maxInstances:d}))}})]})]}),e.jsx("button",{className:t.saveBtn,onClick:l,disabled:T,children:T?s("common.loading"):s("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.language.title","Language"),tooltip:s("settings.language.title.tooltip","Choose how the WROX Dashboard interface text is localized.")})}),e.jsxs("div",{className:t.langRow,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.language.dashboard","WROX Dashboard Language"),tooltip:s("settings.language.dashboard.tooltip","Overrides the WROX Dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:t.select,value:r,onChange:a=>y(a.target.value),children:[e.jsx("option",{value:q,children:s("settings.language.auto","Auto")}),U.map(a=>e.jsx("option",{value:a,children:$e[a]??a},a))]})]})]})]})}export{Ue as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as s}from"./index-
|
|
1
|
+
import{u as o,j as s}from"./index-BNdn6WpU.js";const e="_badge_1ucqq_2",c="_dot_1ucqq_12",a="_online_1ucqq_20",l="_offline_1ucqq_25",_="_idle_1ucqq_30",u="_syncing_1ucqq_34",d="_initializing_1ucqq_35",n={badge:e,dot:c,online:a,offline:l,idle:_,syncing:u,initializing:d},g={online:"status.online",offline:"status.offline",idle:"status.idle",syncing:"status.syncing",initializing:"status.initializing"};function f({status:i}){const{t}=o();return s.jsxs("span",{className:n.badge,children:[s.jsx("span",{className:`${n.dot} ${n[i]}`}),t(g[i])]})}export{f as S};
|
package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-E4XZhZn0.js → SyncPage-BcXYv0GI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,a as N,D as S,u as L,k as R,l as P,j as e,d as B,i as $,T as j,m as O}from"./index-
|
|
1
|
+
import{r as c,a as N,D as S,u as L,k as R,l as P,j as e,d as B,i as $,T as j,m as O}from"./index-BNdn6WpU.js";import{I as x}from"./InfoLabel-B_Ys60mi.js";import{C as E}from"./ConfirmModal-CInBBLZW.js";import{S as A}from"./StatusBadge-FYpJOX7r.js";import{D,a as H,u as M,T as F}from"./TierComparison-D4uVUGcZ.js";import{t as p}from"./TierPromo.module-CAoUYgIx.js";const U=5e3;function G(){const[t,a]=c.useState(null),[_,g]=c.useState(null),[o,l]=c.useState([]),[m,f]=c.useState(!0),h=c.useRef(null),y=c.useRef(null),r=c.useCallback(async()=>{try{const d=await N.get("/sync/status");a(d)}catch{}},[]),b=c.useCallback(async()=>{try{const d=await N.get("/sync/config");g(d)}catch{}},[]),n=c.useCallback(async()=>{try{const d=await N.get("/sync/history",{limit:"30"});l(d.entries??[])}catch{l([])}},[]),u=c.useCallback(async()=>{await Promise.all([r(),b(),n()]),f(!1)},[r,b,n]),v=c.useCallback(()=>{u()},[u]),T=c.useCallback(async()=>{await N.post("/api/dashboard/sync/history/clear"),l([]),r()},[r]);return c.useEffect(()=>(u(),y.current=setInterval(u,U),()=>{y.current&&clearInterval(y.current)}),[u]),c.useEffect(()=>{const d=new S;h.current=d,d.connect();const i=d.on("sync",()=>{r(),n()});return()=>{i(),d.disconnect(),h.current=null}},[r,n]),{status:t,config:_,history:o,loading:m,refresh:v,clearHistory:T}}function W({icon:t,title:a,description:_,benefits:g,upgradeLabel:o,upgradeHref:l}){const{t:m}=L(),[f,h]=c.useState(!1),{trackEvent:y}=R(),{pathname:r}=P(),b=r.replace(/^\//,"").split("/")[0]||"overview";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:p.panel,children:[t&&e.jsx("div",{className:p.panelIcon,children:t}),e.jsx("div",{className:p.panelTitle,children:a}),e.jsx("div",{className:p.panelDesc,children:_}),e.jsx("ul",{className:p.benefitList,children:g.map(n=>e.jsx("li",{className:p.benefitItem,children:n},n))}),e.jsx("div",{className:p.panelDiscountWrap,children:e.jsx(D,{variant:"centered"})}),e.jsxs("div",{className:p.actions,children:[e.jsx("button",{className:`${p.btn} ${p.btnOutline}`,onClick:()=>{y("dashboard_tier_toggle",{page:b}),h(!0)},children:m("tier.compare","Basic vs Pro")}),e.jsx("a",{className:`${p.btn} ${p.btnPrimary}`,href:l,target:"_blank",rel:"noreferrer",onClick:()=>y("dashboard_upgrade_click",{page:b}),children:o})]})]}),f&&e.jsx(H,{onClose:()=>h(!1)})]})}const V="_page_xmkt1_2",q="_card_xmkt1_10",z="_cardHeader_xmkt1_17",X="_clearButton_xmkt1_29",Y="_statusRow_xmkt1_39",J="_metaItem_xmkt1_46",K="_statusGrid_xmkt1_52",Q="_table_xmkt1_71",Z="_directionRail_xmkt1_99",ee="_endpointLabel_xmkt1_105",te="_optionRail_xmkt1_109",se="_directionOption_xmkt1_115",ne="_directionOptionActive_xmkt1_129",ae="_directionOptionInactive_xmkt1_133",ie="_direction_forward_xmkt1_139",ce="_direction_bidirectional_xmkt1_143",oe="_direction_reverse_xmkt1_147",le="_lockBadge_xmkt1_152",re="_proBadge_xmkt1_160",de="_forwardBadge_xmkt1_174",pe="_configGrid_xmkt1_187",ue="_configItem_xmkt1_193",me="_configLabel_xmkt1_199",ye="_configValue_xmkt1_207",ge="_logContainer_xmkt1_214",he="_logEntry_xmkt1_221",xe="_logTime_xmkt1_233",_e="_logType_xmkt1_239",fe="_logTypeWrite_xmkt1_248",je="_logTypeUpdate_xmkt1_252",be="_logTypeDelete_xmkt1_256",ke="_logTypeIdle_xmkt1_260",ve="_logPath_xmkt1_264",we="_logEmpty_xmkt1_271",Ne="_overlay_xmkt1_278",Te="_overlayTitle_xmkt1_288",Ie="_overlayMessage_xmkt1_295",Ce="_checklist_xmkt1_301",Le="_checkItem_xmkt1_311",Se="_upgradePanel_xmkt1_327",Re="_upgradePanelHeader_xmkt1_334",Pe="_benefitList_xmkt1_342",Be="_benefitItem_xmkt1_351",$e="_upgradeActions_xmkt1_366",Oe="_btn_xmkt1_371",Ee="_btnPrimary_xmkt1_388",Ae="_disabled_xmkt1_399",s={page:V,card:q,cardHeader:z,clearButton:X,statusRow:Y,metaItem:J,statusGrid:K,table:Q,directionRail:Z,endpointLabel:ee,optionRail:te,directionOption:se,directionOptionActive:ne,directionOptionInactive:ae,direction_forward:ie,direction_bidirectional:ce,direction_reverse:oe,lockBadge:le,proBadge:re,forwardBadge:de,configGrid:pe,configItem:ue,configLabel:me,configValue:ye,logContainer:ge,logEntry:he,logTime:xe,logType:_e,logTypeWrite:fe,logTypeUpdate:je,logTypeDelete:be,logTypeIdle:ke,logPath:ve,logEmpty:we,overlay:Ne,overlayTitle:Te,overlayMessage:Ie,checklist:Ce,checkItem:Le,upgradePanel:Se,upgradePanelHeader:Re,benefitList:Pe,benefitItem:Be,upgradeActions:$e,btn:Oe,btnPrimary:Ee,disabled:Ae},De=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function He(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function Me(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(0)}KB`:`${(t/(1024*1024)).toFixed(0)}MB`}function Fe(t){switch(t){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Ue(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Ge(t,a,_,g){const o=t(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1)),l=t("sync.directions.endpoint.local","Local"),m=t("sync.directions.endpoint.studio","Studio");switch(_){case"forward":return[`${o}: ${l} <- ${m}`,t("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
2
|
`);case"bidirectional":return[`${o}: ${l} <-> ${m}`,t("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),g?t("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
3
|
`);case"reverse":return[`${o}: ${l} -> ${m}`,t("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),g?t("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
-
`);default:return o}}const
|
|
4
|
+
`);default:return o}}const We=["scripts","values","containers","data","services"];function Ve(t,a){return a==="manual"?t("sync.directions.mode.manual","Manual"):a==="auto"?t("sync.directions.mode.auto","Auto"):"-"}function qe(t,a){return a==="manual"?t("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):a==="auto"?t("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function ze(t,a){switch(a){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function Xe(t,a){switch(a){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function tt(){const{t}=L(),{level:a}=B(),{tier:_,loading:g}=M(),o=G(),{show:l}=$(),[m,f]=c.useState(!1),[h,y]=c.useState(!1),r=!g&&_==="basic";if(a==="disconnected"||a==="serverOnly")return e.jsx("div",{className:s.page,children:e.jsx("div",{className:s.card,children:e.jsxs("div",{className:s.overlay,children:[e.jsx("div",{className:s.overlayTitle,children:t("sync.overlay.title","Roblox Studio plugin required")}),e.jsx("div",{className:s.overlayMessage,children:t("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),e.jsxs("ul",{className:s.checklist,children:[e.jsx("li",{className:s.checkItem,children:t("sync.overlay.check1","Is Roblox Studio running?")}),e.jsx("li",{className:s.checkItem,children:t("sync.overlay.check2","Is the WROX Plugin installed?")}),e.jsx("li",{className:s.checkItem,children:t("sync.overlay.check3","Are HTTP Requests enabled in Studio settings?")})]})]})})});const n=o.status,u=o.config,v=o.history,T=Ue(n==null?void 0:n.state),d=async()=>{y(!0);try{await o.clearHistory(),l(t("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{l(t("toast.clearFailed","Failed to clear data"),"error")}finally{y(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(j,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),r&&e.jsx(j,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:s.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:s.statusRow,children:[e.jsx(A,{status:T}),(n==null?void 0:n.placeName)&&e.jsxs("span",{className:s.metaItem,children:[e.jsx(x,{label:t("sync.status.place","Place"),tooltip:t("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),e.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(x,{label:t("sync.status.path","Path"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),e.jsx("dd",{children:n.syncRoot})]}),(n==null?void 0:n.instanceCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(x,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(x,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(x,{label:t("sync.status.state","State"),tooltip:t("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),e.jsx("dd",{children:t("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(j,{text:t("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:t("sync.directions.title","Sync Directions")})}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(x,{label:t("sync.directions.type","Type"),tooltip:t("sync.directions.type.tooltip","Sync category affected by this rule.")})}),e.jsx("th",{children:e.jsx(x,{label:t("sync.directions.direction","Direction"),tooltip:t("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),e.jsx("th",{children:e.jsx(x,{label:t("sync.directions.applyMode","Apply Mode"),tooltip:t("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),e.jsx("tbody",{children:We.map(i=>{var C;const w=n.directions[i],I=(C=n.applyModes)==null?void 0:C[i];return e.jsxs("tr",{children:[e.jsx("td",{children:t(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1))}),e.jsx("td",{children:e.jsxs("div",{className:s.directionRail,"aria-label":`${i}-direction-rail`,children:[e.jsx(j,{text:t("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:e.jsx("span",{className:s.endpointLabel,children:t("sync.directions.endpoint.local","Local")})}),e.jsx("span",{className:s.optionRail,children:De.map(k=>e.jsx(O,{text:Ge(t,i,k.key,r),children:e.jsx("span",{className:`${s.directionOption} ${w===k.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${k.key}`]??""}`,"data-active":w===k.key?"true":"false",children:k.symbol})},k.key))}),e.jsx(j,{text:t("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:e.jsx("span",{className:s.endpointLabel,children:t("sync.directions.endpoint.studio","Studio")})})]})}),e.jsx("td",{children:e.jsx(j,{text:qe(t,I),children:Ve(t,I)})})]},i)})})]})]}),u&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:t("sync.config.title","Sync Config")}),e.jsxs("div",{className:s.configGrid,children:[e.jsxs("div",{className:s.configItem,children:[e.jsx("span",{className:s.configLabel,children:t("sync.config.maxDepth","Max Depth")}),e.jsx("span",{className:s.configValue,children:u.maxDepth})]}),e.jsxs("div",{className:s.configItem,children:[e.jsx("span",{className:s.configLabel,children:t("sync.config.maxInstances","Max Instances")}),e.jsx("span",{className:s.configValue,children:u.maxInstances})]}),e.jsxs("div",{className:s.configItem,children:[e.jsx("span",{className:s.configLabel,children:t("sync.config.dirLimit","Dir Limit")}),e.jsx("span",{className:s.configValue,children:Me(u.directorySizeLimit)})]})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:t("sync.log.title","Sync Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>f(!0),children:t("common.clear","Clear")})]}),e.jsx("div",{className:s.logContainer,children:v.length===0?e.jsx("div",{className:s.logEmpty,children:t("sync.log.empty","No sync events yet")}):v.map((i,w)=>e.jsxs("div",{className:s.logEntry,children:[e.jsx("span",{className:s.logTime,children:He(i.timestamp)}),e.jsx(j,{text:Xe(t,i.type),children:e.jsx("span",{className:`${s.logType} ${Fe(i.type)}`,children:ze(t,i.type)})}),e.jsxs("span",{className:s.logPath,children:[i.path,i.details?` — ${i.details}`:""]})]},w))})]}),r&&e.jsx(W,{title:t("sync.upgrade.title","Unlock Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:F.sync}),e.jsx(E,{open:m,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:h,onCancel:()=>!h&&f(!1),onConfirm:d})]})}export{tt as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,D as S,a as T,f as R,u as j,j as t}from"./index-BNdn6WpU.js";function pe(){const[c,e]=o.useState("basic"),[m,n]=o.useState(0),[p,g]=o.useState(0),[a,i]=o.useState(0),[k,P]=o.useState(!0);o.useEffect(()=>{let _=!1;async function h(){try{return await R("gumroad")}catch{return null}}async function C(){var r,f;try{const[u,d]=await Promise.all([h(),T.get("/api/dashboard/tool-stats").catch(()=>null)]);if(_)return;if(u!=null&&u.tier&&e(u.tier),d!=null&&d.tierSummary){const b=((r=d.tierSummary.basic)==null?void 0:r.totalCalls)??0,x=((f=d.tierSummary.pro)==null?void 0:f.totalCalls)??0;i(b),g(x),n(b+x)}}catch{}finally{_||P(!1)}}C();const y=new S;y.connect();const N=y.on("license",()=>{h().then(r=>{!_&&(r!=null&&r.tier)&&e(r.tier)})});return()=>{_=!0,N(),y.disconnect()}},[]);const w=m>0?p/m*100:0;return{tier:c,proUsagePercent:w,totalCalls:m,proCalls:p,basicCalls:a,loading:k}}const O=[{name:"query_instances",description:"Query Roblox instances: get, children, find child/descendant, wait for child, class info, search by name/class. [PRO] file_tree, project_structure, descendants, ancestors, search by property/tag.",basic:["get","children","find_child","find_descendant","wait_for_child","class_info","search_name","search_class"],pro:["search_property","search_tag","file_tree","project_structure","descendants","ancestors"]},{name:"mutate_instances",description:"Create, delete, clone, move, rename, or pivot instances. [PRO] create_tree, mass_create, mass_delete, mass_duplicate, smart_duplicate.",basic:["create","create_with_props","delete","clone","move","rename","pivot"],pro:["create_tree","mass_create","mass_delete","mass_duplicate","smart_duplicate"]},{name:"manage_properties",description:"Get/set properties, attributes, and tags on instances. [PRO] set_calculated, set_relative, mass_set, mass_get, modify_children.",basic:["get","set","get_all","set_multiple","get_attr","set_attr","get_all_attrs","delete_attr","add_tag","remove_tag","check_tag","get_tags","get_tagged"],pro:["set_calculated","set_relative","mass_set","mass_get","modify_children"]},{name:"manage_scripts",description:"Manage script source code: read, write, create, delete, edit lines, search. [PRO] replace across scripts.",basic:["get_source","set_source","create","delete","edit_replace","edit_insert","edit_delete","search","get_dependencies"],pro:["replace"]},{name:"manage_lighting",description:"[PRO] Configure environment: lighting, atmosphere, sky, terrain properties, time of day.",basic:[],pro:["lighting","atmosphere","sky","terrain_props","time"]},{name:"manage_selection",description:"Get, set, or clear selection. [PRO] context, details, add/remove items, watch changes.",basic:["get","set","clear","cached"],pro:["context","details","add","remove","watch"]},{name:"manage_camera",description:"Camera operations: get info, focus on instance by path or position, get suggested view.",basic:["info","focus_path","focus_position","suggest"],pro:[]},{name:"manage_tween",description:"[PRO] Tween service: create, play, pause, cancel tweens for smooth animations.",basic:[],pro:["create","play","pause","cancel"]},{name:"manage_audio",description:"[PRO] Audio management: play, stop, pause, resume sounds. Set audio listener.",basic:[],pro:["play","stop","pause","resume","set_listener"]},{name:"manage_animation",description:"[PRO] Animation: load, play, stop animations. Get animation tracks from humanoid/controller.",basic:[],pro:["load","play","stop","get_tracks"]},{name:"manage_physics",description:"[PRO] Physics collision groups: register, set collidable between groups, list groups.",basic:[],pro:["register_group","set_collidable","get_groups"]},{name:"manage_effects",description:"[PRO] Particle effects: emit particles, clear all particles, toggle effect enabled state.",basic:[],pro:["emit","clear","toggle"]},{name:"manage_terrain",description:"[PRO] Terrain operations: fill shapes, clear regions, replace materials, manage colors, read/write voxels, generate procedural terrain, smooth terrain.",basic:[],pro:["fill_block","fill_ball","fill_cylinder","fill_wedge","clear_region","clear_bounds","replace_material","colors_get","colors_set","read_voxel","read_voxels","write_voxels","generate","smooth"]},{name:"spatial_query",description:"[PRO] Spatial queries: raycast, find ground, check placement, multi-raycast, scan area, find flat areas, find spawn positions, analyze walkable, spatial map, find empty space, get bounds, snap to grid, check collision.",basic:[],pro:["raycast","find_ground","check_placement","multi_raycast","scan_area","find_flat","find_spawn","analyze_walkable","spatial_map","find_space","bounds","snap_grid","collision"]},{name:"manage_assets",description:"[PRO] Asset management: insert models by ID, get asset info, search creator store, insert free models/packages, export selection.",basic:[],pro:["insert","info","search","search_insert","insert_free","insert_package","export"]},{name:"manage_sync",description:"[PRO] Project sync management: status, config, history, direction settings, read/write synced files.",basic:[],pro:["status","config","history","directions","read_file","write_file","progress"]},{name:"workspace_state",description:"[PRO] Workspace state: full sync, snapshot, recent changes, viewport info, clear history, metadata, scripts, selection info, clear cache.",basic:[],pro:["sync","snapshot","changes","viewport","clear_history","metadata","scripts","selection_info","clear_cache"]},{name:"manage_logs",description:"Output logs: get filtered logs, poll incrementally with sinceSeq cursor, clear buffer, get recent errors.",basic:["get","clear","errors"],pro:[]},{name:"system_info",description:"System info: ping, connection status, usage tier. [PRO] place info, services list, studio settings, playtest control, automated test runner.",basic:["ping","connection","usage"],pro:["place_info","services","studio_settings","play","stop","pause","resume","play_status","run_test"]},{name:"batch_execute",description:'[PRO] Execute multiple commands in a single batch. Each command is an object with "tool" name and "args". Commands execute sequentially; optionally continue on error.',basic:[],pro:["batch_execute"]},{name:"execute_luau",description:"[PRO] Execute arbitrary Luau code in Roblox Studio sandbox. Blocked services: HttpService, DataStoreService, MessagingService. Cannot access CoreGui/CorePackages.",basic:[],pro:["execute_luau"]}],B={proOnlyTools:13,mixedTools:6,totalBasicActions:51,totalProActions:107},L={tools:O,summary:B},A=new Date("2026-04-30T23:59:59");function v(){return Date.now()<=A.getTime()}const _e={overview:"https://gum.co/u/2nc0fhky",changelog:"https://gum.co/u/wjcnucpy",sync:"https://gum.co/u/p0barnlb",playtest:"https://gum.co/u/kchczjry",tools:"https://gum.co/u/ljmteaed"},D="_tag_1wj0q_2",E="_label_1wj0q_17",q="_code_1wj0q_22",G="_expiry_1wj0q_31",M="_inline_1wj0q_49",$="_centered_1wj0q_54",l={tag:D,label:E,code:q,expiry:G,inline:M,centered:$};function W({variant:c}){const{t:e}=j();return v()?t.jsxs("div",{className:`${l.tag} ${c==="centered"?l.centered:l.inline}`,children:[t.jsx("span",{className:l.label,children:e("tier.promo.discount.context","🎁 Gumroad 결제 시 할인코드 입력:")}),t.jsx("span",{className:l.code,children:e("tier.comparison.discount.code","WEPPY-MCP")}),t.jsx("span",{className:l.expiry,children:e("tier.comparison.discount.expiry","Valid until April 30")})]}):null}const H="_overlay_171mk_2",I="_modal_171mk_13",U="_summaryGrid_171mk_32",z="_summaryCard_171mk_39",Y="_basicCard_171mk_45",F="_proCard_171mk_49",Q="_cardTitle_171mk_54",V="_summarySection_171mk_70",X="_sectionTitle_171mk_78",J="_featureList_171mk_90",K="_summary_171mk_32",Z="_statBasic_171mk_116",ee="_statPro_171mk_120",te="_statMixed_171mk_124",se="_detailHeader_171mk_128",ae="_tableWrap_171mk_137",ie="_table_171mk_137",re="_toolName_171mk_165",ce="_description_171mk_171",ne="_actionList_171mk_176",oe="_none_171mk_184",le="_discountBanner_171mk_189",me="_closeBtn_171mk_227",s={overlay:H,modal:I,summaryGrid:U,summaryCard:z,basicCard:Y,proCard:F,cardTitle:Q,summarySection:V,sectionTitle:X,featureList:J,summary:K,statBasic:Z,statPro:ee,statMixed:te,detailHeader:se,tableWrap:ae,table:ie,toolName:re,description:ce,actionList:ne,none:oe,discountBanner:le,closeBtn:me};function ue({onClose:c}){const{t:e}=j(),{tools:m,summary:n}=L,p=[{title:e("tier.comparison.basic.core","Core MCP workflow"),items:[e("tier.comparison.basic.core.item1","Script create/edit"),e("tier.comparison.basic.core.item2","Instance management"),e("tier.comparison.basic.core.item3","Property control"),e("tier.comparison.basic.core.item4","Selection and search"),e("tier.comparison.basic.core.item5","Tag management"),e("tier.comparison.basic.core.item6","Camera control"),e("tier.comparison.basic.core.item7","Log monitoring")]},{title:e("tier.comparison.basic.sync","Sync (Basic)"),items:[e("tier.comparison.basic.sync.item1","Studio to Local one-way sync"),e("tier.comparison.basic.sync.item2","Manual apply as default"),e("tier.comparison.basic.sync.item3","Pro sync settings stay read-only")]}],g=[{title:e("tier.comparison.pro.all","Everything in Basic, plus"),items:[]},{title:e("tier.comparison.pro.sync","Advanced Sync workflow"),items:[e("tier.comparison.pro.sync.item1","Per-type sync direction"),e("tier.comparison.pro.sync.item2","Per-type apply mode"),e("tier.comparison.pro.sync.item3","Bidirectional and reverse sync"),e("tier.comparison.pro.sync.item4","Full sync, resync, and push to Studio"),e("tier.comparison.pro.sync.item5","Multi-place sync")]},{title:e("tier.comparison.pro.playtest","Playtest control"),items:[e("tier.comparison.pro.playtest.item1","Play, stop, pause, and resume"),e("tier.comparison.pro.playtest.item2","Playtest state inspection"),e("tier.comparison.pro.playtest.item3","Automated test execution")]},{title:e("tier.comparison.pro.creation","Advanced creation workflow"),items:[e("tier.comparison.pro.creation.item1","Bulk operations"),e("tier.comparison.pro.creation.item2","Terrain generation"),e("tier.comparison.pro.creation.item3","Asset search and insert"),e("tier.comparison.pro.creation.item4","Raycast and spatial analysis"),e("tier.comparison.pro.creation.item5","Environment control")]}];return t.jsx("div",{className:s.overlay,onClick:c,children:t.jsxs("div",{className:s.modal,onClick:a=>a.stopPropagation(),children:[v()&&t.jsx("div",{className:s.discountBanner,children:t.jsx(W,{variant:"centered"})}),t.jsx("h2",{children:e("tier.compare")}),t.jsxs("div",{className:s.summaryGrid,children:[t.jsxs("section",{className:`${s.summaryCard} ${s.basicCard}`,children:[t.jsx("h3",{className:s.cardTitle,children:e("tier.basic")}),p.map(a=>t.jsxs("div",{className:s.summarySection,children:[t.jsx("div",{className:s.sectionTitle,children:a.title}),t.jsx("ul",{className:s.featureList,children:a.items.map(i=>t.jsx("li",{children:i},i))})]},a.title))]}),t.jsxs("section",{className:`${s.summaryCard} ${s.proCard}`,children:[t.jsx("h3",{className:s.cardTitle,children:e("tier.pro")}),g.map(a=>t.jsxs("div",{className:s.summarySection,children:[t.jsx("div",{className:s.sectionTitle,children:a.title}),a.items.length>0&&t.jsx("ul",{className:s.featureList,children:a.items.map(i=>t.jsx("li",{children:i},i))})]},a.title))]})]}),t.jsxs("div",{className:s.summary,children:[t.jsxs("span",{className:s.statBasic,children:["Basic: ",n.totalBasicActions," actions"]}),t.jsxs("span",{className:s.statPro,children:["Pro: ",n.totalProActions," actions"]}),t.jsxs("span",{className:s.statMixed,children:[n.mixedTools," mixed / ",n.proOnlyTools," pro-only"]})]}),t.jsx("div",{className:s.detailHeader,children:e("tier.comparison.detailTitle","Detailed Tool Catalog")}),t.jsx("div",{className:s.tableWrap,children:t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:e("tools.col.tool")}),t.jsx("th",{children:e("tier.comparison.description","Description")}),t.jsx("th",{children:e("tier.basic")}),t.jsx("th",{children:e("tier.pro")})]})}),t.jsx("tbody",{children:m.map(a=>t.jsxs("tr",{children:[t.jsx("td",{className:s.toolName,children:a.name}),t.jsx("td",{className:s.description,children:e(`tier.tool.${a.name}.desc`,a.description)}),t.jsx("td",{className:s.actionList,children:a.basic.length>0?a.basic.join(", "):t.jsx("span",{className:s.none,children:"—"})}),t.jsx("td",{className:s.actionList,children:a.pro.length>0?a.pro.join(", "):t.jsx("span",{className:s.none,children:"—"})})]},a.name))})]})}),t.jsx("button",{className:s.closeBtn,onClick:c,children:e("tier.comparison.close","Close")})]})})}export{W as D,_e as T,ue as a,pe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tag_1wj0q_2{display:inline-flex;align-items:center;gap:7px;padding:5px 10px 5px 9px;border-radius:6px;border:1px solid rgba(212,170,44,.28);border-left:2px solid var(--pro-badge);background:linear-gradient(90deg,rgba(212,170,44,.09) 0%,transparent 100%);font-size:11.5px;line-height:1;flex-wrap:wrap;row-gap:4px}._label_1wj0q_17{color:var(--text-secondary);white-space:nowrap}._code_1wj0q_22{font-family:var(--font-mono);font-size:12px;font-weight:700;color:var(--pro-badge);letter-spacing:.1em;animation:_codeShimmer_1wj0q_1 2.8s ease-in-out infinite}._expiry_1wj0q_31{color:var(--text-muted);font-size:10.5px;white-space:nowrap}._expiry_1wj0q_31:before{content:"·";margin-right:5px;opacity:.5}@keyframes _codeShimmer_1wj0q_1{0%,to{opacity:1}50%{opacity:.6;text-shadow:0 0 8px rgba(212,170,44,.6)}}._inline_1wj0q_49{align-self:center}._centered_1wj0q_54{justify-content:center;width:100%}._overlay_171mk_2{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000}._modal_171mk_13{background:var(--bg-card);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 32px;min-width:720px;max-width:1120px;max-height:80vh;overflow-y:auto}._modal_171mk_13 h2{font-family:var(--font-label);font-size:16px;color:var(--text-primary);margin:0 0 12px;text-align:center}._summaryGrid_171mk_32{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}._summaryCard_171mk_39{border-radius:var(--radius);border:1px solid var(--border);padding:18px 20px}._basicCard_171mk_45{background:#ffffff05}._proCard_171mk_49{background:linear-gradient(180deg,var(--pro-bg-soft),rgba(0,0,0,0) 70%),var(--pro-bg);border-color:var(--pro-border)}._cardTitle_171mk_54{margin:0 0 12px;text-align:center;font-family:var(--font-label);font-size:28px;letter-spacing:.06em}._basicCard_171mk_45 ._cardTitle_171mk_54{color:var(--text-primary)}._proCard_171mk_49 ._cardTitle_171mk_54{color:var(--pro-badge)}._summarySection_171mk_70{margin-bottom:18px}._summarySection_171mk_70:last-child{margin-bottom:0}._sectionTitle_171mk_78{font-family:var(--font-label);font-size:14px;font-weight:600;margin-bottom:8px;color:var(--text-primary)}._proCard_171mk_49 ._sectionTitle_171mk_78{color:var(--pro-text)}._featureList_171mk_90{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px;color:var(--text-secondary);font-size:13px}._featureList_171mk_90 li:before{content:"+ ";color:var(--pro-badge)}._summary_171mk_32{display:flex;gap:12px;justify-content:center;margin-bottom:16px;font-size:12px;font-family:var(--font-label)}._statBasic_171mk_116{color:var(--text-secondary)}._statPro_171mk_120{color:var(--pro-badge)}._statMixed_171mk_124{color:var(--text-muted)}._detailHeader_171mk_128{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-primary);margin-bottom:12px}._tableWrap_171mk_137{margin-bottom:16px}._table_171mk_137{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}._table_171mk_137 th{font-family:var(--font-label);text-align:left;padding:6px 8px;border-bottom:1px solid var(--border);color:var(--text-secondary);position:sticky;top:0;background:var(--bg-card)}._table_171mk_137 td{padding:5px 8px;border-bottom:1px solid var(--border-subtle, rgba(255,255,255,.04));vertical-align:top}._toolName_171mk_165{font-family:var(--font-mono);color:var(--text-primary);white-space:nowrap}._description_171mk_171{color:var(--text-secondary);line-height:1.5}._actionList_171mk_176{color:var(--text-secondary);font-family:var(--font-mono);font-size:11px;line-height:1.5;word-break:break-word}._none_171mk_184{color:var(--text-muted)}._discountBanner_171mk_189{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 10px;margin-bottom:12px;padding:8px 16px;border-radius:var(--radius);background:linear-gradient(90deg,var(--pro-bg-soft),rgba(0,0,0,0));border:1px solid var(--pro-border);font-size:13px}._discountLabel_171mk_203{color:var(--text-secondary);flex-shrink:0}._discountCode_171mk_208{font-family:var(--font-mono);font-size:14px;font-weight:700;color:var(--pro-badge);letter-spacing:.1em;background:#ffffff0f;border:1px solid var(--pro-border);border-radius:4px;padding:2px 10px}._discountExpiry_171mk_220{color:var(--text-muted);font-size:12px;flex-shrink:0}._closeBtn_171mk_227{font-family:var(--font-label);font-size:12px;padding:6px 16px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:border-color var(--transition);align-self:center}._closeBtn_171mk_227:hover{border-color:var(--pro-badge)}@media(max-width:960px){._modal_171mk_13{min-width:min(92vw,720px);max-width:92vw;padding:20px}._summaryGrid_171mk_32{grid-template-columns:1fr}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._progressPromoWrap_t6ypv_1{display:flex;flex-direction:column;gap:8px}._progressPromo_t6ypv_1{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 20px;display:flex;align-items:center;gap:16px}._progressMain_t6ypv_17{flex:1;min-width:0}._progressLabel_t6ypv_22{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);margin-bottom:6px;display:flex;justify-content:space-between;gap:12px}._progressBar_t6ypv_32{height:6px;background:var(--bg-secondary);border-radius:3px;overflow:hidden}._progressFill_t6ypv_39{height:100%;background:var(--pro-badge);border-radius:3px;transition:width var(--transition)}._progressTextGroup_t6ypv_46{display:flex;flex-direction:column;gap:3px}._progressText_t6ypv_46{font-family:var(--font-label);font-size:13px;color:var(--pro-badge);white-space:nowrap;font-weight:500}._discountHint_t6ypv_60{font-size:11px;color:var(--text-muted);white-space:nowrap}._actions_t6ypv_66{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._btn_t6ypv_74{display:inline-flex;align-items:center;justify-content:center;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;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._btn_t6ypv_74:hover{border-color:var(--accent);background:var(--accent-dim)}._btnOutline_t6ypv_95{border-color:var(--pro-badge);color:var(--pro-badge)}._btnOutline_t6ypv_95:hover{background:var(--pro-bg-soft);border-color:var(--pro-badge)}._btnPrimary_t6ypv_105{background:var(--pro-badge);color:#1a1407;border-color:var(--pro-badge)}._btnPrimary_t6ypv_105:hover{opacity:.9}._panel_t6ypv_115{background:linear-gradient(180deg,var(--pro-bg-soft),transparent 60%),var(--bg-secondary);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 20px}._panelIcon_t6ypv_122{font-size:32px;margin-bottom:12px;text-align:center}._panelTitle_t6ypv_128{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--pro-text);margin-bottom:8px;text-align:center}._panelDesc_t6ypv_137{font-size:13px;color:var(--text-secondary);margin-bottom:16px;line-height:1.5;text-align:center}._benefitList_t6ypv_145{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:4px}._benefitItem_t6ypv_154{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_t6ypv_154:before{content:"+";position:absolute;left:0;color:var(--pro-badge);font-weight:600}._panelDiscountHint_t6ypv_169{font-size:11px;color:var(--text-muted);text-align:center;margin-bottom:12px}@media(max-width:720px){._progressPromo_t6ypv_1{flex-direction:column;align-items:stretch}._progressText_t6ypv_46,._discountHint_t6ypv_60{white-space:normal}._actions_t6ypv_66{justify-content:stretch}._btn_t6ypv_74{width:100%}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="_progressPromoWrap_t6ypv_1",s="_progressPromo_t6ypv_1",e="_progressMain_t6ypv_17",r="_progressLabel_t6ypv_22",o="_progressBar_t6ypv_32",n="_progressFill_t6ypv_39",p="_progressText_t6ypv_46",_="_actions_t6ypv_66",a="_btn_t6ypv_74",i="_btnOutline_t6ypv_95",l="_btnPrimary_t6ypv_105",c="_panel_t6ypv_115",g="_panelIcon_t6ypv_122",y="_panelTitle_t6ypv_128",b="_panelDesc_t6ypv_137",v="_benefitList_t6ypv_145",m="_benefitItem_t6ypv_154",P={progressPromoWrap:t,progressPromo:s,progressMain:e,progressLabel:r,progressBar:o,progressFill:n,progressText:p,actions:_,btn:a,btnOutline:i,btnPrimary:l,panel:c,panelIcon:g,panelTitle:y,panelDesc:b,benefitList:v,benefitItem:m};export{P as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as h,r as x,k as j,l as g,j as s}from"./index-BNdn6WpU.js";import{D as v,a as u}from"./TierComparison-D4uVUGcZ.js";import{t as e}from"./TierPromo.module-CAoUYgIx.js";function f({basicCalls:n,proCalls:a,totalCalls:c,proUsagePercent:l,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=j(),{pathname:m}=g(),t=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromoWrap,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," / ",c]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(l,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",n]}),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:t}),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:t}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),s.jsx(v,{variant:"centered"})]}),p&&s.jsx(u,{onClose:()=>o(!1)})]})}export{f as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r as l,a as R,D as Z,u as q,i as z,T as w}from"./index-BNdn6WpU.js";import{C as Q}from"./ConfirmModal-CInBBLZW.js";import{u as X,T as Y}from"./TierComparison-D4uVUGcZ.js";import{T as tt}from"./TierPromoProgress-Cuz1dgcs.js";import"./TierPromo.module-CAoUYgIx.js";const st="_wrapper_1s3lp_2",et="_table_1s3lp_7",at="_sortable_1s3lp_32",ot="_sortArrow_1s3lp_41",rt="_clickable_1s3lp_52",lt="_empty_1s3lp_57",M={wrapper:st,table:et,sortable:at,sortArrow:ot,clickable:rt,empty:lt};function it({columns:e,data:o,sortBy:T,sortDir:f="asc",onSort:g,onRowClick:S,rowKey:C,emptyMessage:v}){return s.jsx("div",{className:M.wrapper,children:s.jsxs("table",{className:M.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(n=>s.jsxs("th",{style:n.width?{width:n.width}:void 0,className:n.sortable?M.sortable:void 0,onClick:n.sortable&&g?()=>g(n.key):void 0,children:[s.jsx("span",{children:n.label}),n.sortable&&T===n.key&&s.jsx("span",{className:M.sortArrow,children:f==="asc"?"▴":"▾"})]},n.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:M.empty,children:v||"No data"})}):o.map((n,k)=>s.jsx("tr",{className:S?M.clickable:void 0,onClick:S?()=>S(n):void 0,children:e.map(p=>s.jsx("td",{children:p.render?p.render(n):String(n[p.key]??"")},p.key))},C?C(n):k))})]})})}const V=50;function nt(){const[e,o]=l.useState(null),[T,f]=l.useState(!0),[g,S]=l.useState([]),[C,v]=l.useState(0),[n,k]=l.useState(!1),[p,N]=l.useState(!0),[x,H]=l.useState(0),[u,D]=l.useState(""),[B,E]=l.useState([]),[U,A]=l.useState(0),[O,d]=l.useState(!1),[$,F]=l.useState(!0),[b,j]=l.useState(0),L=l.useRef(null),y=l.useCallback(async()=>{f(!0);try{const m=await R.get("/api/dashboard/tool-stats");o(m)}catch{}finally{f(!1)}},[]),t=l.useCallback(async(m,_)=>{N(!0);try{const K={limit:String(V),offset:String(m)};_&&(K.tool=_);const W=await R.get("/api/dashboard/history",K);S(W.entries),v(W.total),k(W.hasMore)}catch{S([]),v(0),k(!1)}finally{N(!1)}},[]),r=l.useCallback(async m=>{F(!0);try{const _=await R.get("/api/dashboard/failures",{limit:String(V),offset:String(m)});E(_.entries),A(_.total),d(_.hasMore)}catch{E([]),A(0),d(!1)}finally{F(!1)}},[]),i=l.useCallback(()=>{y(),t(x,u),r(b)},[y,t,r,x,u,b]),h=l.useCallback(async()=>{await R.post("/api/dashboard/tools/history/clear"),t(x,u),r(b)},[t,r,x,u,b]),c=l.useCallback(async()=>{await R.post("/api/dashboard/tools/statistics/clear"),y()},[y]);return l.useEffect(()=>{y()},[y]),l.useEffect(()=>{t(x,u)},[t,x,u]),l.useEffect(()=>{r(b)},[r,b]),l.useEffect(()=>{const m=new Z;L.current=m,m.connect();const _=m.on("command",()=>{y(),t(x,u),r(b)});return()=>{_(),m.disconnect(),L.current=null}},[y,t,r,x,u,b]),{statistics:e,statsLoading:T,history:g,historyTotal:C,historyHasMore:n,historyLoading:p,historyOffset:x,historyToolFilter:u,setHistoryOffset:H,setHistoryToolFilter:D,failures:B,failuresTotal:U,failuresHasMore:O,failuresLoading:$,failuresOffset:b,setFailuresOffset:j,refresh:i,clearHistory:h,clearStatistics:c}}const ct="_page_184r6_2",dt="_tabs_184r6_10",ut="_tab_184r6_10",pt="_tabActive_184r6_34",ht="_card_184r6_40",mt="_cardToolbar_184r6_47",xt="_sectionTitle_184r6_55",bt="_dangerButton_184r6_61",ft="_proBadge_184r6_71",_t="_statusOk_184r6_85",yt="_tierBasic_184r6_91",jt="_tierPro_184r6_95",gt="_tierMixed_184r6_100",St="_filterRow_184r6_111",Tt="_filterLabel_184r6_118",Ct="_filterSelect_184r6_127",Nt="_expandedRow_184r6_138",wt="_expandedSection_184r6_146",vt="_pre_184r6_156",kt="_pagination_184r6_173",Bt="_pageInfo_184r6_181",Mt="_btn_184r6_187",Pt="_tierDistribution_184r6_210",Et="_tierBarWrap_184r6_214",Lt="_tierBarBasic_184r6_222",Rt="_tierBarPro_184r6_227",Ht="_tierLabels_184r6_232",At="_statsTableWrap_184r6_241",Ot="_statsTable_184r6_241",$t="_sortableHeader_184r6_272",Ft="_sortArrow_184r6_277",It="_statsToolRow_184r6_281",Dt="_statsActionRow_184r6_289",Ut="_expandButton_184r6_293",Wt="_expandIcon_184r6_305",Gt="_actionLabel_184r6_310",Jt="_emptyStats_184r6_317",Kt="_summaryLine_184r6_323",a={page:ct,tabs:dt,tab:ut,tabActive:pt,card:ht,cardToolbar:mt,sectionTitle:xt,dangerButton:bt,proBadge:ft,statusOk:_t,tierBasic:yt,tierPro:jt,tierMixed:gt,filterRow:St,filterLabel:Tt,filterSelect:Ct,expandedRow:Nt,expandedSection:wt,pre:vt,pagination:kt,pageInfo:Bt,btn:Mt,tierDistribution:Pt,tierBarWrap:Et,tierBarBasic:Lt,tierBarPro:Rt,tierLabels:Ht,statsTableWrap:At,statsTable:Ot,sortableHeader:$t,sortArrow:Ft,statsToolRow:It,statsActionRow:Dt,expandButton:Ut,expandIcon:Wt,actionLabel:Gt,emptyStats:Jt,summaryLine:Kt},G=50;function Vt(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 I(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function J(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 Yt(){const{t:e}=q(),o=nt(),{show:T}=z(),f=X(),[g,S]=l.useState("history"),[C,v]=l.useState(null),[n,k]=l.useState(null),[p,N]=l.useState(null),[x,H]=l.useState(!1),[u,D]=l.useState("totalCalls"),[B,E]=l.useState("desc"),U=l.useCallback(t=>{D(r=>r===t?(E(i=>i==="asc"?"desc":"asc"),t):(E("desc"),t))},[]),A=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),O=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const i=Object.entries(r.actions??{}).map(([h,c])=>({toolName:r.toolName,actionName:c.action??h,tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs,firstUsed:c.firstUsed,lastUsed:c.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:i,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=l.useCallback((t,r,i,h)=>s.jsx(w,{text:e(i,h),children:e(t,r)}),[e]),$=l.useMemo(()=>[...O].sort((r,i)=>{const h=r[u],c=i[u];if(typeof h=="number"&&typeof c=="number")return B==="asc"?h-c:c-h;const m=String(h??""),_=String(c??"");return B==="asc"?m.localeCompare(_):_.localeCompare(m)}),[O,u,B]),F=l.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Vt(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 i;const r=((i=t.parameters)==null?void 0:i.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(w,{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=>I(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(w,{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]),b=l.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=>J(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=>I(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(w,{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]),j=l.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,i=t+r;if(i===0)return null;const h=Math.round(t/i*100),c=100-h;return{basic:t,pro:r,total:i,basicPct:h,proPct:c}},[o.statistics]),L=l.useCallback(t=>{k(r=>r===t?null:t)},[]),y=l.useCallback(async()=>{if(p){H(!0);try{p==="history"?await o.clearHistory():await o.clearStatistics(),T(e("toast.clearSuccess","Cleared successfully"),"success"),N(null)}catch{T(e("toast.clearFailed","Failed to clear data"),"error")}finally{H(!1)}}},[p,T,e,o]);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} ${g===t?a.tabActive:""}`,onClick:()=>S(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),g==="history"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("history"),children:e("common.clear","Clear")})]}),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")}),A.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(it,{columns:F,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")}),C&&(()=>{const t=o.history.find(r=>r.id===C);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{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(w,{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-G)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+G,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+G),children:e("tools.page.next","Next")})]})]}),g==="statistics"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("statistics"),children:e("common.clear","Clear")})]}),j&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${j.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${j.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",j.basicPct,"% (",j.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",j.proPct,"% (",j.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:b.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>U(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&u===t.key&&s.jsx("span",{className:a.sortArrow,children:B==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:b.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const r=n===t.toolName;return s.jsxs(l.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>L(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:i=>{i.stopPropagation(),L(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:J(t.successCount,t.totalCalls)}),s.jsx("td",{children:I(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(w,{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(i=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:i.actionName})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:J(i.successCount,i.totalCalls)}),s.jsx("td",{children:I(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,i.tier)})})]},`${t.toolName}:${i.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]})]}),!f.loading&&f.tier==="basic"&&s.jsx(tt,{basicCalls:f.basicCalls,proCalls:f.proCalls,totalCalls:f.totalCalls,proUsagePercent:f.proUsagePercent,upgradeHref:Y.tools}),s.jsx(Q,{open:p!==null,title:p==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:p==="history"?e("tools.clear.history.message","This permanently removes the current place tool history and failures."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:x,onCancel:()=>!x&&N(null),onConfirm:y})]})}export{Yt as Component};
|