@p4code/cli 0.9.8 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-CLYknQ8Q.mjs → binCli-CQsXscQ2.mjs} +1878 -1663
- package/dist/client/.vite/manifest.json +2014 -1996
- package/dist/client/assets/{2NI2N5EU-D0DC_qzC.js → 2NI2N5EU-aTesTRUs.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-CUZSFvTG.js → 4UO7MD6I-fOcXoLqw.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-5ibYwkgG.js → 5B3SVYGG-CVlBycCk.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DEtRbsDS.js → 5GK6JWQ2-UdJh1ROk.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-CwQP1dKj.js → 5N7A7DKN-LpXLPis9.js} +2 -2
- package/dist/client/assets/{5OC2THR4-BriFYPQx.js → 5OC2THR4-pX1yQcrA.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-BBNxENgt.js → 5S6HY5KT-CTBX-e9M.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-xl7U-rLA.js → 6IMQ5BUJ-DL11cDPG.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-BGGDxoUW.js → 6OLKWJ4F-TXqcGdqI.js} +2 -2
- package/dist/client/assets/{74OO7NKP-9vkDTl8T.js → 74OO7NKP-DNrMi93b.js} +2 -2
- package/dist/client/assets/{75O6YZUN-B9ocscUs.js → 75O6YZUN-CwCbVMzG.js} +2 -2
- package/dist/client/assets/{77XECAW3-DQ3S_7U7.js → 77XECAW3-BuuKvNS0.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-DFu3UszL.js → ABYRPUBD-BxNthVYO.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-BDlDnUeW.js +2 -0
- package/dist/client/assets/{AnimatedHeight-DEH7bEtg.js → AnimatedHeight-Baj5Pa60.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DDlvsg4m.js → AuthSurfaceShell-DCBmguf9.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DzdR7ZyB.js → BB2UYUI2-Bg3EJQg5.js} +2 -2
- package/dist/client/assets/{BUM34MOA-LkeHTV8a.js → BUM34MOA-CgVaLfn6.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BX1CWous.js → CEQABKGZ-BpDmef7u.js} +2 -2
- package/dist/client/assets/{CXAC5362-DMlUWuvv.js → CXAC5362-uHOdbo6J.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-CcLiWo0d.js +2 -0
- package/dist/client/assets/ChatMarkdown-DQk9NI7y.js +48 -0
- package/dist/client/assets/{CheckboxIndicator-DSA5Ujdj.js → CheckboxIndicator-CvUY7aCo.js} +2 -2
- package/dist/client/assets/{ClippedText-DlUFaCzw.js → ClippedText-Bz4usJaN.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-fnotucae.js +2 -0
- package/dist/client/assets/{ComboboxClear-DkaA60b7.js → ComboboxClear-BWxvz8Y9.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-AEuoHUH8.js → ComboboxGroupLabel-B9uepPCe.js} +2 -2
- package/dist/client/assets/{CommandBlock-BUHVWYBr.js → CommandBlock-ConSzQ7T.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-zRTz5xec.js → ComposerPromptEditor-Dh9Y0crA.js} +11 -11
- package/dist/client/assets/{CompositeRoot-38NDvFsA.js → CompositeRoot-XnJ7Nzli.js} +2 -2
- package/dist/client/assets/{ConnectionDiagnosisDetails-WKkRENJB.js → ConnectionDiagnosisDetails-DIM-B35q.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-B-U5Wv6b.js → ConnectionStatusDot-CpPwqzkK.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CNkbJcIE.js → DRLTVNUE-9tvJLXhF.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-Csqmb0Yg.js → DYY6UVD2-CXR9o7Qv.js} +2 -2
- package/dist/client/assets/{DevicePanel-B3G_KDJN.js → DevicePanel-Oy_RHjOo.js} +2 -2
- package/dist/client/assets/{DeviceSetup-DqTJRSli.js → DeviceSetup-ct6xlJYm.js} +2 -2
- package/dist/client/assets/{DialogTitle-Bz-7IYD8.js → DialogTitle-DdTujj5B.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-C3_yEiAB.js → DiffCommentAnnotation-C-L5yt6X.js} +2 -2
- package/dist/client/assets/{DiffFileTree-BJxoYt-I.js → DiffFileTree-C5oMLRG9.js} +2 -2
- package/dist/client/assets/DiffPanel-CE2e4NYA.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-DPfZNt42.js → DiffWorkerPoolProvider-K9JsvPrH.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-CsCt-RW1.js → EmbeddedDesign-xOusO8oo.js} +5 -5
- package/dist/client/assets/{EnvironmentMachineIcon-CKfntUmE.js → EnvironmentMachineIcon-BrGxJPP_.js} +2 -2
- package/dist/client/assets/{ExpandableText-DGu2RH_j.js → ExpandableText-auxbX5_6.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-CH8BTfJM.js → FNOVOB4O-BmZ9pVZx.js} +2 -2
- package/dist/client/assets/{FieldControl-DAh0lUDV.js → FieldControl-DfaF5AW8.js} +2 -2
- package/dist/client/assets/{FileDiff-C1enHrMi.js → FileDiff-BTNP8QcY.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-67DQ3_gp.js → FilePreviewPanel-m6c5KXjS.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-CILGGC6I.js → FoldedSettingsSection-BTB3Pbv2.js} +2 -2
- package/dist/client/assets/{FormContext-BdrDIRv0.js → FormContext-B_ZMFN7l.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-Ox1-cFjL.js → HDGCDEEZ-JiOhjq7U.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-BEBG51eo.js → HSJLKHB7-Bd0iumEG.js} +2 -2
- package/dist/client/assets/{Icons-C-FXpOud.js → Icons-BP6jlahF.js} +2 -2
- package/dist/client/assets/Input-B9nob0l2.js +2 -0
- package/dist/client/assets/JZOYTAAL-0AVwCd1G.js +1 -0
- package/dist/client/assets/{K3MD6TGW-DhfhwRRq.js → K3MD6TGW-B2s2l_Ok.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-DdE8zx2_.js → K7RP3OMA-DEvHDTPu.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-Ddu7cDVA.js → KeybindingsSettings.logic-CkmobJKX.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-_CTEfstz.js → LHDIQX7Q-D06sm2YF.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-BZTFKFlr.js → LUXOKEGN-A74rm75g.js} +2 -2
- package/dist/client/assets/{MathTypeset-hiZgZUOa.js → MathTypeset-Vm1FBYDj.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-CC607oJ3.js → N3JZAHOW-BCbSRiUS.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-YZiFnb1D.js → NUIALGQ3-DmGUeCU6.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-BaAbresy.js → NoProjectsHero-BBiWXq8t.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-CJWG3hrr.js → O65XPQGZ-859wHUVg.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-CO58SxOd.js → O7XIQ6OM-BSsC7pLO.js} +2 -2
- package/dist/client/assets/{OFQON5FD-ZVCn5Afz.js → OFQON5FD-BjECyhxL.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-nuGk_jH6.js → P4ConnectAccountPages-Cqk-Frva.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-DMU_ZGur.js → P4ConnectSidebarSignIn-wL7BP9rR.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Dyo99try.js → PJQHF43J-CuSzd3x-.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-DXgwWyzK.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-BGnGqbZS.js → PierreEntryIcon-CDSrlZTw.js} +2 -2
- package/dist/client/assets/{PopoverHandle-BGTDdU32.js → PopoverHandle-Bf0PlJ6j.js} +2 -2
- package/dist/client/assets/PreviewPanel-B7EzPl1x.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-B8-DHhbT.js → ProjectDefaultsSettings-BRi9-O_X.js} +2 -2
- package/dist/client/assets/ProjectFavicon-Cf1XjP8U.js +3 -0
- package/dist/client/assets/{ProjectIconPickerDialog-D_7XapzM.js → ProjectIconPickerDialog-DSRXK7Zv.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-BRycZjMZ.js → ProjectMonogram-BJooqIM-.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-ejODeZci.js → ProviderAuthTerminal-8VrYkUNI.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-mxdF5wUN.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-TxiFYWfI.js → ProviderSettingsForm-ByFYLn1K.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-DCUJxgcQ.js +6 -0
- package/dist/client/assets/{RHNBAITX-B2MpzGNB.js → RHNBAITX-Z04dR_uf.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-Clh1I7db.js → ReadOnlySourcePreview-CiVudVcz.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-UQ8iqwRx.js → RenderErrorBoundary-C8jlNO8Q.js} +3 -3
- package/dist/client/assets/{SLD4V6NK-DDlJ2xA8.js → SLD4V6NK-CTh_lt_F.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-VxM8-W1a.js → ScheduledTasksSettings-DfwR9Auj.js} +4 -4
- package/dist/client/assets/{ScopedSwitch-B9HsEBfG.js → ScopedSwitch-6K10bTo0.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-DaAMqe_x.js → ScrollAreaCorner-Bstf_gNQ.js} +2 -2
- package/dist/client/assets/{SecretInput-Dfsqp38C.js → SecretInput-BTBcl8SC.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-CBbON2Cr.js → SelectScrollUpArrow-BAwxXUi-.js} +2 -2
- package/dist/client/assets/SelfImproveSettingsSection-DwtwZ9He.js +2 -0
- package/dist/client/assets/{SettingsPanels-D16J4fBs.js → SettingsPanels-BnfeCIPg.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-DLPcHVw0.js → SettingsPanels.logic-BM52qF-a.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-CLuK5ZOQ.js → SettingsScopeNotice-CPP-_wXt.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-Bgae69g1.js → SidebarStageBackdrop-ClK_nT_C.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-DQ6cSkUG.js → T3PCR2KE-O2OwSAZh.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DlInq0TH.js → TKWO2OVW-BxZ4r_GJ.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-DL8cfasx.js → TSHNXIZL-6843lSfx.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-Dhd_0CzC.js → ThemeEditorPanel-B_Mpp-fO.js} +2 -2
- package/dist/client/assets/ThreadTerminalDrawer-3sb2Ksna.js +5 -0
- package/dist/client/assets/{TooltipViewport-UaR0JZsl.js → TooltipViewport-CEOeTVyb.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-WMwM-nEH.js → UQJE5E4I-DIek-a8V.js} +2 -2
- package/dist/client/assets/{USNYFO5S-D-mgcpxb.js → USNYFO5S-l_vgf0I4.js} +2 -2
- package/dist/client/assets/{Virtualizer-CUj2Cqvm.js → Virtualizer-CttujTBW.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-CiAqWYrx.js → WEVWDWVA-DASU9Cts.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-D8GTBuA5.js → WorkspaceBreadcrumb-CQH9TmFi.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-BKXvWv-9.js → WorkspacePageContainer-E5ZuTsSl.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-zMZD9Zz8.js → WorkspacePageHeader-DGopnQZ2.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-YS48_sFp.js → X5RFHQXM-B52DJ-qb.js} +2 -2
- package/dist/client/assets/{X62E3GBT-C444MNd3.js → X62E3GBT-Ccgsn5Dj.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-0O1bjE8y.js → XBNEOJTC-BRptYPNn.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-Coy_OiWg.js → YHV2MVVZ-D_wcLZ-W.js} +2 -2
- package/dist/client/assets/{YURCZMG2-Lc2Tv_HR.js → YURCZMG2-DP6lArrr.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CWUTdxUc.js → YVG2LODB-CgFYuKDa.js} +2 -2
- package/dist/client/assets/_chat-Vh73A6rC.js +45 -0
- package/dist/client/assets/{_chat.design-CajRPBez.js → _chat.design-_0R3HMjq.js} +2 -2
- package/dist/client/assets/{_chat.index-OsM078CN.js → _chat.index-DhmrbSHU.js} +2 -2
- package/dist/client/assets/{_chat.new-BI8wuTGQ.js → _chat.new-Byb4mhMY.js} +2 -2
- package/dist/client/assets/_chat.pull-requests-BNzVcYEB.js +2 -0
- package/dist/client/assets/{alert-RktpFBv6.js → alert-CqueYfb9.js} +2 -2
- package/dist/client/assets/{assetUrls-COCOS1bm.js → assetUrls-d3y14MLX.js} +2 -2
- package/dist/client/assets/assets-FbkZMhUb.js +2 -0
- package/dist/client/assets/{browserHistoryStore-CBcm7bje.js → browserHistoryStore-CjWZgU2Q.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-D-M5yQc0.js → browserLinkTarget-IsSd9GTV.js} +2 -2
- package/dist/client/assets/{checkbox-vIS3kn6A.js → checkbox-BPr09F_k.js} +2 -2
- package/dist/client/assets/{color-picker-vozMHo5G.js → color-picker-roKqOkuS.js} +2 -2
- package/dist/client/assets/{combobox-CzEFd5LA.js → combobox-CEzOq8mg.js} +2 -2
- package/dist/client/assets/{command-CLf9yckl.js → command-i_eKJj3B.js} +2 -2
- package/dist/client/assets/{connect-BoLhf5rG.js → connect-DyZ-pjcy.js} +2 -2
- package/dist/client/assets/{connect-agent-BUjhhqbv.js → connect-agent-dJ-CRJsT.js} +2 -2
- package/dist/client/assets/{design-LeaOcSZl.js → design-CXl7HVrT.js} +2 -2
- package/dist/client/assets/device-MyE56wi2.js +2 -0
- package/dist/client/assets/{dialog-B69qrNtB.js → dialog-CKG1aUT3.js} +2 -2
- package/dist/client/assets/{diffRendering-DU37Uneg.js → diffRendering-COA7wG72.js} +2 -2
- package/dist/client/assets/{dist-CtnQm06p.js → dist-CYq41icZ.js} +3 -3
- package/dist/client/assets/{draft-input-BUsvwNIU.js → draft-input-DvNQZghL.js} +2 -2
- package/dist/client/assets/{duoViewer-CPd6U9x5.js → duoViewer-CjvM1rB0.js} +2 -2
- package/dist/client/assets/{dynamic-DDiw9bBP.js → dynamic-BZ3kW5ih.js} +2 -2
- package/dist/client/assets/{embeddedScripts-DjnGPWZd.js → embeddedScripts-BLmMNkyP.js} +2 -2
- package/dist/client/assets/{empty-B1FuCXoG.js → empty-D6SdnsPw.js} +2 -2
- package/dist/client/assets/entities-D8ZKPC2e.js +2 -0
- package/dist/client/assets/{fileLinks-DzCsEQpS.js → fileLinks-CNAL-7G6.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-eHhwnC6l.js → fileTreeExpansion-B_6v-e30.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-eC26FmPf.js → getDiffFileInput-DovUC0XJ.js} +2 -2
- package/dist/client/assets/{guideRunStore-CugTzRRn.js → guideRunStore-7uPQQ44U.js} +2 -2
- package/dist/client/assets/{htmlRender-CcVnPpcS.js → htmlRender-hlYiIm7u.js} +2 -2
- package/dist/client/assets/{index-CZlF3wQ9.js → index-DD6u-vDm.js} +3 -3
- package/dist/client/assets/{input-group-CevCumL6.js → input-group-APyqVexM.js} +2 -2
- package/dist/client/assets/{input-D8R-9BO3.js → input-yNgBXsRj.js} +2 -2
- package/dist/client/assets/{kbd-Fy-v90ND.js → kbd-Cr4XEhSh.js} +2 -2
- package/dist/client/assets/{keybindings-DMghyE3A.js → keybindings-hzk4_Sgu.js} +2 -2
- package/dist/client/assets/{lazy-BA6aXmZc.js → lazy-CXsQYM2D.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-DVNAnyiv.js → lazyRouteComponent-tnhWsSYX.js} +2 -2
- package/dist/client/assets/{link-ci_EPfAz.js → link-CmpZDWcG.js} +2 -2
- package/dist/client/assets/{linkedPrompt-CPHt2jcO.js → linkedPrompt-DgAytF6c.js} +2 -2
- package/dist/client/assets/main-CNcsYwUg.js +37 -0
- package/dist/client/assets/{mediaReference-CZmbKByR.js → mediaReference-DNNV5BY5.js} +2 -2
- package/dist/client/assets/{mediaSource-DX6oP8x9.js → mediaSource-DI8dP4uu.js} +2 -2
- package/dist/client/assets/{number-field-CmK8oJMM.js → number-field-DcRWl9B0.js} +2 -2
- package/dist/client/assets/{observeResize-YxzDUnDW.js → observeResize-DjqKtKLK.js} +2 -2
- package/dist/client/assets/{onboarding-eClefFKp.js → onboarding-CyFz37eL.js} +2 -2
- package/dist/client/assets/openFileInPreview-rYwhIeVk.js +2 -0
- package/dist/client/assets/{p4ProjectFile-BC2tSEs4.js → p4ProjectFile-CT0gLoXX.js} +2 -2
- package/dist/client/assets/{pair-BUZJqgA1.js → pair-BOq1UYDI.js} +2 -2
- package/dist/client/assets/{pendingSendStore-C5UcT8R0.js → pendingSendStore-BoFRcmy5.js} +2 -2
- package/dist/client/assets/{phoneViewer-fmWF20qy.js → phoneViewer-BtDABBh2.js} +2 -2
- package/dist/client/assets/{pierre-icons-DlYshDSm.js → pierre-icons-LoH9zCdH.js} +2 -2
- package/dist/client/assets/{popover-CtJuJW_f.js → popover-DVeZET9D.js} +2 -2
- package/dist/client/assets/{preview-D-Cm6hTR.js → preview-D9IkIo7q.js} +2 -2
- package/dist/client/assets/{preview-DtLn0r5X.js → preview-oweHYD4S.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-BQgCK2RM.js → previewMiniPlayerStore-DrP4x3Ce.js} +2 -2
- package/dist/client/assets/primary-DXTkE8Z6.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-CZVS0Wwo.js +2 -0
- package/dist/client/assets/projectFilesQueryState-Cl_MU7SH.js +2 -0
- package/dist/client/assets/{projectScriptEditor-CwMYFrgO.js → projectScriptEditor-CfiaAaXj.js} +2 -2
- package/dist/client/assets/{providerSkills-DRtgduYo.js → providerSkills-CCJGD2Js.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CqcRjGbR.js → pullRequestDetail.logic-4EhxvJSo.js} +4 -4
- package/dist/client/assets/{pullRequestIcons-Bk_-BZhA.js → pullRequestIcons-DyEIFm1n.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-Br0qNCn2.js → pullRequestReviewStore-B55CEHY9.js} +2 -2
- package/dist/client/assets/pullRequests-DRm4lwgc.js +2 -0
- package/dist/client/assets/queries-BGbR-fUx.js +2 -0
- package/dist/client/assets/query-D-IVadFI.js +2 -0
- package/dist/client/assets/{radio-group-CQTaM9n2.js → radio-group-DIOJb--u.js} +2 -2
- package/dist/client/assets/{renderScheduler-fJB2sQwM.js → renderScheduler-3p9xZuHR.js} +2 -2
- package/dist/client/assets/{rightPanelStore-C5nnGDev.js → rightPanelStore-CRQRe1Cp.js} +2 -2
- package/dist/client/assets/runtime-CdX0UBlL.js +3 -0
- package/dist/client/assets/runtime-S0tnrkvE.js +6 -0
- package/dist/client/assets/{runtimeModeConfig-Htoh7tJb.js → runtimeModeConfig-BAFMgMrE.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DRYrMw8R.js → scheduledTasksSettings.logic-CrhQwOvr.js} +3 -3
- package/dist/client/assets/{scroll-area-DJaTwtcr.js → scroll-area-DTOm0CbX.js} +2 -2
- package/dist/client/assets/{select-BFALokxW.js → select-CML8G0wN.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-H2XgphDi.js → selfImproveFindings-DuRaHmql.js} +2 -2
- package/dist/client/assets/server-ELSEsqtb.js +2 -0
- package/dist/client/assets/session-DCntd6Nl.js +2 -0
- package/dist/client/assets/session-logic-CbKDK1qZ.js +26 -0
- package/dist/client/assets/{settings-BkLvGwfm.js → settings-CbkRsZQ6.js} +2 -2
- package/dist/client/assets/{settings.appearance-OuApP6hX.js → settings.appearance-BGbKeD2q.js} +2 -2
- package/dist/client/assets/settings.archived-DNDOvbYT.js +2 -0
- package/dist/client/assets/{settings.computer-use-DbtSE70m.js → settings.computer-use-Cl0y_o-b.js} +2 -2
- package/dist/client/assets/settings.connections-xy7hhFa0.js +2 -0
- package/dist/client/assets/{settings.data-controls-DqM0dqdr.js → settings.data-controls-Boy0foov.js} +2 -2
- package/dist/client/assets/settings.decisions-DUCJDJZC.js +2 -0
- package/dist/client/assets/{settings.designs-BIB7y5ry.js → settings.designs-DYuankA7.js} +2 -2
- package/dist/client/assets/settings.diagnostics-DgYvj0_x.js +2 -0
- package/dist/client/assets/{settings.general-D73jxwiz.js → settings.general-CrvvO6VU.js} +2 -2
- package/dist/client/assets/settings.integrations-Do9x2dXf.js +2 -0
- package/dist/client/assets/{settings.keybindings-DMI2SOqT.js → settings.keybindings-Q_21VUQP.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-QRv0v3-V.js → settings.open-source-licenses-Cnz72Gu0.js} +2 -2
- package/dist/client/assets/settings.plugins-C9-DUFnM.js +5 -0
- package/dist/client/assets/{settings.projects-r-irj-Zr.js → settings.projects-BKMazKl9.js} +4 -4
- package/dist/client/assets/settings.providers-ouat2Ci1.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-RWniN8Lw.js → settings.scheduled-tasks-DOmtQjNH.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-D6hiK4XK.js → settings.snap-shot-609BnJ2S.js} +2 -2
- package/dist/client/assets/{settings.source-control-GPOjx565.js → settings.source-control-D1LmFmrq.js} +2 -2
- package/dist/client/assets/{settings.storage-CZsmFyZ8.js → settings.storage-CXdZfPhF.js} +2 -2
- package/dist/client/assets/settingsLayout-aLGl3ZXu.js +3 -0
- package/dist/client/assets/{sidebar-BDFu5cf2.js → sidebar-DMJE0zUg.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-CURnoavN.js → sidebarProjectGrouping-BAN1mSDk.js} +2 -2
- package/dist/client/assets/{skeleton-CIpn5ufH.js → skeleton-eiJFH0l9.js} +2 -2
- package/dist/client/assets/{sourceControl-DjMIOzv1.js → sourceControl-ChrSdv6h.js} +2 -2
- package/dist/client/assets/{sourceControlClients-C2uvUFSM.js → sourceControlClients-BDwX0klQ.js} +2 -2
- package/dist/client/assets/{spinner-t32AzjJr.js → spinner-H4tz4lLc.js} +2 -2
- package/dist/client/assets/{terminal-links-D6dqW3h9.js → terminal-links-D7Hzce_h.js} +2 -2
- package/dist/client/assets/{terminalSessions-DoRkjVz9.js → terminalSessions-DdR_bXtX.js} +2 -2
- package/dist/client/assets/{textarea-EVmRNBWL.js → textarea-CkmpNgx5.js} +2 -2
- package/dist/client/assets/{themePalette-01TQqdkx.js → themePalette-pZ7Ys_kT.js} +3 -3
- package/dist/client/assets/toast-BNQWmVQ-.js +2 -0
- package/dist/client/assets/{toggle-Dqrwe7LT.js → toggle-BDixfqRe.js} +2 -2
- package/dist/client/assets/{toggle-group-DS75Gx6B.js → toggle-group-DV__8G6T.js} +2 -2
- package/dist/client/assets/{tooltip-B1rLXiVx.js → tooltip-DsRaXpYk.js} +2 -2
- package/dist/client/assets/{uiStateStore-_K2mvZYL.js → uiStateStore-Bo1Umjei.js} +2 -2
- package/dist/client/assets/{usage-DwGF-B0Q.js → usage-BPmOvYDv.js} +2 -2
- package/dist/client/assets/{usageAccess-YanE4PaX.js → usageAccess-BXUmTDe1.js} +2 -2
- package/dist/client/assets/{usageFormat-Bgm6YXnR.js → usageFormat-xrTYBhxI.js} +2 -2
- package/dist/client/assets/{usageShortcuts-D6H92HUx.js → usageShortcuts-CQcKqXkw.js} +2 -2
- package/dist/client/assets/{use-atom-command-BT7sz8Lx.js → use-atom-command-REOTdDAa.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-CCDZPAYX.js → useAriaLabelledBy-DVTboZ71.js} +2 -2
- package/dist/client/assets/useHandleNewThread-DYBNXS8y.js +2 -0
- package/dist/client/assets/{useLocation-CDlqpnf6.js → useLocation--dLSTvwv.js} +2 -2
- package/dist/client/assets/{useNavigate-mNhNGdvJ.js → useNavigate-DAhzXpNZ.js} +2 -2
- package/dist/client/assets/{useNavigateBack-zj9tpAPV.js → useNavigateBack-ClmMPFha.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-CkJyw_jV.js → useP4ConnectAuthPrompt-CGiX3TE7.js} +2 -2
- package/dist/client/assets/{useParams-CZ_VOC6E.js → useParams-D_0yPfYl.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-DFE8UnJC.js → usePermissionStatus-BGxDZxHH.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-CVcuaade.js → usePullRequestActions-BOUPI3Y5.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-gW7DDA6v.js → useRegisterFieldControl-DnspXZl4.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BCNsRHrC.js → useScopedModelAvailability-DD6NdaS0.js} +2 -2
- package/dist/client/assets/useSettings-BNjvPVd5.js +3 -0
- package/dist/client/assets/utils-D19Exirm.js +37 -0
- package/dist/client/assets/vcsRefInvalidation-BSyEzs8X.js +2 -0
- package/dist/client/assets/{welcome-CfpSLEhO.js → welcome-CJLDvQwx.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{renderer-B3Ia4LBS.mjs → renderer-DNRW9Bfa.mjs} +2 -2
- package/dist/{runtime-DvE0t3kv.mjs → runtime-KPwu-Er9.mjs} +89 -3
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-Dxu9crTa.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-CXEX1qrn.js +0 -2
- package/dist/client/assets/ChatMarkdown-yTbjRmgo.js +0 -48
- package/dist/client/assets/CodexSetupSection.logic-D3odRubx.js +0 -2
- package/dist/client/assets/DiffPanel-Bfxdj8td.js +0 -2
- package/dist/client/assets/Input-DWhR3WLZ.js +0 -2
- package/dist/client/assets/JZOYTAAL-K5yyV5fj.js +0 -1
- package/dist/client/assets/PanelLayoutControls-CwJW9Vo-.js +0 -216
- package/dist/client/assets/PreviewPanel-C914U2vc.js +0 -2
- package/dist/client/assets/ProjectFavicon-Bnd4lTxL.js +0 -3
- package/dist/client/assets/ProviderModelPicker-BigVoJfZ.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-D99_acmK.js +0 -6
- package/dist/client/assets/ThreadTerminalDrawer-Bga-TMJR.js +0 -5
- package/dist/client/assets/_chat-BWNTWBCr.js +0 -45
- package/dist/client/assets/_chat.pull-requests-Alx1g9Xh.js +0 -2
- package/dist/client/assets/assets-B36wSN1M.js +0 -2
- package/dist/client/assets/device-D9IuUJmU.js +0 -2
- package/dist/client/assets/entities-Cd_YDhEa.js +0 -2
- package/dist/client/assets/main-om7hc1qE.js +0 -37
- package/dist/client/assets/openFileInPreview-H9M5FxLy.js +0 -2
- package/dist/client/assets/primary-CuSE-Dwp.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-BsKyx6nh.js +0 -2
- package/dist/client/assets/projectFilesQueryState-FiXJc2AO.js +0 -2
- package/dist/client/assets/pullRequests-C9YbqDXl.js +0 -2
- package/dist/client/assets/queries-DMkaYL1H.js +0 -2
- package/dist/client/assets/query-B1dBedyO.js +0 -2
- package/dist/client/assets/runtime-B6yGAVz4.js +0 -6
- package/dist/client/assets/runtime-BhGr1QCf.js +0 -3
- package/dist/client/assets/server-Dc9414wM.js +0 -2
- package/dist/client/assets/session-B6T_Arzf.js +0 -2
- package/dist/client/assets/session-logic-BaSoFnqy.js +0 -26
- package/dist/client/assets/settings.archived-DLycLGH2.js +0 -2
- package/dist/client/assets/settings.connections-D8EmrGJK.js +0 -2
- package/dist/client/assets/settings.decisions-BNBjCRqL.js +0 -2
- package/dist/client/assets/settings.diagnostics-CZPZhIn-.js +0 -2
- package/dist/client/assets/settings.integrations-Vq3IT0_R.js +0 -2
- package/dist/client/assets/settings.plugins-Ddb8m4nE.js +0 -5
- package/dist/client/assets/settings.providers-Ce4kHZsP.js +0 -3
- package/dist/client/assets/settingsLayout-CthOqZyP.js +0 -3
- package/dist/client/assets/toast-UFTwkJWj.js +0 -2
- package/dist/client/assets/useHandleNewThread-nNF3Xnbt.js +0 -2
- package/dist/client/assets/useSettings-BAP_yCCK.js +0 -3
- package/dist/client/assets/utils-Dv1DrWoz.js +0 -37
- package/dist/client/assets/vcsRefInvalidation-BI3mMuIW.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$_ as i,F_ as a,I_ as o,Md as s,cE as c,dr as l,gh as u,kd as d,l as f,of as p,t as m,ts as h,vh as g,wb as _}from"./utils-Dv1DrWoz.js";import{R as v,W as y}from"./runtime-B6yGAVz4.js";import{D as b,K as x,S as ee,d as te,x as S}from"./useSettings-BAP_yCCK.js";import{f as C}from"./server-Dc9414wM.js";import{i as w,n as ne}from"./session-B6T_Arzf.js";import{n as re}from"./query-B1dBedyO.js";import{t as T}from"./use-atom-command-BT7sz8Lx.js";import{n as E,t as D}from"./radio-group-CQTaM9n2.js";import{t as ie}from"./input-D8R-9BO3.js";import{a as ae,c as O,i as oe,r as se,s as ce,t as le}from"./dialog-B69qrNtB.js";import{x as k}from"./Icons-C-FXpOud.js";import{t as ue}from"./preview-DtLn0r5X.js";import{S as A,t as de}from"./ChatGptUsageButton-CXEX1qrn.js";import{a as j}from"./settingsLayout-CthOqZyP.js";import{Er as M,ao as N,ba as fe,co as pe,io as me,no as he,ro as P,so as F,ya as I}from"./main-om7hc1qE.js";var L=e(t(),1),R=n(),z=e(r(),1);function B(e){let t=(0,R.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,z.jsx)(k,{className:`size-4 shrink-0`,"aria-hidden":`true`}),t[3]=i):i=t[3];let a=n??`Continue with ChatGPT`,o;return t[4]!==r||t[5]!==a?(o=(0,z.jsxs)(l,{...r,children:[i,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function ge(e){let t=(0,R.c)(23),{open:n,methods:r,onClose:i,onSelect:a}=e,o=r.filter(ve),[s,c]=(0,L.useState)(null),l=s===`chatgpt-change-account`?s:o.find(e=>e.id===s)?.id??o[0]?.id??`chatgpt-change-account`,u=le,d;t[0]===i?d=t[1]:(d=e=>{e||i()},t[0]=i,t[1]=d);let f=ce,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,z.jsxs)(ae,{children:[(0,z.jsx)(O,{children:`Reconnect ChatGPT`}),(0,z.jsx)(se,{children:`On OpenAI, sign in with the account you choose here.`})]}),t[2]=p):p=t[2];let m=E,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e),t[3]=h):h=t[3];let g=o.map(_e),_;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,z.jsx)(D,{value:`chatgpt-change-account`}),(0,z.jsx)(`span`,{className:`font-medium`,children:`Use a different account`})]}),t[4]=_):_=t[4];let v;t[5]!==m||t[6]!==l||t[7]!==h||t[8]!==g?(v=(0,z.jsx)(`div`,{className:`px-6 pb-6`,children:(0,z.jsxs)(m,{"aria-label":`ChatGPT account to connect`,value:l,onValueChange:h,children:[g,_]})}),t[5]=m,t[6]=l,t[7]=h,t[8]=g,t[9]=v):v=t[9];let y;t[10]!==a||t[11]!==l?(y=(0,z.jsx)(oe,{children:(0,z.jsx)(B,{onClick:()=>a(l)})}),t[10]=a,t[11]=l,t[12]=y):y=t[12];let b;t[13]!==f||t[14]!==p||t[15]!==v||t[16]!==y?(b=(0,z.jsxs)(f,{children:[p,v,y]}),t[13]=f,t[14]=p,t[15]=v,t[16]=y,t[17]=b):b=t[17];let x;return t[18]!==u||t[19]!==n||t[20]!==d||t[21]!==b?(x=(0,z.jsx)(u,{open:n,onOpenChange:d,children:b}),t[18]=u,t[19]=n,t[20]=d,t[21]=b,t[22]=x):x=t[22],x}function _e(e){return(0,z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,z.jsx)(D,{value:e.id}),(0,z.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.name})]},e.id)}function ve(e){return e.id.startsWith(`chatgpt-profile:`)}function ye(e){let t=(0,R.c)(36),{environmentId:n,onClose:r,renderSetup:s,onAccountCreated:c}=e,u=w(n,i),d=te(n),p;t[0]===n?p=t[1]:(p=C.providersValueAtom(n),t[0]=n,t[1]=p);let m=h(p),g=T(C.updateSettings,`Add ChatGPT account`),[_,v]=(0,L.useState)(`Personal`),y;t[2]===_?y=t[3]:(y=_.trim(),t[2]=_,t[3]=y);let b=`ChatGPT - ${y}`,[x,ee]=(0,L.useState)(null),[S,re]=(0,L.useState)(!1),E=m?.find(e=>e.instanceId===x),D=A(E),ae=(0,L.useEffectEvent)(r);(0,L.useEffect)(()=>{D&&ae()},[D]);let O;t[4]!==b||t[5]!==n||t[6]!==_||t[7]!==c||t[8]!==r||t[9]!==S||t[10]!==d||t[11]!==g?(O=async()=>{if(S||!_.trim()||!ne(n,`providers:manage`))return;re(!0);let e=o.make(`codex_${f()}`);(await g({environmentId:n,input:{patch:{providerInstances:{...d.providerInstances,[e]:{driver:a.make(`codex`),displayName:b,enabled:!0,config:{enabled:!0,setupMode:`managed`}}}}}}))._tag===`Success`&&(c?(c(e,b),r()):ee(e)),re(!1)},t[4]=b,t[5]=n,t[6]=_,t[7]=c,t[8]=r,t[9]=S,t[10]=d,t[11]=g,t[12]=O):O=t[12];let oe=O,se=le,ce=!D,k;t[13]===r?k=t[14]:(k=e=>{e||r()},t[13]=r,t[14]=k);let ue=N,de=x?b:`Add ChatGPT account`,M;t[15]===de?M=t[16]:(M=(0,z.jsx)(P,{title:de,description:`Each account has its own Codex instance and sign-in. Choose the other account on the sign-in page.`}),t[15]=de,t[16]=M);let fe=me,pe=x?E?.setup?s(x,E):(0,z.jsx)(j,{title:`Codex runtime`,description:`Preparing managed setup.`}):(0,z.jsx)(`form`,{id:`add-codex-account`,onSubmit:e=>{e.preventDefault(),oe()},children:(0,z.jsx)(j,{title:`Account name`,description:`Shown in the provider list and model picker.`,control:(0,z.jsx)(ie,{"aria-label":`Account name`,value:_,disabled:S,onChange:e=>v(e.target.value),placeholder:`e.g. Personal or Work`})})}),F;t[17]!==fe||t[18]!==pe?(F=(0,z.jsx)(fe,{children:pe}),t[17]=fe,t[18]=pe,t[19]=F):F=t[19];let I;t[20]!==u||t[21]!==x||t[22]!==_||t[23]!==r||t[24]!==S?(I=(0,z.jsx)(he,{children:x?(0,z.jsx)(l,{variant:`outline`,onClick:r,children:`Finish later`}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(l,{variant:`outline`,disabled:S,onClick:r,children:`Cancel`}),(0,z.jsx)(l,{type:`submit`,form:`add-codex-account`,disabled:S||!_.trim()||!u,children:S?`Adding account…`:`Continue`})]})}),t[20]=u,t[21]=x,t[22]=_,t[23]=r,t[24]=S,t[25]=I):I=t[25];let B;t[26]!==ue||t[27]!==F||t[28]!==I||t[29]!==M?(B=(0,z.jsxs)(ue,{size:`wide`,children:[M,F,I]}),t[26]=ue,t[27]=F,t[28]=I,t[29]=M,t[30]=B):B=t[30];let ge;return t[31]!==se||t[32]!==B||t[33]!==ce||t[34]!==k?(ge=(0,z.jsx)(se,{open:ce,onOpenChange:k,children:B}),t[31]=se,t[32]=B,t[33]=ce,t[34]=k,t[35]=ge):ge=t[35],ge}var be=_(u),xe=_(g),Se=/^[A-Za-z0-9_./:\\-]+$/;function Ce(e,t,n){return Se.test(e)&&(n===`windows`||!e.includes(`\\`))?e:n===`windows`?`& '${e.replaceAll(`'`,`''`)}'`:n===`darwin`||n===`linux`?e.startsWith(`~/`)||e.startsWith(`~\\`)?`~/'${e.slice(2).replaceAll(`'`,`'"'"'`)}'`:`'${e.replaceAll(`'`,`'"'"'`)}'`:t}function we(e){return e===void 0?`checking`:!e.enabled||e.status===`disabled`?`disabled`:!e.installed&&e.status===`warning`&&e.auth.status===`unknown`?`checking`:e.installed?e.auth.status===`unauthenticated`?`signIn`:e.status===`ready`?`ready`:`attention`:`install`}var V={checking:0,disabled:1,install:2,attention:3,signIn:4,ready:5};function H(e){let t=new Map;for(let n of e??[]){let e=t.get(n.driver);(e===void 0||V[we(n)]>V[we(e)])&&t.set(n.driver,n)}return t}var Te={claudeAgent:{windows:`irm https://claude.ai/install.ps1 | iex`,posix:`curl -fsSL https://claude.ai/install.sh | bash`},codex:{windows:`irm https://chatgpt.com/codex/install.ps1 | iex`,posix:`curl -fsSL https://chatgpt.com/codex/install.sh | sh`}};function Ee(e,t){let n=Te[e];return t===`windows`?n.windows:n.posix}function De(e,t,n){let r=t.providerInstances[e.instanceId];if(e.driver===`claudeAgent`){let e=be(r?.config??{});return`${Ce(c(e)?e.value.binaryPath:`claude`,`claude`,n)} auth login`}if(e.driver===`codex`){let e=xe(r?.config??{});return`${Ce(c(e)?e.value.binaryPath:`codex`,`codex`,n)} login`}return e.driver}var Oe={disabled:{dot:`bg-muted-foreground/50`},error:{dot:`bg-destructive`},ready:{dot:`bg-success`},warning:{dot:`bg-warning`}};function U(e){if(!e)return{headline:`Checking provider status`,detail:`Waiting for the server to report installation and authentication details.`};if(!e.enabled||e.status===`disabled`)return{headline:`Disabled`,detail:e.message??`This provider is installed but disabled for new sessions in P4 Code.`};if(!e.installed)return{headline:`Not found`,detail:e.message??`CLI not detected on PATH.`};if(e.auth.status===`unauthenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Not authenticated · ${t}`:`Not authenticated`,detail:e.message??null}}if(e.status===`warning`)return{headline:`Needs attention`,detail:e.message??`The provider is installed, but the server could not fully verify it.`};if(e.status===`error`)return{headline:`Unavailable`,detail:e.message??`The provider failed its startup checks.`};if(e.auth.status===`authenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Authenticated · ${t}`:`Authenticated`,detail:e.message??null}}return{headline:`Available`,detail:e.message??null}}function ke(e){if(!e)return null;let t=/^agy_acp_server_(\d{4})(\d{2})(\d{2})_\d+(?:_(\w+))?$/.exec(e);if(t){let[,e,n,r,i]=t;return`${e}-${n}-${r}${i?` ${i}`:``}`}return/^\d/.test(e)?`v${e}`:e}var Ae={graceful:`Limited support`,unsupported:`Unsupported version`,broken:`Known broken version`};function je(e,t,n=!0){let r=t?.latestVersionStatus===`broken`||t?.latestVersionStatus===`unsupported`;if(n&&t&&(t.status===`graceful`||t.status===`unsupported`||t.status===`broken`)){let n=t.recommendedVersion,i=ke(n)??t.recommendedRange;return{title:Ae[t.status],detail:t.message??(i?`Use ${i} for full support.`:`Update for full support.`),updateCommand:n||r?null:e?.updateCommand??null,emphasis:t.status===`graceful`?`normal`:`strong`,targetVersion:n}}if(!e||e.status===`current`||e.status===`unknown`||r)return null;let i=`Update available`,a=e.latestVersion,o=ke(a);return{title:i,detail:e.message??(o?`${i}: install ${o}.`:`${i}: install the latest provider version.`),updateCommand:e.updateCommand,emphasis:`normal`,targetVersion:null}}var Me=()=>void 0;function Ne(e){let t=(0,R.c)(11),[n,r]=(0,L.useState)(!1),i;t[0]===e.provider?i=t[1]:(i=we(e.provider),t[0]=e.provider,t[1]=i);let a=i,o=e.enabled&&a===`ready`,s=e.provider?.auth.status===`authenticated`,c=a===`checking`,u;t[2]===e.provider?u=t[3]:(u=U(e.provider),t[2]=e.provider,t[3]=u);let f=u,p;return t[4]!==s||t[5]!==c||t[6]!==o||t[7]!==f||t[8]!==e||t[9]!==n?(p=e.mode===`existing`&&e.presentation===`onboarding`?(0,z.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:o?e.provider?.auth.email?.trim()?(0,z.jsxs)(z.Fragment,{children:[`Signed in as`,` `,(0,z.jsx)(M,{value:e.provider.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected with your Codex CLI.`:c?`Checking your Codex CLI...`:e.provider?.installed?f.headline:`Code with your ChatGPT subscription.`,control:o?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,z.jsx)(d,{className:`size-3.5`}),`Ready`]}):c?(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):s?(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:f.headline}):(0,z.jsx)(B,{size:`sm`,disabled:e.readOnly,onClick:()=>{r(!0),e.onModeChange(`managed`)},children:`Continue with ChatGPT`}),secondaryControl:!s&&!o&&!c?(0,z.jsx)(l,{size:`sm`,variant:`ghost-muted`,onClick:()=>e.onModeChange(`existing`),children:`Use existing CLI`}):null}):e.mode===`existing`?null:e.provider?.setup===void 0?e.presentation===`onboarding`?(0,z.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:(0,z.jsx)(Ie,{}),control:(0,z.jsx)(l,{size:`sm`,variant:`outline`,className:`min-w-44`,disabled:!0,children:`Open sign-in page`}),secondaryControl:(0,z.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:!0,children:`Cancel`})}):(0,z.jsx)(j,{title:`ChatGPT account`,description:`Preparing sign-in.`}):(0,z.jsx)(Fe,{...e,autoStart:n||e.autoStart===!0,onAutoStartConsumed:()=>{r(!1),e.onAutoStartConsumed?.()}},`${e.environmentId}:${e.instanceId}`),t[4]=s,t[5]=c,t[6]=o,t[7]=f,t[8]=e,t[9]=n,t[10]=p):p=t[10],p}function Pe(e){let t=(0,R.c)(9),{environmentId:n,onClose:r,onAccountCreated:a}=e,o=w(n,i),s;t[0]!==o||t[1]!==n||t[2]!==r?(s=(e,t)=>(0,z.jsx)(Fe,{environmentId:n,instanceId:e,provider:t,mode:`managed`,enabled:!0,readOnly:!o,autoStart:!0,onAutoStartConsumed:Me,onModeChange:Me,onSignInCancelled:r,allowExistingCli:!1},e),t[0]=o,t[1]=n,t[2]=r,t[3]=s):s=t[3];let c;return t[4]!==n||t[5]!==a||t[6]!==r||t[7]!==s?(c=(0,z.jsx)(ye,{environmentId:n,onClose:r,onAccountCreated:a,renderSetup:s}),t[4]=n,t[5]=a,t[6]=r,t[7]=s,t[8]=c):c=t[8],c}function Fe({environmentId:e,instanceId:t,provider:n,enabled:r,readOnly:i,onModeChange:a,autoStart:o,onAutoStartConsumed:s,allowExistingCli:c=!0,presentation:u,displayName:f,onSignInCancelled:h}){let g={environmentId:e,input:{instanceId:t}},_=re(C.providerAuthState(g)),te=re(C.providerInstallState(g)),[w,ne]=(0,L.useState)(null),E=re(w?C.chatGptHandoffState(w):null),D=E.data?.phase===`auth`?E.data.state:_.data,[ae,O]=(0,L.useState)(!1),[oe,se]=(0,L.useState)(`chatgpt`),ce=D?.methods?.find(e=>e.id===`chatgpt`)?.accountEmail,le=D?.methods?.find(e=>e.id===oe)?.accountEmail,k=D?.methods?.some(e=>e.id.startsWith(`chatgpt-profile:`)),A=D?.interaction?.type===`browser`?D.interaction.url:D?.authorizationUrl,N=te.data,me=ee(e),he=me!==null&&ue(new URL(me).hostname),P={reportFailure:!1,reportDefect:!1},R=T(C.startProviderAuth,P),_e=T(C.refreshProviders,P),ve=T(C.completeProviderAuth,P),ye=T(C.cancelProviderAuth,P),be=T(C.logoutProviderAuth,P),xe=T(C.startProviderInstall,P),Se=T(C.cancelProviderInstall,P),Ce=T(C.chatGptReconnectProfile,P),we=T(C.chatGptImportProfile,P),V=!w&&(!he||window.desktopBridge?.receiveProviderAuthCallback!==void 0),H=V&&!window.desktopBridge?.receiveProviderAuthCallback,Te=b(),Ee=S(Te),De=ee(Te),Oe=!he&&Te&&Ee?.connection.phase===`connected`&&De&&ue(new URL(De).hostname)&&(window.desktopBridge!==void 0||ue(window.location.hostname))?Te:null,U=new URL(window.location.href);U.pathname===`/welcome`&&(U.hash=`agents:${e}`),U.pathname===`/settings/providers`&&U.searchParams.set(`instanceId`,t);let ke=H,Ae=(0,L.useId)(),[je,Me]=(0,L.useState)(!1),[Ne,Pe]=(0,L.useState)({flowId:``,value:``}),Fe=Ne.flowId===D?.flowId?Ne.value:``,[W,Re]=(0,L.useState)(!1),[ze,Be]=(0,L.useState)(null),Ve=(0,L.useRef)(!1),[He,Ue]=(0,L.useState)(null),G=(0,L.useRef)(null),We=(0,L.useRef)(!1),Ge=(0,L.useRef)(null),[Ke,qe]=(0,L.useState)(!1),K=N?.installedVersion!=null,q=n?.auth.status===`authenticated`,Je=K&&N?.source!==`local`&&N?.version!=null&&N.version!==N.installedVersion,Ye=ze!==null&&!q&&(D?.phase===`succeeded`||ze===`handoff`);(0,L.useEffect)(()=>{(q||D?.phase===`failed`||D?.phase===`cancelled`)&&Be(null)},[q,D?.phase]),(0,L.useEffect)(()=>{ze&&D?.phase===`succeeded`&&_e({environmentId:e,input:{instanceId:t}})},[ze,D?.phase,_e,e,t]);let Xe=o&&!Ke,Ze=ze===`sign-in`&&!q&&(D===null||D.phase===`idle`),Qe=Ye||Ze||w!==null||D?.phase===`starting`||D?.phase===`waiting`||D?.phase===`verifying`,J=N?.phase===`downloading`||N?.phase===`extracting`||N?.phase===`verifying`,Y=Xe||Qe||W&&!J,X=i||!r||W||_.error!==null||te.error!==null,Z=W||Qe||J,Q=(0,L.useCallback)(async(e,t)=>{if(Ve.current)return!1;Ve.current=!0,Re(!0),Ue(null);let n=!1;try{let r=await e();if(r._tag===`Failure`){if(!v(r)){let e=y(r);Ue(e instanceof Error?e.message:`Codex setup failed. Try again.`)}}else n=!0,t?.(r.value)}catch{Ue(`Codex setup failed. Try again.`)}return Ve.current=!1,Re(!1),n},[]),$e=(0,L.useId)(),et=(0,L.useRef)(0),tt=(0,L.useRef)(null),[nt,rt]=(0,L.useState)(!1),it=(0,L.useCallback)(async n=>{let r=await Q(()=>we({environmentId:e,input:{instanceId:t,profile:n}}));r&&(Be(`handoff`),ne(null)),rt(!r)},[Q,we,e,t]);(0,L.useEffect)(()=>{if(!w||E.data?.phase!==`finished`)return;let e=w.input.attemptId;tt.current!==e&&(tt.current=e,it(E.data.profile))},[w,E.data,it]),(0,L.useEffect)(()=>{w&&(E.error||E.data?.phase===`auth`&&[`failed`,`cancelled`].includes(E.data.state.phase))&&(Ue(E.data?.phase===`auth`?E.data.state.message??`ChatGPT sign-in could not finish. Try again.`:`ChatGPT sign-in on the primary environment was interrupted. Try again.`),ne(null))},[w,E.data,E.error]);let at=(0,L.useCallback)(()=>(Be(null),w?(ne(null),Promise.resolve()):Q(()=>ye({environmentId:e,input:{instanceId:t,flowId:D.flowId}}))),[w,Q,ye,e,t,D]),ot=(0,L.useCallback)(async(n=`chatgpt`)=>{if(Ve.current)return;We.current=!0,rt(!1),se(n);let r=new URL(window.location.href);if(r.pathname===`/welcome`&&(r.hash=`agents:${e}`),r.pathname===`/settings/providers`&&r.searchParams.set(`instanceId`,t),Oe){let i=`${$e}:${++et.current}`;await Q(()=>Ce({environmentId:e,input:{instanceId:t,methodId:n}}),n=>ne({environmentId:Oe,input:{instanceId:t,environmentId:e,attemptId:i,returnUrl:r.toString(),profile:n}}))||(We.current=!1)}else await Q(()=>R({environmentId:e,input:{instanceId:t,methodId:n,returnUrl:r.toString(),callbackMode:V?`client`:`server`}}),()=>Be(`sign-in`))||(We.current=!1)},[e,t,Q,R,V,Oe,Ce,$e]),$=(0,L.useCallback)(async(n=`chatgpt`)=>{X||Z||(K&&!Je?await ot(n):(G.current=n,await Q(()=>xe({environmentId:e,input:{instanceId:t}}))||(G.current=null)))},[X,Z,K,Je,ot,Q,xe,e,t]);(0,L.useEffect)(()=>{!o||Ke||X||Z||N===null||!n?.setup?.canInstall||(qe(!0),s(),$())},[o,Ke,X,Z,N,n?.setup?.canInstall,s,$]),(0,L.useEffect)(()=>{if(!(!G.current||W||J)){if(N?.phase===`failed`||N?.phase===`cancelled`)G.current=null;else if(K){let e=G.current;G.current=null,ot(e)}}},[W,J,N?.phase,K,ot]);let st=(0,L.useRef)(null),ct=D?.flowId,lt=(0,L.useCallback)(async n=>{try{let r=window.desktopBridge?.receiveProviderAuthCallback;if(r&&V&&ct){if(st.current===n){await x().shell.openExternal(n);return}st.current=n;let i=await r(n);if(st.current!==n)return;st.current=null,await Q(()=>ve({environmentId:e,input:{instanceId:t,flowId:ct,callbackUrl:i}}))}else await x().shell.openExternal(n)}catch{Ue(`Could not finish sign-in on this computer. Try again or paste the redirect URL below.`)}},[V,ct,Q,ve,e,t]);(0,L.useEffect)(()=>{if(V&&A&&window.desktopBridge?.cancelProviderAuthCallback)return()=>{st.current===A&&(st.current=null),window.desktopBridge?.cancelProviderAuthCallback?.(A).catch(()=>void 0)}},[V,A]),(0,L.useEffect)(()=>{We.current&&D?.phase===`waiting`&&D.flowId&&A&&Ge.current!==D.flowId&&(Ge.current=D.flowId,We.current=!1,H||lt(A))},[D?.phase,D?.flowId,A,lt,H]);let ut=N?.phase===`downloading`?`Downloading ${(N.downloadedBytes/1e6).toFixed(1)}${N.totalBytes===null?``:` of ${(N.totalBytes/1e6).toFixed(1)}`} MB.`:N?.phase===`extracting`?`Installing Codex.`:N?.phase===`verifying`?`Checking Codex.`:K?`${N?.source===`local`?`Using your installed Codex`:`Managed by P4 Code`}${N?.installedVersion?` · v${N.installedVersion}`:``}.`:N?.message??`P4 Code downloads and manages Codex for you.`,dt=Ye?`Finishing sign-in...`:J?ut:Y||D?.phase===`failed`||D?.phase===`cancelled`?D?.phase===`waiting`&&le?`Continue as ${le} on OpenAI.`:D?.message??`Finish signing in in your browser.`:q?n?.auth.email?.trim()?(0,z.jsxs)(z.Fragment,{children:[`Signed in as`,` `,(0,z.jsx)(M,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`}),`.`]}):`Signed in with ChatGPT.`:ce??`Use your ChatGPT subscription.`,ft=ke&&A&&D?.flowId&&fe(U.toString())?I({authorizationUrl:A,returnUrl:U.toString(),environmentId:e,instanceId:t,flowId:D.flowId},!1):null,pt=(0,z.jsx)(l,{size:`sm`,variant:H?`default`:`outline`,className:u===`onboarding`?`min-w-44`:void 0,disabled:E.data?.phase===`finished`?W||!nt:!A||D?.phase!==`waiting`,onClick:()=>{E.data?.phase===`finished`?it(E.data.profile):A&<(A)},children:Ye?`Finishing sign-in...`:E.data?.phase===`finished`?nt?`Retry connection`:`Finishing sign-in...`:D?.phase===`waiting`?H?`Open ChatGPT sign-in`:`Open sign-in page`:u===`onboarding`?`Open sign-in page`:`Signing in...`}),mt=!w&&D?.phase===`waiting`&&A?(0,z.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-xs leading-relaxed text-muted-foreground`,children:[(0,z.jsx)(`p`,{children:`If sign-in doesn't return to P4 Code, paste the URL from the final localhost page.`}),(0,z.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,onSubmit:n=>{if(n.preventDefault(),!D.flowId||!Fe.trim())return;let r=Fe.trim(),i=D.flowId;Q(()=>ve({environmentId:e,input:{instanceId:t,flowId:i,callbackUrl:r}})).then(e=>{e&&Pe({flowId:i,value:``})})},children:[(0,z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,z.jsx)(ie,{"aria-label":`ChatGPT sign-in redirect URL`,type:`password`,autoComplete:`off`,placeholder:`Paste the URL from the sign-in tab`,value:Fe,maxLength:16384,disabled:W||i,onChange:e=>Pe({flowId:D.flowId??``,value:e.target.value})})}),(0,z.jsx)(l,{variant:`outline`,type:`submit`,disabled:W||i||!Fe.trim(),children:`Connect`})]}),H?null:(0,z.jsx)(`div`,{children:(0,z.jsxs)(l,{size:`xs`,variant:`ghost-muted`,onClick:()=>void x().shell.openExternal(A),children:[`Try sign-in in your browser`,(0,z.jsx)(p,{className:`size-3.5`})]})}),ft?(0,z.jsxs)(`details`,{children:[(0,z.jsx)(`summary`,{className:`cursor-pointer`,children:`Other ways to connect`}),(0,z.jsx)(l,{className:`mt-2`,size:`sm`,variant:`outline`,render:(0,z.jsx)(`a`,{href:ft}),children:`Use P4 Code desktop for automatic return`})]}):null]}):null,ht=e=>mt?(0,z.jsx)(F,{open:je,children:(0,z.jsx)(pe,{children:(0,z.jsx)(`div`,{id:Ae,className:m(`w-full border-t border-border/50 pt-3`,e),children:mt})})}):null,gt=ke?mt:mt?(0,z.jsxs)(`div`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[(0,z.jsx)(Ie,{label:`Having trouble signing in?`,expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}),ht(`mt-3`)]}):null,_t=(0,z.jsx)(ge,{open:ae,methods:D?.methods??[],onClose:()=>O(!1),onSelect:e=>{O(!1),$(D?.methods?.some(t=>t.id===e)?e:`chatgpt-change-account`)}}),vt=D?.phase===`idle`&&D.message?.startsWith(`Signed out locally.`)?D.message:null;if(u===`onboarding`){let r=vt??He??(_.error||te.error?`Could not read setup status. Reconnect and try again.`:N?.phase===`failed`?N.message:null);return(0,z.jsxs)(z.Fragment,{children:[_t,(0,z.jsxs)(Le,{title:f||n?.displayName||`Codex`,description:J?ut:q?n?.auth.email?.trim()?(0,z.jsxs)(z.Fragment,{children:[`Signed in as`,` `,(0,z.jsx)(M,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected to ChatGPT.`:mt&&!ke?(0,z.jsx)(Ie,{expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}):Xe||Ze||D?.phase===`starting`||D?.phase===`waiting`||W&&!J?(0,z.jsx)(Ie,{}):Y||D?.phase===`failed`||D?.phase===`cancelled`?dt:`Code with your ChatGPT subscription.`,control:q&&!Z?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,z.jsx)(d,{className:`size-3.5`}),`Ready`]}):Y?pt:(0,z.jsx)(B,{size:`sm`,disabled:X||Z||(K?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):$()},children:J||W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),secondaryControl:Y&&!Ye||J?(0,z.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:W||i,onClick:()=>{We.current=!1,G.current=null,w||Y&&D?.flowId?at():N?.operationId&&Q(()=>Se({environmentId:e,input:{instanceId:t,operationId:N.operationId}}))},children:`Cancel`}):!Y&&!q&&k?(0,z.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:X||Z,onClick:()=>void $(`chatgpt-change-account`),children:`Use a different account`}):!Y&&!q&&c?(0,z.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:i||Z,onClick:()=>a(`existing`),children:`Use existing CLI`}):null,children:[ke?gt:ht(),r?(0,z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r}):null]})]})}return(0,z.jsxs)(`section`,{"aria-label":`Codex setup`,className:`divide-y divide-border/50`,children:[_t,(0,z.jsx)(j,{title:`ChatGPT account`,description:dt,control:(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:Y?(0,z.jsxs)(z.Fragment,{children:[pt,!Ye&&(0,z.jsx)(l,{size:`sm`,variant:`ghost`,disabled:W||i,onClick:()=>{(w||D?.flowId)&&(We.current=!1,at(),h?.())},children:`Cancel`})]}):J?(0,z.jsx)(l,{size:`sm`,variant:`ghost`,disabled:W||i,onClick:()=>{N?.operationId&&(G.current=null,Q(()=>Se({environmentId:e,input:{instanceId:t,operationId:N.operationId}})))},children:`Cancel`}):q?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(l,{size:`sm`,variant:`outline`,disabled:X||Z,onClick:()=>O(!0),children:`Change account`}),(0,z.jsx)(l,{size:`sm`,variant:`ghost`,disabled:X||Z,onClick:()=>void Q(()=>be(g)),children:`Disconnect`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{size:`sm`,disabled:X||Z||(K?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):$()},children:W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),k?(0,z.jsx)(l,{size:`sm`,variant:`ghost`,disabled:X||Z,onClick:()=>void $(`chatgpt-change-account`),children:`Use a different account`}):null]})})}),q?(0,z.jsx)(`div`,{className:`flex justify-end px-3 py-1 sm:px-4`,children:(0,z.jsx)(de,{})}):null,vt?(0,z.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-muted-foreground sm:px-4`,children:vt}):null,gt?(0,z.jsx)(`div`,{className:`px-3 py-3 sm:px-4`,children:gt}):null,He||_.error||te.error||N?.phase===`failed`?(0,z.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive sm:px-4`,children:He??(N?.phase===`failed`?N.message:`Could not read Codex setup status. Reconnect and try again.`)}):null]})}function W(e){let t=(0,R.c)(20),{environmentId:n,instanceId:r,provider:i}=e,a;t[0]!==n||t[1]!==r?(a=C.providerInstallState({environmentId:n,input:{instanceId:r}}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=re(a),s=o.data?.executablePath??``,c=o.error?`Could not read runtime path`:`Not installed`,l;t[3]!==s||t[4]!==c?(l=(0,z.jsx)(j,{title:`Binary path`,description:`Selected by P4 Code.`,control:(0,z.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,z.jsx)(ie,{"aria-label":`Codex binary path`,value:s,title:s,placeholder:c,disabled:!0})})}),t[3]=s,t[4]=c,t[5]=l):l=t[5];let u=i?.runtimePaths?.homePath??``,d=i?.runtimePaths?.homePath,f;t[6]!==u||t[7]!==d?(f=(0,z.jsx)(j,{title:`CODEX_HOME path`,description:`Shared Codex config, sessions, and state.`,control:(0,z.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,z.jsx)(ie,{"aria-label":`Codex home path`,value:u,title:d,placeholder:`Unavailable`,disabled:!0})})}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p=i?.runtimePaths?.shadowHomePath?`Account-specific home sharing the Codex state above.`:`This instance uses the shared Codex home directly.`,m=i?.runtimePaths?.shadowHomePath??``,h=i?.runtimePaths?.shadowHomePath??void 0,g=i?.runtimePaths?`Not used`:`Unavailable`,_;t[9]!==g||t[10]!==m||t[11]!==h?(_=(0,z.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,z.jsx)(ie,{"aria-label":`Codex shadow home path`,value:m,title:h,placeholder:g,disabled:!0})}),t[9]=g,t[10]=m,t[11]=h,t[12]=_):_=t[12];let v;t[13]!==_||t[14]!==p?(v=(0,z.jsx)(j,{title:`Shadow home path`,description:p,control:_}),t[13]=_,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==l||t[18]!==f?(y=(0,z.jsxs)(z.Fragment,{children:[l,f,v]}),t[16]=v,t[17]=l,t[18]=f,t[19]=y):y=t[19],y}function Ie(e){let t=(0,R.c)(10),{label:n,expanded:r,controls:i,onToggle:a}=e,o=n===void 0?`Complete sign-in in your browser.`:n,c=r!==void 0&&r;if(!a){let e;return t[0]===o?e=t[1]:(e=(0,z.jsx)(`div`,{className:`leading-relaxed`,children:o}),t[0]=o,t[1]=e),e}let l=`size-3 shrink-0 ${c?`rotate-90`:``}`,u;t[2]===l?u=t[3]:(u=(0,z.jsx)(s,{"aria-hidden":!0,className:l}),t[2]=l,t[3]=u);let d;return t[4]!==i||t[5]!==c||t[6]!==o||t[7]!==a||t[8]!==u?(d=(0,z.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-sm text-left leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,"aria-label":`Having trouble signing in?`,"aria-expanded":c,"aria-controls":i,onClick:a,children:[o,u]}),t[4]=i,t[5]=c,t[6]=o,t[7]=a,t[8]=u,t[9]=d):d=t[9],d}function Le(e){let t=(0,R.c)(21),{title:n,description:r,control:i,secondaryControl:a,children:o}=e,s;t[0]===o?s=t[1]:(s=L.Children.toArray(o),t[0]=o,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(k,{className:`size-5 shrink-0 fill-foreground`}),t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,z.jsx)(`h3`,{className:`text-sm font-medium`,children:n}),t[3]=n,t[4]=u);let d;t[5]===r?d=t[6]:(d=(0,z.jsx)(`div`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:r}),t[5]=r,t[6]=d);let f;t[7]!==u||t[8]!==d?(f=(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]!==i||t[11]!==a?(p=i||a?(0,z.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 has-[button]:w-full has-[button]:flex-col-reverse has-[button]:items-end sm:has-[button]:w-auto sm:has-[button]:flex-row sm:has-[button]:items-center`,children:[a,i]}):null,t[10]=i,t[11]=a,t[12]=p):p=t[12];let m;t[13]!==f||t[14]!==p?(m=(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[l,f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h;t[16]===c?h=t[17]:(h=c.length>0?(0,z.jsx)(`div`,{className:`ml-8 mt-2 flex flex-wrap items-center gap-2`,children:c}):null,t[16]=c,t[17]=h);let g;return t[18]!==m||t[19]!==h?(g=(0,z.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-4`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function Re(e){return typeof e==`object`&&e&&`setupMode`in e&&e.setupMode===`managed`?`managed`:`existing`}export{Oe as a,ke as c,De as d,H as f,Ne as i,we as l,Pe as n,U as o,B as p,W as r,je as s,Re as t,Ee as u};
|
|
2
|
-
//# sourceMappingURL=CodexSetupSection.logic-D3odRubx.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$x as i,A as a,Ad as o,D as s,Ef as c,Es as l,Fm as u,I as d,Jx as f,Ky as p,Ms as m,Qd as h,Wc as g,Wp as _,Yn as v,am as y,as as ee,cd as b,cr as x,dr as S,kd as te,lr as C,mx as ne,nr as re,ns as w,ny as ie,qf as T,rr as E,rs as ae,sm as oe,sr as se,ss as ce,t as D,tr as O,ts as le,uC as ue,ur as k,xg as A}from"./utils-Dv1DrWoz.js";import{M as j,N as M,R as N,W as P,Z as F,_t as de,j as I,k as L}from"./runtime-B6yGAVz4.js";import{s as R}from"./vcsRefInvalidation-BI3mMuIW.js";import{D as z,T as B,x as fe}from"./entities-Cd_YDhEa.js";import{t as pe}from"./runtime-BhGr1QCf.js";import{S as me,d as he,f as ge,g as _e,h as ve,l as ye,p as V}from"./TooltipViewport-UaR0JZsl.js";import{t as be}from"./useParams-CZ_VOC6E.js";import{l as xe,p as Se}from"./toast-UFTwkJWj.js";import{a as Ce,i as we,n as Te,r as Ee,t as De}from"./DiffFileTree-BJxoYt-I.js";import{G as Oe,_ as ke,s as Ae}from"./useSettings-BAP_yCCK.js";import{f as je}from"./server-Dc9414wM.js";import{n as Me}from"./query-B1dBedyO.js";import{t as Ne}from"./use-atom-command-BT7sz8Lx.js";import{d as Pe,f as Fe}from"./providerSkills-DRtgduYo.js";import{t as Ie,u as Le}from"./queries-DMkaYL1H.js";import{a as Re,c as ze,l as Be,n as Ve,o as He,r as Ue,s as We,u as H}from"./diffRendering-DU37Uneg.js";import{I as Ge,L as U,P as Ke,R as qe,z as Je}from"./PanelLayoutControls-CwJW9Vo-.js";import{t as Ye}from"./DiffCommentAnnotation-C3_yEiAB.js";import{c as Xe}from"./timestampFormat-wac2e_Jz.js";import{a as W,n as Ze,t as Qe}from"./tooltip-B1rLXiVx.js";import{n as $e}from"./fileCommentAnnotations-BgdL_7u9.js";import{n as et,t as tt}from"./toggle-group-DS75Gx6B.js";import{i as nt,l as rt,n as it,o as at,r as ot,s as st,t as ct}from"./combobox-CzEFd5LA.js";import{_o as lt,bo as ut,do as dt,uo as ft}from"./main-om7hc1qE.js";import{A as pt,C as mt,D as ht,E as gt,O as _t,T as vt,k as yt,w as G}from"./_chat-BWNTWBCr.js";var K=e(t(),1),q=n();function bt(e,t){let n=(0,q.c)(4),r=Ie(e,t),i;return n[0]!==r.data||n[1]!==r.error||n[2]!==r.isPending?(i={data:r.data,error:r.error,isPending:r.isPending},n[0]=r.data,n[1]=r.error,n[2]=r.isPending,n[3]=i):i=n[3],i}var J=e(r(),1);function xt(e){let t=(0,q.c)(17),{filePath:n}=e,r=(0,K.useRef)(null),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={onCopy:()=>gt(r),onError:e=>vt(r,e),timeout:G},t[0]=i):i=t[0];let{copyToClipboard:a,isCopied:o}=Se(i),s;t[1]!==a||t[2]!==n?(s=(0,J.jsx)(S,{ref:r,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Copy file path`,onClick:()=>a(n,void 0)}),t[1]=a,t[2]=n,t[3]=s):s=t[3];let c=o&&`text-success`,l;t[4]===c?l=t[5]:(l=D(`size-3`,c),t[4]=c,t[5]=l);let u=o?he:me,d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(ye,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]!==s||t[10]!==d?(f=(0,J.jsx)(W,{render:s,children:d}),t[9]=s,t[10]=d,t[11]=f):f=t[11];let p=o?`Copied`:`Copy path`,m;t[12]===p?m=t[13]:(m=(0,J.jsx)(Ze,{children:(0,J.jsx)(`p`,{children:p})}),t[12]=p,t[13]=m);let h;return t[14]!==f||t[15]!==m?(h=(0,J.jsxs)(Qe,{children:[f,m]}),t[14]=f,t[15]=m,t[16]=h):h=t[16],h}var St=[];function Ct(e){return(e.endSide??e.side)===`deletions`?`deletions`:`additions`}function Y(e,t,n){let r=Ct(t),i=e.findIndex(e=>e.side===r&&e.lineNumber===t.end);return i<0?[...e,{side:r,lineNumber:t.end,metadata:{entries:[n]}}]:e.map((e,t)=>t===i?{...e,metadata:{entries:[...e.metadata.entries,n]}}:e)}function wt(e){let t=(0,q.c)(66),{codeViewKey:n,files:r,sectionId:i,sectionTitle:o,composerDraftTarget:c,options:l,viewerRef:u,className:f,renderCodeViewFooter:p,unsafeCSSExtra:m,renderHeaderMetadata:h,renderHeaderFilenameSuffix:g,renderHeaderPrefix:_,onRevealSearchMatch:v}=e,y=s(kt),ee=s(X),b;t[0]===c?b=t[1]:(b=e=>e.getComposerDraft(c)?.reviewComments??St,t[0]=c,t[1]=b);let x=s(b),[S,te]=(0,K.useState)(null),[C,ne]=(0,K.useState)(null),[re,w]=(0,K.useState)(``),ie;t[2]===r?ie=t[3]:(ie=new Map(r.map(Ot)),t[2]=r,t[3]=ie);let T=ie,E;if(t[4]!==C||t[5]!==r||t[6]!==x||t[7]!==i){let e;t[9]!==C||t[10]!==x||t[11]!==i?(e=e=>{let{fileDiff:t,filePath:n,fileKey:r,fileVersion:a,collapsed:o}=e,s=x.filter(e=>e.sectionId===i&&e.filePath===n&&(e.fenceLanguage??`diff`)===`diff`).reduce((e,n)=>{let r=d(t,n);return r?Y(e,r,{id:n.id,kind:`comment`,range:r,rangeLabel:n.rangeLabel,text:n.text}):e},[]),c=C?.fileKey===r?[...s,C.annotation]:s;return{id:r,type:`diff`,fileDiff:t,annotations:c,collapsed:o,version:Re(`${a}:${o?`1`:`0`}:${c.flatMap(Et).join(`:`)}`)}},t[9]=C,t[10]=x,t[11]=i,t[12]=e):e=t[12],E=r.map(e),t[4]=C,t[5]=r,t[6]=x,t[7]=i,t[8]=E}else E=t[8];let ae=E,oe;t[13]!==c||t[14]!==C?.annotation||t[15]!==ee?(oe=e=>{te(null),C?.annotation.metadata.entries.some(t=>t.id===e)?(ne(null),w(``)):ee(c,e)},t[13]=c,t[14]=C?.annotation,t[15]=ee,t[16]=oe):oe=t[16];let se=oe,ce;t[17]!==y||t[18]!==c||t[19]!==C||t[20]!==T||t[21]!==i||t[22]!==o?(ce=(e,t)=>{let n=C?.annotation.metadata.entries.find(t=>t.id===e),r=C?T.get(C.fileKey):void 0;if(!n||!r)return;let s=a({id:n.id,sectionId:i,sectionTitle:o,filePath:r.filePath,fileDiff:r.fileDiff,range:n.range,text:t});s&&y(c,s),te(null),ne(null),w(``)},t[17]=y,t[18]=c,t[19]=C,t[20]=T,t[21]=i,t[22]=o,t[23]=ce):ce=t[23];let D=ce,O;t[24]!==i||t[25]!==o?(O=(e,t)=>{if(!e)return;let n=t.item;if(n.type!==`diff`)return;let r=$e(),s=a({id:r,sectionId:i,sectionTitle:o,filePath:H(n.fileDiff),fileDiff:n.fileDiff,range:e,text:``});s&&(w(``),ne({fileKey:n.id,annotation:{side:Ct(e),lineNumber:e.end,metadata:{entries:[{id:r,kind:`draft`,range:e,rangeLabel:s.rangeLabel,text:``}]}}}))},t[24]=i,t[25]=o,t[26]=O):O=t[26];let le=O,ue=C!==null,k;t[27]===u?k=t[28]:(k=u?{viewerRef:u}:{},t[27]=u,t[28]=k);let A;t[29]===f?A=t[30]:(A=f?{className:f}:{},t[29]=f,t[30]=A);let j;t[31]===m?j=t[32]:(j=m?{unsafeCSSExtra:m}:{},t[31]=m,t[32]=j);let M;t[33]===h?M=t[34]:(M=h?{renderHeaderMetadata:e=>e.type===`diff`?h(e.fileDiff):null}:{},t[33]=h,t[34]=M);let N;t[35]===p?N=t[36]:(N=p?{renderCodeViewFooter:p}:{},t[35]=p,t[36]=N);let P;t[37]===v?P=t[38]:(P=e=>v(e.id),t[37]=v,t[38]=P);let F=!ue,de=!ue,I;t[39]!==le||t[40]!==l||t[41]!==F||t[42]!==de?(I={...l,enableGutterUtility:F,enableLineSelection:de,onGutterUtilityClick:le},t[39]=le,t[40]=l,t[41]=F,t[42]=de,t[43]=I):I=t[43];let L;t[44]===g?L=t[45]:(L=e=>e.type===`diff`?g(e.fileDiff):null,t[44]=g,t[45]=L);let R;t[46]===_?R=t[47]:(R=e=>e.type===`diff`?_(e.fileDiff,e.id,e.collapsed===!0):null,t[46]=_,t[47]=R);let z;t[48]!==re||t[49]!==se||t[50]!==D?(z=e=>{let t=e.metadata.entries.some(Tt);return(0,J.jsx)(`div`,{className:t?`py-1`:`divide-y divide-border/30 border-y border-border/30`,children:e.metadata.entries.map(e=>(0,J.jsx)(Ye,{kind:e.kind,rangeLabel:e.rangeLabel,text:e.kind===`draft`?re:e.text,onTextChange:w,onCancel:()=>se(e.id),onComment:t=>D(e.id,t),onDelete:()=>se(e.id)},e.id))})},t[48]=re,t[49]=se,t[50]=D,t[51]=z):z=t[51];let B;return t[52]!==n||t[53]!==ae||t[54]!==S||t[55]!==M||t[56]!==N||t[57]!==P||t[58]!==I||t[59]!==L||t[60]!==R||t[61]!==z||t[62]!==k||t[63]!==A||t[64]!==j?(B=(0,J.jsx)(Ge,{...k,...A,...j,...M,...N,items:ae,selectedLines:S,onSelectedLinesChange:te,onRevealSearchMatch:P,options:I,renderHeaderFilenameSuffix:L,renderHeaderPrefix:R,renderAnnotation:z},n),t[52]=n,t[53]=ae,t[54]=S,t[55]=M,t[56]=N,t[57]=P,t[58]=I,t[59]=L,t[60]=R,t[61]=z,t[62]=k,t[63]=A,t[64]=j,t[65]=B):B=t[65],B}function Tt(e){return e.kind===`draft`}function Et(e){return e.metadata.entries.map(Dt)}function Dt(e){return`${e.id}:${e.rangeLabel}:${e.text}`}function Ot(e){return[e.fileKey,e]}function X(e){return e.removeReviewComment}function kt(e){return e.addReviewComment}function At(e){let t=ie(4),n=L();return{diffPreview:M(e,{label:`environment-data:review:diff-preview`,tag:g.reviewGetDiffPreview,staleTimeMs:5e3}),diffFilePatch:I(e,{label:`environment-data:review:diff-file-patch`,staleTimeMs:3e5,execute:e=>F(g.reviewGetDiffPreview,e.request).pipe(t.withPermit,i(t=>{let n=t.sources.find(t=>t.kind===e.request.file.sourceKind);return n?ue(n):f(new A({operation:`review.diffFilePatch`,kind:`git`,detail:`Diff no longer available. Refresh the comparison.`}))}))}),diffFileContents:j(e,{label:`environment-data:review:diff-file-contents`,tag:g.reviewGetDiffFileContents,scheduler:n,concurrency:{mode:`singleFlight`,key:({environmentId:e,input:t})=>JSON.stringify([e,t.cwd,t.sourceKind,t.baseRef,t.headRef,t.oldPath,t.newPath,t.changeType])}})}}var jt=At(pe);function Mt(e){return e.remoteName&&e.name.startsWith(`${e.remoteName}/`)?e.name.slice(e.remoteName.length+1):e.name}function Nt(e,t){let n=new Set(t),r=e.map(e=>{let r=t.filter(t=>n.has(t)&&Mt(t)===e.name),i=r.find(e=>e.remoteName===`origin`)??r[0]??null;return i&&n.delete(i),{id:`local:${e.name}`,label:e.name,local:e,remote:i}}),i=t.filter(e=>n.has(e)).map(e=>({id:`remote:${e.name}`,label:e.name,local:null,remote:e}));return[...r,...i]}function Pt(e,t){let n=t.trim().toLocaleLowerCase();return n.length===0?e:e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.local?.name.toLocaleLowerCase().includes(n)===!0||e.remote?.name.toLocaleLowerCase().includes(n)===!0)}var Ft=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`});function It(e){let t=(0,q.c)(86),{environmentId:n,cwd:r,source:i,baseRef:a,ignoreWhitespace:o,theme:s,revision:c,preview:u}=e,d=(0,K.useContext)(w),f;t[0]!==a||t[1]!==r||t[2]!==n||t[3]!==o||t[4]!==i?.diffHash||t[5]!==i?.kind?(f=JSON.stringify([n,r,i?.kind,i?.diffHash,a,o]),t[0]=a,t[1]=r,t[2]=n,t[3]=o,t[4]=i?.diffHash,t[5]=i?.kind,t[6]=f):f=t[6];let p=f,m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=[0,1,2,3],t[7]=m):m=t[7];let h;t[8]===p?h=t[9]:(h={scope:p,indices:m},t[8]=p,t[9]=h);let[g,_]=(0,K.useState)(h),v;t[10]!==g.indices||t[11]!==g.scope||t[12]!==p?(v=g.scope===p?g.indices:[0,1,2,3],t[10]=g.indices,t[11]=g.scope,t[12]=p,t[13]=v):v=t[13];let y=v,b;t[14]===i?.files?b=t[15]:(b=()=>i?.files?.toSorted(Q)??[],t[14]=i?.files,t[15]=b),i?.files;let x;t[16]===b?x=t[17]:(x=b(),t[16]=b,t[17]=x);let S=x,te;t[18]!==a||t[19]!==r||t[20]!==n||t[21]!==S||t[22]!==o||t[23]!==y||t[24]!==p||t[25]!==i?(te=!n||!r||!i?[]:y.filter(e=>e<S.length).map(e=>{let t=S[e];return{index:e,query:jt.diffFilePatch({environmentId:n,input:{cacheKey:p,request:{cwd:r,...a?{baseRef:a}:{},ignoreWhitespace:o,file:{path:t.path,previousPath:t.previousPath,sourceKind:i.kind}}}})}}),t[18]=a,t[19]=r,t[20]=n,t[21]=S,t[22]=o,t[23]=y,t[24]=p,t[25]=i,t[26]=te):te=t[26];let C=te,ne;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ne=[],t[27]=ne):ne=t[27];let re;t[28]!==c||t[29]!==p?(re={scope:p,revision:c,queries:ne},t[28]=c,t[29]=p,t[30]=re):re=t[30];let ie=(0,K.useRef)(re),T,E;t[31]!==C||t[32]!==d||t[33]!==c||t[34]!==p?(T=()=>{let e=ie.current;ie.current={scope:p,revision:c,queries:C};for(let{query:t}of C){let n=e.scope===p&&e.revision!==c,r=!e.queries.some(e=>e.query===t)&&d.get(t)._tag!==`Initial`&&!d.get(t).waiting;(n||r)&&d.refresh(t)}},E=[p,c,C,d],t[31]=C,t[32]=d,t[33]=c,t[34]=p,t[35]=T,t[36]=E):(T=t[35],E=t[36]),(0,K.useEffect)(T,E);let oe;t[37]===s?oe=t[38]:(oe=ae(e=>ce(e,e=>l(e,e=>{let t=ze(e.diff,`diff-panel:${s}`,{compactPartialHunkOffsets:!0});if(t?.kind===`files`&&t.files.length===1&&e.files?.length===1){let n=e.files[0],r={...t.files[0],name:n.path};n.previousPath===null?delete r.prevName:r.prevName=n.previousPath,t={...t,files:[r]}}return{source:e,patch:t}}))),t[37]=s,t[38]=oe);let se=oe,D;t[39]!==se||t[40]!==C?(D=ee(e=>new Map(C.map(t=>{let{index:n,query:r}=t;return[n,e(se(r))]}))),t[39]=se,t[40]=C,t[41]=D):D=t[41];let O=le(D),ue;t[42]===O?ue=t[43]:(ue=(e,t)=>{let n=O.get(t);return!n||n._tag===`Initial`},t[42]=O,t[43]=ue);let k=S.findIndex(ue),A=i?k<0?S.length:k:u?.kind===`files`?u.files.length:0,j;t[44]===p?j=t[45]:(j=e=>_(t=>{let n=t.scope===p?t.indices:[0,1,2,3],r=e.filter(e=>!n.includes(e));return r.length===0?t:{scope:p,indices:[...n,...r]}}),t[44]=p,t[45]=j);let M=j,N;t[46]!==M||t[47]!==A?(N=()=>M(Array.from({length:4},(e,t)=>A+t)),t[46]=M,t[47]=A,t[48]=N):N=t[48];let P=N,F;t[49]===M?F=t[50]:(F=e=>M([e]),t[49]=M,t[50]=F);let de=F,I;t[51]!==S||t[52]!==C?(I={queries:C,files:S},t[51]=S,t[52]=C,t[53]=I):I=t[53];let L=(0,K.useRef)(I),R,z;t[54]!==S||t[55]!==C?(R=()=>{L.current={queries:C,files:S}},z=[C,S],t[54]=S,t[55]=C,t[56]=R,t[57]=z):(R=t[56],z=t[57]),(0,K.useLayoutEffect)(R,z);let B;t[58]===d?B=t[59]:(B=e=>{let{queries:t,files:n}=L.current,r=t.find(t=>{let{index:r}=t;return n[r]?.path===e})?.query;r&&d.refresh(r)},t[58]=d,t[59]=B);let fe=B,pe;t[60]!==S||t[61]!==O||t[62]!==u||t[63]!==p||t[64]!==i?(pe=i?S.map((e,t)=>{let n=O.get(t);if(n?._tag===`Success`&&n.value.patch?.kind===`files`){let t=n.value.patch.files.find(t=>H(t)===e.path);if(t)return t}return{name:e.path,...e.previousPath?{prevName:e.previousPath}:{},type:e.previousPath?`rename-changed`:`change`,hunks:[],additionLines:[],deletionLines:[],splitLineCount:0,unifiedLineCount:0,isPartial:!0,cacheKey:`${p}:${e.path}:pending`}}):(u?.kind===`files`?u.files:[]).toSorted(Rt),t[60]=S,t[61]=O,t[62]=u,t[63]=p,t[64]=i,t[65]=pe):pe=t[65];let me=pe,he;if(t[66]!==S||t[67]!==O){let e;t[69]===O?e=t[70]:(e=(e,t)=>{let n=O.get(t);return[e.path,{error:n?._tag===`Failure`||n?._tag===`Success`&&(n.value.patch?.kind!==`files`||!n.value.patch.files.some(t=>H(t)===e.path)),truncated:n?._tag===`Success`&&n.value.source.truncated}]},t[69]=O,t[70]=e),he=new Map(S.map(e)),t[66]=S,t[67]=O,t[68]=he}else he=t[68];let ge=he,_e;if(t[71]!==S||t[72]!==O){let e;t[74]===O?e=t[75]:(e=(e,t)=>{let n=O.get(t);return n&&n._tag!==`Initial`},t[74]=O,t[75]=e),_e=new Set(S.filter(e).map(Lt)),t[71]=S,t[72]=O,t[73]=_e}else _e=t[73];let ve=_e,ye=[...O.values()].some(Z),V;return t[76]!==ge||t[77]!==P||t[78]!==ve||t[79]!==me||t[80]!==de||t[81]!==fe||t[82]!==p||t[83]!==A||t[84]!==ye?(V={scope:p,fileStates:ge,isPending:ye,retry:fe,requestFile:de,readyFilePaths:ve,renderableFiles:me,settledFileCount:A,loadNextFiles:P},t[76]=ge,t[77]=P,t[78]=ve,t[79]=me,t[80]=de,t[81]=fe,t[82]=p,t[83]=A,t[84]=ye,t[85]=V):V=t[85],V}function Z(e){return e._tag===`Initial`||e.waiting}function Lt(e){return e.path}function Rt(e,t){return Ft.compare(H(e),H(t))}function Q(e,t){return Ft.compare(e.path,t.path)}function zt(e){let t=(0,q.c)(5),{load:n,count:r}=e,i=(0,K.useRef)(null),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{if(!i.current)return;let e=new IntersectionObserver(e=>{e.some(Vt)&&n()},{rootMargin:`600px`});return e.observe(i.current),()=>e.disconnect()},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,K.useEffect)(a,o);let s;return t[3]===r?s=t[4]:(s=(0,J.jsx)(`div`,{ref:i,role:`status`,"aria-label":`Loading diff…`,children:Array.from({length:Math.min(r,4)},Bt)}),t[3]=r,t[4]=s),s}function Bt(e,t){return(0,J.jsx)(`div`,{"aria-hidden":!0,className:`border-b border-border/40`,children:(0,J.jsx)(U,{titleWidth:`medium`})},t)}function Vt(e){return e.isIntersecting}function Ht(e){let t=(0,q.c)(16),{error:n,truncated:r,retry:i}=e;if(!n&&!r)return null;let a=n?`Retry loading diff`:`Partial diff preview`,o;t[0]!==n||t[1]!==i?(o=e=>{e.stopPropagation(),n&&i()},t[0]=n,t[1]=i,t[2]=o):o=t[2];let s;t[3]!==a||t[4]!==o?(s=(0,J.jsx)(S,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":a,onClick:o}),t[3]=a,t[4]=o,t[5]=s):s=t[5];let c;t[6]===n?c=t[7]:(c=n?(0,J.jsx)(y,{className:`size-3`}):(0,J.jsx)(T,{className:`size-3`}),t[6]=n,t[7]=c);let l;t[8]!==s||t[9]!==c?(l=(0,J.jsx)(W,{render:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let u=n?`Retry loading diff`:`This file is too large to show in full. Counts include all changes.`,d;t[11]===u?d=t[12]:(d=(0,J.jsx)(Ze,{children:u}),t[11]=u,t[12]=d);let f;return t[13]!==l||t[14]!==d?(f=(0,J.jsxs)(Qe,{children:[l,d]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}var Ut=`__automatic_base_ref__`,Wt=`p4code.diffFileTreeOpen`,Gt=new WeakMap;function Kt(e){let t=Gt.get(e);if(t)return t;let n={fileDiff:e,fileKey:Ue(e),fileVersion:Ve(e)};return Gt.set(e,n),n}var qt=new Set;function Jt(e){let t=(0,q.c)(21),{filePath:n,fileKey:r,collapsed:i,unavailable:a,iconClassName:o,onToggle:s}=e,c=i?`Expand ${n}`:`Collapse ${n}`,l=!i,u;t[0]!==r||t[1]!==s?(u=e=>{e.stopPropagation(),s(r)},t[0]=r,t[1]=s,t[2]=u):u=t[2];let d;t[3]!==c||t[4]!==l||t[5]!==u||t[6]!==a?(d=(0,J.jsx)(S,{size:`icon-micro`,variant:`ghost`,className:`-ms-0.5`,"aria-label":c,"aria-expanded":l,disabled:a,onClick:u}),t[3]=c,t[4]=l,t[5]=u,t[6]=a,t[7]=d):d=t[7];let f;t[8]===o?f=t[9]:(f=D(`size-4`,o),t[8]=o,t[9]=f);let p=i?V:ge,m;t[10]!==f||t[11]!==p?(m=(0,J.jsx)(ye,{className:f,icon:p}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;t[13]!==d||t[14]!==m?(h=(0,J.jsx)(W,{render:d,children:m}),t[13]=d,t[14]=m,t[15]=h):h=t[15];let g=i?`Expand diff`:`Collapse diff`,_;t[16]===g?_=t[17]:(_=(0,J.jsx)(Ze,{side:`top`,children:g}),t[16]=g,t[17]=_);let v;return t[18]!==_||t[19]!==h?(v=(0,J.jsxs)(Qe,{children:[h,_]}),t[18]=_,t[19]=h,t[20]=v):v=t[20],v}function Yt(e){let t=(0,q.c)(11),{filePath:n,hasStat:r,error:i,truncated:a,onRetry:o}=e,s;t[0]===n?s=t[1]:(s=(0,J.jsx)(xt,{filePath:n}),t[0]=n,t[1]=s);let c;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o||t[6]!==a?(c=r?(0,J.jsx)(Ht,{error:i,truncated:a,retry:()=>o(n)}):null,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==c?(l=(0,J.jsxs)(J.Fragment,{children:[s,c]}),t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function Xt({mode:e=`inline`,composerDraftTarget:t,workspaceMutationId:n}){let{resolvedTheme:r}=Oe(),i=Ae(),a=i.diffLayout,s=ke(),[l,d]=(0,K.useState)(i.wordWrap),[f,g]=(0,K.useState)(i.diffIgnoreWhitespace),[y,ee]=m(Wt,!1,p),[w,ie]=(0,K.useState)(``),[T,ae]=(0,K.useState)(()=>({scopeKey:null,fileKeys:qt})),[ce,ue]=(0,K.useState)(0),[A,j]=(0,K.useState)(null),M=be({strict:!1,select:e=>xe(e)}),F=M?.threadId??null,I=z(M),L=B(M)?.projection??null,pe=R(I?.environmentId??null),{canReadFiles:me}=pe,he=I?.projectId??null,ge=fe(I&&he?{environmentId:I.environmentId,projectId:he}:null),V=I?.worktreePath??ge?.workspaceRoot,Se=I?.worktreePath?void 0:ge?.repositoryIdentity?.rootPath,Ie=le(je.configValueAtom(I?.environmentId??null)),Re=Pe(I?.environmentId??null),Ve=lt(I?.environmentId??null,Ie?.availableEditors??[]),Ue=Ne(jt.diffFileContents),Ge=Me(I!=null&&V!=null?Le.status({environmentId:I.environmentId,input:{cwd:V}}):null),U=pt(e=>yt(e.byThreadKey,M)),Ye=Ge.data?.isRepo??!0,{turnDiffSummaries:$e,inferredCheckpointTurnCountByRunId:gt}=_t(L),vt=(0,K.useMemo)(()=>[...$e].toSorted((e,t)=>{let n=e.checkpointTurnCount??gt[e.runId]??0,r=t.checkpointTurnCount??gt[t.runId]??0;return n===r?t.completedAt.localeCompare(e.completedAt):r-n}),[gt,$e]);(0,K.useEffect)(()=>{M&&U.kind===`turn`&&pt.getState().reconcileTurnSelection(M,vt.map(e=>e.runId))},[U,vt,M]);let G=U.kind===`turn`?U.turnId:null,q=U.kind===`unstaged`?`unstaged`:`branch`,xt=U.kind===`branch`?U.baseRef:null,St=U.kind===`turn`?U.filePath:null,Ct=U.kind===`turn`?U.revealRequestId:0,Y=G===null?void 0:vt.find(e=>e.runId===G)??vt[0],Tt=Y&&(Y.checkpointTurnCount??gt[Y.runId]),Et=vt[0],Dt=G===null?q===`unstaged`?`Uncommitted`:`Changes`:Y?.runId===Et?.runId?`Latest turn`:`Turn ${Tt??`?`}`,Ot=Y?`turn:${Y.runId}`:q,X=M?`${M.environmentId}:${M.threadId}:${Ot}`:null,kt=`${X??Ot}:${ce}`,At=Y?`Turn ${Tt??`?`}`:q===`unstaged`?`Uncommitted`:`Changes`,Mt=(0,K.useMemo)(()=>typeof Tt==`number`?{fromTurnCount:Math.max(0,Tt-1),toTurnCount:Tt}:null,[Tt]),Ft=bt({environmentId:I?.environmentId??null,threadId:F,fromTurnCount:Mt?.fromTurnCount??null,toTurnCount:Mt?.toTurnCount??null,ignoreWhitespace:f,cacheScope:Y?`turn:${Y.runId}`:null},{enabled:Ye&&Y!==void 0}),Z=Me(me&&G===null&&I&&V?jt.diffPreview({environmentId:I.environmentId,input:{cwd:V,...xt?{baseRef:xt}:{},ignoreWhitespace:f}}):null),Lt=Ye&&G===null&&I!=null&&V!=null,Rt=M?`${M.environmentId}:${M.threadId}`:null,Q=Z.data?.sources.find(e=>e.kind===(q===`unstaged`?`working-tree`:`branch-range`)),Bt=Z.refresh,Vt=Bt,Ht=(0,K.useMemo)(()=>{let e=Z.data;if(G===null&&I&&e&&Q&&me)return Ke(Ue,{environmentId:I.environmentId,cwd:e.cwd,sourceKind:Q.kind,baseRef:Q.baseRef,headRef:Q.headRef,cacheKey:Q.diffHash})},[I,Z.data,Ue,me,Q,G]),Gt=(0,K.useRef)(Ht);Gt.current=Ht;let Xt=(0,K.useCallback)(async e=>{let t=Gt.current;if(!t)throw Error(`Diff file contents are unavailable for this selection.`);return t(e)},[]),Zt=Me(G===null&&q===`branch`&&I&&Z.data?.cwd?Le.listRefs({environmentId:I.environmentId,input:{cwd:Z.data.cwd,includeMatchingRemoteRefs:!0,refKind:`local`,...w.trim().length>0?{query:w.trim()}:{},limit:100}}):null),Qt=Me(G===null&&q===`branch`&&I&&Z.data?.cwd?Le.listRefs({environmentId:I.environmentId,input:{cwd:Z.data.cwd,includeMatchingRemoteRefs:!0,refKind:`remote`,...w.trim().length>0?{query:w.trim()}:{},limit:100}}):null),$t=Nt(Zt.data?.refs.filter(e=>e.name!==Q?.headRef)??[],Qt.data?.refs??[]),en=Pt($t,w),tn=e=>xt&&xt===e.remote?.name?xt:e.local?.name??e.remote?.name??e.id,nn=[Ut,...$t.map(tn)],rn=[...w.trim().length===0?[Ut]:[],...en.map(tn)],an=Q?.diff,on=Y?Ft.data?.diff:an,sn=!Y&&Q?.truncated===!0,cn=Y?Ft.isPending:Z.isPending,ln=Y?Ft.error:Z.error,un=typeof on==`string`&&on.trim().length===0,$=!Y&&Q?.truncated&&Q.files?Q:null,dn=(0,K.useMemo)(()=>$?null:ze(on,`diff-panel:${r}`,{compactPartialHunkOffsets:G===null}),[$,r,on,G]),fn=(0,K.useMemo)(()=>new Map($?.files?.map(e=>[e.path,e])),[$?.files]),{scope:pn,isPending:mn,fileStates:hn,retry:gn,requestFile:_n,readyFilePaths:vn,renderableFiles:yn,settledFileCount:bn,loadNextFiles:xn}=It({environmentId:I?.environmentId,cwd:Z.data?.cwd,source:$,baseRef:$?.baseRef??xt,ignoreWhitespace:f,theme:r,revision:Z.data?ne(Z.data.generatedAt):void 0,preview:dn}),Sn=Bt;(0,K.useEffect)(()=>{if(!Lt)return;let e=()=>Sn();return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[Lt,Sn]),ht({enabled:Lt,mutationId:n,refresh:Sn,resourceKey:`diff:${Rt??``}`});let Cn=Z.isPending||mn,wn=(0,K.useMemo)(()=>yn.map(Kt),[yn]),Tn=(0,K.useMemo)(()=>i.diffFilesCollapsed?new Set(wn.map(e=>e.fileKey)):qt,[wn,i.diffFilesCollapsed]),En=T.scopeKey===X?T.fileKeys:Tn,Dn=(0,K.useCallback)(()=>bn<yn.length?(0,J.jsx)(zt,{load:xn,count:yn.length-bn}):null,[bn,yn.length,xn]),On=(0,K.useMemo)(()=>wn.filter(({fileDiff:e})=>!$||vn.has(H(e))).map(({fileDiff:e,fileKey:t,fileVersion:n})=>({fileDiff:e,filePath:H(e),fileKey:t,fileVersion:n,collapsed:En.has(t)||e.cacheKey?.endsWith(`:pending`)===!0})),[En,wn,$,vn]),kn=(0,K.useMemo)(()=>wn.map(e=>e.fileKey),[wn]),An=Ee(kn,En),jn=(0,K.useMemo)(()=>!Y&&Q?.files?Q.files.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}):We(yn),[yn,Q,Y]),Mn=(0,K.useMemo)(()=>Te(yn),[yn]),Nn=St?On.find(e=>e.filePath===St)?.fileKey??null:null;(0,K.useEffect)(()=>{Nn&&A?.getInstance()&&A.scrollTo({type:`item`,id:Nn,align:`start`})},[A,kt,Nn,Ct]);let Pn=(0,K.useMemo)(()=>({collapseScopeKey:X,diffSelection:U}),[X,U]),Fn=Ce(A,Pn,On.map(e=>e.fileKey)),In=(0,K.useCallback)(e=>{let t=wn.findIndex(t=>H(t.fileDiff)===e),n=wn[t];n&&(ae(e=>{let t=new Set(e.scopeKey===X?e.fileKeys:Tn);return t.delete(n.fileKey),{scopeKey:X,fileKeys:t}}),$&&t>=bn&&_n(t),Fn(n.fileKey))},[wn,X,Tn,Fn,$,bn,_n]),Ln=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!$||!St)return;let e=`${St}:${Ct}`;(Ln.current?.cache!==pn||Ln.current.key!==e)&&(Ln.current={cache:pn,key:e},In(St))},[$,St,Ct,pn,In]);let Rn=(0,K.useCallback)(e=>{Fe({threadRef:M,filePath:e,activeCwd:V,repositoryRoot:Se,openInEditor:e=>{(async()=>{let t=await Ve(e);t._tag===`Failure`&&!N(t)&&console.warn(`Failed to open diff file in editor.`,{operation:`open-diff-file`,...M?{environmentId:M.environmentId,threadId:M.threadId}:{},...de(P(t))})})()}})},[V,Se,Ve,M]),zn=(0,K.useRef)({collapseScopeKey:X,defaultCollapsedDiffFileKeys:Tn});(0,K.useLayoutEffect)(()=>{zn.current={collapseScopeKey:X,defaultCollapsedDiffFileKeys:Tn}},[X,Tn]);let Bn=(0,K.useCallback)(e=>{let{collapseScopeKey:t,defaultCollapsedDiffFileKeys:n}=zn.current;ae(r=>{let i=new Set(r.scopeKey===t?r.fileKeys:n);return i.has(e)?i.delete(e):i.add(e),{scopeKey:t,fileKeys:i}})},[]),Vn=(0,K.useCallback)(e=>{let{collapseScopeKey:t,defaultCollapsedDiffFileKeys:n}=zn.current;ae(r=>{let i=r.scopeKey===t?r.fileKeys:n;if(!i.has(e))return r;let a=new Set(i);return a.delete(e),{scopeKey:t,fileKeys:a}})},[]),Hn=(0,K.useCallback)(()=>{ue(e=>e+1),ae(e=>{let t=e.scopeKey===X?e.fileKeys:Tn;return{scopeKey:X,fileKeys:we(kn,t)}})},[X,Tn,kn]),Un=e=>{M&&pt.getState().selectTurn(M,e)},Wn=e=>{M&&pt.getState().selectGitScope(M,e)},Gn=e=>{M&&pt.getState().selectBranchBaseRef(M,e)},Kn=Y?`turn:${Y.runId}`:``,qn=G===null?q:Y?.runId===Et?.runId?`latest`:Kn,Jn=e=>{if(e===`unstaged`||e===`branch`)Wn(e);else if(e===`latest`)Et&&Un(Et.runId);else{let t=vt.find(t=>`turn:${t.runId}`===e);t&&Un(t.runId)}},Yn=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3 [-webkit-app-region:no-drag]`,children:[(0,J.jsxs)(v,{children:[(0,J.jsxs)(k,{render:(0,J.jsx)(S,{size:`xs`,variant:`secondary`}),className:`max-w-full`,"aria-label":`Diff scope: ${Dt}`,children:[(0,J.jsx)(`span`,{className:`truncate`,children:Dt}),(0,J.jsx)(o,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsxs)(O,{align:`start`,children:[(0,J.jsxs)(re,{value:qn,onValueChange:Jn,children:[(0,J.jsx)(E,{value:`branch`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Changes`})}),(0,J.jsx)(E,{value:`unstaged`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Uncommitted`})}),(0,J.jsx)(E,{value:`latest`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Latest turn`})})]}),(0,J.jsxs)(se,{children:[(0,J.jsx)(C,{children:`Turn`}),(0,J.jsx)(x,{children:(0,J.jsx)(re,{value:Kn,onValueChange:Jn,children:vt.map(e=>{let t=e.checkpointTurnCount??gt[e.runId]??`?`;return(0,J.jsx)(E,{value:`turn:${e.runId}`,closeOnClick:!0,children:(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsxs)(`span`,{children:[`Turn `,t]}),(0,J.jsx)(`span`,{className:`ml-auto text-xs tabular-nums text-muted-foreground`,children:Xe(e.completedAt,i.timestampFormat)})]})},e.runId)})})})]})]})]}),G===null&&q===`branch`&&Q?.baseRef&&(0,J.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 overflow-hidden text-xs text-muted-foreground`,"aria-label":`Comparing ${Q.headRef??`HEAD`} against ${Q.baseRef}`,children:[(0,J.jsxs)(Qe,{children:[(0,J.jsxs)(W,{render:(0,J.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`}),children:[(0,J.jsx)(`span`,{className:`min-w-0 max-w-48 truncate`,children:Q.headRef??`HEAD`}),(0,J.jsx)(b,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsx)(Ze,{side:`top`,children:`${Q.headRef??`HEAD`} → ${Q.baseRef}`})]}),(0,J.jsxs)(ct,{items:nn,filteredItems:rn,value:xt??Ut,onOpenChange:e=>{e||ie(``)},onValueChange:e=>{e&&Gn(e===Ut?null:e)},children:[(0,J.jsxs)(rt,{render:(0,J.jsx)(S,{variant:`ghost-muted`,size:`xs`}),className:`min-w-0 max-w-48`,"aria-label":`Change comparison target. Currently ${Q.baseRef}`,children:[(0,J.jsx)(`span`,{className:`min-w-0 truncate`,children:Q.baseRef}),(0,J.jsx)(o,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsxs)(at,{align:`start`,className:`w-72 min-w-0 max-w-[calc(100vw-1rem)] overflow-hidden`,children:[(0,J.jsx)(st,{placeholder:`Search refs...`,value:w,onChange:e=>ie(e.target.value)}),(0,J.jsxs)(`div`,{className:`grid shrink-0 grid-cols-[1rem_minmax(0,1fr)] items-center gap-2 border-b border-border/70 ps-3 pe-6.5 pt-2 pb-1.5 font-medium text-3xs text-muted-foreground uppercase tracking-wide`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`}),(0,J.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center`,children:[(0,J.jsx)(`span`,{children:`Branch`}),(0,J.jsx)(`span`,{className:`text-right`,children:`Remote`})]})]}),(0,J.jsx)(it,{children:`No matching refs.`}),(0,J.jsxs)(nt,{className:`max-h-64 min-w-0 overflow-x-hidden`,children:[(0,J.jsx)(ot,{className:`w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)]`,value:Ut,children:(0,J.jsx)(`span`,{className:`block min-w-0 truncate`,children:`Automatic`})}),$t.map(e=>{let t=tn(e),n=e.local!==null&&e.remote!==null,r=e.remote?.name===t;return(0,J.jsx)(ot,{className:`w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)]`,value:t,children:(0,J.jsxs)(`div`,{className:`grid w-full min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`block min-w-0 truncate pe-2`,children:e.label}),n?(0,J.jsx)(`div`,{className:`flex justify-end`,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,J.jsx)(ft,{"aria-label":`Use remote version of ${e.label}`,checked:r,className:`[--thumb-size:--spacing(3)]`,onCheckedChange:t=>{let n=t?e.remote?.name:e.local?.name;n&&Gn(n)}})}):e.remote?(0,J.jsxs)(Qe,{children:[(0,J.jsx)(W,{render:(0,J.jsx)(`span`,{className:`flex justify-end text-muted-foreground`,children:(0,J.jsx)(te,{role:`img`,"aria-label":`Remote only`,className:`size-3`})})}),(0,J.jsx)(Ze,{side:`top`,children:`Remote only`})]}):null]})},e.id)})]})]})]})]})]}),(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 [-webkit-app-region:no-drag]`,children:[On.length>0||!Y&&Q?.files?.length?(0,J.jsx)(mt,{additions:jn.additions,deletions:jn.deletions,className:`mr-1 text-2xs`,layout:`inline`}):null,Lt&&(0,J.jsxs)(Qe,{children:[(0,J.jsx)(W,{render:(0,J.jsx)(S,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":Cn?`Refreshing diff`:`Refresh diff`,onClick:Vt}),children:(0,J.jsx)(ut,{size:`sm`,refreshing:Cn})}),(0,J.jsx)(Ze,{side:`top`,children:Cn?`Refreshing diff…`:`Refresh diff`})]}),kn.length>0&&(0,J.jsx)(S,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":An?`Expand all files`:`Collapse all files`,onClick:Hn,children:(0,J.jsx)(ye,{className:`size-3.5`,icon:An?_e:ve})}),(0,J.jsxs)(et,{"aria-label":`Diff layout`,className:`shrink-0`,variant:`segmented`,value:[a],onValueChange:e=>{let t=e[0];(t===`stacked`||t===`split`)&&s({diffLayout:t})},children:[(0,J.jsx)(tt,{"aria-label":`Stacked diff view`,value:`stacked`,children:(0,J.jsx)(oe,{className:`size-3.5`})}),(0,J.jsx)(tt,{"aria-label":`Split diff view`,value:`split`,children:(0,J.jsx)(h,{className:`size-3.5`})})]}),(0,J.jsxs)(Qe,{children:[(0,J.jsx)(W,{render:(0,J.jsx)(tt,{"aria-label":l?`Disable diff line wrapping`:`Enable diff line wrapping`,variant:`ghost`,size:`sm`,pressed:l,onPressedChange:e=>{d(!!e)}}),children:(0,J.jsx)(u,{className:`size-3.5`})}),(0,J.jsx)(Ze,{side:`top`,children:l?`Disable line wrapping`:`Enable line wrapping`})]}),(0,J.jsxs)(Qe,{children:[(0,J.jsx)(W,{render:(0,J.jsx)(tt,{"aria-label":f?`Show whitespace changes`:`Hide whitespace changes`,variant:`ghost`,size:`sm`,pressed:f,onPressedChange:e=>{g(!!e)}}),children:(0,J.jsx)(_,{className:`size-3.5`})}),(0,J.jsx)(Ze,{side:`top`,children:f?`Show whitespace changes`:`Hide whitespace changes`})]}),kn.length>0&&(0,J.jsxs)(Qe,{children:[(0,J.jsx)(W,{render:(0,J.jsx)(tt,{"aria-label":y?`Hide file tree`:`Show file tree`,variant:`ghost`,size:`sm`,pressed:y,onPressedChange:e=>ee(!!e)}),children:(0,J.jsx)(c,{className:`size-3.5`})}),(0,J.jsx)(Ze,{side:`top`,children:y?`Hide file tree`:`Show file tree`})]})]})]});return(0,J.jsx)(Je,{mode:e,header:Yn,children:I?Ye?G!==null&&vt.length===0?(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`No completed turns yet.`}):G===null&&!me?pe.isPending?(0,J.jsx)(qe,{label:`Checking file access...`}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:pe.error??`This connection cannot read local diffs.`}):(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,children:[sn&&!$&&(0,J.jsxs)(`p`,{className:`shrink-0 border-b border-border/70 bg-muted/40 px-3 py-1.5 text-2xs text-muted-foreground`,children:[`This preview exceeds the size limit. Changes shown are incomplete.`,Q?.files?` Totals include all changes.`:``]}),ln&&!dn&&(0,J.jsx)(`div`,{className:`px-3`,children:(0,J.jsx)(`p`,{className:`mb-2 text-2xs text-error/80`,children:ln})}),!dn&&!$?cn?(0,J.jsx)(qe,{label:Y?`Loading checkpoint diff...`:q===`unstaged`?`Loading uncommitted changes...`:`Loading changes...`}):(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center px-3 py-2 text-xs text-muted-foreground/70`,children:(0,J.jsx)(`p`,{children:un?`No net changes in this selection.`:`No patch available for this selection.`})}):$||dn?.kind===`files`?(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,J.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1`,onClickCapture:e=>{let t=e.nativeEvent.composedPath?.()??[];for(let e of t)if(e instanceof HTMLElement&&(e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement))return;let n=t.find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-title`))?.textContent;if(n){Rn(n);return}let r=t.find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-diffs-header`))?.querySelector(`[data-title]`)?.textContent;if(!r)return;let i=On.find(e=>e.filePath===r);i&&Bn(i.fileKey)},onContextMenuCapture:e=>{let t=(e.nativeEvent.composedPath?.()??[]).find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-title`))?.textContent?.trim();t&&(e.preventDefault(),Re({environmentId:I?.environmentId??null,filePath:t,workspaceRoot:V,repositoryRoot:Se},e))},children:(0,J.jsx)(wt,{viewerRef:j,codeViewKey:`${kt}:${$?pn:`preview`}`,className:`h-full min-h-0 overflow-auto`,files:On,renderCodeViewFooter:Dn,sectionId:Ot,sectionTitle:At,composerDraftTarget:t,renderHeaderFilenameSuffix:e=>{let t=H(e),n=hn.get(t);return(0,J.jsx)(Yt,{filePath:t,hasStat:fn.has(t),error:n?.error??!1,truncated:n?.truncated??!1,onRetry:gn})},...$?{unsafeCSSExtra:`[data-additions-count], [data-deletions-count] { display: none; }`,renderHeaderMetadata:e=>{let t=fn.get(H(e));return t?(0,J.jsx)(mt,{additions:t.additions,deletions:t.deletions}):null}}:{},onRevealSearchMatch:Vn,renderHeaderPrefix:(e,t)=>{let n=e.cacheKey?.endsWith(`:pending`)===!0;return(0,J.jsx)(Jt,{filePath:H(e),fileKey:t,collapsed:n||En.has(t),unavailable:n,iconClassName:He(e),onToggle:Bn})},options:{diffStyle:a===`split`?`split`:`unified`,lineDiffType:`none`,overflow:l?`wrap`:`scroll`,theme:Be(r),preferredHighlighter:dt,themeType:r,stickyHeaders:!0,...Ht?{loadDiffFiles:Xt}:{}}},X??Ot)}),y?(0,J.jsx)(`aside`,{className:`flex w-[min(16rem,40%)] min-w-40 shrink-0 border-l border-border/60`,children:(0,J.jsx)(De,{ariaLabel:`${At} files`,entries:Mn,selectedPath:St,revealRequestId:Ct,onSelectFile:In})}):null]}):(0,J.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-2`,children:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-2xs text-muted-foreground/75`,children:dn?.kind===`raw`?dn.reason:null}),(0,J.jsx)(`pre`,{className:D(`max-h-[72vh] rounded-md border border-border/70 bg-background/70 p-3 font-mono text-2xs leading-relaxed text-muted-foreground/90`,l?`overflow-auto whitespace-pre-wrap wrap-break-word`:`overflow-auto`),children:dn?.kind===`raw`?dn.text:null})]})})]})}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Turn diffs are unavailable because this project is not a git repository.`}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Select a thread to inspect turn diffs.`})})}export{Xt as default};
|
|
2
|
-
//# sourceMappingURL=DiffPanel-Bfxdj8td.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./FieldControl-DAh0lUDV.js";var i=e(t()),a=e(n()),o=i.forwardRef(function(e,t){return(0,a.jsx)(r,{ref:t,...e})});export{o as t};
|
|
2
|
-
//# sourceMappingURL=Input-DWhR3WLZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as flowchart}from"./O65XPQGZ-CJWG3hrr.js";
|