@weppy/roblox-mcp 2.5.1 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.github/workflows/install-test.yml +55 -4
- package/CHANGELOG.md +27 -0
- package/README.md +29 -46
- package/SUPPORT.md +4 -6
- package/install.ps1 +7 -5
- package/install.sh +4 -2
- package/llms-full.txt +8 -688
- package/llms.txt +3 -13
- package/package.json +1 -1
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-kwE4pHZd.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-BFfSWE_s.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-DfdyAPrJ.js → ConfirmModal-CeEegyOx.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-D_mEFudd.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-XuHLuNwR.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/GameChangeDetail-BFTVWFJO.js +6 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-Cbx8P1zh.css → GameChangeDetail-Be32PRgR.css} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-DrK7vhO-.js → InfoLabel-MCIgnb3Z.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-BrWw_dSf.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-CgkzRAqQ.js → PlaytestPage-CxeJXqJZ.js} +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-Qd2a2pgi.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-hJyzgRAl.js → StatusBadge-Dk0M7zQF.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BmMeN4N9.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Wu2tD8Lb.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-DsesL0R1.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-C7ld3BhY.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TooltipText-CjH5N6RH.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/WhatsNewPage-BwWOghgp.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-FDX6EnZH.js +355 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-XEVy0XAx.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-BeRNzFBh.js → useLiveUptime-DExWULj9.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +2 -2
- package/plugins/weppy-roblox-mcp/dist/index.js +77 -77
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/docs/compatibility.md +0 -44
- package/docs/en/dashboard/changelog.md +0 -114
- package/docs/en/dashboard/connection.md +0 -77
- package/docs/en/dashboard/overview.md +0 -95
- package/docs/en/dashboard/playtest.md +0 -61
- package/docs/en/dashboard/settings.md +0 -60
- package/docs/en/dashboard/sync.md +0 -68
- package/docs/en/dashboard/tools.md +0 -69
- package/docs/en/explorer/overview.md +0 -104
- package/docs/en/installation/README.md +0 -95
- package/docs/en/installation/ai-apps/antigravity.md +0 -89
- package/docs/en/installation/ai-apps/claude-app.md +0 -78
- package/docs/en/installation/ai-apps/claude-code.md +0 -104
- package/docs/en/installation/ai-apps/codex-app.md +0 -56
- package/docs/en/installation/ai-apps/codex-cli.md +0 -67
- package/docs/en/installation/ai-apps/cursor.md +0 -77
- package/docs/en/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/en/installation/roblox-explorer.md +0 -68
- package/docs/en/installation/roblox-plugin.md +0 -96
- package/docs/en/pro-upgrade.md +0 -96
- package/docs/en/sync/luau-lsp.md +0 -41
- package/docs/en/sync/overview.md +0 -153
- package/docs/en/tools/assets-and-effects.md +0 -104
- package/docs/en/tools/instances-and-properties.md +0 -104
- package/docs/en/tools/overview.md +0 -277
- package/docs/en/tools/playtest.md +0 -140
- package/docs/en/tools/scripting.md +0 -66
- package/docs/en/tools/system-and-debugging.md +0 -93
- package/docs/en/tools/world-and-environment.md +0 -102
- package/docs/es/README.md +0 -209
- package/docs/es/dashboard/changelog.md +0 -114
- package/docs/es/dashboard/connection.md +0 -77
- package/docs/es/dashboard/overview.md +0 -95
- package/docs/es/dashboard/playtest.md +0 -61
- package/docs/es/dashboard/settings.md +0 -60
- package/docs/es/dashboard/sync.md +0 -68
- package/docs/es/dashboard/tools.md +0 -69
- package/docs/es/explorer/overview.md +0 -104
- package/docs/es/installation/README.md +0 -87
- package/docs/es/installation/ai-apps/antigravity.md +0 -89
- package/docs/es/installation/ai-apps/claude-app.md +0 -78
- package/docs/es/installation/ai-apps/claude-code.md +0 -104
- package/docs/es/installation/ai-apps/codex-app.md +0 -56
- package/docs/es/installation/ai-apps/codex-cli.md +0 -67
- package/docs/es/installation/ai-apps/cursor.md +0 -77
- package/docs/es/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/es/installation/roblox-explorer.md +0 -58
- package/docs/es/installation/roblox-plugin.md +0 -85
- package/docs/es/pro-upgrade.md +0 -96
- package/docs/es/sync/luau-lsp.md +0 -41
- package/docs/es/sync/overview.md +0 -153
- package/docs/es/tools/assets-and-effects.md +0 -104
- package/docs/es/tools/instances-and-properties.md +0 -104
- package/docs/es/tools/overview.md +0 -277
- package/docs/es/tools/playtest.md +0 -140
- package/docs/es/tools/scripting.md +0 -66
- package/docs/es/tools/system-and-debugging.md +0 -93
- package/docs/es/tools/world-and-environment.md +0 -102
- package/docs/id/README.md +0 -209
- package/docs/id/dashboard/changelog.md +0 -114
- package/docs/id/dashboard/connection.md +0 -77
- package/docs/id/dashboard/overview.md +0 -95
- package/docs/id/dashboard/playtest.md +0 -61
- package/docs/id/dashboard/settings.md +0 -60
- package/docs/id/dashboard/sync.md +0 -68
- package/docs/id/dashboard/tools.md +0 -69
- package/docs/id/explorer/overview.md +0 -104
- package/docs/id/installation/README.md +0 -93
- package/docs/id/installation/ai-apps/antigravity.md +0 -89
- package/docs/id/installation/ai-apps/claude-app.md +0 -78
- package/docs/id/installation/ai-apps/claude-code.md +0 -104
- package/docs/id/installation/ai-apps/codex-app.md +0 -56
- package/docs/id/installation/ai-apps/codex-cli.md +0 -67
- package/docs/id/installation/ai-apps/cursor.md +0 -77
- package/docs/id/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/id/installation/roblox-explorer.md +0 -58
- package/docs/id/installation/roblox-plugin.md +0 -85
- package/docs/id/pro-upgrade.md +0 -96
- package/docs/id/sync/luau-lsp.md +0 -41
- package/docs/id/sync/overview.md +0 -153
- package/docs/id/tools/assets-and-effects.md +0 -104
- package/docs/id/tools/instances-and-properties.md +0 -104
- package/docs/id/tools/overview.md +0 -277
- package/docs/id/tools/playtest.md +0 -140
- package/docs/id/tools/scripting.md +0 -66
- package/docs/id/tools/system-and-debugging.md +0 -93
- package/docs/id/tools/world-and-environment.md +0 -102
- package/docs/installer/assets/index-Bz0amd7x.js +0 -63
- package/docs/installer/assets/index-ei4lRUa6.css +0 -1
- package/docs/installer/index.html +0 -14
- package/docs/installer/manifest.webmanifest +0 -15
- package/docs/installer/sw.js +0 -7
- package/docs/installer/weppy-icon.png +0 -0
- package/docs/ja/README.md +0 -207
- package/docs/ja/dashboard/changelog.md +0 -114
- package/docs/ja/dashboard/connection.md +0 -77
- package/docs/ja/dashboard/overview.md +0 -95
- package/docs/ja/dashboard/playtest.md +0 -61
- package/docs/ja/dashboard/settings.md +0 -60
- package/docs/ja/dashboard/sync.md +0 -68
- package/docs/ja/dashboard/tools.md +0 -69
- package/docs/ja/explorer/overview.md +0 -104
- package/docs/ja/installation/README.md +0 -93
- package/docs/ja/installation/ai-apps/antigravity.md +0 -89
- package/docs/ja/installation/ai-apps/claude-app.md +0 -78
- package/docs/ja/installation/ai-apps/claude-code.md +0 -104
- package/docs/ja/installation/ai-apps/codex-app.md +0 -56
- package/docs/ja/installation/ai-apps/codex-cli.md +0 -67
- package/docs/ja/installation/ai-apps/cursor.md +0 -77
- package/docs/ja/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/ja/installation/roblox-explorer.md +0 -58
- package/docs/ja/installation/roblox-plugin.md +0 -85
- package/docs/ja/pro-upgrade.md +0 -96
- package/docs/ja/sync/luau-lsp.md +0 -41
- package/docs/ja/sync/overview.md +0 -153
- package/docs/ja/tools/assets-and-effects.md +0 -104
- package/docs/ja/tools/instances-and-properties.md +0 -104
- package/docs/ja/tools/overview.md +0 -277
- package/docs/ja/tools/playtest.md +0 -140
- package/docs/ja/tools/scripting.md +0 -66
- package/docs/ja/tools/system-and-debugging.md +0 -93
- package/docs/ja/tools/world-and-environment.md +0 -102
- package/docs/ko/README.md +0 -207
- package/docs/ko/dashboard/changelog.md +0 -114
- package/docs/ko/dashboard/connection.md +0 -77
- package/docs/ko/dashboard/overview.md +0 -95
- package/docs/ko/dashboard/playtest.md +0 -61
- package/docs/ko/dashboard/settings.md +0 -60
- package/docs/ko/dashboard/sync.md +0 -68
- package/docs/ko/dashboard/tools.md +0 -69
- package/docs/ko/explorer/overview.md +0 -104
- package/docs/ko/installation/README.md +0 -95
- package/docs/ko/installation/ai-apps/antigravity.md +0 -88
- package/docs/ko/installation/ai-apps/claude-app.md +0 -78
- package/docs/ko/installation/ai-apps/claude-code.md +0 -104
- package/docs/ko/installation/ai-apps/codex-app.md +0 -56
- package/docs/ko/installation/ai-apps/codex-cli.md +0 -67
- package/docs/ko/installation/ai-apps/cursor.md +0 -77
- package/docs/ko/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/ko/installation/roblox-explorer.md +0 -68
- package/docs/ko/installation/roblox-plugin.md +0 -96
- package/docs/ko/pro-upgrade.md +0 -96
- package/docs/ko/sync/luau-lsp.md +0 -41
- package/docs/ko/sync/overview.md +0 -153
- package/docs/ko/tools/assets-and-effects.md +0 -104
- package/docs/ko/tools/instances-and-properties.md +0 -104
- package/docs/ko/tools/overview.md +0 -277
- package/docs/ko/tools/playtest.md +0 -134
- package/docs/ko/tools/scripting.md +0 -66
- package/docs/ko/tools/system-and-debugging.md +0 -93
- package/docs/ko/tools/world-and-environment.md +0 -102
- package/docs/pt-br/README.md +0 -209
- package/docs/pt-br/dashboard/changelog.md +0 -114
- package/docs/pt-br/dashboard/connection.md +0 -77
- package/docs/pt-br/dashboard/overview.md +0 -95
- package/docs/pt-br/dashboard/playtest.md +0 -61
- package/docs/pt-br/dashboard/settings.md +0 -60
- package/docs/pt-br/dashboard/sync.md +0 -68
- package/docs/pt-br/dashboard/tools.md +0 -69
- package/docs/pt-br/explorer/overview.md +0 -104
- package/docs/pt-br/installation/README.md +0 -93
- package/docs/pt-br/installation/ai-apps/antigravity.md +0 -89
- package/docs/pt-br/installation/ai-apps/claude-app.md +0 -78
- package/docs/pt-br/installation/ai-apps/claude-code.md +0 -104
- package/docs/pt-br/installation/ai-apps/codex-app.md +0 -56
- package/docs/pt-br/installation/ai-apps/codex-cli.md +0 -67
- package/docs/pt-br/installation/ai-apps/cursor.md +0 -77
- package/docs/pt-br/installation/ai-apps/gemini-cli.md +0 -120
- package/docs/pt-br/installation/roblox-explorer.md +0 -58
- package/docs/pt-br/installation/roblox-plugin.md +0 -85
- package/docs/pt-br/pro-upgrade.md +0 -96
- package/docs/pt-br/sync/luau-lsp.md +0 -41
- package/docs/pt-br/sync/overview.md +0 -153
- package/docs/pt-br/tools/assets-and-effects.md +0 -104
- package/docs/pt-br/tools/instances-and-properties.md +0 -104
- package/docs/pt-br/tools/overview.md +0 -277
- package/docs/pt-br/tools/playtest.md +0 -140
- package/docs/pt-br/tools/scripting.md +0 -66
- package/docs/pt-br/tools/system-and-debugging.md +0 -93
- package/docs/pt-br/tools/world-and-environment.md +0 -102
- package/docs/troubleshooting.md +0 -47
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-DRfFUIvC.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Dgl8dBt6.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-9bG71eB1.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-LSvSX1_u.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-CXsGuoPu.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PropertyDiff-Dy3MffNh.js +0 -6
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-D2ZBQ2KF.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-CLt9jxd8.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-eX2Rh-Ct.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierComparison-BwKqP_4s.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo-D5n9OoEm.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo.module-CAoUYgIx.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-CLAr1gQq.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-CqzfCxxH.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/WhatsNewPage-23o8LmsR.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BfvSPSNj.js +0 -207
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-YfUJSF5s.css +0 -1
package/llms.txt
CHANGED
|
@@ -23,7 +23,7 @@ terrain, and more — inside a live Studio session.
|
|
|
23
23
|
|
|
24
24
|
**Web installer** (recommended one-click setup for Chrome, Edge, and Arc):
|
|
25
25
|
|
|
26
|
-
https://
|
|
26
|
+
https://weppyai.com/en/install
|
|
27
27
|
|
|
28
28
|
**One-line install** (advanced fallback):
|
|
29
29
|
|
|
@@ -35,11 +35,7 @@ curl -fsSL https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/inst
|
|
|
35
35
|
irm https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/install.ps1 | iex
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Safari / Firefox users should
|
|
39
|
-
|
|
40
|
-
Manual alternative:
|
|
41
|
-
1. Install Roblox Studio plugin via the installation guide
|
|
42
|
-
2. Register MCP server: `npx -y @weppy/roblox-mcp`
|
|
38
|
+
Safari / Firefox users should open the web install page and follow the browser-specific guide there.
|
|
43
39
|
|
|
44
40
|
## Tiers
|
|
45
41
|
|
|
@@ -48,13 +44,7 @@ Manual alternative:
|
|
|
48
44
|
|
|
49
45
|
## Detailed docs
|
|
50
46
|
|
|
51
|
-
-
|
|
52
|
-
- Installation: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/installation/README.md
|
|
53
|
-
- Tools reference: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/tools/overview.md
|
|
54
|
-
- Sync guide: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/sync/overview.md
|
|
55
|
-
- WEPPY Dashboard guide: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/dashboard/overview.md
|
|
56
|
-
- Troubleshooting: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/troubleshooting.md
|
|
57
|
-
- Compatibility: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/compatibility.md
|
|
47
|
+
- Install and setup: https://weppyai.com/en/install
|
|
58
48
|
- Pro upgrade: https://weppyai.com/en/plans
|
|
59
49
|
|
|
60
50
|
## Requirements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
|
|
5
5
|
"main": "plugins/weppy-roblox-mcp/dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,a as R,u as M,b as B,c as V,j as e}from"./index-FDX6EnZH.js";import{I as G}from"./InfoLabel-MCIgnb3Z.js";import{G as D}from"./GameChangeDetail-BFTVWFJO.js";import{T as m}from"./TooltipText-CjH5N6RH.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};
|
|
@@ -0,0 +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-FDX6EnZH.js";import{C as H}from"./ConfirmModal-CeEegyOx.js";import{T as $}from"./TooltipText-CjH5N6RH.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-
|
|
1
|
+
import{j as s,s as e}from"./index-FDX6EnZH.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1h084_2{max-height:200px;overflow-y:auto;font-family:var(--font-code);font-size:12px;line-height:1.6;padding:8px 12px;background:var(--bg-secondary);border-radius:4px}._entry_1h084_14{display:flex;gap:8px;white-space:nowrap}._timestamp_1h084_21{color:var(--text-muted);flex-shrink:0}._message_1h084_27{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis}._warn_1h084_34 ._message_1h084_27{color:var(--warning)}._error_1h084_39 ._message_1h084_27{color:var(--error)}._empty_1h084_44{color:var(--text-muted);font-style:italic;padding:8px 0}._page_sf4qa_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_sf4qa_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._disabled_sf4qa_18{opacity:.4;pointer-events:none}._cardHeader_sf4qa_24{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._clearButton_sf4qa_37{border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);border-radius:var(--radius-sm);padding:6px 12px;cursor:pointer}._serverGrid_sf4qa_47{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-family:var(--font-code);font-size:13px}._serverGrid_sf4qa_47 dt{color:var(--text-muted)}._serverGrid_sf4qa_47 dd{color:var(--text-primary);margin:0}._statusRow_sf4qa_65{display:flex;align-items:center;gap:16px;margin-bottom:12px}._metaItem_sf4qa_72{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._table_sf4qa_79{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_sf4qa_79 th{text-align:left;color:var(--text-muted);font-weight:400;padding:4px 8px 4px 0;border-bottom:1px solid var(--border)}._table_sf4qa_79 td{padding:6px 8px 6px 0;color:var(--text-primary)}._table_sf4qa_79 tr:hover td{background:var(--accent-dim)}._toggleBtn_sf4qa_104{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:0 4px;transition:color var(--transition)}._toggleBtn_sf4qa_104:hover{color:var(--accent)}._disconnected_sf4qa_119{text-align:center;padding:32px 16px}._disconnected_sf4qa_119 h3{color:var(--error);font-size:16px;margin:0 0 8px}._disconnected_sf4qa_119 p{color:var(--text-secondary);font-size:13px;margin:0 0 4px}._disconnectedActions_sf4qa_136{display:flex;gap:8px;justify-content:center;margin-top:16px}._btn_sf4qa_143{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_sf4qa_143:hover{border-color:var(--accent);background:var(--accent-dim)}._activity_active_sf4qa_161,._activity_stale_sf4qa_162,._activity_unknown_sf4qa_163{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}._activity_active_sf4qa_161{background:var(--success, #4ade80);box-shadow:0 0 4px var(--success, #4ade80)}._activity_stale_sf4qa_162{background:var(--text-muted, #666)}._activity_unknown_sf4qa_163{background:var(--text-muted, #666);opacity:.4}._killBtn_sf4qa_187{font-family:var(--font-label);font-size:11px;padding:3px 10px;border-radius:var(--radius-sm);border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._killBtn_sf4qa_187:hover{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text);filter:brightness(1.15)}._emptyRow_sf4qa_207{color:var(--text-muted);font-style:italic}
|
|
@@ -0,0 +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-FDX6EnZH.js";import{I as r}from"./InfoLabel-MCIgnb3Z.js";import{S as T}from"./StatusBadge-Dk0M7zQF.js";import{T as D}from"./TooltipText-CjH5N6RH.js";import{C as $}from"./ConfirmModal-CeEegyOx.js";import{u as F,f as H}from"./useLiveUptime-DExWULj9.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};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{u as _,r as x,j as e}from"./index-FDX6EnZH.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
|
+
`),d=i.split(`
|
|
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
|
+
`);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(`
|
|
5
|
+
`).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]}),e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:o("changelog.diff.after","After")}),e.jsx("div",{className:s.sideContent,children:t.split(`
|
|
6
|
+
`).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]})]})]})}const z="_container_1obo2_2",J="_propertyList_1obo2_11",K="_propertyRow_1obo2_18",F="_propertyKey_1obo2_26",E="_oldValue_1obo2_32",G="_arrow_1obo2_38",I="_newValue_1obo2_43",r={container:z,propertyList:J,propertyRow:K,propertyKey:F,oldValue:E,arrow:G,newValue:I};function h(n){return typeof n=="object"&&n!==null}function M(n){return h(n)&&n.type==="props"}function U(n){return h(n)&&n.type==="value"}function p(n){return n==null?"nil":typeof n=="string"?`"${n}"`:typeof n=="object"?JSON.stringify(n):String(n)}function W({before:n,after:i}){if(M(i)){const a=Object.entries(i.changedProperties??{});return a.length===0?null:e.jsx("div",{className:r.propertyList,children:a.map(([f,t])=>e.jsxs("div",{className:r.propertyRow,children:[e.jsx("span",{className:r.propertyKey,children:f}),e.jsx("span",{className:r.oldValue,children:p(t.before)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(t.after)})]},f))})}if(U(i)&&i.valueDiff)return e.jsxs("div",{className:r.container,children:[e.jsx("span",{className:r.oldValue,children:p(i.valueDiff.before)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(i.valueDiff.after)})]});const o=n!=null,d=i!=null;return!o&&!d?null:o?d?e.jsxs("div",{className:r.container,children:[e.jsx("span",{className:r.oldValue,children:p(n)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(i)})]}):e.jsx("div",{className:r.container,children:e.jsx("span",{className:r.oldValue,children:p(n)})}):e.jsx("div",{className:r.container,children:e.jsx("span",{className:r.newValue,children:p(i)})})}function q(n){return typeof n=="object"&&n!==null}function H(n){return q(n)&&n.type==="script"}function y(n){return n==null?"new":`${n} lines`}function T({change:n}){if(n.category==="script"){if(typeof n.before=="string"||typeof n.after=="string")return e.jsx(O,{before:n.before,after:n.after});if(H(n.after)){const i=n.after.scriptMeta;return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"var(--font-code)",fontSize:"11px",padding:"4px 0"},children:[e.jsx("span",{style:{color:"var(--text-secondary)"},children:y(i==null?void 0:i.beforeLines)}),e.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"→"}),e.jsx("span",{style:{color:"var(--text-primary)",fontWeight:500},children:y(i==null?void 0:i.afterLines)})]})}}return n.category==="property"?e.jsx(W,{before:n.before,after:n.after}):n.details?e.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(n.details,null,2)}):e.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:n.target})}export{T as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_uv8oc_2{font-family:var(--font-code);font-size:11px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._header_uv8oc_10{display:flex;gap:2px;background:var(--bg-secondary);border-bottom:1px solid var(--border);padding:4px 8px}._modeBtn_uv8oc_18{font-family:var(--font-label);font-size:10px;padding:2px 8px;border:1px solid var(--border);border-radius:3px;background:none;color:var(--text-secondary);cursor:pointer}._modeBtn_uv8oc_18:hover{border-color:var(--accent)}._modeBtnActive_uv8oc_33{background:var(--accent-dim);color:var(--accent);border-color:var(--accent)}._unifiedView_uv8oc_40{overflow-x:auto;max-height:400px;overflow-y:auto}._diffLine_uv8oc_46{display:flex;padding:0 8px;min-height:18px;line-height:18px;white-space:pre-wrap;word-break:break-all}._lineNum_uv8oc_55{min-width:32px;text-align:right;padding-right:8px;color:var(--text-muted);-webkit-user-select:none;user-select:none;flex-shrink:0}._lineContent_uv8oc_64{flex:1}._lineAdded_uv8oc_68{background:#22c55e1a;color:var(--success)}._lineRemoved_uv8oc_73{background:#ef44441a;color:var(--error)}._lineContext_uv8oc_78{color:var(--text-secondary)}._sideBySide_uv8oc_83{display:flex;overflow-x:auto;max-height:400px;overflow-y:auto}._sidePane_uv8oc_90{flex:1;min-width:0;overflow-x:auto}._sidePane_uv8oc_90:first-child{border-right:1px solid var(--border)}._sideLabel_uv8oc_100{font-family:var(--font-label);font-size:10px;font-weight:500;color:var(--text-muted);padding:4px 8px;background:var(--bg-secondary);border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.05em}._sideContent_uv8oc_112{padding:4px 0}._empty_uv8oc_117{padding:16px;text-align:center;color:var(--text-muted);font-family:var(--font-label);font-size:12px}.
|
|
1
|
+
._container_uv8oc_2{font-family:var(--font-code);font-size:11px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._header_uv8oc_10{display:flex;gap:2px;background:var(--bg-secondary);border-bottom:1px solid var(--border);padding:4px 8px}._modeBtn_uv8oc_18{font-family:var(--font-label);font-size:10px;padding:2px 8px;border:1px solid var(--border);border-radius:3px;background:none;color:var(--text-secondary);cursor:pointer}._modeBtn_uv8oc_18:hover{border-color:var(--accent)}._modeBtnActive_uv8oc_33{background:var(--accent-dim);color:var(--accent);border-color:var(--accent)}._unifiedView_uv8oc_40{overflow-x:auto;max-height:400px;overflow-y:auto}._diffLine_uv8oc_46{display:flex;padding:0 8px;min-height:18px;line-height:18px;white-space:pre-wrap;word-break:break-all}._lineNum_uv8oc_55{min-width:32px;text-align:right;padding-right:8px;color:var(--text-muted);-webkit-user-select:none;user-select:none;flex-shrink:0}._lineContent_uv8oc_64{flex:1}._lineAdded_uv8oc_68{background:#22c55e1a;color:var(--success)}._lineRemoved_uv8oc_73{background:#ef44441a;color:var(--error)}._lineContext_uv8oc_78{color:var(--text-secondary)}._sideBySide_uv8oc_83{display:flex;overflow-x:auto;max-height:400px;overflow-y:auto}._sidePane_uv8oc_90{flex:1;min-width:0;overflow-x:auto}._sidePane_uv8oc_90:first-child{border-right:1px solid var(--border)}._sideLabel_uv8oc_100{font-family:var(--font-label);font-size:10px;font-weight:500;color:var(--text-muted);padding:4px 8px;background:var(--bg-secondary);border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.05em}._sideContent_uv8oc_112{padding:4px 0}._empty_uv8oc_117{padding:16px;text-align:center;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._container_1obo2_2{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:11px;padding:4px 0}._propertyList_1obo2_11{display:flex;flex-direction:column;gap:6px;padding:4px 0}._propertyRow_1obo2_18{display:flex;align-items:flex-start;gap:8px;font-family:var(--font-code);font-size:11px}._propertyKey_1obo2_26{min-width:88px;color:var(--text-secondary);font-weight:600}._oldValue_1obo2_32{color:var(--error);text-decoration:line-through;opacity:.7}._arrow_1obo2_38{color:var(--text-muted);font-size:10px}._newValue_1obo2_43{color:var(--success);font-weight:500;word-break:break-all}._onlyValue_1obo2_49{color:var(--text-primary)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,
|
|
1
|
+
import{j as r,T as e}from"./index-FDX6EnZH.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
|
|
@@ -0,0 +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-FDX6EnZH.js";import{I as V}from"./InfoLabel-MCIgnb3Z.js";import{S as A}from"./StatusBadge-Dk0M7zQF.js";import{T as U}from"./TooltipText-CjH5N6RH.js";import{G as z}from"./GameChangeDetail-BFTVWFJO.js";import{u as O,f as X}from"./useLiveUptime-DExWULj9.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,
|
|
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-FDX6EnZH.js";import{D as E,T as U}from"./TierComparison-DsesL0R1.js";import{I as P}from"./InfoLabel-MCIgnb3Z.js";import{T as x}from"./TooltipText-CjH5N6RH.js";import{C as $}from"./ConfirmModal-CeEegyOx.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
|
|
@@ -8,4 +8,4 @@ This is a sample preview. Upgrade to Pro to save and review real automated playt
|
|
|
8
8
|
[sample] spawn protection active
|
|
9
9
|
[sample] hud countdown rendered
|
|
10
10
|
[sample] wave one completed
|
|
11
|
-
[sample] preview report finished`),contextId:"sample_playtest_preview",contextSummary:d}}}const V="_page_wjm6d_2",Y="_sampleBanner_wjm6d_9",z="_sampleBannerRow_wjm6d_21",G="_sampleBannerMain_wjm6d_28",Z="_sampleBadge_wjm6d_35",q="_sampleTitle_wjm6d_50",J="_sampleMessage_wjm6d_57",K="_sampleActions_wjm6d_64",Q="_primaryAction_wjm6d_72",X="_secondaryAction_wjm6d_73",ee="_card_wjm6d_109",te="_cardHeader_wjm6d_116",se="_clearButton_wjm6d_128",ae="_statusRow_wjm6d_143",oe="_statusIndicator_wjm6d_150",re="_statusRunning_wjm6d_158",ne="_statusPaused_wjm6d_163",le="_statusNotRunning_wjm6d_167",ie="_statusLabel_wjm6d_171",ce="_statusMeta_wjm6d_178",de="_controlButtons_wjm6d_184",me="_btn_wjm6d_191",pe="_btnPrimary_wjm6d_213",ue="_btnDanger_wjm6d_223",he="_historyList_wjm6d_233",ye="_historyItem_wjm6d_241",_e="_historyItemSelected_wjm6d_260",xe="_historyItemHeader_wjm6d_265",je="_historyIcon_wjm6d_271",we="_historyTimestamp_wjm6d_276",ge="_historyName_wjm6d_283",ve="_historyItemMeta_wjm6d_293",Se="_historyMode_wjm6d_302",fe="_historyDuration_wjm6d_306",be="_historyStatus_wjm6d_310",Ne="_status_passed_wjm6d_317",Ce="_status_failed_wjm6d_321",Le="_status_running_wjm6d_325",Ie="_historyError_wjm6d_329",Pe="_historyContext_wjm6d_339",Re="_historyContextLine_wjm6d_348",Be="_historyContextLabel_wjm6d_354",Te="_reportContainer_wjm6d_363",Me="_reportContextPanel_wjm6d_369",ke="_reportContextRow_wjm6d_379",Ae="_reportContextLabel_wjm6d_387",He="_reportSection_wjm6d_395",De="_reportSectionHeader_wjm6d_401",Ee="_reportMarkdown_wjm6d_413",Ue="_reportLogs_wjm6d_426",$e="_emptyState_wjm6d_441",Oe="_emptyStateTitle_wjm6d_448",Fe="_emptyStateMessage_wjm6d_456",We="_upgradePanel_wjm6d_465",Ve="_upgradePanelIcon_wjm6d_473",Ye="_upgradePanelTitle_wjm6d_478",ze="_upgradePanelDesc_wjm6d_486",Ge="_benefitList_wjm6d_496",Ze="_benefitItem_wjm6d_507",qe="_upgradeActions_wjm6d_522",s={page:V,sampleBanner:Y,sampleBannerRow:z,sampleBannerMain:G,sampleBadge:Z,sampleTitle:q,sampleMessage:J,sampleActions:K,primaryAction:Q,secondaryAction:X,card:ee,cardHeader:te,clearButton:se,statusRow:ae,statusIndicator:oe,statusRunning:re,statusPaused:ne,statusNotRunning:le,statusLabel:ie,statusMeta:ce,controlButtons:de,btn:me,btnPrimary:pe,btnDanger:ue,historyList:he,historyItem:ye,historyItemSelected:_e,historyItemHeader:xe,historyIcon:je,historyTimestamp:we,historyName:ge,historyItemMeta:ve,historyMode:Se,historyDuration:fe,historyStatus:be,status_passed:Ne,status_failed:Ce,status_running:Le,historyError:Ie,historyContext:Pe,historyContextLine:Re,historyContextLabel:Be,reportContainer:Te,reportContextPanel:Me,reportContextRow:ke,reportContextLabel:Ae,reportSection:He,reportSectionHeader:De,reportMarkdown:Ee,reportLogs:Ue,emptyState:$e,emptyStateTitle:Oe,emptyStateMessage:Fe,upgradePanel:We,upgradePanelIcon:Ve,upgradePanelTitle:Ye,upgradePanelDesc:ze,benefitList:Ge,benefitItem:Ze,upgradeActions:qe};function j(t){return t.trim().toLowerCase()}function Je(t){switch(j(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Ke(t,o){switch(j(o)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return o}}function Qe(t,o){switch(j(o)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function Xe(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function et({entries:t,onSelect:o,selectedTimestamp:d}){const{t:r}=S();return t.length===0?e.jsx("div",{className:s.emptyState,children:r("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(a=>{var m,l,c,p,u,y;const i=a.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${i?s.historyItemSelected:""}`,onClick:()=>o(a.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Je(a.status)}),e.jsx("span",{className:s.historyTimestamp,children:a.timestamp}),e.jsx("span",{className:s.historyName,children:a.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(x,{text:r("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[r("playtest.history.mode","Mode"),": ",Ke(r,a.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Xe(a.durationMs)}),e.jsx(x,{text:r("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${j(a.status)}`]??""}`,children:Qe(r,a.status)})})]}),a.errorMessage&&e.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((m=a.contextSummary)==null?void 0:m.testScenario)||((l=a.contextSummary)==null?void 0:l.expectedBehavior)||((c=a.contextSummary)==null?void 0:c.observedBehavior))&&e.jsxs("div",{className:s.historyContext,children:[a.contextId&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.contextId","Context ID")}),e.jsx("span",{children:a.contextId})]}),((p=a.contextSummary)==null?void 0:p.testScenario)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.why","Why this test ran")}),e.jsx("span",{children:a.contextSummary.testScenario})]}),((u=a.contextSummary)==null?void 0:u.expectedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.expected","Expected")}),e.jsx("span",{children:a.contextSummary.expectedBehavior})]}),((y=a.contextSummary)==null?void 0:y.observedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.observed","Observed")}),e.jsx("span",{children:a.contextSummary.observedBehavior})]})]})]},a.timestamp)})})}function tt({report:t}){var r,a,i,m,l,c;const{t:o}=S(),d=!!((r=t.contextSummary)!=null&&r.testScenario||(a=t.contextSummary)!=null&&a.expectedBehavior||(i=t.contextSummary)!=null&&i.observedBehavior);return e.jsxs("div",{className:s.reportContainer,children:[d&&e.jsxs("div",{className:s.reportContextPanel,children:[((m=t.contextSummary)==null?void 0:m.testScenario)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.why","Why this test ran")}),e.jsx("span",{children:t.contextSummary.testScenario})]}),((l=t.contextSummary)==null?void 0:l.expectedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.expected","Expected")}),e.jsx("span",{children:t.contextSummary.expectedBehavior})]}),((c=t.contextSummary)==null?void 0:c.observedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.observed","Observed")}),e.jsx("span",{children:t.contextSummary.observedBehavior})]})]}),t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(x,{text:o("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:o("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(x,{text:o("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:o("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:o("playtest.report.empty","No report content available")})]})}function nt(){var L;const{t}=S(),{tier:o,loading:d}=H(),r=!d&&o==="basic",a=F({enabled:!r}),{show:i}=A(),[m,l]=n.useState(null),[c,p]=n.useState(!1),[u,y]=n.useState(!1),[w,_]=n.useState(!1),{history:g,selectedReport:R,loading:B}=a,h=r?W(t):null,f=((L=h==null?void 0:h.history[0])==null?void 0:L.timestamp)??null,b=r?m??f:m,N=(h==null?void 0:h.history)??g,C=h&&b===f?h.report:R,T=r?!1:B,M=I=>{l(I),!r&&a.loadReport(I)},k=async()=>{y(!0);try{await a.clearHistory(),i(t("toast.clearSuccess","Cleared successfully"),"success"),p(!1),l(null)}catch{i(t("toast.clearFailed","Failed to clear data"),"error")}finally{y(!1)}};return e.jsxs("div",{className:s.page,children:[r&&e.jsxs("div",{className:s.sampleBanner,children:[e.jsxs("div",{className:s.sampleBannerRow,children:[e.jsxs("div",{className:s.sampleBannerMain,children:[e.jsx("div",{className:s.sampleBadge,children:t("playtest.sample.badge","Preview of the Pro playtest view")}),e.jsx("div",{className:s.sampleTitle,children:t("playtest.sample.title","You are previewing the report viewer that becomes available after upgrading to Pro.")}),e.jsx("div",{className:s.sampleMessage,children:t("playtest.sample.message","This preview uses sample data. Real playtest history management and stored reports unlock with Pro.")})]}),e.jsxs("div",{className:s.sampleActions,children:[e.jsx("button",{className:s.secondaryAction,onClick:()=>_(!0),children:t("tier.compare","Basic vs Pro")}),e.jsx("a",{className:s.primaryAction,href:D.playtest,target:"_blank",rel:"noreferrer",children:t("tier.upgrade","Upgrade to Pro")})]})]}),e.jsx(E,{variant:"centered"})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(P,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),r?e.jsx(x,{text:t("playtest.sample.clearDisabled","Upgrade to Pro to clear live playtest history."),children:e.jsx("span",{children:e.jsx("button",{className:s.clearButton,disabled:!0,children:t("common.clear","Clear")})})}):e.jsx("button",{className:s.clearButton,onClick:()=>p(!0),children:t("common.clear","Clear")})]}),T?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):N.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(x,{text:t("playtest.empty.runTest.tooltip","WEPPY Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(et,{entries:N,onSelect:M,selectedTimestamp:b??void 0})]}),C&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(P,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(tt,{report:C})]}),!r&&e.jsx($,{open:c,title:t("playtest.clear.title","Clear test history?"),message:t("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:u,onCancel:()=>!u&&p(!1),onConfirm:k}),w&&e.jsx(U,{onClose:()=>_(!1)})]})}export{nt as Component};
|
|
11
|
+
[sample] preview report finished`),contextId:"sample_playtest_preview",contextSummary:d}}}const V="_page_wjm6d_2",Y="_sampleBanner_wjm6d_9",z="_sampleBannerRow_wjm6d_21",G="_sampleBannerMain_wjm6d_28",Z="_sampleBadge_wjm6d_35",q="_sampleTitle_wjm6d_50",J="_sampleMessage_wjm6d_57",K="_sampleActions_wjm6d_64",Q="_primaryAction_wjm6d_72",X="_secondaryAction_wjm6d_73",ee="_card_wjm6d_109",te="_cardHeader_wjm6d_116",se="_clearButton_wjm6d_128",ae="_statusRow_wjm6d_143",oe="_statusIndicator_wjm6d_150",re="_statusRunning_wjm6d_158",ne="_statusPaused_wjm6d_163",le="_statusNotRunning_wjm6d_167",ie="_statusLabel_wjm6d_171",ce="_statusMeta_wjm6d_178",de="_controlButtons_wjm6d_184",me="_btn_wjm6d_191",pe="_btnPrimary_wjm6d_213",ue="_btnDanger_wjm6d_223",he="_historyList_wjm6d_233",ye="_historyItem_wjm6d_241",_e="_historyItemSelected_wjm6d_260",xe="_historyItemHeader_wjm6d_265",je="_historyIcon_wjm6d_271",we="_historyTimestamp_wjm6d_276",ge="_historyName_wjm6d_283",ve="_historyItemMeta_wjm6d_293",Se="_historyMode_wjm6d_302",fe="_historyDuration_wjm6d_306",be="_historyStatus_wjm6d_310",Ne="_status_passed_wjm6d_317",Ce="_status_failed_wjm6d_321",Le="_status_running_wjm6d_325",Ie="_historyError_wjm6d_329",Pe="_historyContext_wjm6d_339",Re="_historyContextLine_wjm6d_348",Be="_historyContextLabel_wjm6d_354",Te="_reportContainer_wjm6d_363",Me="_reportContextPanel_wjm6d_369",ke="_reportContextRow_wjm6d_379",Ae="_reportContextLabel_wjm6d_387",He="_reportSection_wjm6d_395",De="_reportSectionHeader_wjm6d_401",Ee="_reportMarkdown_wjm6d_413",Ue="_reportLogs_wjm6d_426",$e="_emptyState_wjm6d_441",Oe="_emptyStateTitle_wjm6d_448",Fe="_emptyStateMessage_wjm6d_456",We="_upgradePanel_wjm6d_465",Ve="_upgradePanelIcon_wjm6d_473",Ye="_upgradePanelTitle_wjm6d_478",ze="_upgradePanelDesc_wjm6d_486",Ge="_benefitList_wjm6d_496",Ze="_benefitItem_wjm6d_507",qe="_upgradeActions_wjm6d_522",s={page:V,sampleBanner:Y,sampleBannerRow:z,sampleBannerMain:G,sampleBadge:Z,sampleTitle:q,sampleMessage:J,sampleActions:K,primaryAction:Q,secondaryAction:X,card:ee,cardHeader:te,clearButton:se,statusRow:ae,statusIndicator:oe,statusRunning:re,statusPaused:ne,statusNotRunning:le,statusLabel:ie,statusMeta:ce,controlButtons:de,btn:me,btnPrimary:pe,btnDanger:ue,historyList:he,historyItem:ye,historyItemSelected:_e,historyItemHeader:xe,historyIcon:je,historyTimestamp:we,historyName:ge,historyItemMeta:ve,historyMode:Se,historyDuration:fe,historyStatus:be,status_passed:Ne,status_failed:Ce,status_running:Le,historyError:Ie,historyContext:Pe,historyContextLine:Re,historyContextLabel:Be,reportContainer:Te,reportContextPanel:Me,reportContextRow:ke,reportContextLabel:Ae,reportSection:He,reportSectionHeader:De,reportMarkdown:Ee,reportLogs:Ue,emptyState:$e,emptyStateTitle:Oe,emptyStateMessage:Fe,upgradePanel:We,upgradePanelIcon:Ve,upgradePanelTitle:Ye,upgradePanelDesc:ze,benefitList:Ge,benefitItem:Ze,upgradeActions:qe};function j(t){return t.trim().toLowerCase()}function Je(t){switch(j(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Ke(t,o){switch(j(o)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return o}}function Qe(t,o){switch(j(o)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function Xe(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function et({entries:t,onSelect:o,selectedTimestamp:d}){const{t:r}=S();return t.length===0?e.jsx("div",{className:s.emptyState,children:r("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(a=>{var m,l,c,p,u,y;const i=a.timestamp===d;return e.jsxs("button",{className:`${s.historyItem} ${i?s.historyItemSelected:""}`,onClick:()=>o(a.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Je(a.status)}),e.jsx("span",{className:s.historyTimestamp,children:a.timestamp}),e.jsx("span",{className:s.historyName,children:a.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(x,{text:r("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[r("playtest.history.mode","Mode"),": ",Ke(r,a.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Xe(a.durationMs)}),e.jsx(x,{text:r("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${j(a.status)}`]??""}`,children:Qe(r,a.status)})})]}),a.errorMessage&&e.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((m=a.contextSummary)==null?void 0:m.testScenario)||((l=a.contextSummary)==null?void 0:l.expectedBehavior)||((c=a.contextSummary)==null?void 0:c.observedBehavior))&&e.jsxs("div",{className:s.historyContext,children:[a.contextId&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.contextId","Context ID")}),e.jsx("span",{children:a.contextId})]}),((p=a.contextSummary)==null?void 0:p.testScenario)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.why","Why this test ran")}),e.jsx("span",{children:a.contextSummary.testScenario})]}),((u=a.contextSummary)==null?void 0:u.expectedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.expected","Expected")}),e.jsx("span",{children:a.contextSummary.expectedBehavior})]}),((y=a.contextSummary)==null?void 0:y.observedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:r("playtest.context.observed","Observed")}),e.jsx("span",{children:a.contextSummary.observedBehavior})]})]})]},a.timestamp)})})}function tt({report:t}){var r,a,i,m,l,c;const{t:o}=S(),d=!!((r=t.contextSummary)!=null&&r.testScenario||(a=t.contextSummary)!=null&&a.expectedBehavior||(i=t.contextSummary)!=null&&i.observedBehavior);return e.jsxs("div",{className:s.reportContainer,children:[d&&e.jsxs("div",{className:s.reportContextPanel,children:[((m=t.contextSummary)==null?void 0:m.testScenario)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.why","Why this test ran")}),e.jsx("span",{children:t.contextSummary.testScenario})]}),((l=t.contextSummary)==null?void 0:l.expectedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.expected","Expected")}),e.jsx("span",{children:t.contextSummary.expectedBehavior})]}),((c=t.contextSummary)==null?void 0:c.observedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:o("playtest.context.observed","Observed")}),e.jsx("span",{children:t.contextSummary.observedBehavior})]})]}),t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(x,{text:o("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:o("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(x,{text:o("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:o("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:o("playtest.report.empty","No report content available")})]})}function lt(){var L;const{t}=S(),{tier:o,loading:d}=A(),r=!d&&o==="basic",a=F({enabled:!r}),{show:i}=H(),[m,l]=n.useState(null),[c,p]=n.useState(!1),[u,y]=n.useState(!1),[w,_]=n.useState(!1),{history:g,selectedReport:R,loading:B}=a,h=r?W(t):null,f=((L=h==null?void 0:h.history[0])==null?void 0:L.timestamp)??null,b=r?m??f:m,N=(h==null?void 0:h.history)??g,C=h&&b===f?h.report:R,T=r?!1:B,M=I=>{l(I),!r&&a.loadReport(I)},k=async()=>{y(!0);try{await a.clearHistory(),i(t("toast.clearSuccess","Cleared successfully"),"success"),p(!1),l(null)}catch{i(t("toast.clearFailed","Failed to clear data"),"error")}finally{y(!1)}};return e.jsxs("div",{className:s.page,children:[r&&e.jsxs("div",{className:s.sampleBanner,children:[e.jsxs("div",{className:s.sampleBannerRow,children:[e.jsxs("div",{className:s.sampleBannerMain,children:[e.jsx("div",{className:s.sampleBadge,children:t("playtest.sample.badge","Preview of the Pro playtest view")}),e.jsx("div",{className:s.sampleTitle,children:t("playtest.sample.title","You are previewing the report viewer that becomes available after upgrading to Pro.")}),e.jsx("div",{className:s.sampleMessage,children:t("playtest.sample.message","This preview uses sample data. Real playtest history management and stored reports unlock with Pro.")})]}),e.jsxs("div",{className:s.sampleActions,children:[e.jsx("button",{className:s.secondaryAction,onClick:()=>_(!0),children:t("tier.compare","Basic vs Pro")}),e.jsx("a",{className:s.primaryAction,href:D.playtest,target:"_blank",rel:"noreferrer",children:t("tier.upgrade","Upgrade to Pro")})]})]}),e.jsx(E,{variant:"centered"})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(P,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),r?e.jsx(x,{text:t("playtest.sample.clearDisabled","Upgrade to Pro to clear live playtest history."),children:e.jsx("span",{children:e.jsx("button",{className:s.clearButton,disabled:!0,children:t("common.clear","Clear")})})}):e.jsx("button",{className:s.clearButton,onClick:()=>p(!0),children:t("common.clear","Clear")})]}),T?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):N.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(x,{text:t("playtest.empty.runTest.tooltip","WEPPY Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(et,{entries:N,onSelect:M,selectedTimestamp:b??void 0})]}),C&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(P,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(tt,{report:C})]}),!r&&e.jsx($,{open:c,title:t("playtest.clear.title","Clear test history?"),message:t("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:u,onCancel:()=>!u&&p(!1),onConfirm:k}),w&&e.jsx(U,{onClose:()=>_(!1)})]})}export{lt as Component};
|
|
@@ -0,0 +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-FDX6EnZH.js";import{I as c}from"./InfoLabel-MCIgnb3Z.js";import{T as x}from"./TooltipText-CjH5N6RH.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-
|
|
1
|
+
import{u as o,j as s}from"./index-FDX6EnZH.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._progressPromoWrap_t6ypv_1{display:flex;flex-direction:column;gap:8px}._progressPromo_t6ypv_1{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 20px;display:flex;align-items:center;gap:16px}._progressMain_t6ypv_17{flex:1;min-width:0}._progressLabel_t6ypv_22{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);margin-bottom:6px;display:flex;justify-content:space-between;gap:12px}._progressBar_t6ypv_32{height:6px;background:var(--bg-secondary);border-radius:3px;overflow:hidden}._progressFill_t6ypv_39{height:100%;background:var(--pro-badge);border-radius:3px;transition:width var(--transition)}._progressTextGroup_t6ypv_46{display:flex;flex-direction:column;gap:3px}._progressText_t6ypv_46{font-family:var(--font-label);font-size:13px;color:var(--pro-badge);white-space:nowrap;font-weight:500}._discountHint_t6ypv_60{font-size:11px;color:var(--text-muted);white-space:nowrap}._actions_t6ypv_66{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._btn_t6ypv_74{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._btn_t6ypv_74:hover{border-color:var(--accent);background:var(--accent-dim)}._btnOutline_t6ypv_95{border-color:var(--pro-badge);color:var(--pro-badge)}._btnOutline_t6ypv_95:hover{background:var(--pro-bg-soft);border-color:var(--pro-badge)}._btnPrimary_t6ypv_105{background:var(--pro-badge);color:#1a1407;border-color:var(--pro-badge)}._btnPrimary_t6ypv_105:hover{opacity:.9}._panel_t6ypv_115{background:linear-gradient(180deg,var(--pro-bg-soft),transparent 60%),var(--bg-secondary);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 20px}._panelIcon_t6ypv_122{font-size:32px;margin-bottom:12px;text-align:center}._panelTitle_t6ypv_128{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--pro-text);margin-bottom:8px;text-align:center}._panelDesc_t6ypv_137{font-size:13px;color:var(--text-secondary);margin-bottom:16px;line-height:1.5;text-align:center}._benefitList_t6ypv_145{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:4px}._benefitItem_t6ypv_154{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_t6ypv_154:before{content:"+";position:absolute;left:0;color:var(--pro-badge);font-weight:600}._panelDiscountHint_t6ypv_169{font-size:11px;color:var(--text-muted);text-align:center;margin-bottom:12px}@media(max-width:720px){._progressPromo_t6ypv_1{flex-direction:column;align-items:stretch}._progressText_t6ypv_46,._discountHint_t6ypv_60{white-space:normal}._actions_t6ypv_66{justify-content:stretch}._btn_t6ypv_74{width:100%}}._page_1warw_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_1warw_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_1warw_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_1warw_29{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._statusRow_1warw_39{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_1warw_46{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_1warw_52{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_1warw_52 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_1warw_52 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._table_1warw_71{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_1warw_71 th{text-align:left;padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-weight:500;font-size:11px}._table_1warw_71 td{padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-primary)}._table_1warw_71 tr:last-child td{border-bottom:none}._directionRail_1warw_99{display:inline-flex;align-items:center;gap:10px}._endpointLabel_1warw_105{color:var(--text-secondary)}._optionRail_1warw_109{display:inline-flex;align-items:center;gap:6px}._directionOption_1warw_115{display:inline-flex;align-items:center;justify-content:center;width:28px;height:24px;border-radius:6px;border:1px solid var(--border);font-family:var(--font-code);font-size:13px;cursor:help;-webkit-user-select:none;user-select:none}._directionOptionActive_1warw_129{background:var(--bg-secondary)}._directionOptionInactive_1warw_133{background:transparent;opacity:.45;color:var(--text-muted)}._directionOptionActive_1warw_129._direction_forward_1warw_139{color:var(--success)}._directionOptionActive_1warw_129._direction_bidirectional_1warw_143{color:var(--accent)}._directionOptionActive_1warw_129._direction_reverse_1warw_147{color:var(--warning)}._lockBadge_1warw_152{display:inline-block;margin-left:6px;font-size:11px;color:var(--text-muted)}._proBadge_1warw_160{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:#1a1407;background:var(--pro-badge);border-radius:3px;vertical-align:middle}._forwardBadge_1warw_174{display:inline-block;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px}._logContainer_1warw_187{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_1warw_194{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_1warw_194:last-child{border-bottom:none}._logTime_1warw_206{color:var(--text-muted);flex-shrink:0;width:44px}._logType_1warw_212{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_1warw_221{color:var(--success)}._logTypeUpdate_1warw_225{color:var(--accent)}._logTypeDelete_1warw_229{color:var(--error)}._logTypeIdle_1warw_233{color:var(--text-muted)}._logPath_1warw_237{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_1warw_244{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_1warw_251{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_1warw_261{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_1warw_268{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_1warw_274{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_1warw_284{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_1warw_284:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_1warw_300{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_1warw_307{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_1warw_315{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_1warw_324{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1warw_324:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_1warw_339{display:flex;gap:8px}._btn_1warw_344{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_1warw_344:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_1warw_361{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_1warw_361:hover{opacity:.9}._disabled_1warw_372{opacity:.4;pointer-events:none}
|
|
@@ -0,0 +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-FDX6EnZH.js";import{I as h}from"./InfoLabel-MCIgnb3Z.js";import{T as x}from"./TooltipText-CjH5N6RH.js";import{C as E}from"./ConfirmModal-CeEegyOx.js";import{S as B}from"./StatusBadge-Dk0M7zQF.js";import{D as H,T as M}from"./TierComparison-DsesL0R1.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
|
+
`);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
|
+
`);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
|
+
`);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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as o,o as l,j as e}from"./index-FDX6EnZH.js";const _=[{name:"query_instances",description:"Query Roblox instances: get, children, find child/descendant, wait for child, class info, search by name/class. [PRO] file_tree, project_structure, descendants, ancestors, search by property/tag.",basic:["get","children","find_child","find_descendant","wait_for_child","class_info","search_name","search_class"],pro:["search_property","search_tag","file_tree","project_structure","descendants","ancestors"]},{name:"mutate_instances",description:"Create, delete, clone, move, rename, or pivot instances. [PRO] create_tree, mass_create, mass_delete, mass_duplicate, smart_duplicate.",basic:["create","create_with_props","delete","clone","move","rename","pivot"],pro:["create_tree","mass_create","mass_delete","mass_duplicate","smart_duplicate"]},{name:"manage_properties",description:"Get/set properties, attributes, and tags on instances. [PRO] set_calculated, set_relative, mass_set, mass_get, modify_children.",basic:["get","set","get_all","set_multiple","get_attr","set_attr","get_all_attrs","delete_attr","add_tag","remove_tag","check_tag","get_tags","get_tagged"],pro:["set_calculated","set_relative","mass_set","mass_get","modify_children"]},{name:"manage_scripts",description:"Manage script source code: read, write, create, delete, edit lines, search. [PRO] replace across scripts.",basic:["get_source","set_source","create","delete","edit_replace","edit_insert","edit_delete","search","get_dependencies"],pro:["replace"]},{name:"manage_lighting",description:"[PRO] Configure environment: lighting, atmosphere, sky, terrain properties, time of day.",basic:[],pro:["lighting","atmosphere","sky","terrain_props","time"]},{name:"manage_selection",description:"Get, set, or clear selection. [PRO] context, details, add/remove items, watch changes.",basic:["get","set","clear","cached"],pro:["context","details","add","remove","watch"]},{name:"manage_camera",description:"Camera operations: get info, focus on instance/position, suggest view, capture Edit-mode viewport screenshot (Edit mode only; not usable during playtest).",basic:["info","focus_path","focus_position","suggest"],pro:["screenshot"]},{name:"manage_tween",description:"[PRO] Tween service: create, play, pause, cancel tweens for smooth animations.",basic:[],pro:["create","play","pause","cancel"]},{name:"manage_audio",description:"[PRO] Audio management: play, stop, pause, resume sounds. Set audio listener.",basic:[],pro:["play","stop","pause","resume","set_listener"]},{name:"manage_animation",description:"[PRO] Animation: load, play, stop animations. Get animation tracks from humanoid/controller.",basic:[],pro:["load","play","stop","get_tracks"]},{name:"manage_physics",description:"[PRO] Physics collision groups: register, set collidable between groups, list groups.",basic:[],pro:["register_group","set_collidable","get_groups"]},{name:"manage_effects",description:"[PRO] Particle effects: emit particles, clear all particles, toggle effect enabled state.",basic:[],pro:["emit","clear","toggle"]},{name:"manage_terrain",description:"[PRO] Terrain operations: fill shapes, clear regions, replace materials, manage colors, read/write voxels, generate procedural terrain, smooth terrain.",basic:[],pro:["fill_block","fill_ball","fill_cylinder","fill_wedge","clear_region","clear_bounds","replace_material","colors_get","colors_set","read_voxel","read_voxels","write_voxels","generate","smooth"]},{name:"spatial_query",description:"[PRO] Spatial queries: raycast, find ground, check placement, multi-raycast, scan area, find flat areas, find spawn positions, analyze walkable, spatial map, find empty space, get bounds, snap to grid, check collision.",basic:[],pro:["raycast","find_ground","check_placement","multi_raycast","scan_area","find_flat","find_spawn","analyze_walkable","spatial_map","find_space","bounds","snap_grid","collision"]},{name:"manage_assets",description:"[PRO] Asset management: insert models by ID, get asset info, search creator store, insert free models/packages, export selection.",basic:[],pro:["insert","info","search","search_insert","insert_free","insert_package","export"]},{name:"manage_sync",description:"[PRO] Project sync management: status, history, direction settings, read/write synced files.",basic:[],pro:["status_current_place","history","directions","read_file","write_file","progress"]},{name:"workspace_state",description:"[PRO] Workspace state: full sync, snapshot, recent changes, viewport info, clear history, metadata, scripts, selection info, clear cache.",basic:[],pro:["sync","snapshot","changes","viewport","clear_history","metadata","scripts","selection_info","clear_cache"]},{name:"manage_logs",description:"Output logs: get filtered logs, poll incrementally with sinceSeq cursor, clear buffer, get recent errors.",basic:["get","clear","errors"],pro:[]},{name:"system_info",description:"System info: ping, connection status, usage tier. [PRO] place info, services list, studio settings, playtest control, automated test runner.",basic:["ping","connection","usage"],pro:["place_info","services","studio_settings","play","stop","pause","resume","play_status","run_test"]},{name:"batch_execute",description:'[PRO] Execute multiple commands in a single batch. Each command is an object with "tool" name and "args". Commands execute sequentially; optionally continue on error.',basic:[],pro:["batch_execute"]},{name:"execute_luau",description:"[PRO] Execute arbitrary Luau code in Roblox Studio sandbox. Blocked services: HttpService, DataStoreService, MessagingService. Cannot access CoreGui/CorePackages.",basic:[],pro:["execute_luau"]}],u={proOnlyTools:13,mixedTools:7,totalBasicActions:51,totalProActions:107},g={tools:_,summary:u},y="_tag_1wj0q_2",h="_label_1wj0q_17",b="_code_1wj0q_22",x="_expiry_1wj0q_31",f="_inline_1wj0q_49",j="_centered_1wj0q_54",i={tag:y,label:h,code:b,expiry:x,inline:f,centered:j};function v({variant:c}){const{t:s}=o();return l()?e.jsxs("div",{className:`${i.tag} ${c==="centered"?i.centered:i.inline}`,children:[e.jsx("span",{className:i.label,children:s("tier.promo.discount.context","🎁 Gumroad 결제 시 할인코드 입력:")}),e.jsx("span",{className:i.code,children:s("tier.comparison.discount.code","WEPPY-MCP")}),e.jsx("span",{className:i.expiry,children:s("tier.comparison.discount.expiry","Valid until April 30")})]}):null}const k="_overlay_171mk_2",P="_modal_171mk_13",w="_summaryGrid_171mk_32",N="_summaryCard_171mk_39",C="_basicCard_171mk_45",R="_proCard_171mk_49",T="_cardTitle_171mk_54",O="_summarySection_171mk_70",S="_sectionTitle_171mk_78",B="_featureList_171mk_90",L="_summary_171mk_32",A="_statBasic_171mk_116",q="_statPro_171mk_120",M="_statMixed_171mk_124",E="_detailHeader_171mk_128",G="_tableWrap_171mk_137",$="_table_171mk_137",D="_toolName_171mk_165",W="_description_171mk_171",H="_actionList_171mk_176",z="_none_171mk_184",I="_discountBanner_171mk_189",F="_closeBtn_171mk_227",t={overlay:k,modal:P,summaryGrid:w,summaryCard:N,basicCard:C,proCard:R,cardTitle:T,summarySection:O,sectionTitle:S,featureList:B,summary:L,statBasic:A,statPro:q,statMixed:M,detailHeader:E,tableWrap:G,table:$,toolName:D,description:W,actionList:H,none:z,discountBanner:I,closeBtn:F};function V({onClose:c}){const{t:s}=o(),{tools:m,summary:n}=g,d=[{title:s("tier.comparison.basic.core","Core MCP workflow"),items:[s("tier.comparison.basic.core.item1","Script create/edit"),s("tier.comparison.basic.core.item2","Instance management"),s("tier.comparison.basic.core.item3","Property control"),s("tier.comparison.basic.core.item4","Selection and search"),s("tier.comparison.basic.core.item5","Tag management"),s("tier.comparison.basic.core.item6","Camera control"),s("tier.comparison.basic.core.item7","Log monitoring")]},{title:s("tier.comparison.basic.sync","Sync (Basic)"),items:[s("tier.comparison.basic.sync.item1","Studio to Local one-way sync"),s("tier.comparison.basic.sync.item2","Manual apply as default")]}],p=[{title:s("tier.comparison.pro.all","Everything in Basic, plus"),items:[]},{title:s("tier.comparison.pro.sync","Advanced Sync workflow"),items:[s("tier.comparison.pro.sync.item1","Per-type sync direction"),s("tier.comparison.pro.sync.item2","Per-type apply mode"),s("tier.comparison.pro.sync.item3","Bidirectional and reverse sync"),s("tier.comparison.pro.sync.item4","Full sync, resync, and push to Studio"),s("tier.comparison.pro.sync.item5","Multi-place sync")]},{title:s("tier.comparison.pro.playtest","Playtest control"),items:[s("tier.comparison.pro.playtest.item1","Play, stop, pause, and resume"),s("tier.comparison.pro.playtest.item2","Playtest state inspection"),s("tier.comparison.pro.playtest.item3","Automated test execution")]},{title:s("tier.comparison.pro.creation","Advanced creation workflow"),items:[s("tier.comparison.pro.creation.item1","Bulk operations"),s("tier.comparison.pro.creation.item2","Terrain generation"),s("tier.comparison.pro.creation.item3","Asset search and insert"),s("tier.comparison.pro.creation.item4","Raycast and spatial analysis"),s("tier.comparison.pro.creation.item5","Environment control")]}];return e.jsx("div",{className:t.overlay,onClick:c,children:e.jsxs("div",{className:t.modal,onClick:a=>a.stopPropagation(),children:[l()&&e.jsx("div",{className:t.discountBanner,children:e.jsx(v,{variant:"centered"})}),e.jsx("h2",{children:s("tier.compare")}),e.jsxs("div",{className:t.summaryGrid,children:[e.jsxs("section",{className:`${t.summaryCard} ${t.basicCard}`,children:[e.jsx("h3",{className:t.cardTitle,children:s("tier.basic")}),d.map(a=>e.jsxs("div",{className:t.summarySection,children:[e.jsx("div",{className:t.sectionTitle,children:a.title}),e.jsx("ul",{className:t.featureList,children:a.items.map(r=>e.jsx("li",{children:r},r))})]},a.title))]}),e.jsxs("section",{className:`${t.summaryCard} ${t.proCard}`,children:[e.jsx("h3",{className:t.cardTitle,children:s("tier.pro")}),p.map(a=>e.jsxs("div",{className:t.summarySection,children:[e.jsx("div",{className:t.sectionTitle,children:a.title}),a.items.length>0&&e.jsx("ul",{className:t.featureList,children:a.items.map(r=>e.jsx("li",{children:r},r))})]},a.title))]})]}),e.jsxs("div",{className:t.summary,children:[e.jsxs("span",{className:t.statBasic,children:["Basic: ",n.totalBasicActions," actions"]}),e.jsxs("span",{className:t.statPro,children:["Pro: ",n.totalProActions," actions"]}),e.jsxs("span",{className:t.statMixed,children:[n.mixedTools," mixed / ",n.proOnlyTools," pro-only"]})]}),e.jsx("div",{className:t.detailHeader,children:s("tier.comparison.detailTitle","Detailed Tool Catalog")}),e.jsx("div",{className:t.tableWrap,children:e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("tools.col.tool")}),e.jsx("th",{children:s("tier.comparison.description","Description")}),e.jsx("th",{children:s("tier.basic")}),e.jsx("th",{children:s("tier.pro")})]})}),e.jsx("tbody",{children:m.map(a=>e.jsxs("tr",{children:[e.jsx("td",{className:t.toolName,children:a.name}),e.jsx("td",{className:t.description,children:s(`tier.tool.${a.name}.desc`,a.description)}),e.jsx("td",{className:t.actionList,children:a.basic.length>0?a.basic.join(", "):e.jsx("span",{className:t.none,children:"—"})}),e.jsx("td",{className:t.actionList,children:a.pro.length>0?a.pro.join(", "):e.jsx("span",{className:t.none,children:"—"})})]},a.name))})]})}),e.jsx("button",{className:t.closeBtn,onClick:c,children:s("tier.comparison.close","Close")})]})})}export{v as D,V as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r,a as q,D as Y,u as tt,k as et}from"./index-FDX6EnZH.js";import{T as M}from"./TooltipText-CjH5N6RH.js";import{C as st}from"./ConfirmModal-CeEegyOx.js";const at="_wrapper_hzgda_2",ot="_table_hzgda_7",lt="_sortable_hzgda_32",rt="_sortArrow_hzgda_41",it="_clickable_hzgda_52",nt="_empty_hzgda_57",ct="_expandedRow_hzgda_65",dt="_expandedCell_hzgda_74",S={wrapper:at,table:ot,sortable:lt,sortArrow:rt,clickable:it,empty:nt,expandedRow:ct,expandedCell:dt};function ut({columns:e,data:a,sortBy:m,sortDir:C="asc",onSort:E,onRowClick:j,rowKey:L,emptyMessage:A,expandedKey:P,renderExpandedRow:b}){return s.jsx("div",{className:S.wrapper,children:s.jsxs("table",{className:S.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(c=>s.jsxs("th",{style:c.width?{width:c.width}:void 0,className:c.sortable?S.sortable:void 0,onClick:c.sortable&&E?()=>E(c.key):void 0,children:[s.jsx("span",{children:c.label}),c.sortable&&m===c.key&&s.jsx("span",{className:S.sortArrow,children:C==="asc"?"▴":"▾"})]},c.key))})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:S.empty,children:A||"No data"})}):a.map((c,N)=>{const p=L?L(c):String(N),h=P!=null&&p===P&&b?b(c):null;return s.jsxs(r.Fragment,{children:[s.jsx("tr",{className:j?S.clickable:void 0,onClick:j?()=>j(c):void 0,children:e.map(_=>s.jsx("td",{children:_.render?_.render(c):String(c[_.key]??"")},_.key))}),h&&s.jsx("tr",{className:S.expandedRow,children:s.jsx("td",{colSpan:e.length,className:S.expandedCell,children:h})})]},p)})})]})})}function pt(e){return{...e,sequenceNumber:typeof e.sequenceNumber=="number"?e.sequenceNumber:void 0,executionTimeMs:typeof e.executionTimeMs=="number"?e.executionTimeMs:void 0}}const ht=50;function mt(){const[e,a]=r.useState(null),[m,C]=r.useState(!0),[E,j]=r.useState([]),[L,A]=r.useState(0),[P,b]=r.useState(!1),[c,N]=r.useState(!0),[p,v]=r.useState(0),[h,_]=r.useState(""),F=r.useRef(null),f=r.useCallback(async()=>{C(!0);try{const g=await q.get("/api/dashboard/tool-stats");a(g)}catch{}finally{C(!1)}},[]),y=r.useCallback(async(g,B)=>{N(!0);try{const w={limit:String(ht),offset:String(g)};B&&(w.tool=B);const R=await q.get("/api/dashboard/history",w);j(R.entries.map(pt)),A(R.total),b(R.hasMore)}catch{j([]),A(0),b(!1)}finally{N(!1)}},[]),O=r.useCallback(()=>{f(),y(p,h)},[y,f,p,h]),d=r.useCallback(async()=>{await q.post("/api/dashboard/tools/history/clear"),y(p,h)},[y,p,h]),$=r.useCallback(async()=>{await q.post("/api/dashboard/tools/statistics/clear"),f()},[f]);return r.useEffect(()=>{f()},[f]),r.useEffect(()=>{y(p,h)},[y,p,h]),r.useEffect(()=>{const g=new Y;F.current=g,g.connect();const B=g.on("command",()=>{f(),y(p,h)});return()=>{B(),g.disconnect(),F.current=null}},[y,f,p,h]),{statistics:e,statsLoading:m,history:E,historyTotal:L,historyHasMore:P,historyLoading:c,historyOffset:p,historyToolFilter:h,setHistoryOffset:v,setHistoryToolFilter:_,refresh:O,clearHistory:d,clearStatistics:$}}const xt="_page_1wyl0_2",bt="_tabs_1wyl0_10",_t="_tab_1wyl0_10",ft="_tabActive_1wyl0_34",yt="_card_1wyl0_40",gt="_cardToolbar_1wyl0_47",wt="_sectionTitle_1wyl0_55",Ct="_dangerButton_1wyl0_61",jt="_proBadge_1wyl0_71",kt="_statusOk_1wyl0_85",St="_statusFallback_1wyl0_94",Tt="_statusUnsupported_1wyl0_103",Nt="_statusError_1wyl0_112",vt="_tierBasic_1wyl0_122",Bt="_tierPro_1wyl0_126",Mt="_tierMixed_1wyl0_131",Et="_filterRow_1wyl0_142",Lt="_filterLabel_1wyl0_149",At="_filterSelect_1wyl0_158",Pt="_expandedRow_1wyl0_169",Rt="_expandedSection_1wyl0_174",Ht="_detailList_1wyl0_184",Ft="_detailItem_1wyl0_190",Ot="_detailLabel_1wyl0_196",$t="_detailValue_1wyl0_201",It="_pre_1wyl0_206",Dt="_pagination_1wyl0_223",qt="_pageInfo_1wyl0_231",zt="_btn_1wyl0_237",Wt="_tierDistribution_1wyl0_260",Ut="_tierBarWrap_1wyl0_264",Kt="_tierBarBasic_1wyl0_272",Vt="_tierBarPro_1wyl0_277",Gt="_tierLabels_1wyl0_282",Jt="_statsTableWrap_1wyl0_291",Zt="_statsTable_1wyl0_291",Qt="_sortableHeader_1wyl0_322",Xt="_sortArrow_1wyl0_327",Yt="_statsToolRow_1wyl0_331",te="_statsActionRow_1wyl0_339",ee="_expandButton_1wyl0_343",se="_expandIcon_1wyl0_355",ae="_actionLabel_1wyl0_360",oe="_emptyStats_1wyl0_367",le="_summaryLine_1wyl0_373",o={page:xt,tabs:bt,tab:_t,tabActive:ft,card:yt,cardToolbar:gt,sectionTitle:wt,dangerButton:Ct,proBadge:jt,statusOk:kt,statusFallback:St,statusUnsupported:Tt,statusError:Nt,tierBasic:vt,tierPro:Bt,tierMixed:Mt,filterRow:Et,filterLabel:Lt,filterSelect:At,expandedRow:Pt,expandedSection:Rt,detailList:Ht,detailItem:Ft,detailLabel:Ot,detailValue:$t,pre:It,pagination:Dt,pageInfo:qt,btn:zt,tierDistribution:Wt,tierBarWrap:Ut,tierBarBasic:Kt,tierBarPro:Vt,tierLabels:Gt,statsTableWrap:Jt,statsTable:Zt,sortableHeader:Qt,sortArrow:Xt,statsToolRow:Yt,statsActionRow:te,expandButton:ee,expandIcon:se,actionLabel:ae,emptyStats:oe,summaryLine:le},W=50;function re(e){const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function z(e){return typeof e!="number"||!Number.isFinite(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function H(e,a){return a==="pro"?e("tier.pro","Pro"):a==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function G(e,a){return a!==e&&a.startsWith(`${e}_`)?a.slice(e.length+1):""}function ie(e,a){const m=G(e,a);return m?`${e}.${m}`:e}function V(e){return typeof e=="string"&&e.length>0?e:void 0}function ne(e){if(!Array.isArray(e))return;const a=e.filter(m=>typeof m=="string"&&m.length>0);return a.length>0?a:void 0}function ce(e){const a=e.result??{};return{requestedCommand:e.requestedCommand??V(a.requestedCommand),executedCommand:e.executedCommand??V(a.executedCommand),alternatives:e.alternatives??ne(a.alternatives)}}function de(e,a){switch(e.status){case"fallback":return{label:a("tools.badge.fallback","FALLBACK"),tooltip:a("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:a("tools.badge.unsupported","UNSUPPORTED"),tooltip:a("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"error":return{label:a("tools.badge.err","FAILED"),tooltip:a("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:a("tools.status.ok","OK"),tooltip:a("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function T(e,a){return s.jsxs("div",{className:o.detailItem,children:[s.jsx("span",{className:o.detailLabel,children:e}),s.jsx("span",{className:o.detailValue,children:a})]})}function xe(){const{t:e}=tt(),a=mt(),{show:m}=et(),[C,E]=r.useState("history"),[j,L]=r.useState(null),[A,P]=r.useState(null),[b,c]=r.useState(null),[N,p]=r.useState(!1),[v,h]=r.useState("totalCalls"),[_,F]=r.useState("desc"),f=r.useCallback(t=>{h(l=>l===t?(F(i=>i==="asc"?"desc":"asc"),t):(F("desc"),t))},[]),y=r.useMemo(()=>{var l;const t=new Set;return Object.keys(((l=a.statistics)==null?void 0:l.tools)??{}).forEach(i=>t.add(i)),a.history.forEach(i=>{i.tool&&t.add(i.tool)}),a.historyToolFilter&&t.add(a.historyToolFilter),Array.from(t).sort()},[a.history,a.historyToolFilter,a.statistics]),O=r.useMemo(()=>{var t;return(t=a.statistics)!=null&&t.tools?Object.values(a.statistics.tools).map(l=>{var K;const i=Object.entries(l.commands??{}).map(([u,n])=>({toolName:l.tool,commandName:n.command??u,label:G(l.tool,n.command??u)||(n.command??u),tier:n.tier,totalCalls:n.totalCalls,successCount:n.successCount,fallbackCount:n.fallbackCount,unsupportedCount:n.unsupportedCount,failureCount:n.failureCount,totalExecutionTimeMs:n.totalExecutionTimeMs,avgExecutionTimeMs:n.avgExecutionTimeMs})),x=i.reduce((u,n)=>u+n.totalCalls,0),k=i.reduce((u,n)=>u+n.successCount,0),I=i.reduce((u,n)=>u+n.fallbackCount,0),D=i.reduce((u,n)=>u+n.unsupportedCount,0),Q=i.reduce((u,n)=>u+n.failureCount,0),U=i.reduce((u,n)=>u+n.totalExecutionTimeMs,0),X=new Set(i.map(u=>u.tier)).size>1?"mixed":((K=i[0])==null?void 0:K.tier)??l.tier;return{toolName:l.tool,tier:X,commands:i,totalCalls:x,successCount:k,fallbackCount:I,unsupportedCount:D,failureCount:Q,totalExecutionTimeMs:U,avgExecutionTimeMs:x>0?Math.round(U/x):0}}):[]},[a.statistics]),d=r.useCallback((t,l,i,x)=>s.jsx(M,{text:e(i,x),children:e(t,l)}),[e]),$=r.useMemo(()=>[...O].sort((l,i)=>{const x=l[v],k=i[v];if(typeof x=="number"&&typeof k=="number")return _==="asc"?x-k:k-x;const I=String(x??""),D=String(k??"");return _==="asc"?I.localeCompare(D):D.localeCompare(I)}),[O,v,_]),g=r.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>re(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>s.jsxs("span",{children:[ie(t.tool,t.command),t.tier==="pro"&&s.jsx(M,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:o.proBadge,children:e("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>z(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:t=>{const l=de(t,e);return s.jsx(M,{text:l.tooltip,children:s.jsx("span",{className:l.className,children:l.label})})}},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?o.tierPro:o.tierBasic,children:H(e,t.tier)})}],[e,d]),B=r.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:d("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:d("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:d("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"failureCount",label:d("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:t=>z(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:t=>s.jsx(M,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(e,t.tier)})})}],[e,d]),w=r.useMemo(()=>{if(!a.statistics)return null;const t=a.statistics.tierSummary.basic.totalCalls,l=a.statistics.tierSummary.pro.totalCalls,i=t+l;if(i===0)return null;const x=Math.round(t/i*100),k=100-x;return{basic:t,pro:l,basicPct:x,proPct:k}},[a.statistics]),R=r.useCallback(t=>{P(l=>l===t?null:t)},[]),J=r.useCallback(async()=>{if(b){p(!0);try{b==="history"?await a.clearHistory():await a.clearStatistics(),m(e("toast.clearSuccess","Cleared successfully"),"success"),c(null)}catch{m(e("toast.clearFailed","Failed to clear data"),"error")}finally{p(!1)}}},[b,m,e,a]),Z=r.useCallback(t=>{const l=ce(t);return s.jsxs("div",{className:o.expandedRow,children:[s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(t.result,null,2)})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="error")&&s.jsx("div",{className:o.expandedSection,children:s.jsxs("div",{className:o.detailList,children:[t.status==="fallback"&&(l==null?void 0:l.requestedCommand)&&T(e("tools.detail.requestedCommand","Requested Command"),l.requestedCommand),t.status==="fallback"&&(l==null?void 0:l.executedCommand)&&T(e("tools.detail.executedCommand","Executed Command"),l.executedCommand),t.status==="fallback"&&(l==null?void 0:l.alternatives)&&T(e("tools.detail.alternatives","Alternatives"),l.alternatives.join(", ")),t.status==="unsupported"&&t.blockedMessage&&T(e("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="unsupported"&&T(e("tools.detail.noFallback","No Fallback"),e("tools.detail.noFallback.value","No fallback ran.")),t.status==="error"&&t.errorMessage&&T(e("tools.detail.errorMessage","Error Message"),t.errorMessage),t.status==="error"&&t.blockedMessage&&T(e("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage),t.status==="error"&&t.fallbackCommand&&T(e("tools.detail.executedCommand","Executed Command"),t.fallbackCommand)]})})]})},[e]);return s.jsxs("div",{className:o.page,children:[s.jsx("div",{className:o.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${o.tab} ${C===t?o.tabActive:""}`,onClick:()=>E(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),C==="history"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:o.dangerButton,onClick:()=>c("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:o.filterRow,children:s.jsxs("label",{className:o.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:o.filterSelect,value:a.historyToolFilter,onChange:t=>{a.setHistoryToolFilter(t.target.value),a.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),y.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(ut,{columns:g,data:a.history,rowKey:t=>t.id,onRowClick:t=>L(l=>l===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries"),expandedKey:j,renderExpandedRow:Z}),s.jsxs("div",{className:o.pagination,children:[s.jsx("button",{className:o.btn,disabled:a.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>a.setHistoryOffset(Math.max(0,a.historyOffset-W)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:o.pageInfo,children:[a.historyOffset+1,"–",Math.min(a.historyOffset+W,a.historyTotal)," / ",a.historyTotal]}),s.jsx("button",{className:o.btn,disabled:!a.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>a.setHistoryOffset(a.historyOffset+W),children:e("tools.page.next","Next")})]})]}),C==="statistics"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:o.dangerButton,onClick:()=>c("statistics"),children:e("common.clear","Clear")})]}),w&&s.jsxs("div",{className:o.tierDistribution,children:[s.jsxs("div",{className:o.tierBarWrap,children:[s.jsx("div",{className:o.tierBarBasic,style:{width:`${w.basicPct}%`}}),s.jsx("div",{className:o.tierBarPro,style:{width:`${w.proPct}%`}})]}),s.jsxs("div",{className:o.tierLabels,children:[s.jsxs("span",{children:[H(e,"basic")," ",w.basicPct,"% (",w.basic,")"]}),s.jsxs("span",{children:[H(e,"pro")," ",w.proPct,"% (",w.pro,")"]})]})]}),s.jsx("div",{className:o.statsTableWrap,children:s.jsxs("table",{className:o.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:B.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?o.sortableHeader:void 0,onClick:t.sortable?()=>f(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&v===t.key&&s.jsx("span",{className:o.sortArrow,children:_==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:B.length,className:o.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const l=A===t.toolName;return s.jsxs(r.Fragment,{children:[s.jsxs("tr",{className:o.statsToolRow,onClick:()=>R(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":l,"aria-label":`${t.toolName} ${l?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),R(t.toolName)},children:[s.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:l?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:t.successCount}),s.jsx("td",{children:t.fallbackCount}),s.jsx("td",{children:t.unsupportedCount}),s.jsx("td",{children:t.failureCount}),s.jsx("td",{children:z(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(M,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?o.tierPro:t.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(e,t.tier)})})})]}),l&&t.commands.map(i=>s.jsxs("tr",{className:o.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:o.actionLabel,children:i.label})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:i.successCount}),s.jsx("td",{children:i.fallbackCount}),s.jsx("td",{children:i.unsupportedCount}),s.jsx("td",{children:i.failureCount}),s.jsx("td",{children:z(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?o.tierPro:o.tierBasic,children:H(e,i.tier)})})]},`${t.toolName}:${i.commandName}`))]},t.toolName)})})]})}),a.statistics&&s.jsxs("div",{className:o.summaryLine,children:[e("tools.summary.total","Total"),": ",a.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",a.statistics.totalSessions]})]}),s.jsx(st,{open:b!==null,title:b==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:b==="history"?e("tools.clear.history.message","This permanently removes the current place tools history."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:N,onCancel:()=>!N&&c(null),onConfirm:J})]})}export{xe as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,T as s}from"./index-FDX6EnZH.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
|