@weppy/roblox-mcp 2.6.3 → 2.6.4

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.
Files changed (26) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/CHANGELOG.md +7 -0
  3. package/package.json +1 -1
  4. package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
  5. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-CCOyzW-z.js → ChangelogDetailPage-DYQthxhC.js} +1 -1
  6. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogPage-CH7hNPlg.js → ChangelogPage-WFqQ5h8e.js} +1 -1
  7. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-jY5BGNY2.js → ConfirmModal-CM3ElkBC.js} +1 -1
  8. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConnectionPage-CBcepiuB.js → ConnectionPage-DdKcJZt6.js} +1 -1
  9. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{GameChangeDetail-sMoIkbj9.js → GameChangeDetail-DGphCFbI.js} +1 -1
  10. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-BbEJAGvG.js → InfoLabel-CMSu30c4.js} +1 -1
  11. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-B1QsVfNL.js → OverviewPage-DM74adCU.js} +1 -1
  12. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-LveG542g.js → PlaytestPage-Dq3kV_rX.js} +1 -1
  13. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SettingsPage-BMllTvd1.js → SettingsPage-QQd8aPdd.js} +1 -1
  14. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-DASntRhn.js → StatusBadge-BhRLY0yK.js} +1 -1
  15. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-COJc3U-b.js → SyncPage-Col3nhBp.js} +1 -1
  16. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-CYfIb0tr.js +1 -0
  17. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ToolsPage-Bi0PQXNP.js → ToolsPage-Ba_6GnUZ.js} +1 -1
  18. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TooltipText-Bt3XsRi-.js → TooltipText-Bnvm1FcC.js} +1 -1
  19. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{WhatsNewPage-Dt7gQvv4.js → WhatsNewPage-M1EeHSH-.js} +1 -1
  20. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-B-nqZCE3.js +380 -0
  21. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-ViehI-J9.js → useLiveUptime-Dc2iJiFi.js} +1 -1
  22. package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
  23. package/plugins/weppy-roblox-mcp/dist/index.js +79 -87
  24. package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  25. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-B-d8Qied.js +0 -2
  26. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BJrsGJ5y.js +0 -380
@@ -5,15 +5,15 @@
5
5
  "email": "hope841026@gmail.com"
6
6
  },
