@weppy/roblox-mcp 2.7.12 → 2.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dashboard/dist/assets/AssetsPage-CGgBe-s5.css +1 -0
  3. package/dashboard/dist/assets/AssetsPage-UVXVmDv7.js +46 -0
  4. package/dashboard/dist/assets/{ChangelogDetailPage-DvPPM9T3.js → ChangelogDetailPage-BpYn-_uJ.js} +1 -1
  5. package/dashboard/dist/assets/{ChangelogPage-Bcs7jwin.js → ChangelogPage-BGqHwmkj.js} +1 -1
  6. package/dashboard/dist/assets/{ConfirmModal-DuQQ9DXj.js → ConfirmModal-lSOkaAvB.js} +1 -1
  7. package/dashboard/dist/assets/{ConnectionPage-Cn93dfbJ.js → ConnectionPage-BKHQPyJV.js} +1 -1
  8. package/dashboard/dist/assets/{GameChangeDetail-oLGK_BBE.js → GameChangeDetail-DjupgTS5.js} +1 -1
  9. package/dashboard/dist/assets/{InfoLabel-BcS5cIV_.js → InfoLabel-BkXtpBzT.js} +1 -1
  10. package/dashboard/dist/assets/{OverviewPage-E8WwwGNq.js → OverviewPage-D-ZhLkmY.js} +1 -1
  11. package/dashboard/dist/assets/{PlaytestPage-BWsipUQn.js → PlaytestPage-vBV2EzAl.js} +1 -1
  12. package/dashboard/dist/assets/{SettingsPage-DwbN1aSf.js → SettingsPage-KOJtVHm4.js} +1 -1
  13. package/dashboard/dist/assets/{StatusBadge-BSLWjWJC.js → StatusBadge-C0DYxkUy.js} +1 -1
  14. package/dashboard/dist/assets/{SyncPage-x5VxuyyM.js → SyncPage-CJfFG48l.js} +1 -1
  15. package/dashboard/dist/assets/{Tabs-CQJ_0DaJ.js → Tabs-B4kZyHzy.js} +1 -1
  16. package/dashboard/dist/assets/{ToolsPage-BhDP0i6y.js → ToolsPage-CB2Sn5ZE.js} +1 -1
  17. package/dashboard/dist/assets/{TooltipText-baLGgLqW.js → TooltipText-59Xfc1Ui.js} +1 -1
  18. package/dashboard/dist/assets/UiStudioPage-CPmYO3Vj.js +11 -0
  19. package/dashboard/dist/assets/WhatsNewPage-ClHLVkbF.js +1 -0
  20. package/dashboard/dist/assets/index-BIVkyPD7.js +454 -0
  21. package/dashboard/dist/assets/{sample-requests-DeMovtVY.js → sample-requests-DyHFY41o.js} +1 -1
  22. package/dashboard/dist/assets/{useLiveUptime-BVeJvePr.js → useLiveUptime-C1ZSqLmR.js} +1 -1
  23. package/dashboard/dist/assets/x-sRJSvoLm.js +6 -0
  24. package/dashboard/dist/index.html +1 -1
  25. package/dist/index.js +78 -77
  26. package/package.json +1 -1
  27. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  28. package/dashboard/dist/assets/UiStudioPage-CFrAh41s.js +0 -16
  29. package/dashboard/dist/assets/WhatsNewPage-D6bLZq0v.js +0 -1
  30. package/dashboard/dist/assets/index-IFwX560t.js +0 -449
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
5
 
6
+
7
+ ## [2.7.13] - 2026-06-02
8
+
9
+ ### Stability
10
+
11
+ - **Stability improvements** — WEPPY now tracks first-time MCP usage more reliably for operations reporting while keeping existing Studio workflows unchanged. No setup changes are required.
12
+
6
13
  ## [2.7.12] - 2026-05-28
7
14
 
8
15
  ### Features
