claude-code-workflow 7.2.6 → 7.2.7
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/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +4 -0
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +85 -8
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/smart-search.d.ts +72 -1
- package/ccw/dist/tools/smart-search.d.ts.map +1 -1
- package/ccw/dist/tools/smart-search.js +726 -117
- package/ccw/dist/tools/smart-search.js.map +1 -1
- package/ccw/frontend/dist/assets/{AlertDialog-BMFUcfv_.js → AlertDialog-CSZq4WHZ.js} +2 -2
- package/ccw/frontend/dist/assets/{AlertDialog-BMFUcfv_.js.map → AlertDialog-CSZq4WHZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{AnalysisPage-Bxa333tD.js → AnalysisPage-DVDvLHqI.js} +2 -2
- package/ccw/frontend/dist/assets/{AnalysisPage-Bxa333tD.js.map → AnalysisPage-DVDvLHqI.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ApiSettingsPage-BFVU-wcR.js → ApiSettingsPage-D69j8mI6.js} +2 -2
- package/ccw/frontend/dist/assets/{ApiSettingsPage-BFVU-wcR.js.map → ApiSettingsPage-D69j8mI6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliModeToggle-MDoFAJPL.js → CliModeToggle-fF9xHeGR.js} +2 -2
- package/ccw/frontend/dist/assets/{CliModeToggle-MDoFAJPL.js.map → CliModeToggle-fF9xHeGR.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliSessionSharePage-DkRmLiNN.js → CliSessionSharePage-Ce8tOQNx.js} +2 -2
- package/ccw/frontend/dist/assets/{CliSessionSharePage-DkRmLiNN.js.map → CliSessionSharePage-Ce8tOQNx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliViewerPage-DN8jWddy.js → CliViewerPage-Bsp1zmfD.js} +2 -2
- package/ccw/frontend/dist/assets/{CliViewerPage-DN8jWddy.js.map → CliViewerPage-Bsp1zmfD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CodexLensManagerPage-Du_VAJtC.js → CodexLensManagerPage-DUMzbrr9.js} +9 -9
- package/ccw/frontend/dist/assets/CodexLensManagerPage-DUMzbrr9.js.map +1 -0
- package/ccw/frontend/dist/assets/{Collapsible-CF5bSyzt.js → Collapsible-I5pixbHb.js} +2 -2
- package/ccw/frontend/dist/assets/{Collapsible-CF5bSyzt.js.map → Collapsible-I5pixbHb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CommandsManagerPage-Bm_P9I76.js → CommandsManagerPage-BH2xukdx.js} +2 -2
- package/ccw/frontend/dist/assets/{CommandsManagerPage-Bm_P9I76.js.map → CommandsManagerPage-BH2xukdx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{DeepWikiPage-2YIlfWhz.js → DeepWikiPage-D41ccWzY.js} +2 -2
- package/ccw/frontend/dist/assets/{DeepWikiPage-2YIlfWhz.js.map → DeepWikiPage-D41ccWzY.js.map} +1 -1
- package/ccw/frontend/dist/assets/{EndpointsPage-CMVNz5PY.js → EndpointsPage-5a8jfEWN.js} +2 -2
- package/ccw/frontend/dist/assets/{EndpointsPage-CMVNz5PY.js.map → EndpointsPage-5a8jfEWN.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ExplorerPage-C-KFz8YU.js → ExplorerPage-YCqIOu1v.js} +2 -2
- package/ccw/frontend/dist/assets/{ExplorerPage-C-KFz8YU.js.map → ExplorerPage-YCqIOu1v.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FixSessionPage-CdKND69l.js → FixSessionPage-wK1s4kbo.js} +2 -2
- package/ccw/frontend/dist/assets/{FixSessionPage-CdKND69l.js.map → FixSessionPage-wK1s4kbo.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-Bf4iqOSd.js → FloatingFileBrowser-B1U6uk_5.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-Bf4iqOSd.js.map → FloatingFileBrowser-B1U6uk_5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingPanel-CJbvABPb.js → FloatingPanel-D51p5jNy.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingPanel-CJbvABPb.js.map → FloatingPanel-D51p5jNy.js.map} +1 -1
- package/ccw/frontend/dist/assets/{GraphExplorerPage-DPoozRTR.js → GraphExplorerPage-DpIWrpWH.js} +2 -2
- package/ccw/frontend/dist/assets/{GraphExplorerPage-DPoozRTR.js.map → GraphExplorerPage-DpIWrpWH.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HistoryPage-DOMa9gJX.js → HistoryPage-C09lyJGN.js} +2 -2
- package/ccw/frontend/dist/assets/{HistoryPage-DOMa9gJX.js.map → HistoryPage-C09lyJGN.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HookManagerPage-Cfn2UEyy.js → HookManagerPage-CFBe8F_G.js} +2 -2
- package/ccw/frontend/dist/assets/{HookManagerPage-Cfn2UEyy.js.map → HookManagerPage-CFBe8F_G.js.map} +1 -1
- package/ccw/frontend/dist/assets/{InstallationsPage-qngOxLvm.js → InstallationsPage-qt7NxnsB.js} +2 -2
- package/ccw/frontend/dist/assets/{InstallationsPage-qngOxLvm.js.map → InstallationsPage-qt7NxnsB.js.map} +1 -1
- package/ccw/frontend/dist/assets/{IssueHubPage-Cvf7tH8p.js → IssueHubPage-CHol1-Ap.js} +2 -2
- package/ccw/frontend/dist/assets/{IssueHubPage-Cvf7tH8p.js.map → IssueHubPage-CHol1-Ap.js.map} +1 -1
- package/ccw/frontend/dist/assets/{LiteTasksPage-D20smVCY.js → LiteTasksPage-jH00SLnZ.js} +2 -2
- package/ccw/frontend/dist/assets/{LiteTasksPage-D20smVCY.js.map → LiteTasksPage-jH00SLnZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{McpManagerPage-Bld27yu4.js → McpManagerPage-BS-HgeQJ.js} +11 -11
- package/ccw/frontend/dist/assets/McpManagerPage-BS-HgeQJ.js.map +1 -0
- package/ccw/frontend/dist/assets/{MemoryPage-DmknNdBh.js → MemoryPage-1UahrmRX.js} +2 -2
- package/ccw/frontend/dist/assets/{MemoryPage-DmknNdBh.js.map → MemoryPage-1UahrmRX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{NotFoundPage-DdwPN1xU.js → NotFoundPage-5FVm_IkS.js} +2 -2
- package/ccw/frontend/dist/assets/{NotFoundPage-DdwPN1xU.js.map → NotFoundPage-5FVm_IkS.js.map} +1 -1
- package/ccw/frontend/dist/assets/{OrchestratorPage-CgDdmvBg.js → OrchestratorPage-ThBG24Gg.js} +2 -2
- package/ccw/frontend/dist/assets/{OrchestratorPage-CgDdmvBg.js.map → OrchestratorPage-ThBG24Gg.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-9Ze9quxh.js → ProjectOverviewPage-CrmW0IxI.js} +2 -2
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-9Ze9quxh.js.map → ProjectOverviewPage-CrmW0IxI.js.map} +1 -1
- package/ccw/frontend/dist/assets/{PromptHistoryPage-YRkBppOx.js → PromptHistoryPage-1cCGwS3s.js} +2 -2
- package/ccw/frontend/dist/assets/{PromptHistoryPage-YRkBppOx.js.map → PromptHistoryPage-1cCGwS3s.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ReviewSessionPage-DSaeHw83.js → ReviewSessionPage-DxiEc9HK.js} +2 -2
- package/ccw/frontend/dist/assets/{ReviewSessionPage-DSaeHw83.js.map → ReviewSessionPage-DxiEc9HK.js.map} +1 -1
- package/ccw/frontend/dist/assets/{RulesManagerPage-BpGwS_jB.js → RulesManagerPage-BpplliZF.js} +2 -2
- package/ccw/frontend/dist/assets/{RulesManagerPage-BpGwS_jB.js.map → RulesManagerPage-BpplliZF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionDetailPage-B_YHME7k.js → SessionDetailPage-crDIiysh.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionDetailPage-B_YHME7k.js.map → SessionDetailPage-crDIiysh.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionsPage-bW6kEEib.js → SessionsPage-DThweYY8.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionsPage-bW6kEEib.js.map → SessionsPage-DThweYY8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SettingsPage-CSwUd2Bw.js → SettingsPage-OCdOz5-z.js} +4 -4
- package/ccw/frontend/dist/assets/{SettingsPage-CSwUd2Bw.js.map → SettingsPage-OCdOz5-z.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SkillsManagerPage-CyqKvFUi.js → SkillsManagerPage-BJd3bK1G.js} +2 -2
- package/ccw/frontend/dist/assets/{SkillsManagerPage-CyqKvFUi.js.map → SkillsManagerPage-BJd3bK1G.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-DHqQNW_y.js → SpecsSettingsPage-BAWL2cpO.js} +2 -2
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-DHqQNW_y.js.map → SpecsSettingsPage-BAWL2cpO.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Switch-s_-xzEWF.js → Switch-w0I3JCcC.js} +2 -2
- package/ccw/frontend/dist/assets/{Switch-s_-xzEWF.js.map → Switch-w0I3JCcC.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TabsNavigation-CU50UxOb.js → TabsNavigation-jhUge9YV.js} +2 -2
- package/ccw/frontend/dist/assets/{TabsNavigation-CU50UxOb.js.map → TabsNavigation-jhUge9YV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TaskDrawer-128XISsA.js → TaskDrawer-APWpZulm.js} +2 -2
- package/ccw/frontend/dist/assets/{TaskDrawer-128XISsA.js.map → TaskDrawer-APWpZulm.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TeamPage-Bg_KII8B.js → TeamPage-8OnLsAfJ.js} +2 -2
- package/ccw/frontend/dist/assets/{TeamPage-Bg_KII8B.js.map → TeamPage-8OnLsAfJ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-CQ9K2zwB.js → TerminalDashboardPage-Be1hcN4p.js} +2 -2
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-CQ9K2zwB.js.map → TerminalDashboardPage-Be1hcN4p.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive--nR2vYUk.js → archive-Bo1tC9yo.js} +2 -2
- package/ccw/frontend/dist/assets/{archive--nR2vYUk.js.map → archive-Bo1tC9yo.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-restore-CZ7graO0.js → archive-restore-DYx41yLJ.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-restore-CZ7graO0.js.map → archive-restore-DYx41yLJ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{arrow-right-ChKhpVhq.js → arrow-right-C6pOqWF1.js} +2 -2
- package/ccw/frontend/dist/assets/{arrow-right-ChKhpVhq.js.map → arrow-right-C6pOqWF1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bookmark-plus-X-JcgObI.js → bookmark-plus-4Qpa6hMJ.js} +2 -2
- package/ccw/frontend/dist/assets/{bookmark-plus-X-JcgObI.js.map → bookmark-plus-4Qpa6hMJ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bot-C3uo7Fkg.js → bot-HXJTmx8r.js} +2 -2
- package/ccw/frontend/dist/assets/{bot-C3uo7Fkg.js.map → bot-HXJTmx8r.js.map} +1 -1
- package/ccw/frontend/dist/assets/{braces-5wZupwrA.js → braces-Dj2IdY7I.js} +2 -2
- package/ccw/frontend/dist/assets/{braces-5wZupwrA.js.map → braces-Dj2IdY7I.js.map} +1 -1
- package/ccw/frontend/dist/assets/{circle-stop-DZ5hLKjQ.js → circle-stop-M29TJKHc.js} +2 -2
- package/ccw/frontend/dist/assets/{circle-stop-DZ5hLKjQ.js.map → circle-stop-M29TJKHc.js.map} +1 -1
- package/ccw/frontend/dist/assets/{cpu-Dc8IS79i.js → cpu-DX15mzMT.js} +2 -2
- package/ccw/frontend/dist/assets/{cpu-Dc8IS79i.js.map → cpu-DX15mzMT.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ellipsis-vertical-B4pqbrsR.js → ellipsis-vertical-Fs6bysWx.js} +2 -2
- package/ccw/frontend/dist/assets/{ellipsis-vertical-B4pqbrsR.js.map → ellipsis-vertical-Fs6bysWx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-BwniwXnu.js → eye-D6BRlJ1r.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-BwniwXnu.js.map → eye-D6BRlJ1r.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-off-BWntEdln.js → eye-off-DjbIj5iN.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-off-BWntEdln.js.map → eye-off-DjbIj5iN.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-json-BDcmkaVn.js → file-json-kg4Lid-H.js} +2 -2
- package/ccw/frontend/dist/assets/{file-json-BDcmkaVn.js.map → file-json-kg4Lid-H.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-text-DsqI3R_g.js → file-text-BMy5pXNV.js} +2 -2
- package/ccw/frontend/dist/assets/{file-text-DsqI3R_g.js.map → file-text-BMy5pXNV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{filter-CQMcD8RT.js → filter-BTN-lUUb.js} +2 -2
- package/ccw/frontend/dist/assets/{filter-CQMcD8RT.js.map → filter-BTN-lUUb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{folder-jX77-MUi.js → folder-ChYtty7V.js} +2 -2
- package/ccw/frontend/dist/assets/{folder-jX77-MUi.js.map → folder-ChYtty7V.js.map} +1 -1
- package/ccw/frontend/dist/assets/{gauge-yQjRXM3o.js → gauge-C0VJbjRb.js} +2 -2
- package/ccw/frontend/dist/assets/{gauge-yQjRXM3o.js.map → gauge-C0VJbjRb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{globe-BecpCHYI.js → globe-DbNfDXnv.js} +2 -2
- package/ccw/frontend/dist/assets/{globe-BecpCHYI.js.map → globe-DbNfDXnv.js.map} +1 -1
- package/ccw/frontend/dist/assets/{grid-3x3-BrvzDFqU.js → grid-3x3-xWcpBNxo.js} +2 -2
- package/ccw/frontend/dist/assets/{grid-3x3-BrvzDFqU.js.map → grid-3x3-xWcpBNxo.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hard-drive-B0cynodE.js → hard-drive-BTACzgUO.js} +2 -2
- package/ccw/frontend/dist/assets/{hard-drive-B0cynodE.js.map → hard-drive-BTACzgUO.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hash-xOrTLxBg.js → hash-B0dYlmyB.js} +2 -2
- package/ccw/frontend/dist/assets/{hash-xOrTLxBg.js.map → hash-B0dYlmyB.js.map} +1 -1
- package/ccw/frontend/dist/assets/{history-BzXwj8RL.js → history-CRRLu6ck.js} +2 -2
- package/ccw/frontend/dist/assets/{history-BzXwj8RL.js.map → history-CRRLu6ck.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-BNZGm_Ur.js → index-BJIIo0B3.js} +2 -2
- package/ccw/frontend/dist/assets/{index-BNZGm_Ur.js.map → index-BJIIo0B3.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-osmL8__2.js → index-BP-D3Wv6.js} +2 -2
- package/ccw/frontend/dist/assets/{index-osmL8__2.js.map → index-BP-D3Wv6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-DflI9CwB.js → index-B_QzEioU.js} +2 -2
- package/ccw/frontend/dist/assets/{index-DflI9CwB.js.map → index-B_QzEioU.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-B9aFbBPN.js → index-BpoRYgiq.js} +2 -2
- package/ccw/frontend/dist/assets/{index-B9aFbBPN.js.map → index-BpoRYgiq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-Dy0tUf1F.js → index-CeESlrZb.js} +8 -8
- package/ccw/frontend/dist/assets/{index-Dy0tUf1F.js.map → index-CeESlrZb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-D3uMibtZ.js → index-DzTbMyaS.js} +4 -4
- package/ccw/frontend/dist/assets/{index-D3uMibtZ.js.map → index-DzTbMyaS.js.map} +1 -1
- package/ccw/frontend/dist/assets/{layout-grid-CWFZqQWu.js → layout-grid-ZN26YcTM.js} +2 -2
- package/ccw/frontend/dist/assets/{layout-grid-CWFZqQWu.js.map → layout-grid-ZN26YcTM.js.map} +1 -1
- package/ccw/frontend/dist/assets/{lightbulb-BRLgsWe3.js → lightbulb-BHrwx9j6.js} +2 -2
- package/ccw/frontend/dist/assets/{lightbulb-BRLgsWe3.js.map → lightbulb-BHrwx9j6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-2-BpKdq14u.js → link-2-zZRu2j4G.js} +2 -2
- package/ccw/frontend/dist/assets/{link-2-BpKdq14u.js.map → link-2-zZRu2j4G.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-BxUCReDi.js → link-8lz-HgnZ.js} +2 -2
- package/ccw/frontend/dist/assets/{link-BxUCReDi.js.map → link-8lz-HgnZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{list-Ce9EsAg8.js → list-DlablIjt.js} +2 -2
- package/ccw/frontend/dist/assets/{list-Ce9EsAg8.js.map → list-DlablIjt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{map-pin-CxzQV1hS.js → map-pin-JAsCUplr.js} +2 -2
- package/ccw/frontend/dist/assets/{map-pin-CxzQV1hS.js.map → map-pin-JAsCUplr.js.map} +1 -1
- package/ccw/frontend/dist/assets/{messages-square-Dyodk79r.js → messages-square-D0iSFb2Y.js} +2 -2
- package/ccw/frontend/dist/assets/{messages-square-Dyodk79r.js.map → messages-square-D0iSFb2Y.js.map} +1 -1
- package/ccw/frontend/dist/assets/{minimize-2-s0009UK9.js → minimize-2-BJmkU9CE.js} +2 -2
- package/ccw/frontend/dist/assets/{minimize-2-s0009UK9.js.map → minimize-2-BJmkU9CE.js.map} +1 -1
- package/ccw/frontend/dist/assets/{package-C69biuJL.js → package-DYrbBCxk.js} +2 -2
- package/ccw/frontend/dist/assets/{package-C69biuJL.js.map → package-DYrbBCxk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{plug-DERl-wQd.js → plug-VG7-23M-.js} +2 -2
- package/ccw/frontend/dist/assets/{plug-DERl-wQd.js.map → plug-VG7-23M-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{power-CdvaDgTh.js → power-zPFYNx7u.js} +2 -2
- package/ccw/frontend/dist/assets/{power-CdvaDgTh.js.map → power-zPFYNx7u.js.map} +1 -1
- package/ccw/frontend/dist/assets/{save-C_Uot2e4.js → save-D4XQY9i9.js} +2 -2
- package/ccw/frontend/dist/assets/{save-C_Uot2e4.js.map → save-D4XQY9i9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{send-R1XtAXeP.js → send-ClSnDjj-.js} +2 -2
- package/ccw/frontend/dist/assets/{send-R1XtAXeP.js.map → send-ClSnDjj-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-check-big-Cyqi4INj.js → square-check-big-Bffh_MFc.js} +2 -2
- package/ccw/frontend/dist/assets/{square-check-big-Cyqi4INj.js.map → square-check-big-Bffh_MFc.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-pen-BmLNjUUw.js → square-pen-DsOvAvME.js} +2 -2
- package/ccw/frontend/dist/assets/{square-pen-BmLNjUUw.js.map → square-pen-DsOvAvME.js.map} +1 -1
- package/ccw/frontend/dist/assets/{star-CakKtIYu.js → star-TLJjvoy2.js} +2 -2
- package/ccw/frontend/dist/assets/{star-CakKtIYu.js.map → star-TLJjvoy2.js.map} +1 -1
- package/ccw/frontend/dist/assets/{style-DdNmehyz.js → style-BXKXgpOY.js} +2 -2
- package/ccw/frontend/dist/assets/{style-DdNmehyz.js.map → style-BXKXgpOY.js.map} +1 -1
- package/ccw/frontend/dist/assets/{target-CUvfwM3S.js → target-FDuAB6SF.js} +2 -2
- package/ccw/frontend/dist/assets/{target-CUvfwM3S.js.map → target-FDuAB6SF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{test-tube-BVwrOGiZ.js → test-tube-B9vj-Im8.js} +2 -2
- package/ccw/frontend/dist/assets/{test-tube-BVwrOGiZ.js.map → test-tube-B9vj-Im8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{upload-CY1NwcDw.js → upload-CHgTrVN5.js} +2 -2
- package/ccw/frontend/dist/assets/{upload-CY1NwcDw.js.map → upload-CHgTrVN5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useApiSettings-9JuzUfPE.js → useApiSettings-XsHrqf-L.js} +2 -2
- package/ccw/frontend/dist/assets/{useApiSettings-9JuzUfPE.js.map → useApiSettings-XsHrqf-L.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCli-Bb7Zo-OI.js → useCli-DOlWtux5.js} +2 -2
- package/ccw/frontend/dist/assets/{useCli-Bb7Zo-OI.js.map → useCli-DOlWtux5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCommands-BUu-hUYI.js → useCommands-DazCajiX.js} +2 -2
- package/ccw/frontend/dist/assets/{useCommands-BUu-hUYI.js.map → useCommands-DazCajiX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useDebounce-CptXgLBn.js → useDebounce-Cah-bua6.js} +2 -2
- package/ccw/frontend/dist/assets/{useDebounce-CptXgLBn.js.map → useDebounce-Cah-bua6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useFileExplorer-B7dN8VT1.js → useFileExplorer-B9SCPhhl.js} +2 -2
- package/ccw/frontend/dist/assets/{useFileExplorer-B7dN8VT1.js.map → useFileExplorer-B9SCPhhl.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useLocale-D6USNXOr.js → useLocale-CmG6pxZe.js} +2 -2
- package/ccw/frontend/dist/assets/{useLocale-D6USNXOr.js.map → useLocale-CmG6pxZe.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSkills-r8yfiQ-u.js → useSkills-DvEJ0JOv.js} +3 -3
- package/ccw/frontend/dist/assets/{useSkills-r8yfiQ-u.js.map → useSkills-DvEJ0JOv.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSystemSettings-BVWDQLMy.js → useSystemSettings-BDpwSa04.js} +2 -2
- package/ccw/frontend/dist/assets/{useSystemSettings-BVWDQLMy.js.map → useSystemSettings-BDpwSa04.js.map} +1 -1
- package/ccw/frontend/dist/assets/{wand-sparkles-Zdaej5bR.js → wand-sparkles-T2KGCRiy.js} +2 -2
- package/ccw/frontend/dist/assets/{wand-sparkles-Zdaej5bR.js.map → wand-sparkles-T2KGCRiy.js.map} +1 -1
- package/ccw/frontend/dist/index.html +1 -1
- package/codex-lens/src/codexlens/cli/commands.py +12 -1
- package/codex-lens/src/codexlens/config.py +12 -0
- package/codex-lens/src/codexlens/env_config.py +1 -0
- package/package.json +1 -1
- package/ccw/frontend/dist/assets/CodexLensManagerPage-Du_VAJtC.js.map +0 -1
- package/ccw/frontend/dist/assets/McpManagerPage-Bld27yu4.js.map +0 -1
package/ccw/frontend/dist/assets/{HookManagerPage-Cfn2UEyy.js → HookManagerPage-CFBe8F_G.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{O as Me,u as $,r as x,j as e,C as T,dq as J,c as S,B as N,e as w,T as Ce,cy as me,ap as xe,x as Pe,y as He,z as Te,A as ze,I as L,bO as Ne,aq as ue,ar as ge,as as pe,at as he,au as W,G as Ue,Z as B,cQ as X,S as Oe,W as De,ck as Ee,cB as Ie,a1 as qe,dr as Re,af as We,N as Le,bq as _e,an as Ke,aF as $e,ab as Ge,U as Ae,aQ as Fe,M as Y,aw as ye,ds as Ve,ao as Qe,a7 as fe,dt as Ze,bY as Je,b7 as Ye,R as Be,b as Xe}from"./index-
|
|
1
|
+
import{O as Me,u as $,r as x,j as e,C as T,dq as J,c as S,B as N,e as w,T as Ce,cy as me,ap as xe,x as Pe,y as He,z as Te,A as ze,I as L,bO as Ne,aq as ue,ar as ge,as as pe,at as he,au as W,G as Ue,Z as B,cQ as X,S as Oe,W as De,ck as Ee,cB as Ie,a1 as qe,dr as Re,af as We,N as Le,bq as _e,an as Ke,aF as $e,ab as Ge,U as Ae,aQ as Fe,M as Y,aw as ye,ds as Ve,ao as Qe,a7 as fe,dt as Ze,bY as Je,b7 as Ye,R as Be,b as Xe}from"./index-DzTbMyaS.js";import{A as et,a as tt,b as st,c as it,d as ot,e as at,f as rt,g as nt}from"./AlertDialog-CSZq4WHZ.js";import{P as lt,a as ct}from"./power-zPFYNx7u.js";import{S as dt}from"./square-pen-DsOvAvME.js";import{S as mt}from"./send-ClSnDjj-.js";import{i as xt,j as ut,k as gt}from"./useCli-DOlWtux5.js";import{C as pt}from"./circle-stop-M29TJKHc.js";import{W as ke}from"./wand-sparkles-T2KGCRiy.js";import"./useLocale-CmG6pxZe.js";import"./errorSanitizer-IY9pf5g4.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/const ce=Me("FileChartColumnIncreasing",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);function ht(t){switch(t){case"SessionStart":return"🎬";case"UserPromptSubmit":return"⚡";case"PreToolUse":return"🔧";case"PostToolUse":return"✅";case"Stop":return"🛑";case"Notification":return"🔔";case"SubagentStart":return"🚀";case"SubagentStop":return"🏁";case"PreCompact":return"📦";case"SessionEnd":return"👋";case"PostToolUseFailure":return"❌";case"PermissionRequest":return"🔐";default:return"📌"}}function ft(t){switch(t){case"SessionStart":case"UserPromptSubmit":case"SubagentStart":return"default";case"PreToolUse":case"Stop":case"PreCompact":case"PermissionRequest":return"secondary";case"PostToolUse":case"Notification":case"SubagentStop":case"SessionEnd":case"PostToolUseFailure":return"outline";default:return"outline"}}const jt={"Session Start Notify":"session-start-notify","Session State Watch":"session-state-watch","Stop Notify":"stop-notify","Auto Format on Write":"auto-format-on-write","Auto Lint on Write":"auto-lint-on-write","Block Sensitive Files":"block-sensitive-files","Git Auto Stage":"git-auto-stage","Post Edit Index":"post-edit-index","Session End Summary":"session-end-summary","Project State Inject":"project-state-inject","Memory V2 Extract":"memory-v2-extract","Memory V2 Auto Consolidate":"memory-v2-auto-consolidate","Memory Sync Dashboard":"memory-sync-dashboard"};function bt(t,s){const j=`cliHooks.templates.templates.${t}.name`;try{const g=s({id:j});if(g&&!g.includes("cliHooks.templates.templates"))return g}catch{}const i=jt[t];if(i){const g=`cliHooks.templates.templates.${i}.name`;try{const r=s({id:g});if(r&&!r.includes("cliHooks.templates.templates"))return r}catch{}}return t}function wt({hook:t,isExpanded:s,onToggleExpand:j,onToggle:i,onEdit:g,onDelete:r}){const{formatMessage:n}=$(),[C,d]=x.useState(!1),h=bt(t.name,n),P=()=>{i(t.name,!t.enabled)},z=()=>{g(t)},p=()=>{d(!0)},k=()=>{d(!1),r(t.name)},D=()=>{d(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(T,{className:S("overflow-hidden",!t.enabled&&"opacity-60"),children:[e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:S("p-2 rounded-lg flex-shrink-0",t.enabled?"bg-primary/10":"bg-muted"),children:e.jsx(J,{className:S("w-4 h-4",t.enabled?"text-primary":"text-muted-foreground")})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:h}),e.jsxs(N,{variant:ft(t.trigger),className:"text-xs flex-shrink-0",children:[e.jsx("span",{className:"mr-1",children:ht(t.trigger)}),n({id:`cliHooks.trigger.${t.trigger}`})]}),e.jsx(N,{variant:t.enabled?"default":"secondary",className:"text-xs flex-shrink-0",children:t.enabled?n({id:"common.status.enabled"}):n({id:"common.status.disabled"})})]}),t.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:t.description})]})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,title:t.enabled?n({id:"cliHooks.actions.disable"}):n({id:"cliHooks.actions.enable"}),children:t.enabled?e.jsx(lt,{className:"w-4 h-4 text-success"}):e.jsx(ct,{className:"w-4 h-4 text-muted-foreground"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:z,title:n({id:"common.actions.edit"}),children:e.jsx(dt,{className:"w-4 h-4"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:p,title:n({id:"common.actions.delete"}),children:e.jsx(Ce,{className:"w-4 h-4 text-destructive"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:j,title:n(s?{id:"cliHooks.actions.collapse"}:{id:"cliHooks.actions.expand"}),children:s?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]})]})}),s&&e.jsxs("div",{className:"border-t border-border bg-muted/30 p-4 space-y-3",children:[t.description&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.description"})}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:t.description})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.matcher"})}),e.jsx("p",{className:"text-sm text-foreground mt-1 font-mono bg-muted px-2 py-1 rounded",children:t.matcher||n({id:"cliHooks.allTools"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.command"})}),e.jsx("p",{className:"text-sm text-foreground mt-1 font-mono bg-muted px-2 py-1 rounded break-all max-h-32 overflow-y-auto",children:t.command||t.script||"N/A"})]})]})]}),e.jsx(et,{open:C,onOpenChange:d,children:e.jsxs(tt,{children:[e.jsxs(st,{children:[e.jsx(it,{children:"Delete CLI Hook?"}),e.jsxs(ot,{children:['This action cannot be undone. The hook "',h,'" will be permanently deleted.']})]}),e.jsxs(at,{children:[e.jsx(rt,{onClick:D,children:"Cancel"}),e.jsx(nt,{onClick:k,children:"Delete"})]})]})})]})}function Nt(t){const s={};return t.name.trim()?/^[a-zA-Z0-9_-]+$/.test(t.name)||(s.name="validation.nameInvalid"):s.name="validation.nameRequired",t.trigger||(s.trigger="validation.triggerRequired"),t.command.trim()||(s.command="validation.commandRequired"),s}function yt({mode:t,hook:s,open:j,onClose:i,onSave:g}){const{formatMessage:r}=$(),[n,C]=x.useState({name:"",description:"",trigger:"PostToolUse",matcher:"",command:""}),[d,h]=x.useState({}),[P,z]=x.useState(!1);x.useEffect(()=>{j&&(C(t==="edit"&&s?{name:s.name,description:s.description||"",trigger:s.trigger,matcher:s.matcher||"",command:s.command||s.script||""}:{name:"",description:"",trigger:"PostToolUse",matcher:"",command:""}),h({}))},[j,t,s]);const p=(c,E)=>{C(v=>({...v,[c]:E})),d[c]&&h(v=>({...v,[c]:void 0}))},k=async()=>{const c=Nt(n);if(Object.keys(c).length>0){h(c);return}z(!0);try{await g(n),i()}catch(E){console.error("Failed to save hook:",E)}finally{z(!1)}},D=[{value:"SessionStart",label:"cliHooks.trigger.SessionStart"},{value:"UserPromptSubmit",label:"cliHooks.trigger.UserPromptSubmit"},{value:"PreToolUse",label:"cliHooks.trigger.PreToolUse"},{value:"PostToolUse",label:"cliHooks.trigger.PostToolUse"},{value:"Stop",label:"cliHooks.trigger.Stop"},{value:"Notification",label:"cliHooks.trigger.Notification"},{value:"SubagentStart",label:"cliHooks.trigger.SubagentStart"},{value:"SubagentStop",label:"cliHooks.trigger.SubagentStop"},{value:"PreCompact",label:"cliHooks.trigger.PreCompact"},{value:"SessionEnd",label:"cliHooks.trigger.SessionEnd"},{value:"PostToolUseFailure",label:"cliHooks.trigger.PostToolUseFailure"},{value:"PermissionRequest",label:"cliHooks.trigger.PermissionRequest"}];return e.jsx(Pe,{open:j,onOpenChange:i,children:e.jsxs(He,{className:"sm:max-w-[600px]",children:[e.jsx(Te,{children:e.jsx(ze,{children:t==="create"?r({id:"cliHooks.dialog.createTitle"}):r({id:"cliHooks.dialog.editTitle"},{hookName:s==null?void 0:s.name})})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-name",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.name"})," *"]}),e.jsx(L,{id:"hook-name",value:n.name,onChange:c=>p("name",c.target.value),placeholder:r({id:"cliHooks.form.namePlaceholder"}),className:"mt-1",error:!!d.name}),d.name&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.name}`})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"hook-description",className:"text-sm font-medium text-foreground",children:r({id:"cliHooks.form.description"})}),e.jsx(Ne,{id:"hook-description",value:n.description,onChange:c=>p("description",c.target.value),placeholder:r({id:"cliHooks.form.descriptionPlaceholder"}),className:"mt-1",rows:2})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-trigger",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.trigger"})," *"]}),e.jsxs(ue,{value:n.trigger,onValueChange:c=>p("trigger",c),children:[e.jsx(ge,{className:"mt-1",id:"hook-trigger",children:e.jsx(pe,{})}),e.jsx(he,{children:D.map(c=>e.jsx(W,{value:c.value,children:r({id:c.label})},c.value))})]}),d.trigger&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.trigger}`})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"hook-matcher",className:"text-sm font-medium text-foreground",children:r({id:"cliHooks.form.matcher"})}),e.jsx(L,{id:"hook-matcher",value:n.matcher,onChange:c=>p("matcher",c.target.value),placeholder:r({id:"cliHooks.form.matcherPlaceholder"}),className:"mt-1 font-mono"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r({id:"cliHooks.form.matcherHelp"})})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-command",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.command"})," *"]}),e.jsx(Ne,{id:"hook-command",value:n.command,onChange:c=>p("command",c.target.value),placeholder:r({id:"cliHooks.form.commandPlaceholder"}),className:"mt-1 font-mono text-sm",rows:4,error:!!d.command}),d.command&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.command}`})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r({id:"cliHooks.form.commandHelp"})})]})]}),e.jsxs(Ue,{children:[e.jsx(w,{variant:"outline",onClick:i,disabled:P,children:r({id:"common.actions.cancel"})}),e.jsx(w,{onClick:k,disabled:P,children:r(P?{id:"common.actions.saving"}:{id:"common.actions.save"})})]})]})})}const je=[{id:"session-start-notify",name:"Session Start Notify",description:"Notify dashboard when a new workflow session is created",category:"notification",trigger:"SessionStart"},{id:"session-state-watch",name:"Session State Watch",description:"Watch for session metadata file changes (workflow-session.json)",category:"notification",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"stop-notify",name:"Stop Notify",description:"Notify dashboard when Claude finishes responding",category:"notification",trigger:"Stop"},{id:"memory-sync-dashboard",name:"Memory Sync Dashboard",description:"Sync memory V2 status to dashboard on changes",category:"notification",trigger:"PostToolUse",matcher:"mcp__ccw-tools__core_memory"},{id:"auto-format-on-write",name:"Auto Format on Write",description:"Auto-format files after Claude writes or edits them",category:"automation",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"auto-lint-on-write",name:"Auto Lint on Write",description:"Auto-lint files after Claude writes or edits them",category:"automation",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"git-auto-stage",name:"Git Auto Stage",description:"Auto stage all modified files when Claude finishes responding",category:"automation",trigger:"Stop"},{id:"block-sensitive-files",name:"Block Sensitive Files",description:"Block modifications to sensitive files (.env, secrets, credentials)",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit"},{id:"danger-bash-confirm",name:"Danger Bash Confirm",description:"Require confirmation for dangerous bash commands",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"danger-file-protection",name:"Danger File Protection",description:"Block modifications to protected files",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit"},{id:"danger-git-destructive",name:"Danger Git Destructive",description:"Require confirmation for destructive git operations",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"danger-network-confirm",name:"Danger Network Confirm",description:"Require confirmation for network operations",category:"protection",trigger:"PreToolUse",matcher:"Bash|WebFetch"},{id:"danger-system-paths",name:"Danger System Paths",description:"Block modifications to system paths",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit|Bash"},{id:"danger-permission-change",name:"Danger Permission Change",description:"Require confirmation for permission changes",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"post-edit-index",name:"Post Edit Index",description:"Notify indexing service when files are modified",category:"indexing",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"session-end-summary",name:"Session End Summary",description:"Send session summary to dashboard on session end",category:"indexing",trigger:"Stop"},{id:"memory-auto-compress",name:"Auto Memory Compress",description:"Automatically compress memory when entries exceed threshold",category:"utility",trigger:"Stop"},{id:"memory-preview-extract",name:"Memory Preview & Extract",description:"Preview extraction queue and extract eligible sessions",category:"utility",trigger:"SessionStart"},{id:"memory-status-check",name:"Memory Status Check",description:"Check memory extraction and consolidation status",category:"utility",trigger:"SessionStart"},{id:"memory-v2-extract",name:"Memory V2 Extract",description:"Trigger Phase 1 extraction when session ends",category:"utility",trigger:"Stop"},{id:"memory-v2-auto-consolidate",name:"Memory V2 Auto Consolidate",description:"Trigger Phase 2 consolidation after extraction jobs complete",category:"utility",trigger:"Stop"}],ve={notification:{icon:Ie,color:"text-blue-500",bg:"bg-blue-500/10"},indexing:{icon:Ee,color:"text-purple-500",bg:"bg-purple-500/10"},automation:{icon:De,color:"text-orange-500",bg:"bg-orange-500/10"},utility:{icon:Oe,color:"text-gray-500",bg:"bg-gray-500/10"},protection:{icon:X,color:"text-red-500",bg:"bg-red-500/10"}},kt={"session-start-notify":mt,"session-state-watch":ce,"stop-notify":Ie,"auto-format-on-write":We,"auto-lint-on-write":Re,"block-sensitive-files":X,"git-auto-stage":qe,"post-edit-index":Ee,"session-end-summary":ce,"project-state-inject":ce};function vt(t,s){return{notification:s({id:"cliHooks.templates.categories.notification"}),indexing:s({id:"cliHooks.templates.categories.indexing"}),automation:s({id:"cliHooks.templates.categories.automation"}),utility:s({id:"cliHooks.templates.categories.utility"}),protection:s({id:"cliHooks.templates.categories.protection"})}[t]}function St({onInstallTemplate:t,installedTemplates:s,isLoading:j=!1,installingTemplateId:i=null}){const{formatMessage:g}=$(),r=x.useMemo(()=>je.reduce((d,h)=>(d[h.category]||(d[h.category]=[]),d[h.category].push(h),d),{}),[]),n=["notification","indexing","automation","protection","utility"],C=async d=>{await t(d)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:g({id:"cliHooks.templates.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:g({id:"cliHooks.templates.description"})})]})]}),n.map(d=>{const h=r[d];if(!h||h.length===0)return null;const{icon:P,color:z}=ve[d];return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:S("w-4 h-4",z)}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:vt(d,g)}),e.jsx(N,{variant:"outline",className:"text-xs",children:h.length})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:h.map(p=>{const k=s.includes(p.id),D=i===p.id,c=kt[p.id]||B,{color:E,bg:v}=ve[p.category];return e.jsxs(T,{className:S("p-4 flex flex-col gap-2 transition-colors",k&&"opacity-70"),children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:S("p-2 rounded-lg shrink-0",v),children:e.jsx(c,{className:S("w-4 h-4",E)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium text-foreground leading-tight",children:g({id:`cliHooks.templates.templates.${p.id}.name`,defaultMessage:p.name})}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[e.jsx(N,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:g({id:`cliHooks.trigger.${p.trigger}`})}),p.matcher&&e.jsx(N,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono",children:p.matcher})]})]}),e.jsx(w,{size:"sm",variant:"ghost",disabled:k||D,onClick:()=>C(p.id),className:S("h-8 w-8 p-0 shrink-0 rounded-full",k?"text-green-500 hover:text-green-500":"text-primary hover:bg-primary/10"),title:g(k?{id:"cliHooks.templates.actions.installed"}:{id:"cliHooks.templates.actions.install"}),children:D?e.jsx(Le,{className:"w-4 h-4 animate-spin"}):k?e.jsx(_e,{className:"w-4 h-4"}):e.jsx(Ke,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed flex-1 pl-11",children:g({id:`cliHooks.templates.templates.${p.id}.description`,defaultMessage:p.description})})]},p.id)})})]},d)})]})}function be(){if(typeof window>"u"||typeof window.navigator>"u")return"linux";const t=window.navigator.userAgent;return t.includes("Win")?"windows":t.includes("Mac")?"macos":"linux"}function Ct(t){switch(t??be()){case"windows":return"cmd";case"macos":return"zsh";case"linux":return"bash";default:return"bash"}}function q(t){return{windows:"Windows",macos:"macOS",linux:"Linux"}[t]}function Pt(t){return{cmd:"Command Prompt (cmd.exe)",bash:"Bash",powershell:"PowerShell",zsh:"Zsh"}[t]}function Ht(t,s){var r;const j=s??be(),i=[],g=[];if((r=t.incompatiblePlatforms)!=null&&r.includes(j))return i.push(`This hook is not compatible with ${q(j)}. Incompatible platform detected.`),{compatible:!1,issues:i,warnings:g};if(t.requiredPlatforms&&t.requiredPlatforms.length>0&&!t.requiredPlatforms.includes(j)){const n=t.requiredPlatforms.map(q).join(", ");return i.push(`This hook requires one of: ${n}. Current platform: ${q(j)}.`),{compatible:!1,issues:i,warnings:g}}if(t.optionalPlatforms&&t.optionalPlatforms.length>0&&!t.optionalPlatforms.includes(j)){const n=t.optionalPlatforms.map(q).join(", ");g.push(`This hook has optional features for: ${n}. Some features may not work on ${q(j)}.`)}return{compatible:!0,issues:i,warnings:g}}const de={"memory-update":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]},"danger-protection":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]},"skill-context":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]}},Se={"memory-update-queue":"memory-auto-compress","danger-bash-confirm":"danger-bash-confirm","danger-file-protection":"danger-file-protection","danger-git-destructive":"danger-git-destructive","danger-network-confirm":"danger-network-confirm","danger-system-paths":"danger-system-paths","danger-permission-change":"danger-permission-change"},Z=[{id:"bash-confirm",templateId:"danger-bash-confirm",labelKey:"cliHooks.wizards.dangerProtection.options.bashConfirm",descKey:"cliHooks.wizards.dangerProtection.options.bashConfirmDesc"},{id:"file-protection",templateId:"danger-file-protection",labelKey:"cliHooks.wizards.dangerProtection.options.fileProtection",descKey:"cliHooks.wizards.dangerProtection.options.fileProtectionDesc"},{id:"git-destructive",templateId:"danger-git-destructive",labelKey:"cliHooks.wizards.dangerProtection.options.gitDestructive",descKey:"cliHooks.wizards.dangerProtection.options.gitDestructiveDesc"},{id:"network-confirm",templateId:"danger-network-confirm",labelKey:"cliHooks.wizards.dangerProtection.options.networkConfirm",descKey:"cliHooks.wizards.dangerProtection.options.networkConfirmDesc"},{id:"system-paths",templateId:"danger-system-paths",labelKey:"cliHooks.wizards.dangerProtection.options.systemPaths",descKey:"cliHooks.wizards.dangerProtection.options.systemPathsDesc"},{id:"permission-change",templateId:"danger-permission-change",labelKey:"cliHooks.wizards.dangerProtection.options.permissionChange",descKey:"cliHooks.wizards.dangerProtection.options.permissionChangeDesc"}],K={"memory-update":{title:"cliHooks.wizards.memoryUpdate.title",description:"cliHooks.wizards.memoryUpdate.description",icon:Fe,trigger:"Stop",platformRequirements:de["memory-update"]},"danger-protection":{title:"cliHooks.wizards.dangerProtection.title",description:"cliHooks.wizards.dangerProtection.description",icon:X,trigger:"PreToolUse",platformRequirements:de["danger-protection"]},"skill-context":{title:"cliHooks.wizards.skillContext.title",description:"cliHooks.wizards.skillContext.description",icon:Ae,trigger:"UserPromptSubmit",platformRequirements:de["skill-context"]}};function Tt({wizardType:t,open:s,onClose:j}){const{formatMessage:i}=$(),g=$e(),[r,n]=x.useState(1),[C,d]=x.useState("linux"),[h,P]=x.useState("project"),[z,p]=x.useState(!1),{data:k,isLoading:D}=Ge({queryKey:["skills"],queryFn:()=>Je(),enabled:s&&t==="skill-context"});x.useEffect(()=>{s&&d(be())},[s]);const[c,E]=x.useState({tool:"gemini",threshold:5,timeout:300}),[v,ee]=x.useState({selectedOptions:["bash-confirm","file-protection","git-destructive"]}),[y,F]=x.useState({mode:"keyword",skillConfigs:[{skill:"",keywords:""}]}),I=K[t],U=Ht(I.platformRequirements,C),G=()=>{r<3&&n(a=>a+1)},_=()=>{r>1&&n(a=>a-1)},R=()=>{n(1),j()},te=async()=>{p(!0);try{switch(t){case"memory-update":{const l=await(await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:"memory-auto-compress",scope:h})})).json();if(!l.success)throw new Error(l.error||"Failed to install template");break}case"danger-protection":{for(const a of v.selectedOptions){const l=Z.find(H=>H.id===a);if(!l)continue;const b=Se[l.templateId]||l.templateId,f=await(await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:b,scope:h})})).json();f.success||console.warn(`Failed to install template ${b}:`,f.error)}break}case"skill-context":{const a=y.mode==="auto"?{_templateId:"skill-context-auto",matcher:"",hooks:[{type:"command",command:"ccw hook keyword --stdin"}]}:{_templateId:"skill-context-keyword",matcher:"",hooks:[{type:"command",command:"ccw hook keyword --stdin"}]};await Ze(h,"UserPromptSubmit",a);break}}g.invalidateQueries({queryKey:["hooks"]}),R()}catch(a){console.error("Failed to create hook:",a)}finally{p(!1)}},se=()=>{const a=K[t].icon;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3 pb-4 border-b",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10",children:e.jsx(a,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:i({id:K[t].title})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:K[t].description})})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:S("w-5 h-5",U.compatible?"text-green-500":"text-destructive")}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.platform.detected"})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[q(C)," (",Pt(Ct(C)),")"]})]}),e.jsx(N,{variant:U.compatible?"default":"destructive",children:U.compatible?i({id:"cliHooks.wizards.platform.compatible"}):i({id:"cliHooks.wizards.platform.incompatible"})})]}),!U.compatible&&U.issues.length>0&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 p-3 bg-destructive/10 rounded-lg",children:[e.jsx(ye,{className:"w-4 h-4 text-destructive shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:i({id:"cliHooks.wizards.platform.compatibilityError"})}),e.jsx("ul",{className:"mt-1 space-y-1",children:U.issues.map((l,b)=>e.jsx("li",{className:"text-xs text-destructive/80",children:l},b))})]})]}),U.warnings.length>0&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 p-3 bg-yellow-500/10 rounded-lg",children:[e.jsx(ye,{className:"w-4 h-4 text-yellow-600 shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:i({id:"cliHooks.wizards.platform.compatibilityWarning"})}),e.jsx("ul",{className:"mt-1 space-y-1",children:U.warnings.map((l,b)=>e.jsx("li",{className:"text-xs text-yellow-600/80",children:l},b))})]})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:i({id:"cliHooks.wizards.steps.triggerEvent"})}),e.jsx(N,{variant:"secondary",children:i({id:`cliHooks.trigger.${I.trigger}`})})]})]})},A=()=>{switch(t){case"memory-update":return ie();case"danger-protection":return Q();case"skill-context":return oe();default:return null}},V=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center pb-4 border-b",children:[e.jsx(Y,{className:"w-12 h-12 text-green-500 mx-auto mb-3"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:i({id:"cliHooks.wizards.steps.review.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.description"})})]}),e.jsxs(T,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.hookType"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:i({id:K[t].title})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.trigger"})}),e.jsx(N,{variant:"secondary",className:"text-xs",children:i({id:`cliHooks.trigger.${I.trigger}`})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.platform"})}),e.jsx("span",{className:"text-sm text-foreground",children:q(C)})]}),ae()]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground mb-3",children:i({id:"cliHooks.wizards.steps.review.installTo"})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"wizardScope",value:"project",checked:h==="project",onChange:()=>P("project"),className:"accent-primary"}),e.jsx("span",{className:"text-sm text-foreground",children:i({id:"cliHooks.wizards.steps.review.scopeProject"})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"(.claude/settings.json)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"wizardScope",value:"global",checked:h==="global",onChange:()=>P("global"),className:"accent-primary"}),e.jsx("span",{className:"text-sm text-foreground",children:i({id:"cliHooks.wizards.steps.review.scopeGlobal"})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"(~/.claude/settings.json)"})]})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:i({id:"cliHooks.wizards.steps.review.commandPreview"})}),e.jsx("pre",{className:"text-xs font-mono bg-muted p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:re()})]})]}),ie=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.cliTool"})}),e.jsxs(ue,{value:c.tool,onValueChange:a=>E({...c,tool:a}),children:[e.jsx(ge,{className:"mt-1",children:e.jsx(pe,{})}),e.jsxs(he,{children:[e.jsx(W,{value:"gemini",children:"Gemini"}),e.jsx(W,{value:"qwen",children:"Qwen"}),e.jsx(W,{value:"codex",children:"Codex"}),e.jsx(W,{value:"opencode",children:"OpenCode"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.cliToolHelp"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.threshold"})}),e.jsx(L,{type:"number",value:c.threshold,onChange:a=>E({...c,threshold:Math.max(1,Math.min(20,parseInt(a.target.value)||1))}),min:1,max:20,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.thresholdHelp"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.timeout"})}),e.jsx(L,{type:"number",value:c.timeout,onChange:a=>E({...c,timeout:Math.max(60,Math.min(1800,parseInt(a.target.value)||60))}),min:60,max:1800,step:60,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.timeoutHelp"})})]})]}),Q=()=>{const a=l=>{ee(b=>({selectedOptions:b.selectedOptions.includes(l)?b.selectedOptions.filter(f=>f!==l):[...b.selectedOptions,l]}))};return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.dangerProtection.selectProtections"})}),Z.map(l=>e.jsxs("label",{className:S("flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors",v.selectedOptions.includes(l.id)?"border-primary bg-primary/5":"border-border hover:border-primary/50"),children:[e.jsx("input",{type:"checkbox",checked:v.selectedOptions.includes(l.id),onChange:()=>a(l.id),className:"mt-0.5 accent-primary"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:i({id:l.labelKey})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i({id:l.descKey})})]})]},l.id))]})},oe=()=>{const a=(k==null?void 0:k.skills)??[],l=()=>{F(f=>({...f,skillConfigs:[...f.skillConfigs,{skill:"",keywords:""}]}))},b=f=>{F(H=>({...H,skillConfigs:H.skillConfigs.filter((o,u)=>u!==f)}))},M=(f,H,o)=>{F(u=>{const m=[...u.skillConfigs];return m[f]={...m[f],[H]:o},{...u,skillConfigs:m}})};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.skillContext.mode"})}),e.jsxs("div",{className:"flex gap-3 mt-2",children:[e.jsxs("label",{className:S("flex-1 flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition-colors",y.mode==="keyword"?"border-primary bg-primary/5":"border-border"),children:[e.jsx("input",{type:"radio",name:"skillMode",value:"keyword",checked:y.mode==="keyword",onChange:()=>F(f=>({...f,mode:"keyword"})),className:"accent-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:i({id:"cliHooks.wizards.skillContext.modeKeyword"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.modeKeywordDesc"})})]})]}),e.jsxs("label",{className:S("flex-1 flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition-colors",y.mode==="auto"?"border-primary bg-primary/5":"border-border"),children:[e.jsx("input",{type:"radio",name:"skillMode",value:"auto",checked:y.mode==="auto",onChange:()=>F(f=>({...f,mode:"auto"})),className:"accent-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:i({id:"cliHooks.wizards.skillContext.modeAuto"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.modeAutoDesc"})})]})]})]})]}),y.mode==="keyword"&&e.jsx(e.Fragment,{children:D?e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.loadingSkills"})}):e.jsxs("div",{className:"space-y-3",children:[y.skillConfigs.map((f,H)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ue,{value:f.skill,onValueChange:o=>M(H,"skill",o),children:[e.jsx(ge,{className:"w-[160px]",children:e.jsx(pe,{placeholder:i({id:"cliHooks.wizards.skillContext.selectSkill"})})}),e.jsx(he,{children:a.map(o=>e.jsx(W,{value:o.name,children:o.name},o.name))})]}),e.jsx(L,{value:f.keywords,onChange:o=>M(H,"keywords",o.target.value),placeholder:i({id:"cliHooks.wizards.skillContext.keywordsPlaceholder"}),className:"flex-1"}),y.skillConfigs.length>1&&e.jsx(w,{variant:"ghost",size:"icon",onClick:()=>b(H),children:e.jsx(Ce,{className:"w-4 h-4"})})]},H)),e.jsxs(w,{variant:"outline",size:"sm",onClick:l,className:"w-full",children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),i({id:"cliHooks.wizards.skillContext.addPair"})]})]})}),y.mode==="auto"&&e.jsxs(T,{className:"p-4 bg-muted/30",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.autoDescription"})}),!D&&a.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:a.map(f=>e.jsx(N,{variant:"secondary",className:"text-xs",children:f.name},f.name))})]})]})},ae=()=>{switch(t){case"memory-update":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"CLI Tool"}),e.jsx(N,{variant:"secondary",children:c.tool})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Threshold"}),e.jsxs("span",{children:[c.threshold," paths"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Timeout"}),e.jsxs("span",{children:[c.timeout,"s"]})]})]});case"danger-protection":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[i({id:"cliHooks.wizards.dangerProtection.selectedProtections"}),":"]}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:v.selectedOptions.map(a=>{const l=Z.find(b=>b.id===a);return l?e.jsx(N,{variant:"secondary",className:"text-xs",children:i({id:l.labelKey})},a):null})})]});case"skill-context":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.mode"})}),e.jsx(N,{variant:"secondary",children:y.mode==="auto"?i({id:"cliHooks.wizards.skillContext.modeAuto"}):i({id:"cliHooks.wizards.skillContext.modeKeyword"})})]}),y.mode==="keyword"&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[i({id:"cliHooks.wizards.skillContext.keywordMappings"}),":"]}),e.jsx("div",{className:"mt-1 space-y-1",children:y.skillConfigs.filter(a=>a.skill&&a.keywords).map((a,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(N,{variant:"outline",children:a.keywords}),e.jsx("span",{className:"text-muted-foreground",children:"->"}),e.jsx(N,{variant:"secondary",children:a.skill})]},l))})]})]});default:return null}},re=()=>{switch(t){case"memory-update":return"ccw hook template exec memory-auto-compress --stdin";case"danger-protection":{const a=v.selectedOptions.map(l=>Z.find(b=>b.id===l)).filter(Boolean).map(l=>`ccw hook template exec ${Se[l.templateId]||l.templateId} --stdin`);return a.length>0?a.join(`
|
|
7
7
|
`):"# No protections selected"}case"skill-context":return"ccw hook keyword --stdin";default:return""}},ne=()=>e.jsxs(Ue,{className:"gap-2",children:[r>1&&e.jsxs(w,{variant:"outline",onClick:_,disabled:z,children:[e.jsx(Ve,{className:"w-4 h-4 mr-1"}),i({id:"cliHooks.wizards.navigation.previous"})]}),r<3?e.jsxs(w,{onClick:G,disabled:!U.compatible,children:[i({id:"cliHooks.wizards.navigation.next"}),e.jsx(Qe,{className:"w-4 h-4 ml-1"})]}):e.jsx(w,{onClick:te,disabled:z,children:i(z?{id:"cliHooks.wizards.navigation.creating"}:{id:"cliHooks.wizards.navigation.create"})})]}),le=()=>e.jsx("div",{className:"flex items-center justify-center gap-2 pb-4",children:[1,2,3].map(a=>e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:S("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium",r===a?"bg-primary text-primary-foreground":r>a?"bg-green-500 text-white":"bg-muted text-muted-foreground"),children:r>a?e.jsx(Y,{className:"w-4 h-4"}):a}),a<3&&e.jsx("div",{className:S("w-12 h-0.5 mx-1",r>a?"bg-green-500":"bg-muted")})]},a))});return e.jsx(Pe,{open:s,onOpenChange:R,children:e.jsxs(He,{className:"sm:max-w-[600px]",children:[e.jsx(Te,{children:e.jsx(ze,{className:"flex items-center gap-2",children:i({id:"cliHooks.wizards.title"})})}),e.jsx("div",{className:"w-full bg-muted h-1 rounded-full my-4",children:e.jsx("div",{className:"bg-primary h-1 rounded-full transition-all duration-300",style:{width:`${r/3*100}%`}})}),le(),e.jsxs("div",{className:"min-h-[300px]",children:[r===1&&se(),r===2&&A(),r===3&&V()]}),ne()]})})}function zt(t){return["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","Stop","Notification","SubagentStart","SubagentStop","PreCompact","SessionEnd","PostToolUseFailure","PermissionRequest"].includes(t)}function Ut(t){return zt(t.trigger)?{name:t.name,description:t.description,enabled:t.enabled,trigger:t.trigger,matcher:t.matcher,command:t.command||t.script,scope:t.scope,index:t.index}:null}function Dt(t){return{SessionStart:t.filter(s=>s.trigger==="SessionStart"),UserPromptSubmit:t.filter(s=>s.trigger==="UserPromptSubmit"),PreToolUse:t.filter(s=>s.trigger==="PreToolUse"),PostToolUse:t.filter(s=>s.trigger==="PostToolUse"),Stop:t.filter(s=>s.trigger==="Stop"),Notification:t.filter(s=>s.trigger==="Notification"),SubagentStart:t.filter(s=>s.trigger==="SubagentStart"),SubagentStop:t.filter(s=>s.trigger==="SubagentStop"),PreCompact:t.filter(s=>s.trigger==="PreCompact"),SessionEnd:t.filter(s=>s.trigger==="SessionEnd"),PostToolUseFailure:t.filter(s=>s.trigger==="PostToolUseFailure"),PermissionRequest:t.filter(s=>s.trigger==="PermissionRequest")}}function Et(t){return{SessionStart:{total:t.SessionStart.length,enabled:t.SessionStart.filter(s=>s.enabled).length},UserPromptSubmit:{total:t.UserPromptSubmit.length,enabled:t.UserPromptSubmit.filter(s=>s.enabled).length},PreToolUse:{total:t.PreToolUse.length,enabled:t.PreToolUse.filter(s=>s.enabled).length},PostToolUse:{total:t.PostToolUse.length,enabled:t.PostToolUse.filter(s=>s.enabled).length},Stop:{total:t.Stop.length,enabled:t.Stop.filter(s=>s.enabled).length},Notification:{total:t.Notification.length,enabled:t.Notification.filter(s=>s.enabled).length},SubagentStart:{total:t.SubagentStart.length,enabled:t.SubagentStart.filter(s=>s.enabled).length},SubagentStop:{total:t.SubagentStop.length,enabled:t.SubagentStop.filter(s=>s.enabled).length},PreCompact:{total:t.PreCompact.length,enabled:t.PreCompact.filter(s=>s.enabled).length},SessionEnd:{total:t.SessionEnd.length,enabled:t.SessionEnd.filter(s=>s.enabled).length},PostToolUseFailure:{total:t.PostToolUseFailure.length,enabled:t.PostToolUseFailure.filter(s=>s.enabled).length},PermissionRequest:{total:t.PermissionRequest.length,enabled:t.PermissionRequest.filter(s=>s.enabled).length}}}function Kt(){const{formatMessage:t}=$(),[s,j]=x.useState(""),[i,g]=x.useState("all"),[r,n]=x.useState(!1),[C,d]=x.useState("create"),[h,P]=x.useState(),[z,p]=x.useState(!1),[k,D]=x.useState("memory-update"),[c,E]=x.useState(new Set),[v,ee]=x.useState(!1),[y,F]=x.useState(!1),{hooks:I,enabledCount:U,totalCount:G,isLoading:_,refetch:R}=xt(),{toggleHook:te}=ut(),{deleteHook:se}=gt(),A=x.useMemo(()=>{let o=I.map(Ut).filter(u=>u!==null);if(i!=="all"&&(o=o.filter(u=>u.trigger===i)),s.trim()){const u=s.toLowerCase();o=o.filter(m=>m.name.toLowerCase().includes(u)||m.description&&m.description.toLowerCase().includes(u)||m.trigger.toLowerCase().includes(u)||m.command&&m.command.toLowerCase().includes(u))}return o},[I,s,i]),V=x.useMemo(()=>Dt(A),[A]),ie=x.useMemo(()=>Et(V),[V]),Q=()=>{d("create"),P(void 0),n(!0)},oe=o=>{d("edit"),P(o),n(!0)},ae=async o=>{const u=A.find(m=>m.name===o);if(!u){console.error("Hook not found:",o);return}try{await se({name:u.name,scope:u.scope,trigger:u.trigger,index:u.index})}catch(m){console.error("Failed to delete hook:",m)}},re=async o=>{console.log("Save hook:",o),await R()},ne=o=>{E(u=>{const m=new Set(u);return m.has(o)?m.delete(o):m.add(o),m})},le=[{type:"memory-update",icon:Fe,label:t({id:"cliHooks.wizards.memoryUpdate.title"}),description:t({id:"cliHooks.wizards.memoryUpdate.shortDescription"})},{type:"danger-protection",icon:X,label:t({id:"cliHooks.wizards.dangerProtection.title"}),description:t({id:"cliHooks.wizards.dangerProtection.shortDescription"})},{type:"skill-context",icon:Ae,label:t({id:"cliHooks.wizards.skillContext.title"}),description:t({id:"cliHooks.wizards.skillContext.shortDescription"})}],a=o=>{D(o),p(!0)},l=x.useMemo(()=>je.filter(o=>I.some(u=>u.templateId===o.id)).map(o=>o.id),[I]),[b,M]=x.useState(null),f=async o=>{if(je.find(m=>m.id===o)){M(o);try{const m=await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:o,scope:"project"})});if(!m.ok)throw new Error(`Failed to install template: ${m.statusText}`);const O=await m.json();if(!O.success)throw new Error(O.error||"Unknown error");await R()}catch(m){console.error("Failed to install template:",m)}finally{M(null)}}},H=[{type:"all",icon:J,label:t({id:"common.all"})},{type:"SessionStart",icon:Ye,label:t({id:"cliHooks.trigger.SessionStart"})},{type:"UserPromptSubmit",icon:B,label:t({id:"cliHooks.trigger.UserPromptSubmit"})},{type:"PreToolUse",icon:De,label:t({id:"cliHooks.trigger.PreToolUse"})},{type:"PostToolUse",icon:Y,label:t({id:"cliHooks.trigger.PostToolUse"})},{type:"Stop",icon:pt,label:t({id:"cliHooks.trigger.Stop"})}];return e.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-foreground flex items-center gap-2",children:[e.jsx(J,{className:"w-6 h-6 text-primary"}),t({id:"cliHooks.title"})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t({id:"cliHooks.description"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(w,{variant:"outline",size:"sm",onClick:()=>R(),disabled:_,children:[e.jsx(Be,{className:S("w-4 h-4 mr-1",_&&"animate-spin")}),t({id:"common.actions.refresh"})]}),e.jsxs(w,{variant:"outline",size:"sm",onClick:Q,children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.actions.add"})]}),e.jsxs(w,{size:"sm",onClick:()=>a("memory-update"),variant:"secondary",children:[e.jsx(ke,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.wizards.launch"})]})]})]}),e.jsx(T,{className:"p-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(Xe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(L,{placeholder:t({id:"cliHooks.filters.searchPlaceholder"}),value:s,onChange:o=>j(o.target.value),className:"pl-9"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"outline",className:"text-sm",children:t({id:"cliHooks.stats.total"},{count:G})}),e.jsx(N,{variant:"default",className:"text-sm",children:t({id:"cliHooks.stats.enabled"},{count:U})})]})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:H.map(({type:o,icon:u,label:m})=>{const O=i===o,we=o==="all"?{enabled:U,total:G}:ie[o];return e.jsxs(w,{variant:O?"default":"outline",size:"sm",onClick:()=>g(o),className:"gap-2",children:[e.jsx(u,{className:"w-4 h-4"}),m,e.jsxs(N,{variant:O?"secondary":"outline",className:"ml-1",children:[we.enabled,"/",we.total]})]},o)})})]})}),A.length>0&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:A.map(o=>e.jsx(wt,{hook:o,isExpanded:c.has(o.name),onToggleExpand:()=>ne(o.name),onToggle:te,onEdit:oe,onDelete:ae},o.name))}),e.jsxs(T,{className:"overflow-hidden",children:[e.jsxs("div",{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors flex items-center justify-between border-b border-border",onClick:()=>ee(!v),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-base font-semibold text-foreground",children:t({id:"cliHooks.quickTemplates.title"})})]}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:v?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]}),v&&e.jsx("div",{className:"p-6",children:e.jsx(St,{onInstallTemplate:f,installedTemplates:l,isLoading:!!b,installingTemplateId:b})})]}),e.jsxs(T,{className:"overflow-hidden",children:[e.jsxs("div",{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors flex items-center justify-between",onClick:()=>F(!y),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ke,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:t({id:"cliHooks.wizards.sectionTitle"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t({id:"cliHooks.wizards.sectionDescription"})})]})]}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:y?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]}),y&&e.jsx("div",{className:"border-t border-border p-6",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:le.map(({type:o,icon:u,label:m,description:O})=>e.jsx(T,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>a(o),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10 shrink-0",children:e.jsx(u,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:m}),e.jsx("p",{className:"text-xs text-muted-foreground",children:O})]})]})},o))})})]}),!_&&A.length===0&&e.jsxs(T,{className:"p-12 text-center",children:[e.jsx(J,{className:"w-16 h-16 mx-auto text-muted-foreground/30 mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t({id:"cliHooks.empty.title"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:t({id:"cliHooks.empty.description"})}),e.jsxs(w,{onClick:Q,children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.actions.addFirst"})]})]}),e.jsx(yt,{mode:C,hook:h,open:r,onClose:()=>n(!1),onSave:re}),e.jsx(Tt,{wizardType:k,open:z,onClose:()=>p(!1)})]})}export{Kt as HookManagerPage,Kt as default};
|
|
8
|
-
//# sourceMappingURL=HookManagerPage-
|
|
8
|
+
//# sourceMappingURL=HookManagerPage-CFBe8F_G.js.map
|