@hienlh/ppm 0.22.7 → 0.22.8
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/CHANGELOG.md +5 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{accounts-settings-section-D0_yfkaF.js → accounts-settings-section-Dk9qWWTy.js} +1 -1
- package/dist/web/assets/accounts-settings-section-Dk9qWWTy.js.br +0 -0
- package/dist/web/assets/accounts-settings-section-Dk9qWWTy.js.gz +0 -0
- package/dist/web/assets/{ai-resource-editor-C9v1LE44.js → ai-resource-editor-CtvWAxMW.js} +1 -1
- package/dist/web/assets/ai-resource-editor-CtvWAxMW.js.br +0 -0
- package/dist/web/assets/ai-resource-editor-CtvWAxMW.js.gz +0 -0
- package/dist/web/assets/{ai-settings-section-DsErcc2X.js → ai-settings-section-BxN-zFfm.js} +1 -1
- package/dist/web/assets/{ai-settings-section-DXdhCjIc.js → ai-settings-section-CfI9nNSa.js} +1 -1
- package/dist/web/assets/ai-settings-section-CfI9nNSa.js.br +0 -0
- package/dist/web/assets/ai-settings-section-CfI9nNSa.js.gz +0 -0
- package/dist/web/assets/{appearance-settings-section-D2aDjjkv.js → appearance-settings-section-DRWpbQqj.js} +1 -1
- package/dist/web/assets/appearance-settings-section-DRWpbQqj.js.br +0 -0
- package/dist/web/assets/appearance-settings-section-DRWpbQqj.js.gz +0 -0
- package/dist/web/assets/{branch-review-tab-CVj_KmG-.js → branch-review-tab-B3BMVCdK.js} +1 -1
- package/dist/web/assets/branch-review-tab-B3BMVCdK.js.br +0 -0
- package/dist/web/assets/branch-review-tab-B3BMVCdK.js.gz +0 -0
- package/dist/web/assets/{chat-tab-DiIM2Z8w.js → chat-tab-B0g-TzDa.js} +2 -2
- package/dist/web/assets/chat-tab-B0g-TzDa.js.br +0 -0
- package/dist/web/assets/chat-tab-B0g-TzDa.js.gz +0 -0
- package/dist/web/assets/{code-editor-7uhKbtxw.js → code-editor-DXra_Rnt.js} +3 -3
- package/dist/web/assets/code-editor-DXra_Rnt.js.br +0 -0
- package/dist/web/assets/code-editor-DXra_Rnt.js.gz +0 -0
- package/dist/web/assets/{codex-daily-guard-BwLzw3gJ.js → codex-daily-guard-DjLeZ_hE.js} +1 -1
- package/dist/web/assets/codex-daily-guard-DjLeZ_hE.js.br +0 -0
- package/dist/web/assets/codex-daily-guard-DjLeZ_hE.js.gz +0 -0
- package/dist/web/assets/{conflict-editor-Fa0i5rwa.js → conflict-editor-Dx8MnO6j.js} +1 -1
- package/dist/web/assets/conflict-editor-Dx8MnO6j.js.br +0 -0
- package/dist/web/assets/conflict-editor-Dx8MnO6j.js.gz +0 -0
- package/dist/web/assets/{csv-preview-Ba8cMI_C.js → csv-preview-U-Fy9KPT.js} +1 -1
- package/dist/web/assets/csv-preview-U-Fy9KPT.js.br +0 -0
- package/dist/web/assets/csv-preview-U-Fy9KPT.js.gz +0 -0
- package/dist/web/assets/{database-viewer-B7xBZwAY.js → database-viewer-v5S-zzB6.js} +1 -1
- package/dist/web/assets/database-viewer-v5S-zzB6.js.br +0 -0
- package/dist/web/assets/database-viewer-v5S-zzB6.js.gz +0 -0
- package/dist/web/assets/{diff-viewer-CBo-I2n7.js → diff-viewer-Bv2J64t8.js} +1 -1
- package/dist/web/assets/diff-viewer-Bv2J64t8.js.br +0 -0
- package/dist/web/assets/diff-viewer-Bv2J64t8.js.gz +0 -0
- package/dist/web/assets/{editor-language-service-DKluViya.js → editor-language-service-C1J6iorq.js} +1 -1
- package/dist/web/assets/editor-language-service-C1J6iorq.js.br +0 -0
- package/dist/web/assets/editor-language-service-C1J6iorq.js.gz +0 -0
- package/dist/web/assets/{explorer-body-RTRXIniK.js → explorer-body-BpTOY2kH.js} +1 -1
- package/dist/web/assets/explorer-body-BpTOY2kH.js.br +0 -0
- package/dist/web/assets/explorer-body-BpTOY2kH.js.gz +0 -0
- package/dist/web/assets/{explorer-window-content-BBk4J0pd.js → explorer-window-content-CZIwX6cE.js} +1 -1
- package/dist/web/assets/explorer-window-content-CZIwX6cE.js.br +0 -0
- package/dist/web/assets/explorer-window-content-CZIwX6cE.js.gz +0 -0
- package/dist/web/assets/{extension-manager-section-CGTiQ03R.js → extension-manager-section-DGSKz5iJ.js} +1 -1
- package/dist/web/assets/extension-manager-section-DGSKz5iJ.js.br +0 -0
- package/dist/web/assets/extension-manager-section-DGSKz5iJ.js.gz +0 -0
- package/dist/web/assets/{extension-webview-B0Gn1J0z.js → extension-webview-FuuXP0Aw.js} +1 -1
- package/dist/web/assets/extension-webview-FuuXP0Aw.js.br +0 -0
- package/dist/web/assets/extension-webview-FuuXP0Aw.js.gz +0 -0
- package/dist/web/assets/{files-settings-section-CvuSM0-8.js → files-settings-section-CGd2yfzl.js} +1 -1
- package/dist/web/assets/files-settings-section-CGd2yfzl.js.br +0 -0
- package/dist/web/assets/files-settings-section-CGd2yfzl.js.gz +0 -0
- package/dist/web/assets/{general-settings-section-CjlbiBLs.js → general-settings-section-CcG10nJq.js} +1 -1
- package/dist/web/assets/general-settings-section-CcG10nJq.js.br +0 -0
- package/dist/web/assets/general-settings-section-CcG10nJq.js.gz +0 -0
- package/dist/web/assets/{git-log-panel-DLEfShbT.js → git-log-panel-B-aSlSlu.js} +1 -1
- package/dist/web/assets/git-log-panel-B-aSlSlu.js.br +0 -0
- package/dist/web/assets/git-log-panel-B-aSlSlu.js.gz +0 -0
- package/dist/web/assets/{glide-data-grid-DvojIuqH.js → glide-data-grid-usB_4gTg.js} +1 -1
- package/dist/web/assets/glide-data-grid-usB_4gTg.js.br +0 -0
- package/dist/web/assets/glide-data-grid-usB_4gTg.js.gz +0 -0
- package/dist/web/assets/{group-chat-tab-DeTRoA9c.js → group-chat-tab-BAMi_dhb.js} +1 -1
- package/dist/web/assets/group-chat-tab-BAMi_dhb.js.br +0 -0
- package/dist/web/assets/group-chat-tab-BAMi_dhb.js.gz +0 -0
- package/dist/web/assets/{index-BnH1J2Pm.js → index-CoTvom0K.js} +4 -4
- package/dist/web/assets/index-CoTvom0K.js.br +0 -0
- package/dist/web/assets/index-CoTvom0K.js.gz +0 -0
- package/dist/web/assets/index-DLn9-Lrb.css +1 -0
- package/dist/web/assets/index-DLn9-Lrb.css.br +0 -0
- package/dist/web/assets/index-DLn9-Lrb.css.gz +0 -0
- package/dist/web/assets/{jira-watcher-section-achV6oEy.js → jira-watcher-section-cDMBzIR7.js} +1 -1
- package/dist/web/assets/jira-watcher-section-cDMBzIR7.js.br +3 -0
- package/dist/web/assets/jira-watcher-section-cDMBzIR7.js.gz +0 -0
- package/dist/web/assets/{keybindings-store-C6XvoJN3.js → keybindings-store-D7nwnInl.js} +1 -1
- package/dist/web/assets/{keyboard-shortcuts-section-UJUsOlks.js → keyboard-shortcuts-section-CIcdYToP.js} +1 -1
- package/dist/web/assets/keyboard-shortcuts-section-CIcdYToP.js.br +0 -0
- package/dist/web/assets/keyboard-shortcuts-section-CIcdYToP.js.gz +0 -0
- package/dist/web/assets/{markdown-renderer-D04mW6Ct.js → markdown-renderer-BzX5WysW.js} +1 -1
- package/dist/web/assets/{markdown-renderer-DFV8qf0b.js → markdown-renderer-KTNg80_A.js} +1 -1
- package/dist/web/assets/markdown-renderer-KTNg80_A.js.br +0 -0
- package/dist/web/assets/markdown-renderer-KTNg80_A.js.gz +0 -0
- package/dist/web/assets/{mobile-explorer-sheet-tb0C8TkU.js → mobile-explorer-sheet-cnwXe-Uz.js} +1 -1
- package/dist/web/assets/mobile-explorer-sheet-cnwXe-Uz.js.br +0 -0
- package/dist/web/assets/mobile-explorer-sheet-cnwXe-Uz.js.gz +0 -0
- package/dist/web/assets/{notification-store-Dp-4MQ7j.js → notification-store-Bayjh6Js.js} +1 -1
- package/dist/web/assets/{ppmbot-settings-section-CcuxvSTb.js → ppmbot-settings-section-CDp69sHV.js} +1 -1
- package/dist/web/assets/ppmbot-settings-section-CDp69sHV.js.br +0 -0
- package/dist/web/assets/ppmbot-settings-section-CDp69sHV.js.gz +0 -0
- package/dist/web/assets/{problems-panel-DYnneKde.js → problems-panel-BiE3c-31.js} +1 -1
- package/dist/web/assets/problems-panel-BiE3c-31.js.br +0 -0
- package/dist/web/assets/problems-panel-BiE3c-31.js.gz +0 -0
- package/dist/web/assets/{process-table-CPL5WqCw.js → process-table-DcEq9HCl.js} +1 -1
- package/dist/web/assets/process-table-DcEq9HCl.js.br +0 -0
- package/dist/web/assets/process-table-DcEq9HCl.js.gz +0 -0
- package/dist/web/assets/{proxy-settings-section-DECsg44g.js → proxy-settings-section-P_ULFRpZ.js} +1 -1
- package/dist/web/assets/proxy-settings-section-P_ULFRpZ.js.br +0 -0
- package/dist/web/assets/proxy-settings-section-P_ULFRpZ.js.gz +0 -0
- package/dist/web/assets/{remote-desktop-clipboard-notice-DsaoVJd9.js → remote-desktop-clipboard-notice-COjdmADR.js} +1 -1
- package/dist/web/assets/remote-desktop-clipboard-notice-COjdmADR.js.br +0 -0
- package/dist/web/assets/remote-desktop-clipboard-notice-COjdmADR.js.gz +0 -0
- package/dist/web/assets/{remote-desktop-mobile-sheet-D8Elyy-R.js → remote-desktop-mobile-sheet-lCU5l2w4.js} +2 -2
- package/dist/web/assets/remote-desktop-mobile-sheet-lCU5l2w4.js.br +0 -0
- package/dist/web/assets/remote-desktop-mobile-sheet-lCU5l2w4.js.gz +0 -0
- package/dist/web/assets/{remote-desktop-mobile-view-DsWsVesK.js → remote-desktop-mobile-view-Bo-wgZPC.js} +1 -1
- package/dist/web/assets/remote-desktop-mobile-view-Bo-wgZPC.js.br +0 -0
- package/dist/web/assets/remote-desktop-mobile-view-Bo-wgZPC.js.gz +0 -0
- package/dist/web/assets/{remote-desktop-readiness-gate-D3JXnNKi.js → remote-desktop-readiness-gate-Cqz8kqWG.js} +1 -1
- package/dist/web/assets/remote-desktop-readiness-gate-Cqz8kqWG.js.br +0 -0
- package/dist/web/assets/remote-desktop-readiness-gate-Cqz8kqWG.js.gz +0 -0
- package/dist/web/assets/{remote-desktop-window-content-6kwgSTNH.js → remote-desktop-window-content-R-aRW07B.js} +1 -1
- package/dist/web/assets/remote-desktop-window-content-R-aRW07B.js.br +0 -0
- package/dist/web/assets/remote-desktop-window-content-R-aRW07B.js.gz +0 -0
- package/dist/web/assets/{schedules-settings-section-BTl_vB-5.js → schedules-settings-section-DHs84DvG.js} +1 -1
- package/dist/web/assets/schedules-settings-section-DHs84DvG.js.br +0 -0
- package/dist/web/assets/schedules-settings-section-DHs84DvG.js.gz +0 -0
- package/dist/web/assets/{settings-body-BLOJ0NCv.js → settings-body-CLt6iutX.js} +2 -2
- package/dist/web/assets/settings-body-CLt6iutX.js.br +0 -0
- package/dist/web/assets/settings-body-CLt6iutX.js.gz +0 -0
- package/dist/web/assets/{settings-tab-CS8dGl16.js → settings-tab-DjOxh-vW.js} +1 -1
- package/dist/web/assets/{settings-window-content-Bq5gTCpo.js → settings-window-content-BxzSerga.js} +1 -1
- package/dist/web/assets/{sql-query-editor-BgLCJabc.js → sql-query-editor-4Okd-7ss.js} +1 -1
- package/dist/web/assets/sql-query-editor-4Okd-7ss.js.br +0 -0
- package/dist/web/assets/sql-query-editor-4Okd-7ss.js.gz +0 -0
- package/dist/web/assets/{sqlite-viewer-CQIQcFjS.js → sqlite-viewer-BqDUckIJ.js} +1 -1
- package/dist/web/assets/sqlite-viewer-BqDUckIJ.js.br +0 -0
- package/dist/web/assets/sqlite-viewer-BqDUckIJ.js.gz +0 -0
- package/dist/web/assets/{system-monitor-body-p0hOErnb.js → system-monitor-body-Ssmt-r5H.js} +2 -2
- package/dist/web/assets/system-monitor-body-Ssmt-r5H.js.br +0 -0
- package/dist/web/assets/system-monitor-body-Ssmt-r5H.js.gz +0 -0
- package/dist/web/assets/{system-monitor-tab-CBBTTyzP.js → system-monitor-tab-DNe62hWL.js} +1 -1
- package/dist/web/assets/{system-monitor-window-content-3LFpj97e.js → system-monitor-window-content-C6vnW_pQ.js} +1 -1
- package/dist/web/assets/{tab-host-window-content-DVdOHg7r.js → tab-host-window-content--BVyPR1f.js} +1 -1
- package/dist/web/assets/tab-host-window-content--BVyPR1f.js.br +0 -0
- package/dist/web/assets/tab-host-window-content--BVyPR1f.js.gz +0 -0
- package/dist/web/assets/{team-member-sheet-BBuKfjts.js → team-member-sheet-CE2eHuFX.js} +2 -2
- package/dist/web/assets/team-member-sheet-CE2eHuFX.js.br +0 -0
- package/dist/web/assets/team-member-sheet-CE2eHuFX.js.gz +0 -0
- package/dist/web/assets/{team-member-window-content-3Zys-VyF.js → team-member-window-content-B1sg0R4H.js} +1 -1
- package/dist/web/assets/team-member-window-content-B1sg0R4H.js.br +0 -0
- package/dist/web/assets/team-member-window-content-B1sg0R4H.js.gz +0 -0
- package/dist/web/assets/{terminal-tab-Dy-qrTQW.js → terminal-tab-BrdS4bAy.js} +1 -1
- package/dist/web/assets/terminal-tab-BrdS4bAy.js.br +0 -0
- package/dist/web/assets/{terminal-tab-Dy-qrTQW.js.gz → terminal-tab-BrdS4bAy.js.gz} +0 -0
- package/dist/web/assets/{tool-cards-DP78zyGK.js → tool-cards-DzYJVhjl.js} +2 -2
- package/dist/web/assets/tool-cards-DzYJVhjl.js.br +0 -0
- package/dist/web/assets/tool-cards-DzYJVhjl.js.gz +0 -0
- package/dist/web/assets/{use-inline-blame-BFblg3CO.js → use-inline-blame-CKu-Sd-l.js} +1 -1
- package/dist/web/assets/use-inline-blame-CKu-Sd-l.js.br +0 -0
- package/dist/web/assets/use-inline-blame-CKu-Sd-l.js.gz +0 -0
- package/dist/web/assets/{use-lsp-BKTJSEL2.js → use-lsp-BaG0NUXY.js} +1 -1
- package/dist/web/assets/use-lsp-BaG0NUXY.js.br +0 -0
- package/dist/web/assets/use-lsp-BaG0NUXY.js.gz +0 -0
- package/dist/web/assets/{use-monaco-theme-DFaNmksV.js → use-monaco-theme-DvWcXiCH.js} +1 -1
- package/dist/web/assets/{use-websocket-CUFk4qWs.js → use-websocket-Dj0e6N6t.js} +1 -1
- package/dist/web/assets/{video-preview-DCxuJvbT.js → video-preview-ZyRR49Lr.js} +1 -1
- package/dist/web/assets/video-preview-ZyRR49Lr.js.br +0 -0
- package/dist/web/assets/video-preview-ZyRR49Lr.js.gz +0 -0
- package/dist/web/index.html +2 -2
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/dist/web/sw.js +1 -1
- package/dist/web/sw.js.br +0 -0
- package/dist/web/sw.js.gz +0 -0
- package/package.json +1 -1
- package/dist/web/assets/accounts-settings-section-D0_yfkaF.js.br +0 -0
- package/dist/web/assets/accounts-settings-section-D0_yfkaF.js.gz +0 -0
- package/dist/web/assets/ai-resource-editor-C9v1LE44.js.br +0 -0
- package/dist/web/assets/ai-resource-editor-C9v1LE44.js.gz +0 -0
- package/dist/web/assets/ai-settings-section-DXdhCjIc.js.br +0 -0
- package/dist/web/assets/ai-settings-section-DXdhCjIc.js.gz +0 -0
- package/dist/web/assets/appearance-settings-section-D2aDjjkv.js.br +0 -0
- package/dist/web/assets/appearance-settings-section-D2aDjjkv.js.gz +0 -0
- package/dist/web/assets/branch-review-tab-CVj_KmG-.js.br +0 -0
- package/dist/web/assets/branch-review-tab-CVj_KmG-.js.gz +0 -0
- package/dist/web/assets/chat-tab-DiIM2Z8w.js.br +0 -0
- package/dist/web/assets/chat-tab-DiIM2Z8w.js.gz +0 -0
- package/dist/web/assets/code-editor-7uhKbtxw.js.br +0 -0
- package/dist/web/assets/code-editor-7uhKbtxw.js.gz +0 -0
- package/dist/web/assets/codex-daily-guard-BwLzw3gJ.js.br +0 -0
- package/dist/web/assets/codex-daily-guard-BwLzw3gJ.js.gz +0 -0
- package/dist/web/assets/conflict-editor-Fa0i5rwa.js.br +0 -0
- package/dist/web/assets/conflict-editor-Fa0i5rwa.js.gz +0 -0
- package/dist/web/assets/csv-preview-Ba8cMI_C.js.br +0 -0
- package/dist/web/assets/csv-preview-Ba8cMI_C.js.gz +0 -0
- package/dist/web/assets/database-viewer-B7xBZwAY.js.br +0 -0
- package/dist/web/assets/database-viewer-B7xBZwAY.js.gz +0 -0
- package/dist/web/assets/diff-viewer-CBo-I2n7.js.br +0 -0
- package/dist/web/assets/diff-viewer-CBo-I2n7.js.gz +0 -0
- package/dist/web/assets/editor-language-service-DKluViya.js.br +0 -0
- package/dist/web/assets/editor-language-service-DKluViya.js.gz +0 -0
- package/dist/web/assets/explorer-body-RTRXIniK.js.br +0 -0
- package/dist/web/assets/explorer-body-RTRXIniK.js.gz +0 -0
- package/dist/web/assets/explorer-window-content-BBk4J0pd.js.br +0 -0
- package/dist/web/assets/explorer-window-content-BBk4J0pd.js.gz +0 -0
- package/dist/web/assets/extension-manager-section-CGTiQ03R.js.br +0 -0
- package/dist/web/assets/extension-manager-section-CGTiQ03R.js.gz +0 -0
- package/dist/web/assets/extension-webview-B0Gn1J0z.js.br +0 -0
- package/dist/web/assets/extension-webview-B0Gn1J0z.js.gz +0 -0
- package/dist/web/assets/files-settings-section-CvuSM0-8.js.br +0 -0
- package/dist/web/assets/files-settings-section-CvuSM0-8.js.gz +0 -0
- package/dist/web/assets/general-settings-section-CjlbiBLs.js.br +0 -0
- package/dist/web/assets/general-settings-section-CjlbiBLs.js.gz +0 -0
- package/dist/web/assets/git-log-panel-DLEfShbT.js.br +0 -0
- package/dist/web/assets/git-log-panel-DLEfShbT.js.gz +0 -0
- package/dist/web/assets/glide-data-grid-DvojIuqH.js.br +0 -0
- package/dist/web/assets/glide-data-grid-DvojIuqH.js.gz +0 -0
- package/dist/web/assets/group-chat-tab-DeTRoA9c.js.br +0 -0
- package/dist/web/assets/group-chat-tab-DeTRoA9c.js.gz +0 -0
- package/dist/web/assets/index-BnH1J2Pm.js.br +0 -0
- package/dist/web/assets/index-BnH1J2Pm.js.gz +0 -0
- package/dist/web/assets/index-C3lfHthr.css +0 -1
- package/dist/web/assets/index-C3lfHthr.css.br +0 -0
- package/dist/web/assets/index-C3lfHthr.css.gz +0 -0
- package/dist/web/assets/jira-watcher-section-achV6oEy.js.br +0 -3
- package/dist/web/assets/jira-watcher-section-achV6oEy.js.gz +0 -0
- package/dist/web/assets/keyboard-shortcuts-section-UJUsOlks.js.br +0 -0
- package/dist/web/assets/keyboard-shortcuts-section-UJUsOlks.js.gz +0 -0
- package/dist/web/assets/markdown-renderer-DFV8qf0b.js.br +0 -0
- package/dist/web/assets/markdown-renderer-DFV8qf0b.js.gz +0 -0
- package/dist/web/assets/mobile-explorer-sheet-tb0C8TkU.js.br +0 -0
- package/dist/web/assets/mobile-explorer-sheet-tb0C8TkU.js.gz +0 -0
- package/dist/web/assets/ppmbot-settings-section-CcuxvSTb.js.br +0 -0
- package/dist/web/assets/ppmbot-settings-section-CcuxvSTb.js.gz +0 -0
- package/dist/web/assets/problems-panel-DYnneKde.js.br +0 -0
- package/dist/web/assets/problems-panel-DYnneKde.js.gz +0 -0
- package/dist/web/assets/process-table-CPL5WqCw.js.br +0 -0
- package/dist/web/assets/process-table-CPL5WqCw.js.gz +0 -0
- package/dist/web/assets/proxy-settings-section-DECsg44g.js.br +0 -0
- package/dist/web/assets/proxy-settings-section-DECsg44g.js.gz +0 -0
- package/dist/web/assets/remote-desktop-clipboard-notice-DsaoVJd9.js.br +0 -0
- package/dist/web/assets/remote-desktop-clipboard-notice-DsaoVJd9.js.gz +0 -0
- package/dist/web/assets/remote-desktop-mobile-sheet-D8Elyy-R.js.br +0 -0
- package/dist/web/assets/remote-desktop-mobile-sheet-D8Elyy-R.js.gz +0 -0
- package/dist/web/assets/remote-desktop-mobile-view-DsWsVesK.js.br +0 -0
- package/dist/web/assets/remote-desktop-mobile-view-DsWsVesK.js.gz +0 -0
- package/dist/web/assets/remote-desktop-readiness-gate-D3JXnNKi.js.br +0 -0
- package/dist/web/assets/remote-desktop-readiness-gate-D3JXnNKi.js.gz +0 -0
- package/dist/web/assets/remote-desktop-window-content-6kwgSTNH.js.br +0 -0
- package/dist/web/assets/remote-desktop-window-content-6kwgSTNH.js.gz +0 -0
- package/dist/web/assets/schedules-settings-section-BTl_vB-5.js.br +0 -0
- package/dist/web/assets/schedules-settings-section-BTl_vB-5.js.gz +0 -0
- package/dist/web/assets/settings-body-BLOJ0NCv.js.br +0 -0
- package/dist/web/assets/settings-body-BLOJ0NCv.js.gz +0 -0
- package/dist/web/assets/sql-query-editor-BgLCJabc.js.br +0 -0
- package/dist/web/assets/sql-query-editor-BgLCJabc.js.gz +0 -0
- package/dist/web/assets/sqlite-viewer-CQIQcFjS.js.br +0 -0
- package/dist/web/assets/sqlite-viewer-CQIQcFjS.js.gz +0 -0
- package/dist/web/assets/system-monitor-body-p0hOErnb.js.br +0 -0
- package/dist/web/assets/system-monitor-body-p0hOErnb.js.gz +0 -0
- package/dist/web/assets/tab-host-window-content-DVdOHg7r.js.br +0 -0
- package/dist/web/assets/tab-host-window-content-DVdOHg7r.js.gz +0 -0
- package/dist/web/assets/team-member-sheet-BBuKfjts.js.br +0 -0
- package/dist/web/assets/team-member-sheet-BBuKfjts.js.gz +0 -0
- package/dist/web/assets/team-member-window-content-3Zys-VyF.js.br +0 -0
- package/dist/web/assets/team-member-window-content-3Zys-VyF.js.gz +0 -0
- package/dist/web/assets/terminal-tab-Dy-qrTQW.js.br +0 -0
- package/dist/web/assets/tool-cards-DP78zyGK.js.br +0 -0
- package/dist/web/assets/tool-cards-DP78zyGK.js.gz +0 -0
- package/dist/web/assets/use-inline-blame-BFblg3CO.js.br +0 -0
- package/dist/web/assets/use-inline-blame-BFblg3CO.js.gz +0 -0
- package/dist/web/assets/use-lsp-BKTJSEL2.js.br +0 -0
- package/dist/web/assets/use-lsp-BKTJSEL2.js.gz +0 -0
- package/dist/web/assets/video-preview-DCxuJvbT.js.br +0 -0
- package/dist/web/assets/video-preview-DCxuJvbT.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Xt as r,_r as i,lt as a,ut as o,w as s}from"./icons-DQjqk0lJ.js";import{a as c,n as l}from"./api-client-Jn3njtNw.js";import{t as u}from"./settings-store-tWrnlyEW.js";import"./vendor-mermaid-D6lgjvVE.js";import"./portal-container-context-BarKmT4S.js";import"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./use-is-mobile-TkcwP1Gx.js";import"./onboarding-quick-orientation-Dqmis-E5.js";import{t as d}from"./button-B9CTrsEf.js";import"./dialog-B84_DJQ8.js";import{t as f}from"./input-QNG_gTHh.js";import{Ht as p,Z as m,at as h,c as g}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Xt as r,_r as i,lt as a,ut as o,w as s}from"./icons-DQjqk0lJ.js";import{a as c,n as l}from"./api-client-Jn3njtNw.js";import{t as u}from"./settings-store-tWrnlyEW.js";import"./vendor-mermaid-D6lgjvVE.js";import"./portal-container-context-BarKmT4S.js";import"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./use-is-mobile-TkcwP1Gx.js";import"./onboarding-quick-orientation-Dqmis-E5.js";import{t as d}from"./button-B9CTrsEf.js";import"./dialog-B84_DJQ8.js";import{t as f}from"./input-QNG_gTHh.js";import{Ht as p,Z as m,at as h,c as g}from"./index-CoTvom0K.js";import{t as _}from"./onboarding-entry-C81awoR5.js";import{t as v}from"./separator-DwDoQpxS.js";var y=e(t(),1),b=n();function x(){let[e,t]=(0,y.useState)(!1),[n,i]=(0,y.useState)(``),[u,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(!1),[g,_]=(0,y.useState)(!1),[v,x]=(0,y.useState)(!1),[S,C]=(0,y.useState)(null),w=u.length>0&&n!==u,T=n.trim().length>=4&&n===u&&!g,E=(0,y.useCallback)(async()=>{if(T){_(!0),C(null);try{let{token:e}=await l.put(`/api/settings/auth/password`,{password:n.trim(),confirm:u.trim()});c(e),x(!0),i(``),p(``),setTimeout(()=>{x(!1),t(!1)},1500)}catch(e){C(e instanceof Error?e.message:`Failed to change password`)}finally{_(!1)}}},[T,n,u]);return e?(0,b.jsxs)(`section`,{className:`space-y-2`,children:[(0,b.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:`Change Password`}),(0,b.jsxs)(`div`,{className:`space-y-2`,children:[(0,b.jsxs)(`div`,{className:`relative`,children:[(0,b.jsx)(f,{type:m?`text`:`password`,placeholder:`New password`,value:n,onChange:e=>i(e.target.value),className:`h-8 text-xs pr-8`,autoFocus:!0}),(0,b.jsx)(`button`,{type:`button`,className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer`,onClick:()=>h(!m),tabIndex:-1,children:m?(0,b.jsx)(o,{className:`size-3.5`}):(0,b.jsx)(a,{className:`size-3.5`})})]}),(0,b.jsx)(f,{type:m?`text`:`password`,placeholder:`Confirm password`,value:u,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&E()},className:`h-8 text-xs`}),w&&(0,b.jsx)(`p`,{className:`text-[11px] text-destructive`,children:`Passwords do not match`}),S&&(0,b.jsx)(`p`,{className:`text-[11px] text-destructive`,children:S}),(0,b.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,b.jsx)(d,{variant:`outline`,size:`sm`,className:`h-8 text-xs flex-1 cursor-pointer`,onClick:()=>{t(!1),i(``),p(``),C(null)},children:`Cancel`}),(0,b.jsx)(d,{variant:v?`default`:`outline`,size:`sm`,className:`h-8 text-xs flex-1 cursor-pointer`,disabled:!T,onClick:E,children:g?`...`:v?(0,b.jsx)(s,{className:`size-3.5`}):`Save`})]}),(0,b.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Min 4 characters. You'll stay logged in on this device.`})]})]}):(0,b.jsxs)(`section`,{className:`space-y-2`,children:[(0,b.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:`Security`}),(0,b.jsxs)(d,{variant:`outline`,size:`sm`,className:`h-8 text-xs gap-1.5 cursor-pointer`,onClick:()=>t(!0),children:[(0,b.jsx)(r,{className:`size-3.5`}),`Change Password`]})]})}function S(){let{deviceName:e,setDeviceName:t,version:n,keepScreenAwake:r,setKeepScreenAwake:a}=u(p(e=>({deviceName:e.deviceName,setDeviceName:e.setDeviceName,version:e.version,keepScreenAwake:e.keepScreenAwake,setKeepScreenAwake:e.setKeepScreenAwake}))),[o]=(0,y.useState)(g),[c,l]=(0,y.useState)(e??``),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),E=(0,y.useRef)(void 0),D=c.trim()!==(e??``),O=(0,y.useCallback)(async()=>{if(D){C(!0);try{await t(c),T(!0),clearTimeout(E.current),E.current=setTimeout(()=>T(!1),2e3)}finally{C(!1)}}},[c,D,t]);return(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsxs)(`section`,{className:`space-y-2`,children:[(0,b.jsx)(`h3`,{className:`text-sm font-medium`,children:`Learn PPM`}),(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose your experience and a task. Guidance is saved in this browser.`}),(0,b.jsx)(_,{compact:!0})]}),(0,b.jsx)(v,{}),(0,b.jsxs)(`section`,{className:`space-y-2`,children:[(0,b.jsx)(h,{htmlFor:`device-name`,children:`Device Name`}),(0,b.jsxs)(`div`,{className:`flex gap-2`,children:[(0,b.jsx)(f,{id:`device-name`,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&O()},placeholder:`My Device`,className:`flex-1`,maxLength:100}),(0,b.jsx)(d,{variant:w?`default`:`outline`,className:`cursor-pointer shrink-0`,disabled:!D||S,onClick:O,children:S?`...`:w?(0,b.jsx)(s,{className:`size-4`}):`Save`})]}),(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shown in page title and synced to PPM Cloud.`})]}),(0,b.jsx)(v,{}),(0,b.jsxs)(`section`,{className:`flex items-center justify-between gap-4`,children:[(0,b.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,b.jsx)(i,{className:`size-4 text-muted-foreground shrink-0`}),(0,b.jsxs)(`div`,{className:`min-w-0`,children:[(0,b.jsx)(`p`,{className:`text-sm font-medium`,children:`Keep Screen Awake`}),(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o===`insecure`?`Unavailable over plain HTTP — reach PPM through its HTTPS tunnel address to use this.`:o===`unsupported`?`This browser does not support screen wake locks.`:`Stop this device dimming while a chat turn is running.`})]})]}),(0,b.jsx)(m,{checked:r&&o===`ok`,disabled:o!==`ok`,onCheckedChange:a})]}),(0,b.jsx)(v,{}),(0,b.jsx)(x,{}),(0,b.jsx)(v,{}),(0,b.jsxs)(`section`,{className:`space-y-1`,children:[(0,b.jsx)(`h3`,{className:`text-sm font-medium`,children:`About`}),(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`PPM — Personal Project Manager`}),(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A mobile-first web IDE for managing your projects.`}),n&&(0,b.jsxs)(`p`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Version `,n]})]})]})}export{S as GeneralSettingsSection};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Qn as r,X as i,Y as a,a as o,d as s,ln as c,yr as l}from"./icons-DQjqk0lJ.js";import{n as u}from"./api-client-Jn3njtNw.js";import{n as d}from"./utils-Bmf_8h7Y.js";import{i as f}from"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./git-repo-store-BCEPfUGT.js";import"./scroll-area-C0fQWNnx.js";import{At as p,Ht as m,jn as h}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Qn as r,X as i,Y as a,a as o,d as s,ln as c,yr as l}from"./icons-DQjqk0lJ.js";import{n as u}from"./api-client-Jn3njtNw.js";import{n as d}from"./utils-Bmf_8h7Y.js";import{i as f}from"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./git-repo-store-BCEPfUGT.js";import"./scroll-area-C0fQWNnx.js";import{At as p,Ht as m,jn as h}from"./index-CoTvom0K.js";var g=e(t(),1),_=n(),v=[`#2563eb`,`#16a34a`,`#d97706`,`#9333ea`,`#dc2626`,`#0891b2`,`#c026d3`,`#ea580c`];function y(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return v[Math.abs(t)%v.length]}function b({name:e,syncState:t,isHead:n,isTag:r,className:c}){let u=r?`#d97706`:y(e),f=r?l:t===`synced`?a:t===`ahead`?s:t===`behind`?o:t===`remote-only`?a:i,p=r?`Tag: ${e}`:t===`synced`?`${e} — synced with remote`:t===`ahead`?`${e} — ahead of remote`:t===`behind`?`${e} — behind remote`:t===`remote-only`?`${e} — remote only`:`${e} — local only`;return(0,_.jsxs)(`span`,{className:d(`inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium leading-tight max-w-[220px]`,n&&`ring-1 ring-offset-1 ring-offset-background`,t===`remote-only`&&`opacity-70`,c),style:{borderColor:u,backgroundColor:u+`1A`,color:`var(--text)`,...n?{"--tw-ring-color":u}:{}},title:p,children:[(0,_.jsx)(f,{className:`size-3 shrink-0`,style:{color:u}}),(0,_.jsx)(`span`,{className:`truncate`,children:e})]})}function x(e,t,n,r){let i=[],a=e===r;for(let e of t)e.startsWith(`tag: `)&&i.push({name:e.slice(5),syncState:`synced`,isTag:!0});let o=n.filter(t=>t.commitHash===e),s=o.filter(e=>!e.remote),c=o.filter(e=>e.remote);new Set(s.map(e=>e.name));let l=new Set;for(let e of s){let t=`local-only`;e.remotes.length>0&&(t=e.ahead>0&&e.behind===0?`ahead`:e.behind>0&&e.ahead===0?`behind`:`synced`),i.push({name:e.name,syncState:t,isHead:a&&e.current});for(let t of c){let n=t.name.replace(/^remotes\//,``),r=n.indexOf(`/`);r<0||n.slice(r+1)===e.name&&l.add(t.name)}}for(let e of c){if(l.has(e.name))continue;let t=e.name.replace(/^remotes\//,``);i.push({name:t,syncState:`remote-only`})}return i}var S=100;function C({metadata:e}){let t=e?.projectName??f(m(e=>e.activeProject))?.name,{gitUrl:n}=p(t),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(!1),[l,d]=(0,g.useState)(!0),v=(0,g.useRef)(null),y=(0,g.useCallback)(async(e=0,r=!1)=>{if(t){s(!0);try{let t=await u.get(n(`/graph?max=${S}&skip=${e}`));a(e=>r&&e?{...t,commits:[...e.commits,...t.commits]}:t),d(t.commits.length===S)}catch{}s(!1)}},[t]);(0,g.useEffect)(()=>{y()},[y]);let b=(0,g.useCallback)(()=>{o||!l||!i||y(i.commits.length,!0)},[o,l,i,y]),x=(0,g.useCallback)(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<200&&b()},[b]);return t?(0,_.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-border shrink-0`,children:[(0,_.jsx)(h,{className:`size-4 text-text-secondary`}),(0,_.jsx)(`span`,{className:`text-xs font-medium text-text-primary`,children:`Git Log`}),(0,_.jsx)(`span`,{className:`text-[10px] text-text-subtle`,children:i?`${i.commits.length} commits`:``}),(0,_.jsx)(`div`,{className:`flex-1`}),(0,_.jsx)(`button`,{onClick:()=>y(),disabled:o,className:`p-1 rounded text-text-subtle hover:text-text-secondary transition-colors`,title:`Refresh`,children:(0,_.jsx)(r,{className:`size-3.5 ${o?`animate-spin`:``}`})})]}),!i&&o?(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,_.jsx)(c,{className:`size-5 animate-spin text-primary`})}):i&&i.commits.length===0?(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full text-text-secondary text-sm`,children:`No commits yet`}):i?(0,_.jsxs)(`div`,{ref:v,className:`flex-1 overflow-y-auto min-h-0`,onScroll:x,children:[i.commits.map(e=>(0,_.jsx)(w,{commit:e,branches:i.branches,head:i.head},e.hash)),o&&(0,_.jsx)(`div`,{className:`flex items-center justify-center py-3`,children:(0,_.jsx)(c,{className:`size-4 animate-spin text-text-subtle`})}),!l&&i.commits.length>0&&(0,_.jsx)(`div`,{className:`text-center text-[10px] text-text-subtle py-3`,children:`End of history`})]}):null]}):(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full text-text-secondary text-sm`,children:`Select a project to view git log`})}function w({commit:e,branches:t,head:n}){let r=e.hash===n,i=x(e.hash,e.refs,t,n);return(0,_.jsxs)(`div`,{className:`flex items-start gap-2 px-3 py-1.5 border-b border-border/50 hover:bg-surface-elevated transition-colors ${r?`bg-primary/5`:``}`,children:[(0,_.jsx)(`div`,{className:`flex items-center pt-1 shrink-0`,children:(0,_.jsx)(`span`,{className:`size-2.5 rounded-full border-2 ${r?`border-primary bg-primary`:`border-text-subtle bg-transparent`}`})}),(0,_.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[i.length>0&&(0,_.jsx)(`div`,{className:`flex flex-wrap items-center gap-1 mb-0.5`,children:i.map(e=>(0,_.jsx)(b,{...e},`${e.name}-${e.syncState}`))}),(0,_.jsx)(`p`,{className:`text-xs text-text-primary truncate leading-snug`,children:e.subject}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2 mt-0.5`,children:[(0,_.jsx)(`span`,{className:`text-[10px] font-mono text-text-subtle`,children:e.abbreviatedHash}),(0,_.jsx)(`span`,{className:`text-[10px] text-text-subtle truncate`,children:e.authorName}),(0,_.jsx)(`span`,{className:`text-[10px] text-text-subtle shrink-0`,children:T(e.authorDate)})]})]})]})}function T(e){let t=new Date(e),n=Date.now()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`now`;if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24)return`${i}h`;let a=Math.floor(i/24);return a<30?`${a}d`:t.toLocaleDateString(`en`,{month:`short`,day:`numeric`})}export{C as GitLogPanel};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-BD9eJweQ.js","assets/rolldown-runtime-FhOqtrmT.js","assets/dist-BD2gbdy0.js","assets/vendor-markdown-CuWCHIVb.js","assets/vendor-ui-DmZ-Mb-H.js","assets/data-grid-types-C6UX8kgh.js","assets/number-overlay-editor-Bsr04yCI.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,t}from"./rolldown-runtime-FhOqtrmT.js";import{C as n,S as r}from"./vendor-markdown-CuWCHIVb.js";import{pt as i}from"./vendor-ui-DmZ-Mb-H.js";import{$ as a,A as o,Br as s,Dr as c,It as l,Un as u,Wn as d,a as f,bt as p,ct as m,d as h,ir as g,j as _,ln as v,lt as y,pr as b,qn as x,st as S,tr as C,wr as w,zr as T}from"./icons-DQjqk0lJ.js";import{M as E,q as D}from"./vendor-mermaid-D6lgjvVE.js";import{t as O}from"./tab-store-krAuHQ6_.js";import{Ht as k,an as A,rn as ee,u as te}from"./index-
|
|
2
|
+
import{o as e,t}from"./rolldown-runtime-FhOqtrmT.js";import{C as n,S as r}from"./vendor-markdown-CuWCHIVb.js";import{pt as i}from"./vendor-ui-DmZ-Mb-H.js";import{$ as a,A as o,Br as s,Dr as c,It as l,Un as u,Wn as d,a as f,bt as p,ct as m,d as h,ir as g,j as _,ln as v,lt as y,pr as b,qn as x,st as S,tr as C,wr as w,zr as T}from"./icons-DQjqk0lJ.js";import{M as E,q as D}from"./vendor-mermaid-D6lgjvVE.js";import{t as O}from"./tab-store-krAuHQ6_.js";import{Ht as k,an as A,rn as ee,u as te}from"./index-CoTvom0K.js";import{A as j,B as ne,C as M,D as re,E as N,F as ie,G as P,H as ae,I as F,L as oe,M as se,N as ce,O as I,P as L,R,S as le,T as ue,U as de,V as fe,W as pe,_ as me,a as he,b as ge,c as z,d as _e,f as ve,g as ye,h as B,i as be,j as V,k as H,l as U,m as xe,n as W,o as G,p as Se,r as Ce,s as we,t as K,u as Te,v as Ee,w as De,x as Oe,y as ke,z as Ae}from"./data-grid-types-C6UX8kgh.js";import{t as je}from"./dist-BD2gbdy0.js";import{t as Me}from"./use-monaco-theme-DvWcXiCH.js";import{n as Ne}from"./csv-parser-DZ_75eCb.js";var Pe=/[A-Za-z0-9_]/,Fe=/^\$([A-Za-z_][A-Za-z0-9_]*)?\$/;function Ie(e){let t=[],n=1,r=-1,i=1,a=0,o=(n,a)=>{if(r===-1)return;let o=e.slice(r,n).trim();o&&t.push({sql:o,startLine:i,endLine:a}),r=-1};for(;a<e.length;){let t=e[a];if(t===`
|
|
3
3
|
`){n++,a++;continue}if(t===` `||t===` `||t===`\r`){a++;continue}if(t===`-`&&e[a+1]===`-`){for(;a<e.length&&e[a]!==`
|
|
4
4
|
`;)a++;continue}if(t===`/`&&e[a+1]===`*`){let t=1;for(a+=2;a<e.length&&t>0;){if(e[a]===`/`&&e[a+1]===`*`){t++,a+=2;continue}if(e[a]===`*`&&e[a+1]===`/`){t--,a+=2;continue}e[a]===`
|
|
5
5
|
`&&n++,a++}continue}if(r===-1&&(r=a,i=n),t===`;`){o(a+1,n),a++;continue}if(t===`'`||t===`"`){let r=e[a-1],i=e[a-2],o=t===`'`&&(r===`e`||r===`E`)&&!(i!==void 0&&Pe.test(i));for(a++;a<e.length;){let r=e[a];if(r===`
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Bn as r,Gn as i,Nr as a,ar as o,b as s,j as c,jr as l,ln as u,mr as d,rr as f,sr as p,wr as m}from"./icons-DQjqk0lJ.js";import"./api-client-Jn3njtNw.js";import"./settings-store-tWrnlyEW.js";import"./vendor-mermaid-D6lgjvVE.js";import{n as h}from"./utils-Bmf_8h7Y.js";import"./portal-container-context-BarKmT4S.js";import"./panel-store-D20Zuf3i.js";import"./window-store-UC1jJeLM.js";import{i as g}from"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./tab-store-krAuHQ6_.js";import"./context-menu-C6pIsf83.js";import"./file-store-Ds3qJ4hC.js";import{n as _}from"./use-is-mobile-TkcwP1Gx.js";import"./git-repo-store-BCEPfUGT.js";import{t as v}from"./button-B9CTrsEf.js";import{a as y,n as b,o as x,t as S}from"./dialog-B84_DJQ8.js";import{t as C}from"./mobile-bottom-sheet-C3TniEP-.js";import"./use-visual-viewport-Lp878uzs.js";import"./fs-api-orca76dV.js";import"./ws-auth-CaxV807E.js";import{A as w,Bt as T,F as E,Ht as D,I as O,L as k,M as A,Mt as j,N as M,Nt as N,P as ee,R as te,j as P,jt as F,k as I,z as ne}from"./index-BnH1J2Pm.js";import{t as L}from"./use-websocket-CUFk4qWs.js";import{n as R}from"./tool-cards-DP78zyGK.js";import"./use-blob-url-C0VR6Uhh.js";import{t as z}from"./markdown-renderer-DFV8qf0b.js";import"./run-in-terminal-BFR70TLU.js";var B=e(t(),1),V=8e3;function re(e,t){let[n,r]=(0,B.useState)([]),[i,a]=(0,B.useState)([]),[o,s]=(0,B.useState)(`idle`),[c,l]=(0,B.useState)({}),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1),[m,h]=(0,B.useState)(!1),[g,_]=(0,B.useState)(null),v=(0,B.useRef)(new Map),y=(0,B.useCallback)(e=>{l(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),b=(0,B.useCallback)(e=>{let t;try{t=JSON.parse(e.data)}catch{return}switch(t.type){case`ping`:return;case`group_state`:p(!0),s(t.status),a(t.members),h(t.status===`active`);return;case`group_message`:y(t.message.fromMember),r(e=>e.some(e=>e.id===t.message.id)?e:[...e,t.message]);return;case`member_status`:a(e=>e.map(e=>e.id===t.memberId?{...e,status:t.status}:e));return;case`typing`:{l(e=>({...e,[t.member]:!0}));let e=v.current,n=e.get(t.member);n&&clearTimeout(n),e.set(t.member,setTimeout(()=>y(t.member),V));return}case`turn_done`:return;case`group_done`:h(!1),s(`idle`),l({});return;case`error`:_(t.message),h(!1);return}},[y]),{send:x}=L({url:e&&t?`/ws/project/${encodeURIComponent(t)}/group/${encodeURIComponent(e)}`:``,onMessage:b,autoConnect:!!e&&!!t});return(0,B.useEffect)(()=>{let t=!1;r([]),a([]),l({}),s(`idle`),h(!1),_(null),p(!1);for(let e of v.current.values())clearTimeout(e);if(v.current.clear(),e)return d(!0),P(e,{limit:200}).then(e=>{t||r(t=>{let n=new Set(e.messages.map(e=>e.id)),r=t.filter(e=>!n.has(e.id));return[...e.messages,...r]})}).catch(e=>{t||_(e instanceof Error?e.message:`Failed to load feed`)}).finally(()=>{t||d(!1)}),()=>{t=!0}},[e]),{messages:n,members:i,status:o,typing:c,loading:u,isConnected:f,isRunning:m,error:g,sendMessage:(0,B.useCallback)(t=>{let n=t.trim();!n||!e||(_(null),h(!0),f?x(JSON.stringify({type:`message`,content:n})):O(e,n).catch(e=>{_(e instanceof Error?e.message:`Failed to send message`),h(!1)}))},[e,f,x]),stop:(0,B.useCallback)(()=>{e&&(f?x(JSON.stringify({type:`stop`})):k(e).catch(()=>{}),s(`paused`),h(!1))},[e,f,x]),resume:(0,B.useCallback)(()=>{e&&E(e).then(()=>{s(`active`),h(!0)}).catch(e=>_(e instanceof Error?e.message:`Failed to resume`))},[e])}}var H=n();function U(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function W(e){try{let t=e<0xe8d4a51000?e*1e3:e;return new Date(t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{return``}}function G(e,t){return e.split(/(@[\p{L}\p{N}_]+)/gu).map((e,n)=>{if(e.startsWith(`@`)&&e.length>1){let r=t(e.slice(1));return(0,H.jsx)(`span`,{className:h(`font-semibold`,!r&&`text-primary`),style:r?{color:r}:void 0,children:e},n)}return e})}var ie=(0,B.memo)(function({message:e,colorFor:t,isLeader:n,onViewFull:r}){let i=e.fromMember===`user`,a=i?`You`:e.fromMember,o=i?`var(--color-primary)`:t(e.fromMember)??`var(--accent)`,s=!i&&n(e.fromMember),c=e.summary??``,l=e.toMember&&e.toMember!==`all`?e.toMember:null,u=(0,H.jsxs)(`div`,{className:h(`group relative flex gap-2.5 px-3 py-2 transition-colors hover:bg-surface-elevated/50`,i&&`bg-primary/5`),style:{boxShadow:`inset 3px 0 0 0 ${o}`},children:[e.fullSessionRef&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>r(e),title:`View full transcript (AI's raw thinking / debug)`,"aria-label":`View full transcript`,className:`absolute right-1.5 top-1.5 hidden items-center rounded p-1 text-text-subtle/60 hover:bg-surface-elevated hover:text-text-secondary can-hover:group-hover:inline-flex`,children:(0,H.jsx)(f,{className:`size-3.5`})}),(0,H.jsx)(`div`,{className:`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold text-white ring-2 ring-background`,style:{backgroundColor:o},"aria-hidden":!0,children:U(a)}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 can-hover:pr-6`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-0.5`,children:[(0,H.jsx)(`span`,{className:`text-sm font-semibold`,style:{color:i?`var(--color-foreground)`:o},children:a}),s&&(0,H.jsx)(`span`,{className:`rounded bg-surface-elevated px-1.5 py-px text-[10px] font-medium text-text-secondary`,children:`leader`}),l&&(0,H.jsxs)(`span`,{className:`text-[11px] text-text-subtle`,children:[`→ `,l]}),(0,H.jsx)(`span`,{className:`text-[11px] text-text-subtle`,children:W(e.createdAt)})]}),(0,H.jsx)(`div`,{className:`mt-0.5 whitespace-pre-wrap break-words text-sm leading-relaxed text-text-secondary`,children:G(c,t)})]})]});return e.fullSessionRef?(0,H.jsxs)(F,{children:[(0,H.jsx)(T,{asChild:!0,children:u}),(0,H.jsx)(j,{children:(0,H.jsxs)(N,{onClick:()=>r(e),children:[(0,H.jsx)(f,{className:`size-4`}),` View full transcript`]})})]}):u}),K={idle:`bg-text-subtle`,working:`bg-primary animate-pulse`,done:`bg-emerald-500`,error:`bg-destructive`},q={idle:`Idle`,working:`Working`,done:`Done`,error:`Error`},J=(0,B.memo)(function({members:e,liveStatus:t,typing:n,busy:i,onAdd:a,onEdit:o,onRemove:s}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5 p-2`,children:[e.map(e=>{let a=n[e.name],c=t.get(e.id)??e.status;return(0,H.jsxs)(`div`,{className:`group flex items-center gap-2 rounded-md px-2 py-1.5`,children:[(0,H.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white ring-2 ring-background`,style:{backgroundColor:e.color??`var(--accent)`},"aria-hidden":!0,children:e.name.slice(0,1).toUpperCase()}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`truncate text-xs font-medium`,style:{color:e.color??`var(--color-foreground)`},children:e.name}),e.role===`leader`&&(0,H.jsx)(`span`,{className:`rounded-sm bg-accent-wash px-1 text-[9px] font-semibold uppercase text-primary`,children:`lead`})]}),(0,H.jsx)(`span`,{className:`block truncate text-[10px] text-text-subtle`,children:a?`typing…`:e.persona||q[c]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 can-hover:opacity-0 can-hover:group-hover:opacity-100`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>o(e),disabled:i,"aria-label":`Edit ${e.name}`,className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-foreground active:bg-surface-elevated disabled:opacity-40`,children:(0,H.jsx)(r,{className:`size-3.5`})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>s(e),disabled:i,"aria-label":`Remove ${e.name}`,className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-destructive active:bg-surface-elevated disabled:opacity-40`,children:(0,H.jsx)(m,{className:`size-3.5`})})]}),(0,H.jsx)(`span`,{className:h(`size-2 shrink-0 rounded-full`,K[c]),title:q[c],"aria-hidden":!0})]},e.id)}),(0,H.jsxs)(`button`,{type:`button`,onClick:a,disabled:i,className:`mt-1 flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-primary hover:bg-surface-elevated active:bg-surface-elevated disabled:opacity-40`,children:[(0,H.jsx)(l,{className:`size-4`}),` Add member`]})]})}),Y=`w-full min-h-[40px] rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-text-subtle focus:outline-none focus:ring-1 focus:ring-primary`;function ae({open:e,member:t,projectName:n,providerId:r=`claude`,onSubmit:i,onClose:a}){let o=_(),[s,c]=(0,B.useState)(t?.name??``),[l,d]=(0,B.useState)(t?.persona??``),[f,p]=(0,B.useState)(t?.model??null),[m,h]=(0,B.useState)(t?.role===`leader`),[g,w]=(0,B.useState)(!1),[T,E]=(0,B.useState)(null),D=(0,B.useCallback)(async()=>{let e=s.trim();if(!e){E(`Name is required`);return}w(!0),E(null);try{await i({name:e,persona:l.trim()||null,model:f,role:m?`leader`:`member`}),a()}catch(e){E(e instanceof Error?e.message:`Failed to save member`),w(!1)}},[s,l,f,m,i,a]),O=t?.role===`leader`,k=(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 px-1 py-1`,children:[(0,H.jsx)(`input`,{className:Y,value:s,onChange:e=>c(e.target.value),placeholder:`Member name`,autoFocus:!0}),(0,H.jsx)(`input`,{className:Y,value:l,onChange:e=>d(e.target.value),placeholder:`Persona (optional)`}),(0,H.jsx)(I,{value:f,onChange:p,projectName:n,providerId:r}),(0,H.jsxs)(`label`,{className:X(O),children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--color-primary)]`,checked:m,disabled:O,onChange:e=>h(e.target.checked)}),(0,H.jsx)(`span`,{children:O?`Leader (reassign from another member)`:`Set as leader`})]}),T&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:T}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,H.jsx)(v,{variant:`outline`,onClick:a,disabled:g,children:`Cancel`}),(0,H.jsxs)(v,{onClick:D,disabled:g,children:[g&&(0,H.jsx)(u,{className:`mr-1.5 size-4 animate-spin`}),t?`Save`:`Add member`]})]})]});if(!e)return null;let A=t?`Edit member`:`Add member`;return o?(0,H.jsx)(C,{open:!0,onClose:a,className:`flex max-h-[90vh] flex-col`,children:(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-col px-4 pb-2`,children:[(0,H.jsx)(`h2`,{className:`mb-2 text-base font-semibold text-foreground`,children:A}),k]})}):(0,H.jsx)(S,{open:!0,onOpenChange:e=>{e||a()},children:(0,H.jsxs)(b,{className:`flex flex-col sm:max-w-md`,children:[(0,H.jsx)(y,{children:(0,H.jsx)(x,{children:A})}),k]})})}function X(e){return`flex items-center gap-2 text-sm text-text-secondary ${e?`opacity-60`:``}`}function Z({messages:e,config:t,projectName:n}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t&&(0,H.jsx)(ce,{config:t}),e.map(e=>(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wide text-text-subtle`,children:e.role===`user`?`User`:e.role===`assistant`?`Assistant`:e.role}),(0,H.jsx)(oe,{message:e,projectName:n})]},e.id)),e.length===0&&(0,H.jsx)(`p`,{className:`py-6 text-center text-sm text-text-subtle`,children:`Transcript is empty.`})]})}function oe({message:e,projectName:t}){let n=e.events??[];if(n.length===0)return e.content.trim()?(0,H.jsx)(z,{content:e.content}):null;let r=new Map;for(let e of n)e.type===`tool_result`&&e.toolUseId&&r.set(e.toolUseId,e);return(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map((e,n)=>{if(e.type===`text`)return e.content.trim()?(0,H.jsx)(z,{content:e.content},n):null;if(e.type===`thinking`)return(0,H.jsx)(se,{content:e.content},n);if(e.type===`tool_use`){let i=e.toolUseId?r.get(e.toolUseId):void 0;return(0,H.jsx)(R,{tool:e,result:i,completed:!!i,projectName:t},n)}return null})})}function se({content:e}){let[t,n]=(0,B.useState)(!1);return(0,H.jsxs)(`div`,{className:`rounded-md border border-border bg-surface-elevated/40`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs text-text-subtle hover:text-text-secondary`,children:[(0,H.jsx)(c,{className:h(`size-3.5 transition-transform`,t&&`rotate-90`)}),(0,H.jsx)(s,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:`Thinking`})]}),t&&(0,H.jsx)(`div`,{className:`border-t border-border px-3 py-2 text-xs leading-relaxed text-text-secondary`,children:(0,H.jsx)(z,{content:e})})]})}function ce({config:e}){let[t,n]=(0,B.useState)(!1),r=[[`Model`,e.model],[`Permission`,e.permissionMode],[`CWD`,e.cwd],[`Git branch`,e.gitBranch],[`CLI version`,e.version]].filter(([,e])=>e);return r.length===0?null:(0,H.jsxs)(`div`,{className:`rounded-md border border-border bg-surface-elevated/40`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-text-secondary hover:text-foreground`,children:[(0,H.jsx)(c,{className:h(`size-3.5 transition-transform`,t&&`rotate-90`)}),(0,H.jsx)(p,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:`Input config`})]}),t&&(0,H.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-t border-border px-3 py-2 text-xs`,children:r.map(([e,t])=>(0,H.jsxs)(`div`,{className:`contents`,children:[(0,H.jsx)(`dt`,{className:`text-text-subtle`,children:e}),(0,H.jsx)(`dd`,{className:`break-all font-mono text-text-secondary`,children:t})]},e))})]})}function le({groupId:e,message:t,onClose:n}){let r=_(),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(!1),[c,l]=(0,B.useState)(null),d=t?.fullSessionRef??null;if((0,B.useEffect)(()=>{if(!t||!d)return;let n=!1;return a(null),l(null),s(!0),M(e,d).then(e=>{n||a(e)}).catch(e=>{n||l(e instanceof Error?e.message:`Failed to load transcript`)}).finally(()=>{n||s(!1)}),()=>{n=!0}},[e,d,t]),!t)return null;let f=(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[o&&(0,H.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,H.jsx)(u,{className:`size-5 animate-spin text-primary`})}),c&&(0,H.jsxs)(`div`,{className:`px-1 py-4 text-sm text-text-secondary`,children:[(0,H.jsx)(`p`,{className:`mb-2 font-medium text-foreground`,children:`Full transcript unavailable`}),(0,H.jsx)(`p`,{className:`text-xs text-text-subtle`,children:c}),t.summary&&(0,H.jsx)(`pre`,{className:`mt-4 whitespace-pre-wrap break-words rounded-md bg-surface-elevated p-3 text-xs leading-relaxed text-text-secondary`,children:t.summary})]}),!o&&!c&&i!=null&&(0,H.jsx)(`div`,{className:`px-1 py-1`,children:(0,H.jsx)(Z,{messages:i.messages,config:i.config})})]}),p=`${t.fromMember} — full transcript`;return r?(0,H.jsx)(C,{open:!0,onClose:n,className:`max-h-[85vh] flex flex-col`,children:(0,H.jsxs)(`div`,{className:`flex flex-col min-h-0 px-4 pb-2`,children:[(0,H.jsx)(`h2`,{className:`mb-2 text-sm font-semibold text-foreground`,children:p}),f]})}):(0,H.jsx)(S,{open:!0,onOpenChange:e=>{e||n()},children:(0,H.jsxs)(b,{className:`flex max-h-[80vh] flex-col sm:max-w-2xl`,children:[(0,H.jsx)(y,{children:(0,H.jsx)(x,{className:`text-sm`,children:p})}),f]})})}function Q({metadata:e}){let t=e?.groupId??null,{activeProject:n}=g(D(e=>({activeProject:e.activeProject}))),r=e?.projectName??n?.name??``,s=_(),{messages:c,members:l,status:f,typing:p,loading:m,isRunning:y,error:b,sendMessage:x,stop:S,resume:T}=re(t,r),[E,O]=(0,B.useState)(``),[k,j]=(0,B.useState)(null),[M,N]=(0,B.useState)(!1),P=(0,B.useRef)(null),[F,I]=(0,B.useState)([]),[L,R]=(0,B.useState)(null),[z,V]=(0,B.useState)(!1),[U,W]=(0,B.useState)(null),[G,K]=(0,B.useState)(null),q=(0,B.useCallback)(async()=>{if(t)try{let e=await A(t);I(e.members),R(e.maxTurns)}catch{}},[t]),Y=(0,B.useCallback)(async e=>{if(!t)return;let n=Math.max(1,Math.min(50,Math.floor(e)||1));R(n);try{await ne(t,{maxTurns:n})}catch{q()}},[t,q]);(0,B.useEffect)(()=>{I([]),q()},[t,q]),(0,B.useEffect)(()=>{P.current?.scrollIntoView({block:`end`})},[c.length,p]);let X=(0,B.useMemo)(()=>new Map(l.map(e=>[e.id,e.status])),[l]),Z=F.length?F:l,oe=(0,B.useMemo)(()=>{let e=new Map(Z.map(e=>[e.name,e.color]));return t=>e.get(t)??null},[Z]),se=(0,B.useMemo)(()=>{let e=new Set(Z.filter(e=>e.role===`leader`).map(e=>e.name));return t=>e.has(t)},[Z]),ce=(0,B.useCallback)(async e=>{t&&(G?.member?await te(t,G.member.id,e):await w(t,e),await q())},[t,G,q]),Q=(0,B.useCallback)(async e=>{if(t){V(!0),W(null);try{await ee(t,e.id),await q()}catch(e){W(e instanceof Error?e.message:`Failed to remove member`)}finally{V(!1)}}},[t,q]),ue=(0,B.useCallback)(()=>{let e=E.trim();e&&(x(e),O(``))},[E,x]),$=Object.keys(p).filter(e=>p[e]);return t?(0,H.jsxs)(`div`,{className:`flex h-full min-h-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,H.jsx)(`span`,{className:h(`size-2 rounded-full`,f===`active`?`bg-primary animate-pulse`:f===`paused`?`bg-amber-500`:`bg-text-subtle`)}),(0,H.jsx)(`span`,{className:`capitalize`,children:f})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[y?(0,H.jsxs)(v,{size:`sm`,variant:`outline`,onClick:S,className:`h-8`,children:[(0,H.jsx)(d,{className:`mr-1 size-3.5`}),` Stop`]}):f===`paused`?(0,H.jsxs)(v,{size:`sm`,variant:`outline`,onClick:T,className:`h-8`,children:[(0,H.jsx)(i,{className:`mr-1 size-3.5`}),` Resume`]}):null,(0,H.jsx)(`button`,{type:`button`,onClick:()=>N(e=>!e),className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-foreground`,"aria-label":`Toggle roster`,children:(0,H.jsx)(a,{className:`size-4`})})]})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:m?(0,H.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,H.jsx)(u,{className:`size-5 animate-spin text-primary`})}):c.length===0?(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center p-4 text-center text-sm text-text-subtle`,children:`Send a message to start the group.`}):(0,H.jsxs)(`div`,{className:`flex flex-col py-2`,children:[c.map(e=>(0,H.jsx)(ie,{message:e,colorFor:oe,isLeader:se,onViewFull:j},e.id)),$.length>0&&(0,H.jsxs)(`div`,{className:`px-3 py-1.5 text-xs italic text-text-subtle`,children:[$.join(`, `),` `,$.length===1?`is`:`are`,` typing…`]}),(0,H.jsx)(`div`,{ref:P})]})}),b&&(0,H.jsx)(`div`,{className:`shrink-0 border-t border-border bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:b}),(0,H.jsx)(`div`,{className:`shrink-0 border-t border-border p-2`,children:(0,H.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,H.jsx)(`textarea`,{value:E,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!s&&(e.preventDefault(),ue())},rows:1,placeholder:`Message the group…`,className:`max-h-32 min-h-[44px] flex-1 resize-none rounded-md border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-text-subtle focus:outline-none focus:ring-1 focus:ring-primary`}),(0,H.jsx)(v,{onClick:ue,disabled:!E.trim(),className:`size-11 shrink-0 p-0`,"aria-label":`Send`,children:(0,H.jsx)(o,{className:`size-4`})})]})})]}),s?(0,H.jsxs)(C,{open:M,onClose:()=>N(!1),className:`flex max-h-[72vh] flex-col`,children:[(0,H.jsx)(`div`,{className:`flex h-11 shrink-0 items-center px-4 text-sm font-medium text-foreground`,children:`Members`}),(0,H.jsxs)(`div`,{className:`min-h-0 overflow-y-auto`,children:[L!==null&&(0,H.jsxs)(`label`,{className:`flex items-center gap-2 px-4 py-2 text-xs text-text-secondary`,children:[(0,H.jsx)(`span`,{children:`Reply cap`}),(0,H.jsx)(`input`,{type:`number`,min:1,max:50,value:L,onChange:e=>Y(Number(e.target.value)),className:`w-14 rounded border border-border bg-background px-1.5 py-1 text-xs text-foreground`}),(0,H.jsx)(`span`,{className:`text-text-subtle`,children:`turns/msg`})]}),U&&(0,H.jsx)(`p`,{className:`px-3 py-1 text-xs text-destructive`,children:U}),(0,H.jsx)(J,{members:F,liveStatus:X,typing:p,busy:z,onAdd:()=>K({member:null}),onEdit:e=>K({member:e}),onRemove:Q})]})]}):M&&(0,H.jsxs)(`div`,{className:`flex w-60 shrink-0 flex-col border-l border-border bg-panel`,children:[(0,H.jsx)(`div`,{className:`flex h-11 shrink-0 items-center border-b border-border px-3 text-sm font-medium text-foreground`,children:`Members`}),(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[L!==null&&(0,H.jsxs)(`label`,{className:`flex items-center gap-2 px-3 py-2 text-xs text-text-secondary`,children:[(0,H.jsx)(`span`,{children:`Reply cap`}),(0,H.jsx)(`input`,{type:`number`,min:1,max:50,value:L,onChange:e=>Y(Number(e.target.value)),className:`w-14 rounded border border-border bg-background px-1.5 py-1 text-xs text-foreground`}),(0,H.jsx)(`span`,{className:`text-text-subtle`,children:`turns/msg`})]}),U&&(0,H.jsx)(`p`,{className:`px-3 py-1 text-xs text-destructive`,children:U}),(0,H.jsx)(J,{members:F,liveStatus:X,typing:p,busy:z,onAdd:()=>K({member:null}),onEdit:e=>K({member:e}),onRemove:Q})]})]}),G&&(0,H.jsx)(ae,{open:!0,member:G.member,projectName:r,onSubmit:ce,onClose:()=>K(null)},G.member?.id??`add`),(0,H.jsx)(le,{groupId:t,message:k,onClose:()=>j(null)})]}):(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center p-4 text-sm text-text-subtle`,children:`No group selected.`})}export{Q as GroupChatTab};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{C as t,S as n}from"./vendor-markdown-CuWCHIVb.js";import"./vendor-ui-DmZ-Mb-H.js";import{Bn as r,Gn as i,Nr as a,ar as o,b as s,j as c,jr as l,ln as u,mr as d,rr as f,sr as p,wr as m}from"./icons-DQjqk0lJ.js";import"./api-client-Jn3njtNw.js";import"./settings-store-tWrnlyEW.js";import"./vendor-mermaid-D6lgjvVE.js";import{n as h}from"./utils-Bmf_8h7Y.js";import"./portal-container-context-BarKmT4S.js";import"./panel-store-D20Zuf3i.js";import"./window-store-UC1jJeLM.js";import{i as g}from"./project-store-hNvwfqX3.js";import"./project-framework-store-ViZgce6y.js";import"./tab-store-krAuHQ6_.js";import"./context-menu-C6pIsf83.js";import"./file-store-Ds3qJ4hC.js";import{n as _}from"./use-is-mobile-TkcwP1Gx.js";import"./git-repo-store-BCEPfUGT.js";import{t as v}from"./button-B9CTrsEf.js";import{a as y,n as b,o as x,t as S}from"./dialog-B84_DJQ8.js";import{t as C}from"./mobile-bottom-sheet-C3TniEP-.js";import"./use-visual-viewport-Lp878uzs.js";import"./fs-api-orca76dV.js";import"./ws-auth-CaxV807E.js";import{A as w,Bt as T,F as E,Ht as D,I as O,L as k,M as A,Mt as j,N as M,Nt as N,P as ee,R as te,j as P,jt as F,k as I,z as ne}from"./index-CoTvom0K.js";import{t as L}from"./use-websocket-Dj0e6N6t.js";import{n as R}from"./tool-cards-DzYJVhjl.js";import"./use-blob-url-C0VR6Uhh.js";import{t as z}from"./markdown-renderer-KTNg80_A.js";import"./run-in-terminal-BFR70TLU.js";var B=e(t(),1),V=8e3;function re(e,t){let[n,r]=(0,B.useState)([]),[i,a]=(0,B.useState)([]),[o,s]=(0,B.useState)(`idle`),[c,l]=(0,B.useState)({}),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1),[m,h]=(0,B.useState)(!1),[g,_]=(0,B.useState)(null),v=(0,B.useRef)(new Map),y=(0,B.useCallback)(e=>{l(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),b=(0,B.useCallback)(e=>{let t;try{t=JSON.parse(e.data)}catch{return}switch(t.type){case`ping`:return;case`group_state`:p(!0),s(t.status),a(t.members),h(t.status===`active`);return;case`group_message`:y(t.message.fromMember),r(e=>e.some(e=>e.id===t.message.id)?e:[...e,t.message]);return;case`member_status`:a(e=>e.map(e=>e.id===t.memberId?{...e,status:t.status}:e));return;case`typing`:{l(e=>({...e,[t.member]:!0}));let e=v.current,n=e.get(t.member);n&&clearTimeout(n),e.set(t.member,setTimeout(()=>y(t.member),V));return}case`turn_done`:return;case`group_done`:h(!1),s(`idle`),l({});return;case`error`:_(t.message),h(!1);return}},[y]),{send:x}=L({url:e&&t?`/ws/project/${encodeURIComponent(t)}/group/${encodeURIComponent(e)}`:``,onMessage:b,autoConnect:!!e&&!!t});return(0,B.useEffect)(()=>{let t=!1;r([]),a([]),l({}),s(`idle`),h(!1),_(null),p(!1);for(let e of v.current.values())clearTimeout(e);if(v.current.clear(),e)return d(!0),P(e,{limit:200}).then(e=>{t||r(t=>{let n=new Set(e.messages.map(e=>e.id)),r=t.filter(e=>!n.has(e.id));return[...e.messages,...r]})}).catch(e=>{t||_(e instanceof Error?e.message:`Failed to load feed`)}).finally(()=>{t||d(!1)}),()=>{t=!0}},[e]),{messages:n,members:i,status:o,typing:c,loading:u,isConnected:f,isRunning:m,error:g,sendMessage:(0,B.useCallback)(t=>{let n=t.trim();!n||!e||(_(null),h(!0),f?x(JSON.stringify({type:`message`,content:n})):O(e,n).catch(e=>{_(e instanceof Error?e.message:`Failed to send message`),h(!1)}))},[e,f,x]),stop:(0,B.useCallback)(()=>{e&&(f?x(JSON.stringify({type:`stop`})):k(e).catch(()=>{}),s(`paused`),h(!1))},[e,f,x]),resume:(0,B.useCallback)(()=>{e&&E(e).then(()=>{s(`active`),h(!0)}).catch(e=>_(e instanceof Error?e.message:`Failed to resume`))},[e])}}var H=n();function U(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function W(e){try{let t=e<0xe8d4a51000?e*1e3:e;return new Date(t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{return``}}function G(e,t){return e.split(/(@[\p{L}\p{N}_]+)/gu).map((e,n)=>{if(e.startsWith(`@`)&&e.length>1){let r=t(e.slice(1));return(0,H.jsx)(`span`,{className:h(`font-semibold`,!r&&`text-primary`),style:r?{color:r}:void 0,children:e},n)}return e})}var ie=(0,B.memo)(function({message:e,colorFor:t,isLeader:n,onViewFull:r}){let i=e.fromMember===`user`,a=i?`You`:e.fromMember,o=i?`var(--color-primary)`:t(e.fromMember)??`var(--accent)`,s=!i&&n(e.fromMember),c=e.summary??``,l=e.toMember&&e.toMember!==`all`?e.toMember:null,u=(0,H.jsxs)(`div`,{className:h(`group relative flex gap-2.5 px-3 py-2 transition-colors hover:bg-surface-elevated/50`,i&&`bg-primary/5`),style:{boxShadow:`inset 3px 0 0 0 ${o}`},children:[e.fullSessionRef&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>r(e),title:`View full transcript (AI's raw thinking / debug)`,"aria-label":`View full transcript`,className:`absolute right-1.5 top-1.5 hidden items-center rounded p-1 text-text-subtle/60 hover:bg-surface-elevated hover:text-text-secondary can-hover:group-hover:inline-flex`,children:(0,H.jsx)(f,{className:`size-3.5`})}),(0,H.jsx)(`div`,{className:`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold text-white ring-2 ring-background`,style:{backgroundColor:o},"aria-hidden":!0,children:U(a)}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 can-hover:pr-6`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-0.5`,children:[(0,H.jsx)(`span`,{className:`text-sm font-semibold`,style:{color:i?`var(--color-foreground)`:o},children:a}),s&&(0,H.jsx)(`span`,{className:`rounded bg-surface-elevated px-1.5 py-px text-[10px] font-medium text-text-secondary`,children:`leader`}),l&&(0,H.jsxs)(`span`,{className:`text-[11px] text-text-subtle`,children:[`→ `,l]}),(0,H.jsx)(`span`,{className:`text-[11px] text-text-subtle`,children:W(e.createdAt)})]}),(0,H.jsx)(`div`,{className:`mt-0.5 whitespace-pre-wrap break-words text-sm leading-relaxed text-text-secondary`,children:G(c,t)})]})]});return e.fullSessionRef?(0,H.jsxs)(F,{children:[(0,H.jsx)(T,{asChild:!0,children:u}),(0,H.jsx)(j,{children:(0,H.jsxs)(N,{onClick:()=>r(e),children:[(0,H.jsx)(f,{className:`size-4`}),` View full transcript`]})})]}):u}),K={idle:`bg-text-subtle`,working:`bg-primary animate-pulse`,done:`bg-emerald-500`,error:`bg-destructive`},q={idle:`Idle`,working:`Working`,done:`Done`,error:`Error`},J=(0,B.memo)(function({members:e,liveStatus:t,typing:n,busy:i,onAdd:a,onEdit:o,onRemove:s}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5 p-2`,children:[e.map(e=>{let a=n[e.name],c=t.get(e.id)??e.status;return(0,H.jsxs)(`div`,{className:`group flex items-center gap-2 rounded-md px-2 py-1.5`,children:[(0,H.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white ring-2 ring-background`,style:{backgroundColor:e.color??`var(--accent)`},"aria-hidden":!0,children:e.name.slice(0,1).toUpperCase()}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`truncate text-xs font-medium`,style:{color:e.color??`var(--color-foreground)`},children:e.name}),e.role===`leader`&&(0,H.jsx)(`span`,{className:`rounded-sm bg-accent-wash px-1 text-[9px] font-semibold uppercase text-primary`,children:`lead`})]}),(0,H.jsx)(`span`,{className:`block truncate text-[10px] text-text-subtle`,children:a?`typing…`:e.persona||q[c]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 can-hover:opacity-0 can-hover:group-hover:opacity-100`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>o(e),disabled:i,"aria-label":`Edit ${e.name}`,className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-foreground active:bg-surface-elevated disabled:opacity-40`,children:(0,H.jsx)(r,{className:`size-3.5`})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>s(e),disabled:i,"aria-label":`Remove ${e.name}`,className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-destructive active:bg-surface-elevated disabled:opacity-40`,children:(0,H.jsx)(m,{className:`size-3.5`})})]}),(0,H.jsx)(`span`,{className:h(`size-2 shrink-0 rounded-full`,K[c]),title:q[c],"aria-hidden":!0})]},e.id)}),(0,H.jsxs)(`button`,{type:`button`,onClick:a,disabled:i,className:`mt-1 flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-primary hover:bg-surface-elevated active:bg-surface-elevated disabled:opacity-40`,children:[(0,H.jsx)(l,{className:`size-4`}),` Add member`]})]})}),Y=`w-full min-h-[40px] rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-text-subtle focus:outline-none focus:ring-1 focus:ring-primary`;function ae({open:e,member:t,projectName:n,providerId:r=`claude`,onSubmit:i,onClose:a}){let o=_(),[s,c]=(0,B.useState)(t?.name??``),[l,d]=(0,B.useState)(t?.persona??``),[f,p]=(0,B.useState)(t?.model??null),[m,h]=(0,B.useState)(t?.role===`leader`),[g,w]=(0,B.useState)(!1),[T,E]=(0,B.useState)(null),D=(0,B.useCallback)(async()=>{let e=s.trim();if(!e){E(`Name is required`);return}w(!0),E(null);try{await i({name:e,persona:l.trim()||null,model:f,role:m?`leader`:`member`}),a()}catch(e){E(e instanceof Error?e.message:`Failed to save member`),w(!1)}},[s,l,f,m,i,a]),O=t?.role===`leader`,k=(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 px-1 py-1`,children:[(0,H.jsx)(`input`,{className:Y,value:s,onChange:e=>c(e.target.value),placeholder:`Member name`,autoFocus:!0}),(0,H.jsx)(`input`,{className:Y,value:l,onChange:e=>d(e.target.value),placeholder:`Persona (optional)`}),(0,H.jsx)(I,{value:f,onChange:p,projectName:n,providerId:r}),(0,H.jsxs)(`label`,{className:X(O),children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--color-primary)]`,checked:m,disabled:O,onChange:e=>h(e.target.checked)}),(0,H.jsx)(`span`,{children:O?`Leader (reassign from another member)`:`Set as leader`})]}),T&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:T}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,H.jsx)(v,{variant:`outline`,onClick:a,disabled:g,children:`Cancel`}),(0,H.jsxs)(v,{onClick:D,disabled:g,children:[g&&(0,H.jsx)(u,{className:`mr-1.5 size-4 animate-spin`}),t?`Save`:`Add member`]})]})]});if(!e)return null;let A=t?`Edit member`:`Add member`;return o?(0,H.jsx)(C,{open:!0,onClose:a,className:`flex max-h-[90vh] flex-col`,children:(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-col px-4 pb-2`,children:[(0,H.jsx)(`h2`,{className:`mb-2 text-base font-semibold text-foreground`,children:A}),k]})}):(0,H.jsx)(S,{open:!0,onOpenChange:e=>{e||a()},children:(0,H.jsxs)(b,{className:`flex flex-col sm:max-w-md`,children:[(0,H.jsx)(y,{children:(0,H.jsx)(x,{children:A})}),k]})})}function X(e){return`flex items-center gap-2 text-sm text-text-secondary ${e?`opacity-60`:``}`}function Z({messages:e,config:t,projectName:n}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t&&(0,H.jsx)(ce,{config:t}),e.map(e=>(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wide text-text-subtle`,children:e.role===`user`?`User`:e.role===`assistant`?`Assistant`:e.role}),(0,H.jsx)(oe,{message:e,projectName:n})]},e.id)),e.length===0&&(0,H.jsx)(`p`,{className:`py-6 text-center text-sm text-text-subtle`,children:`Transcript is empty.`})]})}function oe({message:e,projectName:t}){let n=e.events??[];if(n.length===0)return e.content.trim()?(0,H.jsx)(z,{content:e.content}):null;let r=new Map;for(let e of n)e.type===`tool_result`&&e.toolUseId&&r.set(e.toolUseId,e);return(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map((e,n)=>{if(e.type===`text`)return e.content.trim()?(0,H.jsx)(z,{content:e.content},n):null;if(e.type===`thinking`)return(0,H.jsx)(se,{content:e.content},n);if(e.type===`tool_use`){let i=e.toolUseId?r.get(e.toolUseId):void 0;return(0,H.jsx)(R,{tool:e,result:i,completed:!!i,projectName:t},n)}return null})})}function se({content:e}){let[t,n]=(0,B.useState)(!1);return(0,H.jsxs)(`div`,{className:`rounded-md border border-border bg-surface-elevated/40`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs text-text-subtle hover:text-text-secondary`,children:[(0,H.jsx)(c,{className:h(`size-3.5 transition-transform`,t&&`rotate-90`)}),(0,H.jsx)(s,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:`Thinking`})]}),t&&(0,H.jsx)(`div`,{className:`border-t border-border px-3 py-2 text-xs leading-relaxed text-text-secondary`,children:(0,H.jsx)(z,{content:e})})]})}function ce({config:e}){let[t,n]=(0,B.useState)(!1),r=[[`Model`,e.model],[`Permission`,e.permissionMode],[`CWD`,e.cwd],[`Git branch`,e.gitBranch],[`CLI version`,e.version]].filter(([,e])=>e);return r.length===0?null:(0,H.jsxs)(`div`,{className:`rounded-md border border-border bg-surface-elevated/40`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-text-secondary hover:text-foreground`,children:[(0,H.jsx)(c,{className:h(`size-3.5 transition-transform`,t&&`rotate-90`)}),(0,H.jsx)(p,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:`Input config`})]}),t&&(0,H.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-t border-border px-3 py-2 text-xs`,children:r.map(([e,t])=>(0,H.jsxs)(`div`,{className:`contents`,children:[(0,H.jsx)(`dt`,{className:`text-text-subtle`,children:e}),(0,H.jsx)(`dd`,{className:`break-all font-mono text-text-secondary`,children:t})]},e))})]})}function le({groupId:e,message:t,onClose:n}){let r=_(),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(!1),[c,l]=(0,B.useState)(null),d=t?.fullSessionRef??null;if((0,B.useEffect)(()=>{if(!t||!d)return;let n=!1;return a(null),l(null),s(!0),M(e,d).then(e=>{n||a(e)}).catch(e=>{n||l(e instanceof Error?e.message:`Failed to load transcript`)}).finally(()=>{n||s(!1)}),()=>{n=!0}},[e,d,t]),!t)return null;let f=(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[o&&(0,H.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,H.jsx)(u,{className:`size-5 animate-spin text-primary`})}),c&&(0,H.jsxs)(`div`,{className:`px-1 py-4 text-sm text-text-secondary`,children:[(0,H.jsx)(`p`,{className:`mb-2 font-medium text-foreground`,children:`Full transcript unavailable`}),(0,H.jsx)(`p`,{className:`text-xs text-text-subtle`,children:c}),t.summary&&(0,H.jsx)(`pre`,{className:`mt-4 whitespace-pre-wrap break-words rounded-md bg-surface-elevated p-3 text-xs leading-relaxed text-text-secondary`,children:t.summary})]}),!o&&!c&&i!=null&&(0,H.jsx)(`div`,{className:`px-1 py-1`,children:(0,H.jsx)(Z,{messages:i.messages,config:i.config})})]}),p=`${t.fromMember} — full transcript`;return r?(0,H.jsx)(C,{open:!0,onClose:n,className:`max-h-[85vh] flex flex-col`,children:(0,H.jsxs)(`div`,{className:`flex flex-col min-h-0 px-4 pb-2`,children:[(0,H.jsx)(`h2`,{className:`mb-2 text-sm font-semibold text-foreground`,children:p}),f]})}):(0,H.jsx)(S,{open:!0,onOpenChange:e=>{e||n()},children:(0,H.jsxs)(b,{className:`flex max-h-[80vh] flex-col sm:max-w-2xl`,children:[(0,H.jsx)(y,{children:(0,H.jsx)(x,{className:`text-sm`,children:p})}),f]})})}function Q({metadata:e}){let t=e?.groupId??null,{activeProject:n}=g(D(e=>({activeProject:e.activeProject}))),r=e?.projectName??n?.name??``,s=_(),{messages:c,members:l,status:f,typing:p,loading:m,isRunning:y,error:b,sendMessage:x,stop:S,resume:T}=re(t,r),[E,O]=(0,B.useState)(``),[k,j]=(0,B.useState)(null),[M,N]=(0,B.useState)(!1),P=(0,B.useRef)(null),[F,I]=(0,B.useState)([]),[L,R]=(0,B.useState)(null),[z,V]=(0,B.useState)(!1),[U,W]=(0,B.useState)(null),[G,K]=(0,B.useState)(null),q=(0,B.useCallback)(async()=>{if(t)try{let e=await A(t);I(e.members),R(e.maxTurns)}catch{}},[t]),Y=(0,B.useCallback)(async e=>{if(!t)return;let n=Math.max(1,Math.min(50,Math.floor(e)||1));R(n);try{await ne(t,{maxTurns:n})}catch{q()}},[t,q]);(0,B.useEffect)(()=>{I([]),q()},[t,q]),(0,B.useEffect)(()=>{P.current?.scrollIntoView({block:`end`})},[c.length,p]);let X=(0,B.useMemo)(()=>new Map(l.map(e=>[e.id,e.status])),[l]),Z=F.length?F:l,oe=(0,B.useMemo)(()=>{let e=new Map(Z.map(e=>[e.name,e.color]));return t=>e.get(t)??null},[Z]),se=(0,B.useMemo)(()=>{let e=new Set(Z.filter(e=>e.role===`leader`).map(e=>e.name));return t=>e.has(t)},[Z]),ce=(0,B.useCallback)(async e=>{t&&(G?.member?await te(t,G.member.id,e):await w(t,e),await q())},[t,G,q]),Q=(0,B.useCallback)(async e=>{if(t){V(!0),W(null);try{await ee(t,e.id),await q()}catch(e){W(e instanceof Error?e.message:`Failed to remove member`)}finally{V(!1)}}},[t,q]),ue=(0,B.useCallback)(()=>{let e=E.trim();e&&(x(e),O(``))},[E,x]),$=Object.keys(p).filter(e=>p[e]);return t?(0,H.jsxs)(`div`,{className:`flex h-full min-h-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,H.jsx)(`span`,{className:h(`size-2 rounded-full`,f===`active`?`bg-primary animate-pulse`:f===`paused`?`bg-amber-500`:`bg-text-subtle`)}),(0,H.jsx)(`span`,{className:`capitalize`,children:f})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[y?(0,H.jsxs)(v,{size:`sm`,variant:`outline`,onClick:S,className:`h-8`,children:[(0,H.jsx)(d,{className:`mr-1 size-3.5`}),` Stop`]}):f===`paused`?(0,H.jsxs)(v,{size:`sm`,variant:`outline`,onClick:T,className:`h-8`,children:[(0,H.jsx)(i,{className:`mr-1 size-3.5`}),` Resume`]}):null,(0,H.jsx)(`button`,{type:`button`,onClick:()=>N(e=>!e),className:`flex size-8 items-center justify-center rounded-md text-text-subtle hover:bg-surface-elevated hover:text-foreground`,"aria-label":`Toggle roster`,children:(0,H.jsx)(a,{className:`size-4`})})]})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:m?(0,H.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,H.jsx)(u,{className:`size-5 animate-spin text-primary`})}):c.length===0?(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center p-4 text-center text-sm text-text-subtle`,children:`Send a message to start the group.`}):(0,H.jsxs)(`div`,{className:`flex flex-col py-2`,children:[c.map(e=>(0,H.jsx)(ie,{message:e,colorFor:oe,isLeader:se,onViewFull:j},e.id)),$.length>0&&(0,H.jsxs)(`div`,{className:`px-3 py-1.5 text-xs italic text-text-subtle`,children:[$.join(`, `),` `,$.length===1?`is`:`are`,` typing…`]}),(0,H.jsx)(`div`,{ref:P})]})}),b&&(0,H.jsx)(`div`,{className:`shrink-0 border-t border-border bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:b}),(0,H.jsx)(`div`,{className:`shrink-0 border-t border-border p-2`,children:(0,H.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,H.jsx)(`textarea`,{value:E,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!s&&(e.preventDefault(),ue())},rows:1,placeholder:`Message the group…`,className:`max-h-32 min-h-[44px] flex-1 resize-none rounded-md border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-text-subtle focus:outline-none focus:ring-1 focus:ring-primary`}),(0,H.jsx)(v,{onClick:ue,disabled:!E.trim(),className:`size-11 shrink-0 p-0`,"aria-label":`Send`,children:(0,H.jsx)(o,{className:`size-4`})})]})})]}),s?(0,H.jsxs)(C,{open:M,onClose:()=>N(!1),className:`flex max-h-[72vh] flex-col`,children:[(0,H.jsx)(`div`,{className:`flex h-11 shrink-0 items-center px-4 text-sm font-medium text-foreground`,children:`Members`}),(0,H.jsxs)(`div`,{className:`min-h-0 overflow-y-auto`,children:[L!==null&&(0,H.jsxs)(`label`,{className:`flex items-center gap-2 px-4 py-2 text-xs text-text-secondary`,children:[(0,H.jsx)(`span`,{children:`Reply cap`}),(0,H.jsx)(`input`,{type:`number`,min:1,max:50,value:L,onChange:e=>Y(Number(e.target.value)),className:`w-14 rounded border border-border bg-background px-1.5 py-1 text-xs text-foreground`}),(0,H.jsx)(`span`,{className:`text-text-subtle`,children:`turns/msg`})]}),U&&(0,H.jsx)(`p`,{className:`px-3 py-1 text-xs text-destructive`,children:U}),(0,H.jsx)(J,{members:F,liveStatus:X,typing:p,busy:z,onAdd:()=>K({member:null}),onEdit:e=>K({member:e}),onRemove:Q})]})]}):M&&(0,H.jsxs)(`div`,{className:`flex w-60 shrink-0 flex-col border-l border-border bg-panel`,children:[(0,H.jsx)(`div`,{className:`flex h-11 shrink-0 items-center border-b border-border px-3 text-sm font-medium text-foreground`,children:`Members`}),(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[L!==null&&(0,H.jsxs)(`label`,{className:`flex items-center gap-2 px-3 py-2 text-xs text-text-secondary`,children:[(0,H.jsx)(`span`,{children:`Reply cap`}),(0,H.jsx)(`input`,{type:`number`,min:1,max:50,value:L,onChange:e=>Y(Number(e.target.value)),className:`w-14 rounded border border-border bg-background px-1.5 py-1 text-xs text-foreground`}),(0,H.jsx)(`span`,{className:`text-text-subtle`,children:`turns/msg`})]}),U&&(0,H.jsx)(`p`,{className:`px-3 py-1 text-xs text-destructive`,children:U}),(0,H.jsx)(J,{members:F,liveStatus:X,typing:p,busy:z,onAdd:()=>K({member:null}),onEdit:e=>K({member:e}),onRemove:Q})]})]}),G&&(0,H.jsx)(ae,{open:!0,member:G.member,projectName:r,onSubmit:ce,onClose:()=>K(null)},G.member?.id??`add`),(0,H.jsx)(le,{groupId:t,message:k,onClose:()=>j(null)})]}):(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center p-4 text-sm text-text-subtle`,children:`No group selected.`})}export{Q as GroupChatTab};
|
|
Binary file
|
|
Binary file
|