@@ -0,0 +1 @@
1
+ ._page_1ld7j_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._headerRow_1ld7j_9{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}._headerRow_1ld7j_9 h1{margin:0;font-size:22px;letter-spacing:0}._headerRow_1ld7j_9 p{margin:4px 0 0;color:var(--text-secondary);font-size:13px}._headerMeta_1ld7j_28{display:grid;justify-items:end;gap:2px;color:var(--text-secondary);font-size:12px}._headerMeta_1ld7j_28 strong{color:var(--text-primary);font-size:20px}._toolbar_1ld7j_41{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbarActions_1ld7j_49,._actionRow_1ld7j_50,._copyRow_1ld7j_51,._buttonRow_1ld7j_52{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_1ld7j_59{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--bg-card)}._segmented_1ld7j_59 button{border:0;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;cursor:pointer}._segmented_1ld7j_59 button:last-child{border-right:0}._segmented_1ld7j_59 ._segmentedActive_1ld7j_83{background:var(--accent-dim);color:var(--accent)}._filterLabel_1ld7j_88{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_1ld7j_88 select{min-height:32px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._commandButton_1ld7j_106,._primaryButton_1ld7j_107,._iconButton_1ld7j_108{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition),opacity var(--transition)}._commandButton_1ld7j_106{min-height:32px;padding:6px 10px}._primaryButton_1ld7j_107{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_1ld7j_108{width:32px;height:32px;padding:0}._commandButton_1ld7j_106:hover,._primaryButton_1ld7j_107:hover,._iconButton_1ld7j_108:hover{border-color:var(--accent)}._commandButton_1ld7j_106:disabled,._primaryButton_1ld7j_107:disabled,._iconButton_1ld7j_108:disabled{cursor:not-allowed;opacity:.5}._grid_1ld7j_154{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_1ld7j_160{display:flex;flex-direction:column;gap:8px;min-width:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:8px;color:var(--text-primary);text-align:left;cursor:pointer}._assetCardSelected_1ld7j_174{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_1ld7j_179{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_1ld7j_179{width:100%;height:100%;object-fit:contain}._thumbnailFallback_1ld7j_195{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:8px;color:var(--text-secondary);background:var(--bg-card)}._assetCardBody_1ld7j_206{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_1ld7j_213{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_1ld7j_221{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_1ld7j_228,._categoryPill_1ld7j_229{border:1px solid var(--border);border-radius:4px;padding:2px 6px;font-size:11px;color:var(--text-secondary)}._categoryPill_1ld7j_229{color:var(--text-primary);background:var(--bg-secondary)}._status_uploaded_1ld7j_242{color:var(--success);border-color:var(--success)}._status_failed_1ld7j_247{color:var(--error);border-color:var(--error)}._status_processing_1ld7j_252,._status_uploading_1ld7j_253{color:var(--warning);border-color:var(--warning)}._assetId_1ld7j_258,._scopeText_1ld7j_259,._muted_1ld7j_260{color:var(--text-muted);font-size:12px}._emptyState_1ld7j_265,._notice_1ld7j_266,._errorState_1ld7j_267,._messageState_1ld7j_268{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_1ld7j_265{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_1ld7j_265 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_1ld7j_266{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_1ld7j_298{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_1ld7j_267{color:var(--error);border-color:var(--error)}._messageState_1ld7j_268{color:var(--success);border-color:var(--success)}._drawer_1ld7j_314{position:fixed;top:0;right:0;z-index:40;width:min(460px,100vw);height:100vh;overflow-y:auto;border-left:1px solid var(--border);background:var(--bg-primary);padding:18px;box-shadow:-12px 0 24px #00000047}._settingsDrawer_1ld7j_328{width:min(580px,100vw)}._detailPopupLayer_1ld7j_332{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;padding:clamp(12px,2vw,24px);background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-sizing:border-box}._detailDialog_1ld7j_348{width:min(1120px,100%);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);box-shadow:0 24px 60px #0000006b}._detailDialog_1ld7j_348:focus{outline:none}._detailDialogHeader_1ld7j_365{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 92%,var(--bg-secondary))}._detailTitleBlock_1ld7j_376{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_1ld7j_376 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_1ld7j_376 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_1ld7j_398{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_1ld7j_407{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_1ld7j_415{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_1ld7j_424{min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:24px;border-right:1px solid var(--border);background:var(--bg-secondary)}._detailPreview_1ld7j_424,._detailPreviewFallback_1ld7j_436{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_1ld7j_424{display:block;object-fit:contain}._detailPreviewFallback_1ld7j_436{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_1ld7j_436 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailContentPane_1ld7j_463{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_1ld7j_463 ._formStack_1ld7j_469{margin-top:0}._drawerHeader_1ld7j_473{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._drawerHeader_1ld7j_473 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_1ld7j_473 span{color:var(--text-muted);font-size:12px}._preview_1ld7j_492,._previewFallback_1ld7j_493{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_1ld7j_492{object-fit:contain}._previewFallback_1ld7j_493{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_1ld7j_493 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_1ld7j_469,._detailSection_1ld7j_520,._noticeList_1ld7j_521,._settingsPanel_1ld7j_522{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_1ld7j_521{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_1ld7j_521 p{margin:0}._field_1ld7j_539{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._field_1ld7j_539 input,._field_1ld7j_539 textarea,._field_1ld7j_539 select{width:100%;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._twoColumn_1ld7j_559{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_1ld7j_520{padding-top:12px;border-top:1px solid var(--border)}._detailSection_1ld7j_520 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_1ld7j_576,._compactMeta_1ld7j_577{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_1ld7j_577{border:1px solid var(--border);border-radius:6px;padding:10px;background:var(--bg-card)}._detailGrid_1ld7j_576 dt,._compactMeta_1ld7j_577 dt{color:var(--text-muted)}._detailGrid_1ld7j_576 dd,._compactMeta_1ld7j_577 dd{margin:0;min-width:0;overflow-wrap:anywhere}._hashText_1ld7j_604{font-family:var(--font-code)}._usageList_1ld7j_608{display:flex;flex-direction:column;gap:8px}._usageItem_1ld7j_614{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._usageItem_1ld7j_614 strong{color:var(--text-primary);overflow-wrap:anywhere}._usageItem_1ld7j_614 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_1ld7j_522{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._toggleRow_1ld7j_641{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_1ld7j_641 span{display:grid;gap:3px}._toggleRow_1ld7j_641 small,._inlineHelp_1ld7j_655{color:var(--text-muted);font-size:12px}._toggleRow_1ld7j_641 input{width:18px;height:18px}._inlineHelp_1ld7j_655{margin:0}._inlineHelp_1ld7j_655 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_1ld7j_332{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_1ld7j_415{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_1ld7j_332{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_1ld7j_365{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_1ld7j_407{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_1ld7j_415{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_1ld7j_424{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_1ld7j_424,._detailPreviewFallback_1ld7j_436{max-width:340px}._detailContentPane_1ld7j_463{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_1ld7j_9,._toolbar_1ld7j_41{align-items:stretch;flex-direction:column}._headerMeta_1ld7j_28{justify-items:start}._toolbarActions_1ld7j_49{justify-content:flex-start}._twoColumn_1ld7j_559{grid-template-columns:1fr}}
@@ -0,0 +1,46 @@
1
+ import{q as A,a as w,s as D,u as E,j as s,P as re,I as de,r as i,R as Z,k as ue,i as pe,l as he,t as me}from"./index-BIVkyPD7.js";import{T as R}from"./TooltipText-59Xfc1Ui.js";import{X as K}from"./x-sRJSvoLm.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ge=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ye=A("arrow-left",ge);/**
7
+ * @license lucide-react v1.8.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const xe=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],je=A("audio-lines",xe);/**
12
+ * @license lucide-react v1.8.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const _e=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}]],be=A("badge",_e);/**
17
+ * @license lucide-react v1.8.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const ve=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],fe=A("box",ve);/**
22
+ * @license lucide-react v1.8.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Ce=[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]],Ne=A("clapperboard",Ce);/**
27
+ * @license lucide-react v1.8.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const ke=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],V=A("copy",ke);/**
32
+ * @license lucide-react v1.8.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const we=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],Se=A("film",we);/**
37
+ * @license lucide-react v1.8.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Ae=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pe=A("search",Ae);/**
42
+ * @license lucide-react v1.8.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Ie=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],q=A("upload",Ie),Be=["image","decal","audio","mesh","model","video","animation"];function X(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function L(e){const l=X(e);return l?`?placeId=${encodeURIComponent(l.placeId)}`:""}function G(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function M(e,l){return`${G(e)}/${encodeURIComponent(l)}`}async function J(e){return w.get(G(e),X(e))}async function Re(e){const u=(await Promise.all(Be.map(a=>J({...e,category:a})))).flatMap(a=>a.assets);return u.sort((a,n)=>n.createdAt.localeCompare(a.createdAt)||n.id.localeCompare(a.id)),{assets:u,totalCount:u.length}}async function Le(e){return w.post(`${G(e)}/rescan${L(e)}`,{})}async function $e(e,l,u){return(await w.patch(`${M(e,l)}${L(e)}`,u)).asset}async function Ee(e,l,u){return(await w.post(`${M(e,l)}/upload${L(e)}`,u)).asset}async function Ue(e,l){return(await w.post(`${M(e,l)}/status-refresh${L(e)}`,{})).asset}async function De(e,l,u){const a={...e,placeId:u??e.placeId};return w.post(`${M(e,l)}/usage-scan${L(a)}`,{})}function Q(e){return e.fileUrl?`${D}${e.fileUrl}`:`${D}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${L({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function Me(e){return e.previewUrl?`${D}${e.previewUrl}`:`${D}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${L({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const Fe="_page_1ld7j_1",Te="_headerRow_1ld7j_9",Oe="_headerMeta_1ld7j_28",He="_toolbar_1ld7j_41",ze="_toolbarActions_1ld7j_49",Ke="_actionRow_1ld7j_50",Ge="_copyRow_1ld7j_51",Ye="_buttonRow_1ld7j_52",We="_segmented_1ld7j_59",Ve="_segmentedActive_1ld7j_83",Ze="_filterLabel_1ld7j_88",qe="_commandButton_1ld7j_106",Xe="_primaryButton_1ld7j_107",Je="_iconButton_1ld7j_108",Qe="_grid_1ld7j_154",es="_assetCard_1ld7j_160",ss="_assetCardSelected_1ld7j_174",ts="_thumbnailWrap_1ld7j_179",as="_thumbnail_1ld7j_179",ls="_thumbnailFallback_1ld7j_195",ns="_assetCardBody_1ld7j_206",os="_assetName_1ld7j_213",is="_assetMeta_1ld7j_221",cs="_statusChip_1ld7j_228",rs="_categoryPill_1ld7j_229",ds="_status_uploaded_1ld7j_242",us="_status_failed_1ld7j_247",ps="_status_processing_1ld7j_252",hs="_status_uploading_1ld7j_253",ms="_assetId_1ld7j_258",gs="_scopeText_1ld7j_259",ys="_muted_1ld7j_260",xs="_emptyState_1ld7j_265",js="_notice_1ld7j_266",_s="_errorState_1ld7j_267",bs="_messageState_1ld7j_268",vs="_proNotice_1ld7j_298",fs="_drawer_1ld7j_314",Cs="_settingsDrawer_1ld7j_328",Ns="_detailPopupLayer_1ld7j_332",ks="_detailDialog_1ld7j_348",ws="_detailDialogHeader_1ld7j_365",Ss="_detailTitleBlock_1ld7j_376",As="_detailEyebrow_1ld7j_398",Ps="_detailHeaderActions_1ld7j_407",Is="_detailDialogBody_1ld7j_415",Bs="_detailPreviewPane_1ld7j_424",Rs="_detailPreview_1ld7j_424",Ls="_detailPreviewFallback_1ld7j_436",$s="_detailContentPane_1ld7j_463",Es="_formStack_1ld7j_469",Us="_drawerHeader_1ld7j_473",Ds="_preview_1ld7j_492",Ms="_previewFallback_1ld7j_493",Fs="_detailSection_1ld7j_520",Ts="_noticeList_1ld7j_521",Os="_settingsPanel_1ld7j_522",Hs="_field_1ld7j_539",zs="_twoColumn_1ld7j_559",Ks="_detailGrid_1ld7j_576",Gs="_compactMeta_1ld7j_577",Ys="_hashText_1ld7j_604",Ws="_usageList_1ld7j_608",Vs="_usageItem_1ld7j_614",Zs="_toggleRow_1ld7j_641",qs="_inlineHelp_1ld7j_655",t={page:Fe,headerRow:Te,headerMeta:Oe,toolbar:He,toolbarActions:ze,actionRow:Ke,copyRow:Ge,buttonRow:Ye,segmented:We,segmentedActive:Ve,filterLabel:Ze,commandButton:qe,primaryButton:Xe,iconButton:Je,grid:Qe,assetCard:es,assetCardSelected:ss,thumbnailWrap:ts,thumbnail:as,thumbnailFallback:ls,assetCardBody:ns,assetName:os,assetMeta:is,statusChip:cs,categoryPill:rs,status_uploaded:ds,status_failed:us,status_processing:ps,status_uploading:hs,assetId:ms,scopeText:gs,muted:ys,emptyState:xs,notice:js,errorState:_s,messageState:bs,proNotice:vs,drawer:fs,settingsDrawer:Cs,detailPopupLayer:Ns,detailDialog:ks,detailDialogHeader:ws,detailTitleBlock:Ss,detailEyebrow:As,detailHeaderActions:Ps,detailDialogBody:Is,detailPreviewPane:Bs,detailPreview:Rs,detailPreviewFallback:Ls,detailContentPane:$s,formStack:Es,drawerHeader:Us,preview:Ds,previewFallback:Ms,detailSection:Fs,noticeList:Ts,settingsPanel:Os,field:Hs,twoColumn:zs,detailGrid:Ks,compactMeta:Gs,hashText:Ys,usageList:Ws,usageItem:Vs,toggleRow:Zs,inlineHelp:qs},Xs={image:de,decal:be,audio:je,mesh:fe,model:re,video:Se,animation:Ne};function B(e,l){return l(`assets.category.${e}`,e)}function z(e,l){return l(`assets.status.${e}`,e)}function Js(e){return e.category==="image"||e.category==="decal"}function Qs({assets:e,selectedAssetId:l,onSelect:u}){const{t:a}=E();return e.length===0?s.jsxs("div",{className:t.emptyState,children:[s.jsx("p",{children:a("assets.empty.title","No assets yet")}),s.jsx("span",{children:a("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):s.jsx("div",{className:t.grid,children:e.map(n=>{const _=Xs[n.category];return s.jsxs("button",{type:"button",className:[t.assetCard,l===n.id?t.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>u(n.id),children:[s.jsx("span",{className:t.thumbnailWrap,children:Js(n)?s.jsx("img",{className:t.thumbnail,src:Me(n),alt:n.displayName,loading:"lazy"}):s.jsx("span",{className:t.thumbnailFallback,"aria-hidden":"true",children:s.jsx(_,{size:30})})}),s.jsxs("span",{className:t.assetCardBody,children:[s.jsx("span",{className:t.assetName,children:n.displayName}),s.jsxs("span",{className:t.assetMeta,children:[s.jsx("span",{className:t.categoryPill,children:B(n.category,a)}),s.jsx("span",{className:`${t.statusChip} ${t[`status_${n.status}`]??""}`,children:z(n.status,a)})]}),s.jsxs("span",{className:t.assetMeta,children:[s.jsx("span",{className:t.scopeText,children:n.scope.kind==="shared"?a("assets.scope.shared","Shared"):a("assets.scope.place","Current Place")}),s.jsx("span",{className:t.assetId,children:n.roblox.assetId?`#${n.roblox.assetId}`:a("assets.status.localOnly","Local only")})]})]})]},n.id)})})}function et(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function st(e){return e.category==="image"||e.category==="decal"}function tt({asset:e,busyAction:l,canUpload:u,onClose:a,onSave:n,onUpload:_,onRefreshStatus:p,onScanUsage:m}){const{t:o}=E(),f=i.useRef(null),[g,k]=i.useState(""),[y,C]=i.useState("");if(i.useEffect(()=>{k((e==null?void 0:e.displayName)??""),C((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var c;if(!e)return;(c=f.current)==null||c.focus();const d=b=>{b.key==="Escape"&&a()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,a]),!e)return null;const P=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),x=!!e.roblox.assetUri;return s.jsx("div",{className:t.detailPopupLayer,onClick:a,role:"presentation",children:s.jsxs("section",{ref:f,className:t.detailDialog,role:"dialog","aria-modal":"true","aria-label":o("assets.detail.title","Asset details"),tabIndex:-1,onClick:d=>d.stopPropagation(),children:[s.jsxs("div",{className:t.detailDialogHeader,children:[s.jsxs("div",{className:t.detailTitleBlock,children:[s.jsxs("span",{className:t.detailEyebrow,children:[B(e.category,o)," · ",z(e.status,o)]}),s.jsx("h2",{children:o("assets.detail.title","Asset details")}),s.jsx("span",{children:e.id})]}),s.jsxs("div",{className:t.detailHeaderActions,children:[s.jsx(R,{text:u?o("assets.upload.open.tooltip","Upload this local file to Roblox with the saved API key."):o("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:!u,onClick:_,children:[s.jsx(q,{size:15}),o("assets.upload.open","Upload")]})}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!P||l==="status-refresh",onClick:()=>void p(),children:[s.jsx(Z,{size:15}),o("assets.detail.refreshStatus","Refresh")]}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!e.roblox.assetId||l==="usage-scan",onClick:()=>void m(),children:[s.jsx(Pe,{size:15}),o("assets.detail.scanUsage","Scan usage")]}),s.jsx(R,{text:o("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:a,"aria-label":o("common.close","Close"),children:s.jsx(K,{size:16})})})]})]}),s.jsxs("div",{className:t.detailDialogBody,children:[s.jsx("div",{className:t.detailPreviewPane,children:st(e)?s.jsx("img",{className:t.detailPreview,src:Q(e),alt:e.displayName}):s.jsxs("div",{className:t.detailPreviewFallback,children:[s.jsx("span",{children:B(e.category,o)}),s.jsx("code",{children:e.file.original})]})}),s.jsxs("div",{className:t.detailContentPane,children:[s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:o("assets.detail.displayName","Display name")}),s.jsx("input",{value:g,onChange:d=>k(d.target.value)})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:o("assets.detail.description","Description")}),s.jsx("textarea",{value:y,rows:3,onChange:d=>C(d.target.value)})]}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:l==="update",onClick:()=>void n(g,y),children:o("assets.detail.save","Save metadata")})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.localFile","Local file")}),s.jsxs("dl",{className:t.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.category","Category")}),s.jsx("dd",{children:B(e.category,o)}),s.jsx("dt",{children:o("assets.detail.scope","Scope")}),s.jsx("dd",{children:e.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),s.jsx("dt",{children:o("assets.detail.mimeType","Type")}),s.jsx("dd",{children:e.file.mimeType}),s.jsx("dt",{children:o("assets.detail.size","Size")}),s.jsx("dd",{children:et(e.file.sizeBytes)}),s.jsx("dt",{children:o("assets.detail.source","Source")}),s.jsx("dd",{children:e.source.originalPath}),s.jsx("dt",{children:o("assets.detail.sha256","SHA-256")}),s.jsx("dd",{className:t.hashText,children:e.file.sha256})]})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.roblox","Roblox")}),s.jsxs("dl",{className:t.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.status","Status")}),s.jsx("dd",{children:z(e.status,o)}),s.jsx("dt",{children:o("assets.detail.assetId","Asset ID")}),s.jsx("dd",{children:e.roblox.assetId??o("assets.status.localOnly","Local only")}),e.roblox.errorMessage&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.error","Error")}),s.jsx("dd",{children:e.roblox.errorMessage})]})]}),s.jsxs("div",{className:t.copyRow,children:[s.jsxs("button",{type:"button",className:t.commandButton,disabled:!e.roblox.assetId,onClick:()=>{var d;return e.roblox.assetId&&void((d=navigator.clipboard)==null?void 0:d.writeText(e.roblox.assetId))},children:[s.jsx(V,{size:15}),o("assets.detail.copyAssetId","Copy ID")]}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!x,onClick:()=>{var d;return e.roblox.assetUri&&void((d=navigator.clipboard)==null?void 0:d.writeText(e.roblox.assetUri))},children:[s.jsx(V,{size:15}),o("assets.detail.copyUri","Copy URI")]})]})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.usedInPlace","Used in this Place")}),e.usage.references.length===0?s.jsx("p",{className:t.muted,children:o("assets.detail.noUsage","No local sync references found yet.")}):s.jsx("div",{className:t.usageList,children:e.usage.references.map((d,c)=>s.jsxs("div",{className:t.usageItem,children:[s.jsx("strong",{children:d.kind==="property"?d.instancePath:d.filePath}),s.jsx("span",{children:d.property??o("assets.detail.line","line {line}").replace("{line}",String(d.line??"-"))}),s.jsx("code",{children:d.value})]},`${d.kind}-${c}`))})]})]})]})]})})}function at(e){return e.category==="image"||e.category==="decal"}function lt({asset:e,open:l,canUpload:u,busyAction:a,onClose:n,onBack:_,onUpload:p}){const{t:m}=E(),o=i.useRef(null),[f,g]=i.useState(""),[k,y]=i.useState(""),[C,P]=i.useState("user"),[x,d]=i.useState("");return i.useEffect(()=>{g((e==null?void 0:e.displayName)??""),y((e==null?void 0:e.description)??""),d("")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var b;if(!l||!e)return;(b=o.current)==null||b.focus();const c=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,n,l]),!l||!e?null:s.jsx("div",{className:t.detailPopupLayer,onClick:n,role:"presentation",children:s.jsxs("section",{ref:o,className:t.detailDialog,role:"dialog","aria-modal":"true","aria-label":m("assets.upload.title","Upload asset"),tabIndex:-1,onClick:c=>c.stopPropagation(),children:[s.jsxs("div",{className:t.detailDialogHeader,children:[s.jsxs("div",{className:t.detailTitleBlock,children:[s.jsxs("span",{className:t.detailEyebrow,children:[B(e.category,m)," · ",m("assets.upload.intent","Upload to Roblox")]}),s.jsx("h2",{children:m("assets.upload.title","Upload asset")}),s.jsx("span",{children:e.displayName})]}),s.jsxs("div",{className:t.detailHeaderActions,children:[s.jsxs("button",{type:"button",className:t.commandButton,onClick:_,children:[s.jsx(ye,{size:15}),m("assets.upload.backToDetails","Back to details")]}),s.jsx(R,{text:m("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:n,"aria-label":m("common.close","Close"),children:s.jsx(K,{size:16})})})]})]}),s.jsxs("div",{className:t.detailDialogBody,children:[s.jsx("div",{className:t.detailPreviewPane,children:at(e)?s.jsx("img",{className:t.detailPreview,src:Q(e),alt:e.displayName}):s.jsxs("div",{className:t.detailPreviewFallback,children:[s.jsx("span",{children:B(e.category,m)}),s.jsx("code",{children:e.file.original})]})}),s.jsxs("div",{className:t.detailContentPane,children:[!u&&s.jsx("div",{className:t.notice,children:m("assets.proOnly.upload","Roblox upload is available on Pro.")}),s.jsxs("dl",{className:t.compactMeta,children:[s.jsx("dt",{children:m("assets.detail.category","Category")}),s.jsx("dd",{children:B(e.category,m)}),s.jsx("dt",{children:m("assets.detail.source","Source")}),s.jsx("dd",{children:e.source.originalPath})]}),s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.detail.displayName","Display name")}),s.jsx("input",{value:f,disabled:!u,onChange:c=>g(c.target.value)})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.detail.description","Description")}),s.jsx("textarea",{value:k,rows:3,disabled:!u,onChange:c=>y(c.target.value)})]}),s.jsxs("div",{className:t.twoColumn,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.upload.creatorType","Creator type")}),s.jsxs("select",{value:C,disabled:!u,onChange:c=>P(c.target.value),children:[s.jsx("option",{value:"user",children:m("assets.creator.user","User")}),s.jsx("option",{value:"group",children:m("assets.creator.group","Group")})]})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.upload.creatorId","Creator ID")}),s.jsx("input",{value:x,disabled:!u,onChange:c=>d(c.target.value)})]})]}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:!u||a==="upload",onClick:()=>{const c=x.trim();p({displayName:f,description:k,...c?{creatorType:C,creatorId:c}:{}})},children:a==="upload"?m("assets.upload.uploading","Uploading..."):m("assets.upload.submit","Upload with API Key")})]}),s.jsxs("div",{className:t.noticeList,children:[s.jsx("p",{children:m("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),s.jsx("p",{children:m("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function ee(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function nt(e){const l={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(l.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),l}async function ot(){const e=await w.get("/api/dashboard/settings");return ee(e)}async function it(e){const l=await w.patch("/api/dashboard/settings",nt(e));return ee(l)}async function ct(){return w.get("/api/dashboard/open-cloud/credential")}async function rt(e){return w.put("/api/dashboard/open-cloud/credential",e)}async function dt(e){return w.patch("/api/dashboard/open-cloud/credential/default-creator",e)}async function ut(e){return w.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}async function pt(){return w.delete("/api/dashboard/open-cloud/credential")}function ht(e,l){return e!=null&&e.configured?e.storageProvider==="env"?l("assets.settings.credential.env","Environment variable"):e.maskedKey??l("assets.settings.credential.local","Local encrypted file"):l("assets.settings.credential.none","No API key saved")}function mt({open:e,tier:l,onClose:u}){const{t:a}=E(),[n,_]=i.useState(null),[p,m]=i.useState(null),[o,f]=i.useState(""),[g,k]=i.useState("user"),[y,C]=i.useState(""),[P,x]=i.useState(null),[d,c]=i.useState(!1),b=l==="basic",N=i.useCallback(async()=>{c(!0),x(null);try{const[r,j]=await Promise.all([ot(),ct()]);_(r),m(j.credential),j.credential.creatorType&&k(j.credential.creatorType),j.credential.creatorId&&C(j.credential.creatorId)}catch(r){x(r instanceof Error?r.message:a("assets.settings.loadFailed","Failed to load upload settings."))}finally{c(!1)}},[a]);if(i.useEffect(()=>{e&&N()},[N,e]),!e)return null;const F=(n==null?void 0:n.assetUploadByOpenCloudEnabled)===!0;return s.jsxs("aside",{className:`${t.drawer} ${t.settingsDrawer}`,"aria-label":a("assets.settings.title","Asset Library settings"),children:[s.jsxs("div",{className:t.drawerHeader,children:[s.jsxs("div",{children:[s.jsx("h2",{children:a("assets.settings.title","Asset Library settings")}),s.jsx("span",{children:ht(p,a)})]}),s.jsx(R,{text:a("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:u,"aria-label":a("common.close","Close"),children:s.jsx(K,{size:16})})})]}),b&&s.jsx("div",{className:`${t.notice} ${t.proNotice}`,children:a("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),s.jsxs("section",{className:t.settingsPanel,children:[s.jsxs("label",{className:t.toggleRow,children:[s.jsxs("span",{children:[s.jsx("strong",{children:a("assets.settings.openCloudToggle","API Key local upload")}),s.jsx("small",{children:a("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),s.jsx("input",{type:"checkbox",checked:F,disabled:b||d,onChange:r=>{(async()=>{c(!0);try{const j=await it({assetUploadByOpenCloudEnabled:r.target.checked});_(j),x(a("assets.settings.saved","Upload settings saved."))}catch(j){x(j instanceof Error?j.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()}})]}),s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.settings.apiKey","Open Cloud API Key")}),s.jsx("input",{value:o,type:"password",disabled:b||d,onChange:r=>f(r.target.value)})]}),!(p!=null&&p.configured)&&s.jsx("p",{className:t.inlineHelp,children:s.jsx("a",{href:"https://create.roblox.com/docs/cloud/auth/api-keys",target:"_blank",rel:"noreferrer",children:a("assets.settings.apiKeyGuide","Create a Roblox API key with Assets API permissions.")})}),s.jsxs("div",{className:t.buttonRow,children:[s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d||!o.trim(),onClick:()=>{(async()=>{c(!0);try{const r=await rt({apiKey:o.trim(),...y.trim()?{creatorType:g,creatorId:y.trim()}:{}});m(r.credential),f(""),x(r.message??a("assets.settings.saved","Upload settings saved."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()},children:a("assets.settings.saveApiKey","Save API Key")}),s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d,onClick:()=>{(async()=>{var r;c(!0);try{const j=await ut(o.trim()||void 0);m(j.credential),x(((r=j.validation)==null?void 0:r.message)??a("assets.settings.tested","Connection tested."))}catch(j){x(j instanceof Error?j.message:a("assets.settings.testFailed","Connection test failed."))}finally{c(!1)}})()},children:a("assets.settings.testConnection","Test Connection")}),s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d,onClick:()=>{(async()=>{c(!0);try{const r=await pt();m(r.credential),x(r.message??a("assets.settings.removed","API key removed."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.removeFailed","Failed to remove API key."))}finally{c(!1)}})()},children:a("assets.settings.removeApiKey","Remove API Key")})]})]}),s.jsxs("div",{className:t.twoColumn,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.upload.creatorType","Creator type")}),s.jsxs("select",{value:g,disabled:b||d||(p==null?void 0:p.storageProvider)==="env",onChange:r=>k(r.target.value),children:[s.jsx("option",{value:"user",children:a("assets.creator.user","User")}),s.jsx("option",{value:"group",children:a("assets.creator.group","Group")})]})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.upload.creatorId","Creator ID")}),s.jsx("input",{value:y,disabled:b||d||(p==null?void 0:p.storageProvider)==="env",onChange:r=>C(r.target.value)})]})]}),!(p!=null&&p.creatorId)&&s.jsx("p",{className:t.inlineHelp,children:a("assets.settings.creatorHelp","Use the numeric user ID from a profile URL or group ID from a group URL.")}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:b||d||(p==null?void 0:p.storageProvider)==="env"||!y.trim(),onClick:()=>{(async()=>{c(!0);try{const r=await dt({creatorType:g,creatorId:y.trim()});m(r.credential),x(r.message??a("assets.settings.saved","Upload settings saved."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()},children:a("assets.settings.saveCreator","Save default Creator")})]}),P&&s.jsx("div",{className:t.messageState,children:P})]})}function H(e,l){return e instanceof Error&&e.message.trim().length>0?e.message:l}function gt(e,l){return e.some(a=>a.id===l.id)?e.map(a=>a.id===l.id?l:a):[l,...e]}function yt(e,l){if((l==null?void 0:l.id)===e)return l.category;const u=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return u!=null&&u[1]?u[1]:null}function xt(e){if(e.pluginConnected&&e.activePlaceId!==null)return{placeId:e.activePlaceId,placeName:e.activePlaceName};if(e.lastActivePlaceId!==null)return{placeId:e.lastActivePlaceId,placeName:e.lastActivePlaceName};const l=e.places[0];return{placeId:(l==null?void 0:l.placeId)??null,placeName:(l==null?void 0:l.placeName)??null}}function jt(){const[e,l]=i.useState([]),[u,a]=i.useState(0),[n,_]=i.useState(null),[p,m]=i.useState("place"),[o,f]=i.useState("all"),[g,k]=i.useState(null),[y,C]=i.useState(null),[P,x]=i.useState(!0),[d,c]=i.useState(null),[b,N]=i.useState(null),[F,r]=i.useState(null),j=i.useMemo(()=>e.find(h=>h.id===n)??null,[e,n]),Y=i.useCallback(()=>({scope:p,placeId:p==="place"?g:void 0}),[g,p]),U=i.useCallback(h=>({...Y(),category:h}),[Y]),W=i.useCallback(async()=>{try{const h=await ue(),v=xt(h);return k(v.placeId),C(v.placeName),v.placeId}catch{return k(null),C(null),null}},[]),T=i.useCallback(async()=>{N(null);try{const h=await W(),v={scope:p,placeId:p==="place"?h:void 0};if(p==="place"&&h===null){l([]),a(0),x(!1),N("No active place is connected for place-scoped assets.");return}const S=o==="all"?await Re(v):await J({...v,category:o});l(S.assets),a(S.totalCount)}catch(h){N(H(h,"Failed to load Asset Library."))}finally{x(!1)}},[o,W,p]);i.useEffect(()=>{T()},[T]);const I=i.useCallback(async(h,v,S)=>{const O=yt(v,j);if(!O)return N("Asset category is unavailable."),null;c(h),N(null),r(null);try{const $=await S(U(O));return l(ce=>gt(ce,$)),_($.id),r("Asset Library updated."),$}catch($){return N(H($,"Asset Library action failed.")),null}finally{c(null)}},[U,j]),se=i.useCallback(async()=>{if(o==="all"){N("Choose a category before rescanning inbox files.");return}c("rescan"),N(null),r(null);try{const h=await Le(U(o));l(h.assets),a(h.totalCount),r(`${h.adoptedCount} asset(s) added, ${h.skippedCount} skipped.`)}catch(h){N(H(h,"Asset Library rescan failed."))}finally{c(null)}},[o,U]),te=i.useCallback((h,v)=>I("update",h,S=>$e(S,h,v)),[I]),ae=i.useCallback((h,v)=>I("upload",h,S=>Ee(S,h,v)),[I]),le=i.useCallback(h=>I("status-refresh",h,v=>Ue(v,h)),[I]),ne=i.useCallback((h,v)=>I("usage-scan",h,async S=>(await De(S,h,v)).asset),[I]),oe=i.useCallback(h=>{m(h),_(null)},[]),ie=i.useCallback(h=>{f(h),_(null)},[]);return{assets:e,totalCount:u,selectedAsset:j,selectedAssetId:n,scope:p,categoryFilter:o,activePlaceId:g,activePlaceName:y,loading:P,busyAction:d,error:b,lastMessage:F,setScope:oe,setCategoryFilter:ie,selectAsset:_,refresh:T,rescan:se,updateMetadata:te,uploadAsset:ae,refreshStatus:le,scanUsage:ne}}const _t=["all","image","decal","audio","mesh","model","video","animation"];function Ct(){const{t:e}=E(),{trackEvent:l}=pe(),{tier:u,loading:a}=he(),n=jt(),[_,p]=i.useState(!1),[m,o]=i.useState(!1),f=!a&&u==="pro",g=n.selectedAsset,k=i.useMemo(()=>n.scope==="place"?n.activePlaceName??e("assets.scope.place","Current Place"):e("assets.scope.shared","Shared"),[n.activePlaceName,n.scope,e]);return s.jsxs("div",{className:t.page,children:[s.jsxs("div",{className:t.headerRow,children:[s.jsxs("div",{children:[s.jsx("h1",{children:e("assets.title","Assets")}),s.jsx("p",{children:e("assets.subtitle","Browse local originals, upload to Roblox, and inspect synced usage by place.")})]}),s.jsxs("div",{className:t.headerMeta,children:[s.jsx("span",{children:k}),s.jsx("strong",{children:n.totalCount})]})]}),s.jsxs("div",{className:t.toolbar,children:[s.jsxs("div",{className:t.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[s.jsx("button",{type:"button",className:n.scope==="place"?t.segmentedActive:"",onClick:()=>n.setScope("place"),children:e("assets.scope.place","Current Place")}),s.jsx("button",{type:"button",className:n.scope==="shared"?t.segmentedActive:"",onClick:()=>n.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),s.jsxs("label",{className:t.filterLabel,children:[s.jsx("span",{children:e("assets.category.filter","Category")}),s.jsx("select",{value:n.categoryFilter,onChange:y=>n.setCategoryFilter(y.target.value),children:_t.map(y=>s.jsx("option",{value:y,children:y==="all"?e("assets.category.all","All"):B(y,e)},y))})]}),s.jsxs("div",{className:t.toolbarActions,children:[s.jsx(R,{text:n.categoryFilter==="all"?e("assets.rescan.chooseCategory","Choose a category before rescanning."):e("assets.rescan.tooltip","Scan the selected inbox folder."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:n.categoryFilter==="all"||n.busyAction==="rescan",onClick:()=>{l("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),n.rescan()},children:[s.jsx(Z,{size:15}),e("assets.rescan","Rescan")]})}),s.jsx(R,{text:g?e("assets.upload.open.tooltip","Upload this local file to Roblox with the saved API key."):e("assets.upload.selectFirst","Select an asset first."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:!g||!f,onClick:()=>{l("dashboard_click_event",{click_target:"assets_upload_open",page:"assets"}),p(!0)},children:[s.jsx(q,{size:15}),e("assets.upload.open","Upload")]})}),s.jsx(R,{text:e("assets.settings.open.tooltip","Open Roblox upload settings."),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:()=>{l("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),o(!0)},"aria-label":e("assets.settings.open","Open settings"),children:s.jsx(me,{size:16})})})]})]}),n.error&&s.jsx("div",{className:t.errorState,children:n.error}),n.lastMessage&&s.jsx("div",{className:t.messageState,children:n.lastMessage}),!f&&!a&&s.jsx("div",{className:`${t.notice} ${t.proNotice}`,children:e("assets.basic.notice","Browse, preview, edit metadata, and scan usage on Basic. Roblox upload controls are available on Pro.")}),n.loading?s.jsx("div",{className:t.emptyState,children:e("common.loading","Loading...")}):s.jsx(Qs,{assets:n.assets,selectedAssetId:n.selectedAssetId,onSelect:n.selectAsset}),s.jsx(tt,{asset:_?null:g,busyAction:n.busyAction,canUpload:f,onClose:()=>n.selectAsset(null),onSave:async(y,C)=>{g&&await n.updateMetadata(g.id,{displayName:y,description:C})},onUpload:()=>p(!0),onRefreshStatus:async()=>{g&&await n.refreshStatus(g.id)},onScanUsage:async()=>{g&&(l("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await n.scanUsage(g.id,n.activePlaceId??void 0))}}),s.jsx(lt,{asset:g,open:_,canUpload:f,busyAction:n.busyAction,onClose:()=>{p(!1),n.selectAsset(null)},onBack:()=>p(!1),onUpload:async y=>{if(!g)return;l("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await n.uploadAsset(g.id,y)&&p(!1)}}),s.jsx(mt,{open:m,tier:u,onClose:()=>o(!1)})]})}export{Ct as Component};
@@ -1 +1 @@
1
- import{r,a as R,u as M,b as B,c as V,j as e}from"./index-IFwX560t.js";import{I as G}from"./InfoLabel-BcS5cIV_.js";import{G as D}from"./GameChangeDetail-oLGK_BBE.js";import{T as m}from"./TooltipText-baLGgLqW.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
1
+ import{r,a as R,u as M,b as B,c as V,j as e}from"./index-BIVkyPD7.js";import{I as G}from"./InfoLabel-BkXtpBzT.js";import{G as D}from"./GameChangeDetail-DjupgTS5.js";import{T as m}from"./TooltipText-59Xfc1Ui.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
@@ -1 +1 @@
1
- import{r,a as M,D as P,u as R,j as e,i as V,c as O,l as K,m as G,T as U}from"./index-IFwX560t.js";import{C as H}from"./ConfirmModal-DuQQ9DXj.js";import{T as $}from"./TooltipText-baLGgLqW.js";import{T as Z}from"./Tabs-CQJ_0DaJ.js";const q=10;function z(){const[s,d]=r.useState([]),[t,n]=r.useState(0),[a,u]=r.useState(!1),[g,f]=r.useState(!0),[i,v]=r.useState(0),[m,x]=r.useState("all"),N=r.useRef(null),_=r.useCallback(async(h,y)=>{f(!0);try{const j={limit:String(q),offset:String(h)};y!=="all"&&(j.status=y);const b=await M.get("/api/dashboard/changelog",j);d(b.entries),n(b.total),u(b.hasMore)}catch{d([]),n(0),u(!1)}finally{f(!1)}},[]),C=r.useCallback(()=>{_(i,m)},[_,i,m]),o=r.useCallback(async()=>{await M.post("/api/dashboard/changelog/clear"),d([]),n(0),u(!1)},[]);return r.useEffect(()=>{_(i,m)},[_,i,m]),r.useEffect(()=>{const h=new P;N.current=h,h.connect();const y=h.on("command",()=>{_(i,m)});return()=>{y(),h.disconnect(),N.current=null}},[_,i,m]),{entries:s,total:t,hasMore:a,loading:g,offset:i,statusFilter:m,setOffset:v,setStatusFilter:x,refresh:C,clear:o}}const J="_card_1n89u_2",Q="_header_1n89u_17",W="_statusBadge_1n89u_24",X="_statusDot_1n89u_35",Y="_active_1n89u_41",ee="_completed_1n89u_50",te="_timeRange_1n89u_58",se="_summaryList_1n89u_65",ae="_summaryItem_1n89u_71",ne="_summaryIcon_1n89u_80",ce="_summaryText_1n89u_86",oe="_progressBar_1n89u_91",ie="_progressFill_1n89u_99",le="_emptySummary_1n89u_112",re="_contextBlock_1n89u_120",ge="_contextLabel_1n89u_129",de="_contextValue_1n89u_137",c={card:J,header:Q,statusBadge:W,statusDot:X,active:Y,completed:ee,timeRange:te,summaryList:se,summaryItem:ae,summaryIcon:ne,summaryText:ce,progressBar:oe,progressFill:ie,emptySummary:le,contextBlock:re,contextLabel:ge,contextValue:de};function D(s){if(!s)return"--:--";const d=new Date(s);return`${String(d.getHours()).padStart(2,"0")}:${String(d.getMinutes()).padStart(2,"0")}`}function me({entry:s,onClick:d}){var j,b,k,I,B,L,A,w,E,F;const{t}=R(),n=s.changeSummary,a=s.status==="active",u=s.isBootstrapOnly===!0,g=[],f=n.scriptsModified+n.scriptsCreated;if(f>0){const p=[];n.scriptsModified>0&&p.push(`${n.scriptsModified} ${t("changelog.card.modified","modified")}`),n.scriptsCreated>0&&p.push(`${n.scriptsCreated} ${t("changelog.card.created","created")}`);const S=`${f} ${t("changelog.card.scripts","scripts")} ${p.join(", ")}`;g.push({icon:"📝",text:S,tooltip:t("changelog.card.scripts.tooltip","Script changes made in this session.")})}const i=n.instancesCreated+n.instancesDeleted+n.instancesMoved;if(i>0){const p=[];n.instancesCreated>0&&p.push(`${n.instancesCreated} ${t("changelog.card.created","created")}`),n.instancesDeleted>0&&p.push(`${n.instancesDeleted} ${t("changelog.card.deleted","deleted")}`),n.instancesMoved>0&&p.push(`${n.instancesMoved} ${t("changelog.card.moved","moved")}`);const S=`${i} ${t("changelog.card.instances","instances")} ${p.join(", ")}`;g.push({icon:"🧱",text:S,tooltip:t("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}n.propertiesChanged>0&&g.push({icon:"🎨",text:`${n.propertiesChanged} ${t("changelog.card.propertiesChanged","properties changed")}`,tooltip:t("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),n.lightingChanged&&g.push({icon:"🌅",text:t("changelog.card.lightingConfigured","Lighting configured"),tooltip:t("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),n.terrainChanged&&g.push({icon:"⛰️",text:t("changelog.card.terrainConfigured","Terrain configured"),tooltip:t("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),n.assetsInserted>0&&g.push({icon:"📦",text:`${n.assetsInserted} ${t("changelog.card.assetsInserted","assets inserted")}`,tooltip:t("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const v=D(s.startTime),m=a?t("changelog.card.inProgress","in progress"):s.endTime?D(s.endTime):"--:--",x=u?t("changelog.card.bootstrapStatus","Bootstrap"):a?t("changelog.card.active","Active"):t("changelog.card.completed","Completed"),N=u?t("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):a?t("changelog.card.active.tooltip","This session is still receiving new game changes."):t("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),_=u?t("changelog.card.bootstrapSummary","Initial sync snapshot"):t("changelog.card.noChanges","No changes yet"),C=u?t("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):t("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet."),o=(b=(j=s.contextSummary)==null?void 0:j.intent)==null?void 0:b.trim(),h=((L=(B=(I=(k=s.contextSummary)==null?void 0:k.affectedAreas)==null?void 0:I[0])==null?void 0:B.label)==null?void 0:L.trim())||((w=(A=s.contextSummary)==null?void 0:A.testScenario)==null?void 0:w.trim()),y=(F=(E=s.verificationSummary)==null?void 0:E.label)==null?void 0:F.trim();return e.jsxs("div",{className:c.card,onClick:d,children:[e.jsxs("div",{className:c.header,children:[e.jsx($,{text:N,children:e.jsxs("span",{className:`${c.statusBadge} ${a?c.active:c.completed}`,children:[e.jsx("span",{className:c.statusDot}),x]})}),e.jsxs("span",{className:c.timeRange,children:[v,"~",m]})]}),e.jsx("div",{className:c.summaryList,children:g.length>0?g.map((p,S)=>e.jsxs("div",{className:c.summaryItem,children:[e.jsx("span",{className:c.summaryIcon,children:p.icon}),e.jsx($,{text:p.tooltip,children:e.jsx("span",{className:c.summaryText,children:p.text})})]},S)):e.jsx($,{text:C,children:e.jsx("span",{className:c.emptySummary,style:{display:"block"},children:_})})}),o&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:c.contextValue,children:o})]}),!o&&h&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.representativeArea","Representative area")}),e.jsx("span",{className:c.contextValue,children:h})]}),y&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.verification","Verification")}),e.jsx("span",{className:c.contextValue,children:y})]}),a&&e.jsx("div",{className:c.progressBar,children:e.jsx("div",{className:c.progressFill})})]})}const he="_page_1tggr_2",pe="_limitNotice_1tggr_9",ue="_limitNoticeContent_1tggr_23",_e="_limitNoticeTitle_1tggr_28",fe="_limitNoticeText_1tggr_35",xe="_primaryAction_1tggr_41",ye="_clearButton_1tggr_67",ve="_list_1tggr_88",Ne="_empty_1tggr_95",be="_loading_1tggr_104",Ce="_pagination_1tggr_113",je="_pageInfo_1tggr_121",Se="_btn_1tggr_127",l={page:he,limitNotice:pe,limitNoticeContent:ue,limitNoticeTitle:_e,limitNoticeText:fe,primaryAction:xe,clearButton:ye,list:ve,empty:Ne,loading:be,pagination:Ce,pageInfo:je,btn:Se},T=10,Te=[{key:"all",labelKey:"changelog.filter.all"},{key:"active",labelKey:"changelog.filter.active"},{key:"completed",labelKey:"changelog.filter.completed"}];function Le(){const{t:s}=R(),{trackEvent:d,trackPageView:t}=V(),n=O(),a=z(),u=K(),{show:g}=G(),[f,i]=r.useState(!1),[v,m]=r.useState(!1),x=!u.loading&&u.tier==="basic",N=x?a.entries.slice(0,3):a.entries,_=!x&&a.total>T,C=async()=>{m(!0);try{await a.clear(),g(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{g(s("toast.clearFailed","Failed to clear data"),"error")}finally{m(!1)}};return e.jsxs("div",{className:l.page,children:[e.jsx(Z,{items:Te.map(o=>({key:o.key,label:s(o.labelKey,o.key.charAt(0).toUpperCase()+o.key.slice(1))})),value:a.statusFilter,onChange:o=>{const h=`changelog_${o}`;d("dashboard_click_event",{click_target:`changelog_tab_${o}`,page:"changelog",tab:h}),t({page:"changelog",tab:h}),a.setStatusFilter(o),a.setOffset(0)},rightActions:e.jsx("button",{className:l.clearButton,onClick:()=>{d("dashboard_click_event",{click_target:"changelog_clear",page:"changelog",tab:`changelog_${a.statusFilter}`}),i(!0)},children:s("common.clear","Clear")})}),a.loading&&a.entries.length===0&&e.jsx("div",{className:l.loading,children:s("common.loading","Loading...")}),!a.loading&&a.entries.length===0?e.jsx("div",{className:l.empty,children:s("changelog.empty","No changelog entries yet")}):e.jsx("div",{className:l.list,children:N.map(o=>e.jsx(me,{entry:o,onClick:()=>n(`/changelog/${o.entryId}`)},o.entryId))}),_&&e.jsxs("div",{className:l.pagination,children:[e.jsx("button",{className:l.btn,disabled:a.offset===0,onClick:()=>a.setOffset(Math.max(0,a.offset-T)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:l.pageInfo,children:[a.offset+1,"–",Math.min(a.offset+T,a.total)," / ",a.total]}),e.jsx("button",{className:l.btn,disabled:!a.hasMore,onClick:()=>a.setOffset(a.offset+T),children:s("tools.page.next","Next")})]}),x&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:l.limitNotice,children:[e.jsxs("div",{className:l.limitNoticeContent,children:[e.jsx("div",{className:l.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),e.jsx("div",{className:l.limitNoticeText,children:s("changelog.basic.limit.body","Full changelog timeline browsing is available with Pro.")})]}),e.jsx("a",{className:l.primaryAction,href:U.changelog,target:"_blank",rel:"noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"changelog_limit_notice",page:"changelog",tab:`changelog_${a.statusFilter}`}),children:s("tier.upgrade","View Pro")})]})}),e.jsx(H,{open:f,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:v,onCancel:()=>!v&&i(!1),onConfirm:C})]})}export{Le as Component};
1
+ import{r,a as M,D as P,u as R,j as e,i as V,c as O,l as K,m as G,T as U}from"./index-BIVkyPD7.js";import{C as H}from"./ConfirmModal-lSOkaAvB.js";import{T as $}from"./TooltipText-59Xfc1Ui.js";import{T as Z}from"./Tabs-B4kZyHzy.js";const q=10;function z(){const[s,d]=r.useState([]),[t,n]=r.useState(0),[a,u]=r.useState(!1),[g,f]=r.useState(!0),[i,v]=r.useState(0),[m,x]=r.useState("all"),N=r.useRef(null),_=r.useCallback(async(h,y)=>{f(!0);try{const j={limit:String(q),offset:String(h)};y!=="all"&&(j.status=y);const b=await M.get("/api/dashboard/changelog",j);d(b.entries),n(b.total),u(b.hasMore)}catch{d([]),n(0),u(!1)}finally{f(!1)}},[]),C=r.useCallback(()=>{_(i,m)},[_,i,m]),o=r.useCallback(async()=>{await M.post("/api/dashboard/changelog/clear"),d([]),n(0),u(!1)},[]);return r.useEffect(()=>{_(i,m)},[_,i,m]),r.useEffect(()=>{const h=new P;N.current=h,h.connect();const y=h.on("command",()=>{_(i,m)});return()=>{y(),h.disconnect(),N.current=null}},[_,i,m]),{entries:s,total:t,hasMore:a,loading:g,offset:i,statusFilter:m,setOffset:v,setStatusFilter:x,refresh:C,clear:o}}const J="_card_1n89u_2",Q="_header_1n89u_17",W="_statusBadge_1n89u_24",X="_statusDot_1n89u_35",Y="_active_1n89u_41",ee="_completed_1n89u_50",te="_timeRange_1n89u_58",se="_summaryList_1n89u_65",ae="_summaryItem_1n89u_71",ne="_summaryIcon_1n89u_80",ce="_summaryText_1n89u_86",oe="_progressBar_1n89u_91",ie="_progressFill_1n89u_99",le="_emptySummary_1n89u_112",re="_contextBlock_1n89u_120",ge="_contextLabel_1n89u_129",de="_contextValue_1n89u_137",c={card:J,header:Q,statusBadge:W,statusDot:X,active:Y,completed:ee,timeRange:te,summaryList:se,summaryItem:ae,summaryIcon:ne,summaryText:ce,progressBar:oe,progressFill:ie,emptySummary:le,contextBlock:re,contextLabel:ge,contextValue:de};function D(s){if(!s)return"--:--";const d=new Date(s);return`${String(d.getHours()).padStart(2,"0")}:${String(d.getMinutes()).padStart(2,"0")}`}function me({entry:s,onClick:d}){var j,b,k,I,B,L,A,w,E,F;const{t}=R(),n=s.changeSummary,a=s.status==="active",u=s.isBootstrapOnly===!0,g=[],f=n.scriptsModified+n.scriptsCreated;if(f>0){const p=[];n.scriptsModified>0&&p.push(`${n.scriptsModified} ${t("changelog.card.modified","modified")}`),n.scriptsCreated>0&&p.push(`${n.scriptsCreated} ${t("changelog.card.created","created")}`);const S=`${f} ${t("changelog.card.scripts","scripts")} ${p.join(", ")}`;g.push({icon:"📝",text:S,tooltip:t("changelog.card.scripts.tooltip","Script changes made in this session.")})}const i=n.instancesCreated+n.instancesDeleted+n.instancesMoved;if(i>0){const p=[];n.instancesCreated>0&&p.push(`${n.instancesCreated} ${t("changelog.card.created","created")}`),n.instancesDeleted>0&&p.push(`${n.instancesDeleted} ${t("changelog.card.deleted","deleted")}`),n.instancesMoved>0&&p.push(`${n.instancesMoved} ${t("changelog.card.moved","moved")}`);const S=`${i} ${t("changelog.card.instances","instances")} ${p.join(", ")}`;g.push({icon:"🧱",text:S,tooltip:t("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}n.propertiesChanged>0&&g.push({icon:"🎨",text:`${n.propertiesChanged} ${t("changelog.card.propertiesChanged","properties changed")}`,tooltip:t("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),n.lightingChanged&&g.push({icon:"🌅",text:t("changelog.card.lightingConfigured","Lighting configured"),tooltip:t("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),n.terrainChanged&&g.push({icon:"⛰️",text:t("changelog.card.terrainConfigured","Terrain configured"),tooltip:t("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),n.assetsInserted>0&&g.push({icon:"📦",text:`${n.assetsInserted} ${t("changelog.card.assetsInserted","assets inserted")}`,tooltip:t("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const v=D(s.startTime),m=a?t("changelog.card.inProgress","in progress"):s.endTime?D(s.endTime):"--:--",x=u?t("changelog.card.bootstrapStatus","Bootstrap"):a?t("changelog.card.active","Active"):t("changelog.card.completed","Completed"),N=u?t("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):a?t("changelog.card.active.tooltip","This session is still receiving new game changes."):t("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),_=u?t("changelog.card.bootstrapSummary","Initial sync snapshot"):t("changelog.card.noChanges","No changes yet"),C=u?t("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):t("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet."),o=(b=(j=s.contextSummary)==null?void 0:j.intent)==null?void 0:b.trim(),h=((L=(B=(I=(k=s.contextSummary)==null?void 0:k.affectedAreas)==null?void 0:I[0])==null?void 0:B.label)==null?void 0:L.trim())||((w=(A=s.contextSummary)==null?void 0:A.testScenario)==null?void 0:w.trim()),y=(F=(E=s.verificationSummary)==null?void 0:E.label)==null?void 0:F.trim();return e.jsxs("div",{className:c.card,onClick:d,children:[e.jsxs("div",{className:c.header,children:[e.jsx($,{text:N,children:e.jsxs("span",{className:`${c.statusBadge} ${a?c.active:c.completed}`,children:[e.jsx("span",{className:c.statusDot}),x]})}),e.jsxs("span",{className:c.timeRange,children:[v,"~",m]})]}),e.jsx("div",{className:c.summaryList,children:g.length>0?g.map((p,S)=>e.jsxs("div",{className:c.summaryItem,children:[e.jsx("span",{className:c.summaryIcon,children:p.icon}),e.jsx($,{text:p.tooltip,children:e.jsx("span",{className:c.summaryText,children:p.text})})]},S)):e.jsx($,{text:C,children:e.jsx("span",{className:c.emptySummary,style:{display:"block"},children:_})})}),o&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:c.contextValue,children:o})]}),!o&&h&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.representativeArea","Representative area")}),e.jsx("span",{className:c.contextValue,children:h})]}),y&&e.jsxs("div",{className:c.contextBlock,children:[e.jsx("span",{className:c.contextLabel,children:t("changelog.card.verification","Verification")}),e.jsx("span",{className:c.contextValue,children:y})]}),a&&e.jsx("div",{className:c.progressBar,children:e.jsx("div",{className:c.progressFill})})]})}const he="_page_1tggr_2",pe="_limitNotice_1tggr_9",ue="_limitNoticeContent_1tggr_23",_e="_limitNoticeTitle_1tggr_28",fe="_limitNoticeText_1tggr_35",xe="_primaryAction_1tggr_41",ye="_clearButton_1tggr_67",ve="_list_1tggr_88",Ne="_empty_1tggr_95",be="_loading_1tggr_104",Ce="_pagination_1tggr_113",je="_pageInfo_1tggr_121",Se="_btn_1tggr_127",l={page:he,limitNotice:pe,limitNoticeContent:ue,limitNoticeTitle:_e,limitNoticeText:fe,primaryAction:xe,clearButton:ye,list:ve,empty:Ne,loading:be,pagination:Ce,pageInfo:je,btn:Se},T=10,Te=[{key:"all",labelKey:"changelog.filter.all"},{key:"active",labelKey:"changelog.filter.active"},{key:"completed",labelKey:"changelog.filter.completed"}];function Le(){const{t:s}=R(),{trackEvent:d,trackPageView:t}=V(),n=O(),a=z(),u=K(),{show:g}=G(),[f,i]=r.useState(!1),[v,m]=r.useState(!1),x=!u.loading&&u.tier==="basic",N=x?a.entries.slice(0,3):a.entries,_=!x&&a.total>T,C=async()=>{m(!0);try{await a.clear(),g(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{g(s("toast.clearFailed","Failed to clear data"),"error")}finally{m(!1)}};return e.jsxs("div",{className:l.page,children:[e.jsx(Z,{items:Te.map(o=>({key:o.key,label:s(o.labelKey,o.key.charAt(0).toUpperCase()+o.key.slice(1))})),value:a.statusFilter,onChange:o=>{const h=`changelog_${o}`;d("dashboard_click_event",{click_target:`changelog_tab_${o}`,page:"changelog",tab:h}),t({page:"changelog",tab:h}),a.setStatusFilter(o),a.setOffset(0)},rightActions:e.jsx("button",{className:l.clearButton,onClick:()=>{d("dashboard_click_event",{click_target:"changelog_clear",page:"changelog",tab:`changelog_${a.statusFilter}`}),i(!0)},children:s("common.clear","Clear")})}),a.loading&&a.entries.length===0&&e.jsx("div",{className:l.loading,children:s("common.loading","Loading...")}),!a.loading&&a.entries.length===0?e.jsx("div",{className:l.empty,children:s("changelog.empty","No changelog entries yet")}):e.jsx("div",{className:l.list,children:N.map(o=>e.jsx(me,{entry:o,onClick:()=>n(`/changelog/${o.entryId}`)},o.entryId))}),_&&e.jsxs("div",{className:l.pagination,children:[e.jsx("button",{className:l.btn,disabled:a.offset===0,onClick:()=>a.setOffset(Math.max(0,a.offset-T)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:l.pageInfo,children:[a.offset+1,"–",Math.min(a.offset+T,a.total)," / ",a.total]}),e.jsx("button",{className:l.btn,disabled:!a.hasMore,onClick:()=>a.setOffset(a.offset+T),children:s("tools.page.next","Next")})]}),x&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:l.limitNotice,children:[e.jsxs("div",{className:l.limitNoticeContent,children:[e.jsx("div",{className:l.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),e.jsx("div",{className:l.limitNoticeText,children:s("changelog.basic.limit.body","Full changelog timeline browsing is available with Pro.")})]}),e.jsx("a",{className:l.primaryAction,href:U.changelog,target:"_blank",rel:"noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"changelog_limit_notice",page:"changelog",tab:`changelog_${a.statusFilter}`}),children:s("tier.upgrade","View Pro")})]})}),e.jsx(H,{open:f,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:v,onCancel:()=>!v&&i(!1),onConfirm:C})]})}export{Le as Component};
@@ -1 +1 @@
1
- import{j as s,w as e}from"./index-IFwX560t.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
1
+ import{j as s,x as e}from"./index-BIVkyPD7.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
@@ -1 +1 @@
1
- import{u as R,r as a,j as e,d as P,a as S,D as T,i as D,m as F}from"./index-IFwX560t.js";import{I as r}from"./InfoLabel-BcS5cIV_.js";import{S as H}from"./StatusBadge-BSLWjWJC.js";import{T as U}from"./TooltipText-baLGgLqW.js";import{C as $}from"./ConfirmModal-DuQQ9DXj.js";import{u as K,f as G}from"./useLiveUptime-BVeJvePr.js";const O="_container_1h084_2",V="_entry_1h084_14",q="_timestamp_1h084_21",X="_message_1h084_27",z="_warn_1h084_34",J="_error_1h084_39",Q="_empty_1h084_44",v={container:O,entry:V,timestamp:q,message:X,warn:z,error:J,empty:Q};function W(n){const i=new Date(n);return Number.isNaN(i.getTime())?n:`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Y({entries:n}){const{t:i}=R(),t=a.useRef(null);return a.useEffect(()=>{const o=t.current;o&&(o.scrollTop=o.scrollHeight)},[n.length]),e.jsx("div",{ref:t,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:i("connection.log.empty","No events yet")}):n.map((o,u)=>e.jsxs("div",{className:`${v.entry} ${o.type?v[o.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:W(o.timestamp)}),e.jsx("span",{className:v.message,children:o.message})]},u))})}const A=50;function Z(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ee(){const{level:n,status:i,error:t}=P(),[o,u]=a.useState(null),[N,j]=a.useState([]),C=a.useRef(null),g=a.useCallback((l,x)=>{j(p=>{const d=[...p,{timestamp:Z(),message:l,type:x}];return d.length>A?d.slice(-A):d})},[]),m=a.useCallback(async()=>{try{const l=await S.get("/connection-info");u(l)}catch{u(null)}},[]),y=a.useCallback(async()=>{try{const l=await S.get("/api/dashboard/connection-log");j(l.entries??[])}catch{j([])}},[]),k=a.useCallback(async()=>{await S.post("/api/dashboard/connection-log/clear"),j([])},[]),f=a.useCallback(async l=>{await S.post("/api/dashboard/kill-agent",{instanceId:l}),await m()},[m]);return a.useEffect(()=>{n!=="disconnected"&&i&&m(),y()},[n,i,m,y]),a.useEffect(()=>{const l=new T;C.current=l,l.connect();const x=l.on("connection",d=>{const h=d,_=h.status==="connected"?"connected":"disconnected";g(`Plugin ${_} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),p=l.on("mcp_status",d=>{const h=d,_=h.status==="registered"?"registered":"unregistered";g(`MCP ${_} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),m()});return()=>{x(),p(),l.disconnect(),C.current=null}},[g,m]),{status:i,connectionInfo:o,connectionLog:N,level:n,error:t,clearConnectionLog:k,killAgent:f}}const ne="_page_15jrd_2",te="_card_15jrd_10",se="_disabled_15jrd_18",ce="_cardHeader_15jrd_24",oe="_clearButton_15jrd_37",ie="_serverGrid_15jrd_47",ae="_statusRow_15jrd_65",le="_metaItem_15jrd_72",re="_table_15jrd_79",de="_toggleBtn_15jrd_104",me="_disconnected_15jrd_119",pe="_disconnectedActions_15jrd_136",he="_btn_15jrd_143",ge="_activity_active_15jrd_161",ue="_activity_stale_15jrd_162",je="_activity_unknown_15jrd_163",xe="_killBtn_15jrd_187",_e="_emptyRow_15jrd_207",s={page:ne,card:te,disabled:se,cardHeader:ce,clearButton:oe,serverGrid:ie,statusRow:ae,metaItem:le,table:re,toggleBtn:de,disconnected:me,disconnectedActions:pe,btn:he,activity_active:ge,activity_stale:ue,activity_unknown:je,killBtn:xe,emptyRow:_e};function w(n,i){const t=Math.max(0,Math.floor((Date.now()-n)/1e3));return t<60?`${t}${i("connection.time.secondsAgo","s ago")}`:t<3600?`${Math.floor(t/60)}${i("connection.time.minutesAgo","m ago")}`:`${Math.floor(t/3600)}${i("connection.time.hoursAgo","h ago")}`}function ve(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Ne(){var I;const{t:n}=R(),{trackEvent:i}=D(),{status:t,connectionInfo:o,connectionLog:u,level:N,clearConnectionLog:j,killAgent:C}=ee(),{show:g}=F(),[m,y]=a.useState(!0),[k,f]=a.useState(!1),[l,x]=a.useState(!1),[p,d]=a.useState(null),[h,_]=a.useState(!1),L=K(t==null?void 0:t.uptime),b=N==="disconnected",M=b?"offline":"online",E=async()=>{if(p){_(!0);try{await C(p.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),d(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{_(!1)}}},B=async()=>{x(!0);try{await j(),g(n("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{x(!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")}),b?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(H,{status:M})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(U,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:G(L??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>y(c=>!c),"aria-label":m?n("common.collapse","Collapse"):n("common.expand","Expand"),children:m?"▾":"▸"})]}),m&&e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${ve(c.lastSeen)}`]}),c.aiClientName??n("connection.agents.unknown","Unknown")]}),e.jsx("td",{children:c.pid}),e.jsx("td",{children:c.projectRoot??c.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:w(c.connectedAt,n)}),e.jsx("td",{children:c.lastSeen?w(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?w(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>{i("dashboard_click_event",{click_target:"connection_kill_agent",page:"connection"}),d({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)})},children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.placeName??c.projectName??"-"}),e.jsx("td",{children:c.clientId.slice(0,10)}),e.jsx("td",{children:w(c.lastSeen,n)}),e.jsx("td",{children:c.pluginVersion??"-"})]},c.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?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:()=>{i("dashboard_click_event",{click_target:"connection_clear_log",page:"connection"}),f(!0)},children:n("common.clear","Clear")})]}),e.jsx(Y,{entries:u})]}),e.jsx($,{open:k,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:l,onCancel:()=>!l&&f(!1),onConfirm:B}),e.jsx($,{open:!!p,title:n("connection.agents.kill.title","Kill agent?"),message:`"${p==null?void 0:p.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:h,onCancel:()=>!h&&d(null),onConfirm:E})]})}export{Ne as Component};
1
+ import{u as R,r as a,j as e,d as P,a as S,D as T,i as D,m as F}from"./index-BIVkyPD7.js";import{I as r}from"./InfoLabel-BkXtpBzT.js";import{S as H}from"./StatusBadge-C0DYxkUy.js";import{T as U}from"./TooltipText-59Xfc1Ui.js";import{C as $}from"./ConfirmModal-lSOkaAvB.js";import{u as K,f as G}from"./useLiveUptime-C1ZSqLmR.js";const O="_container_1h084_2",V="_entry_1h084_14",q="_timestamp_1h084_21",X="_message_1h084_27",z="_warn_1h084_34",J="_error_1h084_39",Q="_empty_1h084_44",v={container:O,entry:V,timestamp:q,message:X,warn:z,error:J,empty:Q};function W(n){const i=new Date(n);return Number.isNaN(i.getTime())?n:`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Y({entries:n}){const{t:i}=R(),t=a.useRef(null);return a.useEffect(()=>{const o=t.current;o&&(o.scrollTop=o.scrollHeight)},[n.length]),e.jsx("div",{ref:t,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:i("connection.log.empty","No events yet")}):n.map((o,u)=>e.jsxs("div",{className:`${v.entry} ${o.type?v[o.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:W(o.timestamp)}),e.jsx("span",{className:v.message,children:o.message})]},u))})}const A=50;function Z(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ee(){const{level:n,status:i,error:t}=P(),[o,u]=a.useState(null),[N,j]=a.useState([]),C=a.useRef(null),g=a.useCallback((l,x)=>{j(p=>{const d=[...p,{timestamp:Z(),message:l,type:x}];return d.length>A?d.slice(-A):d})},[]),m=a.useCallback(async()=>{try{const l=await S.get("/connection-info");u(l)}catch{u(null)}},[]),y=a.useCallback(async()=>{try{const l=await S.get("/api/dashboard/connection-log");j(l.entries??[])}catch{j([])}},[]),k=a.useCallback(async()=>{await S.post("/api/dashboard/connection-log/clear"),j([])},[]),f=a.useCallback(async l=>{await S.post("/api/dashboard/kill-agent",{instanceId:l}),await m()},[m]);return a.useEffect(()=>{n!=="disconnected"&&i&&m(),y()},[n,i,m,y]),a.useEffect(()=>{const l=new T;C.current=l,l.connect();const x=l.on("connection",d=>{const h=d,_=h.status==="connected"?"connected":"disconnected";g(`Plugin ${_} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),p=l.on("mcp_status",d=>{const h=d,_=h.status==="registered"?"registered":"unregistered";g(`MCP ${_} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),m()});return()=>{x(),p(),l.disconnect(),C.current=null}},[g,m]),{status:i,connectionInfo:o,connectionLog:N,level:n,error:t,clearConnectionLog:k,killAgent:f}}const ne="_page_15jrd_2",te="_card_15jrd_10",se="_disabled_15jrd_18",ce="_cardHeader_15jrd_24",oe="_clearButton_15jrd_37",ie="_serverGrid_15jrd_47",ae="_statusRow_15jrd_65",le="_metaItem_15jrd_72",re="_table_15jrd_79",de="_toggleBtn_15jrd_104",me="_disconnected_15jrd_119",pe="_disconnectedActions_15jrd_136",he="_btn_15jrd_143",ge="_activity_active_15jrd_161",ue="_activity_stale_15jrd_162",je="_activity_unknown_15jrd_163",xe="_killBtn_15jrd_187",_e="_emptyRow_15jrd_207",s={page:ne,card:te,disabled:se,cardHeader:ce,clearButton:oe,serverGrid:ie,statusRow:ae,metaItem:le,table:re,toggleBtn:de,disconnected:me,disconnectedActions:pe,btn:he,activity_active:ge,activity_stale:ue,activity_unknown:je,killBtn:xe,emptyRow:_e};function w(n,i){const t=Math.max(0,Math.floor((Date.now()-n)/1e3));return t<60?`${t}${i("connection.time.secondsAgo","s ago")}`:t<3600?`${Math.floor(t/60)}${i("connection.time.minutesAgo","m ago")}`:`${Math.floor(t/3600)}${i("connection.time.hoursAgo","h ago")}`}function ve(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Ne(){var I;const{t:n}=R(),{trackEvent:i}=D(),{status:t,connectionInfo:o,connectionLog:u,level:N,clearConnectionLog:j,killAgent:C}=ee(),{show:g}=F(),[m,y]=a.useState(!0),[k,f]=a.useState(!1),[l,x]=a.useState(!1),[p,d]=a.useState(null),[h,_]=a.useState(!1),L=K(t==null?void 0:t.uptime),b=N==="disconnected",M=b?"offline":"online",E=async()=>{if(p){_(!0);try{await C(p.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),d(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{_(!1)}}},B=async()=>{x(!0);try{await j(),g(n("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{x(!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")}),b?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(H,{status:M})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(U,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:G(L??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>y(c=>!c),"aria-label":m?n("common.collapse","Collapse"):n("common.expand","Expand"),children:m?"▾":"▸"})]}),m&&e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${ve(c.lastSeen)}`]}),c.aiClientName??n("connection.agents.unknown","Unknown")]}),e.jsx("td",{children:c.pid}),e.jsx("td",{children:c.projectRoot??c.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:w(c.connectedAt,n)}),e.jsx("td",{children:c.lastSeen?w(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?w(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>{i("dashboard_click_event",{click_target:"connection_kill_agent",page:"connection"}),d({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)})},children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.placeName??c.projectName??"-"}),e.jsx("td",{children:c.clientId.slice(0,10)}),e.jsx("td",{children:w(c.lastSeen,n)}),e.jsx("td",{children:c.pluginVersion??"-"})]},c.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?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:()=>{i("dashboard_click_event",{click_target:"connection_clear_log",page:"connection"}),f(!0)},children:n("common.clear","Clear")})]}),e.jsx(Y,{entries:u})]}),e.jsx($,{open:k,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:l,onCancel:()=>!l&&f(!1),onConfirm:B}),e.jsx($,{open:!!p,title:n("connection.agents.kill.title","Kill agent?"),message:`"${p==null?void 0:p.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:h,onCancel:()=>!h&&d(null),onConfirm:E})]})}export{Ne as Component};
@@ -1,4 +1,4 @@
1
- import{u as _,r as x,j as e}from"./index-IFwX560t.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",w="_unifiedView_uv8oc_40",L="_diffLine_uv8oc_46",b="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:w,diffLine:L,lineNum:b,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const l=n.split(`
1
+ import{u as _,r as x,j as e}from"./index-BIVkyPD7.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",w="_unifiedView_uv8oc_40",L="_diffLine_uv8oc_46",b="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:w,diffLine:L,lineNum:b,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const l=n.split(`
2
2
  `),d=i.split(`
3
3
  `),a=[],f=Math.max(l.length,d.length);let t=0,r=0;for(;(t<l.length||r<d.length)&&(t<l.length&&r<d.length?l[t]===d[r]?(a.push({type:"context",content:l[t],lineNum:r+1}),t++,r++):(a.push({type:"removed",content:l[t],lineNum:t+1}),t++,t<l.length&&l[t]===d[r]?(a.push({type:"added",content:d[r],lineNum:r+1}),r++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++)):t<l.length?(a.push({type:"removed",content:l[t],lineNum:t+1}),t++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++),!(a.length>f*3)););return a}function O({before:n,after:i}){const{t:l}=_(),[d,a]=x.useState("unified"),f=typeof n=="string"?n:n!=null?JSON.stringify(n,null,2):"",t=typeof i=="string"?i:i!=null?JSON.stringify(i,null,2):"",r=x.useMemo(()=>k(f,t),[f,t]);if(!f&&!t)return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.empty,children:l("changelog.diff.empty","No diff available")})});if(!f&&t){const c=t.split(`
4
4
  `);return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.unifiedView,children:c.map((u,m)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineAdded}`,children:[e.jsx("span",{className:s.lineNum,children:m+1}),e.jsxs("span",{className:s.lineContent,children:["+ ",u]})]},m))})})}return e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.header,children:[e.jsx("button",{className:`${s.modeBtn} ${d==="unified"?s.modeBtnActive:""}`,onClick:()=>a("unified"),children:l("changelog.diff.unified","Unified")}),e.jsx("button",{className:`${s.modeBtn} ${d==="side-by-side"?s.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:l("changelog.diff.sideBySide","Side by Side")})]}),d==="unified"?e.jsx("div",{className:s.unifiedView,children:r.map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${c.type==="added"?s.lineAdded:c.type==="removed"?s.lineRemoved:s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:c.lineNum??""}),e.jsxs("span",{className:s.lineContent,children:[c.type==="added"?"+ ":c.type==="removed"?"- ":" ",c.content]})]},u))}):e.jsxs("div",{className:s.sideBySide,children:[e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:l("changelog.diff.before","Before")}),e.jsx("div",{className:s.sideContent,children:f.split(`
@@ -1 +1 @@
1
- import{j as r,p as e}from"./index-IFwX560t.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
1
+ import{j as r,p as e}from"./index-BIVkyPD7.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
@@ -1 +1 @@
1
- import{j as t,u as P,r as v,d as G,l as L,a as M,D as F}from"./index-IFwX560t.js";import{I as V}from"./InfoLabel-BcS5cIV_.js";import{S as A}from"./StatusBadge-BSLWjWJC.js";import{T as U}from"./TooltipText-baLGgLqW.js";import{G as z}from"./GameChangeDetail-oLGK_BBE.js";import{u as O,f as X}from"./useLiveUptime-BVeJvePr.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",u]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{Ze as Component};
1
+ import{j as t,u as P,r as v,d as G,l as L,a as M,D as F}from"./index-BIVkyPD7.js";import{I as V}from"./InfoLabel-BkXtpBzT.js";import{S as A}from"./StatusBadge-C0DYxkUy.js";import{T as U}from"./TooltipText-59Xfc1Ui.js";import{G as z}from"./GameChangeDetail-DjupgTS5.js";import{u as O,f as X}from"./useLiveUptime-C1ZSqLmR.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",u]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{Ze as Component};
@@ -1,4 +1,4 @@
1
- import{r as c,a as b,u as f,j as e,i as M,l as k,m as A,T as H}from"./index-IFwX560t.js";import{I}from"./InfoLabel-BcS5cIV_.js";import{T as _}from"./TooltipText-baLGgLqW.js";import{C as D}from"./ConfirmModal-DuQQ9DXj.js";const E=5e3;function $(t){const r=(t==null?void 0:t.enabled)??!0,[d,o]=c.useState([]),[a,n]=c.useState(null),[p,l]=c.useState(r),i=c.useRef(null),h=c.useCallback(async()=>{try{const x=await b.get("/api/dashboard/playtest/history");o(x.entries??[])}catch{}},[]),m=c.useCallback(async()=>{if(!r){l(!1);return}await h(),l(!1)},[r,h]),y=c.useCallback(async()=>{r&&(await b.post("/api/dashboard/playtest/history/clear"),o([]),n(null))},[r]),g=c.useCallback(async x=>{if(r)try{const S=await b.get(`/api/dashboard/playtest/report/${x}`);n(S)}catch{n(null)}},[r]);return c.useEffect(()=>{if(!r){l(!1);return}return m(),i.current=setInterval(m,E),()=>{i.current&&clearInterval(i.current)}},[r,m]),{history:d,selectedReport:a,loading:p,loadReport:g,clearHistory:y}}function U(t){const r="2026-03-27T15:26:00.000Z",d={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:r,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:d}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
1
+ import{r as c,a as b,u as f,j as e,i as M,l as k,m as A,T as H}from"./index-BIVkyPD7.js";import{I}from"./InfoLabel-BkXtpBzT.js";import{T as _}from"./TooltipText-59Xfc1Ui.js";import{C as D}from"./ConfirmModal-lSOkaAvB.js";const E=5e3;function $(t){const r=(t==null?void 0:t.enabled)??!0,[d,o]=c.useState([]),[a,n]=c.useState(null),[p,l]=c.useState(r),i=c.useRef(null),h=c.useCallback(async()=>{try{const x=await b.get("/api/dashboard/playtest/history");o(x.entries??[])}catch{}},[]),m=c.useCallback(async()=>{if(!r){l(!1);return}await h(),l(!1)},[r,h]),y=c.useCallback(async()=>{r&&(await b.post("/api/dashboard/playtest/history/clear"),o([]),n(null))},[r]),g=c.useCallback(async x=>{if(r)try{const S=await b.get(`/api/dashboard/playtest/report/${x}`);n(S)}catch{n(null)}},[r]);return c.useEffect(()=>{if(!r){l(!1);return}return m(),i.current=setInterval(m,E),()=>{i.current&&clearInterval(i.current)}},[r,m]),{history:d,selectedReport:a,loading:p,loadReport:g,clearHistory:y}}function U(t){const r="2026-03-27T15:26:00.000Z",d={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:r,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:d}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
2
2
 
3
3
  - Spawn flow: PASS
4
4
  - HUD countdown: PASS