@weppy/roblox-mcp 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/CHANGELOG.md +19 -0
- package/COMMERCIAL-LICENSE.md +13 -0
- package/Dockerfile +13 -0
- package/LICENSE +648 -40
- package/README.md +31 -2
- package/TRADEMARKS.md +18 -0
- package/docs/assets/screenshots/license/license-dashboard.png +3 -0
- package/docs/assets/screenshots/license/license-plugin.png +3 -0
- package/docs/compatibility.md +1 -1
- package/docs/en/installation/README.md +25 -2
- package/docs/en/installation/ai-apps/cursor.md +77 -0
- package/docs/en/installation/roblox-explorer.md +5 -5
- package/docs/en/installation/roblox-plugin.md +1 -0
- package/docs/en/pro-upgrade.md +36 -12
- package/docs/es/README.md +29 -10
- package/docs/es/installation/README.md +25 -2
- package/docs/es/installation/ai-apps/cursor.md +77 -0
- package/docs/es/installation/roblox-plugin.md +1 -0
- package/docs/es/pro-upgrade.md +37 -13
- package/docs/id/README.md +29 -10
- package/docs/id/installation/README.md +25 -2
- package/docs/id/installation/ai-apps/cursor.md +77 -0
- package/docs/id/installation/roblox-plugin.md +1 -0
- package/docs/id/pro-upgrade.md +36 -12
- package/docs/ja/README.md +29 -10
- package/docs/ja/installation/README.md +25 -2
- package/docs/ja/installation/ai-apps/cursor.md +77 -0
- package/docs/ja/installation/roblox-plugin.md +1 -0
- package/docs/ja/pro-upgrade.md +35 -11
- package/docs/ko/README.md +28 -9
- package/docs/ko/installation/README.md +25 -2
- package/docs/ko/installation/ai-apps/cursor.md +77 -0
- package/docs/ko/installation/roblox-explorer.md +5 -5
- package/docs/ko/installation/roblox-plugin.md +1 -0
- package/docs/ko/pro-upgrade.md +35 -11
- package/docs/pt-br/README.md +29 -10
- package/docs/pt-br/installation/README.md +25 -2
- package/docs/pt-br/installation/ai-apps/cursor.md +77 -0
- package/docs/pt-br/installation/roblox-plugin.md +1 -0
- package/docs/pt-br/pro-upgrade.md +37 -13
- package/glama.json +7 -0
- package/install.ps1 +277 -0
- package/install.sh +307 -0
- package/llms-full.txt +92 -7
- package/llms.txt +13 -1
- package/package.json +14 -3
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-BOp7G4Fi.js → ChangelogDetailPage-IgHLnaEX.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Br-A5H5t.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Dao4jPQA.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-CvXLNYq0.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConfirmModal-tvPLhSO9.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Bl7tLgL2.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CN3LYLAT.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-vz7vtbbV.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-DS-g_EC0.js → OverviewPage-BDDctbAl.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C0iCoAQp.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-LnuHE5FL.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-qdFEmTM4.js → PropertyDiff-CbDafceC.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-CJs9ctOf.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DP9OFhNb.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-CC_OzjmT.js → StatusBadge-BMTgkxDJ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Bf1SdHGg.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BfXIBNVS.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoPanel-DzFynur7.js → TierPromoPanel-CUrTMsXB.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DBA-FZGE.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-BZZZ3FXe.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-O4dXhEU-.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-CkXvRg-O.js +69 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-CckH43fU.js → tier-promo-config-B9lIKWCQ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-DZCw70vn.js → useLiveUptime-DXXyWm6j.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +58 -57
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +3 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-ByQDwNhh.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DGhZm1j7.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CkQVyTc5.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-DXv_C7i6.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/InfoLabel-CszBT8rJ.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C4X6-jp-.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-emQ5xjZz.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-BtjNT-j0.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-NF_CPSvZ.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BNHvpQxD.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BOYoftuM.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DkpXj7Ui.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-CZsA-7CL.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-cVoMPYAn.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-BYvG5KEz.js +0 -69
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_xmkt1_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_xmkt1_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_xmkt1_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_xmkt1_29{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._statusRow_xmkt1_39{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_xmkt1_46{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_xmkt1_52{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_xmkt1_52 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_xmkt1_52 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._table_xmkt1_71{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_xmkt1_71 th{text-align:left;padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-weight:500;font-size:11px}._table_xmkt1_71 td{padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-primary)}._table_xmkt1_71 tr:last-child td{border-bottom:none}._directionRail_xmkt1_99{display:inline-flex;align-items:center;gap:10px}._endpointLabel_xmkt1_105{color:var(--text-secondary)}._optionRail_xmkt1_109{display:inline-flex;align-items:center;gap:6px}._directionOption_xmkt1_115{display:inline-flex;align-items:center;justify-content:center;width:28px;height:24px;border-radius:6px;border:1px solid var(--border);font-family:var(--font-code);font-size:13px;cursor:help;-webkit-user-select:none;user-select:none}._directionOptionActive_xmkt1_129{background:var(--bg-secondary)}._directionOptionInactive_xmkt1_133{background:transparent;opacity:.45;color:var(--text-muted)}._directionOptionActive_xmkt1_129._direction_forward_xmkt1_139{color:var(--success)}._directionOptionActive_xmkt1_129._direction_bidirectional_xmkt1_143{color:var(--accent)}._directionOptionActive_xmkt1_129._direction_reverse_xmkt1_147{color:var(--warning)}._lockBadge_xmkt1_152{display:inline-block;margin-left:6px;font-size:11px;color:var(--text-muted)}._proBadge_xmkt1_160{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:#1a1407;background:var(--pro-badge);border-radius:3px;vertical-align:middle}._forwardBadge_xmkt1_174{display:inline-block;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px}._configGrid_xmkt1_187{display:flex;flex-wrap:wrap;gap:16px}._configItem_xmkt1_193{display:flex;flex-direction:column;gap:2px}._configLabel_xmkt1_199{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}._configValue_xmkt1_207{font-family:var(--font-code);font-size:13px;color:var(--text-primary)}._logContainer_xmkt1_214{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_xmkt1_221{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_xmkt1_221:last-child{border-bottom:none}._logTime_xmkt1_233{color:var(--text-muted);flex-shrink:0;width:44px}._logType_xmkt1_239{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_xmkt1_248{color:var(--success)}._logTypeUpdate_xmkt1_252{color:var(--accent)}._logTypeDelete_xmkt1_256{color:var(--error)}._logTypeIdle_xmkt1_260{color:var(--text-muted)}._logPath_xmkt1_264{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_xmkt1_271{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_xmkt1_278{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_xmkt1_288{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_xmkt1_295{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_xmkt1_301{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_xmkt1_311{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_xmkt1_311:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_xmkt1_327{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_xmkt1_334{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_xmkt1_342{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_xmkt1_351{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_xmkt1_351:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_xmkt1_366{display:flex;gap:8px}._btn_xmkt1_371{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_xmkt1_371:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_xmkt1_388{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_xmkt1_388:hover{opacity:.9}._disabled_xmkt1_399{opacity:.4;pointer-events:none}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as a,b as v,D as L,u as C,a as S,d as R,j as t,T as m,f as P}from"./index-CkXvRg-O.js";import{I as u}from"./InfoLabel-vz7vtbbV.js";import{C as B}from"./ConfirmModal-CvXLNYq0.js";import{S as E}from"./StatusBadge-BMTgkxDJ.js";import{u as $,T as A}from"./tier-promo-config-B9lIKWCQ.js";import{T as O}from"./TierPromoPanel-CUrTMsXB.js";const D=5e3;function H(){const[e,i]=a.useState(null),[_,g]=a.useState(null),[l,r]=a.useState([]),[y,f]=a.useState(!0),b=a.useRef(null),h=a.useRef(null),d=a.useCallback(async()=>{try{const o=await v.get("/sync/status");i(o)}catch{}},[]),w=a.useCallback(async()=>{try{const o=await v.get("/sync/config");g(o)}catch{}},[]),n=a.useCallback(async()=>{try{const o=await v.get("/sync/history",{limit:"30"});r(o.entries??[])}catch{r([])}},[]),p=a.useCallback(async()=>{await Promise.all([d(),w(),n()]),f(!1)},[d,w,n]),j=a.useCallback(()=>{p()},[p]),T=a.useCallback(async()=>{await v.post("/api/dashboard/sync/history/clear"),r([]),d()},[d]);return a.useEffect(()=>(p(),h.current=setInterval(p,D),()=>{h.current&&clearInterval(h.current)}),[p]),a.useEffect(()=>{const o=new L;b.current=o,o.connect();const c=o.on("sync",()=>{d(),n()});return()=>{c(),o.disconnect(),b.current=null}},[d,n]),{status:e,config:_,history:l,loading:y,refresh:j,clearHistory:T}}const M="_page_xmkt1_2",F="_card_xmkt1_10",U="_cardHeader_xmkt1_17",G="_clearButton_xmkt1_29",V="_statusRow_xmkt1_39",W="_metaItem_xmkt1_46",q="_statusGrid_xmkt1_52",z="_table_xmkt1_71",Y="_directionRail_xmkt1_99",J="_endpointLabel_xmkt1_105",K="_optionRail_xmkt1_109",Q="_directionOption_xmkt1_115",X="_directionOptionActive_xmkt1_129",Z="_directionOptionInactive_xmkt1_133",ee="_direction_forward_xmkt1_139",te="_direction_bidirectional_xmkt1_143",se="_direction_reverse_xmkt1_147",ne="_lockBadge_xmkt1_152",ie="_proBadge_xmkt1_160",ce="_forwardBadge_xmkt1_174",ae="_configGrid_xmkt1_187",oe="_configItem_xmkt1_193",le="_configLabel_xmkt1_199",re="_configValue_xmkt1_207",de="_logContainer_xmkt1_214",pe="_logEntry_xmkt1_221",ue="_logTime_xmkt1_233",ye="_logType_xmkt1_239",me="_logTypeWrite_xmkt1_248",ge="_logTypeUpdate_xmkt1_252",he="_logTypeDelete_xmkt1_256",xe="_logTypeIdle_xmkt1_260",_e="_logPath_xmkt1_264",fe="_logEmpty_xmkt1_271",be="_overlay_xmkt1_278",je="_overlayTitle_xmkt1_288",ke="_overlayMessage_xmkt1_295",ve="_checklist_xmkt1_301",we="_checkItem_xmkt1_311",Te="_upgradePanel_xmkt1_327",Ne="_upgradePanelHeader_xmkt1_334",Ie="_benefitList_xmkt1_342",Le="_benefitItem_xmkt1_351",Ce="_upgradeActions_xmkt1_366",Se="_btn_xmkt1_371",Re="_btnPrimary_xmkt1_388",Pe="_disabled_xmkt1_399",s={page:M,card:F,cardHeader:U,clearButton:G,statusRow:V,metaItem:W,statusGrid:q,table:z,directionRail:Y,endpointLabel:J,optionRail:K,directionOption:Q,directionOptionActive:X,directionOptionInactive:Z,direction_forward:ee,direction_bidirectional:te,direction_reverse:se,lockBadge:ne,proBadge:ie,forwardBadge:ce,configGrid:ae,configItem:oe,configLabel:le,configValue:re,logContainer:de,logEntry:pe,logTime:ue,logType:ye,logTypeWrite:me,logTypeUpdate:ge,logTypeDelete:he,logTypeIdle:xe,logPath:_e,logEmpty:fe,overlay:be,overlayTitle:je,overlayMessage:ke,checklist:ve,checkItem:we,upgradePanel:Te,upgradePanelHeader:Ne,benefitList:Ie,benefitItem:Le,upgradeActions:Ce,btn:Se,btnPrimary:Re,disabled:Pe},Be=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ee(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function $e(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(0)}MB`}function Ae(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Oe(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function De(e,i,_,g){const l=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),r=e("sync.directions.endpoint.local","Local"),y=e("sync.directions.endpoint.studio","Studio");switch(_){case"forward":return[`${l}: ${r} <- ${y}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
|
+
`);case"bidirectional":return[`${l}: ${r} <-> ${y}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),g?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
|
+
`);case"reverse":return[`${l}: ${r} -> ${y}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),g?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
+
`);default:return l}}const He=["scripts","values","containers","data","services"];function Me(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function Fe(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function Ue(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function Ge(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function Ke(){const{t:e}=C(),{level:i}=S(),{tier:_,loading:g}=$(),l=H(),{show:r}=R(),[y,f]=a.useState(!1),[b,h]=a.useState(!1),d=!g&&_==="basic";if(i==="L0"||i==="L1")return t.jsx("div",{className:s.page,children:t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the Weppy MCP plugin installed?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check3","Are HTTP Requests enabled in Studio settings?")})]})]})})});const n=l.status,p=l.config,j=l.history,T=Oe(n==null?void 0:n.state),o=async()=>{h(!0);try{await l.clearHistory(),r(e("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{r(e("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}};return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(m,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),d&&t.jsx(m,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(E,{status:T}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(u,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.path","Path"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(m,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:He.map(c=>{var I;const k=n.directions[c],N=(I=n.applyModes)==null?void 0:I[c];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${c}`,c.charAt(0).toUpperCase()+c.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${c}-direction-rail`,children:[t.jsx(m,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:Be.map(x=>t.jsx(P,{text:De(e,c,x.key,d),children:t.jsx("span",{className:`${s.directionOption} ${k===x.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${x.key}`]??""}`,"data-active":k===x.key?"true":"false",children:x.symbol})},x.key))}),t.jsx(m,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(m,{text:Fe(e,N),children:Me(e,N)})})]},c)})})]})]}),p&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.config.title","Sync Config")}),t.jsxs("div",{className:s.configGrid,children:[t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxDepth","Max Depth")}),t.jsx("span",{className:s.configValue,children:p.maxDepth})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxInstances","Max Instances")}),t.jsx("span",{className:s.configValue,children:p.maxInstances})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.dirLimit","Dir Limit")}),t.jsx("span",{className:s.configValue,children:$e(p.directorySizeLimit)})]})]})]}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx("span",{children:e("sync.log.title","Sync Log")}),t.jsx("button",{className:s.clearButton,onClick:()=>f(!0),children:e("common.clear","Clear")})]}),t.jsx("div",{className:s.logContainer,children:j.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):j.map((c,k)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ee(c.timestamp)}),t.jsx(m,{text:Ge(e,c.type),children:t.jsx("span",{className:`${s.logType} ${Ae(c.type)}`,children:Ue(e,c.type)})}),t.jsxs("span",{className:s.logPath,children:[c.path,c.details?` — ${c.details}`:""]})]},k))})]}),d&&t.jsx(O,{title:e("sync.upgrade.title","Unlock Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:A.sync}),t.jsx(B,{open:y,title:e("sync.clear.title","Clear sync log?"),message:e("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:b,onCancel:()=>!b&&f(!1),onConfirm:o})]})}export{Ke as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as j,r as u,
|
|
1
|
+
import{u as j,r as u,g as b,h as v,j as s}from"./index-CkXvRg-O.js";import{s as e,a as N}from"./tier-promo-config-B9lIKWCQ.js";function C({icon:a,title:i,description:c,benefits:o,upgradeLabel:m,upgradeHref:d}){const{t:p}=j(),[h,r]=u.useState(!1),{trackEvent:n}=b(),{pathname:x}=v(),t=x.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.panel,children:[a&&s.jsx("div",{className:e.panelIcon,children:a}),s.jsx("div",{className:e.panelTitle,children:i}),s.jsx("div",{className:e.panelDesc,children:c}),s.jsx("ul",{className:e.benefitList,children:o.map(l=>s.jsx("li",{className:e.benefitItem,children:l},l))}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{n("dashboard_tier_toggle",{page:t}),r(!0)},children:p("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>n("dashboard_upgrade_click",{page:t}),children:m})]})]}),h&&s.jsx(N,{onClose:()=>r(!1)})]})}export{C as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as h,r as x,g,h as j,j as s}from"./index-CkXvRg-O.js";import{s as e,a as b}from"./tier-promo-config-B9lIKWCQ.js";function N({basicCalls:t,proCalls:a,totalCalls:l,proUsagePercent:c,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=g(),{pathname:m}=j(),n=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromo,children:[s.jsxs("div",{className:e.progressMain,children:[s.jsxs("div",{className:e.progressLabel,children:[s.jsx("span",{children:r("tier.progress.label","Pro / Total")}),s.jsxs("span",{children:[a," / ",l]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(c,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",t]}),s.jsxs("span",{children:[r("tier.pro")," ",a]})]})]}),s.jsx("span",{className:e.progressText,children:r("tier.banner.save","Save AI tokens with Pro!")}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{i("dashboard_tier_toggle",{page:n}),o(!0)},children:r("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>i("dashboard_upgrade_click",{page:n}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),p&&s.jsx(b,{onClose:()=>o(!1)})]})}export{N as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_1s3lp_2{overflow-x:auto}._table_1s3lp_7{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_1s3lp_7 th{text-align:left;color:var(--text-muted);font-weight:500;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--bg-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none}._table_1s3lp_7 td{padding:6px 8px;color:var(--text-primary);border-bottom:1px solid var(--border-dim, rgba(255, 255, 255, .04))}._sortable_1s3lp_32{cursor:pointer;transition:color var(--transition)}._sortable_1s3lp_32:hover{color:var(--accent)}._sortArrow_1s3lp_41{margin-left:4px;font-size:10px}._table_1s3lp_7 tbody tr:hover td{background:var(--accent-dim)}._clickable_1s3lp_52{cursor:pointer}._empty_1s3lp_57{text-align:center;color:var(--text-muted);font-style:italic;padding:24px 8px}._page_184r6_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._tabs_184r6_10{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:4px}._tab_184r6_10{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._tab_184r6_10:hover{color:var(--text-primary)}._tabActive_184r6_34{color:var(--accent);border-bottom-color:var(--accent)}._card_184r6_40{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardToolbar_184r6_47{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}._sectionTitle_184r6_55{font-family:var(--font-label);font-size:13px;color:var(--text-primary)}._dangerButton_184r6_61{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._proBadge_184r6_71{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:#1a1407;background:var(--pro-badge);border-radius:3px;vertical-align:middle}._statusOk_184r6_85{color:var(--success);font-weight:500}._tierBasic_184r6_91{color:var(--text-secondary)}._tierPro_184r6_95{color:var(--pro-badge);font-weight:500}._tierMixed_184r6_100{color:var(--text-primary);font-weight:500}._errorText_184r6_106{color:var(--error)}._filterRow_184r6_111{display:flex;align-items:center;gap:12px;margin-bottom:12px}._filterLabel_184r6_118{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);display:flex;align-items:center;gap:6px}._filterSelect_184r6_127{font-family:var(--font-code);font-size:12px;padding:3px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary)}._expandedRow_184r6_138{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;margin-top:8px}._expandedSection_184r6_146{margin-bottom:8px;font-size:12px;color:var(--text-secondary)}._expandedSection_184r6_146:last-child{margin-bottom:0}._pre_184r6_156{font-family:var(--font-code);font-size:11px;color:var(--text-primary);background:var(--bg-card);border:1px solid var(--border);border-radius:4px;padding:8px;margin-top:4px;overflow-x:auto;max-height:200px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}._pagination_184r6_173{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px}._pageInfo_184r6_181{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_184r6_187{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_184r6_187:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_184r6_187:disabled{opacity:.4;cursor:default}._tierDistribution_184r6_210{margin-bottom:16px}._tierBarWrap_184r6_214{display:flex;height:12px;border-radius:6px;overflow:hidden;background:var(--bg-secondary)}._tierBarBasic_184r6_222{background:var(--text-secondary);transition:width .3s ease}._tierBarPro_184r6_227{background:var(--accent);transition:width .3s ease}._tierLabels_184r6_232{display:flex;justify-content:space-between;margin-top:4px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._statsTableWrap_184r6_241{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._statsTable_184r6_241{width:100%;border-collapse:collapse}._statsTable_184r6_241 th,._statsTable_184r6_241 td{padding:10px 12px;font-size:12px;text-align:left;border-bottom:1px solid var(--border)}._statsTable_184r6_241 th{font-family:var(--font-label);font-size:11px;font-weight:500;color:var(--text-secondary);background:var(--bg-secondary)}._statsTable_184r6_241 tbody tr:last-child td{border-bottom:none}._sortableHeader_184r6_272{cursor:pointer;-webkit-user-select:none;user-select:none}._sortArrow_184r6_277{margin-left:4px}._statsToolRow_184r6_281{cursor:pointer}._statsToolRow_184r6_281:hover td{background:var(--bg-secondary)}._statsActionRow_184r6_289 td{background:color-mix(in srgb,var(--bg-secondary) 72%,transparent)}._expandButton_184r6_293{display:inline-flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}._expandIcon_184r6_305{width:10px;color:var(--text-secondary)}._actionLabel_184r6_310{display:inline-block;padding-left:18px;font-family:var(--font-code);color:var(--text-secondary)}._emptyStats_184r6_317{text-align:center;color:var(--text-muted)}._summaryLine_184r6_323{margin-top:12px;font-family:var(--font-code);font-size:12px;color:var(--text-muted);text-align:right}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r as l,b as R,D as Z,u as q,d as z,T as w}from"./index-CkXvRg-O.js";import{C as Q}from"./ConfirmModal-CvXLNYq0.js";import{u as X,T as Y}from"./tier-promo-config-B9lIKWCQ.js";import{T as tt}from"./TierPromoProgress-DBA-FZGE.js";const st="_wrapper_1s3lp_2",et="_table_1s3lp_7",at="_sortable_1s3lp_32",ot="_sortArrow_1s3lp_41",rt="_clickable_1s3lp_52",lt="_empty_1s3lp_57",M={wrapper:st,table:et,sortable:at,sortArrow:ot,clickable:rt,empty:lt};function it({columns:e,data:o,sortBy:T,sortDir:f="asc",onSort:g,onRowClick:S,rowKey:C,emptyMessage:v}){return s.jsx("div",{className:M.wrapper,children:s.jsxs("table",{className:M.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(n=>s.jsxs("th",{style:n.width?{width:n.width}:void 0,className:n.sortable?M.sortable:void 0,onClick:n.sortable&&g?()=>g(n.key):void 0,children:[s.jsx("span",{children:n.label}),n.sortable&&T===n.key&&s.jsx("span",{className:M.sortArrow,children:f==="asc"?"▴":"▾"})]},n.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:M.empty,children:v||"No data"})}):o.map((n,k)=>s.jsx("tr",{className:S?M.clickable:void 0,onClick:S?()=>S(n):void 0,children:e.map(p=>s.jsx("td",{children:p.render?p.render(n):String(n[p.key]??"")},p.key))},C?C(n):k))})]})})}const V=50;function nt(){const[e,o]=l.useState(null),[T,f]=l.useState(!0),[g,S]=l.useState([]),[C,v]=l.useState(0),[n,k]=l.useState(!1),[p,N]=l.useState(!0),[x,H]=l.useState(0),[u,D]=l.useState(""),[B,E]=l.useState([]),[U,A]=l.useState(0),[O,d]=l.useState(!1),[$,F]=l.useState(!0),[b,j]=l.useState(0),L=l.useRef(null),y=l.useCallback(async()=>{f(!0);try{const m=await R.get("/api/dashboard/tool-stats");o(m)}catch{}finally{f(!1)}},[]),t=l.useCallback(async(m,_)=>{N(!0);try{const K={limit:String(V),offset:String(m)};_&&(K.tool=_);const W=await R.get("/api/dashboard/history",K);S(W.entries),v(W.total),k(W.hasMore)}catch{S([]),v(0),k(!1)}finally{N(!1)}},[]),r=l.useCallback(async m=>{F(!0);try{const _=await R.get("/api/dashboard/failures",{limit:String(V),offset:String(m)});E(_.entries),A(_.total),d(_.hasMore)}catch{E([]),A(0),d(!1)}finally{F(!1)}},[]),i=l.useCallback(()=>{y(),t(x,u),r(b)},[y,t,r,x,u,b]),h=l.useCallback(async()=>{await R.post("/api/dashboard/tools/history/clear"),t(x,u),r(b)},[t,r,x,u,b]),c=l.useCallback(async()=>{await R.post("/api/dashboard/tools/statistics/clear"),y()},[y]);return l.useEffect(()=>{y()},[y]),l.useEffect(()=>{t(x,u)},[t,x,u]),l.useEffect(()=>{r(b)},[r,b]),l.useEffect(()=>{const m=new Z;L.current=m,m.connect();const _=m.on("command",()=>{y(),t(x,u),r(b)});return()=>{_(),m.disconnect(),L.current=null}},[y,t,r,x,u,b]),{statistics:e,statsLoading:T,history:g,historyTotal:C,historyHasMore:n,historyLoading:p,historyOffset:x,historyToolFilter:u,setHistoryOffset:H,setHistoryToolFilter:D,failures:B,failuresTotal:U,failuresHasMore:O,failuresLoading:$,failuresOffset:b,setFailuresOffset:j,refresh:i,clearHistory:h,clearStatistics:c}}const ct="_page_184r6_2",dt="_tabs_184r6_10",ut="_tab_184r6_10",pt="_tabActive_184r6_34",ht="_card_184r6_40",mt="_cardToolbar_184r6_47",xt="_sectionTitle_184r6_55",bt="_dangerButton_184r6_61",ft="_proBadge_184r6_71",_t="_statusOk_184r6_85",yt="_tierBasic_184r6_91",jt="_tierPro_184r6_95",gt="_tierMixed_184r6_100",St="_filterRow_184r6_111",Tt="_filterLabel_184r6_118",Ct="_filterSelect_184r6_127",Nt="_expandedRow_184r6_138",wt="_expandedSection_184r6_146",vt="_pre_184r6_156",kt="_pagination_184r6_173",Bt="_pageInfo_184r6_181",Mt="_btn_184r6_187",Pt="_tierDistribution_184r6_210",Et="_tierBarWrap_184r6_214",Lt="_tierBarBasic_184r6_222",Rt="_tierBarPro_184r6_227",Ht="_tierLabels_184r6_232",At="_statsTableWrap_184r6_241",Ot="_statsTable_184r6_241",$t="_sortableHeader_184r6_272",Ft="_sortArrow_184r6_277",It="_statsToolRow_184r6_281",Dt="_statsActionRow_184r6_289",Ut="_expandButton_184r6_293",Wt="_expandIcon_184r6_305",Gt="_actionLabel_184r6_310",Jt="_emptyStats_184r6_317",Kt="_summaryLine_184r6_323",a={page:ct,tabs:dt,tab:ut,tabActive:pt,card:ht,cardToolbar:mt,sectionTitle:xt,dangerButton:bt,proBadge:ft,statusOk:_t,tierBasic:yt,tierPro:jt,tierMixed:gt,filterRow:St,filterLabel:Tt,filterSelect:Ct,expandedRow:Nt,expandedSection:wt,pre:vt,pagination:kt,pageInfo:Bt,btn:Mt,tierDistribution:Pt,tierBarWrap:Et,tierBarBasic:Lt,tierBarPro:Rt,tierLabels:Ht,statsTableWrap:At,statsTable:Ot,sortableHeader:$t,sortArrow:Ft,statsToolRow:It,statsActionRow:Dt,expandButton:Ut,expandIcon:Wt,actionLabel:Gt,emptyStats:Jt,summaryLine:Kt},G=50;function Vt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function I(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function J(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Xt(){const{t:e}=q(),o=nt(),{show:T}=z(),f=X(),[g,S]=l.useState("history"),[C,v]=l.useState(null),[n,k]=l.useState(null),[p,N]=l.useState(null),[x,H]=l.useState(!1),[u,D]=l.useState("totalCalls"),[B,E]=l.useState("desc"),U=l.useCallback(t=>{D(r=>r===t?(E(i=>i==="asc"?"desc":"asc"),t):(E("desc"),t))},[]),A=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),O=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const i=Object.entries(r.actions??{}).map(([h,c])=>({toolName:r.toolName,actionName:c.action??h,tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs,firstUsed:c.firstUsed,lastUsed:c.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:i,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=l.useCallback((t,r,i,h)=>s.jsx(w,{text:e(i,h),children:e(t,r)}),[e]),$=l.useMemo(()=>[...O].sort((r,i)=>{const h=r[u],c=i[u];if(typeof h=="number"&&typeof c=="number")return B==="asc"?h-c:c-h;const m=String(h??""),_=String(c??"");return B==="asc"?m.localeCompare(_):_.localeCompare(m)}),[O,u,B]),F=l.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Vt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var i;const r=((i=t.parameters)==null?void 0:i.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(w,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>I(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(w,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),b=l.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>J(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>I(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),j=l.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,i=t+r;if(i===0)return null;const h=Math.round(t/i*100),c=100-h;return{basic:t,pro:r,total:i,basicPct:h,proPct:c}},[o.statistics]),L=l.useCallback(t=>{k(r=>r===t?null:t)},[]),y=l.useCallback(async()=>{if(p){H(!0);try{p==="history"?await o.clearHistory():await o.clearStatistics(),T(e("toast.clearSuccess","Cleared successfully"),"success"),N(null)}catch{T(e("toast.clearFailed","Failed to clear data"),"error")}finally{H(!1)}}},[p,T,e,o]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${g===t?a.tabActive:""}`,onClick:()=>S(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),g==="history"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),A.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(it,{columns:F,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),C&&(()=>{const t=o.history.find(r=>r.id===C);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-G)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+G,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+G),children:e("tools.page.next","Next")})]})]}),g==="statistics"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("statistics"),children:e("common.clear","Clear")})]}),j&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${j.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${j.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",j.basicPct,"% (",j.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",j.proPct,"% (",j.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:b.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>U(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&u===t.key&&s.jsx("span",{className:a.sortArrow,children:B==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:b.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const r=n===t.toolName;return s.jsxs(l.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>L(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),L(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:J(t.successCount,t.totalCalls)}),s.jsx("td",{children:I(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(i=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:i.actionName})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:J(i.successCount,i.totalCalls)}),s.jsx("td",{children:I(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,i.tier)})})]},`${t.toolName}:${i.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!f.loading&&f.tier==="basic"&&s.jsx(tt,{basicCalls:f.basicCalls,proCalls:f.proCalls,totalCalls:f.totalCalls,proUsagePercent:f.proUsagePercent,upgradeHref:Y.tools}),s.jsx(Q,{open:p!==null,title:p==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:p==="history"?e("tools.clear.history.message","This permanently removes the current place tool history and failures."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:x,onCancel:()=>!x&&N(null),onConfirm:y})]})}export{Xt as Component};
|