@wrongstack/webui 1.0.9 → 1.0.11
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/dist/assets/AgentRosterView-BzVZjThP.js +12 -0
- package/dist/assets/AgentRosterView-Cv9-DYty.css +1 -0
- package/dist/assets/{AnalyticsDashboard-fPe6DYsh.js → AnalyticsDashboard-BT_KhdxY.js} +1 -1
- package/dist/assets/AudienceMemoryPanel-CdGaL5ob.js +3 -0
- package/dist/assets/ChangesView-BbNRQjPu.js +1 -0
- package/dist/assets/{ChimeraReviewsView-BQe81cSZ.js → ChimeraReviewsView-DdLrY1rA.js} +1 -1
- package/dist/assets/ChronicleDashboard-CXAqB0-c.js +1 -0
- package/dist/assets/CodeEditor-BRVibv3L.js +2 -0
- package/dist/assets/CodeMap-BVSuBKUK.js +1 -0
- package/dist/assets/{CronJobsPanel-C30TtTM7.js → CronJobsPanel-DO8KnHyT.js} +1 -1
- package/dist/assets/DeadCodeScanPanel-ByhAW_bl.js +2 -0
- package/dist/assets/{DebugDashboard-jJxP9Qek.js → DebugDashboard-nitOcTHq.js} +1 -1
- package/dist/assets/DesignGalleryView-DhavCall.js +1 -0
- package/dist/assets/GoalView-CCdMVcp4.js +1 -0
- package/dist/assets/KanbanView-PzDm4bt2.js +3 -0
- package/dist/assets/MailboxDetailView-DAljvmny.js +1 -0
- package/dist/assets/MemoryDrawer-IMvyNAhc.js +1 -0
- package/dist/assets/MemoryManager-BtC4dOvO.js +1 -0
- package/dist/assets/{ProcessMonitor-Bvgcuk_7.js → ProcessMonitor-C39U4XNb.js} +1 -1
- package/dist/assets/{PromptJournalView-BUgpBI3V.js → PromptJournalView-CdC4ldrv.js} +1 -1
- package/dist/assets/ProviderTestView-CSNA3lH_.js +1 -0
- package/dist/assets/QueuePanel-D7TXqgFW.js +1 -0
- package/dist/assets/{RefreshDebugView-CCk1X8Hz.js → RefreshDebugView-Dbq_bHwj.js} +1 -1
- package/dist/assets/RepositoryHistoryView-yhAMRjpk.js +2 -0
- package/dist/assets/{RequirementIntakeView-ByVm-u0p.js → RequirementIntakeView-Dhp5_d6J.js} +1 -1
- package/dist/assets/SageTabs-BlLy8Phu.js +2 -0
- package/dist/assets/SddFlowGraph-BZkvlaQ1.js +1 -0
- package/dist/assets/SddHub-KdxihXZy.js +2 -0
- package/dist/assets/SessionInspectView-kKzWEPpe.js +1 -0
- package/dist/assets/SessionList-DjDxENAu.js +1 -0
- package/dist/assets/SessionsDashboard-CGCCMceU.js +1 -0
- package/dist/assets/SetupScreen-D70VCq7r.js +1 -0
- package/dist/assets/SkillDetailView-Dp2kWAQb.js +3 -0
- package/dist/assets/TechStackView-DYdZrkkA.js +2 -0
- package/dist/assets/TerminalPanel-B9Ka6hvR.js +1 -0
- package/dist/assets/{activity-pDZp_UqI.js → activity-B-GYDVn2.js} +2 -2
- package/dist/assets/{activity-BGw29FDK.js → activity-BWPWyp3o.js} +5 -5
- package/dist/assets/{activity-D8n7MaKo.js → activity-BazcMhZZ.js} +2 -2
- package/dist/assets/{activity-CbWiifO9.js → activity-Bk7N_ZW5.js} +5 -5
- package/dist/assets/{activity-S9f20P0d.js → activity-Cmq0z33p.js} +2 -2
- package/dist/assets/{activity-DYH5K2cA.js → activity-DBsMiPsa.js} +2 -2
- package/dist/assets/{activity-DdvIZYux.js → activity-VTOCX_jm.js} +2 -2
- package/dist/assets/atkinson-hyperlegible-next-latin-ext-wght-normal-C6vrW8VD.woff2 +0 -0
- package/dist/assets/atkinson-hyperlegible-next-latin-wght-normal-BcXVPD7q.woff2 +0 -0
- package/dist/assets/button-9ewV4TF3.js +1 -0
- package/dist/assets/cascadia-code-arabic-wght-normal-BxRhwSzF.woff2 +0 -0
- package/dist/assets/cascadia-code-braille-wght-normal-Cj7wfYns.woff2 +0 -0
- package/dist/assets/cascadia-code-cyrillic-ext-wght-normal-Bq2rGQtZ.woff2 +0 -0
- package/dist/assets/cascadia-code-cyrillic-wght-normal-DC72kP-V.woff2 +0 -0
- package/dist/assets/cascadia-code-greek-wght-normal-DmKacV-0.woff2 +0 -0
- package/dist/assets/cascadia-code-hebrew-wght-normal-CYieC9BD.woff2 +0 -0
- package/dist/assets/cascadia-code-latin-ext-wght-normal-CeKCfnVW.woff2 +0 -0
- package/dist/assets/cascadia-code-latin-wght-normal-CCwG33-X.woff2 +0 -0
- package/dist/assets/cascadia-code-symbols2-wght-normal-o0G5EPJ1.woff2 +0 -0
- package/dist/assets/cascadia-code-vietnamese-wght-normal-DXbdGs8p.woff2 +0 -0
- package/dist/assets/{chat-store-DpI9nO_z.js → chat-store-DNRce6sE.js} +1 -1
- package/dist/assets/{codemap-activity-store-5hcdmofR.js → codemap-activity-store-Ha7XbGgq.js} +1 -1
- package/dist/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
- package/dist/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
- package/dist/assets/commit-mono-latin-600-normal-BuQDXT0M.woff +0 -0
- package/dist/assets/commit-mono-latin-600-normal-SwgSWHaV.woff2 +0 -0
- package/dist/assets/commit-mono-latin-700-normal-1-GU0IUE.woff +0 -0
- package/dist/assets/commit-mono-latin-700-normal-DU8mrtj2.woff2 +0 -0
- package/dist/assets/config-store-BAUadwHd.js +22 -0
- package/dist/assets/dialog-C7EIBM_2.js +1 -0
- package/dist/assets/dm-sans-latin-ext-wght-normal-BOFOeGcA.woff2 +0 -0
- package/dist/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
- package/dist/assets/{empty-state-Dl66htl_.js → empty-state-5YP1rmE6.js} +1 -1
- package/dist/assets/figtree-latin-ext-wght-normal-DCwSJGxG.woff2 +0 -0
- package/dist/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/dist/assets/fira-code-cyrillic-ext-wght-normal-DhYMMuQd.woff2 +0 -0
- package/dist/assets/fira-code-cyrillic-wght-normal-Y3u8pIsh.woff2 +0 -0
- package/dist/assets/fira-code-greek-ext-wght-normal-wWus70Ix.woff2 +0 -0
- package/dist/assets/fira-code-greek-wght-normal-B2SviObF.woff2 +0 -0
- package/dist/assets/fira-code-latin-ext-wght-normal-Dvfvaomy.woff2 +0 -0
- package/dist/assets/fira-code-latin-wght-normal-CHoedHDv.woff2 +0 -0
- package/dist/assets/fira-code-symbols2-wght-normal-CE6EOz_n.woff2 +0 -0
- package/dist/assets/fonts-DRGbd-AM.js +2 -0
- package/dist/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
- package/dist/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
- package/dist/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/{i18n-B_njdXiH.js → i18n-CbyUyl6G.js} +2 -2
- package/dist/assets/ibm-plex-serif-cyrillic-400-normal-C7IY3oUc.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-400-normal-CPQ8oqB-.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-600-normal-6oiym5iu.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-600-normal-C8YEAlRA.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-700-normal-BSMLrh7C.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-700-normal-CHVzwaSb.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-400-normal-BcBv-TKp.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-400-normal-CxUI4jC_.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-600-normal-CDMeBxaJ.woff +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-600-normal-DXSZftVr.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-700-normal-CFcTJr1V.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-cyrillic-ext-700-normal-Dq7XTXEq.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-400-normal-BB-zNvJB.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-400-normal-BIGslYFI.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-600-normal-D3rpGdkS.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-600-normal-DAxitmSu.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-700-normal-BBiG0u0D.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-700-normal-bnJnpGuO.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-400-normal-CNMooFZX.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-400-normal-DwktX9jl.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-600-normal-CU6LeQOd.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-600-normal-D1-_Ic5L.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-700-normal-5BnP_gGI.woff +0 -0
- package/dist/assets/ibm-plex-serif-latin-ext-700-normal-BoBbeF2z.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-400-normal-BY9Vij9A.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-400-normal-DGubAMUE.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-600-normal-BBruYZNA.woff2 +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-600-normal-DZRaS25B.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-700-normal-B3aSYR1A.woff +0 -0
- package/dist/assets/ibm-plex-serif-vietnamese-700-normal-hPmb8oh_.woff2 +0 -0
- package/dist/assets/{index-CfREDCPe.js → index-BhXxZMAb.js} +83 -76
- package/dist/assets/index-BssEH_2N.css +1 -0
- package/dist/assets/{input-DAvKojvP.js → input-ag1CrUiS.js} +1 -1
- package/dist/assets/intel-one-mono-latin-400-normal-CqVdU6iH.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-400-normal-Dz-D6UFM.woff +0 -0
- package/dist/assets/intel-one-mono-latin-600-normal-DJb_B24X.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-600-normal-UTD3q2hA.woff +0 -0
- package/dist/assets/intel-one-mono-latin-700-normal-BFFlk8Op.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-700-normal-BzzNQkyM.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-400-normal-BW7QmGmG.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-400-normal-DpSum8DV.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-ext-600-normal-VDQcLlxR.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-600-normal-wurdkzs-.woff2 +0 -0
- package/dist/assets/intel-one-mono-latin-ext-700-normal-Cszyb8TI.woff +0 -0
- package/dist/assets/intel-one-mono-latin-ext-700-normal-DHqel5Cm.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-400-normal-CD7uMPNv.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-400-normal-DrJQZ3Wk.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-600-normal-DhzUCacJ.woff2 +0 -0
- package/dist/assets/intel-one-mono-symbols2-600-normal-DoqMVv6l.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-700-normal-CYi7u3jm.woff +0 -0
- package/dist/assets/intel-one-mono-symbols2-700-normal-CkmMEo1z.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-400-normal-Bn-nXHDK.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-400-normal-nd8xkrKu.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-600-normal-B9HWtSu2.woff2 +0 -0
- package/dist/assets/intel-one-mono-vietnamese-600-normal-Dm9ZhbyQ.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-700-normal-Da_Xc8bO.woff +0 -0
- package/dist/assets/intel-one-mono-vietnamese-700-normal-xgkGRJps.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/assets/iosevka-latin-400-normal-7stTb90X.woff2 +0 -0
- package/dist/assets/iosevka-latin-400-normal-BVqCxfc4.woff +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/assets/lexend-latin-ext-wght-normal-B6JQhE1e.woff2 +0 -0
- package/dist/assets/lexend-latin-wght-normal-ci0D1wrL.woff2 +0 -0
- package/dist/assets/lexend-vietnamese-wght-normal-RvljkFvg.woff2 +0 -0
- package/dist/assets/literata-cyrillic-ext-wght-normal-CGKlZYBf.woff2 +0 -0
- package/dist/assets/literata-cyrillic-wght-normal-DLqwHbi6.woff2 +0 -0
- package/dist/assets/literata-greek-ext-wght-normal-e3e57Shi.woff2 +0 -0
- package/dist/assets/literata-greek-wght-normal-CO1l-giJ.woff2 +0 -0
- package/dist/assets/literata-latin-ext-wght-normal-BnEbWgdZ.woff2 +0 -0
- package/dist/assets/literata-latin-wght-normal-DLxlUchJ.woff2 +0 -0
- package/dist/assets/literata-vietnamese-wght-normal-LcSrhZ7T.woff2 +0 -0
- package/dist/assets/{mailbox-store-5Dizermg.js → mailbox-store-C49LeBj8.js} +1 -1
- package/dist/assets/martian-mono-cyrillic-wght-normal-B84CD5C_.woff2 +0 -0
- package/dist/assets/martian-mono-latin-ext-wght-normal-DlL6xMw5.woff2 +0 -0
- package/dist/assets/martian-mono-latin-wght-normal-5W32yIyr.woff2 +0 -0
- package/dist/assets/noto-sans-mono-cyrillic-ext-wght-normal-CFdLnqWt.woff2 +0 -0
- package/dist/assets/noto-sans-mono-cyrillic-wght-normal-Bt8FJ3Mn.woff2 +0 -0
- package/dist/assets/noto-sans-mono-greek-ext-wght-normal-D70fr4An.woff2 +0 -0
- package/dist/assets/noto-sans-mono-greek-wght-normal-CxbW-kt-.woff2 +0 -0
- package/dist/assets/noto-sans-mono-latin-ext-wght-normal-Co5HW6fV.woff2 +0 -0
- package/dist/assets/noto-sans-mono-latin-wght-normal-BOJxtwUa.woff2 +0 -0
- package/dist/assets/noto-sans-mono-vietnamese-wght-normal-R4O-K-Ty.woff2 +0 -0
- package/dist/assets/nunito-sans-cyrillic-ext-wght-normal-7w74d1lj.woff2 +0 -0
- package/dist/assets/nunito-sans-cyrillic-wght-normal-B9hoeQUC.woff2 +0 -0
- package/dist/assets/nunito-sans-latin-ext-wght-normal-DMEAsnHD.woff2 +0 -0
- package/dist/assets/nunito-sans-latin-wght-normal-BWQ3gi2K.woff2 +0 -0
- package/dist/assets/nunito-sans-vietnamese-wght-normal-BhFYcaJr.woff2 +0 -0
- package/dist/assets/onest-cyrillic-ext-wght-normal-DOFToQv1.woff2 +0 -0
- package/dist/assets/onest-cyrillic-wght-normal-DayYxulF.woff2 +0 -0
- package/dist/assets/onest-latin-ext-wght-normal-QAhDxQuo.woff2 +0 -0
- package/dist/assets/onest-latin-wght-normal-Dun_Rd-l.woff2 +0 -0
- package/dist/assets/onest-math-wght-normal-Bl4ZGkZl.woff2 +0 -0
- package/dist/assets/onest-symbols-wght-normal-DxQzqQfC.woff2 +0 -0
- package/dist/assets/onest-vietnamese-wght-normal-BBxOatbv.woff2 +0 -0
- package/dist/assets/outfit-latin-ext-wght-normal-DdQaqQDo.woff2 +0 -0
- package/dist/assets/outfit-latin-wght-normal-Bc-8i84L.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-latin-ext-wght-normal-DmpS2jIq.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2 +0 -0
- package/dist/assets/plus-jakarta-sans-vietnamese-wght-normal-qRpaaN48.woff2 +0 -0
- package/dist/assets/red-hat-mono-latin-ext-wght-normal-BQQ6IFDA.woff2 +0 -0
- package/dist/assets/red-hat-mono-latin-wght-normal-Dwfc5A3M.woff2 +0 -0
- package/dist/assets/roboto-mono-cyrillic-ext-wght-normal-BUDPrIko.woff2 +0 -0
- package/dist/assets/roboto-mono-cyrillic-wght-normal-HUlVHixE.woff2 +0 -0
- package/dist/assets/roboto-mono-greek-wght-normal-BJJTbwTT.woff2 +0 -0
- package/dist/assets/roboto-mono-latin-ext-wght-normal-QAYlOegK.woff2 +0 -0
- package/dist/assets/roboto-mono-latin-wght-normal-CZtBPCCa.woff2 +0 -0
- package/dist/assets/roboto-mono-vietnamese-wght-normal-DlC-zuDL.woff2 +0 -0
- package/dist/assets/{roster-ws-CSbZSs3G.js → roster-ws-z8DKquaN.js} +1 -1
- package/dist/assets/settings-B5Jy-ObI.js +1 -0
- package/dist/assets/settings-BXTJJ4n-.js +1 -0
- package/dist/assets/settings-BcXAVecM.js +1 -0
- package/dist/assets/settings-ByPfZHGm.js +1 -0
- package/dist/assets/settings-CCe4iHcn.js +1 -0
- package/dist/assets/settings-D2GLiaDO.js +1 -0
- package/dist/assets/settings-gB9nKL3f.js +1 -0
- package/dist/assets/{shared-BirfDJmq.js → shared-BFJvAYzX.js} +1 -1
- package/dist/assets/source-code-pro-cyrillic-ext-wght-normal-BODHZjil.woff2 +0 -0
- package/dist/assets/source-code-pro-cyrillic-wght-normal-aqTvhEeI.woff2 +0 -0
- package/dist/assets/source-code-pro-greek-wght-normal-BvT6WsG1.woff2 +0 -0
- package/dist/assets/source-code-pro-latin-ext-wght-normal-0UZNSh4u.woff2 +0 -0
- package/dist/assets/source-code-pro-latin-wght-normal-BP8Zz55n.woff2 +0 -0
- package/dist/assets/source-code-pro-vietnamese-wght-normal-B6x53GZG.woff2 +0 -0
- package/dist/assets/source-sans-3-cyrillic-ext-wght-normal-DzyfIafT.woff2 +0 -0
- package/dist/assets/source-sans-3-cyrillic-wght-normal-BMDVbyM7.woff2 +0 -0
- package/dist/assets/source-sans-3-greek-ext-wght-normal-BWSLJLk6.woff2 +0 -0
- package/dist/assets/source-sans-3-greek-wght-normal-C9H9m1vD.woff2 +0 -0
- package/dist/assets/source-sans-3-latin-ext-wght-normal-C8iNium2.woff2 +0 -0
- package/dist/assets/source-sans-3-latin-wght-normal-BqRLTx4X.woff2 +0 -0
- package/dist/assets/source-sans-3-vietnamese-wght-normal-C1uRvKPU.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-wght-normal-cHuGMAiY.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-wght-normal-DwHjdM4S.woff2 +0 -0
- package/dist/assets/source-serif-4-greek-wght-normal-ece1310W.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-ext-wght-normal-CxNHBx-q.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-wght-normal-D9elroTD.woff2 +0 -0
- package/dist/assets/source-serif-4-vietnamese-wght-normal-D-yuW59g.woff2 +0 -0
- package/dist/assets/space-mono-latin-400-normal-Rg4St2Dn.woff2 +0 -0
- package/dist/assets/space-mono-latin-400-normal-_3DlpgIW.woff +0 -0
- package/dist/assets/space-mono-latin-700-normal-D7A851RN.woff +0 -0
- package/dist/assets/space-mono-latin-700-normal-mWgeinG7.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-400-normal-D4cJI_B-.woff +0 -0
- package/dist/assets/space-mono-latin-ext-400-normal-DTLbW2xa.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-700-normal-B2s3bDs2.woff2 +0 -0
- package/dist/assets/space-mono-latin-ext-700-normal-B_E7P90g.woff +0 -0
- package/dist/assets/space-mono-vietnamese-400-normal-B0PMp_xB.woff +0 -0
- package/dist/assets/space-mono-vietnamese-400-normal-BNOj0Qhp.woff2 +0 -0
- package/dist/assets/space-mono-vietnamese-700-normal-D-KrLuLr.woff +0 -0
- package/dist/assets/space-mono-vietnamese-700-normal-DWQgDHuA.woff2 +0 -0
- package/dist/assets/{stores-COxKgvNx.js → stores-BIVCS5nu.js} +2 -2
- package/dist/assets/ubuntu-mono-cyrillic-400-normal-Di_0TARV.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-400-normal-OGyu3tt3.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-700-normal-BFVeNRUG.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-700-normal-Fcmsc1TE.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-400-normal-C5u8faa9.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-400-normal-CL-A5l1V.woff +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-700-normal-Bs-2rkWJ.woff2 +0 -0
- package/dist/assets/ubuntu-mono-cyrillic-ext-700-normal-CqMWGnc6.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-400-normal-CCUzT4Jh.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-400-normal-DR50Gfyl.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-700-normal-BZ2dYCtm.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-700-normal-CzNTt3J6.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-400-normal-BNZd3ZNJ.woff +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-400-normal-CUE8Ia0W.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-700-normal-BT9L2HK2.woff2 +0 -0
- package/dist/assets/ubuntu-mono-greek-ext-700-normal-C7ZC70Zm.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-400-normal-DpWeehTz.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-400-normal-l4cqI2xd.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-700-normal-g9eDMPsO.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-700-normal-nUYOZNIl.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-400-normal-C-izf5FM.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-400-normal-Cadvr_Yo.woff2 +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-700-normal-DDYBRrrS.woff +0 -0
- package/dist/assets/ubuntu-mono-latin-ext-700-normal-DW9JNpKV.woff2 +0 -0
- package/dist/assets/ui-store-DC3mkswy.js +1 -0
- package/dist/assets/utils-CKsqCaP8.js +1 -0
- package/dist/assets/{vector-memory-panel-fEdfCaDJ.js → vector-memory-panel-DZFEwwGM.js} +1 -1
- package/dist/assets/{vendor-BO-lHyIr.js → vendor-V3ydTHqN.js} +14 -14
- package/dist/assets/vendor-jL-bRT8f.css +1 -0
- package/dist/assets/victor-mono-cyrillic-ext-wght-normal-BdiBydkn.woff2 +0 -0
- package/dist/assets/victor-mono-cyrillic-wght-normal-hErKNM3V.woff2 +0 -0
- package/dist/assets/victor-mono-greek-wght-normal-Dt1CKMit.woff2 +0 -0
- package/dist/assets/victor-mono-latin-ext-wght-normal-9ZPGfAHN.woff2 +0 -0
- package/dist/assets/victor-mono-latin-wght-normal-DLAw12qW.woff2 +0 -0
- package/dist/assets/victor-mono-vietnamese-wght-normal-C28_QU0a.woff2 +0 -0
- package/dist/assets/{view-navigation-CVnKqjL2.js → view-navigation-DHtNFXIl.js} +1 -1
- package/dist/components/MessageBubble/ToolCallOverview.d.ts +14 -0
- package/dist/components/SettingsPanel/FontSettingsTab.d.ts +2 -0
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/hooks/use-font-settings.d.ts +13 -0
- package/dist/index.html +17 -16
- package/dist/index.js +13650 -10550
- package/dist/lib/font-scale-css.d.ts +45 -0
- package/dist/lib/fonts.d.ts +502 -0
- package/dist/stores/config-store.d.ts +8 -1
- package/dist/stores/types.d.ts +6 -0
- package/dist/stores/ui-store-types.d.ts +1 -1
- package/package.json +39 -9
- package/dist/assets/AgentRosterView-Ce7myLNH.css +0 -1
- package/dist/assets/AgentRosterView-CtUX-VHJ.js +0 -12
- package/dist/assets/AudienceMemoryPanel-i53Y5nRR.js +0 -3
- package/dist/assets/ChangesView-CFOQZBoO.js +0 -1
- package/dist/assets/ChronicleDashboard-Dc2rEfEh.js +0 -1
- package/dist/assets/CodeEditor-DhA63AyO.js +0 -2
- package/dist/assets/CodeMap-6sHlGgjj.js +0 -1
- package/dist/assets/DeadCodeScanPanel-j3n15R1p.js +0 -2
- package/dist/assets/DesignGalleryView-tw6AdJGD.js +0 -1
- package/dist/assets/GoalView-DsGdbElx.js +0 -1
- package/dist/assets/KanbanView-B8USJasA.js +0 -3
- package/dist/assets/MailboxDetailView-jsHPTvQO.js +0 -1
- package/dist/assets/MemoryDrawer-BdcWptmP.js +0 -1
- package/dist/assets/MemoryManager-Cawc6tAj.js +0 -1
- package/dist/assets/ProviderTestView-CztiodHF.js +0 -1
- package/dist/assets/QueuePanel-BQQfIbGH.js +0 -1
- package/dist/assets/RepositoryHistoryView-BFiEVjF-.js +0 -2
- package/dist/assets/SageTabs-BnjtZSVk.js +0 -2
- package/dist/assets/SddFlowGraph-CZQxxeJv.js +0 -1
- package/dist/assets/SddHub-CimqjJhd.js +0 -2
- package/dist/assets/SessionInspectView-DnzU3hjG.js +0 -1
- package/dist/assets/SessionList-DBcHNwcc.js +0 -1
- package/dist/assets/SessionsDashboard-DofL975M.js +0 -1
- package/dist/assets/SetupScreen-DQAqt8Dn.js +0 -1
- package/dist/assets/SkillDetailView-BcG2XIwr.js +0 -3
- package/dist/assets/TechStackView-Ce3WNG85.js +0 -2
- package/dist/assets/TerminalPanel-B3SOIzJY.js +0 -1
- package/dist/assets/button-h7DHXgna.js +0 -1
- package/dist/assets/config-store-D7yrCV2X.js +0 -22
- package/dist/assets/dialog-CTmNJKRN.js +0 -1
- package/dist/assets/index-coebX2ug.css +0 -1
- package/dist/assets/settings-AxDNIcz1.js +0 -1
- package/dist/assets/settings-BcejxgTD.js +0 -1
- package/dist/assets/settings-CAfe70nd.js +0 -1
- package/dist/assets/settings-CxqeEzzD.js +0 -1
- package/dist/assets/settings-D90wMI-3.js +0 -1
- package/dist/assets/settings-DKSmPD2M.js +0 -1
- package/dist/assets/settings-DWXLaAFN.js +0 -1
- package/dist/assets/ui-store-BROszDxo.js +0 -1
- package/dist/assets/utils-DQbrPaAM.js +0 -1
- package/dist/assets/vendor-BShi5_Dg.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,mt as n,t as r}from"./config-store-D7yrCV2X.js";import{i,t as a}from"./react-core-wiHys0m2.js";import{$t as o,Ba as s,Ei as c,Jn as l,La as u,Lr as d,Ma as f,Ri as p,Ui as m,Vi as h,X as g,Z as _,in as v,ja as y,mi as b}from"./vendor-BO-lHyIr.js";import{i as x}from"./i18n-B_njdXiH.js";import{t as S}from"./utils-DQbrPaAM.js";import"./stores-COxKgvNx.js";import{A as C,D as w,I as T,O as E,k as D,v as O,w as k}from"./index-CfREDCPe.js";import{t as A}from"./SessionList-DBcHNwcc.js";var j=e(i(),1),M=a(),N=12;async function P(e){try{let t=await e.clone().json(),n=typeof t.error==`string`?t.error:t.message;if(typeof n==`string`&&n.trim())return x(n)}catch{try{let t=await e.text();if(t.trim())return t.trim()}catch{}}return e.statusText||`HTTP ${e.status}`}function F(e){switch(e){case`running`:return{icon:(0,M.jsx)(y,{className:`h-3.5 w-3.5`}),cls:`text-success`};case`streaming`:return{icon:(0,M.jsx)(v,{className:`h-3.5 w-3.5`}),cls:`text-primary`};case`waiting_user`:return{icon:(0,M.jsx)(c,{className:`h-3.5 w-3.5`}),cls:`text-warning`};case`error`:return{icon:(0,M.jsx)(m,{className:`h-3.5 w-3.5`}),cls:`text-destructive`};case`idle`:return{icon:(0,M.jsx)(p,{className:`h-3.5 w-3.5`}),cls:`text-muted-foreground`};default:return{icon:(0,M.jsx)(h,{className:`h-3.5 w-3.5`}),cls:`text-muted-foreground`}}}function I(e){switch(e){case`active`:return{icon:(0,M.jsx)(g,{className:`h-3.5 w-3.5`}),cls:`text-success`,badge:`border-success/25 bg-success/8 text-success`};case`idle`:return{icon:(0,M.jsx)(_,{className:`h-3.5 w-3.5`}),cls:`text-primary`,badge:`border-primary/25 bg-primary/10 text-primary`};case`closing`:return{icon:(0,M.jsx)(c,{className:`h-3.5 w-3.5`}),cls:`text-warning`,badge:`border-warning/25 bg-warning/10 text-warning`};case`lost`:return{icon:(0,M.jsx)(_,{className:`h-3.5 w-3.5`}),cls:`text-destructive/60`,badge:`border-destructive/15 bg-destructive/5 text-destructive/70`};default:return{icon:(0,M.jsx)(_,{className:`h-3.5 w-3.5`}),cls:`text-muted-foreground`,badge:`border-border bg-muted text-muted-foreground`}}}function L(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`<1m`;if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d`}function R(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<10)return s.t(`common:time.justNow`);if(n<60)return s.t(`common:time.secondsAgo`,{count:n});let r=Math.floor(n/60);return r<60?s.t(`common:time.minutesAgo`,{count:r}):s.t(`common:time.hoursAgo`,{count:Math.floor(r/60)})}function z(){let e=r(e=>e.wsConnected),i=n(),{entries:a,loading:o,error:s}=t(f(e=>({entries:e.entries,loading:e.loading,error:e.error}))),{listSessions:c,resumeSession:l,deleteSession:u,renameSession:d}=T(),[p,m]=(0,j.useState)(``);return(0,j.useEffect)(()=>{e&&c(200)},[i,c,e]),(0,M.jsx)(A,{historyQuery:p,setHistoryQuery:m,historyEntries:a,historyLoading:o,historyError:s,wsConnected:e,listSessions:c,resumeSession:l,deleteSession:u,renameSession:d,variant:`workspace`})}function B(){let{t:e}=u();return(0,M.jsxs)(w,{defaultValue:`history`,className:`flex h-full min-h-0 flex-col bg-background`,"data-testid":`sessions-workspace`,children:[(0,M.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-3 border-b border-border/75 bg-card px-4 py-3 lg:flex-row lg:items-center lg:justify-between`,children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.16em] text-primary`,children:e(`activity:sessions.workspaceEyebrow`,{defaultValue:`Conversation control`})}),(0,M.jsx)(`h1`,{className:`mt-0.5 text-lg font-semibold tracking-tight`,children:e(`activity:sessions.workspaceTitle`,{defaultValue:`Sessions`})})]}),(0,M.jsxs)(D,{className:`h-9 min-h-9 justify-start border-border/75 bg-background p-0 shadow-none`,children:[(0,M.jsxs)(C,{value:`history`,className:`h-9 gap-1.5 border-r border-border/75 px-3 text-xs shadow-none data-[state=active]:bg-foreground data-[state=active]:text-background data-[state=active]:ring-0`,children:[(0,M.jsx)(o,{className:`h-3.5 w-3.5`}),e(`activity:sessions.tabs.history`,{defaultValue:`History`})]}),(0,M.jsxs)(C,{value:`live`,className:`h-9 gap-1.5 px-3 text-xs shadow-none data-[state=active]:bg-foreground data-[state=active]:text-background data-[state=active]:ring-0`,children:[(0,M.jsx)(v,{className:`h-3.5 w-3.5`}),e(`activity:sessions.tabs.live`,{defaultValue:`Live sessions`})]})]})]}),(0,M.jsx)(E,{value:`history`,className:`mt-0 min-h-0 flex-1 overflow-hidden ring-0`,children:(0,M.jsx)(z,{})}),(0,M.jsx)(E,{value:`live`,className:`mt-0 min-h-0 flex-1 overflow-hidden ring-0`,children:(0,M.jsx)(V,{})})]})}function V(){let{t:e}=u(),[t,n]=(0,j.useState)([]),[r,i]=(0,j.useState)(!0),[a,o]=(0,j.useState)(null),[s,f]=(0,j.useState)(1),p=O(`sessions`,!r&&!a&&t.length>0),h=(0,j.useCallback)(async()=>{try{let e=await fetch(`/api/sessions`);if(!e.ok){if(e.status===404){o(null),n([]);return}throw Error(`HTTP ${e.status}: ${await P(e)}`)}if(!(e.headers.get(`content-type`)?.toLowerCase()??``).includes(`application/json`)){o(null),n([]);return}let t=await e.json();if(!Array.isArray(t)){o(null),n([]);return}n(e=>{let n=t;if(e.length===n.length){let t=!0;for(let r=0;r<n.length;r++){let i=n[r],a=e[r];if(i.sessionId!==a.sessionId||i.status!==a.status||i.agentCount!==a.agentCount||i.startedAt!==a.startedAt){t=!1;break}}if(t)return e}return n}),o(null)}catch(e){if(e instanceof SyntaxError){o(null),n([]);return}o(e instanceof Error?e.message:String(e))}finally{i(!1)}},[]);(0,j.useEffect)(()=>{h();let e=setInterval(h,5e3);return()=>clearInterval(e)},[h]);let v=t.filter(e=>e.status===`active`).length,y=t.reduce((e,t)=>e+t.agentCount,0),x=t.slice((s-1)*N,s*N);return(0,j.useEffect)(()=>{let e=Math.max(1,Math.ceil(t.length/N));s>e&&f(e)},[s,t.length]),r?(0,M.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4`,children:(0,M.jsxs)(`div`,{className:`ws-surface flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground`,children:[(0,M.jsx)(l,{className:`h-4 w-4 animate-spin text-primary`}),e(`activity:liveSessions.loading`)]})}):a?(0,M.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4`,children:(0,M.jsxs)(`div`,{className:`ws-surface max-w-lg p-5 text-center`,children:[(0,M.jsx)(m,{className:`mx-auto h-8 w-8 text-warning`}),(0,M.jsx)(`p`,{className:`mt-3 text-sm font-medium`,children:e(`activity:liveSessions.apiUnavailable`)}),(0,M.jsx)(`p`,{className:`mt-1 break-words text-xs text-muted-foreground`,children:a})]})}):t.length===0?(0,M.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4`,children:(0,M.jsxs)(`div`,{className:`ws-surface max-w-md p-6 text-center text-muted-foreground`,children:[(0,M.jsx)(_,{className:`mx-auto h-9 w-9 opacity-50`}),(0,M.jsx)(`p`,{className:`mt-3 text-sm font-medium text-foreground`,children:e(`activity:liveSessions.empty`)}),(0,M.jsx)(`p`,{className:`mt-1 text-xs`,children:e(`activity:liveSessions.autoRefresh`)})]})}):(0,M.jsx)(`div`,{ref:p,className:`h-full min-h-0 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,M.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-4`,children:[(0,M.jsx)(`header`,{className:`border border-border/70 bg-card/75 p-4`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(g,{className:`h-4 w-4 text-primary`}),(0,M.jsx)(`h2`,{className:`text-base font-semibold`,children:e(`activity:liveSessions.heading`,{count:t.length})})]}),(0,M.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e(`activity:liveSessions.autoRefresh`)})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 text-center sm:min-w-[22rem]`,children:[(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/60 px-3 py-2`,children:[(0,M.jsx)(`div`,{className:`text-lg font-semibold tabular-nums`,children:t.length}),(0,M.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground`,children:e(`activity:sessionsDash.sessions`)})]}),(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/60 px-3 py-2`,children:[(0,M.jsx)(`div`,{className:`text-lg font-semibold tabular-nums text-success`,children:v}),(0,M.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground`,children:e(`activity:sessionsDash.active`)})]}),(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/60 px-3 py-2`,children:[(0,M.jsx)(`div`,{className:`text-lg font-semibold tabular-nums`,children:y}),(0,M.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground`,children:e(`activity:sessionsDash.agents`)})]})]})]})}),(0,M.jsx)(`div`,{className:`grid gap-3`,children:x.map(t=>{let n=I(t.status);return(0,M.jsxs)(`article`,{className:`border border-border/70 bg-card/75 p-3 sm:p-4`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 lg:flex-row lg:items-start lg:justify-between`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:n.cls,children:n.icon}),(0,M.jsx)(`h3`,{className:`min-w-0 truncate text-sm font-semibold`,title:t.projectName,children:t.projectName}),(0,M.jsx)(`span`,{className:`bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:t.projectSlug}),(0,M.jsx)(`span`,{className:`inline-flex items-center border px-1.5 py-0.5 text-[10px] font-semibold uppercase ${n.badge}`,children:t.status})]}),(0,M.jsxs)(`div`,{className:`mt-2 grid gap-1.5 text-xs text-muted-foreground md:grid-cols-[minmax(0,1fr)_auto]`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,M.jsx)(b,{className:`h-3.5 w-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 truncate font-mono`,title:t.workingDir,children:t.workingDir})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[t.gitBranch?(0,M.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1 text-primary`,children:[(0,M.jsx)(d,{className:`h-3.5 w-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`truncate font-mono`,children:t.gitBranch})]}):null,(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,M.jsx)(c,{className:`h-3.5 w-3.5`}),L(t.startedAt)]}),(0,M.jsx)(`span`,{className:`font-mono`,children:e(`activity:liveSessions.pidLabel`,{pid:t.pid})})]})]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-xs sm:grid-cols-3 lg:w-64`,children:[(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/50 px-2 py-1.5`,children:[(0,M.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e(`activity:sessionsDash.agents`)}),(0,M.jsx)(`div`,{className:`font-semibold tabular-nums`,children:t.agentCount})]}),(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/50 px-2 py-1.5`,children:[(0,M.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e(`activity:sessionsDash.status`)}),(0,M.jsx)(`div`,{className:`truncate font-mono font-semibold`,children:t.status})]}),(0,M.jsxs)(`div`,{className:`border border-border/70 bg-background/50 px-2 py-1.5`,children:[(0,M.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e(`activity:sessionsDash.runtime`)}),(0,M.jsx)(`div`,{className:`font-mono font-semibold`,children:L(t.startedAt)})]})]})]}),(0,M.jsxs)(`div`,{className:`mt-3 overflow-hidden border border-border/70 bg-background/45`,children:[t.agents.length===0?(0,M.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:e(`activity:liveSessions.noAgents`)}):(0,M.jsx)(`div`,{className:`divide-y divide-border/60`,children:t.agents.slice(0,5).map(t=>{let n=F(t.status);return(0,M.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1 px-3 py-2 text-xs sm:grid-cols-[auto_minmax(0,1fr)_minmax(0,14rem)_auto]`,children:[(0,M.jsx)(`span`,{className:S(`mt-0.5 shrink-0`,n.cls),children:n.icon}),(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`div`,{className:`truncate font-medium`,title:t.name,children:t.name}),(0,M.jsx)(`div`,{className:`font-mono text-[10px] text-muted-foreground`,children:e(`activity:liveSessions.agentMeta`,{iter:t.iterations,tools:t.toolCalls,ago:R(t.lastActivityAt)})})]}),(0,M.jsx)(`div`,{className:`min-w-0 font-mono text-[10px] text-muted-foreground sm:text-xs`,children:t.currentTool?(0,M.jsx)(`span`,{className:`block truncate`,title:t.currentTool,children:t.currentTool}):(0,M.jsx)(`span`,{className:`text-muted-foreground/75`,children:t.status})}),(0,M.jsx)(`span`,{className:`hidden font-mono text-[10px] text-muted-foreground sm:block`,children:R(t.lastActivityAt)})]},t.id)})}),t.agents.length>5?(0,M.jsx)(`div`,{className:`border-t border-border/60 px-3 py-2 text-xs text-muted-foreground`,children:e(`activity:liveSessions.andMore`,{count:t.agents.length-5})}):null]})]},t.sessionId)})}),(0,M.jsx)(k,{page:s,pageSize:N,totalItems:t.length,onPageChange:f,itemLabel:`sessions`})]})})}export{B as SessionsDashboard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,Z as n,t as r,w as i}from"./config-store-D7yrCV2X.js";import{i as a,t as o}from"./react-core-wiHys0m2.js";import{Ba as s,Jn as c,La as l,Ma as u,Ot as d,Rt as f,Tr as p,Xi as m,Yi as h,ca as g,gi as _,ii as v,jt as y,ln as b,lr as x,qi as S,rn as C,t as w,xa as T,yr as ee}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import{t as E}from"./utils-DQbrPaAM.js";import{o as D}from"./view-navigation-CVnKqjL2.js";import"./stores-COxKgvNx.js";import{a as O,n as te,o as ne,r as k,t as re}from"./dialog-CTmNJKRN.js";import{t as A}from"./button-h7DHXgna.js";import{t as j}from"./input-DAvKojvP.js";import{I as M,T as N,d as P,f as F,j as I,p as L,u as R,w as z}from"./index-CfREDCPe.js";var B=e(a(),1);function V(e,t=8e3){return new Promise((n,r)=>{let i=setTimeout(()=>{a(),r(Error(`timeout`))},t),a=e.on(`key.operation_result`,e=>{clearTimeout(i),a(),n(e.payload)})})}var H=o();function ie({onKeySaved:e}){let{t:i}=l(),[a,o]=(0,B.useState)(!1),[s,u]=(0,B.useState)(``),[d,f]=(0,B.useState)(`openai-compatible`),[p,m]=(0,B.useState)(``),[h,g]=(0,B.useState)(``),[_,v]=(0,B.useState)(!1),[y,x]=(0,B.useState)([]),{setFieldRef:C,handleKeyDown:w}=L(),T=async()=>{if(s.trim()){v(!0);try{let a=t(r.getState().wsUrl),c=V(a);a.send({type:`provider.add`,payload:{id:s.trim(),family:d,baseUrl:p.trim()||void 0,apiKey:h.trim()||void 0,models:y.length>0?y.map(e=>e.id):void 0,customModels:y.length>0?Object.fromEntries(y.filter(e=>e.name||e.maxOutput||e.capabilities).map(e=>[e.id,{...e.name&&e.name!==e.id?{name:e.name}:{},...e.maxOutput?{maxOutput:e.maxOutput}:{},...e.capabilities&&Object.values(e.capabilities).some(Boolean)?{capabilities:e.capabilities}:{}}])):void 0}});let l=await c;if(!l.success)throw Error(l.message);n.success(i(`setup:screen.toasts.providerAdded`,{id:s.trim()})),e(s.trim()),a.listSavedProviders(),a.probeProvider(s.trim()),u(``),m(``),g(``),x([]),o(!1)}catch(e){let t=e instanceof Error&&e.message&&e.message!==`timeout`?e.message:null;n.error(t??i(`setup:screen.toasts.providerAddFailed`))}finally{v(!1)}}};return(0,H.jsxs)(`div`,{className:`rounded-xl border border-dashed border-border/60 overflow-hidden`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o(!a),className:`w-full flex items-center gap-3 p-4 text-left hover:bg-muted/30 transition-colors`,children:[(0,H.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-muted/50 flex items-center justify-center`,children:(0,H.jsx)(b,{className:`h-5 w-5 text-muted-foreground`})}),(0,H.jsxs)(`div`,{className:`flex-1`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-medium`,children:i(`setup:screen.custom.title`)}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i(`setup:screen.custom.description`)})]}),(0,H.jsx)(S,{className:E(`h-4 w-4 text-muted-foreground transition-transform`,a&&`rotate-90`)})]}),a&&(0,H.jsxs)(`div`,{className:`px-4 pb-4 space-y-3 border-t border-border/40`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5 pt-3`,children:[(0,H.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground block`,children:i(`setup:screen.custom.localServers`)}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:R.map(e=>(0,H.jsx)(A,{type:`button`,size:`sm`,variant:s===e.id?`default`:`outline`,onClick:()=>{u(e.id),f(`openai-compatible`),m(e.defaultBaseUrl),e.noAuth&&g(``),x([])},title:e.hint,children:e.label},e.id))})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground mb-1 block`,children:i(`setup:screen.custom.providerId`)}),(0,H.jsx)(j,{placeholder:i(`activity:customProviderSection.eGMyLlm`),value:s,onChange:e=>u(e.target.value),className:`text-sm`,ref:C(0),onKeyDown:e=>w(e,0)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground mb-1 block`,children:i(`setup:screen.custom.family`)}),(0,H.jsxs)(`select`,{value:d,onChange:e=>f(e.target.value),className:`flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm`,ref:C(1),onKeyDown:e=>w(e,1),children:[(0,H.jsx)(`option`,{value:`openai-compatible`,children:i(`setup:screen.custom.familyOpenAiCompatible`)}),(0,H.jsx)(`option`,{value:`openai`,children:`OpenAI`}),(0,H.jsx)(`option`,{value:`anthropic`,children:`Anthropic`}),(0,H.jsx)(`option`,{value:`google`,children:`Google`})]})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground mb-1 block`,children:i(`setup:screen.custom.baseUrl`)}),(0,H.jsx)(j,{placeholder:i(`activity:customProviderSection.eGHttpLocalhost11434V1`),value:p,onChange:e=>m(e.target.value),className:`text-sm font-mono`,ref:C(2),onKeyDown:e=>w(e,2)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{className:`text-[11px] font-medium text-muted-foreground mb-1 block`,children:i(`setup:screen.custom.apiKey`)}),(0,H.jsx)(j,{type:`password`,placeholder:i(`setup:screen.custom.apiKeyPlaceholder`),value:h,onChange:e=>g(e.target.value),className:`text-sm font-mono`,ref:C(3),onKeyDown:e=>w(e,3)})]}),(0,H.jsx)(F,{models:y,onChange:x}),(0,H.jsxs)(A,{onClick:T,disabled:!s.trim()||_,size:`sm`,ref:C(4),onKeyDown:e=>w(e,4,T),children:[_?(0,H.jsx)(c,{className:`h-4 w-4 animate-spin mr-2`}):null,i(`setup:screen.custom.add`)]})]})]})}var U=P();async function ae(e,t){try{let n=await fetch(e,{signal:t});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(!Array.isArray(r))throw Error(`Expected JSON array`);let i=r.filter(e=>typeof e.id==`string`&&typeof e.name==`string`&&typeof e.family==`string`);return i.length>0?i:U}catch{return U}}function oe(e,t){let n=new Date().getTime()-e.getTime(),r=Math.floor(n/1e3);if(r<10)return t(`setup:screen.time.justNow`);if(r<60)return t(`setup:screen.time.secondsAgo`,{count:r});let i=Math.floor(r/60);if(i<60)return t(`setup:screen.time.minutesAgo`,{count:i});let a=Math.floor(i/60);return a<24?t(`setup:screen.time.hoursAgo`,{count:a}):t(`setup:screen.time.daysAgo`,{count:Math.floor(a/24)})}var se=e(w(),1);function ce({popular:e,catalogProvider:i,savedProvider:a,onKeySaved:o,probeResult:s}){let{t:u}=l(),[d,g]=(0,B.useState)(``),[y,b]=(0,B.useState)(!1),[x,C]=(0,B.useState)(!!a?.apiKeys.some(e=>e.isActive)),[w,T]=(0,B.useState)(!1),[ee,D]=(0,B.useState)(!1),[M,N]=(0,B.useState)(!1),[P,F]=(0,B.useState)(null);(0,B.useEffect)(()=>{M&&e.referral&&se.toDataURL(e.referral.url,{width:200,margin:2,color:{dark:`#000000`,light:`#ffffff`}}).then(e=>F(e)).catch(()=>F(null))},[M,e.referral]);let I=async()=>{if(d.trim()){b(!0);try{let a=t(r.getState().wsUrl),s=V(a);i?a.addKey(e.id,`default`,d.trim()):a.send({type:`provider.add`,payload:{id:e.id,family:e.family,apiKey:d.trim()}});let c=await s;if(!c.success)throw Error(c.message);C(!0),g(``),n.success(u(`setup:screen.toasts.keySaved`,{name:e.name})),o(e.id),a.listSavedProviders(),a.probeProvider(e.id)}catch(t){let r=t instanceof Error&&t.message&&t.message!==`timeout`?t.message:null;n.error(r??u(`setup:screen.toasts.keySaveFailed`,{name:e.name}))}finally{b(!1)}}},L=e=>{e.key===`Enter`&&d.trim()&&I()},R=async()=>{if(e.referral)try{await navigator.clipboard.writeText(e.referral.url),D(!0),n.success(u(`setup:screen.toasts.referralCopied`)),setTimeout(()=>D(!1),2e3)}catch{n.error(u(`setup:screen.toasts.referralCopyFailed`))}},z=i&&i.modelCount>0;return(0,H.jsxs)(`div`,{className:E(`rounded-xl border p-4 transition-all`,x?`border-success/30 bg-success/5`:`bg-gradient-to-br ${e.color}`),children:[(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(`span`,{className:`text-2xl shrink-0 mt-0.5`,children:e.icon}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),x&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-success/10 text-success border border-success/20`,children:[(0,H.jsx)(m,{className:`h-2.5 w-2.5`}),u(`setup:screen.card.keySaved`)]}),e.referral&&!x&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-warning/10 text-warning border border-warning/20`,children:[(0,H.jsx)(p,{className:`h-2.5 w-2.5`}),u(`setup:screen.card.referral`)]})]}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.description}),e.referral&&!x&&(0,H.jsxs)(`p`,{className:`text-[11px] text-warning/80 mt-1`,children:[`🎁 `,e.referral.reward]}),x?x?(0,H.jsxs)(`div`,{className:`mt-3 space-y-1`,children:[a?.baseUrl&&(0,H.jsxs)(`div`,{className:`text-[11px] text-muted-foreground/70 font-mono truncate`,title:a.baseUrl,children:[(0,H.jsxs)(`span`,{className:`text-muted-foreground/50`,children:[u(`activity:providerKey.url`),` `]}),a.baseUrl]}),a?.models&&a.models.length>0&&(0,H.jsxs)(`div`,{className:`text-[11px] text-muted-foreground/70`,children:[(0,H.jsxs)(`span`,{className:`text-muted-foreground/50`,children:[u(`activity:providerKey.models`),` `]}),a.pickedModelId??a.models[0],(0,H.jsxs)(`span`,{className:`text-muted-foreground/50`,children:[` `,`(+`,a.models.length-1,` more)`]})]}),s===`probing`?(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-muted-foreground mt-1`,children:[(0,H.jsx)(c,{className:`h-3 w-3 animate-spin`}),u(`setup:screen.probe.checking`,`Checking connection…`)]}):s?.ok?(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-success mt-1`,children:[(0,H.jsx)(m,{className:`h-3 w-3`}),(0,H.jsxs)(`span`,{children:[u(`setup:screen.probe.connected`,`Connected`),s.modelCount!=null&&` · ${s.modelCount} ${u(`setup:screen.probe.models`,`models`)}`,s.elapsedMs!=null&&` · ${s.elapsedMs}ms`]})]}):s&&!s.ok?(0,H.jsxs)(`div`,{className:`flex items-start gap-1.5 text-[11px] text-destructive mt-1`,children:[(0,H.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:`✕`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`span`,{className:`font-medium`,children:u(`setup:screen.probe.failed`,`Probe failed`)}),s.status===`no_base_url`&&(0,H.jsx)(`span`,{className:`block text-destructive/70`,children:u(`setup:screen.probe.noBaseUrl`,`No base URL configured`)}),s.status===`unreachable`&&(0,H.jsxs)(`span`,{className:`block text-destructive/70`,children:[u(`setup:screen.probe.unreachable`,`Could not connect`),s.detail?`: ${s.detail}`:``]}),s.status!==`no_base_url`&&s.status!==`unreachable`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`block text-destructive/70`,children:s.httpStatus==null?s.status:`${u(`setup:screen.probe.httpStatus`,`Status`)} ${s.httpStatus}`}),s.detail&&(0,H.jsx)(`span`,{className:`block text-destructive/70 truncate max-w-[250px]`,title:s.detail,children:s.detail})]})]})]}):null,z&&(0,H.jsxs)(`button`,{type:`button`,onClick:()=>T(!w),className:`text-[11px] text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1`,children:[u(`setup:screen.providers.modelsAvailable`,{count:i?.modelCount??0}),w?(0,H.jsx)(h,{className:`h-3 w-3`}):(0,H.jsx)(S,{className:`h-3 w-3`})]})]}):null:(0,H.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(j,{type:`password`,placeholder:e.keyPlaceholder,value:d,onChange:e=>g(e.target.value),onKeyDown:L,className:`font-mono text-sm`}),(0,H.jsx)(A,{onClick:I,disabled:!d.trim()||y,size:`sm`,className:`shrink-0`,children:y?(0,H.jsx)(c,{className:`h-4 w-4 animate-spin`}):u(`setup:screen.card.save`)})]}),e.docsUrl&&(0,H.jsxs)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors`,children:[u(`setup:screen.card.getKey`),` `,(0,H.jsx)(v,{className:`h-3 w-3`})]}),e.referral&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:R,className:`inline-flex items-center gap-1 text-[11px] text-warning/80 hover:text-warning transition-colors`,children:ee?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(m,{className:`h-3 w-3`}),` `,u(`setup:screen.card.copied`)]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(_,{className:`h-3 w-3`}),` `,u(`setup:screen.card.copyReferral`)]})}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>N(!0),className:`inline-flex items-center gap-1 text-[11px] text-warning/80 hover:text-warning transition-colors`,children:[(0,H.jsx)(f,{className:`h-3 w-3`}),` `,u(`setup:screen.card.share`)]})]})]})]})]}),(0,H.jsx)(re,{open:M,onOpenChange:N,children:(0,H.jsxs)(te,{className:`sm:max-w-md`,children:[(0,H.jsxs)(O,{children:[(0,H.jsxs)(ne,{className:`flex items-center gap-2`,children:[(0,H.jsx)(p,{className:`h-4 w-4 text-warning`}),u(`setup:screen.share.title`,{name:e.name})]}),(0,H.jsx)(k,{children:u(`setup:screen.share.description`)})]}),(0,H.jsx)(`div`,{className:`flex flex-col items-center gap-4 py-4`,children:e.referral&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`text-sm text-center`,children:(0,H.jsxs)(`p`,{className:`font-medium text-warning`,children:[`🎁 `,e.referral.reward]})}),P?(0,H.jsx)(`div`,{className:`rounded-lg border border-border p-2 bg-white`,children:(0,H.jsx)(`img`,{src:P,alt:u(`setup:screen.card.qrAlt`,{name:e.name}),className:`w-[200px] h-[200px]`})}):(0,H.jsx)(`div`,{className:`w-[200px] h-[200px] rounded-lg border border-border flex items-center justify-center bg-muted`,children:(0,H.jsx)(c,{className:`h-6 w-6 animate-spin text-muted-foreground`})}),(0,H.jsxs)(`div`,{className:`w-full space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(`Check out ${e.name}! 🎁 ${e.referral.reward}`),n=encodeURIComponent(e.referral.url);window.open(`https://twitter.com/intent/tweet?text=${t}&url=${n}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.twitter`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})}),`X`]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(e.referral.url),n=encodeURIComponent(`Check out ${e.name}! ${e.referral.reward}`);window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${t}&summary=${n}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.linkedin`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`})}),u(`activity:providerKey.linkedin`)]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(`Check out ${e.name}! 🎁 ${e.referral.reward} ${e.referral.url}`);window.open(`https://t.me/share/url?url=${t}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.telegram`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`})}),u(`activity:providerKey.telegram`)]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(`Check out ${e.name}! 🎁 ${e.referral.reward}`),n=encodeURIComponent(e.referral.url);window.open(`https://wa.me/?text=${t}%20${n}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.whatsapp`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.134 1.585 5.934L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})}),u(`activity:providerKey.whatsapp`)]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(e.referral.url),n=encodeURIComponent(`${e.name} - ${e.referral.reward}`);window.open(`https://www.reddit.com/submit?url=${t}&title=${n}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.reddit`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 0 1.108-.701 1.25 1.25 0 0 1 2.144.33zm-8.811 8.748c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754zm7.944 0c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754z`})}),u(`activity:providerKey.reddit`)]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(`Check out ${e.name}! 🎁 ${e.referral.reward}`),n=encodeURIComponent(e.referral.url);window.open(`https://www.facebook.com/sharer/sharer.php?u=${n}"e=${t}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors`,title:u(`setup:screen.share.facebook`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`})}),u(`activity:providerKey.facebook`)]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{let t=encodeURIComponent(`Check out ${e.name}! 🎁 ${e.referral.reward}`),n=encodeURIComponent(e.referral.url);window.open(`mailto:?subject=${t}&body=${n}`,`_blank`,`noopener,noreferrer`)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-muted text-muted-foreground text-xs hover:bg-muted/80 transition-colors`,title:u(`setup:screen.share.email`),children:[(0,H.jsx)(`svg`,{role:`img`,"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25H4.5a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75`})}),u(`activity:providerKey.email`)]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(j,{value:e.referral.url,readOnly:!0,className:`font-mono text-xs flex-1`}),(0,H.jsx)(A,{size:`sm`,variant:`outline`,onClick:R,className:`shrink-0`,children:ee?(0,H.jsx)(m,{className:`h-4 w-4`}):(0,H.jsx)(_,{className:`h-4 w-4`})})]}),(0,H.jsx)(`p`,{className:`text-[11px] text-muted-foreground text-center`,children:u(`setup:screen.share.hint`)})]})]})})]})})]})}function W(){let{t:e}=l(),{model:a,setProvider:o,setModel:f,wsConnected:p,wsUrl:h}=r(u(e=>({model:e.model,setProvider:e.setProvider,setModel:e.setModel,wsConnected:e.wsConnected,wsUrl:e.wsUrl})));M();let[_,v]=(0,B.useState)([]),[b,w]=(0,B.useState)({}),[O,te]=(0,B.useState)([]),[ne,k]=(0,B.useState)(!1),[re,j]=(0,B.useState)(null),[P,F]=(0,B.useState)(0),[L,R]=(0,B.useState)(new Set),[V,se]=(0,B.useState)({}),[W,le]=(0,B.useState)(U),[G,K]=(0,B.useState)(!1),[ue,de]=(0,B.useState)(0),[fe,pe]=(0,B.useState)(0),[q,me]=(0,B.useState)(null),J=(0,B.useRef)(!0);(0,B.useEffect)(()=>{let e=new AbortController,t=`${window.location.origin}/providers.json`;return K(!0),ae(t,e.signal).then(t=>{if(t!==U){if(le(t),K(!1),!J.current){let e=t.length-fe;e>0?n.success(s.t(`setup:screen.toasts.providersLoadedNew`,{count:t.length,diff:e})):e<0?n.success(s.t(`setup:screen.toasts.providersLoadedRemoved`,{count:t.length,diff:Math.abs(e)})):n.success(s.t(`setup:screen.toasts.providersLoadedNoChanges`,{count:t.length})),pe(t.length)}me(new Date);return}return ae(`https://raw.githubusercontent.com/WrongStack/WrongStack/main/packages/webui/public/providers.json`,e.signal)}).then(e=>{if(e){if(le(e),!J.current){let t=e.length-fe;t>0?n.success(s.t(`setup:screen.toasts.providersLoadedNew`,{count:e.length,diff:t})):t<0?n.success(s.t(`setup:screen.toasts.providersLoadedRemoved`,{count:e.length,diff:Math.abs(t)})):n.success(s.t(`setup:screen.toasts.providersLoadedNoChanges`,{count:e.length})),pe(e.length)}me(new Date)}}).catch(()=>{J.current||n.error(s.t(`setup:screen.toasts.providersRefreshFailed`))}).finally(()=>{K(!1),J.current=!1}),()=>e.abort()},[ue]);let[Y,he]=(0,B.useState)(null),[X,Z]=(0,B.useState)(null),[ge,_e]=(0,B.useState)(!1);(0,B.useEffect)(()=>{if(!p)return;let e=t(h),n=setTimeout(()=>{n=null,k(!1),j(s.t(`setup:screen.errors.backendNotResponding`))},8e3),r=()=>{n&&=(clearTimeout(n),null)},i=e.on(`provider.catalog`,e=>{if(e.type===`provider.catalog`){r(),j(null);let t=e.payload.providers.sort((e,t)=>e.id.localeCompare(t.id));v(t),k(!1)}}),o=e.on(`provider.models`,e=>{if(e.type===`provider.models`){let t=e.payload;if(t.provider!==Y)return;w(e=>({...e,[t.provider]:t.models})),_e(!1),t.models.length===1?Z(t.models[0].id):a&&t.models.some(e=>e.id===a)&&Z(a)}}),c=e.on(`providers.saved`,e=>{if(e.type===`providers.saved`){let t=e.payload.providers.sort((e,t)=>e.id.localeCompare(t.id));te(t);let n=new Set(t.filter(e=>e.apiKeys.some(e=>e.isActive)).map(e=>e.id));R(n)}}),l=e.on(`provider.probe`,e=>{if(e.type!==`provider.probe`)return;let t=e.payload;se(e=>({...e,[t.providerId]:t}))});return j(null),k(!0),e.listProviders(),()=>{r(),i?.(),o?.(),c?.(),l?.()}},[p,h,a,P,Y]);let ve=(0,B.useCallback)(()=>{j(null),F(e=>e+1)},[]),ye=(0,B.useCallback)(()=>{de(e=>e+1)},[]),be=(0,B.useCallback)(t=>oe(t,e),[e]),xe=(0,B.useCallback)(e=>{R(t=>new Set([...t,e])),he(e),Z(null)},[]),Se=L.size>0;(0,B.useEffect)(()=>{if(!Y||!p)return;let e=t(h);b[Y]||(_e(!0),e.listProviderModels(Y))},[Y,p,h,b]);let Ce=Y?b[Y]??[]:[],we=(0,B.useCallback)(async()=>{if(!Y||!X)return;if(!L.has(Y)){n.error(`Please save the provider configuration before starting a session.`);return}o(Y),f(X);let e=await t(h).switchModel(Y,X,5e3);e.success?(i.getState().openPicker({startsSession:!0}),D(`chat`)):n.error(e.message||s.t(`setup:screen.errors.modelSwitchTimeout`))},[Y,X,o,f,h]),Te=(0,B.useCallback)(async()=>{if(!Y||!X)return;o(Y),f(X);let e=await t(h).switchModel(Y,X,5e3);e.success?D(`chat`):n.error(e.message||s.t(`setup:screen.errors.modelSwitchTimeout`))},[Y,X,o,f,h]),Ee=new Set(W.map(e=>e.id)),De=_.filter(e=>!Ee.has(e.id)).sort((e,t)=>e.id.localeCompare(t.id)),Q=N(De,10);N(O,9);let $=N(Ce,12,Y);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,H.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-3 border-b bg-card px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,H.jsx)(`img`,{src:`/wrongstack.svg`,alt:`WrongStack`,draggable:!1,className:`ws-brand-logo h-10 w-10 shrink-0 border border-border/70 shadow-sm`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:e(`setup:screen.header.title`)}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground sm:truncate`,children:e(`setup:screen.header.subtitle`)})]})]}),Se&&Y?(0,H.jsxs)(`span`,{className:`text-xs text-success/80`,children:[(0,H.jsx)(m,{className:`h-3 w-3 inline-block mr-1`}),e(`setup:screen.header.continue`)]}):null]}),(0,H.jsx)(I,{className:`min-h-0 flex-1`,children:(0,H.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-8 p-4 pb-4 sm:p-6`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm`,children:[(0,H.jsxs)(`div`,{className:E(`flex min-w-0 items-center gap-1.5`,Se?`text-success`:`text-primary font-medium`),children:[(0,H.jsx)(x,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:e(`setup:screen.steps.addKeys`)})]}),(0,H.jsx)(S,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,H.jsxs)(`div`,{className:E(`flex min-w-0 items-center gap-1.5`,Y?`text-primary font-medium`:`text-muted-foreground`),children:[(0,H.jsx)(g,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:e(`setup:screen.steps.pickModel`)})]}),(0,H.jsx)(S,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,H.jsxs)(`div`,{className:E(`flex min-w-0 items-center gap-1.5`,Y&&X?`text-primary font-medium`:`text-muted-foreground`),children:[(0,H.jsx)(d,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:e(`setup:screen.steps.start`)})]})]}),(0,H.jsxs)(`div`,{className:`flex items-start gap-3 rounded-xl border border-primary/20 bg-primary/5 p-4`,children:[(0,H.jsx)(y,{className:`h-5 w-5 text-primary shrink-0 mt-0.5`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:e(`setup:screen.security.title`)}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e(`setup:screen.security.body`)})]})]}),re?(0,H.jsxs)(`div`,{className:`flex flex-col items-center text-center gap-4 py-12 rounded-xl border border-destructive/30 bg-destructive/5 px-6`,children:[(0,H.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-destructive/10 border border-destructive/30 flex items-center justify-center`,children:(0,H.jsx)(ee,{className:`h-6 w-6 text-destructive`})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:e(`setup:screen.errors.backendUnreachable`)}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 max-w-sm`,children:re})]}),(0,H.jsxs)(A,{onClick:ve,size:`sm`,variant:`outline`,children:[(0,H.jsx)(c,{className:`h-4 w-4 mr-2`}),e(`setup:screen.errors.retry`)]})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-medium text-muted-foreground uppercase tracking-wider`,children:e(`setup:screen.providers.popular`)}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[G&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[11px] text-muted-foreground`,children:[(0,H.jsx)(c,{className:`h-3 w-3 animate-spin`}),e(`setup:screen.providers.updating`)]}),q&&!G&&(0,H.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,title:q.toLocaleString(),children:be(q)}),(0,H.jsxs)(`button`,{type:`button`,onClick:ye,disabled:G,className:`inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,title:e(`setup:screen.providers.refreshTitle`),children:[(0,H.jsx)(C,{className:E(`h-3 w-3`,G&&`animate-spin`)}),e(`setup:screen.providers.refresh`)]})]})]}),(0,H.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:W.map(e=>(0,H.jsx)(ce,{popular:e,catalogProvider:_.find(t=>t.id===e.id),savedProvider:O.find(t=>t.id===e.id),onKeySaved:xe,probeResult:V[e.id]},e.id))})]}),De.length>0&&(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-medium text-muted-foreground uppercase tracking-wider`,children:e(`setup:screen.providers.more`)}),(0,H.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:Q.pageItems.map(t=>(0,H.jsx)(ce,{popular:{id:t.id,name:t.name,description:e(`setup:screen.providers.catalogDescription`,{family:t.family,count:t.modelCount}),icon:`🔗`,color:`from-muted/60 to-muted/20 border-border hover:border-primary/40`,keyPlaceholder:`API key`,family:t.family},catalogProvider:t,savedProvider:O.find(e=>e.id===t.id),onKeySaved:xe,probeResult:V[t.id]},t.id))}),(0,H.jsx)(z,{page:Q.page,pageSize:Q.pageSize,totalItems:Q.totalItems,onPageChange:Q.setPage,itemLabel:`providers`})]}),(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-medium text-muted-foreground uppercase tracking-wider`,children:e(`setup:screen.providers.selfHosted`)}),(0,H.jsx)(ie,{onKeySaved:xe})]})]}),ne&&(0,H.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,H.jsx)(c,{className:`h-6 w-6 animate-spin text-muted-foreground`})}),Y&&(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`h2`,{className:`text-base font-semibold flex items-center gap-2`,children:[(0,H.jsx)(d,{className:`h-4 w-4 text-primary`}),e(`setup:screen.start.chooseModel`)]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>{he(null),Z(null)},className:`text-xs text-muted-foreground hover:text-foreground transition-colors`,children:e(`setup:screen.start.addMoreKeys`)})]}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`setup:screen.start.modelsFor`,{provider:Y})}),ge?(0,H.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,H.jsx)(c,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):Ce.length>0?(0,H.jsx)(`div`,{className:`grid grid-cols-1 gap-2`,children:$.pageItems.map(e=>{let t=e.contextWindow?`${(e.contextWindow/1e6).toFixed(0)}M ctx`:null;return(0,H.jsx)(`button`,{type:`button`,onClick:()=>Z(e.id),className:E(`w-full text-left rounded-xl border p-3 transition-all`,`hover:border-primary/40 hover:bg-primary/5`,X===e.id?`border-primary bg-primary/10 ring-1 ring-primary/30`:`border-border bg-card`),children:(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`span`,{className:`font-medium text-sm`,children:e.name}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-1`,children:[t&&(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:t}),e.capabilities.slice(0,3).map(e=>(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary border border-primary/20`,children:e},e))]})]}),X===e.id&&(0,H.jsx)(`div`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary`,children:(0,H.jsx)(m,{className:`h-3 w-3 text-primary-foreground`})})]})},e.id)})}):(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground py-8 text-center`,children:e(`setup:screen.errors.noModels`)}),(0,H.jsx)(z,{page:$.page,pageSize:$.pageSize,totalItems:$.totalItems,onPageChange:$.setPage,itemLabel:`models`})]}),Y&&X&&(0,H.jsxs)(`div`,{className:`sticky bottom-0 -mx-4 border-t bg-background/80 px-4 py-4 backdrop-blur-sm sm:-mx-6 sm:px-6`,children:[(0,H.jsx)(`div`,{className:`mb-3 flex min-w-0 items-center justify-between gap-2 text-sm text-muted-foreground`,children:(0,H.jsxs)(`span`,{className:`min-w-0 truncate`,children:[Y,` / `,X]})}),(0,H.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2`,children:[(0,H.jsxs)(A,{onClick:we,className:`flex-1`,size:`lg`,children:[(0,H.jsx)(g,{className:`h-4 w-4 mr-2`}),e(`setup:screen.start.startSession`),(0,H.jsx)(T,{className:`h-4 w-4 ml-2`})]}),(0,H.jsxs)(A,{onClick:Te,variant:`outline`,className:`flex-1`,size:`lg`,children:[(0,H.jsx)(m,{className:`h-4 w-4 mr-2`}),e(`setup:screen.start.saveConfig`)]})]}),(0,H.jsx)(`p`,{className:`text-[11px] text-muted-foreground/60 text-center mt-2`,children:e(`setup:screen.start.saveConfigHint`)})]})]})})]})}export{W as SetupScreen};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-BO-lHyIr.js","assets/rolldown-runtime-hePW80VL.js","assets/react-core-wiHys0m2.js","assets/xyflow-BqDBClm9.js","assets/xyflow-DLioOiRN.css","assets/markdown-CXRzjX3p.js","assets/vendor-BShi5_Dg.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{Ba as r,Ir as i,J as a,Ji as ee,Jn as o,La as s,Ot as te,Vr as ne,Xi as re,_n as ie,gi as ae,li as oe,mt as c,pn as se,qi as l,rn as ce,ua as le,va as ue,yr as de}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import{t as u}from"./vite-preload-BZ1Pz5am.js";import{t as d}from"./utils-DQbrPaAM.js";import{o as fe}from"./view-navigation-CVnKqjL2.js";import{n as pe}from"./ui-store-BROszDxo.js";import{a as me,n as he,o as ge,t as _e}from"./dialog-CTmNJKRN.js";import{u as f}from"./markdown-CXRzjX3p.js";import{I as ve,b as p,o as m,v as ye}from"./index-CfREDCPe.js";import{t as be}from"./empty-state-Dl66htl_.js";var h=e(t(),1),g=n(),xe=(0,h.lazy)(()=>u(()=>import(`./vendor-BO-lHyIr.js`).then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6])));function _(e){return e===`project`||e===`user`}function Se(e){let t=e.match(/^(.+?)\/SKILL(?:\.save)?\.md$/);return t?t[1]:null}function Ce({source:e}){let{t}=s(),n=e===`project`?`project`:e===`user`?`user`:`bundled`;return(0,g.jsx)(`span`,{className:d(`inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide`,n===`project`&&`border-success/25 bg-success/8 text-success`,n===`user`&&`border-primary/25 bg-primary/10 text-primary`,n===`bundled`&&`border-border/70 bg-muted/60 text-muted-foreground`),children:t(`activity:skillDetail.${{project:`scopeProject`,user:`scopeGlobal`,bundled:`scopeBundled`}[n]}`)})}function v({className:e}){let{t}=s(),{client:n}=ve(),u=pe(e=>e.skillsState),v=pe(e=>e.setSkillsState),y=u.selectedSkill,b=u.navHistory,x=u.historyIndex,[S,C]=(0,h.useState)(null),[we,w]=(0,h.useState)(!1),[T,E]=(0,h.useState)(null),Te=ye(`skill-detail`,!!S),[D,O]=(0,h.useState)(!1),[k,A]=(0,h.useState)(``),[j,M]=(0,h.useState)(!1),[N,P]=(0,h.useState)(null),[F,I]=(0,h.useState)(!1),[L,R]=(0,h.useState)(null),[z,B]=(0,h.useState)(!1),V=(0,h.useRef)(``),[H,Ee]=(0,h.useState)(!1),[U,W]=(0,h.useState)(null),[De,Oe]=(0,h.useState)(!1),[G,K]=(0,h.useState)(null),[q,ke]=(0,h.useState)(!1),[Ae,je]=(0,h.useState)([]),J=(0,h.useRef)(u);J.current=u;let Y=(0,h.useRef)(!1),X=(0,h.useMemo)(()=>k?{lines:k.split(`
|
|
3
|
-
`).length,words:k.trim()?k.trim().split(/\s+/).length:0,chars:k.length}:{lines:0,words:0,chars:0},[k]),Z=(0,h.useMemo)(()=>{if(!k)return null;let e=5242880,t=new Blob([k]).size;return t>=e?{level:`critical`,used:t,limit:e}:t>=4194304?{level:`warn`,used:t,limit:e}:null},[k]);(0,h.useEffect)(()=>{if(!L)return;let e=setTimeout(()=>R(null),2e3);return()=>clearTimeout(e)},[L]),(0,h.useEffect)(()=>{if(!D||!y)return;let e=setInterval(()=>{k&&k!==V.current&&(V.current=k,localStorage.setItem(`skills_draft_${y.name}`,JSON.stringify({content:k,savedAt:Date.now()})),R(Date.now()))},5e3);return()=>clearInterval(e)},[D,k,y]),(0,h.useEffect)(()=>{if(!y||!D)return;let e=localStorage.getItem(`skills_draft_${y.name}`);if(e)try{let{content:t}=JSON.parse(e);t&&t!==k&&t!==V.current&&(A(t),V.current=t,B(!0))}catch{}},[y?.name,D]),(0,h.useEffect)(()=>{if(!n||!y)return;w(!0),C(null),E(null);let e=setTimeout(()=>{w(!1),E(r.t(`activity:skillDetail.timeoutError`))},1e4),t=t=>{clearTimeout(e);let n=t;n.payload.error?E(n.payload.error):n.payload.name&&C(n.payload),w(!1)},i=e=>{let t=e;Ee(!1);let i=J.current;if(t.payload.success){let e={...i.knownRefs};for(let n of t.payload.updated??[])e[n.name]=n.newRef;v({...i,knownRefs:e,updateAvailableCount:0}),W({updated:t.payload.updated??[],unchanged:t.payload.unchanged??[],errors:t.payload.errors??[]}),n.send({type:`skills.list`},{echoToChat:!1})}else W({updated:[],unchanged:[],errors:[{name:``,error:t.payload.error??r.t(`activity:skillDetail.updateFailed`)}]})},a=e=>{let t=e;t.payload.skills&&je(t.payload.skills)};return n.on(`skills.content`,t),n.on(`skills.updated`,i),n.on(`skills.list`,a),n.send({type:`skills.content`,payload:{name:y.name,source:y.source}}),()=>{clearTimeout(e),n.off(`skills.content`,t),n.off(`skills.updated`,i),n.off(`skills.list`,a)}},[n,y?.name,y?.source]),(0,h.useEffect)(()=>{D&&(O(!1),A(``),P(null))},[y?.name]);let Q=(0,h.useCallback)(e=>Ae.find(t=>t.name.toLowerCase()===e.toLowerCase()),[Ae]),Me=(0,h.useCallback)(e=>{let t=Q(e);if(t){Y.current=!1;let e=b.slice(0,x+1);e.push(t),v({...J.current,selectedSkill:t,navHistory:e,historyIndex:e.length-1}),O(!1),A(``),W(null)}},[Q,b,x,v]),Ne=(0,h.useCallback)(()=>{if(x<=0)return;Y.current=!0;let e=x-1,t=b[e];v({...J.current,selectedSkill:t,historyIndex:e}),O(!1),A(``),W(null)},[x,b,v]),Pe=(0,h.useCallback)(()=>{if(x>=b.length-1)return;Y.current=!0;let e=x+1,t=b[e];v({...J.current,selectedSkill:t,historyIndex:e}),O(!1),A(``),W(null)},[x,b,v]),$=(0,h.useCallback)(()=>{fe(`chat`)},[]),Fe=(0,h.useCallback)(()=>{S&&(A(S.body),V.current=S.body,B(!1),P(null),O(!0),I(!1))},[S]),Ie=(0,h.useCallback)(()=>{O(!1),A(``),P(null),I(!1),B(!1),y&&localStorage.removeItem(`skills_draft_${y.name}`)},[y]),Le=(0,h.useCallback)(()=>{y&&S&&(B(!1),A(S.body),V.current=S.body,y&&localStorage.removeItem(`skills_draft_${y.name}`))},[y,S]),Re=(0,h.useCallback)(()=>{if(!n||!y||!k.trim())return;M(!0),P(null);let e=t=>{let i=t;M(!1),i.payload.success?(V.current=``,localStorage.removeItem(`skills_draft_${y.name}`),B(!1),O(!1),n.send({type:`skills.content`,payload:{name:y.name,source:y.source}}),n.send({type:`skills.list`},{echoToChat:!1})):P(i.payload.error??r.t(`activity:skillDetail.saveFailed`)),n.off(`skills.edited`,e)};n.on(`skills.edited`,e),n.editSkill(y.name,k)},[n,y,k]),ze=(0,h.useCallback)(()=>{n&&y&&(Ee(!0),W(null),n.checkForUpdates(y.name,y.source===`user`))},[n,y]),Be=(0,h.useCallback)(()=>{y?.sourceUrl&&navigator.clipboard.writeText(y.sourceUrl).then(()=>{Oe(!0),setTimeout(()=>Oe(!1),2e3)})},[y]),Ve=(0,h.useCallback)(()=>{if(!S?.body)return;let e=new Blob([S.body],{type:`text/markdown`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${S.name.replace(/\//g,`_`)}-SKILL.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)},[S]),He=(0,h.useCallback)(async e=>{if(!n||!e)return;ke(!0);let t=e=>{let i=e;ke(!1),i.payload.success?(K(null),n.send({type:`skills.list`},{echoToChat:!1}),$()):P(i.payload.error??r.t(`activity:skillDetail.uninstallFailed`)),n.off(`skills.uninstalled`,t)};n.on(`skills.uninstalled`,t),n.uninstallSkill(e.name,e.source===`user`)},[n,$]);return y?(0,g.jsxs)(`div`,{className:d(`flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden bg-[hsl(var(--surface-2)/0.45)] p-3`,e),children:[(0,g.jsxs)(`div`,{className:`shrink-0 rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,g.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,g.jsx)(te,{className:`h-4 w-4`})}),(0,g.jsx)(`h1`,{className:`min-w-0 truncate text-base font-semibold`,children:y.name}),y.version&&(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,y.version]}),(0,g.jsx)(Ce,{source:y.source})]}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 line-clamp-2`,children:y.description||y.trigger}),y.sourceUrl&&(0,g.jsxs)(`div`,{className:`mt-2 flex min-w-0 items-center gap-1`,children:[(0,g.jsxs)(`a`,{href:`https://${y.sourceUrl.replace(`github:`,``)}`,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-w-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground`,title:t(`activity:skillDetail.openSourceRepo`),children:[(0,g.jsx)(de,{className:`h-3 w-3 shrink-0`}),(0,g.jsx)(`span`,{className:`truncate font-mono`,children:y.sourceUrl})]}),(0,g.jsx)(`button`,{type:`button`,onClick:Be,className:`flex shrink-0 items-center text-muted-foreground transition-colors hover:text-foreground`,title:t(`activity:skillDetail.copySourceUrl`),children:De?(0,g.jsx)(re,{className:`h-3 w-3 text-success`}):(0,g.jsx)(ae,{className:`h-3 w-3`})})]}),y.scope.length>0&&(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:y.scope.map(e=>(0,g.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] rounded bg-muted text-muted-foreground`,children:e},e))}),U&&(0,g.jsxs)(`div`,{className:`mt-2 text-xs space-y-1`,children:[U.updated.length>0&&(0,g.jsx)(`div`,{className:`text-success`,children:t(`activity:skillDetail.updatedLabel`,{list:U.updated.map(e=>`${e.name} (${e.oldRef} → ${e.newRef})`).join(`, `)})}),U.unchanged.length>0&&(0,g.jsx)(`div`,{className:`text-muted-foreground`,children:t(`activity:skillDetail.upToDateLabel`,{list:U.unchanged.join(`, `)})}),U.errors.length>0&&(0,g.jsx)(`div`,{className:`text-destructive`,children:t(`activity:skillDetail.errorsLabel`,{list:U.errors.map(e=>`${e.name?`${e.name}: `:``}${e.error}`).join(`; `)})})]})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 lg:ml-auto lg:shrink-0 lg:justify-end`,children:[_(y.source)&&y.sourceUrl&&(0,g.jsx)(`button`,{type:`button`,onClick:ze,disabled:H,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50`,title:t(`activity:skillDetail.checkUpdatesTitle`),children:H?(0,g.jsx)(o,{className:`h-3.5 w-3.5 animate-spin`}):(0,g.jsx)(ce,{className:`h-3.5 w-3.5`})}),y.source!==`bundled`&&!D&&(0,g.jsx)(`button`,{type:`button`,onClick:Ve,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,title:t(`activity:skillDetail.exportTitle`),children:(0,g.jsx)(oe,{className:`h-3.5 w-3.5`})}),_(y.source)&&!D&&(0,g.jsx)(`button`,{type:`button`,onClick:Fe,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,title:t(`activity:skillDetail.editTitle`),children:(0,g.jsx)(se,{className:`h-3.5 w-3.5`})}),_(y.source)&&(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(y),className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,title:t(`activity:skillDetail.uninstallTitle`),children:(0,g.jsx)(c,{className:`h-3.5 w-3.5`})}),(0,g.jsx)(`button`,{type:`button`,onClick:$,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`,title:t(`activity:skillDetail.closeTitle`),children:(0,g.jsx)(a,{className:`h-4 w-4`})})]})]}),b.length>1&&(0,g.jsxs)(`div`,{className:`mt-3 flex min-w-0 items-center gap-1 rounded-lg border border-border/60 bg-muted/35 px-2 py-1`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:Ne,disabled:x<=0,className:d(`rounded p-1 transition-colors`,x<=0?`text-muted-foreground/65 cursor-not-allowed`:`hover:bg-accent text-muted-foreground cursor-pointer`),title:t(`activity:skillDetail.backTitle`),children:(0,g.jsx)(ee,{className:`h-4 w-4`})}),(0,g.jsx)(`button`,{type:`button`,onClick:Pe,disabled:x>=b.length-1,className:d(`rounded p-1 transition-colors`,x>=b.length-1?`text-muted-foreground/65 cursor-not-allowed`:`hover:bg-accent text-muted-foreground cursor-pointer`),title:t(`activity:skillDetail.forwardTitle`),children:(0,g.jsx)(l,{className:`h-4 w-4`})}),(0,g.jsx)(`div`,{className:`flex items-center gap-0.5 overflow-x-auto text-xs`,children:b.map((e,t)=>(0,g.jsxs)(`span`,{className:`flex items-center shrink-0`,children:[t>0&&(0,g.jsx)(l,{className:`h-3 w-3 text-muted-foreground/65 mx-0.5 shrink-0`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{t<x&&(Y.current=!0,v({...J.current,selectedSkill:e,historyIndex:t}),O(!1),A(``),W(null))},className:d(`hover:text-primary cursor-pointer transition-colors`,t===x?`text-primary font-medium`:`text-muted-foreground`),children:e.name})]},e.name+t))})]})]}),S&&(S.relatedFiles.length>0||S.references.length>0)&&(0,g.jsxs)(`div`,{className:`shrink-0 space-y-2 rounded-xl border border-border/70 bg-card/70 px-4 py-3 shadow-sm`,children:[S.relatedFiles.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground`,children:[(0,g.jsx)(i,{className:`h-3 w-3`}),(0,g.jsx)(`span`,{className:`font-medium uppercase tracking-wide`,children:t(`activity:skillDetail.relatedFiles`)})]}),S.relatedFiles.map(e=>{let n=Se(e);return n&&Q(n)?(0,g.jsxs)(`button`,{type:`button`,onClick:()=>Me(n),className:`inline-flex min-w-0 items-center gap-1 rounded-md border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] transition-colors hover:border-primary/40 hover:text-primary`,title:t(`activity:skillDetail.goToSkillTitle`,{name:n}),children:[(0,g.jsx)(ue,{className:`h-2.5 w-2.5`}),e]},e):(0,g.jsx)(`span`,{className:`rounded-md border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] text-muted-foreground`,children:e},e)})]}),S.references.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground`,children:[(0,g.jsx)(ne,{className:`h-3 w-3`}),(0,g.jsx)(`span`,{className:`font-medium uppercase tracking-wide`,children:t(`activity:skillDetail.references`)})]}),S.references.map(e=>{let n=Se(e)??e.replace(/\.md$/,``);return Q(n)?(0,g.jsxs)(`button`,{type:`button`,onClick:()=>Me(n),className:`inline-flex min-w-0 items-center gap-1 rounded-md border border-primary/20 bg-primary/5 px-1.5 py-0.5 text-[10px] text-primary transition-colors hover:border-primary/30 hover:bg-primary/10`,title:t(`activity:skillDetail.goToSkillTitle`,{name:n}),children:[(0,g.jsx)(ue,{className:`h-2.5 w-2.5`}),n]},e):(0,g.jsx)(`span`,{className:`rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground`,children:n},e)})]})]}),(0,g.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-hidden rounded-xl border border-border/70 bg-card/70 shadow-sm`,children:we?(0,g.jsxs)(`div`,{className:`flex h-full min-h-[16rem] flex-col items-center justify-center p-8 text-center text-muted-foreground`,children:[(0,g.jsx)(o,{className:`mx-auto mb-2 h-6 w-6 animate-spin text-primary`}),(0,g.jsx)(`p`,{children:t(`activity:skillDetail.loadingContent`)})]}):D?(0,g.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-b border-border/70 bg-muted/30 px-4 py-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`activity:skillDetail.editingLabel`,{name:y.name})}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:t(`activity:skillDetail.editStats`,{lines:X.lines,words:X.words,chars:X.chars})}),Z&&(0,g.jsx)(`span`,{className:`text-xs tabular-nums ${Z.level===`critical`?`font-medium text-destructive`:`text-warning`}`,children:t(`activity:skillDetail.charsWarningFmt`,{used:(Z.used/1048576).toFixed(1),limit:(Z.limit/1048576).toFixed(0)})}),L&&(0,g.jsx)(`span`,{className:`text-xs text-success animate-pulse`,children:t(`activity:skillDetail.draftSaved`)}),z&&(0,g.jsx)(`span`,{className:`animate-pulse text-xs text-warning`,children:t(`activity:skillDetail.draftRestored`)})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[N&&(0,g.jsx)(`span`,{className:`text-xs text-destructive`,children:N}),z&&(0,g.jsx)(`button`,{type:`button`,onClick:Le,className:`rounded-md border border-warning/35 px-2 py-1 text-[10px] text-warning transition-colors hover:bg-warning/10`,children:t(`activity:skillDetail.discardDraft`)}),(0,g.jsx)(`button`,{type:`button`,onClick:Ie,className:`rounded-md border border-border/70 px-2 py-1 text-xs transition-colors hover:bg-accent`,children:t(`common:action.cancel`)}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>I(e=>!e),title:t(F?`activity:skillDetail.hidePreviewTitle`:`activity:skillDetail.splitViewTitle`),className:`rounded-md border px-2 py-1 text-xs transition-colors ${F?`border-primary/40 bg-primary/10 text-primary`:`border-border/70 text-muted-foreground hover:bg-accent`}`,children:(0,g.jsx)(ie,{className:`h-3 w-3 inline`})}),(0,g.jsx)(`button`,{type:`button`,onClick:Re,disabled:j||!k.trim(),className:`rounded-md bg-primary px-3 py-1 text-xs text-primary-foreground shadow-sm shadow-primary/15 transition-colors hover:bg-primary/90 disabled:opacity-50`,children:j?(0,g.jsx)(o,{className:`h-3 w-3 animate-spin inline`}):t(`common:action.save`)})]})]}),F?(0,g.jsxs)(`div`,{className:`flex flex-1 min-h-0 gap-0.5`,children:[(0,g.jsx)(`div`,{className:`flex-1 min-w-0 flex flex-col min-h-0`,children:(0,g.jsx)(h.Suspense,{fallback:null,children:(0,g.jsx)(xe,{value:k,onChange:e=>A(e.target.value??``),language:`markdown`,className:`flex-1`,style:{fontSize:12,backgroundColor:`transparent`,minHeight:0},placeholder:t(`activity:skillDetail.contentPlaceholder`)})})}),(0,g.jsx)(`div`,{className:`w-px bg-border flex-shrink-0`}),(0,g.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain bg-background/45 p-4 prose prose-sm dark:prose-invert max-w-none`,children:(0,g.jsx)(m,{rehypePlugins:[f],components:p,children:k})})]}):(0,g.jsx)(h.Suspense,{fallback:null,children:(0,g.jsx)(xe,{value:k,onChange:e=>A(e.target.value??``),language:`markdown`,className:`flex-1`,style:{fontSize:12,backgroundColor:`transparent`,minHeight:0},placeholder:t(`activity:skillDetail.contentPlaceholder`)})})]}):S?(0,g.jsx)(`div`,{ref:Te,className:`h-full min-h-0 overflow-y-auto overscroll-contain p-5 sm:p-6 prose prose-sm dark:prose-invert max-w-none`,children:(0,g.jsx)(m,{rehypePlugins:[f],components:p,children:S.body})}):T?(0,g.jsxs)(`div`,{className:`flex h-full min-h-[16rem] flex-col items-center justify-center p-8 text-center`,children:[(0,g.jsx)(`p`,{className:`text-destructive mb-2`,children:t(`activity:skillDetail.loadFailed`)}),(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:T}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{n&&y&&(w(!0),E(null),n.send({type:`skills.content`,payload:{name:y.name,source:y.source}}))},className:`mt-4 rounded-md border border-border/70 px-3 py-1.5 text-xs transition-colors hover:bg-accent`,children:t(`common:action.retry`)})]}):(0,g.jsx)(`div`,{className:`flex h-full min-h-[16rem] items-center justify-center p-8 text-center text-muted-foreground`,children:t(`activity:skillDetail.noContent`)})}),(0,g.jsx)(_e,{open:!!G,onOpenChange:e=>{e||K(null)},children:(0,g.jsxs)(he,{className:`flex max-h-[calc(100dvh-2rem)] w-[380px] max-w-[90vw] flex-col gap-0 overflow-hidden p-0`,showCloseButton:!1,children:[(0,g.jsxs)(me,{className:`flex shrink-0 items-center justify-between border-b border-border/70 p-4 sm:flex-row sm:justify-between sm:space-y-0`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(c,{className:`h-4 w-4 text-destructive`}),(0,g.jsx)(ge,{className:`font-semibold text-sm`,children:t(`activity:skillDetail.uninstallSkillHeading`)})]}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(null),"aria-label":t(`common:action.close`),className:`rounded p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground`,children:(0,g.jsx)(a,{className:`h-4 w-4`})})]}),(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto overscroll-contain p-4`,children:[(0,g.jsx)(`p`,{className:`text-sm`,children:G&&t(`activity:skillDetail.uninstallConfirm`,{name:G.name})}),(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:G&&t(`activity:skillDetail.uninstallRemovePath`,{path:G.path})})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-border/70 bg-muted/20 p-4`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(null),disabled:q,className:`rounded-md border border-border/70 px-3 py-1.5 text-xs transition-colors hover:bg-accent disabled:opacity-50`,children:t(`common:action.cancel`)}),(0,g.jsxs)(`button`,{type:`button`,onClick:()=>G&&He(G),disabled:q,className:`flex items-center gap-1.5 rounded-md bg-destructive px-3 py-1.5 text-xs text-destructive-foreground transition-colors hover:bg-destructive/90 disabled:cursor-not-allowed disabled:opacity-50`,children:[q&&(0,g.jsx)(o,{className:`h-3 w-3 animate-spin`}),t(`activity:skillDetail.uninstallAction`)]})]})]})})]}):(0,g.jsx)(be,{icon:(0,g.jsx)(le,{className:`h-6 w-6`}),title:t(`activity:skillDetail.noSkillSelected`),description:t(`activity:skillDetail.selectSkillHint`),action:{label:t(`activity:skillDetail.goToChat`),onClick:$},className:e})}export{v as SkillDetailView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{An as r,Ar as i,Ca as a,Cn as o,Dr as s,Ft as c,J as l,Jn as u,La as d,Ot as f,Ti as p,Ut as m,Vr as ee,Zr as te,_i as h,_t as g,en as _,ii as v,jt as ne,ka as y,li as re,m as b,oa as x,q as ie,rn as ae,sa as S,wi as C}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import{t as w}from"./utils-DQbrPaAM.js";import{n as T}from"./stores-COxKgvNx.js";import{t as E}from"./button-h7DHXgna.js";import{t as D}from"./input-DAvKojvP.js";import{B as O,R as oe,T as k,V as se,w as A,z as ce}from"./index-CfREDCPe.js";var j=e(t(),1),M=n(),N={current:{labelKey:`activity:techStackStatus.current`,badge:`border-success/35 bg-success/10 text-success`,dot:`bg-success`,weight:0},update_available_safe:{labelKey:`activity:techStackStatus.update_available_safe`,badge:`border-info/35 bg-info/10 text-info`,dot:`bg-info`,weight:30},update_available_breaking:{labelKey:`activity:techStackStatus.update_available_breaking`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:50},vulnerable:{labelKey:`activity:techStackStatus.vulnerable`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:100},deprecated:{labelKey:`activity:techStackStatus.deprecated`,badge:`border-destructive/35 bg-destructive/10 text-destructive`,dot:`bg-destructive`,weight:70},yanked:{labelKey:`activity:techStackStatus.yanked`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:80},unmaintained_suspected:{labelKey:`activity:techStackStatus.unmaintained_suspected`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:60},blocked_by_constraints:{labelKey:`activity:techStackStatus.blocked_by_constraints`,badge:`border-warning/30 bg-warning/5 text-warning`,dot:`bg-warning`,weight:40},private_or_unresolved:{labelKey:`activity:techStackStatus.private_or_unresolved`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:10},local_path:{labelKey:`activity:techStackStatus.local_path`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},git_dependency:{labelKey:`activity:techStackStatus.git_dependency`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unsupported:{labelKey:`activity:techStackStatus.unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unknown:{labelKey:`activity:techStackStatus.unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:20}},le={labelKey:`activity:techStackStatus.unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:0};function P(e){return N[e]??le}var F={npm:{label:`npm / Node.js`,icon:o},python:{label:`Python`,icon:p},rust:{label:`Rust`,icon:ne},go:{label:`Go`,icon:_},dotnet:{label:`.NET`,icon:r},php:{label:`PHP`,icon:g},dart:{label:`Dart / Flutter`,icon:h},maven:{label:`Maven`,icon:y},gradle:{label:`Gradle`,icon:S},ruby:{label:`Ruby`,icon:s},swift:{label:`Swift`,icon:ie},elixir:{label:`Elixir`,icon:g},cpp:{label:`C / C++`,icon:C}},ue={labelKey:`activity:techStackStatus.unknown`};function I(e,t){let n=L(e);return n.labelKey?t(n.labelKey):n.label??e}function L(e){return F[e]??ue}function R({ecosystem:e,className:t=`size-3.5 shrink-0`}){let n=L(e);if(!n.icon)return null;let r=n.icon;return(0,M.jsx)(r,{className:t})}function de(e){return P(e.status).weight>=50}var fe=[`critical`,`high`,`medium`,`low`,`info`],z={critical:{labelKey:`activity:techStackSeverity.critical`,badge:`border-destructive/45 bg-destructive/15 text-destructive`},high:{labelKey:`activity:techStackSeverity.high`,badge:`border-destructive/35 bg-destructive/10 text-destructive`},medium:{labelKey:`activity:techStackSeverity.medium`,badge:`border-warning/35 bg-warning/10 text-warning`},low:{labelKey:`activity:techStackSeverity.low`,badge:`border-info/35 bg-info/10 text-info`},info:{labelKey:`activity:techStackSeverity.info`,badge:`border-border/70 bg-muted text-muted-foreground`}},B={none:`activity:techStackAction.none`,upgrade_patch:`activity:techStackAction.upgrade_patch`,upgrade_minor:`activity:techStackAction.upgrade_minor`,upgrade_major:`activity:techStackAction.upgrade_major`,replace:`activity:techStackAction.replace`,remove:`activity:techStackAction.remove`,investigate:`activity:techStackAction.investigate`},V={full:{labelKey:`activity:techStackCoverage.full`,badge:`border-success/35 bg-success/10 text-success`,noteKey:void 0},partial:{labelKey:`activity:techStackCoverage.partial`,badge:`border-warning/35 bg-warning/10 text-warning`,noteKey:`activity:techStackCoverage.partialNote`},unsupported:{labelKey:`activity:techStackCoverage.unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,noteKey:`activity:techStackCoverage.unsupportedNote`}};function H(e){return V[e]??V.unsupported}function U(e){if(!e)return null;let t=/^\D*(\d+)/.exec(e);if(!t?.[1])return null;let n=Number(t[1]);return Number.isFinite(n)?n:null}function W(e){let t=U(e.locked??e.installed??e.requested),n=U(e.latestStable);if(t===null||n===null||n<=t)return{majorsBehind:0,label:null};let r=n-t;return{majorsBehind:r,label:`${r} major${r===1?``:`s`} behind`}}function G(e){return e.locked??e.installed??e.requested??null}function K(e){return e.confidence<1}function q({className:e,children:t}){return(0,M.jsx)(`span`,{className:w(`inline-flex shrink-0 items-center gap-1 border px-1.5 py-0.5 text-[10px] font-medium`,e),children:t})}function J({label:e,value:t,hint:n,tone:r=`default`}){let i={default:`text-foreground`,success:`text-success`,warning:`text-warning`,info:`text-info`,destructive:`text-destructive`}[r];return(0,M.jsxs)(`div`,{className:`border border-border/70 bg-card/55 px-3 py-2.5 shadow-[inset_0_1px_0_hsl(var(--foreground)/0.035)]`,children:[(0,M.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:e}),(0,M.jsxs)(`div`,{className:`mt-1 flex items-end justify-between gap-2`,children:[(0,M.jsx)(`p`,{className:w(`font-mono text-xl font-bold tabular-nums`,i),children:t}),(0,M.jsx)(`p`,{className:`truncate text-[9px] text-muted-foreground`,children:n})]})]})}function Y(e,t){let n,r,i;if(t===`json`)n=JSON.stringify(e,null,2),r=`techstack.json`,i=`application/json`;else if(t===`spdx`){let t={spdxVersion:`SPDX-2.3`,dataLicense:`CC0-1.0`,SPDXID:`SPDXRef-DOCUMENT`,name:`TechStack-SBOM-${e.projectId}`,documentNamespace:`https://wrongstack.dev/spdx/${e.id}`,creationInfo:{created:e.createdAt,creators:[`Tool: WrongStack TechStack Engine`]},packages:e.dependencies.map((e,t)=>({name:e.name,SPDXID:`SPDXRef-Package-${t}`,versionInfo:e.locked??e.requested,downloadLocation:e.purl?`https://purl.io/${e.purl}`:`NOASSERTION`,licenseConcluded:e.license??`NOASSERTION`}))};n=JSON.stringify(t,null,2),r=`techstack-sbom-spdx.json`,i=`application/json`}else if(t===`cyclonedx`){let t={bomFormat:`CycloneDX`,specVersion:`1.5`,version:1,metadata:{timestamp:e.createdAt,tools:[{name:`WrongStack TechStack Engine`,version:e.adapterVersion}]},components:e.dependencies.map(e=>({type:`library`,name:e.name,version:e.locked??e.requested,...e.purl?{purl:e.purl}:{},...e.license?{licenses:[{license:{id:e.license}}]}:{}}))};n=JSON.stringify(t,null,2),r=`techstack-sbom-cyclonedx.json`,i=`application/json`}else{let t=[`# TechStack Report`,``,`**Generated:** ${e.createdAt}`,`**Target:** ${e.targetRoot}`,`**Fingerprint:** ${e.fingerprint}`,`**Workspaces:** ${e.workspaces.length}`,`**Dependencies:** ${e.dependencies.length}`,`**Findings:** ${e.findings.length}`,`**Coverage:** ${e.coverage}`,``];if(e.workspaces.length>0){t.push(`## Workspaces`,``,`| Workspace | Ecosystem | Coverage | Deps |`,`|---|---|---|---|`);for(let n of e.workspaces){let r=e.dependencies.filter(e=>e.workspaceId===n.id).length;t.push(`| ${n.relativeRoot} | ${n.ecosystem} | ${n.coverage} | ${r} |`)}t.push(``)}if(e.findings.length>0){t.push(`## Findings`,``);let n=new Map;for(let t of e.findings)n.set(t.severity,[...n.get(t.severity)??[],t]);for(let r of[`critical`,`high`,`medium`,`low`,`info`]){let i=n.get(r);if(i?.length){t.push(`### ${r.charAt(0).toUpperCase()+r.slice(1)} (${i.length})`,``);for(let n of i){let r=e.dependencies.find(e=>e.id===n.dependencyId);t.push(`- **${r?.name??n.dependencyId}** — ${n.type} — ${n.rationale}`)}t.push(``)}}}if(e.dependencies.length>0){t.push(`## Dependencies`,``,`| Name | Ecosystem | Status | Locked | Latest |`,`|---|---|---|---|---|`);for(let n of e.dependencies)t.push(`| ${n.name} | ${n.ecosystem} | ${n.status} | ${n.locked??`—`} | ${n.latestStable??`—`} |`)}n=t.join(`
|
|
2
|
-
`),r=`techstack-report.md`,i=`text/markdown`}let a=new Blob([n],{type:i}),o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=r,s.click(),URL.revokeObjectURL(o)}function pe({dependency:e,findings:t,deepDive:n,onDeepDive:r,onBack:i,coverage:o}){let{t:s}=d(),c=P(e.status),l=G(e),p=W(e),m=o?H(o).noteKey:void 0;return(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsxs)(`header`,{className:`shrink-0 border-b border-border/70 bg-card/45 p-3`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(E,{variant:`ghost`,size:`icon`,onClick:i,"aria-label":s(`activity:techStack.backToDependencyList`),className:`shrink-0 md:hidden`,children:(0,M.jsx)(a,{className:`size-4`})}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,M.jsx)(`h2`,{className:`min-w-0 truncate font-mono text-sm font-bold text-foreground`,children:e.name}),(0,M.jsx)(q,{className:c.badge,children:s(c.labelKey)})]}),(0,M.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[I(e.ecosystem,s),` ·`,` `,e.direct?`direct`:`transitive`,` · `,e.scope,` ·`,` `,e.sourceType,m&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,M.jsx)(`span`,{className:`text-warning`,children:s(m)})]})]})]})]}),(0,M.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-baseline gap-2 font-mono text-xs`,children:[(0,M.jsx)(`span`,{className:`text-foreground`,children:l??`—`}),e.latestStable&&e.latestStable!==l&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,M.jsx)(`span`,{className:`text-info`,children:e.latestStable})]}),p.label&&(0,M.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[`(`,p.label,`)`]})]})]}),(0,M.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,M.jsxs)(`dl`,{className:`grid grid-cols-2 gap-px border border-border/70 bg-border/60`,children:[(0,M.jsx)(X,{label:s(`activity:techStack.constraint`),value:e.requested??`—`,mono:!0}),(0,M.jsx)(X,{label:s(`activity:techStack.locked`),value:e.locked??`—`,mono:!0}),(0,M.jsx)(X,{label:s(`activity:techStack.latestStable`),value:e.latestStable??`—`,mono:!0}),(0,M.jsx)(X,{label:s(`activity:techStack.license`),value:e.license??`—`}),e.wanted&&(0,M.jsx)(X,{label:s(`activity:techStack.wanted`),value:e.wanted,mono:!0}),e.resolvable&&(0,M.jsx)(X,{label:s(`activity:techStack.resolvable`),value:e.resolvable,mono:!0}),e.purl&&(0,M.jsx)(X,{label:s(`activity:techStack.purl`),value:e.purl,mono:!0}),(0,M.jsx)(X,{label:s(`activity:techStack.registryFlags`),value:[e.deprecated&&`deprecated`,e.yanked&&`yanked`].filter(Boolean).join(`, `)||`none`})]}),(0,M.jsxs)(`section`,{className:`mt-4`,children:[(0,M.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsx)(`h3`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:s(`activity:techStack.findings`)}),(0,M.jsxs)(E,{variant:`outline`,size:`sm`,onClick:()=>r(e),disabled:n.status===`loading`,className:`h-7 text-[10px]`,children:[n.status===`loading`?(0,M.jsx)(u,{className:`size-3 animate-spin`}):(0,M.jsx)(f,{className:`size-3`}),n.status===`loading`?`Researching…`:`Deep dive`]})]}),n.status===`error`&&n.error&&(0,M.jsx)(`p`,{role:`alert`,className:`mb-1.5 text-[10px] text-destructive`,children:n.error}),t.length===0?(0,M.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:s(`activity:techStack.nothingFlaggedRunADeepDive`)}):(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:t.map(e=>(0,M.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,M.jsx)(q,{className:z[e.severity].badge,children:s(z[e.severity].labelKey)}),(0,M.jsx)(q,{className:`border-border/70 bg-muted text-muted-foreground`,children:B[e.action]?s(B[e.action]):e.action}),K(e)&&(0,M.jsxs)(q,{className:`border-info/35 bg-info/10 text-info`,children:[(0,M.jsx)(f,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,M.jsx)(`p`,{className:`mt-1 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,M.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk})]},e.id))})]}),(0,M.jsxs)(`section`,{className:`mt-4`,children:[(0,M.jsx)(`h3`,{className:`mb-1.5 text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:s(`activity:techStack.evidence`)}),e.evidence.length===0?(0,M.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:s(`activity:techStack.noEvidenceRecorded`)}):(0,M.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.evidence.map((t,n)=>(0,M.jsxs)(`li`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,M.jsx)(q,{className:`border-border/70 bg-muted text-muted-foreground`,children:t.kind}),(0,M.jsx)(`span`,{className:`font-mono text-[9px] text-muted-foreground`,children:new Date(t.retrievedAt).toLocaleString()})]}),t.source.startsWith(`http`)?(0,M.jsxs)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`mt-1 flex min-w-0 items-center gap-1 truncate text-[10px] text-info underline-offset-2 hover:underline`,children:[(0,M.jsx)(`span`,{className:`truncate`,children:t.source}),(0,M.jsx)(v,{className:`size-2.5 shrink-0`})]}):(0,M.jsx)(`p`,{className:`mt-1 truncate font-mono text-[10px] text-muted-foreground`,children:t.source}),t.detail&&(0,M.jsx)(`p`,{className:`mt-0.5 text-[10px] leading-relaxed text-muted-foreground`,children:t.detail})]},`${e.id}-evidence-${n}`))})]})]})]})}function X({label:e,value:t,mono:n}){return(0,M.jsxs)(`div`,{className:`bg-card/55 px-2.5 py-1.5`,children:[(0,M.jsx)(`dt`,{className:`text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`,children:e}),(0,M.jsx)(`dd`,{className:w(`mt-0.5 truncate text-[11px] text-foreground`,n&&`font-mono`),children:t})]})}var me=`grid grid-cols-[minmax(0,2.2fr)_minmax(0,1.6fr)_minmax(0,1.1fr)] gap-2`;function he({dependencies:e,selectedId:t,hasDependencies:n,coverageByWorkspaceId:r,onSelect:i}){let{t:a}=d(),o=k(e,30);return e.length===0?(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,M.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:n?`No dependencies match the current filters.`:`No dependencies inventoried yet. Run a scan to populate the inventory.`})}):(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsxs)(`div`,{className:w(me,`shrink-0 border-b border-border/70 bg-card/45 px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`),children:[(0,M.jsx)(`span`,{children:a(`activity:techStack.package`)}),(0,M.jsx)(`span`,{children:a(`activity:techStack.installedLatest`)}),(0,M.jsx)(`span`,{children:a(`activity:techStack.status`)})]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,M.jsx)(b,{className:`h-full`,"aria-label":a(`activity:techStack.dependencies`),children:o.pageItems.map(e=>(0,M.jsx)(ge,{dependency:e,selected:e.id===t,coverage:r?.get(e.workspaceId),onSelect:i},e.id))})}),(0,M.jsx)(A,{page:o.page,pageSize:o.pageSize,totalItems:o.totalItems,onPageChange:o.setPage,itemLabel:`dependencies`})]})}function ge({dependency:e,selected:t,coverage:n,onSelect:r}){let{t:i}=d(),a=P(e.status),o=G(e),s=W(e),c=n?H(n).noteKey:void 0;return(0,M.jsxs)(`button`,{type:`button`,onClick:()=>r(e),"aria-current":t,className:w(me,`w-full items-center border-b border-border/40 px-3 py-2 text-left transition-colors hover:bg-accent/40`,t&&`bg-accent/60`),children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:w(`size-1.5 shrink-0`,a.dot),"aria-hidden":`true`}),(0,M.jsx)(`span`,{className:`truncate font-mono text-xs text-foreground`,children:e.name})]}),(0,M.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[(0,M.jsx)(R,{ecosystem:e.ecosystem,className:`mr-0.5 inline-block size-3 align-text-bottom`}),I(e.ecosystem,i),` · `,e.direct?`direct`:`transitive`,` · `,e.scope,c&&(0,M.jsxs)(M.Fragment,{children:[` · `,(0,M.jsx)(`span`,{className:`text-warning`,children:i(c)})]})]})]}),(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-1.5 font-mono text-[11px]`,children:[(0,M.jsx)(`span`,{className:`truncate text-foreground`,children:o??`—`}),e.latestStable&&e.latestStable!==o&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),(0,M.jsx)(`span`,{className:`truncate text-info`,children:e.latestStable})]})]}),s.label?(0,M.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-warning`,children:s.label}):e.requested&&(0,M.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-[10px] text-muted-foreground`,children:e.requested})]}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,M.jsx)(q,{className:a.badge,children:i(a.labelKey)}),e.deprecated&&(0,M.jsx)(q,{className:`border-destructive/35 bg-destructive/10 text-destructive`,children:`dep`}),e.yanked&&(0,M.jsx)(q,{className:`border-destructive/45 bg-destructive/15 text-destructive`,children:`yank`})]})]})}function _e({findings:e,dependenciesById:t,onSelectDependency:n}){let{t:r}=d(),i=k(e,20);if(e.length===0)return(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,M.jsxs)(`p`,{className:`max-w-sm text-xs text-muted-foreground`,children:[r(`activity:techStack.noFindingsRun`),` `,(0,M.jsx)(`span`,{className:`font-mono text-foreground`,children:r(`activity:techStack.analyze`)}),` `,r(`activity:techStack.toCheckVersionsAndAdvisoriesAgainst`)]})});let a=fe.map(e=>[e,i.pageItems.filter(t=>t.severity===e)]).filter(([,e])=>e.length>0);return(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:a.map(([e,i])=>(0,M.jsxs)(`section`,{children:[(0,M.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,M.jsx)(q,{className:z[e].badge,children:r(z[e].labelKey)}),(0,M.jsx)(`span`,{className:`font-mono text-[10px] tabular-nums text-muted-foreground`,children:i.length})]}),(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map(e=>(0,M.jsx)(ve,{finding:e,dependency:t.get(e.dependencyId),onSelectDependency:n},e.id))})]},e))})}),(0,M.jsx)(A,{page:i.page,pageSize:i.pageSize,totalItems:i.totalItems,onPageChange:i.setPage,itemLabel:`findings`})]})}function ve({finding:e,dependency:t,onSelectDependency:n}){let{t:r}=d(),i=K(e);return(0,M.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:()=>n(e.dependencyId),className:`min-w-0 truncate font-mono text-xs text-foreground underline-offset-2 hover:underline`,children:t?.name??e.dependencyId}),(0,M.jsx)(q,{className:`border-border/70 bg-muted text-muted-foreground`,children:B[e.action]?r(B[e.action]):e.action}),i&&(0,M.jsxs)(q,{className:`border-info/35 bg-info/10 text-info`,children:[(0,M.jsx)(f,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,M.jsx)(`p`,{className:`mt-1.5 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,M.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk}),e.evidence.length>0&&(0,M.jsx)(`ul`,{className:w(`mt-1.5 flex flex-col gap-0.5`),children:e.evidence.slice(0,4).map((t,n)=>(0,M.jsx)(`li`,{className:`min-w-0 truncate text-[10px]`,children:t.source.startsWith(`http`)?(0,M.jsx)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`text-info underline-offset-2 hover:underline`,children:t.detail??t.source}):(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:t.detail??t.source})},`${e.id}-${n}`))})]})}function ye({searchQuery:e,ecosystemFilter:t,statusFilter:n,directOnly:r,sort:a,hasFilters:o,ecosystems:s,statuses:c,visibleCount:u,totalCount:f,onSearchChange:p,onEcosystemFilterChange:ee,onStatusFilterChange:te,onToggleDirectOnly:h,onSortChange:g,onClearFilters:_}){let{t:v}=d();return(0,M.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border/70 bg-card/45 p-3`,children:[(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,M.jsx)(m,{className:`pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,M.jsx)(D,{"aria-label":v(`activity:techStack.searchDependencies`),value:e,onChange:e=>p(e.target.value),placeholder:v(`activity:techStack.searchByPackageName`),className:`h-10 min-w-0 bg-background pl-9 pr-8 text-xs`}),e&&(0,M.jsx)(`button`,{type:`button`,"aria-label":v(`activity:techStack.clearSearch`),onClick:()=>p(``),className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground`,children:(0,M.jsx)(l,{className:`size-3.5`})})]}),(0,M.jsx)(E,{variant:r?`default`:`outline`,size:`sm`,onClick:h,"aria-pressed":r,title:v(`activity:techStack.showOnlyDependenciesThisProjectDeclaresItself`),className:`shrink-0`,children:v(`activity:techStack.directOnly`)}),o&&(0,M.jsx)(E,{variant:`ghost`,size:`icon`,onClick:_,"aria-label":v(`activity:techStack.clearAllFilters`),title:v(`activity:techStack.clearAllFilters`),className:`shrink-0`,children:(0,M.jsx)(i,{className:`size-4`})})]}),(0,M.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-ecosystem-filter`,children:v(`activity:techStack.filterByEcosystem`)}),(0,M.jsxs)(`select`,{id:`techstack-ecosystem-filter`,value:t,onChange:e=>ee(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,M.jsx)(`option`,{value:`all`,children:v(`activity:techStack.allEcosystems`)}),s.map(([e,t])=>(0,M.jsxs)(`option`,{value:e,children:[I(e,v),` · `,t]},e))]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-status-filter`,children:v(`activity:techStack.filterByStatus`)}),(0,M.jsxs)(`select`,{id:`techstack-status-filter`,value:n,onChange:e=>te(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,M.jsx)(`option`,{value:`all`,children:v(`activity:techStack.allStatuses`)}),c.map(([e,t])=>(0,M.jsxs)(`option`,{value:e,children:[v(P(e).labelKey),` · `,t]},e))]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-sort`,children:v(`activity:techStack.sortDependencies`)}),(0,M.jsxs)(`select`,{id:`techstack-sort`,value:a,onChange:e=>g(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,M.jsx)(`option`,{value:`attention`,children:v(`activity:techStack.sortNeedsAttention`)}),(0,M.jsx)(`option`,{value:`drift`,children:v(`activity:techStack.sortMostOutOfDate`)}),(0,M.jsx)(`option`,{value:`name`,children:v(`activity:techStack.sortName`)})]})]})]}),(0,M.jsx)(`p`,{className:w(`text-[10px] text-muted-foreground`,o&&`text-info`),children:u===f?`${f} dependencies`:`${u} of ${f} dependencies`})]})}var be=[{id:`dependencies`,labelKey:`activity:techStack.tabDependencies`},{id:`findings`,labelKey:`activity:techStack.tabFindings`},{id:`workspaces`,labelKey:`activity:techStack.tabWorkspaces`},{id:`trends`,labelKey:`activity:techStack.tabTrends`},{id:`remediation`,labelKey:`activity:techStack.tabRemediation`}],Z=new Set([`npm`,`python`,`rust`,`go`,`php`,`dotnet`]);function Q(){let{t:e}=d(),t=T(e=>e.snapshot),n=T(e=>e.stale),r=T(e=>e.loading),i=T(e=>e.error),a=T(e=>e.activeJob),[o,s]=(0,j.useState)(`dependencies`),[p,m]=(0,j.useState)(``),[h,g]=(0,j.useState)(`all`),[_,v]=(0,j.useState)(`all`),[y,b]=(0,j.useState)(!1),[x,ie]=(0,j.useState)(`attention`),[S,C]=(0,j.useState)(null),[D,k]=(0,j.useState)([]),[A,N]=(0,j.useState)({status:`idle`,error:null}),[le,F]=(0,j.useState)(null),[ue,I]=(0,j.useState)(null),[L,R]=(0,j.useState)(new Set),[fe,z]=(0,j.useState)(!1),B=(0,j.useCallback)(async()=>{let e=T.getState();e.setLoading(!0),e.setError(null);try{let t=await fetch(`/api/techstack/snapshot`);if(t.status===404){e.setSnapshot(null,!1);return}if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);let n=await t.json();e.setSnapshot(n.snapshot,n.stale)}catch(t){e.setError(t instanceof Error?t.message:String(t))}},[]),V=(0,j.useCallback)(async e=>{let t=T.getState();t.setLoading(!0),t.setError(null);try{let n=await fetch(`/api/techstack/${e}`,{method:`POST`}),r=await n.json();if(!n.ok||!r.jobId)throw Error(r.error??`HTTP ${n.status}: ${n.statusText}`);t.jobStarted(r.jobId,e)}catch(e){t.setError(e instanceof Error?e.message:String(e))}},[]),H=(0,j.useCallback)(async()=>{let e=T.getState().activeJob;if(e)try{let t=await fetch(`/api/techstack/jobs/${encodeURIComponent(e.id)}/cancel`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);T.getState().jobCancelled(e.id)}catch(e){T.getState().setError(e instanceof Error?e.message:String(e))}},[]),U=(0,j.useCallback)(async e=>{N({status:`loading`,error:null});try{let t=await fetch(`/api/techstack/deps/${encodeURIComponent(e.id)}/research`,{method:`POST`}),n=await t.json();if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);k(n.findings??[]),N({status:`idle`,error:null})}catch(e){N({status:`error`,error:e instanceof Error?e.message:String(e)})}},[]);(0,j.useEffect)(()=>{B()},[B]),(0,j.useEffect)(()=>{(o===`trends`||o===`remediation`)&&fetch(`/api/techstack/${o===`trends`?`trends`:`remediation`}`).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);t.trend&&F(t.trend),t.plan&&I(t.plan)}).catch(e=>T.getState().setError(e instanceof Error?e.message:String(e)))},[o,t?.id]);let G=(0,j.useCallback)(async()=>{if(L.size!==0){z(!0);try{let e=await fetch(`/api/techstack/remediation/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({approvedItems:[...L]})}),t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);R(new Set),await V(`inventory`)}catch(e){T.getState().setError(e instanceof Error?e.message:String(e))}finally{z(!1)}}},[L,V]);(0,j.useEffect)(()=>{k([]),N({status:`idle`,error:null})},[t?.id]);let K=(0,j.useMemo)(()=>t?.dependencies??[],[t]),q=(0,j.useMemo)(()=>t?.findings??[],[t]),X=(0,j.useMemo)(()=>new Map(K.map(e=>[e.id,e])),[K]),me=(0,j.useMemo)(()=>Ee(K.map(e=>e.ecosystem)),[K]),ge=(0,j.useMemo)(()=>Ee(K.map(e=>e.status)),[K]),ve=(0,j.useMemo)(()=>new Map(t?.workspaces.map(e=>[e.id,e.coverage])??[]),[t]),Z=(0,j.useMemo)(()=>{let e=p.trim().toLowerCase(),t=[...K.filter(t=>!(e&&!t.name.toLowerCase().includes(e)||h!==`all`&&t.ecosystem!==h||_!==`all`&&t.status!==_||y&&!t.direct))];return x===`name`?t.sort((e,t)=>e.name.localeCompare(t.name)):x===`drift`?t.sort((e,t)=>W(t).majorsBehind-W(e).majorsBehind||e.name.localeCompare(t.name)):t.sort((e,t)=>P(t.status).weight-P(e.status).weight||Number(t.direct)-Number(e.direct)||e.name.localeCompare(t.name)),t},[K,p,h,_,y,x]),Q=S?X.get(S):void 0,De=(0,j.useMemo)(()=>Q?[...q.filter(e=>e.dependencyId===Q.id),...D.filter(e=>e.dependencyId===Q.id)]:[],[q,D,Q]),Oe=(0,j.useMemo)(()=>K.filter(de).length,[K]),ke=(0,j.useMemo)(()=>K.filter(e=>W(e).majorsBehind>0).length,[K]),Ae=(0,j.useMemo)(()=>K.filter(e=>e.status===`vulnerable`).length,[K]),je=p.trim()!==``||h!==`all`||_!==`all`||y,Me=(0,j.useCallback)(()=>{m(``),g(`all`),v(`all`),b(!1)},[]),$=!(!a||[`completed`,`failed`,`cancelled`].includes(a.status)),Ne=(0,j.useCallback)(e=>{C(e),s(`dependencies`)},[]);return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,M.jsx)(`header`,{className:`shrink-0 border-b border-border/70 px-4 py-3`,children:(0,M.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`h1`,{className:`text-base font-bold sm:text-lg`,children:e(`activity:techStack.techstack`)}),(0,M.jsx)(`span`,{className:`border border-info/35 bg-info/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-info`,children:t?`${t.workspaces.length} workspaces`:`no scan yet`}),n&&(0,M.jsx)(`span`,{className:`border border-warning/35 bg-warning/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-warning`,children:e(`activity:techStack.staleGt24h`)})]}),(0,M.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground sm:text-xs`,children:t?`${t.targetRoot} · scanned ${new Date(t.createdAt).toLocaleString()}`:`Scan the open project to inventory its dependencies.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(E,{variant:`outline`,size:`sm`,onClick:()=>void V(`inventory`),disabled:$,title:e(`activity:techStack.offlineReReadManifestsAndLockfiles`),children:[(0,M.jsx)(ae,{className:w(`size-3.5`,$&&`animate-spin`)}),(0,M.jsx)(`span`,{className:`hidden sm:inline`,children:e(`activity:techStack.refresh`)})]}),(0,M.jsxs)(E,{size:`sm`,onClick:()=>void V(`analyze`),disabled:$,title:e(`activity:techStack.checkRegistriesAndAdvisoriesThenInterpretTheResultsWithTheModel`),children:[(0,M.jsx)(f,{className:`size-3.5`}),e(`activity:techStack.analyze`)]}),$&&(0,M.jsx)(E,{variant:`ghost`,size:`icon`,onClick:()=>void H(),"aria-label":e(`activity:techStack.cancelJob`),children:(0,M.jsx)(l,{className:`size-4`})}),(0,M.jsxs)(oe,{children:[(0,M.jsx)(se,{asChild:!0,children:(0,M.jsx)(E,{variant:`ghost`,size:`icon`,disabled:!t,"aria-label":e(`activity:techStack.exportOptions`),title:e(`activity:techStack.exportOptions`),children:(0,M.jsx)(re,{className:`size-4`})})}),(0,M.jsxs)(ce,{align:`end`,className:`w-60`,children:[(0,M.jsxs)(O,{onClick:()=>t&&Y(t,`json`),children:[(0,M.jsx)(te,{className:`mr-2 size-4`}),e(`activity:techStack.exportSnapshotAsJson`)]}),(0,M.jsxs)(O,{onClick:()=>t&&Y(t,`spdx`),children:[(0,M.jsx)(ne,{className:`mr-2 size-4`}),e(`activity:techStack.exportSbomSpdx`)]}),(0,M.jsxs)(O,{onClick:()=>t&&Y(t,`cyclonedx`),children:[(0,M.jsx)(c,{className:`mr-2 size-4`}),e(`activity:techStack.exportSbomCycloneDx`)]}),(0,M.jsxs)(O,{onClick:()=>t&&Y(t,`md`),children:[(0,M.jsx)(ee,{className:`mr-2 size-4`}),e(`activity:techStack.exportReportMd`)]})]})]})]})]})}),t&&(0,M.jsxs)(`div`,{className:`grid shrink-0 grid-cols-2 gap-px border-b border-border/70 bg-border/60 sm:grid-cols-4`,children:[(0,M.jsx)(J,{label:e(`activity:techStack.dependencies`),value:K.length,hint:`${Z.length} visible`}),(0,M.jsx)(J,{label:e(`activity:techStack.outdated`),value:ke,hint:e(`activity:techStack.majorsBehind`),tone:ke>0?`warning`:`success`}),(0,M.jsx)(J,{label:e(`activity:techStack.vulnerable`),value:Ae,hint:e(`activity:techStack.knownAdvisories`),tone:Ae>0?`destructive`:`success`}),(0,M.jsx)(J,{label:e(`activity:techStack.findings`),value:q.length,hint:`${Oe} need attention`,tone:q.length>0?`info`:`default`})]}),($||i)&&(0,M.jsxs)(`div`,{className:`shrink-0 border-b border-border/70 px-4 py-2`,"aria-live":`polite`,children:[$&&a&&(0,M.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 text-xs text-info`,children:[(0,M.jsx)(u,{className:`size-3.5 animate-spin`}),(0,M.jsx)(`span`,{className:`font-mono`,children:a.status}),a.progress&&(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[a.progress.completed,`/`,a.progress.total]})]}),i&&(0,M.jsxs)(`div`,{role:`alert`,className:`flex items-center gap-2 text-xs text-destructive`,children:[(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>void B(),className:`underline`,children:e(`activity:techStack.retry`)})]})]}),r&&!t?(0,M.jsx)(we,{}):t?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`nav`,{className:`flex shrink-0 gap-1 border-b border-border/70 px-2`,children:be.map(t=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>s(t.id),"aria-current":o===t.id,className:w(`border-b-2 px-3 py-2 text-xs font-medium transition-colors`,o===t.id?`border-primary text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[e(t.labelKey),t.id===`findings`&&q.length>0&&(0,M.jsx)(`span`,{className:`ml-1.5 font-mono text-[10px] tabular-nums text-muted-foreground`,children:q.length})]},t.id))}),o===`dependencies`&&(0,M.jsxs)(`div`,{className:`grid min-h-0 flex-1 md:grid-cols-[minmax(340px,1fr)_minmax(0,1.15fr)]`,children:[(0,M.jsxs)(`section`,{className:w(`min-h-0 border-r border-border/70`,Q?`hidden md:flex md:flex-col`:`flex flex-col`),"aria-label":e(`activity:techStack.dependencyList`),children:[(0,M.jsx)(ye,{searchQuery:p,ecosystemFilter:h,statusFilter:_,directOnly:y,sort:x,hasFilters:je,ecosystems:me,statuses:ge,visibleCount:Z.length,totalCount:K.length,onSearchChange:m,onEcosystemFilterChange:g,onStatusFilterChange:v,onToggleDirectOnly:()=>b(e=>!e),onSortChange:ie,onClearFilters:Me}),(0,M.jsx)(he,{dependencies:Z,selectedId:S,hasDependencies:K.length>0,coverageByWorkspaceId:ve,onSelect:e=>C(e.id)})]}),(0,M.jsx)(`section`,{className:w(`min-h-0`,Q?`flex flex-col`:`hidden md:flex md:flex-col`),"aria-label":e(`activity:techStack.dependencyDetail`),children:Q?(0,M.jsx)(pe,{dependency:Q,findings:De,deepDive:A,onDeepDive:U,onBack:()=>C(null),coverage:ve.get(Q.workspaceId)}):(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,M.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:e(`activity:techStack.selectADependencyToSeeIts`)})})})]}),o===`findings`&&(0,M.jsx)(_e,{findings:q,dependenciesById:X,onSelectDependency:Ne}),o===`workspaces`&&(0,M.jsx)(Ce,{snapshot:t}),o===`trends`&&(0,M.jsx)(xe,{trend:le}),o===`remediation`&&(0,M.jsx)(Se,{plan:ue,approved:L,applying:fe,onToggle:e=>R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onApply:()=>void G()})]}):(0,M.jsx)(Te,{onScan:()=>void V(`inventory`),disabled:$})]})}function xe({trend:e}){return e?(0,M.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,M.jsxs)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:[e.snapshots,` snapshots`,e.vulnerabilityHalfLifeMs===void 0?``:` · vulnerability half-life ${(e.vulnerabilityHalfLifeMs/864e5).toFixed(1)} days`]}),(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.points.map(e=>(0,M.jsxs)(`div`,{className:`grid grid-cols-4 border border-border/70 bg-card/40 p-2 text-xs`,children:[(0,M.jsx)(`span`,{children:new Date(e.createdAt).toLocaleDateString()}),(0,M.jsxs)(`span`,{children:[e.dependencies,` deps`]}),(0,M.jsxs)(`span`,{className:`text-warning`,children:[e.outdated,` outdated`]}),(0,M.jsxs)(`span`,{className:`text-destructive`,children:[e.vulnerable,` vulnerable`]})]},e.snapshotId))})]}):(0,M.jsx)(we,{})}function Se({plan:e,approved:t,applying:n,onToggle:r,onApply:i}){let{t:a}=d();return e?(0,M.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,M.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.warning}),(0,M.jsxs)(E,{size:`sm`,disabled:t.size===0||n,onClick:i,children:[n&&(0,M.jsx)(u,{className:`size-3.5 animate-spin`}),`Apply `,t.size>0?t.size:``]})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.items.map(e=>{let n=`${e.workspaceId}:${e.ecosystem}:${e.dependencyName}:${e.action}`,i=e.action===`replace`||e.action===`investigate`||!Z.has(e.ecosystem);return(0,M.jsxs)(`label`,{className:w(`flex gap-3 border border-border/70 bg-card/40 p-2.5`,i?`cursor-not-allowed opacity-65`:`cursor-pointer`),children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:i,checked:t.has(n),onChange:()=>r(n)}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`span`,{className:`block font-mono text-xs`,children:[e.dependencyName,` · `,e.action]}),(0,M.jsxs)(`span`,{className:`block text-[10px] text-muted-foreground`,children:[e.currentVersion??`?`,` → `,e.targetVersion??`latest`,` · `,e.rationale]}),i&&(0,M.jsx)(`span`,{className:`block text-[10px] text-warning`,children:a(`activity:techStack.requiresAManualPackageChoice`)})]})]},n)}),e.items.length===0&&(0,M.jsx)(`p`,{className:`p-8 text-center text-xs text-muted-foreground`,children:a(`activity:techStack.noRemediationNeeded`)})]})]}):(0,M.jsx)(we,{})}function Ce({snapshot:e}){let{t}=d(),n=(0,j.useMemo)(()=>{let t=new Map;for(let n of e.dependencies)t.set(n.workspaceId,(t.get(n.workspaceId)??0)+1);return t},[e]);return e.workspaces.length===0?(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`activity:techStack.noWorkspacesDetected`)})}):(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.workspaces.map(e=>{let r=V[e.coverage];return(0,M.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`p`,{className:`truncate font-mono text-xs text-foreground`,children:e.relativeRoot}),(0,M.jsxs)(`p`,{className:`mt-0.5 flex items-center gap-1 truncate text-[10px] text-muted-foreground`,children:[(0,M.jsx)(R,{ecosystem:e.ecosystem}),(0,M.jsx)(`span`,{children:I(e.ecosystem,t)}),e.packageManager?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,M.jsx)(`span`,{children:e.packageManager})]}):null,(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,M.jsxs)(`span`,{children:[n.get(e.id)??0,` deps`]})]})]}),(0,M.jsx)(`span`,{className:w(`shrink-0 border px-1.5 py-0.5 text-[10px] font-medium`,r.badge),children:t(r.labelKey)})]}),e.manifests.length>0&&(0,M.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1`,children:e.manifests.map(e=>(0,M.jsx)(`span`,{className:`border border-border/70 bg-background/45 px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground`,children:e.split(/[/\\]/).pop()},e))})]},e.id)})})})}function we(){let{t:e}=d();return(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,M.jsx)(u,{className:`size-5 animate-spin text-muted-foreground`}),(0,M.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`activity:techStack.loadingSnapshot`)})]})})}function Te({onScan:e,disabled:t}){let{t:n}=d(),r=(0,j.useMemo)(()=>Object.values(F).map(e=>e.label??``).filter(Boolean).join(`, `),[]);return(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,M.jsxs)(`div`,{className:`flex max-w-md flex-col items-center gap-3 text-center`,children:[(0,M.jsx)(`div`,{className:`flex size-14 items-center justify-center border border-info/25 bg-info/5 text-info`,children:(0,M.jsx)(x,{className:`size-6`})}),(0,M.jsx)(`h2`,{className:`text-sm font-semibold`,children:n(`activity:techStack.noInventoryYet`)}),(0,M.jsxs)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[`TechStack reads every manifest and lockfile in the open project — `,r,` — and compares what you have against the upstream registries.`]}),(0,M.jsxs)(E,{size:`sm`,onClick:e,disabled:t,children:[(0,M.jsx)(ae,{className:w(`size-3.5`,t&&`animate-spin`)}),n(`activity:techStack.scanThisProject`)]})]})})}function Ee(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))}export{Q as TechStackView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,t as n,tt as r}from"./config-store-D7yrCV2X.js";import{i,t as a}from"./react-core-wiHys0m2.js";import{Ba as o,J as s,La as c,Qt as l,Tt as u,ln as d,mt as f}from"./vendor-BO-lHyIr.js";import"./i18n-B_njdXiH.js";import{n as p,t as m}from"./utils-DQbrPaAM.js";import{n as h}from"./ui-store-BROszDxo.js";import"./stores-COxKgvNx.js";import{n as g,t as _}from"./xterm-DA3G7037.js";var v=e(i(),1),y=`wrongstack.terminalDockHeight`,b=260;function x(e){let t=typeof window>`u`?640:Math.max(140,Math.min(640,Math.floor(window.innerHeight*.55),window.innerHeight-b));return Math.min(Math.max(Math.round(e),140),t)}var S=a(),C={background:`#1e1e2e`,foreground:`#cdd6f4`,cursor:`#f5e0dc`,selectionBackground:`#585b70`,black:`#45475a`,red:`#f38ba8`,green:`#a6e3a1`,yellow:`#f9e2af`,blue:`#89b4fa`,magenta:`#f5c2e7`,cyan:`#94e2d5`,white:`#bac2de`,brightBlack:`#585b70`,brightRed:`#f38ba8`,brightGreen:`#a6e3a1`,brightYellow:`#f9e2af`,brightBlue:`#89b4fa`,brightMagenta:`#f5c2e7`,brightCyan:`#94e2d5`,brightWhite:`#a6adc8`},w=8;function T(e=!1){return typeof window>`u`?300:x(window.innerHeight*(e?.32:.4))}function E(e=!1){if(typeof window>`u`)return T(e);try{let t=window.localStorage.getItem(y),n=t?Number.parseInt(t,10):NaN;return Number.isFinite(n)?x(n):T(e)}catch{return T(e)}}function D(e){try{window.localStorage.setItem(y,String(x(e)))}catch{}}function O(){return p()}function k(e){return{id:O(),name:`Terminal ${e}`,status:`starting`}}function A({desktopShell:e=!1,onClose:t}){let n=(0,v.useRef)(null),{t:i}=c(),a=(0,v.useRef)(1),[o,p]=(0,v.useState)(()=>E(e)),[g,_]=(0,v.useState)(()=>[k(1)]),[y,b]=(0,v.useState)(()=>g[0]?.id??``),C=h(e=>e.terminalCreateNonce),T=(0,v.useRef)(C),A=r(e=>e.projectName),M=r(e=>e.cwd);(0,v.useEffect)(()=>{let e=()=>{p(e=>{let t=x(e);return D(t),t})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let N=e=>{e.preventDefault(),n.current?.();let t=e.clientY,r=o,i=document.body.style.cursor,a=document.body.style.userSelect;document.body.style.cursor=`ns-resize`,document.body.style.userSelect=`none`;let s=e=>{let n=x(r+t-e.clientY);p(n),D(n)},c=()=>{document.body.style.cursor=i,document.body.style.userSelect=a,window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),n.current===c&&(n.current=null)};n.current=c,window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,c,{once:!0}),window.addEventListener(`pointercancel`,c,{once:!0})};(0,v.useEffect)(()=>()=>n.current?.(),[]);let P=()=>{if(g.length>=w)return;a.current+=1;let e=k(a.current);_([...g,e]),b(e.id)};(0,v.useEffect)(()=>{C!==T.current&&(T.current=C,P())},[C]);let F=e=>{let n=g.findIndex(t=>t.id===e);if(n===-1)return;let r=g.filter(t=>t.id!==e);if(_(r),r.length===0){queueMicrotask(t);return}y===e&&b(r[Math.max(0,n-1)]?.id??r[0]?.id??``)},I=e=>{let t=O();g.some(t=>t.id===e)&&(_(g.map(n=>n.id===e?{...n,id:t,status:`starting`,exitCode:void 0}:n)),b(t))},L=()=>{_([]),b(``),queueMicrotask(t)},R=(e,t)=>{_(n=>n.map(n=>n.id===e?{...n,...t}:n))},z=g.find(e=>e.id===y)??g[0]??null;return(0,S.jsxs)(`div`,{"data-terminal-dock":!0,style:{height:o},"data-shell":e?`desktop`:`browser`,className:m(`z-30 flex min-h-0 shrink-0 flex-col border-t border-border/70 bg-card shadow-2xl`,e&&`ws-terminal-desktop`),children:[(0,S.jsx)(`hr`,{"aria-orientation":`horizontal`,tabIndex:0,title:i(`activity:terminal.resize`),onPointerDown:N,className:`h-1.5 cursor-ns-resize bg-muted/70 transition-colors hover:bg-primary/35 border-0`}),(0,S.jsxs)(`div`,{className:m(`flex min-w-0 items-center justify-between gap-3 border-b border-border/70 bg-card/85`,e?`px-2 py-1`:`px-3 py-1.5`),children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-foreground`,children:[(0,S.jsx)(u,{className:`h-3.5 w-3.5 shrink-0 text-primary`}),(0,S.jsx)(`span`,{className:`font-medium`,children:i(e?`activity:terminal.labelSingular`:`activity:terminal.labelPlural`)}),(0,S.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:A||M||i(`activity:terminal.projectShell`)})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:P,disabled:g.length>=w,title:g.length>=w?i(`activity:terminal.maxTerminals`,{count:w}):i(`activity:terminal.newTerminal`),className:`inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40`,children:(0,S.jsx)(d,{className:`h-4 w-4`})}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>z&&I(z.id),disabled:!z,title:i(`activity:terminal.restart`),className:`inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40`,children:(0,S.jsx)(l,{className:`h-3.5 w-3.5`})}),(0,S.jsx)(`button`,{type:`button`,onClick:L,disabled:g.length===0,title:i(`activity:terminal.closeAll`),className:`inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40`,children:(0,S.jsx)(f,{className:`h-3.5 w-3.5`})}),(0,S.jsx)(`button`,{type:`button`,onClick:t,title:i(`activity:terminal.closeDock`),className:`inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,S.jsx)(s,{className:`h-4 w-4`})})]})]}),(0,S.jsx)(`div`,{className:m(`flex min-w-0 items-center gap-1 overflow-x-auto border-b border-border/70 bg-[hsl(var(--surface-2)/0.45)]`,e?`px-1.5 py-0.5`:`px-2 py-1`),children:g.map(t=>(0,S.jsxs)(`div`,{className:m(`group inline-flex items-center rounded border text-xs transition-colors`,e?`h-6 min-w-[92px] max-w-[148px]`:`h-7 min-w-[112px] max-w-[180px]`,y===t.id?`border-primary/35 bg-primary/10 text-primary`:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,S.jsxs)(`button`,{type:`button`,onClick:()=>b(t.id),title:t.status===`exited`?`${t.name} exited`:t.name,className:`inline-flex min-w-0 flex-1 items-center gap-2 px-2 text-left`,children:[(0,S.jsx)(`span`,{className:m(`h-1.5 w-1.5 shrink-0 rounded-full`,t.status===`running`&&`bg-success`,t.status===`starting`&&`bg-primary`,t.status===`exited`&&`bg-destructive`)}),(0,S.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[t.name,t.status===`exited`&&typeof t.exitCode==`number`?` (${t.exitCode})`:``]})]}),(0,S.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),F(t.id)},className:`mr-1 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground opacity-70 hover:bg-accent hover:text-foreground hover:opacity-100`,title:i(`activity:terminal.closeTab`,{name:t.name}),children:(0,S.jsx)(s,{className:`h-3 w-3`})})]},t.id))}),M&&!e&&(0,S.jsx)(`div`,{className:`min-w-0 truncate border-b border-border/60 bg-muted/30 px-3 py-1 text-[11px] font-mono text-muted-foreground`,children:M}),(0,S.jsx)(`div`,{className:`relative min-h-0 min-w-0 flex-1 overflow-hidden`,children:g.map(e=>(0,S.jsx)(j,{id:e.id,active:e.id===y,onRunning:()=>R(e.id,{status:`running`}),onExit:t=>R(e.id,{status:`exited`,exitCode:t})},e.id))})]})}function j({id:e,active:r,onRunning:i,onExit:a}){let s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(i),d=(0,v.useRef)(a),f=n(e=>e.wsConnected);return(0,v.useEffect)(()=>{u.current=i,d.current=a},[a,i]),(0,v.useEffect)(()=>{let r=s.current;if(!r)return;let i=new _({fontFamily:`"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:13,cursorBlink:!0,theme:C,scrollback:5e3}),a=new g;c.current=i,l.current=a,i.loadAddon(a),i.open(r);try{a.fit()}catch{}let f=t(n.getState().wsUrl);f.send({type:`terminal.create`,payload:{id:e,cols:i.cols,rows:i.rows}});let p=!1,m=f.on(`terminal.output`,t=>{t.type===`terminal.output`&&t.payload.id===e&&(p||(p=!0,u.current()),i.write(t.payload.data))}),h=f.on(`terminal.exit`,t=>{t.type===`terminal.exit`&&t.payload.id===e&&(i.write(`\r\n\x1b[2m${o.t(`activity:terminal.processExited`,{code:t.payload.exitCode})}\x1b[0m\r\n`),d.current(t.payload.exitCode))}),v=i.onData(t=>{f.send({type:`terminal.input`,payload:{id:e,data:t}})}),y=new ResizeObserver(()=>{if(r.offsetParent)try{a.fit(),f.send({type:`terminal.resize`,payload:{id:e,cols:i.cols,rows:i.rows}})}catch{}});return y.observe(r),()=>{m(),h(),v.dispose(),y.disconnect(),f.send({type:`terminal.close`,payload:{id:e}}),i.dispose(),c.current=null,l.current=null}},[e,f]),(0,v.useEffect)(()=>{r&&window.requestAnimationFrame(()=>{try{l.current?.fit();let r=c.current;r&&(t(n.getState().wsUrl).send({type:`terminal.resize`,payload:{id:e,cols:r.cols,rows:r.rows}}),r.focus())}catch{}})},[r,e]),(0,S.jsx)(`div`,{ref:s,className:m(`absolute inset-0 min-h-0 min-w-0 overflow-hidden px-2 py-1`,r?`block`:`hidden`)})}export{A as TerminalPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{W as r,w as i}from"./vendor-BO-lHyIr.js";import{t as a}from"./utils-DQbrPaAM.js";var o=e(t(),1),s=n(),c=i(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-[background-color,border-color,color,box-shadow,transform] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:translate-y-px`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20`,destructive:`bg-destructive text-destructive-foreground shadow-sm shadow-destructive/15 hover:bg-destructive/90`,outline:`border border-input bg-card/70 shadow-sm hover:border-primary/35 hover:bg-accent/70 hover:text-accent-foreground`,secondary:`border border-border/60 bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent/70 hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4 py-2`,sm:`h-9 rounded-md px-3`,lg:`h-11 rounded-md px-8`,icon:`h-10 w-10`}},defaultVariants:{variant:`default`,size:`default`}}),l=o.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...o},l)=>(0,s.jsx)(i?r:`button`,{className:a(c({variant:t,size:n,className:e})),ref:l,...o}));l.displayName=`Button`;export{l as t};
|