7
7
  "metadata": {
8
- "description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 23 tools, 162+ actions, bidirectional sync, automated playtest, and multi-place support",
9
- "version": "2.6.3"
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.6.4"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "weppy-roblox-mcp",
14
14
  "source": "./plugins/weppy-roblox-mcp",
15
- "description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 23 tools, 162+ actions, bidirectional sync, automated playtest, and multi-place support",
16
- "version": "2.6.3",
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.6.4",
17
17
  "author": {
18
18
  "name": "hope1026"
19
19
  },
package/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
 
8
8
 
9
+ ## [2.6.4] - 2026-04-22
10
+
11
+ ### Bug Fixes
12
+
13
+ - **Fix MCP server crashing on startup** — The MCP server could crash immediately on startup, preventing any tools from loading. The server now starts cleanly without any config change.
14
+
15
+
9
16
  ## [2.6.3] - 2026-04-21
10
17
 
11
18
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.6.3",
3
+ "version": "2.6.4",
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,7 +1,7 @@
1
1
  {
2
2
  "name": "weppy-roblox-mcp",
3
3
  "description": "MCP server for Roblox Studio integration - AI-powered game development with specialized agents and skills",
4
- "version": "2.6.3",
4
+ "version": "2.6.4",
5
5
  "author": {
6
6
  "name": "hope1026"
7
7
  },
@@ -1 +1 @@
1
- import{r,a as R,u as M,b as B,c as V,j as e}from"./index-BJrsGJ5y.js";import{I as G}from"./InfoLabel-BbEJAGvG.js";import{G as D}from"./GameChangeDetail-sMoIkbj9.js";import{T as m}from"./TooltipText-Bt3XsRi-.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{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 A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.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 K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
1
+ import{r,a as R,u as M,b as B,c as V,j as e}from"./index-B-nqZCE3.js";import{I as G}from"./InfoLabel-CMSu30c4.js";import{G as D}from"./GameChangeDetail-DGphCFbI.js";import{T as m}from"./TooltipText-Bnvm1FcC.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{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 A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.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 K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
@@ -1 +1 @@
1
- import{r,a as E,D as O,u as D,j as t,c as P,i as V,k as G}from"./index-BJrsGJ5y.js";import{C as H}from"./ConfirmModal-jY5BGNY2.js";import{T as $}from"./TooltipText-Bt3XsRi-.js";const U=10;function Z(){const[s,m]=r.useState([]),[e,a]=r.useState(0),[h,p]=r.useState(!1),[i,f]=r.useState(!0),[l,_]=r.useState(0),[g,j]=r.useState("all"),v=r.useRef(null),o=r.useCallback(async(u,x)=>{f(!0);try{const N={limit:String(U),offset:String(u)};x!=="all"&&(N.status=x);const y=await E.get("/api/dashboard/changelog",N);m(y.entries),a(y.total),p(y.hasMore)}catch{m([]),a(0),p(!1)}finally{f(!1)}},[]),T=r.useCallback(()=>{o(l,g)},[o,l,g]),b=r.useCallback(async()=>{await E.post("/api/dashboard/changelog/clear"),m([]),a(0),p(!1)},[]);return r.useEffect(()=>{o(l,g)},[o,l,g]),r.useEffect(()=>{const u=new O;v.current=u,u.connect();const x=u.on("command",()=>{o(l,g)});return()=>{x(),u.disconnect(),v.current=null}},[o,l,g]),{entries:s,total:e,hasMore:h,loading:i,offset:l,statusFilter:g,setOffset:_,setStatusFilter:j,refresh:T,clear:b}}const q="_card_1n89u_2",z="_header_1n89u_17",J="_statusBadge_1n89u_24",K="_statusDot_1n89u_35",Q="_active_1n89u_41",W="_completed_1n89u_50",X="_timeRange_1n89u_58",Y="_summaryList_1n89u_65",ee="_summaryItem_1n89u_71",te="_summaryIcon_1n89u_80",se="_summaryText_1n89u_86",ae="_progressBar_1n89u_91",ne="_progressFill_1n89u_99",oe="_emptySummary_1n89u_112",ce="_contextBlock_1n89u_120",ie="_contextLabel_1n89u_129",re="_contextValue_1n89u_137",n={card:q,header:z,statusBadge:J,statusDot:K,active:Q,completed:W,timeRange:X,summaryList:Y,summaryItem:ee,summaryIcon:te,summaryText:se,progressBar:ae,progressFill:ne,emptySummary:oe,contextBlock:ce,contextLabel:ie,contextValue:re};function F(s){if(!s)return"--:--";const m=new Date(s);return`${String(m.getHours()).padStart(2,"0")}:${String(m.getMinutes()).padStart(2,"0")}`}function le({entry:s,onClick:m}){var N,y,I,k,B,L,w,A,M,R;const{t:e}=D(),a=s.changeSummary,h=s.status==="active",p=s.isBootstrapOnly===!0,i=[],f=a.scriptsModified+a.scriptsCreated;if(f>0){const d=[];a.scriptsModified>0&&d.push(`${a.scriptsModified} ${e("changelog.card.modified","modified")}`),a.scriptsCreated>0&&d.push(`${a.scriptsCreated} ${e("changelog.card.created","created")}`);const C=`${f} ${e("changelog.card.scripts","scripts")} ${d.join(", ")}`;i.push({icon:"📝",text:C,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const l=a.instancesCreated+a.instancesDeleted+a.instancesMoved;if(l>0){const d=[];a.instancesCreated>0&&d.push(`${a.instancesCreated} ${e("changelog.card.created","created")}`),a.instancesDeleted>0&&d.push(`${a.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),a.instancesMoved>0&&d.push(`${a.instancesMoved} ${e("changelog.card.moved","moved")}`);const C=`${l} ${e("changelog.card.instances","instances")} ${d.join(", ")}`;i.push({icon:"🧱",text:C,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}a.propertiesChanged>0&&i.push({icon:"🎨",text:`${a.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),a.lightingChanged&&i.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),a.terrainChanged&&i.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),a.assetsInserted>0&&i.push({icon:"📦",text:`${a.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const _=F(s.startTime),g=h?e("changelog.card.inProgress","in progress"):s.endTime?F(s.endTime):"--:--",j=p?e("changelog.card.bootstrapStatus","Bootstrap"):h?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),v=p?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):h?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."),o=p?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),T=p?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."),b=(y=(N=s.contextSummary)==null?void 0:N.intent)==null?void 0:y.trim(),u=((L=(B=(k=(I=s.contextSummary)==null?void 0:I.affectedAreas)==null?void 0:k[0])==null?void 0:B.label)==null?void 0:L.trim())||((A=(w=s.contextSummary)==null?void 0:w.testScenario)==null?void 0:A.trim()),x=(R=(M=s.verificationSummary)==null?void 0:M.label)==null?void 0:R.trim();return t.jsxs("div",{className:n.card,onClick:m,children:[t.jsxs("div",{className:n.header,children:[t.jsx($,{text:v,children:t.jsxs("span",{className:`${n.statusBadge} ${h?n.active:n.completed}`,children:[t.jsx("span",{className:n.statusDot}),j]})}),t.jsxs("span",{className:n.timeRange,children:[_,"~",g]})]}),t.jsx("div",{className:n.summaryList,children:i.length>0?i.map((d,C)=>t.jsxs("div",{className:n.summaryItem,children:[t.jsx("span",{className:n.summaryIcon,children:d.icon}),t.jsx($,{text:d.tooltip,children:t.jsx("span",{className:n.summaryText,children:d.text})})]},C)):t.jsx($,{text:T,children:t.jsx("span",{className:n.emptySummary,style:{display:"block"},children:o})})}),b&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.sessionIntent","Session intent")}),t.jsx("span",{className:n.contextValue,children:b})]}),!b&&u&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.representativeArea","Representative area")}),t.jsx("span",{className:n.contextValue,children:u})]}),x&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.verification","Verification")}),t.jsx("span",{className:n.contextValue,children:x})]}),h&&t.jsx("div",{className:n.progressBar,children:t.jsx("div",{className:n.progressFill})})]})}const de="_page_1srvj_2",ge="_limitNotice_1srvj_9",me="_limitNoticeTitle_1srvj_18",he="_limitNoticeText_1srvj_25",pe="_headerRow_1srvj_31",ue="_header_1srvj_31",fe="_clearButton_1srvj_48",_e="_headerSub_1srvj_57",xe="_filterTabs_1srvj_67",ve="_filterTab_1srvj_67",ye="_filterTabActive_1srvj_90",je="_list_1srvj_96",be="_empty_1srvj_103",Ne="_loading_1srvj_112",Ce="_pagination_1srvj_121",Se="_pageInfo_1srvj_129",Te="_btn_1srvj_135",c={page:de,limitNotice:ge,limitNoticeTitle:me,limitNoticeText:he,headerRow:pe,header:ue,clearButton:fe,headerSub:_e,filterTabs:xe,filterTab:ve,filterTabActive:ye,list:je,empty:be,loading:Ne,pagination:Ce,pageInfo:Se,btn:Te},S=10,$e=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function Le(){const{t:s}=D(),m=P(),e=Z(),a=V(),{show:h}=G(),[p,i]=r.useState(!1),[f,l]=r.useState(!1),_=!a.loading&&a.tier==="basic",g=_?e.entries.slice(0,3):e.entries,j=!_&&e.total>S,v=async()=>{l(!0);try{await e.clear(),h(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{h(s("toast.clearFailed","Failed to clear data"),"error")}finally{l(!1)}};return t.jsxs("div",{className:c.page,children:[t.jsxs("div",{className:c.headerRow,children:[t.jsxs("h2",{className:c.header,children:[s("sidebar.changelog","Changelog"),t.jsx("span",{className:c.headerSub,children:s("changelog.subtitle","Game Change History")})]}),t.jsx("button",{className:c.clearButton,onClick:()=>i(!0),children:s("common.clear","Clear")})]}),t.jsx("div",{className:c.filterTabs,children:$e.map(o=>t.jsx("button",{className:`${c.filterTab} ${e.statusFilter===o.key?c.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(o.key),e.setOffset(0)},children:s(o.label,o.key.charAt(0).toUpperCase()+o.key.slice(1))},o.key))}),e.loading&&e.entries.length===0&&t.jsx("div",{className:c.loading,children:s("common.loading","Loading...")}),!e.loading&&e.entries.length===0?t.jsx("div",{className:c.empty,children:s("changelog.empty","No changelog entries yet")}):t.jsx("div",{className:c.list,children:g.map(o=>t.jsx(le,{entry:o,onClick:()=>m(`/changelog/${o.entryId}`)},o.entryId))}),j&&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-S)),children:s("tools.page.prev","Prev")}),t.jsxs("span",{className:c.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+S,e.total)," / ",e.total]}),t.jsx("button",{className:c.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+S),children:s("tools.page.next","Next")})]}),_&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:c.limitNotice,children:[t.jsx("div",{className:c.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),t.jsx("div",{className:c.limitNoticeText,children:s("changelog.basic.limit.body","Upgrade to Pro to browse the full changelog timeline for this place.")})]})}),t.jsx(H,{open:p,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:f,onCancel:()=>!f&&i(!1),onConfirm:v})]})}export{Le as Component};
1
+ import{r,a as E,D as O,u as D,j as t,c as P,i as V,k as G}from"./index-B-nqZCE3.js";import{C as H}from"./ConfirmModal-CM3ElkBC.js";import{T as $}from"./TooltipText-Bnvm1FcC.js";const U=10;function Z(){const[s,m]=r.useState([]),[e,a]=r.useState(0),[h,p]=r.useState(!1),[i,f]=r.useState(!0),[l,_]=r.useState(0),[g,j]=r.useState("all"),v=r.useRef(null),o=r.useCallback(async(u,x)=>{f(!0);try{const N={limit:String(U),offset:String(u)};x!=="all"&&(N.status=x);const y=await E.get("/api/dashboard/changelog",N);m(y.entries),a(y.total),p(y.hasMore)}catch{m([]),a(0),p(!1)}finally{f(!1)}},[]),T=r.useCallback(()=>{o(l,g)},[o,l,g]),b=r.useCallback(async()=>{await E.post("/api/dashboard/changelog/clear"),m([]),a(0),p(!1)},[]);return r.useEffect(()=>{o(l,g)},[o,l,g]),r.useEffect(()=>{const u=new O;v.current=u,u.connect();const x=u.on("command",()=>{o(l,g)});return()=>{x(),u.disconnect(),v.current=null}},[o,l,g]),{entries:s,total:e,hasMore:h,loading:i,offset:l,statusFilter:g,setOffset:_,setStatusFilter:j,refresh:T,clear:b}}const q="_card_1n89u_2",z="_header_1n89u_17",J="_statusBadge_1n89u_24",K="_statusDot_1n89u_35",Q="_active_1n89u_41",W="_completed_1n89u_50",X="_timeRange_1n89u_58",Y="_summaryList_1n89u_65",ee="_summaryItem_1n89u_71",te="_summaryIcon_1n89u_80",se="_summaryText_1n89u_86",ae="_progressBar_1n89u_91",ne="_progressFill_1n89u_99",oe="_emptySummary_1n89u_112",ce="_contextBlock_1n89u_120",ie="_contextLabel_1n89u_129",re="_contextValue_1n89u_137",n={card:q,header:z,statusBadge:J,statusDot:K,active:Q,completed:W,timeRange:X,summaryList:Y,summaryItem:ee,summaryIcon:te,summaryText:se,progressBar:ae,progressFill:ne,emptySummary:oe,contextBlock:ce,contextLabel:ie,contextValue:re};function F(s){if(!s)return"--:--";const m=new Date(s);return`${String(m.getHours()).padStart(2,"0")}:${String(m.getMinutes()).padStart(2,"0")}`}function le({entry:s,onClick:m}){var N,y,I,k,B,L,w,A,M,R;const{t:e}=D(),a=s.changeSummary,h=s.status==="active",p=s.isBootstrapOnly===!0,i=[],f=a.scriptsModified+a.scriptsCreated;if(f>0){const d=[];a.scriptsModified>0&&d.push(`${a.scriptsModified} ${e("changelog.card.modified","modified")}`),a.scriptsCreated>0&&d.push(`${a.scriptsCreated} ${e("changelog.card.created","created")}`);const C=`${f} ${e("changelog.card.scripts","scripts")} ${d.join(", ")}`;i.push({icon:"📝",text:C,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const l=a.instancesCreated+a.instancesDeleted+a.instancesMoved;if(l>0){const d=[];a.instancesCreated>0&&d.push(`${a.instancesCreated} ${e("changelog.card.created","created")}`),a.instancesDeleted>0&&d.push(`${a.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),a.instancesMoved>0&&d.push(`${a.instancesMoved} ${e("changelog.card.moved","moved")}`);const C=`${l} ${e("changelog.card.instances","instances")} ${d.join(", ")}`;i.push({icon:"🧱",text:C,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}a.propertiesChanged>0&&i.push({icon:"🎨",text:`${a.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),a.lightingChanged&&i.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),a.terrainChanged&&i.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),a.assetsInserted>0&&i.push({icon:"📦",text:`${a.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const _=F(s.startTime),g=h?e("changelog.card.inProgress","in progress"):s.endTime?F(s.endTime):"--:--",j=p?e("changelog.card.bootstrapStatus","Bootstrap"):h?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),v=p?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):h?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."),o=p?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),T=p?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."),b=(y=(N=s.contextSummary)==null?void 0:N.intent)==null?void 0:y.trim(),u=((L=(B=(k=(I=s.contextSummary)==null?void 0:I.affectedAreas)==null?void 0:k[0])==null?void 0:B.label)==null?void 0:L.trim())||((A=(w=s.contextSummary)==null?void 0:w.testScenario)==null?void 0:A.trim()),x=(R=(M=s.verificationSummary)==null?void 0:M.label)==null?void 0:R.trim();return t.jsxs("div",{className:n.card,onClick:m,children:[t.jsxs("div",{className:n.header,children:[t.jsx($,{text:v,children:t.jsxs("span",{className:`${n.statusBadge} ${h?n.active:n.completed}`,children:[t.jsx("span",{className:n.statusDot}),j]})}),t.jsxs("span",{className:n.timeRange,children:[_,"~",g]})]}),t.jsx("div",{className:n.summaryList,children:i.length>0?i.map((d,C)=>t.jsxs("div",{className:n.summaryItem,children:[t.jsx("span",{className:n.summaryIcon,children:d.icon}),t.jsx($,{text:d.tooltip,children:t.jsx("span",{className:n.summaryText,children:d.text})})]},C)):t.jsx($,{text:T,children:t.jsx("span",{className:n.emptySummary,style:{display:"block"},children:o})})}),b&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.sessionIntent","Session intent")}),t.jsx("span",{className:n.contextValue,children:b})]}),!b&&u&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.representativeArea","Representative area")}),t.jsx("span",{className:n.contextValue,children:u})]}),x&&t.jsxs("div",{className:n.contextBlock,children:[t.jsx("span",{className:n.contextLabel,children:e("changelog.card.verification","Verification")}),t.jsx("span",{className:n.contextValue,children:x})]}),h&&t.jsx("div",{className:n.progressBar,children:t.jsx("div",{className:n.progressFill})})]})}const de="_page_1srvj_2",ge="_limitNotice_1srvj_9",me="_limitNoticeTitle_1srvj_18",he="_limitNoticeText_1srvj_25",pe="_headerRow_1srvj_31",ue="_header_1srvj_31",fe="_clearButton_1srvj_48",_e="_headerSub_1srvj_57",xe="_filterTabs_1srvj_67",ve="_filterTab_1srvj_67",ye="_filterTabActive_1srvj_90",je="_list_1srvj_96",be="_empty_1srvj_103",Ne="_loading_1srvj_112",Ce="_pagination_1srvj_121",Se="_pageInfo_1srvj_129",Te="_btn_1srvj_135",c={page:de,limitNotice:ge,limitNoticeTitle:me,limitNoticeText:he,headerRow:pe,header:ue,clearButton:fe,headerSub:_e,filterTabs:xe,filterTab:ve,filterTabActive:ye,list:je,empty:be,loading:Ne,pagination:Ce,pageInfo:Se,btn:Te},S=10,$e=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function Le(){const{t:s}=D(),m=P(),e=Z(),a=V(),{show:h}=G(),[p,i]=r.useState(!1),[f,l]=r.useState(!1),_=!a.loading&&a.tier==="basic",g=_?e.entries.slice(0,3):e.entries,j=!_&&e.total>S,v=async()=>{l(!0);try{await e.clear(),h(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{h(s("toast.clearFailed","Failed to clear data"),"error")}finally{l(!1)}};return t.jsxs("div",{className:c.page,children:[t.jsxs("div",{className:c.headerRow,children:[t.jsxs("h2",{className:c.header,children:[s("sidebar.changelog","Changelog"),t.jsx("span",{className:c.headerSub,children:s("changelog.subtitle","Game Change History")})]}),t.jsx("button",{className:c.clearButton,onClick:()=>i(!0),children:s("common.clear","Clear")})]}),t.jsx("div",{className:c.filterTabs,children:$e.map(o=>t.jsx("button",{className:`${c.filterTab} ${e.statusFilter===o.key?c.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(o.key),e.setOffset(0)},children:s(o.label,o.key.charAt(0).toUpperCase()+o.key.slice(1))},o.key))}),e.loading&&e.entries.length===0&&t.jsx("div",{className:c.loading,children:s("common.loading","Loading...")}),!e.loading&&e.entries.length===0?t.jsx("div",{className:c.empty,children:s("changelog.empty","No changelog entries yet")}):t.jsx("div",{className:c.list,children:g.map(o=>t.jsx(le,{entry:o,onClick:()=>m(`/changelog/${o.entryId}`)},o.entryId))}),j&&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-S)),children:s("tools.page.prev","Prev")}),t.jsxs("span",{className:c.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+S,e.total)," / ",e.total]}),t.jsx("button",{className:c.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+S),children:s("tools.page.next","Next")})]}),_&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:c.limitNotice,children:[t.jsx("div",{className:c.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),t.jsx("div",{className:c.limitNoticeText,children:s("changelog.basic.limit.body","Upgrade to Pro to browse the full changelog timeline for this place.")})]})}),t.jsx(H,{open:p,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:f,onCancel:()=>!f&&i(!1),onConfirm:v})]})}export{Le as Component};
@@ -1 +1 @@
1
- import{j as s,s as e}from"./index-BJrsGJ5y.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
1
+ import{j as s,s as e}from"./index-B-nqZCE3.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
@@ -1 +1 @@
1
- import{u as R,r as i,j as e,d as E,a as w,D as B,k as P}from"./index-BJrsGJ5y.js";import{I as r}from"./InfoLabel-BbEJAGvG.js";import{S as T}from"./StatusBadge-DASntRhn.js";import{T as D}from"./TooltipText-Bt3XsRi-.js";import{C as $}from"./ConfirmModal-jY5BGNY2.js";import{u as F,f as H}from"./useLiveUptime-ViehI-J9.js";const U="_container_1h084_2",K="_entry_1h084_14",G="_timestamp_1h084_21",O="_message_1h084_27",V="_warn_1h084_34",X="_error_1h084_39",z="_empty_1h084_44",_={container:U,entry:K,timestamp:G,message:O,warn:V,error:X,empty:z};function J(n){const t=new Date(n);return Number.isNaN(t.getTime())?n:`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function Q({entries:n}){const{t}=R(),o=i.useRef(null);return i.useEffect(()=>{const l=o.current;l&&(l.scrollTop=l.scrollHeight)},[n.length]),e.jsx("div",{ref:o,className:_.container,children:n.length===0?e.jsx("div",{className:_.empty,children:t("connection.log.empty","No events yet")}):n.map((l,j)=>e.jsxs("div",{className:`${_.entry} ${l.type?_[l.type]:""}`,children:[e.jsx("span",{className:_.timestamp,children:J(l.timestamp)}),e.jsx("span",{className:_.message,children:l.message})]},j))})}const A=50;function W(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function Y(){const{level:n,status:t,error:o}=E(),[l,j]=i.useState(null),[k,f]=i.useState([]),g=i.useRef(null),u=i.useCallback((a,d)=>{f(x=>{const m=[...x,{timestamp:W(),message:a,type:d}];return m.length>A?m.slice(-A):m})},[]),h=i.useCallback(async()=>{try{const a=await w.get("/connection-info");j(a)}catch{j(null)}},[]),y=i.useCallback(async()=>{try{const a=await w.get("/api/dashboard/connection-log");f(a.entries??[])}catch{f([])}},[]),v=i.useCallback(async()=>{await w.post("/api/dashboard/connection-log/clear"),f([])},[]),S=i.useCallback(async a=>{await w.post("/api/dashboard/kill-agent",{instanceId:a}),await h()},[h]);return i.useEffect(()=>{n!=="disconnected"&&t&&h(),y()},[n,t,h,y]),i.useEffect(()=>{const a=new B;g.current=a,a.connect();const d=a.on("connection",m=>{const p=m,b=p.status==="connected"?"connected":"disconnected";u(`Plugin ${b} — ${p.clientId}`,p.status==="connected"?"info":"warn")}),x=a.on("mcp_status",m=>{const p=m,b=p.status==="registered"?"registered":"unregistered";u(`MCP ${b} — ${p.aiClientName}`,p.status==="registered"?"info":"warn"),h()});return()=>{d(),x(),a.disconnect(),g.current=null}},[u,h]),{status:t,connectionInfo:l,connectionLog:k,level:n,error:o,clearConnectionLog:v,killAgent:S}}const Z="_page_sf4qa_2",ee="_card_sf4qa_10",ne="_disabled_sf4qa_18",te="_cardHeader_sf4qa_24",se="_clearButton_sf4qa_37",ce="_serverGrid_sf4qa_47",oe="_statusRow_sf4qa_65",ie="_metaItem_sf4qa_72",ae="_table_sf4qa_79",le="_toggleBtn_sf4qa_104",re="_disconnected_sf4qa_119",de="_disconnectedActions_sf4qa_136",me="_btn_sf4qa_143",pe="_activity_active_sf4qa_161",he="_activity_stale_sf4qa_162",ge="_activity_unknown_sf4qa_163",ue="_killBtn_sf4qa_187",xe="_emptyRow_sf4qa_207",s={page:Z,card:ee,disabled:ne,cardHeader:te,clearButton:se,serverGrid:ce,statusRow:oe,metaItem:ie,table:ae,toggleBtn:le,disconnected:re,disconnectedActions:de,btn:me,activity_active:pe,activity_stale:he,activity_unknown:ge,killBtn:ue,emptyRow:xe};function N(n,t){const o=Math.max(0,Math.floor((Date.now()-n)/1e3));return o<60?`${o}${t("connection.time.secondsAgo","s ago")}`:o<3600?`${Math.floor(o/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(o/3600)}${t("connection.time.hoursAgo","h ago")}`}function je(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Se(){var I;const{t:n}=R(),{status:t,connectionInfo:o,connectionLog:l,level:j,clearConnectionLog:k,killAgent:f}=Y(),{show:g}=P(),[u,h]=i.useState(!0),[y,v]=i.useState(!1),[S,a]=i.useState(!1),[d,x]=i.useState(null),[m,p]=i.useState(!1),b=F(t==null?void 0:t.uptime),C=j==="disconnected",L=C?"offline":"online",q=async()=>{if(d){p(!0);try{await f(d.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),x(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{p(!1)}}},M=async()=>{a(!0);try{await k(),g(n("toast.clearSuccess","Cleared successfully"),"success"),v(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{a(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:n("connection.server.title","Server Status")}),C?e.jsxs("div",{className:s.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:s.disconnectedActions,children:[e.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:s.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.statusRow,children:e.jsx(T,{status:L})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(D,{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(r,{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(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:H(b??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{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)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>h(c=>!c),"aria-label":u?n("common.collapse","Collapse"):n("common.expand","Expand"),children:u?"▾":"▸"})]}),u&&e.jsxs("table",{className:s.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(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{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("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${je(c.lastSeen)}`]}),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)}),e.jsx("td",{children:c.lastSeen?N(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?N(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>x({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)}),children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.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(r,{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(r,{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(r,{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:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:n("connection.log.title","Connection Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>v(!0),children:n("common.clear","Clear")})]}),e.jsx(Q,{entries:l})]}),e.jsx($,{open:y,title:n("connection.clear.title","Clear connection log?"),message:n("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("common.clear","Clear"),loading:S,onCancel:()=>!S&&v(!1),onConfirm:M}),e.jsx($,{open:!!d,title:n("connection.agents.kill.title","Kill agent?"),message:`"${d==null?void 0:d.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:m,onCancel:()=>!m&&x(null),onConfirm:q})]})}export{Se as Component};
1
+ import{u as R,r as i,j as e,d as E,a as w,D as B,k as P}from"./index-B-nqZCE3.js";import{I as r}from"./InfoLabel-CMSu30c4.js";import{S as T}from"./StatusBadge-BhRLY0yK.js";import{T as D}from"./TooltipText-Bnvm1FcC.js";import{C as $}from"./ConfirmModal-CM3ElkBC.js";import{u as F,f as H}from"./useLiveUptime-Dc2iJiFi.js";const U="_container_1h084_2",K="_entry_1h084_14",G="_timestamp_1h084_21",O="_message_1h084_27",V="_warn_1h084_34",X="_error_1h084_39",z="_empty_1h084_44",_={container:U,entry:K,timestamp:G,message:O,warn:V,error:X,empty:z};function J(n){const t=new Date(n);return Number.isNaN(t.getTime())?n:`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function Q({entries:n}){const{t}=R(),o=i.useRef(null);return i.useEffect(()=>{const l=o.current;l&&(l.scrollTop=l.scrollHeight)},[n.length]),e.jsx("div",{ref:o,className:_.container,children:n.length===0?e.jsx("div",{className:_.empty,children:t("connection.log.empty","No events yet")}):n.map((l,j)=>e.jsxs("div",{className:`${_.entry} ${l.type?_[l.type]:""}`,children:[e.jsx("span",{className:_.timestamp,children:J(l.timestamp)}),e.jsx("span",{className:_.message,children:l.message})]},j))})}const A=50;function W(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function Y(){const{level:n,status:t,error:o}=E(),[l,j]=i.useState(null),[k,f]=i.useState([]),g=i.useRef(null),u=i.useCallback((a,d)=>{f(x=>{const m=[...x,{timestamp:W(),message:a,type:d}];return m.length>A?m.slice(-A):m})},[]),h=i.useCallback(async()=>{try{const a=await w.get("/connection-info");j(a)}catch{j(null)}},[]),y=i.useCallback(async()=>{try{const a=await w.get("/api/dashboard/connection-log");f(a.entries??[])}catch{f([])}},[]),v=i.useCallback(async()=>{await w.post("/api/dashboard/connection-log/clear"),f([])},[]),S=i.useCallback(async a=>{await w.post("/api/dashboard/kill-agent",{instanceId:a}),await h()},[h]);return i.useEffect(()=>{n!=="disconnected"&&t&&h(),y()},[n,t,h,y]),i.useEffect(()=>{const a=new B;g.current=a,a.connect();const d=a.on("connection",m=>{const p=m,b=p.status==="connected"?"connected":"disconnected";u(`Plugin ${b} — ${p.clientId}`,p.status==="connected"?"info":"warn")}),x=a.on("mcp_status",m=>{const p=m,b=p.status==="registered"?"registered":"unregistered";u(`MCP ${b} — ${p.aiClientName}`,p.status==="registered"?"info":"warn"),h()});return()=>{d(),x(),a.disconnect(),g.current=null}},[u,h]),{status:t,connectionInfo:l,connectionLog:k,level:n,error:o,clearConnectionLog:v,killAgent:S}}const Z="_page_sf4qa_2",ee="_card_sf4qa_10",ne="_disabled_sf4qa_18",te="_cardHeader_sf4qa_24",se="_clearButton_sf4qa_37",ce="_serverGrid_sf4qa_47",oe="_statusRow_sf4qa_65",ie="_metaItem_sf4qa_72",ae="_table_sf4qa_79",le="_toggleBtn_sf4qa_104",re="_disconnected_sf4qa_119",de="_disconnectedActions_sf4qa_136",me="_btn_sf4qa_143",pe="_activity_active_sf4qa_161",he="_activity_stale_sf4qa_162",ge="_activity_unknown_sf4qa_163",ue="_killBtn_sf4qa_187",xe="_emptyRow_sf4qa_207",s={page:Z,card:ee,disabled:ne,cardHeader:te,clearButton:se,serverGrid:ce,statusRow:oe,metaItem:ie,table:ae,toggleBtn:le,disconnected:re,disconnectedActions:de,btn:me,activity_active:pe,activity_stale:he,activity_unknown:ge,killBtn:ue,emptyRow:xe};function N(n,t){const o=Math.max(0,Math.floor((Date.now()-n)/1e3));return o<60?`${o}${t("connection.time.secondsAgo","s ago")}`:o<3600?`${Math.floor(o/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(o/3600)}${t("connection.time.hoursAgo","h ago")}`}function je(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Se(){var I;const{t:n}=R(),{status:t,connectionInfo:o,connectionLog:l,level:j,clearConnectionLog:k,killAgent:f}=Y(),{show:g}=P(),[u,h]=i.useState(!0),[y,v]=i.useState(!1),[S,a]=i.useState(!1),[d,x]=i.useState(null),[m,p]=i.useState(!1),b=F(t==null?void 0:t.uptime),C=j==="disconnected",L=C?"offline":"online",q=async()=>{if(d){p(!0);try{await f(d.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),x(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{p(!1)}}},M=async()=>{a(!0);try{await k(),g(n("toast.clearSuccess","Cleared successfully"),"success"),v(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{a(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:n("connection.server.title","Server Status")}),C?e.jsxs("div",{className:s.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:s.disconnectedActions,children:[e.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:s.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.statusRow,children:e.jsx(T,{status:L})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(D,{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(r,{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(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:H(b??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{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)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>h(c=>!c),"aria-label":u?n("common.collapse","Collapse"):n("common.expand","Expand"),children:u?"▾":"▸"})]}),u&&e.jsxs("table",{className:s.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(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{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("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${je(c.lastSeen)}`]}),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)}),e.jsx("td",{children:c.lastSeen?N(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?N(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>x({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)}),children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.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(r,{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(r,{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(r,{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:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${C?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:n("connection.log.title","Connection Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>v(!0),children:n("common.clear","Clear")})]}),e.jsx(Q,{entries:l})]}),e.jsx($,{open:y,title:n("connection.clear.title","Clear connection log?"),message:n("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("common.clear","Clear"),loading:S,onCancel:()=>!S&&v(!1),onConfirm:M}),e.jsx($,{open:!!d,title:n("connection.agents.kill.title","Kill agent?"),message:`"${d==null?void 0:d.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:m,onCancel:()=>!m&&x(null),onConfirm:q})]})}export{Se as Component};
@@ -1,4 +1,4 @@
1
- import{u as _,r as x,j as e}from"./index-BJrsGJ5y.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",b="_unifiedView_uv8oc_40",w="_diffLine_uv8oc_46",L="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:b,diffLine:w,lineNum:L,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const o=n.split(`
1
+ import{u as _,r as x,j as e}from"./index-B-nqZCE3.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",b="_unifiedView_uv8oc_40",w="_diffLine_uv8oc_46",L="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:b,diffLine:w,lineNum:L,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const o=n.split(`
2
2
  `),d=i.split(`
3
3
  `),a=[],f=Math.max(o.length,d.length);let t=0,l=0;for(;(t<o.length||l<d.length)&&(t<o.length&&l<d.length?o[t]===d[l]?(a.push({type:"context",content:o[t],lineNum:l+1}),t++,l++):(a.push({type:"removed",content:o[t],lineNum:t+1}),t++,t<o.length&&o[t]===d[l]?(a.push({type:"added",content:d[l],lineNum:l+1}),l++):l<d.length&&(a.push({type:"added",content:d[l],lineNum:l+1}),l++)):t<o.length?(a.push({type:"removed",content:o[t],lineNum:t+1}),t++):l<d.length&&(a.push({type:"added",content:d[l],lineNum:l+1}),l++),!(a.length>f*3)););return a}function O({before:n,after:i}){const{t:o}=_(),[d,a]=x.useState("unified"),f=typeof n=="string"?n:n!=null?JSON.stringify(n,null,2):"",t=typeof i=="string"?i:i!=null?JSON.stringify(i,null,2):"",l=x.useMemo(()=>k(f,t),[f,t]);if(!f&&!t)return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.empty,children:o("changelog.diff.empty","No diff available")})});if(!f&&t){const c=t.split(`
4
4
  `);return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.unifiedView,children:c.map((u,m)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineAdded}`,children:[e.jsx("span",{className:s.lineNum,children:m+1}),e.jsxs("span",{className:s.lineContent,children:["+ ",u]})]},m))})})}return e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.header,children:[e.jsx("button",{className:`${s.modeBtn} ${d==="unified"?s.modeBtnActive:""}`,onClick:()=>a("unified"),children:o("changelog.diff.unified","Unified")}),e.jsx("button",{className:`${s.modeBtn} ${d==="side-by-side"?s.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:o("changelog.diff.sideBySide","Side by Side")})]}),d==="unified"?e.jsx("div",{className:s.unifiedView,children:l.map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${c.type==="added"?s.lineAdded:c.type==="removed"?s.lineRemoved:s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:c.lineNum??""}),e.jsxs("span",{className:s.lineContent,children:[c.type==="added"?"+ ":c.type==="removed"?"- ":" ",c.content]})]},u))}):e.jsxs("div",{className:s.sideBySide,children:[e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:o("changelog.diff.before","Before")}),e.jsx("div",{className:s.sideContent,children:f.split(`
@@ -1 +1 @@
1
- import{j as r,T as e}from"./index-BJrsGJ5y.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
1
+ import{j as r,T as e}from"./index-B-nqZCE3.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
@@ -1 +1 @@
1
- import{j as t,u as P,r as v,d as G,i as L,a as M,D as F}from"./index-BJrsGJ5y.js";import{I as V}from"./InfoLabel-BbEJAGvG.js";import{S as A}from"./StatusBadge-DASntRhn.js";import{T as U}from"./TooltipText-Bt3XsRi-.js";import{G as z}from"./GameChangeDetail-sMoIkbj9.js";import{u as O,f as X}from"./useLiveUptime-ViehI-J9.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(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 Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"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.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(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"),": ",D(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 p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&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"),": ",u]}),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")]})]})]})]})}export{Ze as Component};
1
+ import{j as t,u as P,r as v,d as G,i as L,a as M,D as F}from"./index-B-nqZCE3.js";import{I as V}from"./InfoLabel-CMSu30c4.js";import{S as A}from"./StatusBadge-BhRLY0yK.js";import{T as U}from"./TooltipText-Bnvm1FcC.js";import{G as z}from"./GameChangeDetail-DGphCFbI.js";import{u as O,f as X}from"./useLiveUptime-Dc2iJiFi.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(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 Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"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.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(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"),": ",D(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 p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&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"),": ",u]}),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")]})]})]})]})}export{Ze as Component};
@@ -1,4 +1,4 @@
1
- import{r as n,a as v,u as S,j as e,i as A,k as H,n as D}from"./index-BJrsGJ5y.js";import{D as E,T as U}from"./TierComparison-B-d8Qied.js";import{I as P}from"./InfoLabel-BbEJAGvG.js";import{T as x}from"./TooltipText-Bt3XsRi-.js";import{C as $}from"./ConfirmModal-jY5BGNY2.js";const O=5e3;function F(t){const o=(t==null?void 0:t.enabled)??!0,[d,r]=n.useState([]),[a,i]=n.useState(null),[m,l]=n.useState(o),c=n.useRef(null),p=n.useCallback(async()=>{try{const _=await v.get("/api/dashboard/playtest/history");r(_.entries??[])}catch{}},[]),u=n.useCallback(async()=>{if(!o){l(!1);return}await p(),l(!1)},[o,p]),y=n.useCallback(async()=>{o&&(await v.post("/api/dashboard/playtest/history/clear"),r([]),i(null))},[o]),w=n.useCallback(async _=>{if(o)try{const g=await v.get(`/api/dashboard/playtest/report/${_}`);i(g)}catch{i(null)}},[o]);return n.useEffect(()=>{if(!o){l(!1);return}return u(),c.current=setInterval(u,O),()=>{c.current&&clearInterval(c.current)}},[o,u]),{history:d,selectedReport:a,loading:m,loadReport:w,clearHistory:y}}function W(t){const o="2026-03-27T15:26:00.000Z",d={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:o,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:d}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
1
+ import{r as n,a as v,u as S,j as e,i as A,k as H,n as D}from"./index-B-nqZCE3.js";import{D as E,T as U}from"./TierComparison-CYfIb0tr.js";import{I as P}from"./InfoLabel-CMSu30c4.js";import{T as x}from"./TooltipText-Bnvm1FcC.js";import{C as $}from"./ConfirmModal-CM3ElkBC.js";const O=5e3;function F(t){const o=(t==null?void 0:t.enabled)??!0,[d,r]=n.useState([]),[a,i]=n.useState(null),[m,l]=n.useState(o),c=n.useRef(null),p=n.useCallback(async()=>{try{const _=await v.get("/api/dashboard/playtest/history");r(_.entries??[])}catch{}},[]),u=n.useCallback(async()=>{if(!o){l(!1);return}await p(),l(!1)},[o,p]),y=n.useCallback(async()=>{o&&(await v.post("/api/dashboard/playtest/history/clear"),r([]),i(null))},[o]),w=n.useCallback(async _=>{if(o)try{const g=await v.get(`/api/dashboard/playtest/report/${_}`);i(g)}catch{i(null)}},[o]);return n.useEffect(()=>{if(!o){l(!1);return}return u(),c.current=setInterval(u,O),()=>{c.current&&clearInterval(c.current)}},[o,u]),{history:d,selectedReport:a,loading:m,loadReport:w,clearHistory:y}}function W(t){const o="2026-03-27T15:26:00.000Z",d={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:o,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:d}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
2
2
 
3
3
  - Spawn flow: PASS
4
4
  - HUD countdown: PASS
@@ -1 +1 @@
1
- import{d as w,r,f as z,D as B,e as H,g as O,h as D,a as R,u as M,j as e,A as $,S as G}from"./index-BJrsGJ5y.js";import{I as c}from"./InfoLabel-BbEJAGvG.js";import{T as x}from"./TooltipText-Bt3XsRi-.js";function W(){const{level:t}=w(),[l,L]=r.useState(null),[u,a]=r.useState(null),[S,v]=r.useState(!1),[b,P]=r.useState(!0),[A,_]=r.useState(!1),[k,m]=r.useState(null),g="gumroad",h=t==="disconnected",p=r.useCallback(n=>{n&&a(o=>({...o,...n,maskedKey:n.maskedKey??(o==null?void 0:o.maskedKey),provider:n.provider??(o==null?void 0:o.provider)??g}))},[g]),f=r.useCallback(n=>{if(!n){a(null);return}a({...n,provider:n.provider??g})},[g]),N=r.useCallback(async()=>{try{return await z(g)}catch{return null}},[g]);r.useEffect(()=>{let n=!1;async function o(){try{const[d,T]=await Promise.all([R.get("/api/dashboard/settings").catch(()=>null),N()]);if(n)return;d&&L(d),T&&p(T)}catch{}finally{n||P(!1)}}return o(),()=>{n=!0}},[N,p]),r.useEffect(()=>{const n=new B;n.connect();const o=n.on("license",d=>{N().then(T=>{if(T){if((d==null?void 0:d.cleared)===!0){f(T);return}p(T)}})});return()=>{o(),n.disconnect()}},[N,p,f]);const j=r.useCallback((n,o)=>{m(n??o)},[]),E=r.useCallback(async n=>{if(h)return!1;if(!n.trim())return m("License key is required."),!1;_(!0);try{const o=await H({provider:g,licenseKey:n.trim()});return p(o.license),j(o.message,o.ok?"License updated.":"License activation failed."),o.ok}catch{return m("License activation failed."),!1}finally{_(!1)}},[j,h,g,p]),y=r.useCallback(async()=>{if(!h){_(!0);try{const n=await O({provider:g});p(n.license),j(n.message,n.ok?"License updated.":"License refresh failed.")}catch{m("License refresh failed.")}finally{_(!1)}}},[j,h,g,p]),C=r.useCallback(async()=>{if(!h){_(!0);try{const n=await D({provider:g});f(n.license),j(n.message,n.ok?"License reset.":"License reset failed.")}catch{m("License reset failed.")}finally{_(!1)}}},[j,h,g,f]),i=r.useCallback(async(n,o)=>{if(l){L(d=>d&&{...d,hot:{...d.hot,[n]:o}}),v(!0);try{await R.patch("/api/dashboard/settings",{[n]:o})}catch{L(d=>d&&{...d,hot:{...d.hot,[n]:l.hot[n]}})}finally{v(!1)}}},[l]);return{settings:l,license:u,saving:S,licenseProvider:g,licenseControlsDisabled:h,licenseSubmitting:A,licenseMessage:k,activateLicense:E,refreshLicense:y,resetLicense:C,updateHotSetting:i,loading:b}}const Y="_page_vbvzx_2",F="_card_vbvzx_10",q="_licenseCardPro_vbvzx_17",U="_cardHeader_vbvzx_28",K="_headerBadge_vbvzx_42",V="_headerBadgeLive_vbvzx_53",Q="_licenseGrid_vbvzx_59",X="_statusDot_vbvzx_77",J="_statusActive_vbvzx_86",Z="_statusGrace_vbvzx_91",ee="_statusInactive_vbvzx_96",te="_statusError_vbvzx_100",se="_proBadge_vbvzx_105",ie="_upgradeLink_vbvzx_119",ne="_licenseControls_vbvzx_133",ae="_licenseControlRow_vbvzx_142",le="_licenseField_vbvzx_149",oe="_licenseFieldGrow_vbvzx_155",ce="_controlLabel_vbvzx_160",re="_textInput_vbvzx_166",de="_actionBtn_vbvzx_182",ge="_licenseMessage_vbvzx_204",ue="_licenseNotice_vbvzx_211",he="_licenseNoticeInfo_vbvzx_221",ve="_licenseNoticeWarning_vbvzx_227",pe="_licenseNoticeMuted_vbvzx_233",be="_settingRow_vbvzx_239",xe="_settingLabel_vbvzx_253",_e="_settingControl_vbvzx_260",me="_select_vbvzx_269",je="_numberInput_vbvzx_287",Le="_toggleSwitch_vbvzx_305",fe="_toggleInput_vbvzx_312",Ne="_toggleTrack_vbvzx_320",Ce="_toggleThumb_vbvzx_342",Te="_savedIndicator_vbvzx_391",Pe="_savedIndicatorHidden_vbvzx_402",Ee="_coldGrid_vbvzx_407",ye="_coldHint_vbvzx_425",Se="_langRow_vbvzx_434",Ae="_loading_vbvzx_447",ke="_unit_vbvzx_456",s={page:Y,card:F,licenseCardPro:q,cardHeader:U,headerBadge:K,headerBadgeLive:V,licenseGrid:Q,statusDot:X,statusActive:J,statusGrace:Z,statusInactive:ee,statusError:te,proBadge:se,upgradeLink:ie,licenseControls:ne,licenseControlRow:ae,licenseField:le,licenseFieldGrow:oe,controlLabel:ce,textInput:re,actionBtn:de,licenseMessage:ge,licenseNotice:ue,licenseNoticeInfo:he,licenseNoticeWarning:ve,licenseNoticeMuted:pe,settingRow:be,settingLabel:xe,settingControl:_e,select:me,numberInput:je,toggleSwitch:Le,toggleInput:fe,toggleTrack:Ne,toggleThumb:Ce,savedIndicator:Te,savedIndicatorHidden:Pe,coldGrid:Ee,coldHint:ye,langRow:Se,loading:Ae,unit:ke},Ie={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch"},Re=["debug","info","warn","error"];function we(t){return t==="active"?s.statusActive:t==="grace"?s.statusGrace:t==="invalid"||t==="revoked"?s.statusError:s.statusInactive}function ze(t,l){return t.refreshBlockedReason==="missing_session_token"?{label:l("settings.license.status.activationRequired","Activation Required"),tooltip:l("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:l("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:s.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:l("settings.license.active","Active"),tooltip:l("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:l("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:s.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:l("settings.license.status.grace","Grace"),tooltip:l("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:l("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:s.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:l("settings.license.status.grace","Grace"),tooltip:l("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:l("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:s.licenseNoticeInfo}:{label:l(`settings.license.${t.status}`,t.status),tooltip:l(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?l("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:s.licenseNoticeMuted}}function I({checked:t,onChange:l,testId:L,ariaLabel:u}){return e.jsxs("label",{className:s.toggleSwitch,"data-testid":L,children:[e.jsx("input",{type:"checkbox",className:s.toggleInput,checked:t,"aria-label":u,onChange:a=>l(a.target.checked)}),e.jsx("span",{className:s.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:s.toggleThumb})})]})}function De(){const{t,selectedLocale:l,setLocale:L}=M(),{settings:u,license:a,licenseProvider:S,licenseControlsDisabled:v,licenseSubmitting:b,licenseMessage:P,activateLicense:A,refreshLicense:_,resetLicense:k,updateHotSetting:m,loading:g}=W(),[h,p]=r.useState(null),[f,N]=r.useState(""),j=a?ze(a,t):null,E=(a==null?void 0:a.tier)==="pro",y=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0,C=r.useCallback(async(i,n)=>{await m(i,n),p(i),setTimeout(()=>p(o=>o===i?null:o),2e3)},[m]);return g?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,(a==null?void 0:a.tier)==="pro"?s.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(c,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(x,{text:v?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${s.headerBadge} ${v?"":s.headerBadgeLive}`,children:v?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const i=j;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.licenseGrid,children:[e.jsx("dt",{children:e.jsx(c,{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} ${we(a.status)}`}),e.jsx(x,{text:(i==null?void 0:i.tooltip)??t(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(i==null?void 0:i.label)??t(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(c,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?s.proBadge:"",children:e.jsx(x,{text:t(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),y&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(c,{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(x,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:y})})]}),a.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(c,{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(x,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:a.provider})})]})]}),(i==null?void 0:i.detail)&&e.jsx("p",{className:`${s.licenseNotice} ${i.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):i.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${s.licenseNotice} ${s.licenseNoticeMuted}`,children:i==null?void 0:i.detail})]})})(),a.tier==="basic"&&e.jsx("a",{className:s.upgradeLink,href:"https://gum.co/u/din5in7h",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.licenseControls,children:[e.jsxs("div",{className:s.licenseControlRow,children:[e.jsxs("label",{className:s.licenseField,children:[e.jsx("span",{className:s.controlLabel,children:e.jsx(c,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":t("settings.license.provider","Provider"),className:s.select,value:S,disabled:v||b,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b||!E,onClick:()=>{_()},children:b?t("common.loading"):t("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b||!E,onClick:()=>{k()},children:b?t("common.loading"):t("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:s.licenseControlRow,children:[e.jsxs("label",{className:`${s.licenseField} ${s.licenseFieldGrow}`,children:[e.jsx("span",{className:s.controlLabel,children:e.jsx(c,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":t("settings.license.keyInput","License Key"),className:s.textInput,type:"text",value:f,disabled:v||b,onChange:i=>N(i.target.value)})]}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b,onClick:()=>{(async()=>await A(f)&&N(""))()},children:b?t("common.loading"):t("settings.license.activate","Activate License")})]}),P&&e.jsx("p",{className:s.licenseMessage,children:P})]})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(c,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(x,{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")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail WEPPY Dashboard writes to its logs.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("select",{className:s.select,value:u.hot.LOG_LEVEL,onChange:i=>C("LOG_LEVEL",i.target.value),children:Re.map(i=>e.jsx("option",{value:i,children:i},i))}),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(c,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the WEPPY Dashboard history views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_LOCAL_HISTORY"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_LOCAL_HISTORY,ariaLabel:t("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:i=>C("ENABLE_LOCAL_HISTORY",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WEPPY Dashboard reporting.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_LOCAL_STATISTICS"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:t("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:i=>C("ENABLE_LOCAL_STATISTICS",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.contextCapture","Context Capture"),tooltip:t("settings.general.contextCapture.tooltip","When enabled, WEPPY Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_CONTEXT_CAPTURE"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:t("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:i=>C("ENABLE_CONTEXT_CAPTURE",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.requestTimeout","Request Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time WEPPY Dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"number",className:s.numberInput,value:u.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:i=>{const n=parseInt(i.target.value,10);isNaN(n)||C("REQUEST_TIMEOUT",n)}}),e.jsx(x,{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(c,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(x,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.coldGrid,children:[e.jsx("dt",{children:e.jsx(c,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:u.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(c,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:u.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(c,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(x,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(u.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(c,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:s.langRow,children:[e.jsx("label",{children:e.jsx(c,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:s.select,value:l,onChange:i=>L(i.target.value),children:[e.jsx("option",{value:$,children:t("settings.language.auto","Auto")}),G.map(i=>e.jsx("option",{value:i,children:Ie[i]??i},i))]})]})]})]})}export{De as Component};
1
+ import{d as w,r,f as z,D as B,e as H,g as O,h as D,a as R,u as M,j as e,A as $,S as G}from"./index-B-nqZCE3.js";import{I as c}from"./InfoLabel-CMSu30c4.js";import{T as x}from"./TooltipText-Bnvm1FcC.js";function W(){const{level:t}=w(),[l,L]=r.useState(null),[u,a]=r.useState(null),[S,v]=r.useState(!1),[b,P]=r.useState(!0),[A,_]=r.useState(!1),[k,m]=r.useState(null),g="gumroad",h=t==="disconnected",p=r.useCallback(n=>{n&&a(o=>({...o,...n,maskedKey:n.maskedKey??(o==null?void 0:o.maskedKey),provider:n.provider??(o==null?void 0:o.provider)??g}))},[g]),f=r.useCallback(n=>{if(!n){a(null);return}a({...n,provider:n.provider??g})},[g]),N=r.useCallback(async()=>{try{return await z(g)}catch{return null}},[g]);r.useEffect(()=>{let n=!1;async function o(){try{const[d,T]=await Promise.all([R.get("/api/dashboard/settings").catch(()=>null),N()]);if(n)return;d&&L(d),T&&p(T)}catch{}finally{n||P(!1)}}return o(),()=>{n=!0}},[N,p]),r.useEffect(()=>{const n=new B;n.connect();const o=n.on("license",d=>{N().then(T=>{if(T){if((d==null?void 0:d.cleared)===!0){f(T);return}p(T)}})});return()=>{o(),n.disconnect()}},[N,p,f]);const j=r.useCallback((n,o)=>{m(n??o)},[]),E=r.useCallback(async n=>{if(h)return!1;if(!n.trim())return m("License key is required."),!1;_(!0);try{const o=await H({provider:g,licenseKey:n.trim()});return p(o.license),j(o.message,o.ok?"License updated.":"License activation failed."),o.ok}catch{return m("License activation failed."),!1}finally{_(!1)}},[j,h,g,p]),y=r.useCallback(async()=>{if(!h){_(!0);try{const n=await O({provider:g});p(n.license),j(n.message,n.ok?"License updated.":"License refresh failed.")}catch{m("License refresh failed.")}finally{_(!1)}}},[j,h,g,p]),C=r.useCallback(async()=>{if(!h){_(!0);try{const n=await D({provider:g});f(n.license),j(n.message,n.ok?"License reset.":"License reset failed.")}catch{m("License reset failed.")}finally{_(!1)}}},[j,h,g,f]),i=r.useCallback(async(n,o)=>{if(l){L(d=>d&&{...d,hot:{...d.hot,[n]:o}}),v(!0);try{await R.patch("/api/dashboard/settings",{[n]:o})}catch{L(d=>d&&{...d,hot:{...d.hot,[n]:l.hot[n]}})}finally{v(!1)}}},[l]);return{settings:l,license:u,saving:S,licenseProvider:g,licenseControlsDisabled:h,licenseSubmitting:A,licenseMessage:k,activateLicense:E,refreshLicense:y,resetLicense:C,updateHotSetting:i,loading:b}}const Y="_page_vbvzx_2",F="_card_vbvzx_10",q="_licenseCardPro_vbvzx_17",U="_cardHeader_vbvzx_28",K="_headerBadge_vbvzx_42",V="_headerBadgeLive_vbvzx_53",Q="_licenseGrid_vbvzx_59",X="_statusDot_vbvzx_77",J="_statusActive_vbvzx_86",Z="_statusGrace_vbvzx_91",ee="_statusInactive_vbvzx_96",te="_statusError_vbvzx_100",se="_proBadge_vbvzx_105",ie="_upgradeLink_vbvzx_119",ne="_licenseControls_vbvzx_133",ae="_licenseControlRow_vbvzx_142",le="_licenseField_vbvzx_149",oe="_licenseFieldGrow_vbvzx_155",ce="_controlLabel_vbvzx_160",re="_textInput_vbvzx_166",de="_actionBtn_vbvzx_182",ge="_licenseMessage_vbvzx_204",ue="_licenseNotice_vbvzx_211",he="_licenseNoticeInfo_vbvzx_221",ve="_licenseNoticeWarning_vbvzx_227",pe="_licenseNoticeMuted_vbvzx_233",be="_settingRow_vbvzx_239",xe="_settingLabel_vbvzx_253",_e="_settingControl_vbvzx_260",me="_select_vbvzx_269",je="_numberInput_vbvzx_287",Le="_toggleSwitch_vbvzx_305",fe="_toggleInput_vbvzx_312",Ne="_toggleTrack_vbvzx_320",Ce="_toggleThumb_vbvzx_342",Te="_savedIndicator_vbvzx_391",Pe="_savedIndicatorHidden_vbvzx_402",Ee="_coldGrid_vbvzx_407",ye="_coldHint_vbvzx_425",Se="_langRow_vbvzx_434",Ae="_loading_vbvzx_447",ke="_unit_vbvzx_456",s={page:Y,card:F,licenseCardPro:q,cardHeader:U,headerBadge:K,headerBadgeLive:V,licenseGrid:Q,statusDot:X,statusActive:J,statusGrace:Z,statusInactive:ee,statusError:te,proBadge:se,upgradeLink:ie,licenseControls:ne,licenseControlRow:ae,licenseField:le,licenseFieldGrow:oe,controlLabel:ce,textInput:re,actionBtn:de,licenseMessage:ge,licenseNotice:ue,licenseNoticeInfo:he,licenseNoticeWarning:ve,licenseNoticeMuted:pe,settingRow:be,settingLabel:xe,settingControl:_e,select:me,numberInput:je,toggleSwitch:Le,toggleInput:fe,toggleTrack:Ne,toggleThumb:Ce,savedIndicator:Te,savedIndicatorHidden:Pe,coldGrid:Ee,coldHint:ye,langRow:Se,loading:Ae,unit:ke},Ie={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch"},Re=["debug","info","warn","error"];function we(t){return t==="active"?s.statusActive:t==="grace"?s.statusGrace:t==="invalid"||t==="revoked"?s.statusError:s.statusInactive}function ze(t,l){return t.refreshBlockedReason==="missing_session_token"?{label:l("settings.license.status.activationRequired","Activation Required"),tooltip:l("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:l("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:s.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:l("settings.license.active","Active"),tooltip:l("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:l("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:s.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:l("settings.license.status.grace","Grace"),tooltip:l("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:l("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:s.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:l("settings.license.status.grace","Grace"),tooltip:l("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:l("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:s.licenseNoticeInfo}:{label:l(`settings.license.${t.status}`,t.status),tooltip:l(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?l("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:s.licenseNoticeMuted}}function I({checked:t,onChange:l,testId:L,ariaLabel:u}){return e.jsxs("label",{className:s.toggleSwitch,"data-testid":L,children:[e.jsx("input",{type:"checkbox",className:s.toggleInput,checked:t,"aria-label":u,onChange:a=>l(a.target.checked)}),e.jsx("span",{className:s.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:s.toggleThumb})})]})}function De(){const{t,selectedLocale:l,setLocale:L}=M(),{settings:u,license:a,licenseProvider:S,licenseControlsDisabled:v,licenseSubmitting:b,licenseMessage:P,activateLicense:A,refreshLicense:_,resetLicense:k,updateHotSetting:m,loading:g}=W(),[h,p]=r.useState(null),[f,N]=r.useState(""),j=a?ze(a,t):null,E=(a==null?void 0:a.tier)==="pro",y=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0,C=r.useCallback(async(i,n)=>{await m(i,n),p(i),setTimeout(()=>p(o=>o===i?null:o),2e3)},[m]);return g?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,(a==null?void 0:a.tier)==="pro"?s.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(c,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(x,{text:v?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${s.headerBadge} ${v?"":s.headerBadgeLive}`,children:v?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const i=j;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.licenseGrid,children:[e.jsx("dt",{children:e.jsx(c,{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} ${we(a.status)}`}),e.jsx(x,{text:(i==null?void 0:i.tooltip)??t(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(i==null?void 0:i.label)??t(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(c,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?s.proBadge:"",children:e.jsx(x,{text:t(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),y&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(c,{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(x,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:y})})]}),a.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(c,{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(x,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:a.provider})})]})]}),(i==null?void 0:i.detail)&&e.jsx("p",{className:`${s.licenseNotice} ${i.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):i.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${s.licenseNotice} ${s.licenseNoticeMuted}`,children:i==null?void 0:i.detail})]})})(),a.tier==="basic"&&e.jsx("a",{className:s.upgradeLink,href:"https://gum.co/u/din5in7h",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.licenseControls,children:[e.jsxs("div",{className:s.licenseControlRow,children:[e.jsxs("label",{className:s.licenseField,children:[e.jsx("span",{className:s.controlLabel,children:e.jsx(c,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":t("settings.license.provider","Provider"),className:s.select,value:S,disabled:v||b,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b||!E,onClick:()=>{_()},children:b?t("common.loading"):t("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b||!E,onClick:()=>{k()},children:b?t("common.loading"):t("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:s.licenseControlRow,children:[e.jsxs("label",{className:`${s.licenseField} ${s.licenseFieldGrow}`,children:[e.jsx("span",{className:s.controlLabel,children:e.jsx(c,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":t("settings.license.keyInput","License Key"),className:s.textInput,type:"text",value:f,disabled:v||b,onChange:i=>N(i.target.value)})]}),e.jsx("button",{type:"button",className:s.actionBtn,disabled:v||b,onClick:()=>{(async()=>await A(f)&&N(""))()},children:b?t("common.loading"):t("settings.license.activate","Activate License")})]}),P&&e.jsx("p",{className:s.licenseMessage,children:P})]})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(c,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(x,{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")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail WEPPY Dashboard writes to its logs.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("select",{className:s.select,value:u.hot.LOG_LEVEL,onChange:i=>C("LOG_LEVEL",i.target.value),children:Re.map(i=>e.jsx("option",{value:i,children:i},i))}),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(c,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the WEPPY Dashboard history views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_LOCAL_HISTORY"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_LOCAL_HISTORY,ariaLabel:t("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:i=>C("ENABLE_LOCAL_HISTORY",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WEPPY Dashboard reporting.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_LOCAL_STATISTICS"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:t("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:i=>C("ENABLE_LOCAL_STATISTICS",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.contextCapture","Context Capture"),tooltip:t("settings.general.contextCapture.tooltip","When enabled, WEPPY Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("span",{className:`${s.savedIndicator} ${h==="ENABLE_CONTEXT_CAPTURE"?"":s.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(I,{checked:u.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:t("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:i=>C("ENABLE_CONTEXT_CAPTURE",i)})]})]}),e.jsxs("div",{className:s.settingRow,children:[e.jsx("span",{className:s.settingLabel,children:e.jsx(c,{label:t("settings.general.requestTimeout","Request Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time WEPPY Dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:s.settingControl,children:[e.jsx("input",{type:"number",className:s.numberInput,value:u.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:i=>{const n=parseInt(i.target.value,10);isNaN(n)||C("REQUEST_TIMEOUT",n)}}),e.jsx(x,{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(c,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(x,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:s.headerBadge,children:t("settings.readOnly","Read-only")})})]}),u?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:s.coldGrid,children:[e.jsx("dt",{children:e.jsx(c,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:u.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(c,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:u.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(c,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(x,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(u.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(c,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:s.langRow,children:[e.jsx("label",{children:e.jsx(c,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:s.select,value:l,onChange:i=>L(i.target.value),children:[e.jsx("option",{value:$,children:t("settings.language.auto","Auto")}),G.map(i=>e.jsx("option",{value:i,children:Ie[i]??i},i))]})]})]})]})}export{De as Component};
@@ -1 +1 @@
1
- import{u as o,j as s}from"./index-BJrsGJ5y.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};
1
+ import{u as o,j as s}from"./index-B-nqZCE3.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};
@@ -1,4 +1,4 @@
1
- import{r as c,a as I,D as L,u as C,l as S,m as R,j as e,d as k,i as $,k as O,T as D,n as A}from"./index-BJrsGJ5y.js";import{I as h}from"./InfoLabel-BbEJAGvG.js";import{T as x}from"./TooltipText-Bt3XsRi-.js";import{C as E}from"./ConfirmModal-jY5BGNY2.js";import{S as B}from"./StatusBadge-DASntRhn.js";import{D as H,T as M}from"./TierComparison-B-d8Qied.js";const F=5e3;function U(){const[t,a]=c.useState(null),[w,p]=c.useState([]),[o,y]=c.useState(!0),[u,f]=c.useState(null),m=c.useRef(null),_=c.useRef(null),r=c.useCallback(async()=>{var d;try{const[i,b]=await Promise.all([I.get("/sync/status"),I.get("/api/dashboard/place-summary")]);a(i);const j=(d=b.places)==null?void 0:d.find(N=>N.isActive);f((j==null?void 0:j.placeDirName)??null)}catch{}},[]),g=c.useCallback(async()=>{try{const d=await I.get("/sync/history",{limit:"30"});p(d.entries??[])}catch{p([])}},[]),s=c.useCallback(async()=>{await Promise.all([r(),g()]),y(!1)},[r,g]),T=c.useCallback(()=>{s()},[s]),P=c.useCallback(async()=>{await I.post("/api/dashboard/sync/history/clear"),p([]),r()},[r]);return c.useEffect(()=>(s(),_.current=setInterval(s,F),()=>{_.current&&clearInterval(_.current)}),[s]),c.useEffect(()=>{const d=new L;m.current=d,d.connect();const i=d.on("sync",()=>{r(),g()});return()=>{i(),d.disconnect(),m.current=null}},[r,g]),{status:t,history:w,loading:o,activePlaceDirName:u,refresh:T,clearHistory:P}}const W="_actions_t6ypv_66",q="_btn_t6ypv_74",G="_btnOutline_t6ypv_95",z="_btnPrimary_t6ypv_105",Y="_panel_t6ypv_115",V="_panelIcon_t6ypv_122",J="_panelTitle_t6ypv_128",Q="_panelDesc_t6ypv_137",X="_benefitList_t6ypv_145",Z="_benefitItem_t6ypv_154",l={actions:W,btn:q,btnOutline:G,btnPrimary:z,panel:Y,panelIcon:V,panelTitle:J,panelDesc:Q,benefitList:X,benefitItem:Z};function K({icon:t,title:a,description:w,benefits:p,upgradeLabel:o,upgradeHref:y}){const{t:u}=C(),[f,m]=c.useState(!1),{trackEvent:_}=S(),{pathname:r}=R(),g=r.replace(/^\//,"").split("/")[0]||"overview";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:l.panel,children:[t&&e.jsx("div",{className:l.panelIcon,children:t}),e.jsx("div",{className:l.panelTitle,children:a}),e.jsx("div",{className:l.panelDesc,children:w}),e.jsx("ul",{className:l.benefitList,children:p.map(s=>e.jsx("li",{className:l.benefitItem,children:s},s))}),e.jsx("div",{className:l.panelDiscountWrap,children:e.jsx(H,{variant:"centered"})}),e.jsxs("div",{className:l.actions,children:[e.jsx("button",{className:`${l.btn} ${l.btnOutline}`,onClick:()=>{_("dashboard_click_event",{click_target:"tier_compare",placement:"tier_panel",page:g}),m(!0)},children:u("tier.compare","Basic vs Pro")}),e.jsx("a",{className:`${l.btn} ${l.btnPrimary}`,href:y,target:"_blank",rel:"noreferrer",onClick:()=>_("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",page:g}),children:o})]})]}),f&&e.jsx(M,{onClose:()=>m(!1)})]})}const ee="_page_1warw_2",te="_card_1warw_10",se="_cardHeader_1warw_17",ne="_clearButton_1warw_29",ae="_statusRow_1warw_39",ie="_metaItem_1warw_46",ce="_statusGrid_1warw_52",oe="_table_1warw_71",re="_directionRail_1warw_99",le="_endpointLabel_1warw_105",de="_optionRail_1warw_109",pe="_directionOption_1warw_115",ye="_directionOptionActive_1warw_129",ue="_directionOptionInactive_1warw_133",_e="_direction_forward_1warw_139",he="_direction_bidirectional_1warw_143",me="_direction_reverse_1warw_147",ge="_lockBadge_1warw_152",we="_proBadge_1warw_160",fe="_forwardBadge_1warw_174",xe="_logContainer_1warw_187",be="_logEntry_1warw_194",je="_logTime_1warw_206",ve="_logType_1warw_212",Te="_logTypeWrite_1warw_221",Ne="_logTypeUpdate_1warw_225",Ie="_logTypeDelete_1warw_229",Pe="_logTypeIdle_1warw_233",Ce="_logPath_1warw_237",Le="_logEmpty_1warw_244",Se="_overlay_1warw_251",Re="_overlayTitle_1warw_261",ke="_overlayMessage_1warw_268",$e="_checklist_1warw_274",Oe="_checkItem_1warw_284",De="_upgradePanel_1warw_300",Ae="_upgradePanelHeader_1warw_307",Ee="_benefitList_1warw_315",Be="_benefitItem_1warw_324",He="_upgradeActions_1warw_339",Me="_btn_1warw_344",Fe="_btnPrimary_1warw_361",Ue="_disabled_1warw_372",n={page:ee,card:te,cardHeader:se,clearButton:ne,statusRow:ae,metaItem:ie,statusGrid:ce,table:oe,directionRail:re,endpointLabel:le,optionRail:de,directionOption:pe,directionOptionActive:ye,directionOptionInactive:ue,direction_forward:_e,direction_bidirectional:he,direction_reverse:me,lockBadge:ge,proBadge:we,forwardBadge:fe,logContainer:xe,logEntry:be,logTime:je,logType:ve,logTypeWrite:Te,logTypeUpdate:Ne,logTypeDelete:Ie,logTypeIdle:Pe,logPath:Ce,logEmpty:Le,overlay:Se,overlayTitle:Re,overlayMessage:ke,checklist:$e,checkItem:Oe,upgradePanel:De,upgradePanelHeader:Ae,benefitList:Ee,benefitItem:Be,upgradeActions:He,btn:Me,btnPrimary:Fe,disabled:Ue},We=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function qe(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function Ge(t){switch(t){case"write":return n.logTypeWrite;case"update":return n.logTypeUpdate;case"delete":return n.logTypeDelete;default:return n.logTypeIdle}}function ze(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Ye(t,a,w,p){const o=t(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1)),y=t("sync.directions.endpoint.local","Local"),u=t("sync.directions.endpoint.studio","Studio");switch(w){case"forward":return[`${o}: ${y} <- ${u}`,t("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
1
+ import{r as c,a as I,D as L,u as C,l as S,m as R,j as e,d as k,i as $,k as O,T as D,n as A}from"./index-B-nqZCE3.js";import{I as h}from"./InfoLabel-CMSu30c4.js";import{T as x}from"./TooltipText-Bnvm1FcC.js";import{C as E}from"./ConfirmModal-CM3ElkBC.js";import{S as B}from"./StatusBadge-BhRLY0yK.js";import{D as H,T as M}from"./TierComparison-CYfIb0tr.js";const F=5e3;function U(){const[t,a]=c.useState(null),[w,p]=c.useState([]),[o,y]=c.useState(!0),[u,f]=c.useState(null),m=c.useRef(null),_=c.useRef(null),r=c.useCallback(async()=>{var d;try{const[i,b]=await Promise.all([I.get("/sync/status"),I.get("/api/dashboard/place-summary")]);a(i);const j=(d=b.places)==null?void 0:d.find(N=>N.isActive);f((j==null?void 0:j.placeDirName)??null)}catch{}},[]),g=c.useCallback(async()=>{try{const d=await I.get("/sync/history",{limit:"30"});p(d.entries??[])}catch{p([])}},[]),s=c.useCallback(async()=>{await Promise.all([r(),g()]),y(!1)},[r,g]),T=c.useCallback(()=>{s()},[s]),P=c.useCallback(async()=>{await I.post("/api/dashboard/sync/history/clear"),p([]),r()},[r]);return c.useEffect(()=>(s(),_.current=setInterval(s,F),()=>{_.current&&clearInterval(_.current)}),[s]),c.useEffect(()=>{const d=new L;m.current=d,d.connect();const i=d.on("sync",()=>{r(),g()});return()=>{i(),d.disconnect(),m.current=null}},[r,g]),{status:t,history:w,loading:o,activePlaceDirName:u,refresh:T,clearHistory:P}}const W="_actions_t6ypv_66",q="_btn_t6ypv_74",G="_btnOutline_t6ypv_95",z="_btnPrimary_t6ypv_105",Y="_panel_t6ypv_115",V="_panelIcon_t6ypv_122",J="_panelTitle_t6ypv_128",Q="_panelDesc_t6ypv_137",X="_benefitList_t6ypv_145",Z="_benefitItem_t6ypv_154",l={actions:W,btn:q,btnOutline:G,btnPrimary:z,panel:Y,panelIcon:V,panelTitle:J,panelDesc:Q,benefitList:X,benefitItem:Z};function K({icon:t,title:a,description:w,benefits:p,upgradeLabel:o,upgradeHref:y}){const{t:u}=C(),[f,m]=c.useState(!1),{trackEvent:_}=S(),{pathname:r}=R(),g=r.replace(/^\//,"").split("/")[0]||"overview";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:l.panel,children:[t&&e.jsx("div",{className:l.panelIcon,children:t}),e.jsx("div",{className:l.panelTitle,children:a}),e.jsx("div",{className:l.panelDesc,children:w}),e.jsx("ul",{className:l.benefitList,children:p.map(s=>e.jsx("li",{className:l.benefitItem,children:s},s))}),e.jsx("div",{className:l.panelDiscountWrap,children:e.jsx(H,{variant:"centered"})}),e.jsxs("div",{className:l.actions,children:[e.jsx("button",{className:`${l.btn} ${l.btnOutline}`,onClick:()=>{_("dashboard_click_event",{click_target:"tier_compare",placement:"tier_panel",page:g}),m(!0)},children:u("tier.compare","Basic vs Pro")}),e.jsx("a",{className:`${l.btn} ${l.btnPrimary}`,href:y,target:"_blank",rel:"noreferrer",onClick:()=>_("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",page:g}),children:o})]})]}),f&&e.jsx(M,{onClose:()=>m(!1)})]})}const ee="_page_1warw_2",te="_card_1warw_10",se="_cardHeader_1warw_17",ne="_clearButton_1warw_29",ae="_statusRow_1warw_39",ie="_metaItem_1warw_46",ce="_statusGrid_1warw_52",oe="_table_1warw_71",re="_directionRail_1warw_99",le="_endpointLabel_1warw_105",de="_optionRail_1warw_109",pe="_directionOption_1warw_115",ye="_directionOptionActive_1warw_129",ue="_directionOptionInactive_1warw_133",_e="_direction_forward_1warw_139",he="_direction_bidirectional_1warw_143",me="_direction_reverse_1warw_147",ge="_lockBadge_1warw_152",we="_proBadge_1warw_160",fe="_forwardBadge_1warw_174",xe="_logContainer_1warw_187",be="_logEntry_1warw_194",je="_logTime_1warw_206",ve="_logType_1warw_212",Te="_logTypeWrite_1warw_221",Ne="_logTypeUpdate_1warw_225",Ie="_logTypeDelete_1warw_229",Pe="_logTypeIdle_1warw_233",Ce="_logPath_1warw_237",Le="_logEmpty_1warw_244",Se="_overlay_1warw_251",Re="_overlayTitle_1warw_261",ke="_overlayMessage_1warw_268",$e="_checklist_1warw_274",Oe="_checkItem_1warw_284",De="_upgradePanel_1warw_300",Ae="_upgradePanelHeader_1warw_307",Ee="_benefitList_1warw_315",Be="_benefitItem_1warw_324",He="_upgradeActions_1warw_339",Me="_btn_1warw_344",Fe="_btnPrimary_1warw_361",Ue="_disabled_1warw_372",n={page:ee,card:te,cardHeader:se,clearButton:ne,statusRow:ae,metaItem:ie,statusGrid:ce,table:oe,directionRail:re,endpointLabel:le,optionRail:de,directionOption:pe,directionOptionActive:ye,directionOptionInactive:ue,direction_forward:_e,direction_bidirectional:he,direction_reverse:me,lockBadge:ge,proBadge:we,forwardBadge:fe,logContainer:xe,logEntry:be,logTime:je,logType:ve,logTypeWrite:Te,logTypeUpdate:Ne,logTypeDelete:Ie,logTypeIdle:Pe,logPath:Ce,logEmpty:Le,overlay:Se,overlayTitle:Re,overlayMessage:ke,checklist:$e,checkItem:Oe,upgradePanel:De,upgradePanelHeader:Ae,benefitList:Ee,benefitItem:Be,upgradeActions:He,btn:Me,btnPrimary:Fe,disabled:Ue},We=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function qe(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function Ge(t){switch(t){case"write":return n.logTypeWrite;case"update":return n.logTypeUpdate;case"delete":return n.logTypeDelete;default:return n.logTypeIdle}}function ze(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Ye(t,a,w,p){const o=t(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1)),y=t("sync.directions.endpoint.local","Local"),u=t("sync.directions.endpoint.studio","Studio");switch(w){case"forward":return[`${o}: ${y} <- ${u}`,t("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
2
2
  `);case"bidirectional":return[`${o}: ${y} <-> ${u}`,t("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),p?t("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
3
3
  `);case"reverse":return[`${o}: ${y} -> ${u}`,t("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),p?t("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
4
4
  `);default:return o}}const Ve=["scripts","values","containers","data","services"];function Je(t,a){return a==="manual"?t("sync.directions.mode.manual","Manual"):a==="auto"?t("sync.directions.mode.auto","Auto"):"-"}function Qe(t,a){return a==="manual"?t("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):a==="auto"?t("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function Xe(t,a){switch(a){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function Ze(t,a){switch(a){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function it(){const{t}=C(),{level:a}=k(),{tier:w,loading:p}=$(),o=U(),{show:y}=O(),[u,f]=c.useState(!1),[m,_]=c.useState(!1),r=!p&&w==="basic";if(a==="disconnected"||a==="serverOnly")return e.jsx("div",{className:n.page,children:e.jsx("div",{className:n.card,children:e.jsxs("div",{className:n.overlay,children:[e.jsx("div",{className:n.overlayTitle,children:t("sync.overlay.title","Roblox Studio plugin required")}),e.jsx("div",{className:n.overlayMessage,children:t("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),e.jsxs("ul",{className:n.checklist,children:[e.jsx("li",{className:n.checkItem,children:t("sync.overlay.check1","Is Roblox Studio running?")}),e.jsx("li",{className:n.checkItem,children:t("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})});const s=o.status,T=o.history,P=ze(s==null?void 0:s.state),d=async()=>{_(!0);try{await o.clearHistory(),y(t("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{y(t("toast.clearFailed","Failed to clear data"),"error")}finally{_(!1)}};return e.jsxs("div",{className:n.page,children:[e.jsxs("div",{className:n.card,children:[e.jsxs("div",{className:n.cardHeader,children:[e.jsx(x,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),r&&e.jsx(x,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:n.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:n.statusRow,children:[e.jsx(B,{status:P}),(s==null?void 0:s.placeName)&&e.jsxs("span",{className:n.metaItem,children:[e.jsx(h,{label:t("sync.status.place","Place"),tooltip:t("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",s.placeName,s.placeId?` (${s.placeId})`:""]})]}),e.jsxs("dl",{className:n.statusGrid,children:[(s==null?void 0:s.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:t("sync.status.path","Path"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),e.jsx("dd",{children:s.syncRoot})]}),o.activePlaceDirName&&(s==null?void 0:s.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:t("sync.status.placePath","Place Path"),tooltip:t("sync.status.placePath.tooltip","Active place directory where explorer files are synced.")})}),e.jsx("dd",{children:`${s.syncRoot}/${o.activePlaceDirName}/explorer`})]}),(s==null?void 0:s.instanceCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:s.instanceCount})]}),(s==null?void 0:s.scriptCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:s.scriptCount})]}),(s==null?void 0:s.state)==="syncing"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(h,{label:t("sync.status.state","State"),tooltip:t("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),e.jsx("dd",{children:t("status.syncing","Syncing")})]})]})]}),(s==null?void 0:s.directions)&&e.jsxs("div",{className:n.card,children:[e.jsx("div",{className:n.cardHeader,children:e.jsx(x,{text:t("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:t("sync.directions.title","Sync Directions")})}),e.jsxs("table",{className:n.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(h,{label:t("sync.directions.type","Type"),tooltip:t("sync.directions.type.tooltip","Sync category affected by this rule.")})}),e.jsx("th",{children:e.jsx(h,{label:t("sync.directions.direction","Direction"),tooltip:t("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),e.jsx("th",{children:e.jsx(h,{label:t("sync.directions.applyMode","Apply Mode"),tooltip:t("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),e.jsx("tbody",{children:Ve.map(i=>{var N;const b=s.directions[i],j=(N=s.applyModes)==null?void 0:N[i];return e.jsxs("tr",{children:[e.jsx("td",{children:t(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1))}),e.jsx("td",{children:e.jsxs("div",{className:n.directionRail,"aria-label":`${i}-direction-rail`,children:[e.jsx(x,{text:t("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:e.jsx("span",{className:n.endpointLabel,children:t("sync.directions.endpoint.local","Local")})}),e.jsx("span",{className:n.optionRail,children:We.map(v=>e.jsx(D,{text:Ye(t,i,v.key,r),children:e.jsx("span",{className:`${n.directionOption} ${b===v.key?n.directionOptionActive:n.directionOptionInactive} ${n[`direction_${v.key}`]??""}`,"data-active":b===v.key?"true":"false",children:v.symbol})},v.key))}),e.jsx(x,{text:t("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:e.jsx("span",{className:n.endpointLabel,children:t("sync.directions.endpoint.studio","Studio")})})]})}),e.jsx("td",{children:e.jsx(x,{text:Qe(t,j),children:Je(t,j)})})]},i)})})]})]}),e.jsxs("div",{className:n.card,children:[e.jsxs("div",{className:n.cardHeader,children:[e.jsx("span",{children:t("sync.log.title","Sync Log")}),e.jsx("button",{className:n.clearButton,onClick:()=>f(!0),children:t("common.clear","Clear")})]}),e.jsx("div",{className:n.logContainer,children:T.length===0?e.jsx("div",{className:n.logEmpty,children:t("sync.log.empty","No sync events yet")}):T.map((i,b)=>e.jsxs("div",{className:n.logEntry,children:[e.jsx("span",{className:n.logTime,children:qe(i.timestamp)}),e.jsx(x,{text:Ze(t,i.type),children:e.jsx("span",{className:`${n.logType} ${Ge(i.type)}`,children:Xe(t,i.type)})}),e.jsxs("span",{className:n.logPath,children:[i.path,i.details?` — ${i.details}`:""]})]},b))})]}),r&&e.jsx(K,{title:t("sync.upgrade.title","Unlock Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:A.sync}),e.jsx(E,{open:u,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:m,onCancel:()=>!m&&f(!1),onConfirm:d})]})}export{it as Component};