@weppy/roblox-mcp 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/CHANGELOG.md +10 -0
- package/COMMERCIAL-LICENSE.md +13 -0
- package/Dockerfile +13 -0
- package/LICENSE +648 -40
- package/README.md +31 -2
- package/TRADEMARKS.md +18 -0
- package/docs/assets/screenshots/license/license-dashboard.png +3 -0
- package/docs/assets/screenshots/license/license-plugin.png +3 -0
- package/docs/compatibility.md +1 -1
- package/docs/en/installation/README.md +25 -2
- package/docs/en/installation/ai-apps/cursor.md +77 -0
- package/docs/en/installation/roblox-explorer.md +5 -5
- package/docs/en/installation/roblox-plugin.md +1 -0
- package/docs/en/pro-upgrade.md +36 -12
- package/docs/es/README.md +29 -10
- package/docs/es/installation/README.md +25 -2
- package/docs/es/installation/ai-apps/cursor.md +77 -0
- package/docs/es/installation/roblox-plugin.md +1 -0
- package/docs/es/pro-upgrade.md +37 -13
- package/docs/id/README.md +29 -10
- package/docs/id/installation/README.md +25 -2
- package/docs/id/installation/ai-apps/cursor.md +77 -0
- package/docs/id/installation/roblox-plugin.md +1 -0
- package/docs/id/pro-upgrade.md +36 -12
- package/docs/ja/README.md +29 -10
- package/docs/ja/installation/README.md +25 -2
- package/docs/ja/installation/ai-apps/cursor.md +77 -0
- package/docs/ja/installation/roblox-plugin.md +1 -0
- package/docs/ja/pro-upgrade.md +35 -11
- package/docs/ko/README.md +28 -9
- package/docs/ko/installation/README.md +25 -2
- package/docs/ko/installation/ai-apps/cursor.md +77 -0
- package/docs/ko/installation/roblox-explorer.md +5 -5
- package/docs/ko/installation/roblox-plugin.md +1 -0
- package/docs/ko/pro-upgrade.md +35 -11
- package/docs/pt-br/README.md +29 -10
- package/docs/pt-br/installation/README.md +25 -2
- package/docs/pt-br/installation/ai-apps/cursor.md +77 -0
- package/docs/pt-br/installation/roblox-plugin.md +1 -0
- package/docs/pt-br/pro-upgrade.md +37 -13
- package/glama.json +7 -0
- package/install.ps1 +277 -0
- package/install.sh +307 -0
- package/llms-full.txt +92 -7
- package/llms.txt +13 -1
- package/package.json +14 -3
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-Ss9rBuou.js → ChangelogDetailPage-IgHLnaEX.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Br-A5H5t.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Dao4jPQA.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-CvXLNYq0.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-tvPLhSO9.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Bl7tLgL2.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CN3LYLAT.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-vz7vtbbV.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-BcSHb-KS.js → OverviewPage-BDDctbAl.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C0iCoAQp.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-LnuHE5FL.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-BGBA0lal.js → PropertyDiff-CbDafceC.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-CJs9ctOf.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DP9OFhNb.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-C_KxiYEt.js → StatusBadge-BMTgkxDJ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Bf1SdHGg.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BfXIBNVS.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoPanel-B2hY_Iul.js → TierPromoPanel-CUrTMsXB.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DBA-FZGE.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-BZZZ3FXe.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-O4dXhEU-.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-CkXvRg-O.js +69 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-BFJCz95t.js → tier-promo-config-B9lIKWCQ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-Gqoo4lJE.js → useLiveUptime-DXXyWm6j.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +58 -57
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +3 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-ByQDwNhh.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-D_OScUeF.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-C3QU6eRJ.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CkQVyTc5.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-Cvotfyns.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-CqIxk3qY.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-emQ5xjZz.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-D-SyrBho.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-NF_CPSvZ.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BNHvpQxD.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-DeQjKxmi.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-B9L7tJGd.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-CzFt06tW.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-cVoMPYAn.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-mMUjBHCe.js +0 -69
package/llms-full.txt
CHANGED
|
@@ -21,7 +21,23 @@ Roblox Studio Plugin ← Executes commands inside Studio
|
|
|
21
21
|
|
|
22
22
|
When an AI app says "Create a blue part", the MCP server converts this request, and the Roblox Studio plugin actually creates the part.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## One-Line Install (Recommended)
|
|
25
|
+
|
|
26
|
+
Installs the MCP server, Roblox Studio plugin, and registers with your AI apps in one step:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# macOS / Linux
|
|
30
|
+
curl -fsSL https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/install.sh | bash
|
|
31
|
+
|
|
32
|
+
# Windows (PowerShell)
|
|
33
|
+
irm https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/install.ps1 | iex
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then restart Roblox Studio — done!
|
|
37
|
+
|
|
38
|
+
## Manual Install
|
|
39
|
+
|
|
40
|
+
### Step 1: Install Roblox Studio Plugin
|
|
25
41
|
|
|
26
42
|
Download the plugin file from GitHub, then place it in Roblox Studio's Plugins folder.
|
|
27
43
|
|
|
@@ -110,6 +126,21 @@ Add to `claude_desktop_config.json`:
|
|
|
110
126
|
}
|
|
111
127
|
```
|
|
112
128
|
|
|
129
|
+
### Cursor Setup
|
|
130
|
+
|
|
131
|
+
Add the following to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` (global):
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"mcpServers": {
|
|
136
|
+
"weppy-roblox-mcp": {
|
|
137
|
+
"command": "npx",
|
|
138
|
+
"args": ["-y", "@weppy/roblox-mcp"]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
113
144
|
### Codex CLI Setup
|
|
114
145
|
|
|
115
146
|
```bash
|
|
@@ -170,9 +201,10 @@ In the agent pane, click ⋯ → MCP Servers → Manage MCP Servers → View raw
|
|
|
170
201
|
|
|
171
202
|
Browse synced instance trees inside VSCode with Roblox class icons.
|
|
172
203
|
|
|
173
|
-
1. Download the latest `weppy-roblox-explorer
|
|
174
|
-
2.
|
|
175
|
-
3.
|
|
204
|
+
1. Download the latest `weppy-roblox-explorer-v*.zip` from [Releases](https://github.com/hope1026/weppy-roblox-mcp/releases)
|
|
205
|
+
2. Extract the ZIP package to get `weppy-roblox-explorer-*.vsix`
|
|
206
|
+
3. Open VSCode → Extensions sidebar → ⋯ → Install from VSIX...
|
|
207
|
+
4. Select the extracted `.vsix` file
|
|
176
208
|
|
|
177
209
|
Features:
|
|
178
210
|
- Instance tree with Roblox class icons (dark/light theme)
|
|
@@ -428,9 +460,15 @@ Roblox MCP provides consolidated tools with action-based sub-commands. Each tool
|
|
|
428
460
|
| `ping` | Test connection |
|
|
429
461
|
| `connection` | Get server/plugin connection info |
|
|
430
462
|
| `usage` | Get current tier (basic/pro) |
|
|
431
|
-
| `place_info` | Get place ID, name, creator |
|
|
432
|
-
| `services` | List all Roblox services |
|
|
433
|
-
| `studio_settings` | Get Studio preferences |
|
|
463
|
+
| `place_info` | Get place ID, name, creator (Pro) |
|
|
464
|
+
| `services` | List all Roblox services (Pro) |
|
|
465
|
+
| `studio_settings` | Get Studio preferences (Pro) |
|
|
466
|
+
| `play` | Start playtest in Play mode (Pro) |
|
|
467
|
+
| `stop` | Stop current playtest (Pro) |
|
|
468
|
+
| `pause` | Pause current playtest (Pro) |
|
|
469
|
+
| `resume` | Resume paused playtest (Pro) |
|
|
470
|
+
| `play_status` | Get current playtest status (Pro) |
|
|
471
|
+
| `run_test` | Run a test script and return results (Pro) |
|
|
434
472
|
|
|
435
473
|
## Batch Execute
|
|
436
474
|
|
|
@@ -508,6 +546,51 @@ explorer/
|
|
|
508
546
|
|
|
509
547
|
---
|
|
510
548
|
|
|
549
|
+
# Dashboard
|
|
550
|
+
|
|
551
|
+
The MCP server provides a web dashboard for monitoring and managing the server in real time. It opens automatically in your browser when the MCP server starts.
|
|
552
|
+
|
|
553
|
+
```
|
|
554
|
+
http://localhost:3002
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
Set `DASHBOARD_AUTO_OPEN=false` to disable automatic opening.
|
|
558
|
+
|
|
559
|
+
## Pages
|
|
560
|
+
|
|
561
|
+
| Page | Description |
|
|
562
|
+
|------|-------------|
|
|
563
|
+
| **Overview** | Server/Plugin/Agent/Sync status cards and recent game changes feed |
|
|
564
|
+
| **Changelog** | Game change history — per-session cards, change summary, Before & After diff |
|
|
565
|
+
| **Connection** | Server status, AI agent list, plugin connection info |
|
|
566
|
+
| **Sync** | Sync status, direction settings, logs |
|
|
567
|
+
| **Playtest** | Playtest status and test history |
|
|
568
|
+
| **Tools** | Tool execution history, statistics, tier distribution |
|
|
569
|
+
| **Settings** | License, log level, sync settings, language |
|
|
570
|
+
|
|
571
|
+
## Connection Levels
|
|
572
|
+
|
|
573
|
+
| Level | Condition | Available Pages |
|
|
574
|
+
|:-----:|-----------|-----------------|
|
|
575
|
+
| **L0** | Server not connected | Reconnection waiting screen only |
|
|
576
|
+
| **L1** | Server connected, plugin not connected | Connection, Tools, Settings |
|
|
577
|
+
| **L2** | Both server and plugin connected | All pages |
|
|
578
|
+
|
|
579
|
+
## Overview Page
|
|
580
|
+
|
|
581
|
+
- **Status Cards**: Server, Plugin, Agent, Sync state at a glance
|
|
582
|
+
- **Recent Game Changes**: Up to 20 most recent AI actions in Studio with category icons (Script, Instance, Property, Lighting, Terrain, Asset)
|
|
583
|
+
- **Session Change Summary**: Aggregated change statistics by category for the current session
|
|
584
|
+
|
|
585
|
+
## Real-Time Updates
|
|
586
|
+
|
|
587
|
+
The dashboard uses SSE (Server-Sent Events) for real-time data:
|
|
588
|
+
- Server status polled every 5 seconds
|
|
589
|
+
- Change feed and connection events streamed via SSE
|
|
590
|
+
- Auto-reconnect after 3 seconds on SSE disconnect
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
511
594
|
# Compatibility
|
|
512
595
|
|
|
513
596
|
## Supported AI Clients
|
|
@@ -531,6 +614,8 @@ Claude Code, Claude Desktop, Cursor, Codex CLI, Codex Desktop, Gemini CLI, Antig
|
|
|
531
614
|
- Per-type Direction and Apply Mode
|
|
532
615
|
- Sync history and changelog
|
|
533
616
|
- Multi-place support (up to 3 places)
|
|
617
|
+
- Automated playtest: start/stop Play (F5) or Run (F8), inject test scripts, collect logs
|
|
618
|
+
- Web dashboard at `http://localhost:3002`: connection status, tool history, sync state, changelog
|
|
534
619
|
- Bulk operations (mass_create, mass_set, mass_get)
|
|
535
620
|
- Advanced spatial queries (raycast, find_ground, find_spawn, analyze_walkable)
|
|
536
621
|
- Terrain generation and fill (procedural, block, ball, cylinder, wedge)
|
package/llms.txt
CHANGED
|
@@ -14,13 +14,24 @@ terrain, and more — inside a live Studio session.
|
|
|
14
14
|
- 21 consolidated tools with 140+ actions covering the full Roblox Studio API surface
|
|
15
15
|
- Bidirectional project sync between Roblox Studio and local files (Pro)
|
|
16
16
|
- Automated playtest: AI starts/stops Play/Run, injects test scripts, collects logs
|
|
17
|
+
- Web dashboard: monitor AI actions, tool history, sync state, and changelog in real time at `http://localhost:3002`
|
|
17
18
|
- Multi-place support (up to 3 places simultaneously)
|
|
18
19
|
- Roblox Explorer VSCode extension for browsing Studio hierarchy
|
|
19
20
|
- Works with Claude Code, Claude Desktop, Cursor, Codex CLI, Codex Desktop, Gemini CLI, Antigravity
|
|
20
21
|
|
|
21
22
|
## Installation
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
**One-line install** (installs MCP server, Roblox Studio plugin, and registers with AI apps):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# macOS / Linux
|
|
28
|
+
curl -fsSL https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/install.sh | bash
|
|
29
|
+
|
|
30
|
+
# Windows (PowerShell)
|
|
31
|
+
irm https://raw.githubusercontent.com/hope1026/weppy-roblox-mcp/main/install.ps1 | iex
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or manually:
|
|
24
35
|
1. Install Roblox Studio plugin (bridge between Studio and AI)
|
|
25
36
|
2. Register MCP server: `npx -y @weppy/roblox-mcp`
|
|
26
37
|
|
|
@@ -35,6 +46,7 @@ Install in 2 steps:
|
|
|
35
46
|
- Installation: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/installation/README.md
|
|
36
47
|
- Tools reference: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/tools/overview.md
|
|
37
48
|
- Sync guide: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/sync/overview.md
|
|
49
|
+
- Dashboard guide: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/dashboard/overview.md
|
|
38
50
|
- Troubleshooting: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/troubleshooting.md
|
|
39
51
|
- Compatibility: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/compatibility.md
|
|
40
52
|
- Pro upgrade: https://github.com/hope1026/weppy-roblox-mcp/blob/main/docs/en/pro-upgrade.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
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",
|
|
@@ -16,18 +16,29 @@
|
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"mcp",
|
|
19
|
+
"mcp-server",
|
|
19
20
|
"model-context-protocol",
|
|
20
21
|
"roblox",
|
|
21
22
|
"roblox-studio",
|
|
23
|
+
"roblox-plugin",
|
|
24
|
+
"roblox-development",
|
|
25
|
+
"luau",
|
|
22
26
|
"ai",
|
|
27
|
+
"ai-agent",
|
|
28
|
+
"llm",
|
|
23
29
|
"coding-agent",
|
|
30
|
+
"automation",
|
|
31
|
+
"game-development",
|
|
32
|
+
"studio-integration",
|
|
24
33
|
"claude",
|
|
34
|
+
"claude-code",
|
|
25
35
|
"codex",
|
|
26
36
|
"gemini",
|
|
27
|
-
"cursor"
|
|
37
|
+
"cursor",
|
|
38
|
+
"vscode"
|
|
28
39
|
],
|
|
29
40
|
"author": "",
|
|
30
|
-
"license": "
|
|
41
|
+
"license": "AGPL-3.0",
|
|
31
42
|
"engines": {
|
|
32
43
|
"node": ">=18.0.0"
|
|
33
44
|
},
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weppy-roblox-mcp",
|
|
3
3
|
"description": "MCP server for Roblox Studio integration - AI-powered game development with specialized agents and skills",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "hope1026"
|
|
7
7
|
},
|
|
8
8
|
"repository": "https://github.com/hope1026/weppy-roblox-mcp",
|
|
9
9
|
"homepage": "https://github.com/hope1026/weppy-roblox-mcp#readme",
|
|
10
|
-
"license": "
|
|
10
|
+
"license": "AGPL-3.0",
|
|
11
11
|
"keywords": [
|
|
12
12
|
"mcp",
|
|
13
13
|
"roblox",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,b as j,u as L,d as O,c as A,j as t,T as p}from"./index-mMUjBHCe.js";import{I as $}from"./InfoLabel-Cvotfyns.js";import{D,P as F}from"./PropertyDiff-BGBA0lal.js";function M(e){const a={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of e)switch(l.category){case"script":l.changeType==="create"?a.scriptsCreated++:a.scriptsModified++;break;case"instance":l.changeType==="create"?a.instancesCreated++:l.changeType==="delete"?a.instancesDeleted++:l.changeType==="move"&&a.instancesMoved++;break;case"property":a.propertiesChanged++;break;case"lighting":a.lightingChanged=!0;break;case"terrain":a.terrainChanged=!0;break;case"asset":a.assetsInserted++;break}return a}function P(e){const[a,l]=r.useState(""),[i,m]=r.useState(""),[g,f]=r.useState(),[y,h]=r.useState("completed"),[x,_]=r.useState([]),[s,c]=r.useState([]),[o,u]=r.useState([]),[N,E]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[I,v]=r.useState(!0),[w,T]=r.useState(null),C=r.useCallback(async()=>{if(e){v(!0),T(null);try{const[d,k]=await Promise.all([j.get(`/api/dashboard/changelog/${e}`),j.get(`/api/dashboard/changelog/${e}/changes`)]);l(d.entryId),m(d.startTime),f(d.endTime),h(d.status),_(d.entries),c(d.failures),u(k.changes),E(M(k.changes))}catch(d){T(d instanceof Error?d.message:"Failed to load changelog detail")}finally{v(!1)}}},[e]);return r.useEffect(()=>{C()},[C]),{entryId:a,startTime:i,endTime:g,status:y,entries:x,failures:s,changes:o,changeSummary:N,loading:I,error:w,refresh:C}}const K={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function B(e){return K[e]??"❓"}const G="_page_17pcx_2",R="_header_17pcx_10",U="_backLink_17pcx_16",z="_headerTitle_17pcx_29",H="_headerTime_17pcx_37",q="_statusActive_17pcx_44",J="_statusCompleted_17pcx_49",V="_section_17pcx_54",Y="_sectionTitle_17pcx_61",Q="_summaryGrid_17pcx_74",W="_summaryCard_17pcx_80",X="_summaryCardActive_17pcx_94",Z="_summaryIcon_17pcx_99",ee="_summaryCount_17pcx_105",te="_summaryLabel_17pcx_112",ne="_timelineFilter_17pcx_122",ae="_filterLabel_17pcx_129",se="_filterSelect_17pcx_135",ie="_timeline_17pcx_122",ce="_timelineEntry_17pcx_155",re="_timelineTime_17pcx_172",le="_timelineIcon_17pcx_180",oe="_timelineBody_17pcx_185",de="_timelineSummary_17pcx_190",me="_timelineTarget_17pcx_197",ge="_timelineConfidence_17pcx_204",he="_confidenceExact_17pcx_213",ue="_confidencePartial_17pcx_218",pe="_confidenceAfterOnly_17pcx_223",fe="_confidenceIntentOnly_17pcx_228",ye="_confidenceUnknown_17pcx_233",xe="_timelineExpanded_17pcx_239",_e="_empty_17pcx_311",Ce="_loading_17pcx_320",be="_error_17pcx_329",n={page:G,header:R,backLink:U,headerTitle:z,headerTime:H,statusActive:q,statusCompleted:J,section:V,sectionTitle:Y,summaryGrid:Q,summaryCard:W,summaryCardActive:X,summaryIcon:Z,summaryCount:ee,summaryLabel:te,timelineFilter:ne,filterLabel:ae,filterSelect:se,timeline:ie,timelineEntry:ce,timelineTime:re,timelineIcon:le,timelineBody:oe,timelineSummary:de,timelineTarget:me,timelineConfidence:ge,confidenceExact:he,confidencePartial:ue,confidenceAfterOnly:pe,confidenceIntentOnly:fe,confidenceUnknown:ye,timelineExpanded:xe,empty:_e,loading:Ce,error:be},S=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function b(e){if(!e)return"--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function ve(e){if(!e)return"--:--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function Te(e,a){if(!e||!a)return"";const l=new Date(a).getTime()-new Date(e).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function ke(e){switch(e){case"exact":return n.confidenceExact;case"partial":return n.confidencePartial;case"after-only":return n.confidenceAfterOnly;case"intent-only":return n.confidenceIntentOnly;default:return n.confidenceUnknown}}function je(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact","Exact");case"partial":return e("changelog.detail.confidence.partial","Partial");case"after-only":return e("changelog.detail.confidence.afterOnly","After only");case"intent-only":return e("changelog.detail.confidence.intentOnly","Intent only");default:return e("changelog.detail.confidence.unknown","Unknown")}}function Se(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return e("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return e("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return e("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return e("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Le(){const{t:e}=L(),{id:a}=O(),l=A(),i=P(a),[m,g]=r.useState("all"),[f,y]=r.useState(null),h=r.useMemo(()=>[...m==="all"?i.changes:i.changes.filter(c=>c.category===m)].reverse(),[i.changes,m]);if(i.loading)return t.jsx("div",{className:n.loading,children:e("common.loading","Loading...")});if(i.error)return t.jsxs("div",{className:n.error,children:[i.error,t.jsx("br",{}),t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("changelog.detail.backToList","Back to list")]})]});const x=Te(i.startTime,i.endTime),_=i.endTime?`${b(i.startTime)} → ${b(i.endTime)} (${x})`:`${b(i.startTime)} → ${e("changelog.card.inProgress","in progress")}`;return t.jsxs("div",{className:n.page,children:[t.jsxs("div",{className:n.header,children:[t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("sidebar.changelog","Changelog")]}),t.jsx("span",{className:n.headerTitle,children:"|"}),t.jsx("span",{className:n.headerTime,children:_}),t.jsx(p,{text:i.status==="active"?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:t.jsx("span",{className:i.status==="active"?n.statusActive:n.statusCompleted,children:i.status==="active"?e("changelog.card.active","Active"):e("changelog.card.completed","Completed")})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:t.jsx("span",{children:e("changelog.detail.changeSummary","Change Summary")})})}),t.jsx("div",{className:n.summaryGrid,children:S.map(s=>{const c=i.changeSummary;let o;switch(s.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const u=m===s.key;return t.jsxs("div",{className:`${n.summaryCard} ${u?n.summaryCardActive:""}`,onClick:()=>g(u?"all":s.key),children:[t.jsx("span",{className:n.summaryIcon,children:s.icon}),t.jsx("div",{className:n.summaryCount,children:o}),t.jsx("div",{className:n.summaryLabel,children:e(s.labelKey,s.key)})]},s.key)})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:t.jsx("span",{children:e("changelog.detail.changeTimeline","Change Timeline")})})}),t.jsxs("div",{className:n.timelineFilter,children:[t.jsx("span",{className:n.filterLabel,children:t.jsx($,{label:`${e("changelog.detail.filterCategory","Category")}:`,tooltip:e("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),t.jsxs("select",{className:n.filterSelect,value:m,onChange:s=>g(s.target.value),children:[t.jsx("option",{value:"all",children:e("tools.filter.all","All")}),S.map(s=>t.jsxs("option",{value:s.key,children:[s.icon," ",e(s.labelKey,s.key)]},s.key))]})]}),h.length===0?t.jsx("div",{className:n.empty,children:e("changelog.detail.noChanges","No changes in this category")}):t.jsx("div",{className:n.timeline,children:h.map((s,c)=>{const o=f===c;return t.jsxs("div",{children:[t.jsxs("div",{className:n.timelineEntry,onClick:()=>y(o?null:c),children:[t.jsx("span",{className:n.timelineTime,children:ve(s.timestamp)}),t.jsx("span",{className:n.timelineIcon,children:B(s.category)}),t.jsxs("div",{className:n.timelineBody,children:[t.jsxs("div",{className:n.timelineSummary,children:[s.summary,t.jsx(p,{text:Se(e,s.confidence),children:t.jsx("span",{className:`${n.timelineConfidence} ${ke(s.confidence)}`,children:je(e,s.confidence)})})]}),t.jsx("div",{className:n.timelineTarget,children:s.target})]})]}),o&&t.jsx("div",{className:n.timelineExpanded,children:t.jsx(Ne,{change:s})})]},c)})})]})]})}function Ne({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(D,{before:e.before,after:e.after}):e.category==="property"?t.jsx(F,{before:e.before,after:e.after}):e.details?t.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(e.details,null,2)}):t.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:e.target})}export{Le as Component};
|
|
1
|
+
import{r,b as j,u as L,e as O,c as A,j as t,T as p}from"./index-CkXvRg-O.js";import{I as $}from"./InfoLabel-vz7vtbbV.js";import{D,P as F}from"./PropertyDiff-CbDafceC.js";function M(e){const a={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of e)switch(l.category){case"script":l.changeType==="create"?a.scriptsCreated++:a.scriptsModified++;break;case"instance":l.changeType==="create"?a.instancesCreated++:l.changeType==="delete"?a.instancesDeleted++:l.changeType==="move"&&a.instancesMoved++;break;case"property":a.propertiesChanged++;break;case"lighting":a.lightingChanged=!0;break;case"terrain":a.terrainChanged=!0;break;case"asset":a.assetsInserted++;break}return a}function P(e){const[a,l]=r.useState(""),[i,m]=r.useState(""),[g,f]=r.useState(),[y,h]=r.useState("completed"),[x,_]=r.useState([]),[s,c]=r.useState([]),[o,u]=r.useState([]),[N,E]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[I,v]=r.useState(!0),[w,T]=r.useState(null),C=r.useCallback(async()=>{if(e){v(!0),T(null);try{const[d,k]=await Promise.all([j.get(`/api/dashboard/changelog/${e}`),j.get(`/api/dashboard/changelog/${e}/changes`)]);l(d.entryId),m(d.startTime),f(d.endTime),h(d.status),_(d.entries),c(d.failures),u(k.changes),E(M(k.changes))}catch(d){T(d instanceof Error?d.message:"Failed to load changelog detail")}finally{v(!1)}}},[e]);return r.useEffect(()=>{C()},[C]),{entryId:a,startTime:i,endTime:g,status:y,entries:x,failures:s,changes:o,changeSummary:N,loading:I,error:w,refresh:C}}const K={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function B(e){return K[e]??"❓"}const G="_page_17pcx_2",R="_header_17pcx_10",U="_backLink_17pcx_16",z="_headerTitle_17pcx_29",H="_headerTime_17pcx_37",q="_statusActive_17pcx_44",J="_statusCompleted_17pcx_49",V="_section_17pcx_54",Y="_sectionTitle_17pcx_61",Q="_summaryGrid_17pcx_74",W="_summaryCard_17pcx_80",X="_summaryCardActive_17pcx_94",Z="_summaryIcon_17pcx_99",ee="_summaryCount_17pcx_105",te="_summaryLabel_17pcx_112",ne="_timelineFilter_17pcx_122",ae="_filterLabel_17pcx_129",se="_filterSelect_17pcx_135",ie="_timeline_17pcx_122",ce="_timelineEntry_17pcx_155",re="_timelineTime_17pcx_172",le="_timelineIcon_17pcx_180",oe="_timelineBody_17pcx_185",de="_timelineSummary_17pcx_190",me="_timelineTarget_17pcx_197",ge="_timelineConfidence_17pcx_204",he="_confidenceExact_17pcx_213",ue="_confidencePartial_17pcx_218",pe="_confidenceAfterOnly_17pcx_223",fe="_confidenceIntentOnly_17pcx_228",ye="_confidenceUnknown_17pcx_233",xe="_timelineExpanded_17pcx_239",_e="_empty_17pcx_311",Ce="_loading_17pcx_320",be="_error_17pcx_329",n={page:G,header:R,backLink:U,headerTitle:z,headerTime:H,statusActive:q,statusCompleted:J,section:V,sectionTitle:Y,summaryGrid:Q,summaryCard:W,summaryCardActive:X,summaryIcon:Z,summaryCount:ee,summaryLabel:te,timelineFilter:ne,filterLabel:ae,filterSelect:se,timeline:ie,timelineEntry:ce,timelineTime:re,timelineIcon:le,timelineBody:oe,timelineSummary:de,timelineTarget:me,timelineConfidence:ge,confidenceExact:he,confidencePartial:ue,confidenceAfterOnly:pe,confidenceIntentOnly:fe,confidenceUnknown:ye,timelineExpanded:xe,empty:_e,loading:Ce,error:be},S=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function b(e){if(!e)return"--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function ve(e){if(!e)return"--:--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function Te(e,a){if(!e||!a)return"";const l=new Date(a).getTime()-new Date(e).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function ke(e){switch(e){case"exact":return n.confidenceExact;case"partial":return n.confidencePartial;case"after-only":return n.confidenceAfterOnly;case"intent-only":return n.confidenceIntentOnly;default:return n.confidenceUnknown}}function je(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact","Exact");case"partial":return e("changelog.detail.confidence.partial","Partial");case"after-only":return e("changelog.detail.confidence.afterOnly","After only");case"intent-only":return e("changelog.detail.confidence.intentOnly","Intent only");default:return e("changelog.detail.confidence.unknown","Unknown")}}function Se(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return e("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return e("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return e("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return e("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Le(){const{t:e}=L(),{id:a}=O(),l=A(),i=P(a),[m,g]=r.useState("all"),[f,y]=r.useState(null),h=r.useMemo(()=>[...m==="all"?i.changes:i.changes.filter(c=>c.category===m)].reverse(),[i.changes,m]);if(i.loading)return t.jsx("div",{className:n.loading,children:e("common.loading","Loading...")});if(i.error)return t.jsxs("div",{className:n.error,children:[i.error,t.jsx("br",{}),t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("changelog.detail.backToList","Back to list")]})]});const x=Te(i.startTime,i.endTime),_=i.endTime?`${b(i.startTime)} → ${b(i.endTime)} (${x})`:`${b(i.startTime)} → ${e("changelog.card.inProgress","in progress")}`;return t.jsxs("div",{className:n.page,children:[t.jsxs("div",{className:n.header,children:[t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("sidebar.changelog","Changelog")]}),t.jsx("span",{className:n.headerTitle,children:"|"}),t.jsx("span",{className:n.headerTime,children:_}),t.jsx(p,{text:i.status==="active"?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:t.jsx("span",{className:i.status==="active"?n.statusActive:n.statusCompleted,children:i.status==="active"?e("changelog.card.active","Active"):e("changelog.card.completed","Completed")})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:t.jsx("span",{children:e("changelog.detail.changeSummary","Change Summary")})})}),t.jsx("div",{className:n.summaryGrid,children:S.map(s=>{const c=i.changeSummary;let o;switch(s.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const u=m===s.key;return t.jsxs("div",{className:`${n.summaryCard} ${u?n.summaryCardActive:""}`,onClick:()=>g(u?"all":s.key),children:[t.jsx("span",{className:n.summaryIcon,children:s.icon}),t.jsx("div",{className:n.summaryCount,children:o}),t.jsx("div",{className:n.summaryLabel,children:e(s.labelKey,s.key)})]},s.key)})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:t.jsx("span",{children:e("changelog.detail.changeTimeline","Change Timeline")})})}),t.jsxs("div",{className:n.timelineFilter,children:[t.jsx("span",{className:n.filterLabel,children:t.jsx($,{label:`${e("changelog.detail.filterCategory","Category")}:`,tooltip:e("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),t.jsxs("select",{className:n.filterSelect,value:m,onChange:s=>g(s.target.value),children:[t.jsx("option",{value:"all",children:e("tools.filter.all","All")}),S.map(s=>t.jsxs("option",{value:s.key,children:[s.icon," ",e(s.labelKey,s.key)]},s.key))]})]}),h.length===0?t.jsx("div",{className:n.empty,children:e("changelog.detail.noChanges","No changes in this category")}):t.jsx("div",{className:n.timeline,children:h.map((s,c)=>{const o=f===c;return t.jsxs("div",{children:[t.jsxs("div",{className:n.timelineEntry,onClick:()=>y(o?null:c),children:[t.jsx("span",{className:n.timelineTime,children:ve(s.timestamp)}),t.jsx("span",{className:n.timelineIcon,children:B(s.category)}),t.jsxs("div",{className:n.timelineBody,children:[t.jsxs("div",{className:n.timelineSummary,children:[s.summary,t.jsx(p,{text:Se(e,s.confidence),children:t.jsx("span",{className:`${n.timelineConfidence} ${ke(s.confidence)}`,children:je(e,s.confidence)})})]}),t.jsx("div",{className:n.timelineTarget,children:s.target})]})]}),o&&t.jsx("div",{className:n.timelineExpanded,children:t.jsx(Ne,{change:s})})]},c)})})]})]})}function Ne({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(D,{before:e.before,after:e.after}):e.category==="property"?t.jsx(F,{before:e.before,after:e.after}):e.details?t.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(e.details,null,2)}):t.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:e.target})}export{Le as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._card_z2aep_2{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 18px;cursor:pointer;transition:border-color var(--transition),box-shadow var(--transition)}._card_z2aep_2:hover{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-dim)}._header_z2aep_17{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}._statusBadge_z2aep_24{display:flex;align-items:center;gap:6px;font-family:var(--font-label);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}._statusDot_z2aep_35{width:7px;height:7px;border-radius:50%}._active_z2aep_41 ._statusDot_z2aep_35{background:var(--success);box-shadow:0 0 6px var(--success)}._active_z2aep_41{color:var(--success)}._completed_z2aep_50 ._statusDot_z2aep_35{background:var(--text-muted)}._completed_z2aep_50{color:var(--text-secondary)}._timeRange_z2aep_58{font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._summaryList_z2aep_65{display:flex;flex-direction:column;gap:4px}._summaryItem_z2aep_71{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:12px;color:var(--text-primary)}._summaryIcon_z2aep_80{width:20px;text-align:center;flex-shrink:0}._summaryText_z2aep_86{color:var(--text-secondary)}._progressBar_z2aep_91{margin-top:10px;height:3px;background:var(--bg-secondary);border-radius:2px;overflow:hidden}._progressFill_z2aep_99{height:100%;background:var(--accent);border-radius:2px;animation:_pulse_z2aep_1 2s ease-in-out infinite}@keyframes _pulse_z2aep_1{0%,to{opacity:.6;width:30%}50%{opacity:1;width:70%}}._emptySummary_z2aep_112{font-family:var(--font-label);font-size:12px;color:var(--text-muted);text-align:center;padding:8px 0}._page_sg9qx_2{display:flex;flex-direction:column;gap:16px;max-width:700px}._headerRow_sg9qx_9{display:flex;align-items:center;justify-content:space-between;gap:12px}._header_sg9qx_9{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-primary);letter-spacing:.05em;text-transform:uppercase}._clearButton_sg9qx_26{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._headerSub_sg9qx_35{font-size:11px;font-weight:400;color:var(--text-muted);text-transform:none;letter-spacing:0;margin-left:8px}._filterTabs_sg9qx_45{display:flex;gap:2px;border-bottom:1px solid var(--border)}._filterTab_sg9qx_45{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._filterTab_sg9qx_45:hover{color:var(--text-primary)}._filterTabActive_sg9qx_68{color:var(--accent);border-bottom-color:var(--accent)}._list_sg9qx_74{display:flex;flex-direction:column;gap:10px}._empty_sg9qx_81{text-align:center;padding:40px 20px;color:var(--text-muted);font-family:var(--font-label);font-size:13px}._loading_sg9qx_90{text-align:center;padding:40px 20px;color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._pagination_sg9qx_99{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:4px}._pageInfo_sg9qx_107{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_sg9qx_113{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_sg9qx_113:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_sg9qx_113:disabled{opacity:.4;cursor:default}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,b as N,D as k,u as I,j as s,T,c as B,d as q}from"./index-CkXvRg-O.js";import{C as z}from"./ConfirmModal-CvXLNYq0.js";const L=10;function M(){const[a,p]=i.useState([]),[e,t]=i.useState(0),[m,d]=i.useState(!1),[l,f]=i.useState(!0),[g,o]=i.useState(0),[u,C]=i.useState("all"),x=i.useRef(null),_=i.useCallback(async(h,y)=>{f(!0);try{const j={limit:String(L),offset:String(h)};y!=="all"&&(j.status=y);const S=await N.get("/api/dashboard/changelog",j);p(S.entries),t(S.total),d(S.hasMore)}catch{p([]),t(0),d(!1)}finally{f(!1)}},[]),v=i.useCallback(()=>{_(g,u)},[_,g,u]),c=i.useCallback(async()=>{await N.post("/api/dashboard/changelog/clear"),p([]),t(0),d(!1)},[]);return i.useEffect(()=>{_(g,u)},[_,g,u]),i.useEffect(()=>{const h=new k;x.current=h,h.connect();const y=h.on("command",()=>{_(g,u)});return()=>{y(),h.disconnect(),x.current=null}},[_,g,u]),{entries:a,total:e,hasMore:m,loading:l,offset:g,statusFilter:u,setOffset:o,setStatusFilter:C,refresh:v,clear:c}}const w="_card_z2aep_2",R="_header_z2aep_17",A="_statusBadge_z2aep_24",D="_statusDot_z2aep_35",E="_active_z2aep_41",F="_completed_z2aep_50",O="_timeRange_z2aep_58",P="_summaryList_z2aep_65",G="_summaryItem_z2aep_71",H="_summaryIcon_z2aep_80",Z="_summaryText_z2aep_86",U="_progressBar_z2aep_91",J="_progressFill_z2aep_99",K="_emptySummary_z2aep_112",r={card:w,header:R,statusBadge:A,statusDot:D,active:E,completed:F,timeRange:O,summaryList:P,summaryItem:G,summaryIcon:H,summaryText:Z,progressBar:U,progressFill:J,emptySummary:K};function $(a){if(!a)return"--:--";const p=new Date(a);return`${String(p.getHours()).padStart(2,"0")}:${String(p.getMinutes()).padStart(2,"0")}`}function Q({entry:a,onClick:p}){const{t:e}=I(),t=a.changeSummary,m=a.status==="active",d=a.isBootstrapOnly===!0,l=[],f=t.scriptsModified+t.scriptsCreated;if(f>0){const c=[];t.scriptsModified>0&&c.push(`${t.scriptsModified} ${e("changelog.card.modified","modified")}`),t.scriptsCreated>0&&c.push(`${t.scriptsCreated} ${e("changelog.card.created","created")}`);const h=`${f} ${e("changelog.card.scripts","scripts")} ${c.join(", ")}`;l.push({icon:"📝",text:h,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const g=t.instancesCreated+t.instancesDeleted+t.instancesMoved;if(g>0){const c=[];t.instancesCreated>0&&c.push(`${t.instancesCreated} ${e("changelog.card.created","created")}`),t.instancesDeleted>0&&c.push(`${t.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),t.instancesMoved>0&&c.push(`${t.instancesMoved} ${e("changelog.card.moved","moved")}`);const h=`${g} ${e("changelog.card.instances","instances")} ${c.join(", ")}`;l.push({icon:"🧱",text:h,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}t.propertiesChanged>0&&l.push({icon:"🎨",text:`${t.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),t.lightingChanged&&l.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),t.terrainChanged&&l.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),t.assetsInserted>0&&l.push({icon:"📦",text:`${t.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const o=$(a.startTime),u=m?e("changelog.card.inProgress","in progress"):a.endTime?$(a.endTime):"--:--",C=d?e("changelog.card.bootstrapStatus","Bootstrap"):m?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),x=d?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):m?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),_=d?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),v=d?e("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):e("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet.");return s.jsxs("div",{className:r.card,onClick:p,children:[s.jsxs("div",{className:r.header,children:[s.jsx(T,{text:x,children:s.jsxs("span",{className:`${r.statusBadge} ${m?r.active:r.completed}`,children:[s.jsx("span",{className:r.statusDot}),C]})}),s.jsxs("span",{className:r.timeRange,children:[o,"~",u]})]}),s.jsx("div",{className:r.summaryList,children:l.length>0?l.map((c,h)=>s.jsxs("div",{className:r.summaryItem,children:[s.jsx("span",{className:r.summaryIcon,children:c.icon}),s.jsx(T,{text:c.tooltip,children:s.jsx("span",{className:r.summaryText,children:c.text})})]},h)):s.jsx(T,{text:v,children:s.jsx("span",{className:r.emptySummary,style:{display:"block"},children:_})})}),m&&s.jsx("div",{className:r.progressBar,children:s.jsx("div",{className:r.progressFill})})]})}const V="_page_sg9qx_2",W="_headerRow_sg9qx_9",X="_header_sg9qx_9",Y="_clearButton_sg9qx_26",ee="_headerSub_sg9qx_35",se="_filterTabs_sg9qx_45",te="_filterTab_sg9qx_45",ae="_filterTabActive_sg9qx_68",ne="_list_sg9qx_74",oe="_empty_sg9qx_81",ce="_loading_sg9qx_90",re="_pagination_sg9qx_99",ie="_pageInfo_sg9qx_107",le="_btn_sg9qx_113",n={page:V,headerRow:W,header:X,clearButton:Y,headerSub:ee,filterTabs:se,filterTab:te,filterTabActive:ae,list:ne,empty:oe,loading:ce,pagination:re,pageInfo:ie,btn:le},b=10,de=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function pe(){const{t:a}=I(),p=B(),e=M(),{show:t}=q(),[m,d]=i.useState(!1),[l,f]=i.useState(!1),g=async()=>{f(!0);try{await e.clear(),t(a("toast.clearSuccess","Cleared successfully"),"success"),d(!1)}catch{t(a("toast.clearFailed","Failed to clear data"),"error")}finally{f(!1)}};return s.jsxs("div",{className:n.page,children:[s.jsxs("div",{className:n.headerRow,children:[s.jsxs("h2",{className:n.header,children:[a("sidebar.changelog","Changelog"),s.jsx("span",{className:n.headerSub,children:a("changelog.subtitle","Game Change History")})]}),s.jsx("button",{className:n.clearButton,onClick:()=>d(!0),children:a("common.clear","Clear")})]}),s.jsx("div",{className:n.filterTabs,children:de.map(o=>s.jsx("button",{className:`${n.filterTab} ${e.statusFilter===o.key?n.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(o.key),e.setOffset(0)},children:a(o.label,o.key.charAt(0).toUpperCase()+o.key.slice(1))},o.key))}),e.loading&&e.entries.length===0&&s.jsx("div",{className:n.loading,children:a("common.loading","Loading...")}),!e.loading&&e.entries.length===0?s.jsx("div",{className:n.empty,children:a("changelog.empty","No changelog entries yet")}):s.jsx("div",{className:n.list,children:e.entries.map(o=>s.jsx(Q,{entry:o,onClick:()=>p(`/changelog/${o.entryId}`)},o.entryId))}),e.total>b&&s.jsxs("div",{className:n.pagination,children:[s.jsx("button",{className:n.btn,disabled:e.offset===0,onClick:()=>e.setOffset(Math.max(0,e.offset-b)),children:a("tools.page.prev","Prev")}),s.jsxs("span",{className:n.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+b,e.total)," / ",e.total]}),s.jsx("button",{className:n.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+b),children:a("tools.page.next","Next")})]}),s.jsx(z,{open:m,title:a("changelog.clear.title","Clear changelog?"),message:a("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:a("common.cancel","Cancel"),confirmLabel:a("common.clear","Clear"),loading:l,onCancel:()=>!l&&d(!1),onConfirm:g})]})}export{pe as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-CkXvRg-O.js";const d="_backdrop_1ct9h_1",_="_modal_1ct9h_11",h="_title_1ct9h_20",u="_message_1ct9h_26",p="_actions_1ct9h_32",x="_cancelButton_1ct9h_39",f="_confirmButton_1ct9h_40",c={backdrop:d,modal:_,title:h,message:u,actions:p,cancelButton:x,confirmButton:f};function b({open:n,title:a,message:e,cancelLabel:l,confirmLabel:i,loading:s=!1,onCancel:o,onConfirm:r}){return n?t.jsx("div",{className:c.backdrop,onClick:s?void 0:o,children:t.jsxs("div",{className:c.modal,onClick:m=>m.stopPropagation(),children:[t.jsx("h2",{className:c.title,children:a}),t.jsx("p",{className:c.message,children:e}),t.jsxs("div",{className:c.actions,children:[t.jsx("button",{className:c.cancelButton,onClick:o,disabled:s,children:l}),t.jsx("button",{className:c.confirmButton,onClick:r,disabled:s,children:s?"...":i})]})]})}):null}export{b as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._backdrop_1ct9h_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c1018b8;display:grid;place-items:center;z-index:1000;padding:24px}._modal_1ct9h_11{width:min(420px,100%);background:#172133;border:1px solid rgba(162,179,207,.28);border-radius:18px;box-shadow:0 24px 48px #0307126b;padding:24px}._title_1ct9h_20{margin:0 0 12px;color:#f4f7fb;font-size:20px}._message_1ct9h_26{margin:0;color:#c8d2e3;line-height:1.6}._actions_1ct9h_32{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}._cancelButton_1ct9h_39,._confirmButton_1ct9h_40{border:0;border-radius:10px;padding:10px 14px;font:inherit;cursor:pointer}._cancelButton_1ct9h_39{background:#8395b32e;color:#d8e0ee}._confirmButton_1ct9h_40{background:#d15454;color:#fff4f4}._cancelButton_1ct9h_39:disabled,._confirmButton_1ct9h_40:disabled{cursor:not-allowed;opacity:.6}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as $,r,j as e,a as R,b as N,D as I,d as L,T as A}from"./index-CkXvRg-O.js";import{I as a}from"./InfoLabel-vz7vtbbV.js";import{S as E}from"./StatusBadge-BMTgkxDJ.js";import{C as M}from"./ConfirmModal-CvXLNYq0.js";import{u as P,f as k}from"./useLiveUptime-DXXyWm6j.js";const B="_container_1h084_2",H="_entry_1h084_14",T="_timestamp_1h084_21",F="_message_1h084_27",D="_warn_1h084_34",U="_error_1h084_39",G="_empty_1h084_44",v={container:B,entry:H,timestamp:T,message:F,warn:D,error:U,empty:G};function O({entries:n}){const{t}=$(),c=r.useRef(null);return r.useEffect(()=>{const l=c.current;l&&(l.scrollTop=l.scrollHeight)},[n.length]),e.jsx("div",{ref:c,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:t("connection.log.empty","No events yet")}):n.map((l,g)=>e.jsxs("div",{className:`${v.entry} ${l.type?v[l.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:l.timestamp}),e.jsx("span",{className:v.message,children:l.message})]},g))})}const w=50;function V(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function q(){const{level:n,status:t,error:c}=R(),[l,g]=r.useState(null),[y,m]=r.useState([]),u=r.useRef(null),_=r.useCallback((i,f)=>{m(d=>{const p=[...d,{timestamp:V(),message:i,type:f}];return p.length>w?p.slice(-w):p})},[]),x=r.useCallback(async()=>{try{const i=await N.get("/connection-info");g(i)}catch{g(null)}},[]),j=r.useCallback(async()=>{try{const i=await N.get("/api/dashboard/connection-log");m(i.entries??[])}catch{m([])}},[]),C=r.useCallback(async()=>{await N.post("/api/dashboard/connection-log/clear"),m([])},[]);return r.useEffect(()=>{n!=="L0"&&t&&x(),j()},[n,t,x,j]),r.useEffect(()=>{const i=new I;u.current=i,i.connect();const f=i.on("connection",p=>{const h=p,b=h.status==="connected"?"connected":"disconnected";_(`Plugin ${b} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),d=i.on("mcp_status",p=>{const h=p,b=h.status==="registered"?"registered":"unregistered";_(`MCP ${b} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),x()});return()=>{f(),d(),i.disconnect(),u.current=null}},[_,x]),{status:t,connectionInfo:l,connectionLog:y,level:n,error:c,clearConnectionLog:C}}const X="_page_12byi_2",z="_card_12byi_10",J="_disabled_12byi_18",K="_cardHeader_12byi_24",Q="_clearButton_12byi_37",W="_serverGrid_12byi_47",Y="_statusRow_12byi_65",Z="_table_12byi_79",ee="_toggleBtn_12byi_104",ne="_disconnected_12byi_119",te="_disconnectedActions_12byi_136",se="_btn_12byi_143",ce="_emptyRow_12byi_161",s={page:X,card:z,disabled:J,cardHeader:K,clearButton:Q,serverGrid:W,statusRow:Y,table:Z,toggleBtn:ee,disconnected:ne,disconnectedActions:te,btn:se,emptyRow:ce};function S(n,t){const c=Math.max(0,Math.floor((Date.now()-n)/1e3));return c<60?`${c}${t("connection.time.secondsAgo","s ago")}`:c<3600?`${Math.floor(c/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(c/3600)}${t("connection.time.hoursAgo","h ago")}`}function de(){var b;const{t:n}=$(),{status:t,connectionInfo:c,connectionLog:l,level:g,clearConnectionLog:y}=q(),{show:m}=L(),[u,_]=r.useState(!0),[x,j]=r.useState(!1),[C,i]=r.useState(!1),f=P(t==null?void 0:t.uptime),d=g==="L0",p=d?"offline":"online",h=async()=>{i(!0);try{await y(),m(n("toast.clearSuccess","Cleared successfully"),"success"),j(!1)}catch{m(n("toast.clearFailed","Failed to clear data"),"error")}finally{i(!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")}),d?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(E,{status:p})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(A,{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(a,{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(a,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:k(f??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{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)})]}),(c==null?void 0:c.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:c.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${d?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(c==null?void 0:c.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>_(o=>!o),"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(a,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(a,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")})]})}),e.jsx("tbody",{children:c!=null&&c.mcpInstances&&c.mcpInstances.length>0?c.mcpInstances.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.aiClientName??n("connection.agents.unknown","Unknown")}),e.jsx("td",{children:o.pid}),e.jsx("td",{children:o.projectRoot??o.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:S(o.connectedAt,n)})]},o.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${d?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((b=t==null?void 0:t.pluginClients)==null?void 0:b.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(a,{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(a,{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(a,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.placeName??o.projectName??"-"}),e.jsx("td",{children:o.clientId.slice(0,10)}),e.jsx("td",{children:S(o.lastSeen,n)}),e.jsx("td",{children:o.pluginVersion??"-"})]},o.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} ${d?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:()=>j(!0),children:n("common.clear","Clear")})]}),e.jsx(O,{entries:l})]}),e.jsx(M,{open:x,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:C,onCancel:()=>!C&&j(!1),onConfirm:h})]})}export{de as Component};
|
|
@@ -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_12byi_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_12byi_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._disabled_12byi_18{opacity:.4;pointer-events:none}._cardHeader_12byi_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_12byi_37{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._serverGrid_12byi_47{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-family:var(--font-code);font-size:13px}._serverGrid_12byi_47 dt{color:var(--text-muted)}._serverGrid_12byi_47 dd{color:var(--text-primary);margin:0}._statusRow_12byi_65{display:flex;align-items:center;gap:16px;margin-bottom:12px}._metaItem_12byi_72{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._table_12byi_79{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_12byi_79 th{text-align:left;color:var(--text-muted);font-weight:400;padding:4px 8px 4px 0;border-bottom:1px solid var(--border)}._table_12byi_79 td{padding:6px 8px 6px 0;color:var(--text-primary)}._table_12byi_79 tr:hover td{background:var(--accent-dim)}._toggleBtn_12byi_104{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:0 4px;transition:color var(--transition)}._toggleBtn_12byi_104:hover{color:var(--accent)}._disconnected_12byi_119{text-align:center;padding:32px 16px}._disconnected_12byi_119 h3{color:var(--error);font-size:16px;margin:0 0 8px}._disconnected_12byi_119 p{color:var(--text-secondary);font-size:13px;margin:0 0 4px}._disconnectedActions_12byi_136{display:flex;gap:8px;justify-content:center;margin-top:16px}._btn_12byi_143{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_12byi_143:hover{border-color:var(--accent);background:var(--accent-dim)}._emptyRow_12byi_161{color:var(--text-muted);font-style:italic}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,f as e}from"./index-CkXvRg-O.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,u as L,r as _,a as G,b as D,D as F,T as U}from"./index-mMUjBHCe.js";import{I as V}from"./InfoLabel-Cvotfyns.js";import{S as A}from"./StatusBadge-C_KxiYEt.js";import{D as z,P as O}from"./PropertyDiff-BGBA0lal.js";import{u as J,T as X}from"./tier-promo-config-BFJCz95t.js";import{u as q,f as K}from"./useLiveUptime-Gqoo4lJE.js";import{T as Q}from"./TierPromoProgress-B9L7tJGd.js";const W="_page_9uhoo_2",Y="_card_9uhoo_10",Z="_cardHeader_9uhoo_17",ee="_disconnectCard_9uhoo_28",te="_disconnectIcon_9uhoo_36",se="_disconnectTitle_9uhoo_41",ne="_disconnectMessage_9uhoo_48",ie="_reconnectGuide_9uhoo_55",re="_guideStep_9uhoo_64",ce="_stepNumber_9uhoo_72",ae="_reconnectIndicator_9uhoo_88",oe="_reconnectDot_9uhoo_98",le="_pulse_9uhoo_1",de="_disconnectActions_9uhoo_112",ue="_btn_9uhoo_118",me="_btnSecondary_9uhoo_134",he="_metricRow_9uhoo_152",ve="_metricGrid_9uhoo_158",_e="_metricCard_9uhoo_164",ge="_metric_ok_9uhoo_174",pe="_metric_warn_9uhoo_179",fe="_metric_error_9uhoo_184",xe="_metricHeader_9uhoo_189",je="_metricIcon_9uhoo_200",Ce="_metricTitle_9uhoo_204",we="_metricValue_9uhoo_208",Ne="_metricSubtitle_9uhoo_215",ye="_guideCard_9uhoo_225",Se="_guideTitle_9uhoo_232",Te="_checklist_9uhoo_239",be="_feedEmpty_9uhoo_263",Ie="_feedList_9uhoo_270",ke="_feedItem_9uhoo_278",De="_feedTime_9uhoo_291",Me="_feedIcon_9uhoo_298",Pe="_feedSummary_9uhoo_304",Ee="_feedItemClickable_9uhoo_314",Be="_feedChevron_9uhoo_322",He="_feedDetail_9uhoo_331",Re="_feedDetailPre_9uhoo_340",Le="_feedDetailText_9uhoo_349",$e="_changelogSummary_9uhoo_356",Ge="_changeTag_9uhoo_365",Fe="_tierBar_9uhoo_377",Ue="_tierBarTrack_9uhoo_383",Ve="_tierBarFillBasic_9uhoo_391",Ae="_tierBarFillPro_9uhoo_396",ze="_tierLabels_9uhoo_401",s={page:W,card:Y,cardHeader:Z,disconnectCard:ee,disconnectIcon:te,disconnectTitle:se,disconnectMessage:ne,reconnectGuide:ie,guideStep:re,stepNumber:ce,reconnectIndicator:ae,reconnectDot:oe,pulse:le,disconnectActions:de,btn:ue,btnSecondary:me,metricRow:he,metricGrid:ve,metricCard:_e,metric_ok:ge,metric_warn:pe,metric_error:fe,metricHeader:xe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Se,checklist:Te,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedItemClickable:Ee,feedChevron:Be,feedDetail:He,feedDetailPre:Re,feedDetailText:Le,changelogSummary:$e,changeTag:Ge,tierBar:Fe,tierBarTrack:Ue,tierBarFillBasic:Ve,tierBarFillPro:Ae,tierLabels:ze};function N({title:e,value:c,icon:i,subtitle:r,status:a,children:n}){const d=a?s[`metric_${a}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${d}`,children:[t.jsxs("div",{className:s.metricHeader,children:[i&&t.jsx("span",{className:s.metricIcon,children:i}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:c}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function E({changes:e}){const{t:c}=L(),[i,r]=_.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:c("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=i===n,l=a.raw,g=l&&(l.before!=null||l.after!=null||l.details!=null);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${g?s.feedItemClickable:""}`,onClick:()=>g&&r(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsx("span",{className:s.feedSummary,children:a.summary}),g&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&l&&t.jsx("div",{className:s.feedDetail,children:t.jsx(Oe,{change:l})})]},n)})})}function Oe({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(z,{before:e.before,after:e.after}):e.category==="property"?t.jsx(O,{before:e.before,after:e.after}):e.details?t.jsx("pre",{className:s.feedDetailPre,children:JSON.stringify(e.details,null,2)}):t.jsx("div",{className:s.feedDetailText,children:e.target})}const B=20;function $(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return $(new Date)}function R(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Je(){const{level:e,status:c}=G(),i=J(),[r,a]=_.useState(null),[n,d]=_.useState(null),[l,g]=_.useState(null),[x,h]=_.useState([]),y=_.useRef(null),S=_.useCallback(async()=>{try{const o=await D.get("/connection-info");a(o)}catch{a(null)}},[]),T=_.useCallback(async()=>{try{const o=await D.get("/api/dashboard/changelog/active");if(g(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(v=>({timestamp:v.timestamp?$(new Date(v.timestamp)):H(),icon:R(v.category),summary:v.summary,category:v.category,raw:v}));h(p)}}catch{g(null)}},[]),f=_.useCallback(async()=>{try{const o=await D.get("/sync/status");d(o)}catch{d(null)}},[]);return _.useEffect(()=>{e!=="L0"?(S(),T(),f()):(a(null),d(null),g(null));const o=new F;y.current=o,o.connect();const p=o.on("game_change",j=>{const u=j,C={timestamp:H(),icon:R(u.category),summary:u.summary,category:u.category};h(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),T()}),v=o.on("sync",j=>{const u=j;d(C=>({...C,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{p(),v(),o.disconnect(),y.current=null}},[e,S,T,f]),{level:e,status:c,connectionInfo:r,syncStatus:n,changeSummary:l,recentChanges:x,tier:i}}function M(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Xe(e,c){switch(e){case"syncing":return c("status.syncing","Syncing");case"initializing":return c("status.initializing","Initializing");case"error":return c("status.error","Error");default:return c("status.idle","Idle")}}function qe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,c,i,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:c,tooltip:i}),": ",r]},c)}function m(e,c){return t.jsx(U,{text:c,children:e})}function st(){var w,P;const{t:e}=L(),{level:c,status:i,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:d,tier:l}=Je(),g=q(i==null?void 0:i.uptime);if(c==="L0")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const x=(r==null?void 0:r.mcpInstanceCount)??0,h=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=r==null?void 0:r.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(i==null?void 0:i.pluginClients)??[],S=y.length>0,T=(i==null?void 0:i.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),p=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),v=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=i?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${i.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),T),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(i.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(g??i.uptime))]:[];if(c==="L1")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")}),t.jsx("li",{children:e("overview.l1.check3")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),d.length>0?t.jsx(E,{changes:d}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&M(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",M(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const u=y[0],C=n?M(n):0,k=!!n&&C>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(S?"status.online":"status.offline"),o),icon:"🔌",subtitle:u?`${u.placeName??u.projectName??"-"} / v${u.pluginVersion??"-"}`:void 0,status:S?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),v),value:m(Xe(a==null?void 0:a.state,e),v),icon:"🔄",status:qe(a==null?void 0:a.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(E,{changes:d})]}),k&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",C]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]}),!l.loading&&l.tier==="basic"&&l.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:l.basicCalls,proCalls:l.proCalls,totalCalls:l.totalCalls,proUsagePercent:l.proUsagePercent,upgradeHref:X.overview})]})]})}export{st as Component};
|
|
1
|
+
import{j as t,u as L,r as _,a as G,b as D,D as F,T as U}from"./index-CkXvRg-O.js";import{I as V}from"./InfoLabel-vz7vtbbV.js";import{S as A}from"./StatusBadge-BMTgkxDJ.js";import{D as z,P as O}from"./PropertyDiff-CbDafceC.js";import{u as J,T as X}from"./tier-promo-config-B9lIKWCQ.js";import{u as q,f as K}from"./useLiveUptime-DXXyWm6j.js";import{T as Q}from"./TierPromoProgress-DBA-FZGE.js";const W="_page_9uhoo_2",Y="_card_9uhoo_10",Z="_cardHeader_9uhoo_17",ee="_disconnectCard_9uhoo_28",te="_disconnectIcon_9uhoo_36",se="_disconnectTitle_9uhoo_41",ne="_disconnectMessage_9uhoo_48",ie="_reconnectGuide_9uhoo_55",re="_guideStep_9uhoo_64",ce="_stepNumber_9uhoo_72",ae="_reconnectIndicator_9uhoo_88",oe="_reconnectDot_9uhoo_98",le="_pulse_9uhoo_1",de="_disconnectActions_9uhoo_112",ue="_btn_9uhoo_118",me="_btnSecondary_9uhoo_134",he="_metricRow_9uhoo_152",ve="_metricGrid_9uhoo_158",_e="_metricCard_9uhoo_164",ge="_metric_ok_9uhoo_174",pe="_metric_warn_9uhoo_179",fe="_metric_error_9uhoo_184",xe="_metricHeader_9uhoo_189",je="_metricIcon_9uhoo_200",Ce="_metricTitle_9uhoo_204",we="_metricValue_9uhoo_208",Ne="_metricSubtitle_9uhoo_215",ye="_guideCard_9uhoo_225",Se="_guideTitle_9uhoo_232",Te="_checklist_9uhoo_239",be="_feedEmpty_9uhoo_263",Ie="_feedList_9uhoo_270",ke="_feedItem_9uhoo_278",De="_feedTime_9uhoo_291",Me="_feedIcon_9uhoo_298",Pe="_feedSummary_9uhoo_304",Ee="_feedItemClickable_9uhoo_314",Be="_feedChevron_9uhoo_322",He="_feedDetail_9uhoo_331",Re="_feedDetailPre_9uhoo_340",Le="_feedDetailText_9uhoo_349",$e="_changelogSummary_9uhoo_356",Ge="_changeTag_9uhoo_365",Fe="_tierBar_9uhoo_377",Ue="_tierBarTrack_9uhoo_383",Ve="_tierBarFillBasic_9uhoo_391",Ae="_tierBarFillPro_9uhoo_396",ze="_tierLabels_9uhoo_401",s={page:W,card:Y,cardHeader:Z,disconnectCard:ee,disconnectIcon:te,disconnectTitle:se,disconnectMessage:ne,reconnectGuide:ie,guideStep:re,stepNumber:ce,reconnectIndicator:ae,reconnectDot:oe,pulse:le,disconnectActions:de,btn:ue,btnSecondary:me,metricRow:he,metricGrid:ve,metricCard:_e,metric_ok:ge,metric_warn:pe,metric_error:fe,metricHeader:xe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Se,checklist:Te,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedItemClickable:Ee,feedChevron:Be,feedDetail:He,feedDetailPre:Re,feedDetailText:Le,changelogSummary:$e,changeTag:Ge,tierBar:Fe,tierBarTrack:Ue,tierBarFillBasic:Ve,tierBarFillPro:Ae,tierLabels:ze};function N({title:e,value:c,icon:i,subtitle:r,status:a,children:n}){const d=a?s[`metric_${a}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${d}`,children:[t.jsxs("div",{className:s.metricHeader,children:[i&&t.jsx("span",{className:s.metricIcon,children:i}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:c}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function E({changes:e}){const{t:c}=L(),[i,r]=_.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:c("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=i===n,l=a.raw,g=l&&(l.before!=null||l.after!=null||l.details!=null);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${g?s.feedItemClickable:""}`,onClick:()=>g&&r(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsx("span",{className:s.feedSummary,children:a.summary}),g&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&l&&t.jsx("div",{className:s.feedDetail,children:t.jsx(Oe,{change:l})})]},n)})})}function Oe({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(z,{before:e.before,after:e.after}):e.category==="property"?t.jsx(O,{before:e.before,after:e.after}):e.details?t.jsx("pre",{className:s.feedDetailPre,children:JSON.stringify(e.details,null,2)}):t.jsx("div",{className:s.feedDetailText,children:e.target})}const B=20;function $(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return $(new Date)}function R(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Je(){const{level:e,status:c}=G(),i=J(),[r,a]=_.useState(null),[n,d]=_.useState(null),[l,g]=_.useState(null),[x,h]=_.useState([]),y=_.useRef(null),S=_.useCallback(async()=>{try{const o=await D.get("/connection-info");a(o)}catch{a(null)}},[]),T=_.useCallback(async()=>{try{const o=await D.get("/api/dashboard/changelog/active");if(g(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(v=>({timestamp:v.timestamp?$(new Date(v.timestamp)):H(),icon:R(v.category),summary:v.summary,category:v.category,raw:v}));h(p)}}catch{g(null)}},[]),f=_.useCallback(async()=>{try{const o=await D.get("/sync/status");d(o)}catch{d(null)}},[]);return _.useEffect(()=>{e!=="L0"?(S(),T(),f()):(a(null),d(null),g(null));const o=new F;y.current=o,o.connect();const p=o.on("game_change",j=>{const u=j,C={timestamp:H(),icon:R(u.category),summary:u.summary,category:u.category};h(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),T()}),v=o.on("sync",j=>{const u=j;d(C=>({...C,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{p(),v(),o.disconnect(),y.current=null}},[e,S,T,f]),{level:e,status:c,connectionInfo:r,syncStatus:n,changeSummary:l,recentChanges:x,tier:i}}function M(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Xe(e,c){switch(e){case"syncing":return c("status.syncing","Syncing");case"initializing":return c("status.initializing","Initializing");case"error":return c("status.error","Error");default:return c("status.idle","Idle")}}function qe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,c,i,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:c,tooltip:i}),": ",r]},c)}function m(e,c){return t.jsx(U,{text:c,children:e})}function st(){var w,P;const{t:e}=L(),{level:c,status:i,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:d,tier:l}=Je(),g=q(i==null?void 0:i.uptime);if(c==="L0")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const x=(r==null?void 0:r.mcpInstanceCount)??0,h=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=r==null?void 0:r.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(i==null?void 0:i.pluginClients)??[],S=y.length>0,T=(i==null?void 0:i.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),p=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),v=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=i?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${i.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),T),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(i.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(g??i.uptime))]:[];if(c==="L1")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")}),t.jsx("li",{children:e("overview.l1.check3")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),d.length>0?t.jsx(E,{changes:d}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&M(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",M(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const u=y[0],C=n?M(n):0,k=!!n&&C>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(S?"status.online":"status.offline"),o),icon:"🔌",subtitle:u?`${u.placeName??u.projectName??"-"} / v${u.pluginVersion??"-"}`:void 0,status:S?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),v),value:m(Xe(a==null?void 0:a.state,e),v),icon:"🔄",status:qe(a==null?void 0:a.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(E,{changes:d})]}),k&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",C]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]}),!l.loading&&l.tier==="basic"&&l.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:l.basicCalls,proCalls:l.proCalls,totalCalls:l.totalCalls,proUsagePercent:l.proUsagePercent,upgradeHref:X.overview})]})]})}export{st as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,b as _,u as I,j as e,T as p,a as T,d as M}from"./index-CkXvRg-O.js";import{u as k,T as H}from"./tier-promo-config-B9lIKWCQ.js";import{T as D}from"./TierPromoPanel-CUrTMsXB.js";import{I as x}from"./InfoLabel-vz7vtbbV.js";import{C as $}from"./ConfirmModal-CvXLNYq0.js";const E=5e3;function A(){const[t,a]=n.useState({state:"NotRunning"}),[y,o]=n.useState([]),[r,c]=n.useState(null),[j,g]=n.useState(!0),m=n.useRef(null),u=n.useCallback(async()=>{try{const l=await _.get("/api/dashboard/playtest/status");a(l)}catch{}},[]),h=n.useCallback(async()=>{try{const l=await _.get("/api/dashboard/playtest/history");o(l.entries??[])}catch{o([])}},[]),d=n.useCallback(async()=>{await Promise.all([u(),h()]),g(!1)},[u,h]),S=n.useCallback(()=>{d()},[d]),N=n.useCallback(async()=>{await _.post("/api/dashboard/playtest/history/clear"),o([]),c(null)},[]),i=n.useCallback(async l=>{try{const R=await _.get(`/api/dashboard/playtest/report/${l}`);c(R)}catch{c(null)}},[]),f=n.useCallback(async l=>{try{await _.post("/api/dashboard/playtest/control",{action:l}),setTimeout(u,500)}catch{}},[u]);return n.useEffect(()=>(d(),m.current=setInterval(d,E),()=>{m.current&&clearInterval(m.current)}),[d]),{status:t,history:y,selectedReport:r,loading:j,loadReport:i,control:f,refresh:S,clearHistory:N}}const B="_page_62ru9_2",z="_card_62ru9_10",O="_cardHeader_62ru9_17",F="_clearButton_62ru9_29",U="_statusRow_62ru9_39",V="_statusIndicator_62ru9_46",G="_statusRunning_62ru9_54",q="_statusPaused_62ru9_59",J="_statusNotRunning_62ru9_63",K="_statusLabel_62ru9_67",Q="_statusMeta_62ru9_74",W="_controlButtons_62ru9_80",X="_btn_62ru9_87",Y="_btnPrimary_62ru9_109",Z="_btnDanger_62ru9_119",tt="_historyList_62ru9_129",et="_historyItem_62ru9_137",st="_historyItemSelected_62ru9_156",at="_historyItemHeader_62ru9_161",rt="_historyIcon_62ru9_167",nt="_historyTimestamp_62ru9_172",ot="_historyName_62ru9_179",it="_historyItemMeta_62ru9_189",lt="_historyMode_62ru9_198",ct="_historyDuration_62ru9_202",ut="_historyStatus_62ru9_206",dt="_status_passed_62ru9_213",pt="_status_failed_62ru9_217",yt="_status_running_62ru9_221",mt="_historyError_62ru9_225",ht="_reportContainer_62ru9_236",_t="_reportSection_62ru9_242",gt="_reportSectionHeader_62ru9_248",ft="_reportMarkdown_62ru9_260",xt="_reportLogs_62ru9_273",bt="_emptyState_62ru9_288",jt="_emptyStateTitle_62ru9_295",St="_emptyStateMessage_62ru9_303",Nt="_upgradePanel_62ru9_312",Rt="_upgradePanelIcon_62ru9_320",It="_upgradePanelTitle_62ru9_325",wt="_upgradePanelDesc_62ru9_333",Pt="_benefitList_62ru9_343",Lt="_benefitItem_62ru9_354",vt="_upgradeActions_62ru9_369",s={page:B,card:z,cardHeader:O,clearButton:F,statusRow:U,statusIndicator:V,statusRunning:G,statusPaused:q,statusNotRunning:J,statusLabel:K,statusMeta:Q,controlButtons:W,btn:X,btnPrimary:Y,btnDanger:Z,historyList:tt,historyItem:et,historyItemSelected:st,historyItemHeader:at,historyIcon:rt,historyTimestamp:nt,historyName:ot,historyItemMeta:it,historyMode:lt,historyDuration:ct,historyStatus:ut,status_passed:dt,status_failed:pt,status_running:yt,historyError:mt,reportContainer:ht,reportSection:_t,reportSectionHeader:gt,reportMarkdown:ft,reportLogs:xt,emptyState:bt,emptyStateTitle:jt,emptyStateMessage:St,upgradePanel:Nt,upgradePanelIcon:Rt,upgradePanelTitle:It,upgradePanelDesc:wt,benefitList:Pt,benefitItem:Lt,upgradeActions:vt};function b(t){return t.trim().toLowerCase()}function Ct(t){switch(b(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Tt(t,a){switch(b(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Mt(t,a){switch(b(a)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function kt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function Ht({entries:t,onSelect:a,selectedTimestamp:y}){const{t:o}=I();return t.length===0?e.jsx("div",{className:s.emptyState,children:o("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(r=>{const c=r.timestamp===y;return e.jsxs("button",{className:`${s.historyItem} ${c?s.historyItemSelected:""}`,onClick:()=>a(r.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Ct(r.status)}),e.jsx("span",{className:s.historyTimestamp,children:r.timestamp}),e.jsx("span",{className:s.historyName,children:r.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(p,{text:o("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[o("playtest.history.mode","Mode"),": ",Tt(o,r.mode)]})}),e.jsx("span",{className:s.historyDuration,children:kt(r.durationMs)}),e.jsx(p,{text:o("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${b(r.status)}`]??""}`,children:Mt(o,r.status)})})]}),r.errorMessage&&e.jsx("div",{className:s.historyError,children:r.errorMessage})]},r.timestamp)})})}function Dt({report:t}){const{t:a}=I();return e.jsxs("div",{className:s.reportContainer,children:[t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(p,{text:a("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(p,{text:a("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:a("playtest.report.empty","No report content available")})]})}function L(t){return(t==null?void 0:t.trim().toLowerCase())??""}function w(t){switch(L(t).replace(/[\s_-]+/g,"")){case"running":return"running";case"paused":return"paused";case"notrunning":return"not-running";default:return"not-running"}}function $t(t){switch(w(t)){case"paused":return s.statusPaused;case"running":return s.statusRunning;default:return s.statusNotRunning}}function Et(t,a){switch(w(a)){case"paused":return t("playtest.status.state.paused","Paused");case"running":return t("playtest.status.state.running","Running");default:return t("playtest.status.state.notRunning","Not Running")}}function At(t,a){switch(w(a)){case"paused":return t("playtest.status.state.paused.tooltip","The current Roblox playtest session is paused.");case"running":return t("playtest.status.state.running.tooltip","A Roblox playtest session is currently running.");default:return t("playtest.status.state.notRunning.tooltip","No Roblox playtest session is currently running.")}}function Bt(t,a){switch(L(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Gt(){const{t}=I(),{level:a}=T(),{tier:y,loading:o}=k(),r=A(),{show:c}=M(),[j,g]=n.useState(null),[m,u]=n.useState(!1),[h,d]=n.useState(!1),S=!o&&y==="basic",N=a==="L0"||a==="L1";if(S)return e.jsx("div",{className:s.page,children:e.jsx(D,{icon:t("playtest.basic.icon","🎮"),title:t("playtest.basic.title","Playtest is a Pro-only feature"),description:t("playtest.basic.desc","Control playtesting from the dashboard, run automated tests, and view detailed test reports."),benefits:[t("playtest.basic.benefit1","One-click play/pause/stop controls"),t("playtest.basic.benefit2","Automated test execution via AI agent"),t("playtest.basic.benefit3","Test history with pass/fail tracking"),t("playtest.basic.benefit4","Detailed markdown test reports")],upgradeLabel:t("tier.upgrade","Upgrade to Pro"),upgradeHref:H.playtest})});const{status:i,history:f,selectedReport:l,loading:R}=r,v=P=>{g(P),r.loadReport(P)},C=async()=>{d(!0);try{await r.clearHistory(),c(t("toast.clearSuccess","Cleared successfully"),"success"),u(!1),g(null)}catch{c(t("toast.clearFailed","Failed to clear data"),"error")}finally{d(!1)}};return e.jsxs("div",{className:s.page,children:[!N&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(x,{label:t("playtest.status.title","Playtest Status"),tooltip:t("playtest.status.title.tooltip","Current Roblox playtest session state reported by Studio.")})}),e.jsxs("div",{className:s.statusRow,children:[e.jsx("span",{className:`${s.statusIndicator} ${$t(i.state)}`}),e.jsx(p,{text:At(t,i.state),children:e.jsx("span",{className:s.statusLabel,children:Et(t,i.state)})}),i.mode&&e.jsxs("span",{className:s.statusMeta,children:[e.jsx(x,{label:`${t("playtest.status.mode","Mode")}:`,tooltip:t("playtest.status.mode.tooltip","Studio playtest launch mode for the current session.")})," ",e.jsx(p,{text:t("playtest.status.mode.value.tooltip","Specific Roblox Studio playtest mode currently in use."),children:e.jsx("span",{children:Bt(t,i.mode)})})]}),i.placeName&&e.jsx(p,{text:t("playtest.status.place.tooltip","Roblox place currently associated with this playtest session."),children:e.jsxs("span",{className:s.statusMeta,children:[i.placeName,i.placeId?` (${i.placeId})`:""]})})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(x,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),e.jsx("button",{className:s.clearButton,onClick:()=>u(!0),children:t("common.clear","Clear")})]}),R?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):f.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(p,{text:t("playtest.empty.runTest.tooltip","Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(Ht,{entries:f,onSelect:v,selectedTimestamp:j??void 0})]}),l&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(x,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(Dt,{report:l})]}),e.jsx($,{open:m,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:h,onCancel:()=>!h&&u(!1),onConfirm:C})]})}export{Gt as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_62ru9_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_62ru9_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_62ru9_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_62ru9_29{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._statusRow_62ru9_39{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_62ru9_46{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_62ru9_54{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_62ru9_59{background:var(--warning)}._statusNotRunning_62ru9_63{background:var(--text-muted)}._statusLabel_62ru9_67{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_62ru9_74{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_62ru9_80{display:flex;gap:8px;margin-top:12px}._btn_62ru9_87{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_62ru9_87:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_62ru9_87:disabled{opacity:.4;pointer-events:none}._btnPrimary_62ru9_109{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_62ru9_109:hover{opacity:.9}._btnDanger_62ru9_119{border-color:var(--error);color:var(--error)}._btnDanger_62ru9_119:hover{background:#ef44441a}._historyList_62ru9_129{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_62ru9_137{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);cursor:pointer;text-align:left;width:100%;font-family:inherit;transition:border-color var(--transition)}._historyItem_62ru9_137:hover{border-color:var(--accent)}._historyItemSelected_62ru9_156{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_62ru9_161{display:flex;align-items:center;gap:8px}._historyIcon_62ru9_167{font-size:14px;flex-shrink:0}._historyTimestamp_62ru9_172{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_62ru9_179{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_62ru9_189{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_62ru9_198{color:var(--text-muted)}._historyDuration_62ru9_202{color:var(--text-secondary)}._historyStatus_62ru9_206{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_62ru9_213{color:var(--success)}._status_failed_62ru9_217{color:var(--error)}._status_running_62ru9_221{color:var(--accent)}._historyError_62ru9_225{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._reportContainer_62ru9_236{display:flex;flex-direction:column;gap:12px}._reportSection_62ru9_242{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_62ru9_248{font-family:var(--font-label);font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}._reportMarkdown_62ru9_260{padding:12px;margin:0;font-family:var(--font-code);font-size:12px;line-height:1.6;color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto}._reportLogs_62ru9_273{padding:12px;margin:0;font-family:var(--font-code);font-size:11px;line-height:1.5;color:var(--text-secondary);white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto;background:var(--bg-secondary)}._emptyState_62ru9_288{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_62ru9_295{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_62ru9_303{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_62ru9_312{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_62ru9_320{font-size:32px;margin-bottom:12px}._upgradePanelTitle_62ru9_325{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_62ru9_333{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_62ru9_343{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_62ru9_354{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_62ru9_354:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_62ru9_369{display:flex;gap:8px;justify-content:center}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as f,r as h,j as n}from"./index-
|
|
1
|
+
import{u as f,r as h,j as n}from"./index-CkXvRg-O.js";const _="_container_uv8oc_2",p="_header_uv8oc_10",N="_modeBtn_uv8oc_18",x="_modeBtnActive_uv8oc_33",v="_unifiedView_uv8oc_40",j="_diffLine_uv8oc_46",y="_lineNum_uv8oc_55",g="_lineContent_uv8oc_64",C="_lineAdded_uv8oc_68",B="_lineRemoved_uv8oc_73",V="_lineContext_uv8oc_78",w="_sideBySide_uv8oc_83",L="_sidePane_uv8oc_90",$="_sideLabel_uv8oc_100",b="_sideContent_uv8oc_112",A="_empty_uv8oc_117",e={container:_,header:p,modeBtn:N,modeBtnActive:x,unifiedView:v,diffLine:j,lineNum:y,lineContent:g,lineAdded:C,lineRemoved:B,lineContext:V,sideBySide:w,sidePane:L,sideLabel:$,sideContent:b,empty:A};function S(t,c){const d=t.split(`
|
|
2
2
|
`),l=c.split(`
|
|
3
3
|
`),a=[],m=Math.max(d.length,l.length);let s=0,i=0;for(;(s<d.length||i<l.length)&&(s<d.length&&i<l.length?d[s]===l[i]?(a.push({type:"context",content:d[s],lineNum:i+1}),s++,i++):(a.push({type:"removed",content:d[s],lineNum:s+1}),s++,s<d.length&&d[s]===l[i]?(a.push({type:"added",content:l[i],lineNum:i+1}),i++):i<l.length&&(a.push({type:"added",content:l[i],lineNum:i+1}),i++)):s<d.length?(a.push({type:"removed",content:d[s],lineNum:s+1}),s++):i<l.length&&(a.push({type:"added",content:l[i],lineNum:i+1}),i++),!(a.length>m*3)););return a}function E({before:t,after:c}){const{t:d}=f(),[l,a]=h.useState("unified"),m=h.useMemo(()=>S(t??"",c??""),[t,c]);if(!t&&!c)return n.jsx("div",{className:e.container,children:n.jsx("div",{className:e.empty,children:d("changelog.diff.empty","No diff available")})});if(!t&&c){const s=c.split(`
|
|
4
4
|
`);return n.jsx("div",{className:e.container,children:n.jsx("div",{className:e.unifiedView,children:s.map((i,u)=>n.jsxs("div",{className:`${e.diffLine} ${e.lineAdded}`,children:[n.jsx("span",{className:e.lineNum,children:u+1}),n.jsxs("span",{className:e.lineContent,children:["+ ",i]})]},u))})})}return n.jsxs("div",{className:e.container,children:[n.jsxs("div",{className:e.header,children:[n.jsx("button",{className:`${e.modeBtn} ${l==="unified"?e.modeBtnActive:""}`,onClick:()=>a("unified"),children:d("changelog.diff.unified","Unified")}),n.jsx("button",{className:`${e.modeBtn} ${l==="side-by-side"?e.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:d("changelog.diff.sideBySide","Side by Side")})]}),l==="unified"?n.jsx("div",{className:e.unifiedView,children:m.map((s,i)=>n.jsxs("div",{className:`${e.diffLine} ${s.type==="added"?e.lineAdded:s.type==="removed"?e.lineRemoved:e.lineContext}`,children:[n.jsx("span",{className:e.lineNum,children:s.lineNum??""}),n.jsxs("span",{className:e.lineContent,children:[s.type==="added"?"+ ":s.type==="removed"?"- ":" ",s.content]})]},i))}):n.jsxs("div",{className:e.sideBySide,children:[n.jsxs("div",{className:e.sidePane,children:[n.jsx("div",{className:e.sideLabel,children:d("changelog.diff.before","Before")}),n.jsx("div",{className:e.sideContent,children:(t??"").split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H,r as c,i as M,D,k as F,l as G,m as $,b as E,u as q,j as e,T as j,A as K,S as U}from"./index-CkXvRg-O.js";import{I as o}from"./InfoLabel-vz7vtbbV.js";function V(){const{level:s}=H(),[r,C]=c.useState(null),[p,a]=c.useState(null),[N,S]=c.useState(null),[A,u]=c.useState(!1),[m,k]=c.useState(!0),[B,f]=c.useState(!1),[P,L]=c.useState(null),g="gumroad",v=s==="L0",h=c.useCallback(n=>{n&&a(l=>({...l,...n,maskedKey:n.maskedKey??(l==null?void 0:l.maskedKey),provider:n.provider??(l==null?void 0:l.provider)??g}))},[g]),y=c.useCallback(n=>{if(!n){a(null);return}a({...n,provider:n.provider??g})},[g]),_=c.useCallback(async()=>{try{return await M(g)}catch{return null}},[g]);c.useEffect(()=>{let n=!1;async function l(){try{const[i,d,b]=await Promise.all([E.get("/api/dashboard/settings").catch(()=>null),_(),E.get("/sync/config").catch(()=>null)]);if(n)return;i&&C(i),d&&h(d),b&&S(b)}catch{}finally{n||k(!1)}}return l(),()=>{n=!0}},[_,h]),c.useEffect(()=>{const n=new D;n.connect();const l=n.on("license",i=>{_().then(d=>{if(d){if((i==null?void 0:i.cleared)===!0){y(d);return}h(d)}})});return()=>{l(),n.disconnect()}},[_,h,y]);const x=c.useCallback((n,l)=>{L(n??l)},[]),T=c.useCallback(async n=>{if(v)return!1;if(!n.trim())return L("License key is required."),!1;f(!0);try{const l=await F({provider:g,licenseKey:n.trim()});return h(l.license),x(l.message,l.ok?"License updated.":"License activation failed."),l.ok}catch{return L("License activation failed."),!1}finally{f(!1)}},[x,v,g,h]),I=c.useCallback(async()=>{if(!v){f(!0);try{const n=await G({provider:g});h(n.license),x(n.message,n.ok?"License updated.":"License refresh failed.")}catch{L("License refresh failed.")}finally{f(!1)}}},[x,v,g,h]),O=c.useCallback(async()=>{if(!v){f(!0);try{const n=await $({provider:g});y(n.license),x(n.message,n.ok?"License reset.":"License reset failed.")}catch{L("License reset failed.")}finally{f(!1)}}},[x,v,g,y]),w=c.useCallback(async(n,l)=>{if(r){C(i=>i&&{...i,hot:{...i.hot,[n]:l}}),u(!0);try{await E.patch("/api/dashboard/settings",{[n]:l})}catch{C(i=>i&&{...i,hot:{...i.hot,[n]:r.hot[n]}})}finally{u(!1)}}},[r]),R=c.useCallback(async n=>{u(!0);try{const l=await E.post("/sync/config",n);S(l)}catch{}finally{u(!1)}},[]);return{settings:r,license:p,syncConfig:N,saving:A,licenseProvider:g,licenseControlsDisabled:v,licenseSubmitting:B,licenseMessage:P,activateLicense:T,refreshLicense:I,resetLicense:O,updateHotSetting:w,updateSyncConfig:R,loading:m}}const W="_page_1dguc_2",Q="_card_1dguc_10",Y="_licenseCardPro_1dguc_17",z="_cardHeader_1dguc_28",J="_headerBadge_1dguc_42",X="_headerBadgeLive_1dguc_53",Z="_licenseGrid_1dguc_59",ee="_statusDot_1dguc_77",se="_statusActive_1dguc_86",te="_statusGrace_1dguc_91",ie="_statusInactive_1dguc_96",ne="_statusError_1dguc_100",ae="_proBadge_1dguc_105",le="_upgradeLink_1dguc_119",ce="_licenseControls_1dguc_133",oe="_licenseControlRow_1dguc_142",re="_licenseField_1dguc_149",de="_licenseFieldGrow_1dguc_155",ge="_controlLabel_1dguc_160",ue="_textInput_1dguc_166",he="_actionBtn_1dguc_182",pe="_licenseMessage_1dguc_204",me="_licenseNotice_1dguc_211",xe="_licenseNoticeInfo_1dguc_221",ve="_licenseNoticeWarning_1dguc_227",_e="_licenseNoticeMuted_1dguc_233",be="_settingRow_1dguc_239",je="_settingLabel_1dguc_253",fe="_settingControl_1dguc_260",Le="_select_1dguc_267",ye="_numberInput_1dguc_285",Ne="_checkbox_1dguc_303",Ce="_savedIndicator_1dguc_311",Se="_coldGrid_1dguc_324",ke="_coldHint_1dguc_342",Te="_syncForm_1dguc_351",Ie="_syncRow_1dguc_357",we="_syncField_1dguc_364",Re="_saveBtn_1dguc_378",Ee="_langRow_1dguc_402",Ae="_loading_1dguc_415",Be="_unit_1dguc_424",t={page:W,card:Q,licenseCardPro:Y,cardHeader:z,headerBadge:J,headerBadgeLive:X,licenseGrid:Z,statusDot:ee,statusActive:se,statusGrace:te,statusInactive:ie,statusError:ne,proBadge:ae,upgradeLink:le,licenseControls:ce,licenseControlRow:oe,licenseField:re,licenseFieldGrow:de,controlLabel:ge,textInput:ue,actionBtn:he,licenseMessage:pe,licenseNotice:me,licenseNoticeInfo:xe,licenseNoticeWarning:ve,licenseNoticeMuted:_e,settingRow:be,settingLabel:je,settingControl:fe,select:Le,numberInput:ye,checkbox:Ne,savedIndicator:Ce,coldGrid:Se,coldHint:ke,syncForm:Te,syncRow:Ie,syncField:we,saveBtn:Re,langRow:Ee,loading:Ae,unit:Be},Pe={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},Oe=["debug","info","warn","error"];function He(s){return s==="active"?t.statusActive:s==="grace"?t.statusGrace:s==="invalid"||s==="revoked"?t.statusError:t.statusInactive}function Me(s,r){return s.refreshBlockedReason==="missing_session_token"?{label:r("settings.license.status.activationRequired","Activation Required"),tooltip:r("settings.license.status.activationRequired.tooltip","Manual license activation is required before the dashboard can refresh this status."),detail:r("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:t.licenseNoticeWarning}:s.statusDetail==="grace_provider_unavailable"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:r("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:t.licenseNoticeInfo}:s.statusDetail==="grace_cancelled"||s.statusDetail==="grace_expired"||s.statusDetail==="grace_payment_failed"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:r("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:t.licenseNoticeInfo}:{label:r(`settings.license.${s.status}`,s.status),tooltip:r(`settings.license.${s.status}.tooltip`,"Current license activation state."),detail:s.refreshRequired?r("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:t.licenseNoticeMuted}}function Ge(){const{t:s,selectedLocale:r,setLocale:C}=q(),{settings:p,license:a,syncConfig:N,saving:S,licenseProvider:A,licenseControlsDisabled:u,licenseSubmitting:m,licenseMessage:k,activateLicense:B,refreshLicense:f,resetLicense:P,updateHotSetting:L,updateSyncConfig:g,loading:v}=V(),[h,y]=c.useState(null),[_,x]=c.useState({}),[T,I]=c.useState(""),O=a?Me(a,s):null,w=(a==null?void 0:a.tier)==="pro",R=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0;c.useEffect(()=>{N&&x({maxDepth:N.maxDepth,maxInstances:N.maxInstances})},[N]);const n=c.useCallback(async(i,d)=>{await L(i,d),y(i),setTimeout(()=>y(b=>b===i?null:b),2e3)},[L]),l=c.useCallback(async()=>{await g(_)},[g,_]);return v?e.jsx("div",{className:t.page,children:e.jsx("div",{className:t.loading,children:s("common.loading")})}):e.jsxs("div",{className:t.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[t.card,(a==null?void 0:a.tier)==="pro"?t.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.license.title","License"),tooltip:s("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(j,{text:u?s("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from the dashboard."):s("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${t.headerBadge} ${u?"":t.headerBadgeLive}`,children:u?s("settings.license.disconnected","Disconnected"):s("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const i=O;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.licenseGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.status","Status"),tooltip:s("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${t.statusDot} ${He(a.status)}`}),e.jsx(j,{text:(i==null?void 0:i.tooltip)??s(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(i==null?void 0:i.label)??s(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.tier","Tier"),tooltip:s("settings.license.tier.tooltip","Current subscription tier for available dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?t.proBadge:"",children:e.jsx(j,{text:s(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?s("tier.pro","Pro"):s("tier.basic","Basic")})}),R&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.key","Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:R})})]}),a.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.license.providerValue.tooltip","License provider used to validate this key."),children:a.provider})})]})]}),(i==null?void 0:i.detail)&&e.jsx("p",{className:`${t.licenseNotice} ${i.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?s("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):i.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${t.licenseNotice} ${t.licenseNoticeMuted}`,children:i==null?void 0:i.detail})]})})(),a.tier==="basic"&&e.jsx("a",{className:t.upgradeLink,href:"https://gum.co/u/din5in7h",target:"_blank",rel:"noopener noreferrer",children:s("tier.upgrade")})]}):e.jsx("div",{className:t.loading,children:s("settings.license.unavailable")}),e.jsxs("div",{className:t.licenseControls,children:[e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:t.licenseField,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":s("settings.license.provider","Provider"),className:t.select,value:A,disabled:u||m,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m||!w,onClick:()=>{f()},children:m?s("common.loading"):s("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m||!w,onClick:()=>{P()},children:m?s("common.loading"):s("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:`${t.licenseField} ${t.licenseFieldGrow}`,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.keyInput","License Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":s("settings.license.keyInput","License Key"),className:t.textInput,type:"text",value:T,disabled:u||m,onChange:i=>I(i.target.value)})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m,onClick:()=>{(async()=>await B(T)&&I(""))()},children:m?s("common.loading"):s("settings.license.activate","Activate License")})]}),k&&e.jsx("p",{className:t.licenseMessage,children:k})]})]})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.general.title","General Settings"),tooltip:s("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(j,{text:s("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${t.headerBadge} ${t.headerBadgeLive}`,children:s("settings.general.liveApply","Live Apply")})})]}),p?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.logLevel","Log Level"),tooltip:s("settings.general.logLevel.tooltip","Sets how much detail the dashboard writes to its logs.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("select",{className:t.select,value:p.hot.LOG_LEVEL,onChange:i=>n("LOG_LEVEL",i.target.value),children:Oe.map(i=>e.jsx("option",{value:i,children:i},i))}),h==="LOG_LEVEL"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localHistory","Tool History Recording"),tooltip:s("settings.general.localHistory.tooltip","Stores local tool execution history for the dashboard history views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"checkbox",className:t.checkbox,checked:p.hot.ENABLE_LOCAL_HISTORY,onChange:i=>n("ENABLE_LOCAL_HISTORY",i.target.checked)}),h==="ENABLE_LOCAL_HISTORY"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localStatistics","Tool Statistics Collection"),tooltip:s("settings.general.localStatistics.tooltip","Aggregates local usage statistics for dashboard reporting.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"checkbox",className:t.checkbox,checked:p.hot.ENABLE_LOCAL_STATISTICS,onChange:i=>n("ENABLE_LOCAL_STATISTICS",i.target.checked)}),h==="ENABLE_LOCAL_STATISTICS"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.requestTimeout","Request Timeout"),tooltip:s("settings.general.requestTimeout.tooltip","Maximum time the dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"number",className:t.numberInput,value:p.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||n("REQUEST_TIMEOUT",d)}}),e.jsx(j,{text:s("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:t.unit,children:s("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.cold.title","Server Environment"),tooltip:s("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(j,{text:s("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:t.headerBadge,children:s("settings.readOnly","Read-only")})})]}),p?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.coldGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:"HTTP_PORT",tooltip:s("settings.cold.httpPort.tooltip","Port number used by the MCP dashboard HTTP server.")})}),e.jsx("dd",{children:p.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(o,{label:"HTTP_HOST",tooltip:s("settings.cold.httpHost.tooltip","Host interface that the MCP dashboard HTTP server binds to.")})}),e.jsx("dd",{children:p.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(o,{label:"DASHBOARD_AUTO_OPEN",tooltip:s("settings.cold.dashboardAutoOpen.tooltip","Controls whether the dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening the dashboard in a browser."),children:String(p.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:t.coldHint,children:s("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.sync.title","Sync Settings"),tooltip:s("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:t.syncForm,children:[e.jsxs("div",{className:t.syncRow,children:[e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxDepth","Max Depth"),tooltip:s("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:_.maxDepth??10,min:1,max:100,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||x(b=>({...b,maxDepth:d}))}})]}),e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxInstances","Max Instances"),tooltip:s("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:_.maxInstances??5e3,min:100,max:5e4,step:100,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||x(b=>({...b,maxInstances:d}))}})]})]}),e.jsx("button",{className:t.saveBtn,onClick:l,disabled:S,children:S?s("common.loading"):s("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.language.title","Language"),tooltip:s("settings.language.title.tooltip","Choose how the dashboard interface text is localized.")})}),e.jsxs("div",{className:t.langRow,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.language.dashboard","Dashboard Language"),tooltip:s("settings.language.dashboard.tooltip","Overrides the dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:t.select,value:r,onChange:i=>C(i.target.value),children:[e.jsx("option",{value:K,children:s("settings.language.auto","Auto")}),U.map(i=>e.jsx("option",{value:i,children:Pe[i]??i},i))]})]})]})]})}export{Ge as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_1dguc_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_1dguc_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._licenseCardPro_1dguc_17{border-color:var(--pro-border);background:linear-gradient(180deg,var(--pro-bg-soft),transparent 28%),var(--bg-card);box-shadow:inset 0 1px #f3d46b2e,0 0 0 1px #8f6f1f24}._cardHeader_1dguc_28{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._headerBadge_1dguc_42{font-size:10px;font-weight:400;padding:2px 8px;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);text-transform:none;letter-spacing:0}._headerBadgeLive_1dguc_53{color:var(--success);border-color:var(--success)}._licenseGrid_1dguc_59{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._licenseGrid_1dguc_59 dt{color:var(--text-muted)}._licenseGrid_1dguc_59 dd{color:var(--text-primary);margin:0}._statusDot_1dguc_77{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle}._statusActive_1dguc_86{background:var(--success);box-shadow:0 0 4px var(--success)}._statusGrace_1dguc_91{background:var(--warning, #b7791f);box-shadow:0 0 4px color-mix(in srgb,var(--warning, #b7791f) 70%,transparent)}._statusInactive_1dguc_96{background:var(--text-muted)}._statusError_1dguc_100{background:var(--error)}._proBadge_1dguc_105{color:var(--pro-badge);font-weight:500}._licenseCardPro_1dguc_17 ._cardHeader_1dguc_28 span:first-child{color:var(--pro-text)}._licenseCardPro_1dguc_17 ._licenseGrid_1dguc_59 dt{color:var(--pro-badge)}._upgradeLink_1dguc_119{display:inline-block;margin-top:8px;font-family:var(--font-label);font-size:12px;color:var(--accent);cursor:pointer;text-decoration:underline}._upgradeLink_1dguc_119:hover{opacity:.8}._licenseControls_1dguc_133{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}._licenseControlRow_1dguc_142{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}._licenseField_1dguc_149{display:flex;flex-direction:column;gap:6px}._licenseFieldGrow_1dguc_155{flex:1;min-width:220px}._controlLabel_1dguc_160{font-family:var(--font-label);font-size:12px;color:var(--text-primary)}._textInput_1dguc_166{font-family:var(--font-code);font-size:12px;padding:6px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);outline:none;transition:border-color var(--transition)}._textInput_1dguc_166:focus{border-color:var(--accent)}._actionBtn_1dguc_182{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition),opacity var(--transition)}._actionBtn_1dguc_182:hover{background:var(--accent);color:var(--bg-primary)}._actionBtn_1dguc_182:disabled{opacity:.5;cursor:not-allowed}._licenseMessage_1dguc_204{margin:0;font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._licenseNotice_1dguc_211{margin:12px 0 0;padding:10px 12px;border-radius:8px;border:1px solid var(--border);font-family:var(--font-label);font-size:12px;line-height:1.5}._licenseNoticeInfo_1dguc_221{color:var(--text-primary);background:color-mix(in srgb,var(--accent) 8%,transparent);border-color:color-mix(in srgb,var(--accent) 28%,var(--border))}._licenseNoticeWarning_1dguc_227{color:var(--text-primary);background:color-mix(in srgb,var(--warning, #b7791f) 12%,transparent);border-color:color-mix(in srgb,var(--warning, #b7791f) 34%,var(--border))}._licenseNoticeMuted_1dguc_233{color:var(--text-secondary);background:var(--bg-secondary)}._settingRow_1dguc_239{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}._settingRow_1dguc_239:last-child{border-bottom:none}._settingLabel_1dguc_253{font-family:var(--font-label);color:var(--text-primary);flex:1}._settingControl_1dguc_260{display:flex;align-items:center;gap:8px}._select_1dguc_267{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;outline:none;transition:border-color var(--transition)}._select_1dguc_267:focus{border-color:var(--accent)}._numberInput_1dguc_285{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);width:80px;outline:none;transition:border-color var(--transition)}._numberInput_1dguc_285:focus{border-color:var(--accent)}._checkbox_1dguc_303{width:16px;height:16px;cursor:pointer;accent-color:var(--accent)}._savedIndicator_1dguc_311{font-family:var(--font-code);font-size:11px;color:var(--success);opacity:1;transition:opacity .3s ease}._savedIndicatorHidden_1dguc_319{opacity:0}._coldGrid_1dguc_324{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._coldGrid_1dguc_324 dt{color:var(--text-muted)}._coldGrid_1dguc_324 dd{color:var(--text-primary);margin:0}._coldHint_1dguc_342{margin-top:10px;font-family:var(--font-label);font-size:12px;color:var(--text-muted);font-style:italic}._syncForm_1dguc_351{display:flex;flex-direction:column;gap:10px}._syncRow_1dguc_357{display:flex;align-items:center;gap:16px;flex-wrap:wrap}._syncField_1dguc_364{display:flex;align-items:center;gap:8px;font-size:13px}._syncField_1dguc_364 label{font-family:var(--font-label);color:var(--text-primary);white-space:nowrap}._saveBtn_1dguc_378{align-self:flex-end;font-family:var(--font-label);font-size:12px;padding:6px 16px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition)}._saveBtn_1dguc_378:hover{background:var(--accent);color:var(--bg-primary)}._saveBtn_1dguc_378:disabled{opacity:.5;cursor:not-allowed}._langRow_1dguc_402{display:flex;align-items:center;gap:12px;font-size:13px}._langRow_1dguc_402 label{font-family:var(--font-label);color:var(--text-primary)}._loading_1dguc_415{color:var(--text-muted);font-family:var(--font-code);font-size:13px;padding:32px 0;text-align:center}._unit_1dguc_424{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as s}from"./index-
|
|
1
|
+
import{u as o,j as s}from"./index-CkXvRg-O.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};
|