@weppy/roblox-mcp 2.0.0 → 2.0.1
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 +9 -0
- 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-BOp7G4Fi.js → ChangelogDetailPage-Ss9rBuou.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogPage-DGhZm1j7.js → ChangelogPage-D_OScUeF.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-C3QU6eRJ.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-CszBT8rJ.js → InfoLabel-Cvotfyns.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-DS-g_EC0.js → OverviewPage-BcSHb-KS.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-C4X6-jp-.js → PlaytestPage-CqIxk3qY.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-qdFEmTM4.js → PropertyDiff-BGBA0lal.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SettingsPage-BtjNT-j0.js → SettingsPage-D-SyrBho.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-CC_OzjmT.js → StatusBadge-C_KxiYEt.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-BOYoftuM.js → SyncPage-DeQjKxmi.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoPanel-DzFynur7.js → TierPromoPanel-B2hY_Iul.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoProgress-DkpXj7Ui.js → TierPromoProgress-B9L7tJGd.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ToolsPage-CZsA-7CL.js → ToolsPage-CzFt06tW.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-mMUjBHCe.js +69 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-CckH43fU.js → tier-promo-config-BFJCz95t.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-DZCw70vn.js → useLiveUptime-Gqoo4lJE.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +55 -55
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-DXv_C7i6.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BYvG5KEz.js +0 -69
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 21 tools, 140+ actions, bidirectional sync, automated playtest, and multi-place support",
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.1"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "weppy-roblox-mcp",
|
|
14
14
|
"source": "./plugins/weppy-roblox-mcp",
|
|
15
15
|
"description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 21 tools, 140+ actions, bidirectional sync, automated playtest, and multi-place support",
|
|
16
|
-
"version": "2.0.
|
|
16
|
+
"version": "2.0.1",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "hope1026"
|
|
19
19
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,15 @@ All notable changes to this project will be documented in this file.
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
|
|
18
|
+
## [2.0.1] - 2026-03-22
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- Fix setup scripts (`setup-mcp.sh`, `setup-mcp.bat`) failing to resolve MCP server path on Windows and macOS
|
|
23
|
+
- Fix project sync directory path resolution when multiple MCP instances share the same workspace
|
|
24
|
+
|
|
25
|
+
|
|
17
26
|
## [2.0.0] - 2026-03-22
|
|
18
27
|
|
|
19
28
|
### BREAKING CHANGES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
|
|
5
5
|
"main": "plugins/weppy-roblox-mcp/dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,b as j,u as L,d as O,c as A,j as t,T as p}from"./index-BYvG5KEz.js";import{I as $}from"./InfoLabel-CszBT8rJ.js";import{D,P as F}from"./PropertyDiff-qdFEmTM4.js";function M(e){const a={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of e)switch(l.category){case"script":l.changeType==="create"?a.scriptsCreated++:a.scriptsModified++;break;case"instance":l.changeType==="create"?a.instancesCreated++:l.changeType==="delete"?a.instancesDeleted++:l.changeType==="move"&&a.instancesMoved++;break;case"property":a.propertiesChanged++;break;case"lighting":a.lightingChanged=!0;break;case"terrain":a.terrainChanged=!0;break;case"asset":a.assetsInserted++;break}return a}function P(e){const[a,l]=r.useState(""),[i,m]=r.useState(""),[g,f]=r.useState(),[y,h]=r.useState("completed"),[x,_]=r.useState([]),[s,c]=r.useState([]),[o,u]=r.useState([]),[N,E]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[I,v]=r.useState(!0),[w,T]=r.useState(null),C=r.useCallback(async()=>{if(e){v(!0),T(null);try{const[d,k]=await Promise.all([j.get(`/api/dashboard/changelog/${e}`),j.get(`/api/dashboard/changelog/${e}/changes`)]);l(d.entryId),m(d.startTime),f(d.endTime),h(d.status),_(d.entries),c(d.failures),u(k.changes),E(M(k.changes))}catch(d){T(d instanceof Error?d.message:"Failed to load changelog detail")}finally{v(!1)}}},[e]);return r.useEffect(()=>{C()},[C]),{entryId:a,startTime:i,endTime:g,status:y,entries:x,failures:s,changes:o,changeSummary:N,loading:I,error:w,refresh:C}}const K={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function B(e){return K[e]??"❓"}const G="_page_17pcx_2",R="_header_17pcx_10",U="_backLink_17pcx_16",z="_headerTitle_17pcx_29",H="_headerTime_17pcx_37",q="_statusActive_17pcx_44",J="_statusCompleted_17pcx_49",V="_section_17pcx_54",Y="_sectionTitle_17pcx_61",Q="_summaryGrid_17pcx_74",W="_summaryCard_17pcx_80",X="_summaryCardActive_17pcx_94",Z="_summaryIcon_17pcx_99",ee="_summaryCount_17pcx_105",te="_summaryLabel_17pcx_112",ne="_timelineFilter_17pcx_122",ae="_filterLabel_17pcx_129",se="_filterSelect_17pcx_135",ie="_timeline_17pcx_122",ce="_timelineEntry_17pcx_155",re="_timelineTime_17pcx_172",le="_timelineIcon_17pcx_180",oe="_timelineBody_17pcx_185",de="_timelineSummary_17pcx_190",me="_timelineTarget_17pcx_197",ge="_timelineConfidence_17pcx_204",he="_confidenceExact_17pcx_213",ue="_confidencePartial_17pcx_218",pe="_confidenceAfterOnly_17pcx_223",fe="_confidenceIntentOnly_17pcx_228",ye="_confidenceUnknown_17pcx_233",xe="_timelineExpanded_17pcx_239",_e="_empty_17pcx_311",Ce="_loading_17pcx_320",be="_error_17pcx_329",n={page:G,header:R,backLink:U,headerTitle:z,headerTime:H,statusActive:q,statusCompleted:J,section:V,sectionTitle:Y,summaryGrid:Q,summaryCard:W,summaryCardActive:X,summaryIcon:Z,summaryCount:ee,summaryLabel:te,timelineFilter:ne,filterLabel:ae,filterSelect:se,timeline:ie,timelineEntry:ce,timelineTime:re,timelineIcon:le,timelineBody:oe,timelineSummary:de,timelineTarget:me,timelineConfidence:ge,confidenceExact:he,confidencePartial:ue,confidenceAfterOnly:pe,confidenceIntentOnly:fe,confidenceUnknown:ye,timelineExpanded:xe,empty:_e,loading:Ce,error:be},S=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function b(e){if(!e)return"--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function ve(e){if(!e)return"--:--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function Te(e,a){if(!e||!a)return"";const l=new Date(a).getTime()-new Date(e).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function ke(e){switch(e){case"exact":return n.confidenceExact;case"partial":return n.confidencePartial;case"after-only":return n.confidenceAfterOnly;case"intent-only":return n.confidenceIntentOnly;default:return n.confidenceUnknown}}function je(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact","Exact");case"partial":return e("changelog.detail.confidence.partial","Partial");case"after-only":return e("changelog.detail.confidence.afterOnly","After only");case"intent-only":return e("changelog.detail.confidence.intentOnly","Intent only");default:return e("changelog.detail.confidence.unknown","Unknown")}}function Se(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return e("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return e("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return e("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return e("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Le(){const{t:e}=L(),{id:a}=O(),l=A(),i=P(a),[m,g]=r.useState("all"),[f,y]=r.useState(null),h=r.useMemo(()=>[...m==="all"?i.changes:i.changes.filter(c=>c.category===m)].reverse(),[i.changes,m]);if(i.loading)return t.jsx("div",{className:n.loading,children:e("common.loading","Loading...")});if(i.error)return t.jsxs("div",{className:n.error,children:[i.error,t.jsx("br",{}),t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("changelog.detail.backToList","Back to list")]})]});const x=Te(i.startTime,i.endTime),_=i.endTime?`${b(i.startTime)} → ${b(i.endTime)} (${x})`:`${b(i.startTime)} → ${e("changelog.card.inProgress","in progress")}`;return t.jsxs("div",{className:n.page,children:[t.jsxs("div",{className:n.header,children:[t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("sidebar.changelog","Changelog")]}),t.jsx("span",{className:n.headerTitle,children:"|"}),t.jsx("span",{className:n.headerTime,children:_}),t.jsx(p,{text:i.status==="active"?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:t.jsx("span",{className:i.status==="active"?n.statusActive:n.statusCompleted,children:i.status==="active"?e("changelog.card.active","Active"):e("changelog.card.completed","Completed")})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:t.jsx("span",{children:e("changelog.detail.changeSummary","Change Summary")})})}),t.jsx("div",{className:n.summaryGrid,children:S.map(s=>{const c=i.changeSummary;let o;switch(s.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const u=m===s.key;return t.jsxs("div",{className:`${n.summaryCard} ${u?n.summaryCardActive:""}`,onClick:()=>g(u?"all":s.key),children:[t.jsx("span",{className:n.summaryIcon,children:s.icon}),t.jsx("div",{className:n.summaryCount,children:o}),t.jsx("div",{className:n.summaryLabel,children:e(s.labelKey,s.key)})]},s.key)})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:t.jsx("span",{children:e("changelog.detail.changeTimeline","Change Timeline")})})}),t.jsxs("div",{className:n.timelineFilter,children:[t.jsx("span",{className:n.filterLabel,children:t.jsx($,{label:`${e("changelog.detail.filterCategory","Category")}:`,tooltip:e("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),t.jsxs("select",{className:n.filterSelect,value:m,onChange:s=>g(s.target.value),children:[t.jsx("option",{value:"all",children:e("tools.filter.all","All")}),S.map(s=>t.jsxs("option",{value:s.key,children:[s.icon," ",e(s.labelKey,s.key)]},s.key))]})]}),h.length===0?t.jsx("div",{className:n.empty,children:e("changelog.detail.noChanges","No changes in this category")}):t.jsx("div",{className:n.timeline,children:h.map((s,c)=>{const o=f===c;return t.jsxs("div",{children:[t.jsxs("div",{className:n.timelineEntry,onClick:()=>y(o?null:c),children:[t.jsx("span",{className:n.timelineTime,children:ve(s.timestamp)}),t.jsx("span",{className:n.timelineIcon,children:B(s.category)}),t.jsxs("div",{className:n.timelineBody,children:[t.jsxs("div",{className:n.timelineSummary,children:[s.summary,t.jsx(p,{text:Se(e,s.confidence),children:t.jsx("span",{className:`${n.timelineConfidence} ${ke(s.confidence)}`,children:je(e,s.confidence)})})]}),t.jsx("div",{className:n.timelineTarget,children:s.target})]})]}),o&&t.jsx("div",{className:n.timelineExpanded,children:t.jsx(Ne,{change:s})})]},c)})})]})]})}function Ne({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(D,{before:e.before,after:e.after}):e.category==="property"?t.jsx(F,{before:e.before,after:e.after}):e.details?t.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(e.details,null,2)}):t.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:e.target})}export{Le as Component};
|
|
1
|
+
import{r,b as j,u as L,d as O,c as A,j as t,T as p}from"./index-mMUjBHCe.js";import{I as $}from"./InfoLabel-Cvotfyns.js";import{D,P as F}from"./PropertyDiff-BGBA0lal.js";function M(e){const a={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of e)switch(l.category){case"script":l.changeType==="create"?a.scriptsCreated++:a.scriptsModified++;break;case"instance":l.changeType==="create"?a.instancesCreated++:l.changeType==="delete"?a.instancesDeleted++:l.changeType==="move"&&a.instancesMoved++;break;case"property":a.propertiesChanged++;break;case"lighting":a.lightingChanged=!0;break;case"terrain":a.terrainChanged=!0;break;case"asset":a.assetsInserted++;break}return a}function P(e){const[a,l]=r.useState(""),[i,m]=r.useState(""),[g,f]=r.useState(),[y,h]=r.useState("completed"),[x,_]=r.useState([]),[s,c]=r.useState([]),[o,u]=r.useState([]),[N,E]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[I,v]=r.useState(!0),[w,T]=r.useState(null),C=r.useCallback(async()=>{if(e){v(!0),T(null);try{const[d,k]=await Promise.all([j.get(`/api/dashboard/changelog/${e}`),j.get(`/api/dashboard/changelog/${e}/changes`)]);l(d.entryId),m(d.startTime),f(d.endTime),h(d.status),_(d.entries),c(d.failures),u(k.changes),E(M(k.changes))}catch(d){T(d instanceof Error?d.message:"Failed to load changelog detail")}finally{v(!1)}}},[e]);return r.useEffect(()=>{C()},[C]),{entryId:a,startTime:i,endTime:g,status:y,entries:x,failures:s,changes:o,changeSummary:N,loading:I,error:w,refresh:C}}const K={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function B(e){return K[e]??"❓"}const G="_page_17pcx_2",R="_header_17pcx_10",U="_backLink_17pcx_16",z="_headerTitle_17pcx_29",H="_headerTime_17pcx_37",q="_statusActive_17pcx_44",J="_statusCompleted_17pcx_49",V="_section_17pcx_54",Y="_sectionTitle_17pcx_61",Q="_summaryGrid_17pcx_74",W="_summaryCard_17pcx_80",X="_summaryCardActive_17pcx_94",Z="_summaryIcon_17pcx_99",ee="_summaryCount_17pcx_105",te="_summaryLabel_17pcx_112",ne="_timelineFilter_17pcx_122",ae="_filterLabel_17pcx_129",se="_filterSelect_17pcx_135",ie="_timeline_17pcx_122",ce="_timelineEntry_17pcx_155",re="_timelineTime_17pcx_172",le="_timelineIcon_17pcx_180",oe="_timelineBody_17pcx_185",de="_timelineSummary_17pcx_190",me="_timelineTarget_17pcx_197",ge="_timelineConfidence_17pcx_204",he="_confidenceExact_17pcx_213",ue="_confidencePartial_17pcx_218",pe="_confidenceAfterOnly_17pcx_223",fe="_confidenceIntentOnly_17pcx_228",ye="_confidenceUnknown_17pcx_233",xe="_timelineExpanded_17pcx_239",_e="_empty_17pcx_311",Ce="_loading_17pcx_320",be="_error_17pcx_329",n={page:G,header:R,backLink:U,headerTitle:z,headerTime:H,statusActive:q,statusCompleted:J,section:V,sectionTitle:Y,summaryGrid:Q,summaryCard:W,summaryCardActive:X,summaryIcon:Z,summaryCount:ee,summaryLabel:te,timelineFilter:ne,filterLabel:ae,filterSelect:se,timeline:ie,timelineEntry:ce,timelineTime:re,timelineIcon:le,timelineBody:oe,timelineSummary:de,timelineTarget:me,timelineConfidence:ge,confidenceExact:he,confidencePartial:ue,confidenceAfterOnly:pe,confidenceIntentOnly:fe,confidenceUnknown:ye,timelineExpanded:xe,empty:_e,loading:Ce,error:be},S=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function b(e){if(!e)return"--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function ve(e){if(!e)return"--:--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function Te(e,a){if(!e||!a)return"";const l=new Date(a).getTime()-new Date(e).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function ke(e){switch(e){case"exact":return n.confidenceExact;case"partial":return n.confidencePartial;case"after-only":return n.confidenceAfterOnly;case"intent-only":return n.confidenceIntentOnly;default:return n.confidenceUnknown}}function je(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact","Exact");case"partial":return e("changelog.detail.confidence.partial","Partial");case"after-only":return e("changelog.detail.confidence.afterOnly","After only");case"intent-only":return e("changelog.detail.confidence.intentOnly","Intent only");default:return e("changelog.detail.confidence.unknown","Unknown")}}function Se(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return e("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return e("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return e("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return e("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Le(){const{t:e}=L(),{id:a}=O(),l=A(),i=P(a),[m,g]=r.useState("all"),[f,y]=r.useState(null),h=r.useMemo(()=>[...m==="all"?i.changes:i.changes.filter(c=>c.category===m)].reverse(),[i.changes,m]);if(i.loading)return t.jsx("div",{className:n.loading,children:e("common.loading","Loading...")});if(i.error)return t.jsxs("div",{className:n.error,children:[i.error,t.jsx("br",{}),t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("changelog.detail.backToList","Back to list")]})]});const x=Te(i.startTime,i.endTime),_=i.endTime?`${b(i.startTime)} → ${b(i.endTime)} (${x})`:`${b(i.startTime)} → ${e("changelog.card.inProgress","in progress")}`;return t.jsxs("div",{className:n.page,children:[t.jsxs("div",{className:n.header,children:[t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("sidebar.changelog","Changelog")]}),t.jsx("span",{className:n.headerTitle,children:"|"}),t.jsx("span",{className:n.headerTime,children:_}),t.jsx(p,{text:i.status==="active"?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:t.jsx("span",{className:i.status==="active"?n.statusActive:n.statusCompleted,children:i.status==="active"?e("changelog.card.active","Active"):e("changelog.card.completed","Completed")})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:t.jsx("span",{children:e("changelog.detail.changeSummary","Change Summary")})})}),t.jsx("div",{className:n.summaryGrid,children:S.map(s=>{const c=i.changeSummary;let o;switch(s.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const u=m===s.key;return t.jsxs("div",{className:`${n.summaryCard} ${u?n.summaryCardActive:""}`,onClick:()=>g(u?"all":s.key),children:[t.jsx("span",{className:n.summaryIcon,children:s.icon}),t.jsx("div",{className:n.summaryCount,children:o}),t.jsx("div",{className:n.summaryLabel,children:e(s.labelKey,s.key)})]},s.key)})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:t.jsx("span",{children:e("changelog.detail.changeTimeline","Change Timeline")})})}),t.jsxs("div",{className:n.timelineFilter,children:[t.jsx("span",{className:n.filterLabel,children:t.jsx($,{label:`${e("changelog.detail.filterCategory","Category")}:`,tooltip:e("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),t.jsxs("select",{className:n.filterSelect,value:m,onChange:s=>g(s.target.value),children:[t.jsx("option",{value:"all",children:e("tools.filter.all","All")}),S.map(s=>t.jsxs("option",{value:s.key,children:[s.icon," ",e(s.labelKey,s.key)]},s.key))]})]}),h.length===0?t.jsx("div",{className:n.empty,children:e("changelog.detail.noChanges","No changes in this category")}):t.jsx("div",{className:n.timeline,children:h.map((s,c)=>{const o=f===c;return t.jsxs("div",{children:[t.jsxs("div",{className:n.timelineEntry,onClick:()=>y(o?null:c),children:[t.jsx("span",{className:n.timelineTime,children:ve(s.timestamp)}),t.jsx("span",{className:n.timelineIcon,children:B(s.category)}),t.jsxs("div",{className:n.timelineBody,children:[t.jsxs("div",{className:n.timelineSummary,children:[s.summary,t.jsx(p,{text:Se(e,s.confidence),children:t.jsx("span",{className:`${n.timelineConfidence} ${ke(s.confidence)}`,children:je(e,s.confidence)})})]}),t.jsx("div",{className:n.timelineTarget,children:s.target})]})]}),o&&t.jsx("div",{className:n.timelineExpanded,children:t.jsx(Ne,{change:s})})]},c)})})]})]})}function Ne({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(D,{before:e.before,after:e.after}):e.category==="property"?t.jsx(F,{before:e.before,after:e.after}):e.details?t.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(e.details,null,2)}):t.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:e.target})}export{Le as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,b as N,D as I,u as $,j as t,T,c as k}from"./index-
|
|
1
|
+
import{r as i,b as N,D as I,u as $,j as t,T,c as k}from"./index-mMUjBHCe.js";const z=10;function M(){const[a,g]=i.useState([]),[e,s]=i.useState(0),[m,u]=i.useState(!1),[r,f]=i.useState(!0),[l,y]=i.useState(0),[p,b]=i.useState("all"),_=i.useRef(null),h=i.useCallback(async(n,d)=>{f(!0);try{const C={limit:String(z),offset:String(n)};d!=="all"&&(C.status=d);const S=await N.get("/api/dashboard/changelog",C);g(S.entries),s(S.total),u(S.hasMore)}catch{g([]),s(0),u(!1)}finally{f(!1)}},[]),v=i.useCallback(()=>{h(l,p)},[h,l,p]);return i.useEffect(()=>{h(l,p)},[h,l,p]),i.useEffect(()=>{const n=new I;_.current=n,n.connect();const d=n.on("command",()=>{h(l,p)});return()=>{d(),n.disconnect(),_.current=null}},[h,l,p]),{entries:a,total:e,hasMore:m,loading:r,offset:l,statusFilter:p,setOffset:y,setStatusFilter:b,refresh:v}}const B="_card_z2aep_2",L="_header_z2aep_17",A="_statusBadge_z2aep_24",D="_statusDot_z2aep_35",E="_active_z2aep_41",F="_completed_z2aep_50",R="_timeRange_z2aep_58",w="_summaryList_z2aep_65",O="_summaryItem_z2aep_71",P="_summaryIcon_z2aep_80",G="_summaryText_z2aep_86",H="_progressBar_z2aep_91",Z="_progressFill_z2aep_99",U="_emptySummary_z2aep_112",o={card:B,header:L,statusBadge:A,statusDot:D,active:E,completed:F,timeRange:R,summaryList:w,summaryItem:O,summaryIcon:P,summaryText:G,progressBar:H,progressFill:Z,emptySummary:U};function j(a){if(!a)return"--:--";const g=new Date(a);return`${String(g.getHours()).padStart(2,"0")}:${String(g.getMinutes()).padStart(2,"0")}`}function q({entry:a,onClick:g}){const{t:e}=$(),s=a.changeSummary,m=a.status==="active",u=a.isBootstrapOnly===!0,r=[],f=s.scriptsModified+s.scriptsCreated;if(f>0){const n=[];s.scriptsModified>0&&n.push(`${s.scriptsModified} ${e("changelog.card.modified","modified")}`),s.scriptsCreated>0&&n.push(`${s.scriptsCreated} ${e("changelog.card.created","created")}`);const d=`${f} ${e("changelog.card.scripts","scripts")} ${n.join(", ")}`;r.push({icon:"📝",text:d,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const l=s.instancesCreated+s.instancesDeleted+s.instancesMoved;if(l>0){const n=[];s.instancesCreated>0&&n.push(`${s.instancesCreated} ${e("changelog.card.created","created")}`),s.instancesDeleted>0&&n.push(`${s.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),s.instancesMoved>0&&n.push(`${s.instancesMoved} ${e("changelog.card.moved","moved")}`);const d=`${l} ${e("changelog.card.instances","instances")} ${n.join(", ")}`;r.push({icon:"🧱",text:d,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}s.propertiesChanged>0&&r.push({icon:"🎨",text:`${s.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),s.lightingChanged&&r.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),s.terrainChanged&&r.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),s.assetsInserted>0&&r.push({icon:"📦",text:`${s.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const y=j(a.startTime),p=m?e("changelog.card.inProgress","in progress"):a.endTime?j(a.endTime):"--:--",b=u?e("changelog.card.bootstrapStatus","Bootstrap"):m?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),_=u?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):m?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),h=u?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),v=u?e("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):e("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet.");return t.jsxs("div",{className:o.card,onClick:g,children:[t.jsxs("div",{className:o.header,children:[t.jsx(T,{text:_,children:t.jsxs("span",{className:`${o.statusBadge} ${m?o.active:o.completed}`,children:[t.jsx("span",{className:o.statusDot}),b]})}),t.jsxs("span",{className:o.timeRange,children:[y,"~",p]})]}),t.jsx("div",{className:o.summaryList,children:r.length>0?r.map((n,d)=>t.jsxs("div",{className:o.summaryItem,children:[t.jsx("span",{className:o.summaryIcon,children:n.icon}),t.jsx(T,{text:n.tooltip,children:t.jsx("span",{className:o.summaryText,children:n.text})})]},d)):t.jsx(T,{text:v,children:t.jsx("span",{className:o.emptySummary,style:{display:"block"},children:h})})}),m&&t.jsx("div",{className:o.progressBar,children:t.jsx("div",{className:o.progressFill})})]})}const J="_page_59srx_2",K="_header_59srx_10",Q="_headerSub_59srx_19",V="_filterTabs_59srx_29",W="_filterTab_59srx_29",X="_filterTabActive_59srx_52",Y="_list_59srx_58",ee="_empty_59srx_65",se="_loading_59srx_74",te="_pagination_59srx_83",ae="_pageInfo_59srx_91",ne="_btn_59srx_97",c={page:J,header:K,headerSub:Q,filterTabs:V,filterTab:W,filterTabActive:X,list:Y,empty:ee,loading:se,pagination:te,pageInfo:ae,btn:ne},x=10,oe=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function ie(){const{t:a}=$(),g=k(),e=M();return t.jsxs("div",{className:c.page,children:[t.jsxs("h2",{className:c.header,children:[a("sidebar.changelog","Changelog"),t.jsx("span",{className:c.headerSub,children:a("changelog.subtitle","Game Change History")})]}),t.jsx("div",{className:c.filterTabs,children:oe.map(s=>t.jsx("button",{className:`${c.filterTab} ${e.statusFilter===s.key?c.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(s.key),e.setOffset(0)},children:a(s.label,s.key.charAt(0).toUpperCase()+s.key.slice(1))},s.key))}),e.loading&&e.entries.length===0&&t.jsx("div",{className:c.loading,children:a("common.loading","Loading...")}),!e.loading&&e.entries.length===0?t.jsx("div",{className:c.empty,children:a("changelog.empty","No changelog entries yet")}):t.jsx("div",{className:c.list,children:e.entries.map(s=>t.jsx(q,{entry:s,onClick:()=>g(`/changelog/${s.entryId}`)},s.entryId))}),e.total>x&&t.jsxs("div",{className:c.pagination,children:[t.jsx("button",{className:c.btn,disabled:e.offset===0,onClick:()=>e.setOffset(Math.max(0,e.offset-x)),children:a("tools.page.prev","Prev")}),t.jsxs("span",{className:c.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+x,e.total)," / ",e.total]}),t.jsx("button",{className:c.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+x),children:a("tools.page.next","Next")})]})]})}export{ie as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as C,r as a,j as e,a as w,b as S,D as y,T as $}from"./index-mMUjBHCe.js";import{I as l}from"./InfoLabel-Cvotfyns.js";import{S as R}from"./StatusBadge-C_KxiYEt.js";import{u as I,f as A}from"./useLiveUptime-Gqoo4lJE.js";const E="_container_1h084_2",L="_entry_1h084_14",M="_timestamp_1h084_21",P="_message_1h084_27",k="_warn_1h084_34",H="_error_1h084_39",D="_empty_1h084_44",g={container:E,entry:L,timestamp:M,message:P,warn:k,error:H,empty:D};function T({entries:n}){const{t}=C(),s=a.useRef(null);return a.useEffect(()=>{const i=s.current;i&&(i.scrollTop=i.scrollHeight)},[n.length]),e.jsx("div",{ref:s,className:g.container,children:n.length===0?e.jsx("div",{className:g.empty,children:t("connection.log.empty","No events yet")}):n.map((i,m)=>e.jsxs("div",{className:`${g.entry} ${i.type?g[i.type]:""}`,children:[e.jsx("span",{className:g.timestamp,children:i.timestamp}),e.jsx("span",{className:g.message,children:i.message})]},m))})}const f=50;function U(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function F(){const{level:n,status:t,error:s}=w(),[i,m]=a.useState(null),[j,v]=a.useState([]),u=a.useRef(null),d=a.useCallback((r,c)=>{v(_=>{const p=[..._,{timestamp:U(),message:r,type:c}];return p.length>f?p.slice(-f):p})},[]),x=a.useCallback(async()=>{try{const r=await S.get("/connection-info");m(r)}catch{m(null)}},[]);return a.useEffect(()=>{n!=="L0"&&t&&x()},[n,t,x]),a.useEffect(()=>{const r=new y;u.current=r,r.connect();const c=r.on("connection",p=>{const h=p,b=h.status==="connected"?"connected":"disconnected";d(`Plugin ${b} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),_=r.on("mcp_status",p=>{const h=p,b=h.status==="registered"?"registered":"unregistered";d(`MCP ${b} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),x()});return()=>{c(),_(),r.disconnect(),u.current=null}},[d,x]),{status:t,connectionInfo:i,connectionLog:j,level:n,error:s}}const B="_page_10i40_2",G="_card_10i40_10",O="_disabled_10i40_18",V="_cardHeader_10i40_24",q="_serverGrid_10i40_38",X="_statusRow_10i40_56",z="_table_10i40_70",J="_toggleBtn_10i40_95",K="_disconnected_10i40_110",Q="_disconnectedActions_10i40_127",W="_btn_10i40_134",Y="_emptyRow_10i40_152",o={page:B,card:G,disabled:O,cardHeader:V,serverGrid:q,statusRow:X,table:z,toggleBtn:J,disconnected:K,disconnectedActions:Q,btn:W,emptyRow:Y};function N(n,t){const s=Math.max(0,Math.floor((Date.now()-n)/1e3));return s<60?`${s}${t("connection.time.secondsAgo","s ago")}`:s<3600?`${Math.floor(s/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(s/3600)}${t("connection.time.hoursAgo","h ago")}`}function se(){var r;const{t:n}=C(),{status:t,connectionInfo:s,connectionLog:i,level:m}=F(),[j,v]=a.useState(!0),u=I(t==null?void 0:t.uptime),d=m==="L0",x=d?"offline":"online";return e.jsxs("div",{className:o.page,children:[e.jsxs("div",{className:o.card,children:[e.jsx("div",{className:o.cardHeader,children:n("connection.server.title","Server Status")}),d?e.jsxs("div",{className:o.disconnected,children:[e.jsx("h3",{children:n("level.l0.title")}),e.jsx("p",{children:n("level.l0.message")}),e.jsx("p",{children:n("common.reconnecting")}),e.jsxs("div",{className:o.disconnectedActions,children:[e.jsx("button",{className:o.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:o.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:o.statusRow,children:e.jsx(R,{status:x})}),e.jsxs("dl",{className:o.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx($,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:A(u??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(s==null?void 0:s.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(l,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:s.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${o.card} ${d?o.disabled:""}`,children:[e.jsxs("div",{className:o.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(s==null?void 0:s.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:o.toggleBtn,onClick:()=>v(c=>!c),"aria-label":j?n("common.collapse","Collapse"):n("common.expand","Expand"),children:j?"▾":"▸"})]}),j&&e.jsxs("table",{className:o.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(l,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")})]})}),e.jsx("tbody",{children:s!=null&&s.mcpInstances&&s.mcpInstances.length>0?s.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.aiClientName??n("connection.agents.unknown","Unknown")}),e.jsx("td",{children:c.pid}),e.jsx("td",{children:c.projectRoot??c.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:N(c.connectedAt,n)})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:o.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${o.card} ${d?o.disabled:""}`,children:[e.jsxs("div",{className:o.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((r=t==null?void 0:t.pluginClients)==null?void 0:r.length)??0,")"]}),e.jsxs("table",{className:o.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(l,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.placeName??c.projectName??"-"}),e.jsx("td",{children:c.clientId.slice(0,10)}),e.jsx("td",{children:N(c.lastSeen,n)}),e.jsx("td",{children:c.pluginVersion??"-"})]},c.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:o.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${o.card} ${d?o.disabled:""}`,children:[e.jsx("div",{className:o.cardHeader,children:n("connection.log.title","Connection Log")}),e.jsx(T,{entries:i})]})]})}export{se as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,e as r}from"./index-
|
|
1
|
+
import{j as e,e as r}from"./index-mMUjBHCe.js";function s({label:t,tooltip:o}){return e.jsx(r,{text:o,children:t})}export{s as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,u as L,r as _,a as G,b as D,D as F,T as U}from"./index-BYvG5KEz.js";import{I as V}from"./InfoLabel-CszBT8rJ.js";import{S as A}from"./StatusBadge-CC_OzjmT.js";import{D as z,P as O}from"./PropertyDiff-qdFEmTM4.js";import{u as J,T as X}from"./tier-promo-config-CckH43fU.js";import{u as q,f as K}from"./useLiveUptime-DZCw70vn.js";import{T as Q}from"./TierPromoProgress-DkpXj7Ui.js";const W="_page_9uhoo_2",Y="_card_9uhoo_10",Z="_cardHeader_9uhoo_17",ee="_disconnectCard_9uhoo_28",te="_disconnectIcon_9uhoo_36",se="_disconnectTitle_9uhoo_41",ne="_disconnectMessage_9uhoo_48",ie="_reconnectGuide_9uhoo_55",re="_guideStep_9uhoo_64",ce="_stepNumber_9uhoo_72",ae="_reconnectIndicator_9uhoo_88",oe="_reconnectDot_9uhoo_98",le="_pulse_9uhoo_1",de="_disconnectActions_9uhoo_112",ue="_btn_9uhoo_118",me="_btnSecondary_9uhoo_134",he="_metricRow_9uhoo_152",ve="_metricGrid_9uhoo_158",_e="_metricCard_9uhoo_164",ge="_metric_ok_9uhoo_174",pe="_metric_warn_9uhoo_179",fe="_metric_error_9uhoo_184",xe="_metricHeader_9uhoo_189",je="_metricIcon_9uhoo_200",Ce="_metricTitle_9uhoo_204",we="_metricValue_9uhoo_208",Ne="_metricSubtitle_9uhoo_215",ye="_guideCard_9uhoo_225",Se="_guideTitle_9uhoo_232",Te="_checklist_9uhoo_239",be="_feedEmpty_9uhoo_263",Ie="_feedList_9uhoo_270",ke="_feedItem_9uhoo_278",De="_feedTime_9uhoo_291",Me="_feedIcon_9uhoo_298",Pe="_feedSummary_9uhoo_304",Ee="_feedItemClickable_9uhoo_314",Be="_feedChevron_9uhoo_322",He="_feedDetail_9uhoo_331",Re="_feedDetailPre_9uhoo_340",Le="_feedDetailText_9uhoo_349",$e="_changelogSummary_9uhoo_356",Ge="_changeTag_9uhoo_365",Fe="_tierBar_9uhoo_377",Ue="_tierBarTrack_9uhoo_383",Ve="_tierBarFillBasic_9uhoo_391",Ae="_tierBarFillPro_9uhoo_396",ze="_tierLabels_9uhoo_401",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:ue,btnSecondary:me,metricRow:he,metricGrid:ve,metricCard:_e,metric_ok:ge,metric_warn:pe,metric_error:fe,metricHeader:xe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Se,checklist:Te,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedItemClickable:Ee,feedChevron:Be,feedDetail:He,feedDetailPre:Re,feedDetailText:Le,changelogSummary:$e,changeTag:Ge,tierBar:Fe,tierBarTrack:Ue,tierBarFillBasic:Ve,tierBarFillPro:Ae,tierLabels:ze};function N({title:e,value:c,icon:i,subtitle:r,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:[i&&t.jsx("span",{className:s.metricIcon,children:i}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:c}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function E({changes:e}){const{t:c}=L(),[i,r]=_.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:c("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=i===n,l=a.raw,g=l&&(l.before!=null||l.after!=null||l.details!=null);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${g?s.feedItemClickable:""}`,onClick:()=>g&&r(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsx("span",{className:s.feedSummary,children:a.summary}),g&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&l&&t.jsx("div",{className:s.feedDetail,children:t.jsx(Oe,{change:l})})]},n)})})}function Oe({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 $(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return $(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 Je(){const{level:e,status:c}=G(),i=J(),[r,a]=_.useState(null),[n,d]=_.useState(null),[l,g]=_.useState(null),[x,h]=_.useState([]),y=_.useRef(null),S=_.useCallback(async()=>{try{const o=await D.get("/connection-info");a(o)}catch{a(null)}},[]),T=_.useCallback(async()=>{try{const o=await D.get("/api/dashboard/changelog/active");if(g(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(v=>({timestamp:v.timestamp?$(new Date(v.timestamp)):H(),icon:R(v.category),summary:v.summary,category:v.category,raw:v}));h(p)}}catch{g(null)}},[]),f=_.useCallback(async()=>{try{const o=await D.get("/sync/status");d(o)}catch{d(null)}},[]);return _.useEffect(()=>{e!=="L0"?(S(),T(),f()):(a(null),d(null),g(null));const o=new F;y.current=o,o.connect();const p=o.on("game_change",j=>{const u=j,C={timestamp:H(),icon:R(u.category),summary:u.summary,category:u.category};h(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),T()}),v=o.on("sync",j=>{const u=j;d(C=>({...C,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{p(),v(),o.disconnect(),y.current=null}},[e,S,T,f]),{level:e,status:c,connectionInfo:r,syncStatus:n,changeSummary:l,recentChanges:x,tier:i}}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 Xe(e,c){switch(e){case"syncing":return c("status.syncing","Syncing");case"initializing":return c("status.initializing","Initializing");case"error":return c("status.error","Error");default:return c("status.idle","Idle")}}function qe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,c,i,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:c,tooltip:i}),": ",r]},c)}function m(e,c){return t.jsx(U,{text:c,children:e})}function st(){var w,P;const{t:e}=L(),{level:c,status:i,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:d,tier:l}=Je(),g=q(i==null?void 0:i.uptime);if(c==="L0")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 x=(r==null?void 0:r.mcpInstanceCount)??0,h=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=r==null?void 0:r.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(i==null?void 0:i.pluginClients)??[],S=y.length>0,T=(i==null?void 0:i.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=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"),v=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=i?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${i.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),T),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(i.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(g??i.uptime))]:[];if(c==="L1")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"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 u=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:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(S?"status.online":"status.offline"),o),icon:"🔌",subtitle:u?`${u.placeName??u.projectName??"-"} / v${u.pluginVersion??"-"}`:void 0,status:S?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),v),value:m(Xe(a==null?void 0:a.state,e),v),icon:"🔄",status:qe(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")]})]})]}),!l.loading&&l.tier==="basic"&&l.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:l.basicCalls,proCalls:l.proCalls,totalCalls:l.totalCalls,proUsagePercent:l.proUsagePercent,upgradeHref:X.overview})]})]})}export{st as Component};
|
|
1
|
+
import{j as t,u as L,r as _,a as G,b as D,D as F,T as U}from"./index-mMUjBHCe.js";import{I as V}from"./InfoLabel-Cvotfyns.js";import{S as A}from"./StatusBadge-C_KxiYEt.js";import{D as z,P as O}from"./PropertyDiff-BGBA0lal.js";import{u as J,T as X}from"./tier-promo-config-BFJCz95t.js";import{u as q,f as K}from"./useLiveUptime-Gqoo4lJE.js";import{T as Q}from"./TierPromoProgress-B9L7tJGd.js";const W="_page_9uhoo_2",Y="_card_9uhoo_10",Z="_cardHeader_9uhoo_17",ee="_disconnectCard_9uhoo_28",te="_disconnectIcon_9uhoo_36",se="_disconnectTitle_9uhoo_41",ne="_disconnectMessage_9uhoo_48",ie="_reconnectGuide_9uhoo_55",re="_guideStep_9uhoo_64",ce="_stepNumber_9uhoo_72",ae="_reconnectIndicator_9uhoo_88",oe="_reconnectDot_9uhoo_98",le="_pulse_9uhoo_1",de="_disconnectActions_9uhoo_112",ue="_btn_9uhoo_118",me="_btnSecondary_9uhoo_134",he="_metricRow_9uhoo_152",ve="_metricGrid_9uhoo_158",_e="_metricCard_9uhoo_164",ge="_metric_ok_9uhoo_174",pe="_metric_warn_9uhoo_179",fe="_metric_error_9uhoo_184",xe="_metricHeader_9uhoo_189",je="_metricIcon_9uhoo_200",Ce="_metricTitle_9uhoo_204",we="_metricValue_9uhoo_208",Ne="_metricSubtitle_9uhoo_215",ye="_guideCard_9uhoo_225",Se="_guideTitle_9uhoo_232",Te="_checklist_9uhoo_239",be="_feedEmpty_9uhoo_263",Ie="_feedList_9uhoo_270",ke="_feedItem_9uhoo_278",De="_feedTime_9uhoo_291",Me="_feedIcon_9uhoo_298",Pe="_feedSummary_9uhoo_304",Ee="_feedItemClickable_9uhoo_314",Be="_feedChevron_9uhoo_322",He="_feedDetail_9uhoo_331",Re="_feedDetailPre_9uhoo_340",Le="_feedDetailText_9uhoo_349",$e="_changelogSummary_9uhoo_356",Ge="_changeTag_9uhoo_365",Fe="_tierBar_9uhoo_377",Ue="_tierBarTrack_9uhoo_383",Ve="_tierBarFillBasic_9uhoo_391",Ae="_tierBarFillPro_9uhoo_396",ze="_tierLabels_9uhoo_401",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:ue,btnSecondary:me,metricRow:he,metricGrid:ve,metricCard:_e,metric_ok:ge,metric_warn:pe,metric_error:fe,metricHeader:xe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Se,checklist:Te,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedItemClickable:Ee,feedChevron:Be,feedDetail:He,feedDetailPre:Re,feedDetailText:Le,changelogSummary:$e,changeTag:Ge,tierBar:Fe,tierBarTrack:Ue,tierBarFillBasic:Ve,tierBarFillPro:Ae,tierLabels:ze};function N({title:e,value:c,icon:i,subtitle:r,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:[i&&t.jsx("span",{className:s.metricIcon,children:i}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:c}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function E({changes:e}){const{t:c}=L(),[i,r]=_.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:c("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=i===n,l=a.raw,g=l&&(l.before!=null||l.after!=null||l.details!=null);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${g?s.feedItemClickable:""}`,onClick:()=>g&&r(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsx("span",{className:s.feedSummary,children:a.summary}),g&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&l&&t.jsx("div",{className:s.feedDetail,children:t.jsx(Oe,{change:l})})]},n)})})}function Oe({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 $(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return $(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 Je(){const{level:e,status:c}=G(),i=J(),[r,a]=_.useState(null),[n,d]=_.useState(null),[l,g]=_.useState(null),[x,h]=_.useState([]),y=_.useRef(null),S=_.useCallback(async()=>{try{const o=await D.get("/connection-info");a(o)}catch{a(null)}},[]),T=_.useCallback(async()=>{try{const o=await D.get("/api/dashboard/changelog/active");if(g(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(v=>({timestamp:v.timestamp?$(new Date(v.timestamp)):H(),icon:R(v.category),summary:v.summary,category:v.category,raw:v}));h(p)}}catch{g(null)}},[]),f=_.useCallback(async()=>{try{const o=await D.get("/sync/status");d(o)}catch{d(null)}},[]);return _.useEffect(()=>{e!=="L0"?(S(),T(),f()):(a(null),d(null),g(null));const o=new F;y.current=o,o.connect();const p=o.on("game_change",j=>{const u=j,C={timestamp:H(),icon:R(u.category),summary:u.summary,category:u.category};h(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),T()}),v=o.on("sync",j=>{const u=j;d(C=>({...C,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{p(),v(),o.disconnect(),y.current=null}},[e,S,T,f]),{level:e,status:c,connectionInfo:r,syncStatus:n,changeSummary:l,recentChanges:x,tier:i}}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 Xe(e,c){switch(e){case"syncing":return c("status.syncing","Syncing");case"initializing":return c("status.initializing","Initializing");case"error":return c("status.error","Error");default:return c("status.idle","Idle")}}function qe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,c,i,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:c,tooltip:i}),": ",r]},c)}function m(e,c){return t.jsx(U,{text:c,children:e})}function st(){var w,P;const{t:e}=L(),{level:c,status:i,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:d,tier:l}=Je(),g=q(i==null?void 0:i.uptime);if(c==="L0")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 x=(r==null?void 0:r.mcpInstanceCount)??0,h=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=r==null?void 0:r.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(i==null?void 0:i.pluginClients)??[],S=y.length>0,T=(i==null?void 0:i.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=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"),v=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=i?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${i.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),T),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(i.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(g??i.uptime))]:[];if(c==="L1")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"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 u=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:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(S?"status.online":"status.offline"),o),icon:"🔌",subtitle:u?`${u.placeName??u.projectName??"-"} / v${u.pluginVersion??"-"}`:void 0,status:S?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),v),value:m(Xe(a==null?void 0:a.state,e),v),icon:"🔄",status:qe(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")]})]})]}),!l.loading&&l.tier==="basic"&&l.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:l.basicCalls,proCalls:l.proCalls,totalCalls:l.totalCalls,proUsagePercent:l.proUsagePercent,upgradeHref:X.overview})]})]})}export{st as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,b as _,u as N,j as e,T as c,a as w}from"./index-BYvG5KEz.js";import{u as v,T as L}from"./tier-promo-config-CckH43fU.js";import{T}from"./TierPromoPanel-DzFynur7.js";import{I as g}from"./InfoLabel-CszBT8rJ.js";const M=5e3;function k(){const[t,a]=o.useState({state:"NotRunning"}),[d,i]=o.useState([]),[r,p]=o.useState(null),[f,b]=o.useState(!0),y=o.useRef(null),n=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/status");a(u)}catch{}},[]),m=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/history");i(u.entries??[])}catch{i([])}},[]),l=o.useCallback(async()=>{await Promise.all([n(),m()]),b(!1)},[n,m]),j=o.useCallback(()=>{l()},[l]),S=o.useCallback(async u=>{try{const P=await _.get(`/api/dashboard/playtest/report/${u}`);p(P)}catch{p(null)}},[]),h=o.useCallback(async u=>{try{await _.post("/api/dashboard/playtest/control",{action:u}),setTimeout(n,500)}catch{}},[n]);return o.useEffect(()=>(l(),y.current=setInterval(l,M),()=>{y.current&&clearInterval(y.current)}),[l]),{status:t,history:d,selectedReport:r,loading:f,loadReport:S,control:h,refresh:j}}const H="_page_9936t_2",C="_card_9936t_10",D="_cardHeader_9936t_17",$="_statusRow_9936t_29",E="_statusIndicator_9936t_36",A="_statusRunning_9936t_44",z="_statusPaused_9936t_49",B="_statusNotRunning_9936t_53",U="_statusLabel_9936t_57",O="_statusMeta_9936t_64",V="_controlButtons_9936t_70",F="_btn_9936t_77",G="_btnPrimary_9936t_99",q="_btnDanger_9936t_109",J="_historyList_9936t_119",K="_historyItem_9936t_127",Q="_historyItemSelected_9936t_146",W="_historyItemHeader_9936t_151",X="_historyIcon_9936t_157",Y="_historyTimestamp_9936t_162",Z="_historyName_9936t_169",tt="_historyItemMeta_9936t_179",et="_historyMode_9936t_188",st="_historyDuration_9936t_192",at="_historyStatus_9936t_196",rt="_status_passed_9936t_203",nt="_status_failed_9936t_207",ot="_status_running_9936t_211",it="_historyError_9936t_215",lt="_reportContainer_9936t_226",ct="_reportSection_9936t_232",ut="_reportSectionHeader_9936t_238",dt="_reportMarkdown_9936t_250",pt="_reportLogs_9936t_263",yt="_emptyState_9936t_278",mt="_emptyStateTitle_9936t_285",ht="_emptyStateMessage_9936t_293",_t="_upgradePanel_9936t_302",gt="_upgradePanelIcon_9936t_310",xt="_upgradePanelTitle_9936t_315",ft="_upgradePanelDesc_9936t_323",bt="_benefitList_9936t_333",jt="_benefitItem_9936t_344",St="_upgradeActions_9936t_359",s={page:H,card:C,cardHeader:D,statusRow:$,statusIndicator:E,statusRunning:A,statusPaused:z,statusNotRunning:B,statusLabel:U,statusMeta:O,controlButtons:V,btn:F,btnPrimary:G,btnDanger:q,historyList:J,historyItem:K,historyItemSelected:Q,historyItemHeader:W,historyIcon:X,historyTimestamp:Y,historyName:Z,historyItemMeta:tt,historyMode:et,historyDuration:st,historyStatus:at,status_passed:rt,status_failed:nt,status_running:ot,historyError:it,reportContainer:lt,reportSection:ct,reportSectionHeader:ut,reportMarkdown:dt,reportLogs:pt,emptyState:yt,emptyStateTitle:mt,emptyStateMessage:ht,upgradePanel:_t,upgradePanelIcon:gt,upgradePanelTitle:xt,upgradePanelDesc:ft,benefitList:bt,benefitItem:jt,upgradeActions:St};function x(t){return t.trim().toLowerCase()}function Nt(t){switch(x(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Rt(t,a){switch(x(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function It(t,a){switch(x(a)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function Pt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function wt({entries:t,onSelect:a,selectedTimestamp:d}){const{t:i}=N();return t.length===0?e.jsx("div",{className:s.emptyState,children:i("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(r=>{const p=r.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${p?s.historyItemSelected:""}`,onClick:()=>a(r.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Nt(r.status)}),e.jsx("span",{className:s.historyTimestamp,children:r.timestamp}),e.jsx("span",{className:s.historyName,children:r.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(c,{text:i("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[i("playtest.history.mode","Mode"),": ",Rt(i,r.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Pt(r.durationMs)}),e.jsx(c,{text:i("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${x(r.status)}`]??""}`,children:It(i,r.status)})})]}),r.errorMessage&&e.jsx("div",{className:s.historyError,children:r.errorMessage})]},r.timestamp)})})}function vt({report:t}){const{t:a}=N();return e.jsxs("div",{className:s.reportContainer,children:[t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:a("playtest.report.empty","No report content available")})]})}function I(t){return(t==null?void 0:t.trim().toLowerCase())??""}function R(t){switch(I(t).replace(/[\s_-]+/g,"")){case"running":return"running";case"paused":return"paused";case"notrunning":return"not-running";default:return"not-running"}}function Lt(t){switch(R(t)){case"paused":return s.statusPaused;case"running":return s.statusRunning;default:return s.statusNotRunning}}function Tt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused","Paused");case"running":return t("playtest.status.state.running","Running");default:return t("playtest.status.state.notRunning","Not Running")}}function Mt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused.tooltip","The current Roblox playtest session is paused.");case"running":return t("playtest.status.state.running.tooltip","A Roblox playtest session is currently running.");default:return t("playtest.status.state.notRunning.tooltip","No Roblox playtest session is currently running.")}}function kt(t,a){switch(I(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Et(){const{t}=N(),{level:a}=w(),{tier:d,loading:i}=v(),r=k(),[p,f]=o.useState(null),b=!i&&d==="basic",y=a==="L0"||a==="L1";if(b)return e.jsx("div",{className:s.page,children:e.jsx(T,{icon:t("playtest.basic.icon","🎮"),title:t("playtest.basic.title","Playtest is a Pro-only feature"),description:t("playtest.basic.desc","Control playtesting from the dashboard, run automated tests, and view detailed test reports."),benefits:[t("playtest.basic.benefit1","One-click play/pause/stop controls"),t("playtest.basic.benefit2","Automated test execution via AI agent"),t("playtest.basic.benefit3","Test history with pass/fail tracking"),t("playtest.basic.benefit4","Detailed markdown test reports")],upgradeLabel:t("tier.upgrade","Upgrade to Pro"),upgradeHref:L.playtest})});const{status:n,history:m,selectedReport:l,loading:j}=r,S=h=>{f(h),r.loadReport(h)};return e.jsxs("div",{className:s.page,children:[!y&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.status.title","Playtest Status"),tooltip:t("playtest.status.title.tooltip","Current Roblox playtest session state reported by Studio.")})}),e.jsxs("div",{className:s.statusRow,children:[e.jsx("span",{className:`${s.statusIndicator} ${Lt(n.state)}`}),e.jsx(c,{text:Mt(t,n.state),children:e.jsx("span",{className:s.statusLabel,children:Tt(t,n.state)})}),n.mode&&e.jsxs("span",{className:s.statusMeta,children:[e.jsx(g,{label:`${t("playtest.status.mode","Mode")}:`,tooltip:t("playtest.status.mode.tooltip","Studio playtest launch mode for the current session.")})," ",e.jsx(c,{text:t("playtest.status.mode.value.tooltip","Specific Roblox Studio playtest mode currently in use."),children:e.jsx("span",{children:kt(t,n.mode)})})]}),n.placeName&&e.jsx(c,{text:t("playtest.status.place.tooltip","Roblox place currently associated with this playtest session."),children:e.jsxs("span",{className:s.statusMeta,children:[n.placeName,n.placeId?` (${n.placeId})`:""]})})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")})}),j?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):m.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(c,{text:t("playtest.empty.runTest.tooltip","Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(wt,{entries:m,onSelect:S,selectedTimestamp:p??void 0})]}),l&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(vt,{report:l})]})]})}export{Et as Component};
|
|
1
|
+
import{r as o,b as _,u as N,j as e,T as c,a as w}from"./index-mMUjBHCe.js";import{u as v,T as L}from"./tier-promo-config-BFJCz95t.js";import{T}from"./TierPromoPanel-B2hY_Iul.js";import{I as g}from"./InfoLabel-Cvotfyns.js";const M=5e3;function k(){const[t,a]=o.useState({state:"NotRunning"}),[d,i]=o.useState([]),[r,p]=o.useState(null),[f,b]=o.useState(!0),y=o.useRef(null),n=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/status");a(u)}catch{}},[]),m=o.useCallback(async()=>{try{const u=await _.get("/api/dashboard/playtest/history");i(u.entries??[])}catch{i([])}},[]),l=o.useCallback(async()=>{await Promise.all([n(),m()]),b(!1)},[n,m]),j=o.useCallback(()=>{l()},[l]),S=o.useCallback(async u=>{try{const P=await _.get(`/api/dashboard/playtest/report/${u}`);p(P)}catch{p(null)}},[]),h=o.useCallback(async u=>{try{await _.post("/api/dashboard/playtest/control",{action:u}),setTimeout(n,500)}catch{}},[n]);return o.useEffect(()=>(l(),y.current=setInterval(l,M),()=>{y.current&&clearInterval(y.current)}),[l]),{status:t,history:d,selectedReport:r,loading:f,loadReport:S,control:h,refresh:j}}const H="_page_9936t_2",C="_card_9936t_10",D="_cardHeader_9936t_17",$="_statusRow_9936t_29",E="_statusIndicator_9936t_36",A="_statusRunning_9936t_44",z="_statusPaused_9936t_49",B="_statusNotRunning_9936t_53",U="_statusLabel_9936t_57",O="_statusMeta_9936t_64",V="_controlButtons_9936t_70",F="_btn_9936t_77",G="_btnPrimary_9936t_99",q="_btnDanger_9936t_109",J="_historyList_9936t_119",K="_historyItem_9936t_127",Q="_historyItemSelected_9936t_146",W="_historyItemHeader_9936t_151",X="_historyIcon_9936t_157",Y="_historyTimestamp_9936t_162",Z="_historyName_9936t_169",tt="_historyItemMeta_9936t_179",et="_historyMode_9936t_188",st="_historyDuration_9936t_192",at="_historyStatus_9936t_196",rt="_status_passed_9936t_203",nt="_status_failed_9936t_207",ot="_status_running_9936t_211",it="_historyError_9936t_215",lt="_reportContainer_9936t_226",ct="_reportSection_9936t_232",ut="_reportSectionHeader_9936t_238",dt="_reportMarkdown_9936t_250",pt="_reportLogs_9936t_263",yt="_emptyState_9936t_278",mt="_emptyStateTitle_9936t_285",ht="_emptyStateMessage_9936t_293",_t="_upgradePanel_9936t_302",gt="_upgradePanelIcon_9936t_310",xt="_upgradePanelTitle_9936t_315",ft="_upgradePanelDesc_9936t_323",bt="_benefitList_9936t_333",jt="_benefitItem_9936t_344",St="_upgradeActions_9936t_359",s={page:H,card:C,cardHeader:D,statusRow:$,statusIndicator:E,statusRunning:A,statusPaused:z,statusNotRunning:B,statusLabel:U,statusMeta:O,controlButtons:V,btn:F,btnPrimary:G,btnDanger:q,historyList:J,historyItem:K,historyItemSelected:Q,historyItemHeader:W,historyIcon:X,historyTimestamp:Y,historyName:Z,historyItemMeta:tt,historyMode:et,historyDuration:st,historyStatus:at,status_passed:rt,status_failed:nt,status_running:ot,historyError:it,reportContainer:lt,reportSection:ct,reportSectionHeader:ut,reportMarkdown:dt,reportLogs:pt,emptyState:yt,emptyStateTitle:mt,emptyStateMessage:ht,upgradePanel:_t,upgradePanelIcon:gt,upgradePanelTitle:xt,upgradePanelDesc:ft,benefitList:bt,benefitItem:jt,upgradeActions:St};function x(t){return t.trim().toLowerCase()}function Nt(t){switch(x(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Rt(t,a){switch(x(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function It(t,a){switch(x(a)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function Pt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function wt({entries:t,onSelect:a,selectedTimestamp:d}){const{t:i}=N();return t.length===0?e.jsx("div",{className:s.emptyState,children:i("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(r=>{const p=r.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${p?s.historyItemSelected:""}`,onClick:()=>a(r.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Nt(r.status)}),e.jsx("span",{className:s.historyTimestamp,children:r.timestamp}),e.jsx("span",{className:s.historyName,children:r.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(c,{text:i("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[i("playtest.history.mode","Mode"),": ",Rt(i,r.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Pt(r.durationMs)}),e.jsx(c,{text:i("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${x(r.status)}`]??""}`,children:It(i,r.status)})})]}),r.errorMessage&&e.jsx("div",{className:s.historyError,children:r.errorMessage})]},r.timestamp)})})}function vt({report:t}){const{t:a}=N();return e.jsxs("div",{className:s.reportContainer,children:[t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(c,{text:a("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:a("playtest.report.empty","No report content available")})]})}function I(t){return(t==null?void 0:t.trim().toLowerCase())??""}function R(t){switch(I(t).replace(/[\s_-]+/g,"")){case"running":return"running";case"paused":return"paused";case"notrunning":return"not-running";default:return"not-running"}}function Lt(t){switch(R(t)){case"paused":return s.statusPaused;case"running":return s.statusRunning;default:return s.statusNotRunning}}function Tt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused","Paused");case"running":return t("playtest.status.state.running","Running");default:return t("playtest.status.state.notRunning","Not Running")}}function Mt(t,a){switch(R(a)){case"paused":return t("playtest.status.state.paused.tooltip","The current Roblox playtest session is paused.");case"running":return t("playtest.status.state.running.tooltip","A Roblox playtest session is currently running.");default:return t("playtest.status.state.notRunning.tooltip","No Roblox playtest session is currently running.")}}function kt(t,a){switch(I(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Et(){const{t}=N(),{level:a}=w(),{tier:d,loading:i}=v(),r=k(),[p,f]=o.useState(null),b=!i&&d==="basic",y=a==="L0"||a==="L1";if(b)return e.jsx("div",{className:s.page,children:e.jsx(T,{icon:t("playtest.basic.icon","🎮"),title:t("playtest.basic.title","Playtest is a Pro-only feature"),description:t("playtest.basic.desc","Control playtesting from the dashboard, run automated tests, and view detailed test reports."),benefits:[t("playtest.basic.benefit1","One-click play/pause/stop controls"),t("playtest.basic.benefit2","Automated test execution via AI agent"),t("playtest.basic.benefit3","Test history with pass/fail tracking"),t("playtest.basic.benefit4","Detailed markdown test reports")],upgradeLabel:t("tier.upgrade","Upgrade to Pro"),upgradeHref:L.playtest})});const{status:n,history:m,selectedReport:l,loading:j}=r,S=h=>{f(h),r.loadReport(h)};return e.jsxs("div",{className:s.page,children:[!y&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.status.title","Playtest Status"),tooltip:t("playtest.status.title.tooltip","Current Roblox playtest session state reported by Studio.")})}),e.jsxs("div",{className:s.statusRow,children:[e.jsx("span",{className:`${s.statusIndicator} ${Lt(n.state)}`}),e.jsx(c,{text:Mt(t,n.state),children:e.jsx("span",{className:s.statusLabel,children:Tt(t,n.state)})}),n.mode&&e.jsxs("span",{className:s.statusMeta,children:[e.jsx(g,{label:`${t("playtest.status.mode","Mode")}:`,tooltip:t("playtest.status.mode.tooltip","Studio playtest launch mode for the current session.")})," ",e.jsx(c,{text:t("playtest.status.mode.value.tooltip","Specific Roblox Studio playtest mode currently in use."),children:e.jsx("span",{children:kt(t,n.mode)})})]}),n.placeName&&e.jsx(c,{text:t("playtest.status.place.tooltip","Roblox place currently associated with this playtest session."),children:e.jsxs("span",{className:s.statusMeta,children:[n.placeName,n.placeId?` (${n.placeId})`:""]})})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")})}),j?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):m.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(c,{text:t("playtest.empty.runTest.tooltip","Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(wt,{entries:m,onSelect:S,selectedTimestamp:p??void 0})]}),l&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(g,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(vt,{report:l})]})]})}export{Et as Component};
|
|
@@ -1,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-mMUjBHCe.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{r as c,h as S,D as C,b as L,u as T,j as e,T as u,A as E,S as A}from"./index-BYvG5KEz.js";import{I as n}from"./InfoLabel-CszBT8rJ.js";function I(){const[t,_]=c.useState(null),[f,g]=c.useState(null),[i,p]=c.useState(null),[v,x]=c.useState(!1),[j,N]=c.useState(!0),h=c.useCallback(async()=>{try{return await S("gumroad")}catch{return null}},[]);c.useEffect(()=>{let l=!1;async function r(){try{const[o,a,d]=await Promise.all([L.get("/api/dashboard/settings").catch(()=>null),h(),L.get("/sync/config").catch(()=>null)]);if(l)return;o&&_(o),a&&g(a),d&&p(d)}catch{}finally{l||N(!1)}}return r(),()=>{l=!0}},[h]),c.useEffect(()=>{const l=new C;l.connect();const r=l.on("license",()=>{h().then(o=>{o&&g(o)})});return()=>{r(),l.disconnect()}},[h]);const y=c.useCallback(async(l,r)=>{if(t){_(o=>o&&{...o,hot:{...o.hot,[l]:r}}),x(!0);try{await L.patch("/api/dashboard/settings",{[l]:r})}catch{_(o=>o&&{...o,hot:{...o.hot,[l]:t.hot[l]}})}finally{x(!1)}}},[t]),m=c.useCallback(async l=>{x(!0);try{const r=await L.post("/sync/config",l);p(r)}catch{}finally{x(!1)}},[]);return{settings:t,license:f,syncConfig:i,saving:v,updateHotSetting:y,updateSyncConfig:m,loading:j}}const w="_page_ob0tn_2",O="_card_ob0tn_10",R="_licenseCardPro_ob0tn_17",H="_cardHeader_ob0tn_28",B="_headerBadge_ob0tn_42",k="_headerBadgeLive_ob0tn_53",P="_licenseGrid_ob0tn_59",D="_statusDot_ob0tn_77",F="_statusActive_ob0tn_86",G="_statusInactive_ob0tn_91",M="_statusExpired_ob0tn_95",U="_proBadge_ob0tn_100",q="_upgradeLink_ob0tn_114",$="_settingRow_ob0tn_129",V="_settingLabel_ob0tn_143",K="_settingControl_ob0tn_150",Q="_select_ob0tn_157",Y="_numberInput_ob0tn_175",z="_checkbox_ob0tn_193",J="_savedIndicator_ob0tn_201",W="_coldGrid_ob0tn_214",X="_coldHint_ob0tn_232",Z="_syncForm_ob0tn_241",ee="_syncRow_ob0tn_247",te="_syncField_ob0tn_254",se="_saveBtn_ob0tn_268",ae="_langRow_ob0tn_292",ne="_loading_ob0tn_305",ie="_unit_ob0tn_314",s={page:w,card:O,licenseCardPro:R,cardHeader:H,headerBadge:B,headerBadgeLive:k,licenseGrid:P,statusDot:D,statusActive:F,statusInactive:G,statusExpired:M,proBadge:U,upgradeLink:q,settingRow:$,settingLabel:V,settingControl:K,select:Q,numberInput:Y,checkbox:z,savedIndicator:J,coldGrid:W,coldHint:X,syncForm:Z,syncRow:ee,syncField:te,saveBtn:se,langRow:ae,loading:ne,unit:ie},le={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},oe=["debug","info","warn","error"];function ce(t){return t==="active"?s.statusActive:t==="expired"?s.statusExpired:s.statusInactive}function ge(){const{t,selectedLocale:_,setLocale:f}=T(),{settings:g,license:i,syncConfig:p,saving:v,updateHotSetting:x,updateSyncConfig:j,loading:N}=I(),[h,y]=c.useState(null),[m,l]=c.useState({});c.useEffect(()=>{p&&l({maxDepth:p.maxDepth,maxInstances:p.maxInstances})},[p]);const r=c.useCallback(async(a,d)=>{await x(a,d),y(a),setTimeout(()=>y(b=>b===a?null:b),2e3)},[x]),o=c.useCallback(async()=>{await j(m)},[j,m]);return N?e.jsx("div",{className:s.page,children:e.jsx("div",{className:s.loading,children:t("common.loading")})}):e.jsxs("div",{className:s.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[s.card,(i==null?void 0:i.tier)==="pro"?s.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.licenseGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${s.statusDot} ${ce(i.status)}`}),e.jsx(u,{text:t(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:t(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?s.proBadge:"",children:e.jsx(u,{text:t(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),i.maskedKey&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:i.maskedKey})})]}),i.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:i.provider})})]})]}),i.tier==="basic"&&e.jsx("a",{className:s.upgradeLink,href:"https://hope1026.gumroad.com/l/roblox-mcp",target:"_blank",rel:"noopener noreferrer",children:t("tier.upgrade")})]}):e.jsx("div",{className:s.loading,children:t("settings.license.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(u,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${s.headerBadge} ${s.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail the dashboard writes to its logs.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("select",{className:s.select,value:g.hot.LOG_LEVEL,onChange:a=>r("LOG_LEVEL",a.target.value),children:oe.map(a=>e.jsx("option",{value:a,children:a},a))}),h==="LOG_LEVEL"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the dashboard history views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_HISTORY,onChange:a=>r("ENABLE_LOCAL_HISTORY",a.target.checked)}),h==="ENABLE_LOCAL_HISTORY"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for dashboard reporting.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_STATISTICS,onChange:a=>r("ENABLE_LOCAL_STATISTICS",a.target.checked)}),h==="ENABLE_LOCAL_STATISTICS"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.requestTimeout","Request Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time the dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"number",className:s.numberInput,value:g.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||r("REQUEST_TIMEOUT",d)}}),e.jsx(u,{text:t("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:s.unit,children:t("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.coldGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP dashboard HTTP server.")})}),e.jsx("dd",{children:g.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(n,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP dashboard HTTP server binds to.")})}),e.jsx("dd",{children:g.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(n,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether the dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening the dashboard in a browser."),children:String(g.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:s.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.sync.title","Sync Settings"),tooltip:t("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:s.syncForm,children:[e.jsxs("div",{className:s.syncRow,children:[e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxDepth","Max Depth"),tooltip:t("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxDepth??10,min:1,max:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxDepth:d}))}})]}),e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxInstances","Max Instances"),tooltip:t("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxInstances??5e3,min:100,max:5e4,step:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxInstances:d}))}})]})]}),e.jsx("button",{className:s.saveBtn,onClick:o,disabled:v,children:v?t("common.loading"):t("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the dashboard interface text is localized.")})}),e.jsxs("div",{className:s.langRow,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.language.dashboard","Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:s.select,value:_,onChange:a=>f(a.target.value),children:[e.jsx("option",{value:E,children:t("settings.language.auto","Auto")}),A.map(a=>e.jsx("option",{value:a,children:le[a]??a},a))]})]})]})]})}export{ge as Component};
|
|
1
|
+
import{r as c,h as S,D as C,b as L,u as T,j as e,T as u,A as E,S as A}from"./index-mMUjBHCe.js";import{I as n}from"./InfoLabel-Cvotfyns.js";function I(){const[t,_]=c.useState(null),[f,g]=c.useState(null),[i,p]=c.useState(null),[v,x]=c.useState(!1),[j,N]=c.useState(!0),h=c.useCallback(async()=>{try{return await S("gumroad")}catch{return null}},[]);c.useEffect(()=>{let l=!1;async function r(){try{const[o,a,d]=await Promise.all([L.get("/api/dashboard/settings").catch(()=>null),h(),L.get("/sync/config").catch(()=>null)]);if(l)return;o&&_(o),a&&g(a),d&&p(d)}catch{}finally{l||N(!1)}}return r(),()=>{l=!0}},[h]),c.useEffect(()=>{const l=new C;l.connect();const r=l.on("license",()=>{h().then(o=>{o&&g(o)})});return()=>{r(),l.disconnect()}},[h]);const y=c.useCallback(async(l,r)=>{if(t){_(o=>o&&{...o,hot:{...o.hot,[l]:r}}),x(!0);try{await L.patch("/api/dashboard/settings",{[l]:r})}catch{_(o=>o&&{...o,hot:{...o.hot,[l]:t.hot[l]}})}finally{x(!1)}}},[t]),m=c.useCallback(async l=>{x(!0);try{const r=await L.post("/sync/config",l);p(r)}catch{}finally{x(!1)}},[]);return{settings:t,license:f,syncConfig:i,saving:v,updateHotSetting:y,updateSyncConfig:m,loading:j}}const w="_page_ob0tn_2",O="_card_ob0tn_10",R="_licenseCardPro_ob0tn_17",H="_cardHeader_ob0tn_28",B="_headerBadge_ob0tn_42",k="_headerBadgeLive_ob0tn_53",P="_licenseGrid_ob0tn_59",D="_statusDot_ob0tn_77",F="_statusActive_ob0tn_86",G="_statusInactive_ob0tn_91",M="_statusExpired_ob0tn_95",U="_proBadge_ob0tn_100",q="_upgradeLink_ob0tn_114",$="_settingRow_ob0tn_129",V="_settingLabel_ob0tn_143",K="_settingControl_ob0tn_150",Q="_select_ob0tn_157",Y="_numberInput_ob0tn_175",z="_checkbox_ob0tn_193",J="_savedIndicator_ob0tn_201",W="_coldGrid_ob0tn_214",X="_coldHint_ob0tn_232",Z="_syncForm_ob0tn_241",ee="_syncRow_ob0tn_247",te="_syncField_ob0tn_254",se="_saveBtn_ob0tn_268",ae="_langRow_ob0tn_292",ne="_loading_ob0tn_305",ie="_unit_ob0tn_314",s={page:w,card:O,licenseCardPro:R,cardHeader:H,headerBadge:B,headerBadgeLive:k,licenseGrid:P,statusDot:D,statusActive:F,statusInactive:G,statusExpired:M,proBadge:U,upgradeLink:q,settingRow:$,settingLabel:V,settingControl:K,select:Q,numberInput:Y,checkbox:z,savedIndicator:J,coldGrid:W,coldHint:X,syncForm:Z,syncRow:ee,syncField:te,saveBtn:se,langRow:ae,loading:ne,unit:ie},le={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},oe=["debug","info","warn","error"];function ce(t){return t==="active"?s.statusActive:t==="expired"?s.statusExpired:s.statusInactive}function ge(){const{t,selectedLocale:_,setLocale:f}=T(),{settings:g,license:i,syncConfig:p,saving:v,updateHotSetting:x,updateSyncConfig:j,loading:N}=I(),[h,y]=c.useState(null),[m,l]=c.useState({});c.useEffect(()=>{p&&l({maxDepth:p.maxDepth,maxInstances:p.maxInstances})},[p]);const r=c.useCallback(async(a,d)=>{await x(a,d),y(a),setTimeout(()=>y(b=>b===a?null:b),2e3)},[x]),o=c.useCallback(async()=>{await j(m)},[j,m]);return N?e.jsx("div",{className:s.page,children:e.jsx("div",{className:s.loading,children:t("common.loading")})}):e.jsxs("div",{className:s.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[s.card,(i==null?void 0:i.tier)==="pro"?s.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.licenseGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${s.statusDot} ${ce(i.status)}`}),e.jsx(u,{text:t(`settings.license.${i.status}.tooltip`,"Current license activation state."),children:t(`settings.license.${i.status}`,i.status)})]}),e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available dashboard features.")})}),e.jsx("dd",{className:i.tier==="pro"?s.proBadge:"",children:e.jsx(u,{text:t(`tier.${i.tier}.tooltip`,"Available feature set for the connected license."),children:i.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),i.maskedKey&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:i.maskedKey})})]}),i.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(n,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:i.provider})})]})]}),i.tier==="basic"&&e.jsx("a",{className:s.upgradeLink,href:"https://hope1026.gumroad.com/l/roblox-mcp",target:"_blank",rel:"noopener noreferrer",children:t("tier.upgrade")})]}):e.jsx("div",{className:s.loading,children:t("settings.license.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(u,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${s.headerBadge} ${s.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail the dashboard writes to its logs.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("select",{className:s.select,value:g.hot.LOG_LEVEL,onChange:a=>r("LOG_LEVEL",a.target.value),children:oe.map(a=>e.jsx("option",{value:a,children:a},a))}),h==="LOG_LEVEL"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the dashboard history views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_HISTORY,onChange:a=>r("ENABLE_LOCAL_HISTORY",a.target.checked)}),h==="ENABLE_LOCAL_HISTORY"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for dashboard reporting.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"checkbox",className:s.checkbox,checked:g.hot.ENABLE_LOCAL_STATISTICS,onChange:a=>r("ENABLE_LOCAL_STATISTICS",a.target.checked)}),h==="ENABLE_LOCAL_STATISTICS"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(n,{label:t("settings.general.requestTimeout","Request Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time the dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"number",className:s.numberInput,value:g.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||r("REQUEST_TIMEOUT",d)}}),e.jsx(u,{text:t("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:s.unit,children:t("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:s.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(n,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),g?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.coldGrid,children:[e.jsx("dt",{children:e.jsx(n,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP dashboard HTTP server.")})}),e.jsx("dd",{children:g.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(n,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP dashboard HTTP server binds to.")})}),e.jsx("dd",{children:g.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(n,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether the dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening the dashboard in a browser."),children:String(g.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:s.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:s.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.sync.title","Sync Settings"),tooltip:t("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:s.syncForm,children:[e.jsxs("div",{className:s.syncRow,children:[e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxDepth","Max Depth"),tooltip:t("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxDepth??10,min:1,max:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxDepth:d}))}})]}),e.jsxs("div",{className:s.syncField,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.sync.maxInstances","Max Instances"),tooltip:t("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:s.numberInput,value:m.maxInstances??5e3,min:100,max:5e4,step:100,onChange:a=>{const d=parseInt(a.target.value,10);isNaN(d)||l(b=>({...b,maxInstances:d}))}})]})]}),e.jsx("button",{className:s.saveBtn,onClick:o,disabled:v,children:v?t("common.loading"):t("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(n,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the dashboard interface text is localized.")})}),e.jsxs("div",{className:s.langRow,children:[e.jsx("label",{children:e.jsx(n,{label:t("settings.language.dashboard","Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:s.select,value:_,onChange:a=>f(a.target.value),children:[e.jsx("option",{value:E,children:t("settings.language.auto","Auto")}),A.map(a=>e.jsx("option",{value:a,children:le[a]??a},a))]})]})]})]})}export{ge as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as s}from"./index-
|
|
1
|
+
import{u as o,j as s}from"./index-mMUjBHCe.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-BOYoftuM.js → SyncPage-DeQjKxmi.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,b,D as w,u as T,a as N,j as t,T as g,e as I}from"./index-
|
|
1
|
+
import{r as o,b,D as w,u as T,a as N,j as t,T as g,e as I}from"./index-mMUjBHCe.js";import{I as p}from"./InfoLabel-Cvotfyns.js";import{S as L}from"./StatusBadge-C_KxiYEt.js";import{u as S,T as R}from"./tier-promo-config-BFJCz95t.js";import{T as P}from"./TierPromoPanel-B2hY_Iul.js";const C=5e3;function k(){const[e,i]=o.useState(null),[f,x]=o.useState(null),[l,r]=o.useState([]),[h,n]=o.useState(!0),y=o.useRef(null),_=o.useRef(null),m=o.useCallback(async()=>{try{const c=await b.get("/sync/status");i(c)}catch{}},[]),a=o.useCallback(async()=>{try{const c=await b.get("/sync/config");x(c)}catch{}},[]),d=o.useCallback(async()=>{try{const c=await b.get("/sync/history",{limit:"30"});r(c.entries??[])}catch{r([])}},[]),u=o.useCallback(async()=>{await Promise.all([m(),a(),d()]),n(!1)},[m,a,d]),j=o.useCallback(()=>{u()},[u]);return o.useEffect(()=>(u(),_.current=setInterval(u,C),()=>{_.current&&clearInterval(_.current)}),[u]),o.useEffect(()=>{const c=new w;y.current=c,c.connect();const v=c.on("sync",()=>{m(),d()});return()=>{v(),c.disconnect(),y.current=null}},[m,d]),{status:e,config:f,history:l,loading:h,refresh:j}}const E="_page_u3dxa_2",$="_card_u3dxa_10",A="_cardHeader_u3dxa_17",B="_statusRow_u3dxa_29",O="_metaItem_u3dxa_36",D="_statusGrid_u3dxa_42",H="_table_u3dxa_61",M="_directionRail_u3dxa_89",U="_endpointLabel_u3dxa_95",F="_optionRail_u3dxa_99",G="_directionOption_u3dxa_105",V="_directionOptionActive_u3dxa_119",W="_directionOptionInactive_u3dxa_123",q="_direction_forward_u3dxa_129",z="_direction_bidirectional_u3dxa_133",Y="_direction_reverse_u3dxa_137",J="_lockBadge_u3dxa_142",K="_proBadge_u3dxa_150",Q="_forwardBadge_u3dxa_164",X="_configGrid_u3dxa_177",Z="_configItem_u3dxa_183",ee="_configLabel_u3dxa_189",te="_configValue_u3dxa_197",se="_logContainer_u3dxa_204",ne="_logEntry_u3dxa_211",ie="_logTime_u3dxa_223",ae="_logType_u3dxa_229",ce="_logTypeWrite_u3dxa_238",oe="_logTypeUpdate_u3dxa_242",le="_logTypeDelete_u3dxa_246",re="_logTypeIdle_u3dxa_250",de="_logPath_u3dxa_254",ue="_logEmpty_u3dxa_261",pe="_overlay_u3dxa_268",ye="_overlayTitle_u3dxa_278",ge="_overlayMessage_u3dxa_285",xe="_checklist_u3dxa_291",he="_checkItem_u3dxa_301",_e="_upgradePanel_u3dxa_317",me="_upgradePanelHeader_u3dxa_324",fe="_benefitList_u3dxa_332",je="_benefitItem_u3dxa_341",be="_upgradeActions_u3dxa_356",ve="_btn_u3dxa_361",we="_btnPrimary_u3dxa_378",Te="_disabled_u3dxa_389",s={page:E,card:$,cardHeader:A,statusRow:B,metaItem:O,statusGrid:D,table:H,directionRail:M,endpointLabel:U,optionRail:F,directionOption:G,directionOptionActive:V,directionOptionInactive:W,direction_forward:q,direction_bidirectional:z,direction_reverse:Y,lockBadge:J,proBadge:K,forwardBadge:Q,configGrid:X,configItem:Z,configLabel:ee,configValue:te,logContainer:se,logEntry:ne,logTime:ie,logType:ae,logTypeWrite:ce,logTypeUpdate:oe,logTypeDelete:le,logTypeIdle:re,logPath:de,logEmpty:ue,overlay:pe,overlayTitle:ye,overlayMessage:ge,checklist:xe,checkItem:he,upgradePanel:_e,upgradePanelHeader:me,benefitList:fe,benefitItem:je,upgradeActions:be,btn:ve,btnPrimary:we,disabled:Te},Ne=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ie(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Le(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(0)}MB`}function Se(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Re(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Pe(e,i,f,x){const l=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),r=e("sync.directions.endpoint.local","Local"),h=e("sync.directions.endpoint.studio","Studio");switch(f){case"forward":return[`${l}: ${r} <- ${h}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
2
|
`);case"bidirectional":return[`${l}: ${r} <-> ${h}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),x?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
3
|
`);case"reverse":return[`${l}: ${r} -> ${h}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),x?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
4
|
`);default:return l}}const Ce=["scripts","values","containers","data","services"];function ke(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function Ee(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function $e(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function Ae(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function Ue(){const{t:e}=T(),{level:i}=N(),{tier:f,loading:x}=S(),l=k(),r=!x&&f==="basic";if(i==="L0"||i==="L1")return t.jsx("div",{className:s.page,children:t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the Weppy MCP plugin installed?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check3","Are HTTP Requests enabled in Studio settings?")})]})]})})});const n=l.status,y=l.config,_=l.history,m=Re(n==null?void 0:n.state);return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(g,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),r&&t.jsx(g,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(L,{status:m}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(p,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.path","Path"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(p,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(g,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(p,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:Ce.map(a=>{var j;const d=n.directions[a],u=(j=n.applyModes)==null?void 0:j[a];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${a}-direction-rail`,children:[t.jsx(g,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:Ne.map(c=>t.jsx(I,{text:Pe(e,a,c.key,r),children:t.jsx("span",{className:`${s.directionOption} ${d===c.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${c.key}`]??""}`,"data-active":d===c.key?"true":"false",children:c.symbol})},c.key))}),t.jsx(g,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(g,{text:Ee(e,u),children:ke(e,u)})})]},a)})})]})]}),y&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.config.title","Sync Config")}),t.jsxs("div",{className:s.configGrid,children:[t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxDepth","Max Depth")}),t.jsx("span",{className:s.configValue,children:y.maxDepth})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxInstances","Max Instances")}),t.jsx("span",{className:s.configValue,children:y.maxInstances})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.dirLimit","Dir Limit")}),t.jsx("span",{className:s.configValue,children:Le(y.directorySizeLimit)})]})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.log.title","Sync Log")}),t.jsx("div",{className:s.logContainer,children:_.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):_.map((a,d)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ie(a.timestamp)}),t.jsx(g,{text:Ae(e,a.type),children:t.jsx("span",{className:`${s.logType} ${Se(a.type)}`,children:$e(e,a.type)})}),t.jsxs("span",{className:s.logPath,children:[a.path,a.details?` — ${a.details}`:""]})]},d))})]}),r&&t.jsx(P,{title:e("sync.upgrade.title","Unlock Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:R.sync})]})}export{Ue as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as j,r as u,f as b,g as f,j as s}from"./index-
|
|
1
|
+
import{u as j,r as u,f as b,g as f,j as s}from"./index-mMUjBHCe.js";import{s as e,a as v}from"./tier-promo-config-BFJCz95t.js";function C({icon:a,title:i,description:c,benefits:o,upgradeLabel:m,upgradeHref:d}){const{t:p}=j(),[h,r]=u.useState(!1),{trackEvent:n}=b(),{pathname:x}=f(),t=x.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.panel,children:[a&&s.jsx("div",{className:e.panelIcon,children:a}),s.jsx("div",{className:e.panelTitle,children:i}),s.jsx("div",{className:e.panelDesc,children:c}),s.jsx("ul",{className:e.benefitList,children:o.map(l=>s.jsx("li",{className:e.benefitItem,children:l},l))}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{n("dashboard_tier_toggle",{page:t}),r(!0)},children:p("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>n("dashboard_upgrade_click",{page:t}),children:m})]})]}),h&&s.jsx(v,{onClose:()=>r(!1)})]})}export{C as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as h,r as x,f as g,g as j,j as s}from"./index-
|
|
1
|
+
import{u as h,r as x,f as g,g as j,j as s}from"./index-mMUjBHCe.js";import{s as e,a as b}from"./tier-promo-config-BFJCz95t.js";function N({basicCalls:t,proCalls:a,totalCalls:l,proUsagePercent:c,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=g(),{pathname:m}=j(),n=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromo,children:[s.jsxs("div",{className:e.progressMain,children:[s.jsxs("div",{className:e.progressLabel,children:[s.jsx("span",{children:r("tier.progress.label","Pro / Total")}),s.jsxs("span",{children:[a," / ",l]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(c,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",t]}),s.jsxs("span",{children:[r("tier.pro")," ",a]})]})]}),s.jsx("span",{className:e.progressText,children:r("tier.banner.save","Save AI tokens with Pro!")}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{i("dashboard_tier_toggle",{page:n}),o(!0)},children:r("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>i("dashboard_upgrade_click",{page:n}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),p&&s.jsx(b,{onClose:()=>o(!1)})]})}export{N as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,r as i,b as D,D as K,u as V,T}from"./index-BYvG5KEz.js";import{u as Z,T as q}from"./tier-promo-config-CckH43fU.js";import{T as z}from"./TierPromoProgress-DkpXj7Ui.js";const Q="_wrapper_1s3lp_2",X="_table_1s3lp_7",Y="_sortable_1s3lp_32",tt="_sortArrow_1s3lp_41",st="_clickable_1s3lp_52",et="_empty_1s3lp_57",B={wrapper:Q,table:X,sortable:Y,sortArrow:tt,clickable:st,empty:et};function at({columns:e,data:o,sortBy:p,sortDir:w="asc",onSort:C,onRowClick:x,rowKey:v,emptyMessage:k}){return s.jsx("div",{className:B.wrapper,children:s.jsxs("table",{className:B.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(c=>s.jsxs("th",{style:c.width?{width:c.width}:void 0,className:c.sortable?B.sortable:void 0,onClick:c.sortable&&C?()=>C(c.key):void 0,children:[s.jsx("span",{children:c.label}),c.sortable&&p===c.key&&s.jsx("span",{className:B.sortArrow,children:w==="asc"?"▴":"▾"})]},c.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:B.empty,children:k||"No data"})}):o.map((c,f)=>s.jsx("tr",{className:x?B.clickable:void 0,onClick:x?()=>x(c):void 0,children:e.map(g=>s.jsx("td",{children:g.render?g.render(c):String(c[g.key]??"")},g.key))},v?v(c):f))})]})})}const G=50;function ot(){const[e,o]=i.useState(null),[p,w]=i.useState(!0),[C,x]=i.useState([]),[v,k]=i.useState(0),[c,f]=i.useState(!1),[g,N]=i.useState(!0),[h,O]=i.useState(0),[b,L]=i.useState(""),[d,E]=i.useState([]),[$,R]=i.useState(0),[_,A]=i.useState(!1),[t,r]=i.useState(!0),[l,u]=i.useState(0),n=i.useRef(null),y=i.useCallback(async()=>{w(!0);try{const m=await D.get("/api/dashboard/tool-stats");o(m)}catch{}finally{w(!1)}},[]),j=i.useCallback(async(m,S)=>{N(!0);try{const W={limit:String(G),offset:String(m)};S&&(W.tool=S);const I=await D.get("/api/dashboard/history",W);x(I.entries),k(I.total),f(I.hasMore)}catch{x([]),k(0),f(!1)}finally{N(!1)}},[]),M=i.useCallback(async m=>{r(!0);try{const S=await D.get("/api/dashboard/failures",{limit:String(G),offset:String(m)});E(S.entries),R(S.total),A(S.hasMore)}catch{E([]),R(0),A(!1)}finally{r(!1)}},[]),J=i.useCallback(()=>{y(),j(h,b),M(l)},[y,j,M,h,b,l]);return i.useEffect(()=>{y()},[y]),i.useEffect(()=>{j(h,b)},[j,h,b]),i.useEffect(()=>{M(l)},[M,l]),i.useEffect(()=>{const m=new K;n.current=m,m.connect();const S=m.on("command",()=>{y(),j(h,b),M(l)});return()=>{S(),m.disconnect(),n.current=null}},[y,j,M,h,b,l]),{statistics:e,statsLoading:p,history:C,historyTotal:v,historyHasMore:c,historyLoading:g,historyOffset:h,historyToolFilter:b,setHistoryOffset:O,setHistoryToolFilter:L,failures:d,failuresTotal:$,failuresHasMore:_,failuresLoading:t,failuresOffset:l,setFailuresOffset:u,refresh:J}}const rt="_page_15wsf_2",it="_tabs_15wsf_10",lt="_tab_15wsf_10",nt="_tabActive_15wsf_34",ct="_card_15wsf_40",dt="_proBadge_15wsf_48",ut="_statusOk_15wsf_62",pt="_tierBasic_15wsf_68",ht="_tierPro_15wsf_72",mt="_tierMixed_15wsf_77",xt="_filterRow_15wsf_88",ft="_filterLabel_15wsf_95",bt="_filterSelect_15wsf_104",_t="_expandedRow_15wsf_115",yt="_expandedSection_15wsf_123",jt="_pre_15wsf_133",wt="_pagination_15wsf_150",gt="_pageInfo_15wsf_158",St="_btn_15wsf_164",Nt="_tierDistribution_15wsf_187",Tt="_tierBarWrap_15wsf_191",Ct="_tierBarBasic_15wsf_199",vt="_tierBarPro_15wsf_204",kt="_tierLabels_15wsf_209",Mt="_statsTableWrap_15wsf_218",Bt="_statsTable_15wsf_218",Pt="_sortableHeader_15wsf_249",Et="_sortArrow_15wsf_254",Rt="_statsToolRow_15wsf_258",At="_statsActionRow_15wsf_266",Lt="_expandButton_15wsf_270",Ht="_expandIcon_15wsf_282",Ot="_actionLabel_15wsf_287",$t="_emptyStats_15wsf_294",It="_summaryLine_15wsf_300",a={page:rt,tabs:it,tab:lt,tabActive:nt,card:ct,proBadge:dt,statusOk:ut,tierBasic:pt,tierPro:ht,tierMixed:mt,filterRow:xt,filterLabel:ft,filterSelect:bt,expandedRow:_t,expandedSection:yt,pre:jt,pagination:wt,pageInfo:gt,btn:St,tierDistribution:Nt,tierBarWrap:Tt,tierBarBasic:Ct,tierBarPro:vt,tierLabels:kt,statsTableWrap:Mt,statsTable:Bt,sortableHeader:Pt,sortArrow:Et,statsToolRow:Rt,statsActionRow:At,expandButton:Lt,expandIcon:Ht,actionLabel:Ot,emptyStats:$t,summaryLine:It},U=50;function Dt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function H(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function F(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Gt(){const{t:e}=V(),o=ot(),p=Z(),[w,C]=i.useState("history"),[x,v]=i.useState(null),[k,c]=i.useState(null),[f,g]=i.useState("totalCalls"),[N,h]=i.useState("desc"),O=i.useCallback(t=>{g(r=>r===t?(h(l=>l==="asc"?"desc":"asc"),t):(h("desc"),t))},[]),b=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),L=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const l=Object.entries(r.actions??{}).map(([u,n])=>({toolName:r.toolName,actionName:n.action??u,tier:n.tier,totalCalls:n.totalCalls,successCount:n.successCount,failureCount:n.failureCount,totalExecutionTimeMs:n.totalExecutionTimeMs,avgExecutionTimeMs:n.avgExecutionTimeMs,firstUsed:n.firstUsed,lastUsed:n.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:l,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=i.useCallback((t,r,l,u)=>s.jsx(T,{text:e(l,u),children:e(t,r)}),[e]),E=i.useMemo(()=>[...L].sort((r,l)=>{const u=r[f],n=l[f];if(typeof u=="number"&&typeof n=="number")return N==="asc"?u-n:n-u;const y=String(u??""),j=String(n??"");return N==="asc"?y.localeCompare(j):j.localeCompare(y)}),[L,f,N]),$=i.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Dt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var l;const r=((l=t.parameters)==null?void 0:l.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(T,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>H(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(T,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),R=i.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>F(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>H(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(T,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),_=i.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,l=t+r;if(l===0)return null;const u=Math.round(t/l*100),n=100-u;return{basic:t,pro:r,total:l,basicPct:u,proPct:n}},[o.statistics]),A=i.useCallback(t=>{c(r=>r===t?null:t)},[]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${w===t?a.tabActive:""}`,onClick:()=>C(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),w==="history"&&s.jsxs("div",{className:a.card,children:[s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),b.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(at,{columns:$,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),x&&(()=>{const t=o.history.find(r=>r.id===x);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-U)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+U,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+U),children:e("tools.page.next","Next")})]})]}),w==="statistics"&&s.jsxs("div",{className:a.card,children:[_&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${_.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${_.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",_.basicPct,"% (",_.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",_.proPct,"% (",_.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:R.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>O(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&f===t.key&&s.jsx("span",{className:a.sortArrow,children:N==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:E.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:R.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):E.map(t=>{const r=k===t.toolName;return s.jsxs(i.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>A(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),A(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:F(t.successCount,t.totalCalls)}),s.jsx("td",{children:H(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(T,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(l=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:l.actionName})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:F(l.successCount,l.totalCalls)}),s.jsx("td",{children:H(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,l.tier)})})]},`${t.toolName}:${l.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!p.loading&&p.tier==="basic"&&s.jsx(z,{basicCalls:p.basicCalls,proCalls:p.proCalls,totalCalls:p.totalCalls,proUsagePercent:p.proUsagePercent,upgradeHref:q.tools})]})}export{Gt as Component};
|
|
1
|
+
import{j as s,r as i,b as D,D as K,u as V,T}from"./index-mMUjBHCe.js";import{u as Z,T as q}from"./tier-promo-config-BFJCz95t.js";import{T as z}from"./TierPromoProgress-B9L7tJGd.js";const Q="_wrapper_1s3lp_2",X="_table_1s3lp_7",Y="_sortable_1s3lp_32",tt="_sortArrow_1s3lp_41",st="_clickable_1s3lp_52",et="_empty_1s3lp_57",B={wrapper:Q,table:X,sortable:Y,sortArrow:tt,clickable:st,empty:et};function at({columns:e,data:o,sortBy:p,sortDir:w="asc",onSort:C,onRowClick:x,rowKey:v,emptyMessage:k}){return s.jsx("div",{className:B.wrapper,children:s.jsxs("table",{className:B.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(c=>s.jsxs("th",{style:c.width?{width:c.width}:void 0,className:c.sortable?B.sortable:void 0,onClick:c.sortable&&C?()=>C(c.key):void 0,children:[s.jsx("span",{children:c.label}),c.sortable&&p===c.key&&s.jsx("span",{className:B.sortArrow,children:w==="asc"?"▴":"▾"})]},c.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:B.empty,children:k||"No data"})}):o.map((c,f)=>s.jsx("tr",{className:x?B.clickable:void 0,onClick:x?()=>x(c):void 0,children:e.map(g=>s.jsx("td",{children:g.render?g.render(c):String(c[g.key]??"")},g.key))},v?v(c):f))})]})})}const G=50;function ot(){const[e,o]=i.useState(null),[p,w]=i.useState(!0),[C,x]=i.useState([]),[v,k]=i.useState(0),[c,f]=i.useState(!1),[g,N]=i.useState(!0),[h,O]=i.useState(0),[b,L]=i.useState(""),[d,E]=i.useState([]),[$,R]=i.useState(0),[_,A]=i.useState(!1),[t,r]=i.useState(!0),[l,u]=i.useState(0),n=i.useRef(null),y=i.useCallback(async()=>{w(!0);try{const m=await D.get("/api/dashboard/tool-stats");o(m)}catch{}finally{w(!1)}},[]),j=i.useCallback(async(m,S)=>{N(!0);try{const W={limit:String(G),offset:String(m)};S&&(W.tool=S);const I=await D.get("/api/dashboard/history",W);x(I.entries),k(I.total),f(I.hasMore)}catch{x([]),k(0),f(!1)}finally{N(!1)}},[]),M=i.useCallback(async m=>{r(!0);try{const S=await D.get("/api/dashboard/failures",{limit:String(G),offset:String(m)});E(S.entries),R(S.total),A(S.hasMore)}catch{E([]),R(0),A(!1)}finally{r(!1)}},[]),J=i.useCallback(()=>{y(),j(h,b),M(l)},[y,j,M,h,b,l]);return i.useEffect(()=>{y()},[y]),i.useEffect(()=>{j(h,b)},[j,h,b]),i.useEffect(()=>{M(l)},[M,l]),i.useEffect(()=>{const m=new K;n.current=m,m.connect();const S=m.on("command",()=>{y(),j(h,b),M(l)});return()=>{S(),m.disconnect(),n.current=null}},[y,j,M,h,b,l]),{statistics:e,statsLoading:p,history:C,historyTotal:v,historyHasMore:c,historyLoading:g,historyOffset:h,historyToolFilter:b,setHistoryOffset:O,setHistoryToolFilter:L,failures:d,failuresTotal:$,failuresHasMore:_,failuresLoading:t,failuresOffset:l,setFailuresOffset:u,refresh:J}}const rt="_page_15wsf_2",it="_tabs_15wsf_10",lt="_tab_15wsf_10",nt="_tabActive_15wsf_34",ct="_card_15wsf_40",dt="_proBadge_15wsf_48",ut="_statusOk_15wsf_62",pt="_tierBasic_15wsf_68",ht="_tierPro_15wsf_72",mt="_tierMixed_15wsf_77",xt="_filterRow_15wsf_88",ft="_filterLabel_15wsf_95",bt="_filterSelect_15wsf_104",_t="_expandedRow_15wsf_115",yt="_expandedSection_15wsf_123",jt="_pre_15wsf_133",wt="_pagination_15wsf_150",gt="_pageInfo_15wsf_158",St="_btn_15wsf_164",Nt="_tierDistribution_15wsf_187",Tt="_tierBarWrap_15wsf_191",Ct="_tierBarBasic_15wsf_199",vt="_tierBarPro_15wsf_204",kt="_tierLabels_15wsf_209",Mt="_statsTableWrap_15wsf_218",Bt="_statsTable_15wsf_218",Pt="_sortableHeader_15wsf_249",Et="_sortArrow_15wsf_254",Rt="_statsToolRow_15wsf_258",At="_statsActionRow_15wsf_266",Lt="_expandButton_15wsf_270",Ht="_expandIcon_15wsf_282",Ot="_actionLabel_15wsf_287",$t="_emptyStats_15wsf_294",It="_summaryLine_15wsf_300",a={page:rt,tabs:it,tab:lt,tabActive:nt,card:ct,proBadge:dt,statusOk:ut,tierBasic:pt,tierPro:ht,tierMixed:mt,filterRow:xt,filterLabel:ft,filterSelect:bt,expandedRow:_t,expandedSection:yt,pre:jt,pagination:wt,pageInfo:gt,btn:St,tierDistribution:Nt,tierBarWrap:Tt,tierBarBasic:Ct,tierBarPro:vt,tierLabels:kt,statsTableWrap:Mt,statsTable:Bt,sortableHeader:Pt,sortArrow:Et,statsToolRow:Rt,statsActionRow:At,expandButton:Lt,expandIcon:Ht,actionLabel:Ot,emptyStats:$t,summaryLine:It},U=50;function Dt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function H(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function F(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Gt(){const{t:e}=V(),o=ot(),p=Z(),[w,C]=i.useState("history"),[x,v]=i.useState(null),[k,c]=i.useState(null),[f,g]=i.useState("totalCalls"),[N,h]=i.useState("desc"),O=i.useCallback(t=>{g(r=>r===t?(h(l=>l==="asc"?"desc":"asc"),t):(h("desc"),t))},[]),b=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),L=i.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const l=Object.entries(r.actions??{}).map(([u,n])=>({toolName:r.toolName,actionName:n.action??u,tier:n.tier,totalCalls:n.totalCalls,successCount:n.successCount,failureCount:n.failureCount,totalExecutionTimeMs:n.totalExecutionTimeMs,avgExecutionTimeMs:n.avgExecutionTimeMs,firstUsed:n.firstUsed,lastUsed:n.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:l,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=i.useCallback((t,r,l,u)=>s.jsx(T,{text:e(l,u),children:e(t,r)}),[e]),E=i.useMemo(()=>[...L].sort((r,l)=>{const u=r[f],n=l[f];if(typeof u=="number"&&typeof n=="number")return N==="asc"?u-n:n-u;const y=String(u??""),j=String(n??"");return N==="asc"?y.localeCompare(j):j.localeCompare(y)}),[L,f,N]),$=i.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Dt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var l;const r=((l=t.parameters)==null?void 0:l.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(T,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>H(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(T,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),R=i.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>F(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>H(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(T,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),_=i.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,l=t+r;if(l===0)return null;const u=Math.round(t/l*100),n=100-u;return{basic:t,pro:r,total:l,basicPct:u,proPct:n}},[o.statistics]),A=i.useCallback(t=>{c(r=>r===t?null:t)},[]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${w===t?a.tabActive:""}`,onClick:()=>C(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),w==="history"&&s.jsxs("div",{className:a.card,children:[s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),b.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(at,{columns:$,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),x&&(()=>{const t=o.history.find(r=>r.id===x);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(T,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-U)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+U,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+U),children:e("tools.page.next","Next")})]})]}),w==="statistics"&&s.jsxs("div",{className:a.card,children:[_&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${_.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${_.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",_.basicPct,"% (",_.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",_.proPct,"% (",_.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:R.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>O(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&f===t.key&&s.jsx("span",{className:a.sortArrow,children:N==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:E.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:R.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):E.map(t=>{const r=k===t.toolName;return s.jsxs(i.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>A(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),A(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:F(t.successCount,t.totalCalls)}),s.jsx("td",{children:H(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(T,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(l=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:l.actionName})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:F(l.successCount,l.totalCalls)}),s.jsx("td",{children:H(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,l.tier)})})]},`${t.toolName}:${l.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!p.loading&&p.tier==="basic"&&s.jsx(z,{basicCalls:p.basicCalls,proCalls:p.proCalls,totalCalls:p.totalCalls,proUsagePercent:p.proUsagePercent,upgradeHref:q.tools})]})}export{Gt as Component};
|