openpond 0.2.61 → 0.2.62
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/app-server.d.ts +3264 -18
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-FUAWCKBH.js → acp-DYRBDJRU.js} +1 -1
- package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-UTLP7C3I.js} +1 -1
- package/dist/chunks/{actions-command-LOHNQUWP.js → actions-command-6LF4Z4WK.js} +1 -1
- package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-N2H3RBEN.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-Q2VWWJNX.js → app-server-connected-apps-3T546FE7.js} +1 -1
- package/dist/chunks/app-server-evaluations-TXD747QA.js +2 -0
- package/dist/chunks/{app-server-harness-services-2PSZBT7U.js → app-server-harness-services-BBCDV5P3.js} +1 -1
- package/dist/chunks/app-server-runtime-VEJPDAFP.js +2 -0
- package/dist/chunks/{apps-7PIBF32Q.js → apps-CTT2XYRR.js} +1 -1
- package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
- package/dist/chunks/{chunk-5VPU7OS7.js → chunk-2IIBCCOK.js} +1 -1
- package/dist/chunks/{chunk-ZISYLRH6.js → chunk-2UDAKLJ4.js} +1 -1
- package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
- package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-3R4MSE2S.js} +1 -1
- package/dist/chunks/{chunk-OFVUN4KI.js → chunk-47AXSBPV.js} +1 -1
- package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
- package/dist/chunks/chunk-4PZWGNX4.js +86 -0
- package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-4RZBGKT7.js} +1 -1
- package/dist/chunks/{chunk-VBW2X42G.js → chunk-4TM75R7V.js} +1 -1
- package/dist/chunks/chunk-4U2FNXQW.js +2 -0
- package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
- package/dist/chunks/{chunk-VWJ5IYQP.js → chunk-547AUVKN.js} +1 -1
- package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-557XSPVS.js} +1 -1
- package/dist/chunks/{chunk-ZHFH2TZN.js → chunk-557YG77L.js} +1 -1
- package/dist/chunks/{chunk-MF35MALN.js → chunk-5A6ER3M2.js} +1 -1
- package/dist/chunks/{chunk-U4HZD2GM.js → chunk-5OSM75X5.js} +1 -1
- package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-6SH4B7DV.js} +1 -1
- package/dist/chunks/chunk-6XSSM4WT.js +3 -0
- package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-7JBB4PXS.js} +1 -1
- package/dist/chunks/{chunk-SID4X3YN.js → chunk-7JXZNCBC.js} +1 -1
- package/dist/chunks/chunk-7KTARW23.js +2 -0
- package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
- package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-AKZPMKWP.js} +1 -1
- package/dist/chunks/{chunk-SIV5P6JO.js → chunk-AMO5DVKM.js} +2 -2
- package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
- package/dist/chunks/{chunk-4RHM4WN2.js → chunk-B42QQUZY.js} +1 -1
- package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
- package/dist/chunks/{chunk-CQF6QZEL.js → chunk-BEI4YULC.js} +1 -1
- package/dist/chunks/chunk-BKEDG3A4.js +22 -0
- package/dist/chunks/{chunk-GEXKTGLY.js → chunk-C7M2WBWZ.js} +14 -14
- package/dist/chunks/{chunk-ELYRVTTG.js → chunk-CJUVHE4U.js} +1 -1
- package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-EIX2V2KU.js} +1 -1
- package/dist/chunks/{chunk-AWPYTDH4.js → chunk-EWOTDVDJ.js} +1 -1
- package/dist/chunks/{chunk-B47JMAVW.js → chunk-F4TJ7WQV.js} +1 -1
- package/dist/chunks/{chunk-TXBIZDXG.js → chunk-F7D4BMTO.js} +1 -1
- package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FFWOTZQM.js} +1 -1
- package/dist/chunks/{chunk-6RVF2J47.js → chunk-FUSCTBJI.js} +1 -1
- package/dist/chunks/{chunk-BN5AVRUG.js → chunk-GAQLXFOT.js} +1 -1
- package/dist/chunks/{chunk-LHENAWLH.js → chunk-GEKORCMN.js} +1 -1
- package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-GNCEZ3UP.js} +1 -1
- package/dist/chunks/{chunk-WRQEYW3V.js → chunk-GOIKLFXK.js} +1 -1
- package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GQGLPKU4.js} +1 -1
- package/dist/chunks/{chunk-LBBXVOVR.js → chunk-GSWBNJGZ.js} +1 -1
- package/dist/chunks/{chunk-7EAWLYYB.js → chunk-GV3LFSMI.js} +1 -1
- package/dist/chunks/{chunk-GQUS7MCH.js → chunk-GW5SE3FM.js} +1 -1
- package/dist/chunks/{chunk-I3W27VK4.js → chunk-HBLN4OLY.js} +1 -1
- package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
- package/dist/chunks/{chunk-4P3X2RXA.js → chunk-HKV7RX5E.js} +1 -1
- package/dist/chunks/{chunk-QDBYLJGH.js → chunk-HXZXDDKW.js} +1 -1
- package/dist/chunks/{chunk-LNRFRAV5.js → chunk-INO67SEN.js} +1 -1
- package/dist/chunks/{chunk-E67M5WGY.js → chunk-IWK3RTLR.js} +1 -1
- package/dist/chunks/{chunk-U447MS3Y.js → chunk-J3B2GM4A.js} +1 -1
- package/dist/chunks/chunk-JCLTFDVW.js +2 -0
- package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
- package/dist/chunks/{chunk-D4JZALZ4.js → chunk-JIFUGA3U.js} +1 -1
- package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
- package/dist/chunks/{chunk-FWIPHEVA.js → chunk-JX6OX6XE.js} +1 -1
- package/dist/chunks/{chunk-D5ADDBS5.js → chunk-JY3YSI54.js} +1 -1
- package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
- package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
- package/dist/chunks/chunk-LILXHGIA.js +2 -0
- package/dist/chunks/{chunk-MCIIGQT7.js → chunk-LJDBR3RN.js} +1 -1
- package/dist/chunks/{chunk-3TYCIYW6.js → chunk-LJPO3TEL.js} +1 -1
- package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LRRBYIGH.js} +2 -2
- package/dist/chunks/{chunk-P4XM7LUT.js → chunk-M5IX6VUA.js} +1 -1
- package/dist/chunks/chunk-MEK7DLX3.js +2 -0
- package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
- package/dist/chunks/{chunk-ZBBVRYU3.js → chunk-MNFW5WLD.js} +1 -1
- package/dist/chunks/{chunk-2VXL6AU3.js → chunk-MNXNZDDW.js} +1 -1
- package/dist/chunks/chunk-N5GPINVP.js +2 -0
- package/dist/chunks/{chunk-TSAW2QVU.js → chunk-NBE74GLF.js} +1 -1
- package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-NE4ESZPT.js} +1 -1
- package/dist/chunks/{chunk-CO3OJFPU.js → chunk-NKZNPTLA.js} +1 -1
- package/dist/chunks/{chunk-WFVOG5PU.js → chunk-NLQ2UPN2.js} +1 -1
- package/dist/chunks/chunk-NOSBNHGC.js +18 -0
- package/dist/chunks/{chunk-TTN63EAM.js → chunk-NWOK6NLE.js} +1 -1
- package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
- package/dist/chunks/chunk-O3MHHGC5.js +151 -0
- package/dist/chunks/{chunk-IUGK6BBY.js → chunk-OCC43RSJ.js} +1 -1
- package/dist/chunks/{chunk-BQUWZRWU.js → chunk-P74RR2GB.js} +1 -1
- package/dist/chunks/{chunk-PAZDQRYU.js → chunk-PAE3PQEC.js} +1 -1
- package/dist/chunks/{chunk-M4ZRCRJM.js → chunk-PGO4FRHU.js} +2 -2
- package/dist/chunks/chunk-Q34IF4PW.js +2 -0
- package/dist/chunks/{chunk-Q324ZA5M.js → chunk-QAVQJZCM.js} +1 -1
- package/dist/chunks/{chunk-EIIGTADO.js → chunk-RBDUMASL.js} +1 -1
- package/dist/chunks/{chunk-TMMFF6DO.js → chunk-RH43WLBX.js} +1 -1
- package/dist/chunks/{chunk-RPOD6I64.js → chunk-RTJCELRR.js} +1 -1
- package/dist/chunks/{chunk-L3GA2CQI.js → chunk-SD64CLJX.js} +1 -1
- package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
- package/dist/chunks/{chunk-MLTKB5G3.js → chunk-SZKFNKWO.js} +1 -1
- package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
- package/dist/chunks/{chunk-PE7UKJXK.js → chunk-T6C5BNXK.js} +1 -1
- package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
- package/dist/chunks/{chunk-OQUKSRU3.js → chunk-TGEGXTPR.js} +1 -1
- package/dist/chunks/chunk-TM4VEMNN.js +2 -0
- package/dist/chunks/chunk-TUCKED4T.js +4 -0
- package/dist/chunks/chunk-TVTFEGTU.js +2 -0
- package/dist/chunks/{chunk-HZLV773Y.js → chunk-TW3SRBLU.js} +1 -1
- package/dist/chunks/{chunk-BNZTJPK7.js → chunk-U456UP3N.js} +1 -1
- package/dist/chunks/chunk-UC3FXTDL.js +9 -0
- package/dist/chunks/{chunk-XLULTQLZ.js → chunk-UT6F6AIB.js} +1 -1
- package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
- package/dist/chunks/{chunk-DW3GJRY3.js → chunk-VAJSRUAB.js} +1 -1
- package/dist/chunks/chunk-VE6ZIGUQ.js +2 -0
- package/dist/chunks/{chunk-GLVR74PX.js → chunk-VI32G77S.js} +1 -1
- package/dist/chunks/{chunk-ROE24PN5.js → chunk-VK4TPZTA.js} +1 -1
- package/dist/chunks/{chunk-Q66LWQGF.js → chunk-VSQXDS6H.js} +1 -1
- package/dist/chunks/{chunk-4GZ2FPB5.js → chunk-VWRTE64Y.js} +1 -1
- package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
- package/dist/chunks/{chunk-57RY3LSR.js → chunk-WGLVSGFA.js} +1 -1
- package/dist/chunks/{chunk-I7JCARVH.js → chunk-WQMXEZVE.js} +3 -3
- package/dist/chunks/chunk-X4ZT22SG.js +2 -0
- package/dist/chunks/{chunk-DGPGOBYZ.js → chunk-XSB3T4JZ.js} +1 -1
- package/dist/chunks/{chunk-ZZWAQBA2.js → chunk-XWDFXM3S.js} +1 -1
- package/dist/chunks/{chunk-4LZLO4OW.js → chunk-Y2KPHVZK.js} +1 -1
- package/dist/chunks/chunk-ZQHPGEYT.js +2 -0
- package/dist/chunks/{chunk-T4LLJC5N.js → chunk-ZXT7V64X.js} +1 -1
- package/dist/chunks/cli-GCSO2OAI.js +2 -0
- package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-BU2RPG33.js} +1 -1
- package/dist/chunks/connected-app-executor-UDE7U4KG.js +2 -0
- package/dist/chunks/{connected-evidence-4J3YXU4O.js → connected-evidence-GXIY2L7C.js} +1 -1
- package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-V5QXRK5Q.js} +1 -1
- package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
- package/dist/chunks/{continual-CJUZM5ZQ.js → continual-FLW6DAJK.js} +1 -1
- package/dist/chunks/{core-commands-JGXU6B4C.js → core-commands-NJ6TGND4.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-DFGJBMVF.js → dataset-preparation-authoring-IUXUQK3L.js} +1 -1
- package/dist/chunks/{datasets-MNHZAZIB.js → datasets-AH56DKLZ.js} +1 -1
- package/dist/chunks/{desktop-test-P23MHAIG.js → desktop-test-PYUTEOWO.js} +1 -1
- package/dist/chunks/{dist-IIFTZWNR.js → dist-5267UT3V.js} +1 -1
- package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
- package/dist/chunks/{evaluation-coordination-6NQEH5WU.js → evaluation-coordination-3AUICOC5.js} +1 -1
- package/dist/chunks/{experiment-improvements-M27Z5OF4.js → experiment-improvements-YS7GGPDW.js} +1 -1
- package/dist/chunks/experiments-EJZK7FPT.js +2 -0
- package/dist/chunks/{experiments-signal-R3NNH7WR.js → experiments-signal-NKUIJCIY.js} +1 -1
- package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
- package/dist/chunks/{help-M2VQGPVC.js → help-PXUUREHZ.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +2 -0
- package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +2 -0
- package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +3 -0
- package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-37ZFY2LH.js → hosted-profile-candidate-DKEMVIYG.js} +1 -1
- package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +2 -0
- package/dist/chunks/{hosted-profile-evaluation-control-UQBMML6K.js → hosted-profile-evaluation-control-ERCXAPZD.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-YASS4T6L.js → hosted-profile-evaluation-inspection-Q3AIIIB6.js} +1 -1
- package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +3 -0
- package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-X2YCFYEJ.js} +1 -1
- package/dist/chunks/{human-review-IJETDOWB.js → human-review-5WM6MSON.js} +1 -1
- package/dist/chunks/{import-WLLUIDS6.js → import-JWZSZCE4.js} +1 -1
- package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +2 -0
- package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +2 -0
- package/dist/chunks/{model-projects-AVBQDNYG.js → model-projects-H22KENI4.js} +1 -1
- package/dist/chunks/opchat-3S6TSDZO.js +3 -0
- package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +2 -0
- package/dist/chunks/{organizations-DJRJWC5I.js → organizations-62YNTZTO.js} +1 -1
- package/dist/chunks/{profile-JRS3JNRC.js → profile-ELE2D7HU.js} +1 -1
- package/dist/chunks/project-action-payload-32F4X2BB.js +2 -0
- package/dist/chunks/{project-agent-2KNJFNZI.js → project-agent-O4REKO6T.js} +1 -1
- package/dist/chunks/{published-experiment-source-LFYHKFAO.js → published-experiment-source-DAOTJLIN.js} +1 -1
- package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +2 -0
- package/dist/chunks/{runtime-CBJF5GMB.js → runtime-776NUSE7.js} +2 -2
- package/dist/chunks/{sandbox-command-IIGTPYN3.js → sandbox-command-UQ26NDIX.js} +1 -1
- package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-WP6YCGBK.js} +1 -1
- package/dist/chunks/saved-work-PG52WCRQ.js +2 -0
- package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-RPB65PME.js} +1 -1
- package/dist/chunks/{src-4YZF6L6H.js → src-2R4CMCJ5.js} +1 -1
- package/dist/chunks/src-AU6LG7E6.js +421 -0
- package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +2 -0
- package/dist/chunks/{store-chat-resources-CGW7PDCG.js → store-chat-resources-T4LR7K25.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-R62D2HD6.js} +1 -1
- package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-25O7BAR2.js} +1 -1
- package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-T5E2GUKK.js} +1 -1
- package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-5Y4U5L3R.js} +1 -1
- package/dist/chunks/{store-evaluation-results-V5J6L4NV.js → store-evaluation-results-WUVJWCFU.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-HHMM6GNK.js → store-harness-workspaces-IFEFY5CK.js} +1 -1
- package/dist/chunks/{store-human-review-V5H4QDHR.js → store-human-review-ZQNLZRGG.js} +1 -1
- package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +2 -0
- package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-LOH4F4TF.js} +1 -1
- package/dist/chunks/{store-model-batch-review-KMYPYWJR.js → store-model-batch-review-QO4VVKWC.js} +1 -1
- package/dist/chunks/{store-model-configuration-UXNC4PGY.js → store-model-configuration-C3HSOFD5.js} +1 -1
- package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +2 -0
- package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-RNIFLJRW.js} +1 -1
- package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-DVQ2PP4F.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-LXWFFYCZ.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-4HH7LX6N.js} +1 -1
- package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-JLW4GD4Q.js} +1 -1
- package/dist/chunks/{store-task-inbox-LNDCZOYE.js → store-task-inbox-DL5RYFPO.js} +1 -1
- package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-NJXRXFLC.js} +1 -1
- package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +9 -0
- package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-VRLU6NFX.js} +1 -1
- package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-3ZHG4LGI.js} +1 -1
- package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-KWQD5PRP.js} +1 -1
- package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-ZRS3ILF2.js} +1 -1
- package/dist/chunks/{taskset-NYLUYX6K.js → taskset-QDMCQQDJ.js} +1 -1
- package/dist/chunks/{taskset-packages-I7I5KBFP.js → taskset-packages-CBLJFWDQ.js} +1 -1
- package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-GF272RGC.js} +1 -1
- package/dist/chunks/{training-UBX6E7SK.js → training-DF5UEPY3.js} +1 -1
- package/dist/chunks/{training-error-AYOGHHL2.js → training-error-L5V5IBX3.js} +1 -1
- package/dist/chunks/training-hosted-I2NDBYGS.js +2 -0
- package/dist/chunks/training-hosted-report-4F25RZZ4.js +2 -0
- package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
- package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
- package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-5RUXYIOF.js} +1 -1
- package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-JRY2IE7H.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/hosted-chat.d.ts +28 -0
- package/dist/index.js +1 -1
- package/dist/skills/openpond-cli/SKILL.md +15 -2
- package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
- package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
- package/dist/skills/openpond-cli/references/experiments-and-training.md +155 -10
- package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
- package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
- package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
- package/dist/web/assets/App-DHJVXTI2.js +54 -0
- package/dist/web/assets/App-DpFKLxuA.css +1 -0
- package/dist/web/assets/AppDialog-BurL61qE.js +1 -0
- package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +2 -0
- package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-DZLErwj0.js} +1 -1
- package/dist/web/assets/AppsView-ttlr9ckQ.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-CpMSfHCK.js} +1 -1
- package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +1 -0
- package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-CEbM980A.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-IKzZsHoI.js → ChatTimelineEntry-BITv20Ze.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-DrKJmJZK.js} +1 -1
- package/dist/web/assets/{CommandMenu-CBY2AJxV.js → CommandMenu-6oj8FUr6.js} +1 -1
- package/dist/web/assets/CommunityView-BzpIq1lD.js +1 -0
- package/dist/web/assets/ComposerAttachments-6en7m_ov.js +2 -0
- package/dist/web/assets/ComposerCreateImproveStrip-ChplO9YP.js +1 -0
- package/dist/web/assets/ConversationImportsSettings-DRHgc7j_.js +1 -0
- package/dist/web/assets/FilePagePreview-CW4J_1u7.js +2 -0
- package/dist/web/assets/GetStartedView-CaBk_mX6.js +1 -0
- package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
- package/dist/web/assets/GettingStartedDialog-JtFLyU3F.js +1 -0
- package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-hhcjDifK.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-CY8198Y1.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +1 -0
- package/dist/web/assets/LabSkillSidebar-HibUEEko.js +1 -0
- package/dist/web/assets/{LabsRoute-DOnw39du.js → LabsRoute-B61l1b8P.js} +8 -8
- package/dist/web/assets/MainChatThread-egKi0gLk.js +2 -0
- package/dist/web/assets/MainPane-2dj6Dg4l.js +95 -0
- package/dist/web/assets/{MainPane-CuBUBA9F.css → MainPane-BwHw3UYp.css} +1 -1
- package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
- package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +2 -0
- package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +1 -0
- package/dist/web/assets/NewProjectDialog-t9Imnb__.js +1 -0
- package/dist/web/assets/OutputsPage-CeGq_F1S.js +1 -0
- package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-VHME5V8j.js} +1 -1
- package/dist/web/assets/ProjectsPage-2TMZoEPB.js +1 -0
- package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +1 -0
- package/dist/web/assets/SettingsView-D2bu3tK_.js +5 -0
- package/dist/web/assets/TeamChatView-CN17AsgA.js +1 -0
- package/dist/web/assets/TerminalOverlay-DlhRpi-X.js +16 -0
- package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-BhhZPPuY.js} +1 -1
- package/dist/web/assets/{TrainingMetricWorkbench-BmzHLwIP.js → TrainingMetricWorkbench-DBy8F1xp.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-DTZslBeW.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +35 -0
- package/dist/web/assets/WorkspaceFileLocation-ChEeZffU.js +1 -0
- package/dist/web/assets/WorkspaceGitDialogs-D_RUXhTi.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-BJxaiDrj.js} +3 -3
- package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-A28Poeca.js} +1 -1
- package/dist/web/assets/{chat-resources-CItQ4mZD.js → chat-resources-3SvnVeKv.js} +1 -1
- package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-dYn0pd4Q.js} +1 -1
- package/dist/web/assets/chevron-right-sFx2xRvT.js +1 -0
- package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-BYNVSWIQ-DWh9SmdB.js} +1 -1
- package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ZFYI4P6C-BmsNtSkR.js} +1 -1
- package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-DTTLbrYt.js} +1 -1
- package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-CRMPCFnq.js} +1 -1
- package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
- package/dist/web/assets/copy-DR4ielPn.js +1 -0
- package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-DmttVQ_a.js} +1 -1
- package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-d-2GuNvW.js} +1 -1
- package/dist/web/assets/external-link-B4rPiZEp.js +1 -0
- package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-BrIUcUk_.js} +1 -1
- package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-DwImGEt-.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-Ds1mkrlW.js} +1 -1
- package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-s15GR0Fn.js} +1 -1
- package/dist/web/assets/icons-CK5-nxVC.js +1 -0
- package/dist/web/assets/{image-C7HVlg3X.js → image-CY-sHbfQ.js} +1 -1
- package/dist/web/assets/{index-BsPUniZy.js → index-DYrLeSyY.js} +2 -2
- package/dist/web/assets/index-Dezj4Z2p.css +1 -0
- package/dist/web/assets/{info-BLWDShaz.js → info-aSvM8YlJ.js} +1 -1
- package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-vos9H2hz.js} +1 -1
- package/dist/web/assets/loader-circle-cyf35w3i.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-pQmEaoMt.js} +1 -1
- package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-DgF6ZVOM.js} +1 -1
- package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-BPwsKvRB.js} +2 -2
- package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-BbMpa0_-.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-CJlccVX3.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-pWurLXbm.js} +2 -2
- package/dist/web/assets/{monitor-B6OuAu13.js → monitor-DlEV241C.js} +1 -1
- package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-fnRZSIRc.js} +1 -1
- package/dist/web/assets/{pdf-RXlFwNte.js → pdf-CT3zVKCE.js} +1 -1
- package/dist/web/assets/play-wI_3FLr4.js +1 -0
- package/dist/web/assets/plus-DoJe4fLj.js +1 -0
- package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-Bb8ecExR.js} +1 -1
- package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
- package/dist/web/assets/{python-BQXo7wMt.js → python-DXA1xp0A.js} +1 -1
- package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-B53QjxMO.js} +1 -1
- package/dist/web/assets/{save-BxXc21N6.js → save-V1Q4Fcqa.js} +1 -1
- package/dist/web/assets/settings-lists-CtH1A57b.js +5 -0
- package/dist/web/assets/square-BqSK-hv9.js +1 -0
- package/dist/web/assets/square-terminal-Dmgkm5zY.js +1 -0
- package/dist/web/assets/submit-issue-command-DRgUboVW.js +3 -0
- package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-B-BD2K2Q.js} +1 -1
- package/dist/web/assets/{training-managed-adapter-81RrdT1k.js → training-managed-adapter-BXNwgd3P.js} +1 -1
- package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-14942K_Z.js} +5 -5
- package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-DdgIcxK3.js} +1 -1
- package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
- package/dist/web/assets/{upload-NXasN1wU.js → upload-82Y6RjLi.js} +1 -1
- package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-BgHXNpq_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-BV4CUWzJ.js → useAgentInventory-B-LNn3up.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CsKv22Hs.js} +1 -1
- package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-CPC2wsWm.js} +1 -1
- package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-DXOoDN9l.js} +1 -1
- package/dist/web/assets/{workers-u92Boudu.js → workers-Clf4hKt5.js} +1 -1
- package/dist/web/assets/x-IPhrr4ju.js +1 -0
- package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-I1tf8Uxx.js} +1 -1
- package/dist/web/index.html +12 -3
- package/docs/command-reference.md +28 -2
- package/package.json +2 -1
- package/dist/chunks/app-server-evaluations-HAAYVEXB.js +0 -2
- package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
- package/dist/chunks/chunk-4N3UF3U5.js +0 -2
- package/dist/chunks/chunk-6DCXAXVD.js +0 -22
- package/dist/chunks/chunk-BLKTUFGB.js +0 -2
- package/dist/chunks/chunk-E3EKBPCB.js +0 -2
- package/dist/chunks/chunk-F5JDBDYL.js +0 -2
- package/dist/chunks/chunk-JEVA7YQL.js +0 -3
- package/dist/chunks/chunk-KC7I6E6W.js +0 -2
- package/dist/chunks/chunk-OJSK4NSW.js +0 -151
- package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
- package/dist/chunks/chunk-UJBEWIR3.js +0 -8
- package/dist/chunks/chunk-V67IFV26.js +0 -86
- package/dist/chunks/chunk-VSUHJ46L.js +0 -18
- package/dist/chunks/chunk-X3WEQL3O.js +0 -2
- package/dist/chunks/chunk-XK7SPL63.js +0 -2
- package/dist/chunks/chunk-YR5ID2SS.js +0 -2
- package/dist/chunks/cli-WC45SI7E.js +0 -2
- package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
- package/dist/chunks/experiments-IWSCFDBB.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
- package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
- package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
- package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
- package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-preparation-ZAOGDQXO.js +0 -3
- package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
- package/dist/chunks/opchat-KSOJEL4W.js +0 -3
- package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
- package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
- package/dist/chunks/saved-work-QA46KCME.js +0 -2
- package/dist/chunks/src-E7NWAN5B.js +0 -420
- package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
- package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
- package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
- package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
- package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
- package/dist/web/assets/App-Df7uYQGj.css +0 -1
- package/dist/web/assets/App-Yy3l2sdD.js +0 -56
- package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
- package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
- package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
- package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
- package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
- package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
- package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
- package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
- package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
- package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
- package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
- package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
- package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
- package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
- package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
- package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
- package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
- package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
- package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
- package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
- package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
- package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
- package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
- package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
- package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
- package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
- package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
- package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
- package/dist/web/assets/icons-kaq6k88m.js +0 -1
- package/dist/web/assets/index-DUMDOdB2.css +0 -1
- package/dist/web/assets/play-BPPQoqMl.js +0 -1
- package/dist/web/assets/plus-D18vYzHF.js +0 -1
- package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
- package/dist/web/assets/square-Da8RuqW4.js +0 -1
- package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.native-setup-terminal{z-index:120;height:min(420px,70vh);position:fixed;inset:auto 0 0}.native-setup-terminal .guake-terminal-overlay{height:100%}.native-setup-modal-backdrop{z-index:120;background:var(--backdrop);position:fixed;inset:0}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TerminalOverlay-DlhRpi-X.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-DYrLeSyY.js","assets/index-Dezj4Z2p.css","assets/api-client-Dgz-fOMl.js","assets/icons-CK5-nxVC.js","assets/chevron-down-dYn0pd4Q.js","assets/createLucideIcon-DmttVQ_a.js","assets/plus-DoJe4fLj.js","assets/x-IPhrr4ju.js","assets/AppToastContext-DZLErwj0.js","assets/ui-theme.generated-D-mc26qt.js","assets/App-DHJVXTI2.js","assets/useQuery-CPC2wsWm.js","assets/schemas-lO3MoWQr.js","assets/common-BMjyKlX-.js","assets/settings-BKmRueaw.js","assets/client-choice-storage-DTTLbrYt.js","assets/app-models-BviS9b7U.js","assets/create-pipeline-CyUZrbbO.js","assets/profile-ref-DSNkG6Ol.js","assets/chunk-H3JZ3P5T-B0SCoPw4.js","assets/work-outputs-CK0nHe4g.js","assets/contracts-BHTOD1nd.js","assets/training-managed-adapter-BXNwgd3P.js","assets/chunk-ZFYI4P6C-BmsNtSkR.js","assets/reward-checks-5AOStF27.js","assets/chat-resources-3SvnVeKv.js","assets/ponder-desktop-Dm7tOkKo.js","assets/submit-issue-command-DRgUboVW.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-ujSvTf5h.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/chevron-right-sFx2xRvT.js","assets/copy-DR4ielPn.js","assets/external-link-B4rPiZEp.js","assets/loader-circle-cyf35w3i.js","assets/maximize-2-DgF6ZVOM.js","assets/refresh-cw-B53QjxMO.js","assets/square-terminal-Dmgkm5zY.js","assets/models-route-Bl_TmMl6.js","assets/PageChrome-VHME5V8j.js","assets/AppDialog-BurL61qE.js","assets/organization-types-PP-yuR2J.js","assets/App-DpFKLxuA.css","assets/TerminalOverlay-DoUFGstN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r,t as i}from"./index-DYrLeSyY.js";import{t as a}from"./AppDialog-BurL61qE.js";var o=e(t(),1),s=n(),c=r(),l=(0,o.lazy)(()=>i(()=>import(`./TerminalOverlay-DlhRpi-X.js`).then(e=>({default:e.TerminalOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function u({connection:e,command:t,displayCommand:n=`OpenPond setup`,onClose:r,onComplete:i,modal:u=!1}){let[d,f]=(0,o.useState)([]),[p]=(0,o.useState)(()=>({kind:`draft`,id:`native-setup-${crypto.randomUUID()}`})),m=(0,o.useRef)(!1),[h]=(0,o.useState)(()=>({command:t,displayCommand:n}));(0,o.useEffect)(()=>{!m.current&&d.some(e=>e.lastCommand!==null&&e.lastExitCode===0&&e.commandStatus===`success`)&&(m.current=!0,i?.())},[d,i]);let g=(0,c.jsx)(o.Suspense,{fallback:(0,c.jsx)(`p`,{role:`status`,children:`Opening setup terminal…`}),children:(0,c.jsx)(l,{open:!0,disposeOnUnmount:!0,connection:e,scope:p,tabs:d,onTabsChange:f,cwd:null,appId:null,workspaceName:`Agent setup`,queuedCommand:null,setupCommand:h,onClose:r})});return(0,s.createPortal)(u?(0,c.jsx)(a,{ariaLabel:`Agent setup terminal`,backdropClassName:`native-setup-modal-backdrop`,className:`native-setup-terminal`,onClose:r,children:g}):(0,c.jsx)(`div`,{className:`native-setup-terminal`,children:g}),document.body)}export{u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{L as t}from"./training-model-data-14942K_Z.js";import{t as n}from"./maximize-2-DgF6ZVOM.js";import{t as r}from"./x-IPhrr4ju.js";import{cn as i}from"./App-DHJVXTI2.js";var a=e();function o({expanded:e,skill:o,onClose:s,onResizeStart:c,onToggleExpanded:l}){let u=o.path.split(`/`).at(-1)??o.path;return(0,a.jsxs)(`aside`,{className:`workspace-diff-panel native-skill-sidebar ${e?`expanded`:``}`,"aria-label":`Skill source: ${o.name}`,children:[e?null:(0,a.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize native skill source`,onPointerDown:c}),(0,a.jsxs)(`div`,{className:`workspace-diff-topbar native-skill-sidebar-topbar`,children:[(0,a.jsx)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Native skill files`,children:(0,a.jsxs)(`button`,{className:`workspace-diff-tab active`,type:`button`,role:`tab`,"aria-selected":!0,children:[(0,a.jsx)(i,{size:14}),(0,a.jsx)(`span`,{children:u})]})}),(0,a.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,a.jsx)(`button`,{className:`diff-icon-button`,type:`button`,title:e?`Dock sidebar`:`Expand sidebar`,"aria-label":e?`Dock sidebar`:`Expand sidebar`,onClick:l,children:e?(0,a.jsx)(t,{size:14}):(0,a.jsx)(n,{size:14})}),(0,a.jsx)(`button`,{className:`diff-icon-button`,type:`button`,title:`Close skill source`,"aria-label":`Close skill source`,onClick:s,children:(0,a.jsx)(r,{size:14})})]})]}),(0,a.jsxs)(`div`,{className:`native-skill-sidebar-body`,children:[(0,a.jsxs)(`header`,{className:`native-skill-source-header`,children:[(0,a.jsx)(`h2`,{children:o.name}),(0,a.jsx)(`p`,{children:o.description}),(0,a.jsx)(`code`,{children:o.path})]}),(0,a.jsx)(`pre`,{className:`native-skill-markdown-source`,"aria-label":`${o.name} Markdown source`,children:(0,a.jsx)(`code`,{children:o.body})})]})]})}export{o as NativeSkillSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{t as r}from"./folder-open-BrIUcUk_.js";import{t as i}from"./folder-plus-DwImGEt-.js";import{t as a}from"./monitor-DlEV241C.js";import{t as o}from"./x-IPhrr4ju.js";import{Ht as s,dn as c,sn as l}from"./App-DHJVXTI2.js";var u=e(t(),1),d=n();function f({open:e,mode:t=`local`,name:n,path:f,directory:p,busy:m,onNameChange:h,onPathChange:g,onClose:_,onSubmit:v}){let[y,b]=(0,u.useState)([]),[x,S]=(0,u.useState)(``),[C,w]=(0,u.useState)(``),[T,E]=(0,u.useState)(!1),D=(0,u.useRef)(null),O=(0,u.useRef)(null);if((0,u.useEffect)(()=>{if(e)return D.current=document.activeElement instanceof HTMLElement?document.activeElement:null,()=>D.current?.focus()},[e]),!e)return null;let k=t===`cloud`,A=t===`existing-local`,j=k?c:A?r:i,M=k?`New Cloud Project`:A?`Create project`:`New Local Project`,N=k?`Create a hosted project in OpenPond Cloud.`:`Create a new local Git project and add it to Projects.`,P=!!window.openpond?.selectFolder,F=P?`This computer`:`Connected computer`,I=async()=>{if(!P&&!T){E(!0);return}let e=P?await window.openpond.selectFolder():{path:f.trim(),canceled:!1},t=e.path?.trim();t&&!e.canceled&&(y.includes(t)?w(`This folder is already selected.`):(b(e=>[...e,t]),x||S(t),n.trim()||h(t.split(/[\\/]/).filter(Boolean).at(-1)??t),P||(g(``),E(!1)),w(``)))},L=m||(A?!n.trim()||y.length===0:!n.trim()),R=m?`Creating`:k?`Create Cloud Project`:`Create project`;return(0,d.jsx)(`div`,{className:`git-dialog-backdrop`,role:`presentation`,onKeyDown:e=>{e.key===`Escape`&&!m&&(e.stopPropagation(),_())},children:(0,d.jsxs)(`form`,{ref:O,className:`git-dialog new-project-dialog${A?` new-project-collection`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":`Create project`,onKeyDown:e=>{if(e.key!==`Tab`)return;let t=Array.from(O.current?.querySelectorAll(`button:not(:disabled), input:not(:disabled)`)??[]);if(!t.length)return;let n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},onSubmit:async e=>{e.preventDefault(),w(``),await v(A?{name:n.trim(),sourceFolders:y,primaryFolder:x}:void 0)||w(`Project could not be created. Check the selected folders and try again.`)},children:[(0,d.jsx)(`button`,{className:`git-dialog-close`,disabled:m,type:`button`,onClick:_,children:(0,d.jsx)(o,{size:14})}),A?null:(0,d.jsx)(`div`,{className:`git-dialog-icon`,children:(0,d.jsx)(j,{size:18})}),(0,d.jsx)(`h2`,{children:M}),A?null:(0,d.jsx)(`p`,{children:N}),A?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`label`,{className:`new-project-name-field`,children:[(0,d.jsx)(l,{size:16,"aria-hidden":`true`}),(0,d.jsx)(`input`,{autoFocus:!0,"aria-label":`Project name`,disabled:m,value:n,onChange:e=>h(e.target.value),placeholder:`Project name`})]}),(0,d.jsxs)(`div`,{className:`new-project-source-heading`,children:[(0,d.jsx)(`span`,{children:`Source folders`}),y.length?(0,d.jsxs)(`span`,{children:[(0,d.jsx)(a,{size:15,"aria-hidden":`true`}),F]}):null]}),(0,d.jsxs)(`div`,{className:`new-project-source-box${y.length?` populated`:` empty`}`,children:[y.length===0?(0,d.jsxs)(`div`,{className:`new-project-empty-source`,children:[(0,d.jsxs)(`span`,{children:[`Add a folder on `,P?`this`:`the connected`,` computer`]}),(0,d.jsxs)(`button`,{type:`button`,disabled:m,onClick:()=>void I(),children:[(0,d.jsx)(i,{size:14,"aria-hidden":`true`}),`Add`]})]}):(0,d.jsx)(`ul`,{className:`new-project-folder-list`,children:y.map(e=>(0,d.jsxs)(`li`,{className:`new-project-folder-row`,children:[(0,d.jsx)(l,{size:15,"aria-hidden":`true`}),(0,d.jsx)(`span`,{title:e,"aria-label":e,children:e.split(/[\\/]/).filter(Boolean).at(-1)??e}),x===e?(0,d.jsx)(`span`,{className:`new-project-primary-pill`,children:`Primary`}):(0,d.jsx)(`button`,{className:`new-project-make-primary`,type:`button`,disabled:m,onClick:()=>S(e),children:`Make primary`}),(0,d.jsx)(`button`,{className:`new-project-remove`,type:`button`,disabled:m,"aria-label":`Remove ${e}`,onClick:()=>{b(t=>{let n=t.filter(t=>t!==e);return x===e&&S(n[0]??``),n})},children:(0,d.jsx)(o,{size:14,"aria-hidden":`true`})})]},e))}),y.length?(0,d.jsxs)(`button`,{className:`new-project-add-row`,type:`button`,disabled:m,onClick:()=>void I(),children:[(0,d.jsx)(i,{size:15,"aria-hidden":`true`}),`Add folder`]}):null,T?(0,d.jsxs)(`label`,{className:`new-project-manual-path`,children:[(0,d.jsx)(`span`,{children:`Folder path on connected computer`}),(0,d.jsx)(`input`,{value:f,onChange:e=>g(e.target.value),placeholder:`/path/to/folder`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),I())}}),(0,d.jsx)(`button`,{type:`button`,disabled:!f.trim(),onClick:()=>void I(),children:`Add folder`})]}):null]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,d.jsx)(`span`,{children:`Project name`}),(0,d.jsx)(`input`,{autoFocus:!0,disabled:m,placeholder:`New project`,value:n,onChange:e=>h(e.target.value)})]}),(0,d.jsxs)(`div`,{className:`git-dialog-row`,children:[(0,d.jsx)(`span`,{children:`Location`}),(0,d.jsx)(`strong`,{className:`git-dialog-path`,children:k?`OpenPond Cloud`:p})]})]}),C?(0,d.jsx)(s,{error:C}):null,(0,d.jsxs)(`div`,{className:`new-project-footer`,children:[(0,d.jsx)(`button`,{className:`new-project-cancel`,type:`button`,disabled:m,onClick:_,children:`Cancel`}),(0,d.jsx)(`button`,{className:`git-dialog-primary`,disabled:L,type:`submit`,children:R})]})]})})}export{f as NewProjectDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{C as r,R as i,S as a,z as o}from"./training-model-data-14942K_Z.js";import{i as s,n as c,r as l,t as u}from"./presentation-Bb8ecExR.js";import{t as d}from"./folder-open-BrIUcUk_.js";import{t as f}from"./image-CY-sHbfQ.js";import{t as p}from"./loader-circle-cyf35w3i.js";import{t as m}from"./x-IPhrr4ju.js";import{Ht as h,cn as g,ln as _,wn as v}from"./App-DHJVXTI2.js";var y=e(t(),1),b=`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,x=`application/vnd.openxmlformats-officedocument.presentationml.presentation`,S=`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`;function C(e){let t=e.contentType.toLowerCase(),n=e.title.toLowerCase();return t===b||n.endsWith(`.docx`)?{label:`Document`,type:`document`}:t===`application/pdf`||n.endsWith(`.pdf`)?{label:`PDF`,type:`pdf`}:t===x||n.endsWith(`.pptx`)?{label:`Presentation`,type:`presentation`}:t===S||t===`text/csv`||t===`text/tab-separated-values`||n.endsWith(`.xlsx`)||n.endsWith(`.csv`)||n.endsWith(`.tsv`)?{label:`Table`,type:`table`}:t===`text/html`||n.endsWith(`.html`)?{label:`HTML`,type:`html`}:t===`application/json`||t===`text/markdown`||t===`text/plain`?{label:`Text`,type:`text`}:t.startsWith(`image/`)?{label:`Image`,type:`image`}:t.startsWith(`audio/`)?{label:`Audio`,type:`audio`}:t.startsWith(`video/`)?{label:`Video`,type:`video`}:{label:`File`,type:`file`}}function w(e){return[...e].sort((e,t)=>T(t.createdAt)-T(e.createdAt)||t.revision-e.revision)}function T(e){let t=new Date(e).getTime();return Number.isNaN(t)?0:t}var E=15e3,D=new Map;function O(e){let t=(0,y.useMemo)(()=>e?j(e):null,[e]),n=t?k(t):null,[r,i]=(0,y.useState)(n??[]),[a,o]=(0,y.useState)(!!e&&!n),[s,c]=(0,y.useState)(null);return(0,y.useEffect)(()=>{let n=!1;if(!e||!t){i([]),o(!1),c(null);return}let r=k(t);return i(r??[]),o(!r),c(null),A(e).then(e=>{n||i(e)}).catch(e=>{n||c(M(e))}).finally(()=>{n||o(!1)}),()=>{n=!0}},[t,e]),{error:s,loading:a,outputs:r}}function k(e){let t=D.get(e);return t&&t.refreshedAt>0?t.outputs:null}function A(e){let t=j(e),n=D.get(t);if(n?.request)return n.request;if(n&&n.refreshedAt>0&&Date.now()-n.refreshedAt<E)return Promise.resolve(n.outputs);let r=v.workOutputs(e).then(e=>w(e.outputs)).then(e=>(D.set(t,{outputs:e,refreshedAt:Date.now(),request:null}),e)).catch(e=>{throw n?D.set(t,{...n,request:null}):D.delete(t),e});return D.set(t,{outputs:n?.outputs??[],refreshedAt:n?.refreshedAt??0,request:r}),r}function j(e){return`${e.serverUrl}\0${e.token}`}function M(e){return e instanceof Error?e.message:`Could not load Work outputs.`}var N=n(),P=`all`,F=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function I({connection:e,onViewChat:t}){let{error:n,loading:i,outputs:a}=O(e),[o,s]=(0,y.useState)(P),[c,l]=(0,y.useState)(null),[u,d]=(0,y.useState)(null),[f,m]=(0,y.useState)(null);(0,y.useEffect)(()=>()=>{f?.objectUrl&&URL.revokeObjectURL(f.objectUrl)},[f?.objectUrl]);let g=(0,y.useMemo)(()=>Array.from(new Set(a.map(e=>C(e).label))).sort((e,t)=>e.localeCompare(t)),[a]),b=g.includes(o)?o:P,x=(0,y.useMemo)(()=>b===P?a:a.filter(e=>C(e).label===b),[b,a]);async function S(t){if(!e)return;let n=V(t);d(n),l(null);try{let n=await v.workspaceTool(e,t.sourceTaskId,{action:`work_output_read`,source:`ui_button`,args:{outputId:t.id,revision:t.revision}});if(!n.ok)throw Error(n.output);let r=G(n.data),i=typeof r.contentsBase64==`string`?r.contentsBase64:``;if(!i)throw Error(`The output did not include file data.`);let a=new File([W(i)],t.title,{type:t.contentType}),o=C(t),s=o.type===`text`||o.type===`html`;f?.objectUrl&&URL.revokeObjectURL(f.objectUrl),m({file:a,objectUrl:s?null:URL.createObjectURL(a),output:t,text:s?await a.text():null})}catch(e){l(K(e))}finally{d(null)}}async function w(e){if(e.location.kind!==`local`)return;let t=await r(e.location.path,e.title);!t.ok&&!t.canceled&&l(`Could not save a copy of the Work output.`)}return(0,N.jsxs)(`section`,{"aria-label":`Outputs`,className:`outputs-view${f?` detail-open`:``}`,children:[(0,N.jsx)(`div`,{className:`outputs-scroll`,children:(0,N.jsxs)(`div`,{className:`outputs-content`,children:[a.length>0?(0,N.jsx)(`header`,{className:`outputs-header`,children:(0,N.jsx)(`label`,{className:`outputs-filter`,children:(0,N.jsxs)(`select`,{"aria-label":`Filter files by file type`,onChange:e=>s(e.target.value),value:b,children:[(0,N.jsx)(`option`,{value:P,children:`All file types`}),g.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]})})}):null,n||c?(0,N.jsx)(h,{error:c??n}):null,e?i&&a.length===0?(0,N.jsxs)(`div`,{className:`outputs-loading`,role:`status`,children:[(0,N.jsx)(p,{className:`outputs-spin`,size:16}),(0,N.jsx)(`span`,{children:`Loading files`})]}):a.length===0?(0,N.jsx)(B,{children:`Files created in Work will appear here.`}):x.length===0?(0,N.jsx)(B,{children:`No files match this file type.`}):(0,N.jsx)(`div`,{className:`outputs-grid`,"data-testid":`desktop-output-cards`,children:x.map(e=>{let n=C(e),r=V(e);return(0,N.jsxs)(`article`,{className:`output-card`,children:[(0,N.jsxs)(`button`,{"aria-label":`Preview ${e.title}`,className:`output-card-main`,disabled:u===r,onClick:()=>void S(e),type:`button`,children:[(0,N.jsx)(`span`,{className:`output-card-icon`,children:(0,N.jsx)(R,{type:n.type})}),(0,N.jsxs)(`span`,{className:`output-card-copy`,children:[(0,N.jsx)(`strong`,{children:e.title}),(0,N.jsxs)(`small`,{children:[n.label,` · `,H(e.sizeBytes)]}),(0,N.jsxs)(`small`,{children:[`Revision `,e.revision,` ·`,` `,(0,N.jsx)(`time`,{dateTime:e.createdAt,children:U(e.createdAt)})]})]}),u===r?(0,N.jsx)(p,{className:`outputs-spin`,size:15}):null]}),(0,N.jsxs)(`div`,{className:`output-card-actions`,children:[e.location.kind===`local`?(0,N.jsx)(`button`,{"aria-label":`Download ${e.title}`,className:`output-download-button`,onClick:()=>void w(e),title:`Download`,type:`button`,children:(0,N.jsx)(_,{"aria-hidden":`true`,size:14})}):null,(0,N.jsx)(`button`,{onClick:()=>t(e.sourceTaskId),type:`button`,children:`View chat`})]})]},r)})}):(0,N.jsx)(B,{children:`Connect to the local OpenPond server to view outputs.`})]})}),f?(0,N.jsx)(L,{onClose:()=>m(null),onSave:()=>void w(f.output),onViewChat:()=>t(f.output.sourceTaskId),preview:f}):null]})}function L({onClose:e,onSave:t,onViewChat:n,preview:r}){let i=C(r.output);return(0,N.jsxs)(`aside`,{"aria-label":`${r.output.title} preview`,className:`output-detail`,children:[(0,N.jsxs)(`header`,{className:`output-detail-header`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h2`,{children:r.output.title}),(0,N.jsxs)(`p`,{children:[i.label,` · Revision `,r.output.revision]})]}),(0,N.jsx)(`button`,{"aria-label":`Close output preview`,onClick:e,type:`button`,children:(0,N.jsx)(m,{size:16})})]}),(0,N.jsx)(`div`,{className:`output-preview-surface`,children:r.text===null?i.type===`image`&&r.objectUrl?(0,N.jsx)(`img`,{alt:r.output.title,src:r.objectUrl}):i.type===`pdf`&&r.objectUrl?(0,N.jsx)(`iframe`,{src:r.objectUrl,title:r.output.title}):i.type===`audio`&&r.objectUrl?(0,N.jsx)(`audio`,{controls:!0,src:r.objectUrl}):i.type===`video`&&r.objectUrl?(0,N.jsx)(`video`,{controls:!0,src:r.objectUrl}):(0,N.jsxs)(`div`,{className:`output-native-preview`,children:[(0,N.jsx)(R,{type:i.type}),(0,N.jsx)(`p`,{children:`This file type uses its native application for detailed review.`})]}):i.type===`html`?(0,N.jsx)(`iframe`,{sandbox:``,srcDoc:r.text,title:r.output.title}):(0,N.jsx)(`pre`,{children:r.text})}),(0,N.jsxs)(`div`,{className:`output-detail-actions`,children:[r.output.location.kind===`local`?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`button`,{onClick:()=>void a(r.output.location.kind===`local`?r.output.location.path:``),type:`button`,children:[(0,N.jsx)(d,{size:14}),`Reveal`]}),(0,N.jsx)(`button`,{"aria-label":`Download ${r.output.title}`,className:`output-download-button`,onClick:t,title:`Download`,type:`button`,children:(0,N.jsx)(_,{"aria-hidden":`true`,size:14})})]}):null,(0,N.jsx)(`button`,{onClick:n,type:`button`,children:`View chat`})]})]})}function R({type:e}){let t=z(e);return(0,N.jsx)(t,{"aria-hidden":`true`,size:18})}function z(e){return e===`audio`?s:e===`html`||e===`text`?o:e===`image`?f:e===`presentation`?u:e===`table`?l:e===`video`?c:e===`file`?i:g}function B({children:e}){return(0,N.jsx)(`p`,{className:`outputs-empty`,children:e})}function V(e){return`${e.sourceTaskId}:${e.id}:${e.revision}`}function H(e){return e<1e3?`${e} B`:e<1e6?`${(e/1e3).toFixed(1)} KB`:`${(e/1e6).toFixed(1)} MB`}function U(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Unknown date`:F.format(t)}function W(e){let t=window.atob(e),n=new ArrayBuffer(t.length),r=new Uint8Array(n);for(let e=0;e<t.length;e+=1)r[e]=t.charCodeAt(e);return n}function G(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function K(e){return e instanceof Error?e.message:`Could not load Work outputs.`}export{I as OutputsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r}from"./index-DYrLeSyY.js";var i=e(t(),1),a=n(),o=r(),s=(0,i.createContext)(null);function c({children:e}){let[t,n]=(0,i.useState)(null),[r,a]=(0,i.useState)(null),[c,l]=(0,i.useState)(null),u=(0,i.useMemo)(()=>({title:t,actions:r,activity:c,setTitle:n,setActions:a,setActivity:l}),[t,r,c]);return(0,o.jsx)(s.Provider,{value:u,children:e})}function l({children:e}){return(0,o.jsx)(s.Provider,{value:null,children:e})}function u({children:e,className:t=``}){let n=(0,i.useContext)(s);return(0,o.jsx)(`div`,{ref:n?.setTitle,className:`page-chrome-title-target ${t}`,children:e?(0,o.jsx)(`div`,{className:`page-chrome-fallback`,children:e}):null})}function d({className:e=``}){let t=(0,i.useContext)(s);return(0,o.jsx)(`div`,{ref:t?.setActions,className:e})}function f({title:e,actions:t,fallback:n,children:r}){let c=(0,i.useContext)(s);return c?(0,o.jsxs)(o.Fragment,{children:[c.title?(0,a.createPortal)((0,o.jsx)(`div`,{className:`page-chrome-title`,children:e}),c.title):null,c.actions&&t?(0,a.createPortal)(t,c.actions):null,r]}):n??(0,o.jsxs)(`header`,{children:[e,t]})}export{u as a,c as i,l as n,f as r,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{h as r}from"./app-models-BviS9b7U.js";import"./icons-CK5-nxVC.js";import{t as i}from"./cloud-upload-CRMPCFnq.js";import{t as a}from"./external-link-B4rPiZEp.js";import{Ht as o,Sn as s,Wt as c,Xt as l,Zt as u,dn as d,on as f,s as p,wn as m}from"./App-DHJVXTI2.js";var h=e(t(),1);function g(e,t){let n=e.project.sourceLabel?.trim()??``;if(e.project.sourceType===`github_repo`&&n){if(/^https?:\/\//i.test(n))return n;if(/^[^/\s]+\/[^/\s]+$/.test(n))return`https://github.com/${n}`}return p({accountBaseUrl:t,organizationSlug:e.project.organizationSlug,projectSlug:e.project.slug})}function _(e,t){return e.kind===`cloud`?g(e,t):e.project.linkedSandboxProject?.sourceRepoUrl??null}function v(e){return e.replace(/^https?:\/\//i,``).replace(/\/$/,``)}async function y(e){let t=window.openpond?.browser;if(t){let n=await t.openExternal({conversationId:`projects`,url:e});if(!n.ok)throw Error(n.error??`Unable to open project URL.`)}else window.open(e,`_blank`,`noopener,noreferrer`)}var b=n();function x({loading:e,workspace:t,linked:n,unavailable:r}){if(e)return(0,b.jsx)(E,{children:`Loading environments…`});if(!n)return(0,b.jsx)(E,{children:`Upload this local project to create cloud development environments.`});if(r)return(0,b.jsx)(E,{error:!0,children:`Unable to load environments.`});if(!t?.environments.length)return(0,b.jsx)(E,{children:`No development environment has been created for this project yet.`});let i=A(t);return(0,b.jsx)(T,{headings:[`Environment`,`Status`,`Branch`,`Default`,`Updated`],children:t.environments.map(({sandbox:e,runtime:t})=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:(0,b.jsx)(`strong`,{children:j(e.metadata,e.id)})}),(0,b.jsx)(`td`,{children:(0,b.jsx)(D,{status:e.state})}),(0,b.jsx)(`td`,{children:(0,b.jsx)(`code`,{children:t?.baseBranch??e.repoRef??`Not available`})}),(0,b.jsx)(`td`,{children:e.id===i?`Preferred`:`—`}),(0,b.jsx)(`td`,{children:I(e.updatedAt)})]},e.id))})}function S({loading:e,workspace:t,linked:n,unavailable:r}){return e?(0,b.jsx)(E,{children:`Loading deployments…`}):n?r||t?.errors.deployments?(0,b.jsx)(E,{error:!0,children:`Unable to load deployments.`}):t?.website?t.deployments.length?(0,b.jsx)(T,{headings:[`Deployment`,`Status`,`Commit`,`Build`,`Created by`,`Created`],children:t.deployments.map(e=>(0,b.jsx)(O,{deployment:e},e.release.id))}):(0,b.jsx)(E,{children:`No deployments yet.`}):(0,b.jsx)(E,{children:`Set up Website before creating a deployment.`}):(0,b.jsx)(E,{children:`Upload this local project before creating deployments.`})}function C({loading:e,workspace:t,linked:n,unavailable:r}){let[i,a]=(0,h.useState)(null);return e?(0,b.jsx)(E,{children:`Loading requests…`}):n?r||t?.errors.requests?(0,b.jsx)(E,{error:!0,children:`Unable to load requests.`}):t?.website?t.requests.length?(0,b.jsx)(`div`,{className:`project-detail-table-frame`,children:(0,b.jsxs)(`table`,{className:`project-detail-table project-request-table`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`Request`}),(0,b.jsx)(`th`,{children:`Status`}),(0,b.jsx)(`th`,{children:`Runtime`}),(0,b.jsx)(`th`,{children:`Started`}),(0,b.jsx)(`th`,{children:`Duration`})]})}),t.requests.map(e=>{let t=i===e.id;return(0,b.jsxs)(`tbody`,{children:[(0,b.jsxs)(`tr`,{"aria-expanded":t,className:`project-request-row`,onClick:()=>a(t=>t===e.id?null:e.id),children:[(0,b.jsxs)(`td`,{children:[(0,b.jsx)(`code`,{children:e.method}),` `,N(e.path)]}),(0,b.jsx)(`td`,{children:(0,b.jsx)(D,{status:String(e.responseStatus),tone:e.outcome===`failure`?`error`:`success`})}),(0,b.jsx)(`td`,{children:e.coldStart===null?`Unknown`:e.coldStart?`Cold`:`Warm`}),(0,b.jsx)(`td`,{children:I(e.startedAt)}),(0,b.jsx)(`td`,{children:F(e.totalDurationMs)})]}),t?(0,b.jsx)(k,{trace:e}):null]},e.id)})]})}):(0,b.jsx)(E,{children:`No requests yet.`}):(0,b.jsx)(E,{children:`Set up Website to receive requests.`}):(0,b.jsx)(E,{children:`Upload this local project and set up Website to receive requests.`})}function w({loading:e,workspace:t,linked:n,unavailable:r}){if(e)return(0,b.jsx)(E,{children:`Loading website…`});if(!n)return(0,b.jsx)(E,{children:`Upload this local project before setting up Website.`});if(r||t?.errors.website)return(0,b.jsx)(E,{error:!0,children:`Unable to load the website.`});let i=t?.website??null,a=i?.settings.platformDomain?`https://${i.settings.platformDomain}`:null,o=i?.releases.find(e=>e.id===i.settings.activeReleaseId)?.sourceCommitSha??null,s=[[`Public URL`,a?(0,b.jsx)(`a`,{href:a,onClick:e=>{e.preventDefault(),y(a)},children:v(a)}):`Not assigned`],[`Live release`,i?.settings.activeReleaseId?`Active`:`Not published`],[`Source`,o?P(o):`Not available`],[`Account database`,M(t)],[`Availability`,i?.settings.runtimePolicy?.availabilityMode===`always_on`?`Always on`:`On demand`]];return(0,b.jsxs)(`div`,{className:`project-detail-table-frame`,children:[(0,b.jsxs)(`table`,{className:`project-detail-table`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`Setting`}),(0,b.jsx)(`th`,{children:`Value`})]})}),(0,b.jsx)(`tbody`,{children:s.map(([e,t])=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:e}),(0,b.jsx)(`td`,{children:t})]},e))})]}),i?null:(0,b.jsx)(`div`,{className:`project-detail-table-note`,children:`Website has not been set up for this project.`})]})}function T({headings:e,children:t}){return(0,b.jsx)(`div`,{className:`project-detail-table-frame`,children:(0,b.jsxs)(`table`,{className:`project-detail-table`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsx)(`tr`,{children:e.map(e=>(0,b.jsx)(`th`,{children:e},e))})}),(0,b.jsx)(`tbody`,{children:t})]})})}function E({children:e,error:t=!1}){return(0,b.jsx)(`div`,{className:`project-detail-empty${t?` error`:``}`,children:e})}function D({status:e,tone:t}){return(0,b.jsx)(`span`,{className:`project-detail-status${t?` ${t}`:``}`,children:e.replaceAll(`_`,` `)})}function O({deployment:e}){let{build:t,release:n}=e;return(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:(0,b.jsxs)(`strong`,{children:[`v`,n.version]})}),(0,b.jsx)(`td`,{children:(0,b.jsx)(D,{status:n.status,tone:n.status===`failed`?`error`:n.status===`active`||n.status===`ready`?`success`:void 0})}),(0,b.jsx)(`td`,{children:(0,b.jsx)(`code`,{children:n.sourceCommitSha?P(n.sourceCommitSha):`Not available`})}),(0,b.jsx)(`td`,{children:t?`${t.status.replaceAll(`_`,` `)} · ${t.currentStage.replaceAll(`_`,` `)}`:`Not started`}),(0,b.jsx)(`td`,{children:e.creatorName??`Unknown`}),(0,b.jsx)(`td`,{children:I(n.createdAt)})]})}function k({trace:e}){return(0,b.jsx)(`tr`,{className:`project-request-detail`,children:(0,b.jsxs)(`td`,{colSpan:5,children:[(0,b.jsx)(`dl`,{children:e.stages.map((e,t)=>(0,b.jsxs)(`div`,{children:[(0,b.jsxs)(`dt`,{children:[e.name.replaceAll(`_`,` `),e.errorCode?` · ${e.errorCode}`:``]}),(0,b.jsx)(`dd`,{children:F(e.durationMs)})]},`${e.name}:${t}`))}),e.errorCode?(0,b.jsx)(`p`,{children:e.errorCode}):null]})})}function A(e){let t=e.project.metadata.preferredDevelopmentSandboxId;return typeof t==`string`&&t.trim()?t:null}function j(e,t){for(let t of[`name`,`label`,`environmentName`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return t.length>18?t.slice(0,18):t}function M(e){return e?.website?e.errors.database?`Unavailable`:e.database?.status===`ready`?`Connected · ${e.database.provider}`:e.database?.status===`provisioning`?`Connecting…`:`Not connected`:`Set up the website first`}function N(e){let t=e.indexOf(`/ingress`);return t===-1?e:`/api${e.slice(t+8)||`/`}`}function P(e){return e.length>12?e.slice(0,12):e}function F(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function I(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString():e}function L({accountBaseUrl:e,connection:t,project:n,taskCount:r,teamName:d,onBack:f,onNewTask:p,onTogglePinned:g,onUploadLocalProject:v}){let[T,E]=(0,h.useState)(`source`),[D,O]=(0,h.useState)(null),[k,A]=(0,h.useState)(null),[j,M]=(0,h.useState)(!1),[N,P]=(0,h.useState)([]),[F,I]=(0,h.useState)(!1),[L,K]=(0,h.useState)(null),q=H(n);(0,h.useEffect)(()=>{E(`source`)},[n.id]),(0,h.useEffect)(()=>{let e=!0;if(A(null),O(null),M(!1),P([]),K(null),!t)return I(!1),()=>{e=!1};I(!0);let r=q?R(t,q):Promise.resolve(null),i=n.kind===`local`?m.localProjectActions(t,n.project.id):Promise.resolve(null);return Promise.allSettled([r,i]).then(([t,r])=>{if(!e)return;t.status===`fulfilled`&&t.value&&(O(t.value.project),A(t.value.workspace),M(t.value.workspaceUnavailable)),r.status===`fulfilled`&&r.value&&P(r.value.actions.map(W));let i=[t,r].filter(e=>e.status===`rejected`);i.length>0&&i.length===Number(!!q)+Number(n.kind===`local`)&&K(i[0]?.reason instanceof Error?i[0].reason.message:`Project details could not be loaded.`),I(!1)}),()=>{e=!1}},[t,q?.projectId,q?.teamId,n]);let J=(0,h.useMemo)(()=>G(U(D),N),[D,N]),Y=_(n,e),X=V({hostedProject:D,project:n,repositoryUrl:Y,taskCount:r,teamName:d});return(0,b.jsxs)(`section`,{"aria-label":`${n.project.name} project`,className:`project-detail-view`,children:[(0,b.jsxs)(`header`,{className:`project-detail-header`,children:[(0,b.jsxs)(`div`,{className:`project-detail-heading`,children:[(0,b.jsxs)(`button`,{className:`project-detail-back`,onClick:f,type:`button`,children:[(0,b.jsx)(s,{"aria-hidden":`true`,size:15}),(0,b.jsx)(`span`,{children:`Projects`})]}),(0,b.jsx)(`h1`,{children:n.project.name})]}),(0,b.jsxs)(`div`,{className:`project-detail-actions`,children:[n.kind===`local`?(0,b.jsxs)(`button`,{onClick:()=>v(n),type:`button`,children:[(0,b.jsx)(i,{"aria-hidden":`true`,size:14}),(0,b.jsx)(`span`,{children:`Upload`})]}):null,Y?(0,b.jsxs)(`button`,{onClick:()=>void y(Y),type:`button`,children:[(0,b.jsx)(a,{"aria-hidden":`true`,size:14}),(0,b.jsx)(`span`,{children:`Open repository`})]}):null,(0,b.jsxs)(`button`,{onClick:()=>p(n),type:`button`,children:[(0,b.jsx)(c,{"aria-hidden":`true`,size:14}),(0,b.jsx)(`span`,{children:`New task`})]}),(0,b.jsx)(`button`,{"aria-label":`${n.pinned?`Unpin`:`Pin`} ${n.project.name}`,onClick:()=>g(n),title:n.pinned?`Unpin project`:`Pin project`,type:`button`,children:n.pinned?(0,b.jsx)(l,{"aria-hidden":`true`,size:14}):(0,b.jsx)(u,{"aria-hidden":`true`,size:14})})]})]}),(0,b.jsxs)(`div`,{"aria-label":`Project detail`,className:`project-detail-tabs`,role:`tablist`,children:[(0,b.jsx)(`button`,{"aria-selected":T===`source`,onClick:()=>E(`source`),role:`tab`,type:`button`,children:`Source`}),(0,b.jsxs)(`button`,{"aria-selected":T===`actions`,onClick:()=>E(`actions`),role:`tab`,type:`button`,children:[`Project Actions`,J.length>0?(0,b.jsx)(`span`,{children:J.length}):null]}),(0,b.jsx)(`button`,{"aria-selected":T===`environments`,onClick:()=>E(`environments`),role:`tab`,type:`button`,children:`Environments`}),(0,b.jsx)(`button`,{"aria-selected":T===`deployments`,onClick:()=>E(`deployments`),role:`tab`,type:`button`,children:`Deployments`}),(0,b.jsx)(`button`,{"aria-selected":T===`requests`,onClick:()=>E(`requests`),role:`tab`,type:`button`,children:`Requests`}),(0,b.jsx)(`button`,{"aria-selected":T===`website`,onClick:()=>E(`website`),role:`tab`,type:`button`,children:`Website`})]}),L?(0,b.jsx)(o,{error:L}):null,T===`source`?(0,b.jsx)(z,{loading:F,rows:X}):T===`actions`?(0,b.jsx)(B,{actions:J,loading:F}):T===`environments`?(0,b.jsx)(x,{linked:!!q,loading:F,unavailable:j,workspace:k}):T===`deployments`?(0,b.jsx)(S,{linked:!!q,loading:F,unavailable:j,workspace:k}):T===`requests`?(0,b.jsx)(C,{linked:!!q,loading:F,unavailable:j,workspace:k}):(0,b.jsx)(w,{linked:!!q,loading:F,unavailable:j,workspace:k})]})}async function R(e,t){try{let n=await m.getSandboxProjectWorkspace(e,t.projectId,{teamId:t.teamId});return{project:n.project,workspace:n,workspaceUnavailable:!1}}catch{return{project:(await m.getSandboxProject(e,t.projectId,{teamId:t.teamId})).project,workspace:null,workspaceUnavailable:!0}}}function z({loading:e,rows:t}){return(0,b.jsx)(`div`,{className:`project-detail-table-frame`,children:(0,b.jsxs)(`table`,{className:`project-detail-table`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`Setting`}),(0,b.jsx)(`th`,{children:`Value`})]})}),(0,b.jsx)(`tbody`,{children:t.map(([t,n])=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:t}),(0,b.jsx)(`td`,{children:e&&t===`Latest commit`?`Loading…`:n})]},t))})]})})}function B({actions:e,loading:t}){return t?(0,b.jsx)(`div`,{className:`project-detail-empty`,children:`Loading Project Actions…`}):e.length===0?(0,b.jsx)(`div`,{className:`project-detail-empty`,children:`No Project Actions are registered from this source.`}):(0,b.jsx)(`div`,{className:`project-detail-table-frame`,children:(0,b.jsxs)(`table`,{className:`project-detail-table actions`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`Action`}),(0,b.jsx)(`th`,{children:`Description`}),(0,b.jsx)(`th`,{children:`Source`})]})}),(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:(0,b.jsx)(`code`,{children:e.id})}),(0,b.jsx)(`td`,{children:e.description??`No description`}),(0,b.jsx)(`td`,{children:e.source===`hosted`?`Hosted project`:`Local source`})]},`${e.source}:${e.id}`))})]})})}function V(e){let{hostedProject:t,project:n,repositoryUrl:r,taskCount:i,teamName:a}=e,o=n.kind===`local`?n.project.linkedSandboxProject:null,s=t?.gitBranch??t?.defaultBranch??(n.kind===`cloud`?n.project.defaultBranch:o?.defaultBranch)??`Not set`,c=t?K(t):o?.lastUploadedCommit??null,l=t?.sandboxManifestSyncedAt??(n.kind===`cloud`?n.project.syncedAt:o?.syncedAt)??null;return[[`Repository`,r?(0,b.jsx)(`a`,{href:r,onClick:e=>{e.preventDefault(),y(r)},children:v(r)}):n.kind===`local`?n.project.path:`Not available`],...n.kind===`local`?[[`Primary folder`,n.project.workspacePath],[`Source folders`,(0,b.jsx)(`ul`,{className:`project-source-folder-list`,children:(n.project.sourceFolders??[n.project.workspacePath]).map(e=>(0,b.jsx)(`li`,{children:e},e))},`source-folders`)]]:[],[`Branch`,s],[`Latest commit`,c?q(c):`Not available`],[`Last synced`,l?J(l):`Not available`],[`Team`,a??(n.kind===`cloud`?n.project.organizationName:null)??`Local only`],[`Tasks`,String(i)]]}function H(e){if(e.kind===`cloud`)return{projectId:e.project.id,teamId:e.project.teamId};let t=e.project.linkedSandboxProject;return t?{projectId:t.projectId,teamId:t.teamId}:null}function U(e){let t=e?.sandboxActionRegistry?.actions;return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e,n=typeof(t.id??t.name)==`string`?String(t.id??t.name).trim():``;return n?[{id:n,description:typeof t.description==`string`?t.description:null,source:`hosted`}]:[]}):[]}function W(e){return{id:e.id,description:e.description??e.label??e.name??null,source:`local`}}function G(e,t){let n=new Map;for(let r of[...e,...t])n.has(r.id)||n.set(r.id,r);return Array.from(n.values()).sort((e,t)=>e.id.localeCompare(t.id))}function K(e){return[e.sourceConfig.commitSha,e.sourceConfig.sourceCommitSha,e.metadata.commitSha,e.metadata.sourceCommitSha,e.templateRemoteSha].find(e=>typeof e==`string`&&!!e.trim())??null}function q(e){return e.length>12?e.slice(0,12):e}function J(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString():e}var Y=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function X({accountBaseUrl:e,connection:t,projects:n,taskCountByProjectId:a,teamName:o,onNewCloudProject:s,onNewLocalProject:p,onNewTask:m,onTogglePinned:g,onUploadLocalProject:_}){let[v,y]=(0,h.useState)(null),x=(0,h.useMemo)(()=>n.find(e=>e.id===v)??null,[n,v]);return(0,h.useEffect)(()=>{v&&!x&&y(null)},[x,v]),x?(0,b.jsx)(L,{accountBaseUrl:e,connection:t,onBack:()=>y(null),onNewTask:m,onTogglePinned:g,onUploadLocalProject:_,project:x,taskCount:a[x.id]??0,teamName:o}):(0,b.jsxs)(`section`,{"aria-label":`Projects`,className:`projects-page`,children:[(0,b.jsxs)(`header`,{className:`projects-page-header`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`h1`,{children:`Projects`}),(0,b.jsxs)(`p`,{children:[`Local projects on this device and hosted projects for `,o??`your active team`,`.`]})]}),(0,b.jsxs)(`div`,{className:`projects-cloud-actions`,children:[(0,b.jsxs)(`button`,{className:`projects-cloud-button`,onClick:p,type:`button`,children:[(0,b.jsx)(f,{"aria-hidden":`true`,size:15}),(0,b.jsx)(`span`,{children:`Add project`})]}),(0,b.jsxs)(`button`,{className:`projects-cloud-button`,onClick:s,type:`button`,children:[(0,b.jsx)(d,{"aria-hidden":`true`,size:15}),(0,b.jsx)(`span`,{children:`New cloud project`})]})]})]}),n.length===0?(0,b.jsxs)(`div`,{className:`projects-empty`,children:[(0,b.jsx)(f,{"aria-hidden":`true`,size:24}),(0,b.jsx)(`h2`,{children:`No projects yet`}),(0,b.jsx)(`p`,{children:`Add folders from this computer or create a hosted project.`})]}):(0,b.jsx)(`div`,{className:`projects-table-frame`,children:(0,b.jsxs)(`table`,{className:`projects-table`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{scope:`col`,children:`Project`}),(0,b.jsx)(`th`,{scope:`col`,children:`Location`}),(0,b.jsx)(`th`,{scope:`col`,children:`Tasks`}),(0,b.jsx)(`th`,{scope:`col`,children:`Updated`}),(0,b.jsx)(`th`,{"aria-label":`Project actions`,scope:`col`})]})}),(0,b.jsx)(`tbody`,{children:n.map(t=>{let n=t.project.updatedAt;return(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:(0,b.jsxs)(`button`,{className:`projects-name-button`,onClick:()=>y(t.id),type:`button`,children:[(0,b.jsx)(`span`,{className:`projects-kind-icon ${Z(t)}`,children:r(t)?(0,b.jsx)(f,{"aria-hidden":`true`,size:16}):(0,b.jsx)(d,{"aria-hidden":`true`,size:16})}),(0,b.jsx)(`span`,{className:`projects-name-copy`,children:(0,b.jsx)(`strong`,{children:t.project.name})})]})}),(0,b.jsx)(`td`,{children:r(t)?(0,b.jsxs)(`div`,{className:`projects-location-cell`,children:[(0,b.jsx)(`span`,{className:`projects-location`,title:t.project.path,children:t.project.path}),(0,b.jsxs)(`button`,{className:`projects-upload-button`,onClick:()=>_(t),title:`Upload ${t.project.name} to the active team`,type:`button`,children:[(0,b.jsx)(i,{"aria-hidden":`true`,size:13}),(0,b.jsx)(`span`,{children:`Upload`})]})]}):(0,b.jsx)(Q,{accountBaseUrl:e,project:t})}),(0,b.jsx)(`td`,{children:a[t.id]??0}),(0,b.jsx)(`td`,{children:n?(0,b.jsx)(`time`,{dateTime:n,children:$(n)}):(0,b.jsx)(`span`,{className:`projects-table-muted`,children:`—`})}),(0,b.jsx)(`td`,{children:(0,b.jsxs)(`div`,{className:`projects-row-actions`,children:[(0,b.jsx)(`button`,{"aria-label":`Start a new task in ${t.project.name}`,onClick:()=>m(t),title:`New task`,type:`button`,children:(0,b.jsx)(c,{"aria-hidden":`true`,size:15})}),(0,b.jsx)(`button`,{"aria-label":`${t.pinned?`Unpin`:`Pin`} ${t.project.name}`,onClick:()=>g(t),title:t.pinned?`Unpin project`:`Pin project`,type:`button`,children:t.pinned?(0,b.jsx)(l,{"aria-hidden":`true`,size:15}):(0,b.jsx)(u,{"aria-hidden":`true`,size:15})})]})})]},t.id)})})]})})]})}function Z(e){return r(e)?e.project.linkedSandboxProject&&e.cloudLinkTrusted?`linked`:`desktop`:`cloud`}function Q({accountBaseUrl:e,project:t}){let n=g(t,e);return n?(0,b.jsxs)(`a`,{className:`projects-location-link`,href:n,onClick:e=>{e.preventDefault(),y(n)},title:n,children:[(0,b.jsx)(`span`,{children:v(n)}),(0,b.jsx)(a,{"aria-hidden":`true`,size:12})]}):(0,b.jsx)(`span`,{className:`projects-table-muted`,children:`Repository unavailable`})}function $(e){let t=Date.parse(e);return Number.isFinite(t)?Y.format(t):e}export{X as ProjectsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{w as r,x as i}from"./submit-issue-command-DRgUboVW.js";import{n as a,s as o,t as ee}from"./browser-sidebar-links-ujSvTf5h.js";import"./icons-CK5-nxVC.js";import{t as s}from"./folder-open-BrIUcUk_.js";import{t as c}from"./plus-DoJe4fLj.js";import{t as te}from"./x-IPhrr4ju.js";import{ct as ne,en as re,et as l,i as u,it as ie,lt as ae,ot as oe,st as se}from"./App-DHJVXTI2.js";import{n as ce,r as d,t as f}from"./ChatTimelineEntry-BITv20Ze.js";import{A as p,E as le,H as m,M as h,T as ue,W as de,j as fe,w as pe}from"./MainPane-2dj6Dg4l.js";var g=e(t(),1),_=n();function me({panel:e,runtimeEventStore:t,actionCatalog:n,createImproveActions:r,contextCompaction:i,steerActiveResponses:s,initialScrollState:c,codexPermissionMode:te,codexReasoningEffort:re,openPondCommandAccessMode:l,connection:u,connectedAppMentions:ie,mentionApps:me,codexPersonalSkills:v,profileSkills:y,profileTarget:b,projectTarget:x,providerSettings:S,accountBaseUrl:C,billingOrganizationSlug:w,billingTeamId:T,showToast:E,workspaceTarget:D,onCodexPermissionModeChange:O,onCodexReasoningEffortChange:k,onOpenPondCommandAccessModeChange:A,onModelChange:j,onOpenAttachmentInSidebar:M,onOpenFileInSidebar:N,onOpenProfileSettings:P,onOpenSession:F,onOpenPonder:I,onProviderChange:he,onProviderSetupOpen:L,onPromptChange:R,onProfileTargetChange:ge,onScrollStateChange:z,onProjectTargetChange:_e,onResolveApproval:ve,onShowBrowserPanel:B,onStop:ye,onSubmit:V,onWorkspaceTargetChange:H}){let U=(0,g.useRef)(null),[W]=(0,g.useState)(()=>new fe),G=(0,g.useRef)(c?.stickyToBottom??!0),K=(0,g.useRef)(!1),q=p(t,e.runtimeSource===`live`?e.sessionId:null),J=(0,g.useMemo)(()=>{if(e.runtimeSource===`history`||!e.sessionId)return e;let t=q.events,n=oe(t,[]);return{...e,messages:a(W.project(t),e.pendingUserMessage),createImproveRun:o({events:t}),contextWindowStatus:ae({provider:e.provider,snapshot:se(n,e.sessionId),preferences:i}),goalRuntime:ne(n,e.sessionId)}},[W,i,q,e]),Y=J.running&&!J.pendingApproval&&de(J.messages),be=(0,g.useMemo)(()=>J.createImproveRun?{...r,run:J.createImproveRun}:null,[J.createImproveRun,r]),X=(0,g.useMemo)(()=>m(J.messages,{showThinkingIndicator:Y}),[J.messages,Y]),xe=d(J.messages,J.sessionId??`draft:${J.id}`),Z=J.messages.at(-1),Q=ce({connection:u,latestTurnId:Z?.turnId??null,sessionId:J.sessionId,turnRunning:J.running}),$=[J.id,J.sessionId??`draft`,X.length,Z?.id??``,Z?.content?.length??0,Z?.timestamp??``,Y?`thinking`:``].join(`:`);(0,g.useLayoutEffect)(()=>{let e=U.current;e&&!K.current&&(K.current=!0,e.scrollTop=c?.stickyToBottom?e.scrollHeight:c?.scrollTop??0)},[c]),pe({contentKey:$,onContentChange:e=>{G.current&&(e.scrollTop=e.scrollHeight)},threadRef:U});let Se=(0,g.useCallback)((e,t)=>{let n=J.sessionId??`side-chat:${J.id}`;ee({conversationId:n,href:e,explicitFile:t?.explicitFile,newTab:t?.newTab}).then(e=>{e&&B()})},[J.id,J.sessionId,B]),Ce=(0,g.useCallback)(async(e,t)=>{let n=t.action===`answer`?t.text:`Dismiss this question`;if(!await V([],null,null,{displayPrompt:n,promptOverride:n,turnMetadata:{userQuestionResolution:t}}))throw Error(`The question response could not be sent.`)},[V]);return(0,_.jsxs)(`section`,{"data-thread-session":J.sessionId??void 0,className:`right-chat-pane ${J.pendingApproval?`has-approval`:``}`,id:`right-chat-panel-${J.id}`,role:`tabpanel`,"aria-labelledby":`right-chat-tab-${J.id}`,children:[(0,_.jsx)(`div`,{className:`chat-thread right-chat-thread`,ref:U,onScroll:e=>{let t=e.currentTarget;G.current=t.scrollHeight-t.scrollTop-t.clientHeight<=72,z({scrollTop:t.scrollTop,stickyToBottom:G.current})},children:X.map(t=>(0,_.jsx)(f,{row:t,renderMessage:t=>(0,_.jsx)(h,{activeWorkspaceAppId:J.activeWorkspaceAppId,accountBaseUrl:C,billingOrganizationSlug:w,billingTeamId:T,connection:u,animateInitialContent:t.message.role===`assistant`&&xe.has(t.message.id),kvCacheSummary:t.showFooter&&t.message.turnId?Q.get(t.message.turnId)??null:null,message:t.message,onOpenBrowserLink:Se,onOpenAttachmentInSidebar:M,onOpenFileInSidebar:N,onOpenProfileSettings:P,onResolveUserQuestion:Ce,onOpenSession:F,onOpenPonder:I,userAttachmentDisplay:e.provider===`codex`?`compact`:`full`,workspaceRootPath:J.workspaceRootPath,showFooter:t.showFooter},t.id)},t.id))}),(0,_.jsxs)(`div`,{className:`composer-stack dock right-chat-composer ${J.pendingApproval?`has-approval`:``}`,children:[(0,_.jsx)(ue,{approval:J.pendingApproval,onResolve:ve}),(0,_.jsx)(le,{mode:`dock`,prompt:e.prompt,mentionApps:me,connectedAppMentions:ie,profileSkills:e.provider===`codex`?v:y,profileTarget:e.provider===`codex`?null:b,selectedMentionAppId:null,contextWindowStatus:J.contextWindowStatus,goalRuntime:J.goalRuntime,createImproveRuntime:be,busy:J.running,running:J.running,steerActiveResponses:s,taskSessionId:e.runtimeSource===`live`?e.sessionId:null,goalSessionId:e.sessionId,taskEvents:q.events,submissionScopeKey:J.sessionId??J.id,showProjectFooter:!1,connection:u,providerSettings:S,provider:e.provider,model:e.model,projectTarget:x,actionCatalog:n,workspaceTarget:D,codexPermissionMode:te,codexReasoningEffort:re,openPondCommandAccessMode:e.provider===`codex`?l:J.session?.openPondCommandAccessMode??l,onProviderChange:he,onProviderSetupOpen:L,onProjectTargetChange:_e,onWorkspaceTargetChange:H,onModelChange:j,onCodexPermissionModeChange:O,onCodexReasoningEffortChange:k,onOpenPondCommandAccessModeChange:A,onPromptChange:R,onProfileTargetChange:ge,onMentionAppSelect:void 0,showToast:E,onSubmit:V,onStop:ye})]})]})}function v({panels:e,runtimeEventStore:t,actionCatalog:n=[],createImproveActions:a,contextCompaction:o,steerActiveResponses:ee,busy:ne,codexPermissionMode:ae,codexReasoningEffort:oe,openPondCommandAccessMode:se,connection:ce,connectedAppMentions:d,mentionApps:f,codexPersonalSkills:p,profileSkills:le=[],profileLibrary:m={lastUsed:null,profiles:[]},extensionCatalog:h,projectTarget:ue,providerSettings:de,accountBaseUrl:fe,billingOrganizationSlug:pe,billingTeamId:v,showToast:y,workspaceTarget:b,onAddChat:x,onActivatePanel:S,onClosePanel:C,onCodexPermissionModeChange:w,onCodexReasoningEffortChange:T,onOpenPondCommandAccessModeChange:E,onModelChange:D,onOpenAttachmentInSidebar:O,onOpenFileInSidebar:k,onOpenProfileSettings:A,onOpenSession:j,onOpenPonder:M,onProviderChange:N,onProviderSetupOpen:P,onPromptChange:F,onProfileTargetChange:I,onScrollStateChange:he,onProjectTargetChange:L,onResolveApproval:R,onResizeStart:ge,onSelectFiles:z,onShowBrowserPanel:_e,onStop:ve,onSubmit:B,onWorkspaceTargetChange:ye}){let[V,H]=(0,g.useState)(!1),[U,W]=(0,g.useState)(()=>u(e)?.id??null),G=(0,g.useRef)(null),K=(0,g.useRef)(new Map),q=(0,g.useRef)(new Set(e.map(e=>e.id))),J=(0,g.useRef)(new Map(e.map(e=>[e.id,e.activationVersion]))),Y=e.find(e=>e.id===U)??e.at(-1)??null,be=Y?.session?.currentProfile??m.lastUsed,X=ie(m,be),xe=X?l(X,h):le,Z=X?[...n.filter(e=>!r(e)),...i(X)]:n;(0,g.useEffect)(()=>{let t=q.current,n=J.current,r=null,i=null;for(let a of e)t.has(a.id)||(r=a),t.has(a.id)&&a.activationVersion>(n.get(a.id)??0)&&(i=a);q.current=new Set(e.map(e=>e.id)),J.current=new Map(e.map(e=>[e.id,e.activationVersion])),W(t=>i?i.id:r?r.id:t&&e.some(e=>e.id===t)?t:e.at(-1)?.id??null)},[e]),(0,g.useEffect)(()=>{if(!V)return;function e(e){G.current?.contains(e.target)||H(!1)}function t(e){e.key===`Escape`&&H(!1)}return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[V]);let Q=(0,g.useCallback)((e,t=!1)=>{W(e),S(e),t&&window.requestAnimationFrame(()=>K.current.get(e)?.focus())},[S]),$=(0,g.useCallback)((e=!1)=>{z(),e&&window.requestAnimationFrame(()=>{document.getElementById(`right-sidebar-files-tab`)?.focus()})},[z]),Se=(0,g.useCallback)((t,n)=>{let r=e.findIndex(e=>e.id===n);if(r<0)return;let i=r+1,a=null;if(t.key===`ArrowRight`&&(a=(i+1)%(e.length+1)),t.key===`ArrowLeft`&&(a=(i-1+e.length+1)%(e.length+1)),t.key===`Home`&&(a=0),t.key===`End`&&(a=e.length),a===null)return;if(t.preventDefault(),a===0){$(!0);return}let o=e[a-1];o&&Q(o.id,!0)},[e,$,Q]),Ce=(0,g.useCallback)(t=>{if(![`ArrowRight`,`ArrowLeft`,`Home`,`End`].includes(t.key)||(t.preventDefault(),t.key===`Home`))return;let n=t.key===`ArrowLeft`||t.key===`End`?e.at(-1):e[0];n&&Q(n.id,!0)},[e,Q]);return(0,_.jsxs)(`aside`,{className:`workspace-diff-panel right-chat-panel-stack`,"aria-label":`Side chats`,children:[(0,_.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize side chat panel`,onPointerDown:ge}),(0,_.jsx)(`div`,{className:`workspace-diff-topbar right-chat-topbar`,children:(0,_.jsxs)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Right sidebar views`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab`,role:`tab`,id:`right-sidebar-files-tab`,"aria-controls":`right-sidebar-files-panel`,"aria-selected":!1,tabIndex:-1,onClick:()=>$(!1),onKeyDown:Ce,children:[(0,_.jsx)(s,{size:14}),(0,_.jsx)(`span`,{children:`Files`})]}),e.map(e=>{let t=e.id===Y?.id;return(0,_.jsxs)(`div`,{className:`workspace-diff-tab right-chat-tab ${t?`active`:``}`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,id:`right-chat-tab-${e.id}`,"aria-controls":`right-chat-panel-${e.id}`,"aria-selected":t,tabIndex:t?0:-1,title:e.title,ref:t=>{t?K.current.set(e.id,t):K.current.delete(e.id)},onClick:()=>Q(e.id),onKeyDown:t=>Se(t,e.id),children:[e.running?(0,_.jsx)(`span`,{className:`right-chat-status-dot`,"aria-label":`Running`}):null,(0,_.jsx)(`span`,{children:e.title})]}),(0,_.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.title}`,"aria-label":`Close ${e.title}`,onClick:t=>{t.stopPropagation(),C(e.id)},children:(0,_.jsx)(te,{size:12})})]},e.id)}),(0,_.jsxs)(`div`,{className:`workspace-diff-add-anchor`,ref:G,children:[(0,_.jsx)(`button`,{type:`button`,className:`workspace-diff-add-tab ${V?`active`:``}`,title:`Add to right sidebar`,"aria-label":`Add to right sidebar`,"aria-haspopup":`menu`,"aria-expanded":V,onClick:()=>H(e=>!e),children:(0,_.jsx)(c,{size:15})}),V?(0,_.jsxs)(`div`,{className:`workspace-diff-add-menu right-chat-add-popover`,role:`menu`,children:[(0,_.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{H(!1),x()},children:[(0,_.jsx)(re,{size:13}),(0,_.jsx)(`span`,{children:`New task`})]}),(0,_.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{H(!1),z()},children:[(0,_.jsx)(s,{size:13}),(0,_.jsx)(`span`,{children:`Files`})]})]}):null]})]})}),(0,_.jsx)(`div`,{className:`right-chat-stack-body panes-1`,children:Y?(0,_.jsx)(me,{busy:ne,createImproveActions:a,contextCompaction:o,steerActiveResponses:ee,codexPermissionMode:ae,codexReasoningEffort:oe,openPondCommandAccessMode:se,connection:ce,connectedAppMentions:d,actionCatalog:Z,mentionApps:f,codexPersonalSkills:p,profileSkills:xe,profileTarget:null,panel:Y,runtimeEventStore:t,initialScrollState:{scrollTop:Y.scrollTop,stickyToBottom:Y.stickyToBottom},projectTarget:ue,providerSettings:de,accountBaseUrl:fe,billingOrganizationSlug:pe,billingTeamId:v,showToast:y,workspaceTarget:b,onCodexPermissionModeChange:w,onCodexReasoningEffortChange:T,onOpenPondCommandAccessModeChange:e=>E(e,Y.session),onModelChange:e=>D(Y.id,e),onOpenAttachmentInSidebar:O,onOpenFileInSidebar:k,onOpenProfileSettings:A,onOpenSession:j,onOpenPonder:M,onProviderChange:(e,t)=>N(Y.id,e,t),onProviderSetupOpen:P,onPromptChange:e=>F(Y.id,e),onProfileTargetChange:e=>I(Y.sessionId,e),onScrollStateChange:e=>he(Y.id,e),onProjectTargetChange:L,onResolveApproval:R,onShowBrowserPanel:_e,onStop:()=>ve(Y.sessionId),onSubmit:(e,t,n,r)=>B(Y.id,e,t,n,r),onWorkspaceTargetChange:ye},Y.id):null})]})}export{v as RightChatPanelStack};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{C as RightSidebarHomePanel}from"./MainPane-2dj6Dg4l.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{n as r,o as i}from"./client-choice-storage-DTTLbrYt.js";import{n as a,o,r as s}from"./ComposerAttachments-6en7m_ov.js";import"./icons-CK5-nxVC.js";import{F as c,H as l,I as u,L as d}from"./training-model-data-14942K_Z.js";import{t as f}from"./external-link-B4rPiZEp.js";import{t as p}from"./loader-circle-cyf35w3i.js";import{t as m}from"./maximize-2-DgF6ZVOM.js";import{t as h}from"./play-wI_3FLr4.js";import{t as g}from"./refresh-cw-B53QjxMO.js";import{t as _}from"./save-V1Q4Fcqa.js";import{t as v}from"./x-IPhrr4ju.js";import{r as y}from"./AppToastContext-DZLErwj0.js";import{Ht as b,Jt as x,Sn as S,Xn as C,gn as w,tn as T,wn as E}from"./App-DHJVXTI2.js";import{t as D}from"./useLocalAgentSchedules-CsKv22Hs.js";var O=e(t(),1),k=3e4;function A(e){let[t,n]=(0,O.useState)([]),[r,i]=(0,O.useState)([]),[a,o]=(0,O.useState)(null),[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(null),[d,f]=(0,O.useState)(()=>new Set);async function p(e,t){t&&c(!0);try{let t=await E.hostedSavedWork(e);n(t.definitions),i(t.runs),o(t.webBaseUrl??null),u(null)}catch(e){u(j(e))}finally{t&&c(!1)}}(0,O.useEffect)(()=>{if(!e){n([]),i([]),o(null),u(null),c(!1);return}let t=!1,r=async r=>{if(!t){r&&c(!0);try{let r=await E.hostedSavedWork(e);if(t)return;n(r.definitions),i(r.runs),o(r.webBaseUrl??null),u(null)}catch(e){t||u(j(e))}finally{!t&&r&&c(!1)}}};r(!0);let a=window.setInterval(()=>void r(!1),k);return()=>{t=!0,window.clearInterval(a)}},[e]);async function m(){e&&await p(e,!0)}async function h(t){e&&(await E.createHostedSavedWork(e,t),await p(e,!1))}async function g(e,t){await y(e,async n=>{await E.updateHostedSavedWork(n,e,t)})}async function _(e){await y(e,async t=>{await E.deleteHostedSavedWork(t,e)})}async function v(e){await y(e,async t=>{await E.runHostedSavedWork(t,e,crypto.randomUUID())})}async function y(t,n){if(e&&!d.has(t)){b(t,!0);try{await n(e),await p(e,!1)}catch(e){throw u(j(e)),e}finally{b(t,!1)}}}function b(e,t){f(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})}return{create:h,definitions:t,error:l,loading:s,pendingScheduleIds:d,refresh:m,remove:_,run:v,runs:r,update:g,webBaseUrl:a}}function j(e){return e instanceof Error?e.message:String(e)}var M=3e4;function ee(e){let[t,n]=(0,O.useState)([]),[r,i]=(0,O.useState)([]),[a,o]=(0,O.useState)(!1),[s,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(()=>new Set),d=(0,O.useCallback)(async t=>{if(e){t&&o(!0);try{let t=await E.chatWorkflows(e);n(t.workflows),i(t.runs),c(null)}catch(e){c(e instanceof Error?e.message:String(e))}finally{t&&o(!1)}}},[e]);(0,O.useEffect)(()=>{if(!e){n([]),i([]),c(null),o(!1);return}d(!0);let t=window.setInterval(()=>void d(!1),M);return()=>window.clearInterval(t)},[e,d]);async function f(e,t){if(!l.has(e)){u(t=>new Set(t).add(e));try{await t(),await d(!1)}catch(e){throw c(e instanceof Error?e.message:String(e)),e}finally{u(t=>{let n=new Set(t);return n.delete(e),n})}}}return{workflows:t,runs:r,loading:a,error:s,pendingIds:l,refresh:()=>d(!0),update:(t,n)=>f(t,()=>E.updateChatWorkflow(e,t,n)),remove:t=>f(t,()=>E.deleteChatWorkflow(e,t)),run:t=>f(t,()=>E.runChatWorkflow(e,t))}}var N=`openpond.scheduled-work.view.v1`;function P(e=I()){try{return e?.getItem(N)===`list`?`list`:`calendar`}catch{return`calendar`}}function F(e,t=I()){try{t?.setItem(N,e)}catch{}}function I(){if(typeof window>`u`)return null;try{return r}catch{return null}}function L(e,t){if(!e)return`None`;let n=new Date(e);if(!Number.isFinite(n.getTime()))return`None`;try{return n.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,...t?{timeZone:t,timeZoneName:`short`}:{}})}catch{return n.toLocaleString()}}function R(e){return z(e.replaceAll(`_`,` `))}function z(e){return e.replace(/^./,e=>e.toUpperCase())}function B(e){let[t=`0`,n=`00`]=e.split(`:`);return new Date(2020,0,1,Number(t),Number(n)).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}var V=n();function H({run:e}){let t=e.error||e.stderr||e.stdout;return(0,V.jsxs)(`details`,{className:`scheduled-run-row`,children:[(0,V.jsxs)(`summary`,{children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`strong`,{children:R(e.status)}),(0,V.jsx)(`small`,{children:L(e.createdAt,null)})]}),(0,V.jsx)(`span`,{className:`scheduled-run-trigger`,children:e.trigger===`manual`?`Manual`:`Scheduled`})]}),t?(0,V.jsx)(`pre`,{children:t}):null]})}function U({onOpen:e,run:t}){return(0,V.jsxs)(`button`,{className:`scheduled-run-row hosted`,onClick:e,type:`button`,children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`strong`,{children:R(t.status)}),(0,V.jsx)(`small`,{children:L(t.createdAt,null)})]}),(0,V.jsxs)(`span`,{className:`scheduled-run-trigger`,children:[z(t.triggerKind),` `,(0,V.jsx)(f,{size:11})]}),t.deliveryError?(0,V.jsx)(`p`,{children:t.deliveryError}):null]})}function W({children:e,detailExpanded:t,kind:n=`schedule`,label:r,onClose:i,onDetailResizeStart:a,onToggleDetailExpanded:o}){return(0,V.jsxs)(`aside`,{"aria-label":r,className:`workspace-diff-panel scheduled-detail${t?` expanded`:``}`,children:[t?null:(0,V.jsx)(`div`,{"aria-label":`Resize schedule details`,"aria-orientation":`vertical`,className:`workspace-diff-resize-handle`,onPointerDown:a,role:`separator`}),(0,V.jsxs)(`div`,{className:`workspace-diff-topbar`,children:[(0,V.jsx)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`${n===`workflow`?`Workflow`:`Schedule`} details`,children:(0,V.jsxs)(`button`,{"aria-selected":`true`,className:`workspace-diff-tab active`,role:`tab`,type:`button`,children:[(0,V.jsx)(w,{size:14}),(0,V.jsx)(`span`,{children:n===`workflow`?`Workflow`:`Schedule`})]})}),(0,V.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,V.jsx)(`button`,{"aria-label":t?`Dock ${n} details`:`Expand ${n} details`,className:`diff-icon-button`,onClick:o,title:t?`Dock ${n} details`:`Expand ${n} details`,type:`button`,children:t?(0,V.jsx)(d,{size:14}):(0,V.jsx)(m,{size:14})}),(0,V.jsx)(`button`,{"aria-label":`Close ${n} details`,className:`diff-icon-button`,onClick:i,title:`Close ${n} details`,type:`button`,children:(0,V.jsx)(v,{size:14})})]})]}),(0,V.jsx)(`div`,{className:`scheduled-detail-body`,children:e})]})}function G({children:e,title:t}){return(0,V.jsxs)(`section`,{className:`scheduled-detail-section`,children:[(0,V.jsx)(`div`,{className:`scheduled-detail-section-heading`,children:(0,V.jsx)(`h3`,{children:t})}),e]})}function K({label:e,value:t}){return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{children:e}),(0,V.jsx)(`dd`,{children:t})]})}function te({children:e}){return(0,V.jsx)(`p`,{className:`scheduled-empty`,children:e})}function ne({label:e}){return(0,V.jsxs)(`div`,{className:`scheduled-loading`,role:`status`,children:[(0,V.jsx)(p,{className:`scheduled-spin`,size:16}),(0,V.jsx)(`span`,{children:e})]})}var q=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];function re({items:e,onSelect:t,selectedKey:n}){let[r,i]=(0,O.useState)(()=>se(new Date)),a=(0,O.useMemo)(()=>J(r),[r]),o=(0,O.useMemo)(()=>ie(e),[e]),s=new Intl.DateTimeFormat(void 0,{month:`long`,year:`numeric`}).format(r),c=e.filter(e=>!ae(e.nextRunAt));return(0,V.jsxs)(`div`,{className:`scheduled-calendar`,children:[(0,V.jsxs)(`div`,{className:`scheduled-calendar-toolbar`,children:[(0,V.jsx)(`strong`,{children:s}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`button`,{"aria-label":`Previous month`,className:`scheduled-icon-button`,onClick:()=>i(ce(r,-1)),type:`button`,children:(0,V.jsx)(S,{size:15})}),(0,V.jsx)(`button`,{className:`scheduled-calendar-today`,onClick:()=>i(se(new Date)),type:`button`,children:`Today`}),(0,V.jsx)(`button`,{"aria-label":`Next month`,className:`scheduled-icon-button`,onClick:()=>i(ce(r,1)),type:`button`,children:(0,V.jsx)(l,{size:15})})]})]}),(0,V.jsxs)(`div`,{className:`scheduled-calendar-grid`,role:`grid`,"aria-label":s,children:[q.map(e=>(0,V.jsx)(`div`,{className:`scheduled-calendar-weekday`,role:`columnheader`,children:e},e)),a.map(e=>{let i=oe(e),a=o.get(i)??[],s=e.getMonth()!==r.getMonth(),c=i===oe(new Date);return(0,V.jsxs)(`div`,{className:`scheduled-calendar-day${s?` outside`:``}${c?` today`:``}`,role:`gridcell`,children:[(0,V.jsx)(`span`,{className:`scheduled-calendar-day-number`,children:e.getDate()}),(0,V.jsx)(`div`,{className:`scheduled-calendar-events`,children:a.map(e=>(0,V.jsxs)(`button`,{"aria-current":n===e.key?`true`:void 0,className:`scheduled-calendar-event${e.enabled?``:` paused`}`,onClick:()=>t(e.key),title:e.title,type:`button`,children:[(0,V.jsx)(`span`,{children:le(e.nextRunAt)}),(0,V.jsx)(`strong`,{children:e.title})]},e.key))})]},i)})]}),c.length?(0,V.jsxs)(`div`,{className:`scheduled-calendar-unscheduled`,children:[(0,V.jsx)(`span`,{children:`No upcoming run`}),(0,V.jsx)(`div`,{children:c.map(e=>(0,V.jsx)(`button`,{onClick:()=>t(e.key),type:`button`,children:e.title},e.key))})]}):null]})}function J(e){let t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(t);return n.setDate(t.getDate()-t.getDay()),Array.from({length:42},(e,t)=>{let r=new Date(n);return r.setDate(n.getDate()+t),r})}function ie(e){let t=new Map;for(let n of e){let e=ae(n.nextRunAt);if(!e)continue;let r=oe(e);t.set(r,[...t.get(r)??[],n])}for(let e of t.values())e.sort((e,t)=>e.nextRunAt.localeCompare(t.nextRunAt));return t}function ae(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function oe(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function se(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ce(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function le(e){return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(e))}function ue({entry:e,onSelect:t,selected:n}){return(0,V.jsxs)(`button`,{"aria-current":n?`true`:void 0,className:`scheduled-list-row`,onClick:t,type:`button`,children:[(0,V.jsx)(`span`,{className:`scheduled-status-dot`}),(0,V.jsxs)(`span`,{className:`scheduled-list-copy`,children:[(0,V.jsx)(`span`,{className:`scheduled-list-title`,children:(0,V.jsx)(`strong`,{children:e.workflow.label})}),(0,V.jsx)(`span`,{children:e.workflow.description}),(0,V.jsxs)(`small`,{children:[`On demand · Source `,e.binding.sourceRevision.slice(0,10)]})]})]})}function de({cadence:e,onSelect:t,schedule:n,selected:r}){return(0,V.jsxs)(`button`,{"aria-current":r?`true`:void 0,className:`scheduled-list-row`,onClick:t,type:`button`,children:[(0,V.jsx)(`span`,{className:`scheduled-status-dot ${n.enabled?`active`:`paused`}`}),(0,V.jsxs)(`span`,{className:`scheduled-list-copy`,children:[(0,V.jsx)(`span`,{className:`scheduled-list-title`,children:(0,V.jsx)(`strong`,{children:n.scheduleName})}),(0,V.jsx)(`span`,{children:n.localProjectName}),(0,V.jsxs)(`small`,{children:[e,n.nextRunAt?` · Next ${L(n.nextRunAt,n.timezone)}`:` · No next run`]})]})]})}function fe({cadence:e,definition:t,onSelect:n,schedule:r,selected:i}){return(0,V.jsxs)(`button`,{"aria-current":i?`true`:void 0,className:`scheduled-list-row`,onClick:n,type:`button`,children:[(0,V.jsx)(`span`,{className:`scheduled-status-dot ${r.enabled?`active`:`paused`}`}),(0,V.jsxs)(`span`,{className:`scheduled-list-copy`,children:[(0,V.jsxs)(`span`,{className:`scheduled-list-title`,children:[(0,V.jsx)(`strong`,{children:t.name}),(0,V.jsx)(`small`,{className:`scheduled-environment-badge hosted`,children:`Hosted`})]}),(0,V.jsx)(`span`,{children:t.prompt}),(0,V.jsxs)(`small`,{children:[e,r.nextRunAt?` · Next ${L(r.nextRunAt,r.timeZone)}`:` · No next run`]})]})]})}function pe({cadence:e,onSelect:t,selected:n,workflow:r}){return(0,V.jsxs)(`button`,{"aria-current":n?`true`:void 0,className:`scheduled-list-row`,onClick:t,type:`button`,children:[(0,V.jsx)(`span`,{className:`scheduled-status-dot ${r.enabled?`active`:`paused`}`}),(0,V.jsxs)(`span`,{className:`scheduled-list-copy`,children:[(0,V.jsxs)(`span`,{className:`scheduled-list-title`,children:[(0,V.jsx)(`strong`,{children:r.name}),(0,V.jsx)(`small`,{className:`scheduled-environment-badge`,children:`Chat`})]}),(0,V.jsx)(`span`,{children:r.prompt}),(0,V.jsxs)(`small`,{children:[`Runs in `,r.sessionTitle,` · `,e,r.nextRunAt?` · Next ${L(r.nextRunAt,r.recurrence.timeZone)}`:` · No next run`]})]})]})}function me(e,t){return e.filter(e=>t===`active`?e.enabled:t!==`paused`||!e.enabled).sort((e,t)=>(e.nextRunAt?new Date(e.nextRunAt).getTime():1/0)-(t.nextRunAt?new Date(t.nextRunAt).getTime():1/0)||e.name.localeCompare(t.name))}function he(e){let t=B(e.localTime);return e.kind===`once`?`Once on ${e.startDate} at ${t} · ${e.timeZone}`:e.kind===`weekdays`?`Weekdays at ${t} · ${e.timeZone}`:e.kind===`weekly`?`${e.weekdays?.map(z).join(`, `)??`Weekly`} at ${t} · ${e.timeZone}`:e.kind===`monthly`?`Monthly on day ${e.dayOfMonth??1} at ${t} · ${e.timeZone}`:`Daily at ${t} · ${e.timeZone}`}function ge({detailExpanded:e,onClose:t,onDelete:n,onDetailResizeStart:r,onRun:i,onToggle:a,onToggleDetailExpanded:o,pending:s,runs:l,workflow:d}){return(0,V.jsxs)(W,{detailExpanded:e,label:`${d.name} details`,onClose:t,onDetailResizeStart:r,onToggleDetailExpanded:o,children:[(0,V.jsx)(`div`,{className:`scheduled-detail-header`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`scheduled-detail-title-row`,children:[(0,V.jsx)(`h2`,{children:`Workflow details`}),(0,V.jsx)(`span`,{children:d.enabled?`Active`:`Paused`})]}),(0,V.jsx)(`p`,{children:d.name})]})}),(0,V.jsx)(G,{title:`Prompt`,children:(0,V.jsx)(`pre`,{className:`scheduled-prompt`,children:d.prompt})}),(0,V.jsx)(G,{title:`Profile source`,children:d.profileRef&&d.profileWorkflowId?(0,V.jsxs)(`p`,{children:[d.profileRef.profileId,` · workflows/`,d.profileWorkflowId,`/PROMPT.md`]}):(0,V.jsx)(`p`,{className:`scheduled-detail-error`,children:d.profileMigrationError??`Profile package is unresolved.`})}),(0,V.jsxs)(G,{title:`Delivery`,children:[(0,V.jsxs)(`dl`,{className:`scheduled-detail-fields`,children:[(0,V.jsx)(K,{label:`Runs in`,value:d.sessionTitle}),(0,V.jsx)(K,{label:`Cadence`,value:he(d.recurrence)}),(0,V.jsx)(K,{label:`Next run`,value:L(d.nextRunAt,d.recurrence.timeZone)}),(0,V.jsx)(K,{label:`Last run`,value:L(d.lastRunAt,d.recurrence.timeZone)})]}),d.lastError?(0,V.jsx)(`p`,{className:`scheduled-detail-error`,children:d.lastError}):null]}),(0,V.jsxs)(`div`,{className:`scheduled-detail-actions`,children:[(0,V.jsxs)(`button`,{disabled:s,onClick:()=>void i(),type:`button`,children:[(0,V.jsx)(x,{size:15}),(0,V.jsx)(`span`,{children:`Run now`})]}),(0,V.jsxs)(`button`,{disabled:s,onClick:()=>void a(),type:`button`,children:[d.enabled?(0,V.jsx)(u,{size:15}):(0,V.jsx)(h,{size:15}),(0,V.jsx)(`span`,{children:d.enabled?`Pause`:`Resume`})]}),(0,V.jsxs)(`button`,{disabled:s,onClick:()=>void n(),type:`button`,children:[(0,V.jsx)(c,{size:15}),(0,V.jsx)(`span`,{children:`Delete`})]})]}),(0,V.jsx)(G,{title:`Runs`,children:l.length===0?(0,V.jsx)(`p`,{className:`scheduled-no-runs`,children:`No runs yet.`}):(0,V.jsx)(`div`,{className:`scheduled-run-list`,children:l.map(e=>(0,V.jsxs)(`div`,{className:`scheduled-run-row`,children:[(0,V.jsx)(`span`,{children:z(e.status)}),(0,V.jsx)(`small`,{children:L(e.createdAt,d.recurrence.timeZone)}),e.error?(0,V.jsx)(`p`,{children:e.error}):null]},e.id))})})]})}async function _e(e){let t=e.catalog.workflows.find(t=>t.workflow.id===e.workflowId);if(!t)throw Error(`Selected Profile workflow is unavailable.`);let n=e.client??E,r=await n.createSession(e.connection,{experience:`work`,provider:`openpond`,...e.workspaceTarget===`local`?{metadata:{workspaceTarget:`local`}}:{},currentProfile:e.catalog.profileRef,profileWorkflowBinding:t.binding,title:t.workflow.label});return e.onSessionCreated?.(r.id),await n.sendTurn(e.connection,r.id,{prompt:e.prompt?.trim()||t.workflow.label,workflowInput:e.value,...e.attachments?.length?{attachments:e.attachments}:{},approvalPolicy:`on-request`,sandbox:`workspace-write`,codexPermissionMode:`default`}),r.id}function ve({catalog:e,connection:t,detailExpanded:n,entry:r,onClose:i,onDetailResizeStart:c,onOpenSession:l,onToggleDetailExpanded:u}){let[d,f]=(0,O.useState)(``),[p,m]=(0,O.useState)([]),[h,g]=(0,O.useState)(`{}`),[_,v]=(0,O.useState)(e.profileRef.source===`local`?`local`:`hosted`),[y,S]=(0,O.useState)(!1),[w,T]=(0,O.useState)(null),E=r.workflow;async function D(n){if(n.preventDefault(),!y){S(!0),T(null);try{let n=JSON.parse(h);if(p.length>C.maxAttachments)throw Error(`Choose at most ${C.maxAttachments} files.`);let r=await Promise.all(p.map(async e=>{if(e.size>C.maxAttachmentBytes)throw Error(`${e.name} exceeds the attachment size limit.`);return o({id:s(),file:e,name:e.name,mediaType:e.type||`application/octet-stream`,sizeBytes:e.size,kind:a(e)})}));await _e({connection:t,catalog:e,workflowId:E.id,value:n,prompt:d,attachments:r,workspaceTarget:_,onSessionCreated:l})}catch(e){T(e instanceof Error?e.message:String(e))}finally{S(!1)}}}return(0,V.jsxs)(W,{detailExpanded:n,kind:`workflow`,label:`${E.label} details`,onClose:i,onDetailResizeStart:c,onToggleDetailExpanded:u,children:[(0,V.jsx)(`div`,{className:`scheduled-detail-header`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`scheduled-detail-title-row`,children:(0,V.jsx)(`h2`,{children:`Workflow details`})}),(0,V.jsx)(`p`,{children:E.label})]})}),(0,V.jsx)(G,{title:`Description`,children:(0,V.jsx)(`p`,{children:E.description})}),(0,V.jsxs)(G,{title:`Source`,children:[(0,V.jsxs)(`p`,{children:[`workflows/`,E.id,`/`,E.invocation.kind===`instructions`?`PROMPT.md`:`ACTION.json`]}),(0,V.jsxs)(`p`,{children:[`Revision `,r.binding.sourceRevision.slice(0,12),` · Release `,r.binding.harnessRelease.contentHash.slice(0,12)]})]}),E.skillPaths.length>0?(0,V.jsx)(G,{title:`Skills`,children:(0,V.jsx)(`p`,{children:E.skillPaths.join(`, `)})}):null,E.invocation.kind===`instructions`?(0,V.jsx)(G,{title:`Instructions`,children:(0,V.jsx)(`pre`,{className:`scheduled-prompt`,children:E.invocation.instructions})}):null,(0,V.jsx)(G,{title:`Start a run`,children:(0,V.jsxs)(`form`,{className:`scheduled-profile-workflow-form`,onSubmit:e=>void D(e),children:[(0,V.jsx)(`label`,{htmlFor:`scheduled-profile-workflow-prompt`,children:`Instructions for this run`}),(0,V.jsx)(`textarea`,{id:`scheduled-profile-workflow-prompt`,onChange:e=>f(e.target.value),value:d}),(0,V.jsx)(`label`,{htmlFor:`scheduled-profile-workflow-files`,children:`Files for this run`}),(0,V.jsx)(`input`,{id:`scheduled-profile-workflow-files`,type:`file`,multiple:!0,onChange:e=>m(Array.from(e.target.files??[]))}),p.length>0?(0,V.jsx)(`small`,{children:p.map(e=>e.name).join(`, `)}):null,(0,V.jsx)(`label`,{htmlFor:`scheduled-profile-workflow-target`,children:`Run in`}),(0,V.jsxs)(`select`,{id:`scheduled-profile-workflow-target`,value:_,onChange:e=>v(e.target.value),children:[(0,V.jsx)(`option`,{value:`local`,children:`Desktop local workspace`}),(0,V.jsx)(`option`,{value:`hosted`,children:`Hosted Work`})]}),E.invocation.kind===`agent_action`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`label`,{htmlFor:`scheduled-profile-workflow-input`,children:`Input JSON`}),(0,V.jsx)(`textarea`,{id:`scheduled-profile-workflow-input`,onChange:e=>g(e.target.value),value:h})]}):null,w?(0,V.jsx)(b,{error:w}):null,(0,V.jsx)(`div`,{className:`scheduled-detail-actions`,children:(0,V.jsxs)(`button`,{disabled:y,type:`submit`,children:[(0,V.jsx)(x,{size:15}),(0,V.jsx)(`span`,{children:y?`Starting…`:`Run now`})]})})]})})]})}function ye(e){return e.flatMap(e=>e.schedules.map(t=>({definition:e,schedule:t})))}function be(e,t){return e.filter(e=>t===`active`?e.schedule.enabled:t!==`paused`||!e.schedule.enabled).sort((e,t)=>$(e.schedule.nextRunAt)-$(t.schedule.nextRunAt)||e.definition.name.localeCompare(t.definition.name))}function xe(e,t){return e.filter(e=>t===`active`?e.enabled:t!==`paused`||!e.enabled).sort((e,t)=>$(e.nextRunAt)-$(t.nextRunAt)||e.scheduleName.localeCompare(t.scheduleName))}function Se(e,t,n){return[...e.map(e=>({kind:`chat`,workflow:e})),...t.map(e=>({kind:`local`,schedule:e})),...n.map(e=>({kind:`hosted`,row:e}))].sort((e,t)=>{let n=$(Te(e)),r=$(Te(t));if(n!==r)return n-r;let i=Ee(e),a=Ee(t);return i.localeCompare(a)})}function Ce(e){return e.kind===`chat`?{enabled:e.workflow.enabled,key:X(e.workflow.id),nextRunAt:e.workflow.nextRunAt,title:e.workflow.name}:e.kind===`local`?{enabled:e.schedule.enabled,key:Y(e.schedule.id),nextRunAt:e.schedule.nextRunAt,title:e.schedule.scheduleName}:{enabled:e.row.schedule.enabled,key:Q(e.row.schedule.id),nextRunAt:e.row.schedule.nextRunAt,title:e.row.definition.name}}function we(e){let t=e.recurrence;return t?he(t):e.expression??`Manual`}function Te(e){return e.kind===`chat`?e.workflow.nextRunAt:e.kind===`local`?e.schedule.nextRunAt:e.row.schedule.nextRunAt}function Ee(e){return e.kind===`chat`?e.workflow.name:e.kind===`local`?e.schedule.scheduleName:e.row.definition.name}function De(e){let t=e.timezone?` · ${e.timezone}`:``;if(e.scheduleType===`rate`)return`Every ${e.scheduleExpression}${t}`;let n=e.scheduleExpression.trim().split(/\s+/);if(n.length===5&&/^\d+$/.test(n[0])&&/^\d+$/.test(n[1])){let e=B(`${n[1].padStart(2,`0`)}:${n[0].padStart(2,`0`)}`);if(n[2]===`*`&&n[3]===`*`&&n[4]===`*`)return`Daily at ${e}${t}`;if(n[2]===`*`&&n[3]===`*`&&n[4]===`MON-FRI`)return`Weekdays at ${e}${t}`}return`Cron ${e.scheduleExpression}${t}`}function Y(e){return`local:${e}`}function X(e){return`chat:${e}`}function Z(e){return`profile:${e}`}function Q(e){return`hosted:${e}`}function $(e){if(!e)return 2**53-1;let t=new Date(e).getTime();return Number.isFinite(t)?t:2**53-1}var Oe=[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`];function ke({connection:e,selectedProfileKey:t,onOpenSession:n,detailOpen:r,detailExpanded:a,onDetailOpenChange:o,onDetailResizeStart:s,onToggleDetailExpanded:c}){let l=A(e),u=ee(e),d=D(e),[f,p]=(0,O.useState)(null),[m,h]=(0,O.useState)(!1),[_,v]=(0,O.useState)(null),[b,x]=(0,O.useState)(`all`),[S,C]=(0,O.useState)(P);i(()=>C(P()));let[w,k]=(0,O.useState)(!1),[j,M]=(0,O.useState)(null),N=(0,O.useMemo)(()=>ye(l.definitions),[l.definitions]),I=(0,O.useMemo)(()=>be(N,b),[b,N]),L=(0,O.useMemo)(()=>xe(d.schedules,b),[b,d.schedules]),R=(0,O.useMemo)(()=>me(u.workflows,b),[u.workflows,b]),z=N.find(e=>Q(e.schedule.id)===j)??null,B=d.schedules.find(e=>Y(e.id)===j)??null,H=u.workflows.find(e=>X(e.id)===j)??null,U=f?.workflows.find(e=>Z(e.workflow.id)===j)??null,W=z?l.runs.filter(e=>e.scheduleId===z.schedule.id):[],G=(0,O.useMemo)(()=>Se(R,L,I),[R,L,I]),K=(0,O.useMemo)(()=>[...G.map(Ce),...f?.workflows.map(e=>({enabled:!0,key:Z(e.workflow.id),nextRunAt:null,title:e.workflow.label}))??[]],[G,f]);y(l.error,{prefix:`Workflows`}),y(d.error,{prefix:`Local schedules`}),y(u.error,{prefix:`Chat workflows`}),y(_,{prefix:`Profile workflows`}),(0,O.useEffect)(()=>{if(!e||!t){p(null),v(null);return}let n=!0;return h(!0),E.profileWorkflows(e).then(e=>{n&&(p(e),v(null))}).catch(e=>{n&&v(e instanceof Error?e.message:String(e))}).finally(()=>{n&&h(!1)}),()=>{n=!1}},[e,t]),(0,O.useEffect)(()=>{j&&!z&&!B&&!H&&!U&&!m&&M(null)},[m,H,z,B,U,j]),(0,O.useEffect)(()=>{!r&&j&&M(null)},[r,j]),(0,O.useEffect)(()=>()=>o(!1),[o]);function q(e){M(e),o(!0)}function J(){M(null),o(!1)}function ie(e){C(e),F(e)}async function ae(){k(!0);try{await Promise.all([l.refresh(),d.refresh(),u.refresh(),e&&t?E.profileWorkflows(e).then(p):Promise.resolve()])}finally{k(!1)}}return(0,V.jsxs)(`section`,{"aria-label":`Workflows`,className:`scheduled-work-view${z||B||H||U?` detail-open`:``}${a?` detail-expanded`:``}`,children:[(0,V.jsx)(`div`,{className:`scheduled-work-scroll`,children:(0,V.jsxs)(`div`,{className:`scheduled-work-content`,children:[(0,V.jsxs)(`header`,{className:`scheduled-work-header`,children:[(0,V.jsxs)(`div`,{"aria-label":`Workflow view`,className:`scheduled-view-tabs`,role:`tablist`,children:[(0,V.jsx)(`button`,{"aria-selected":S===`calendar`,className:S===`calendar`?`active`:void 0,onClick:()=>ie(`calendar`),role:`tab`,type:`button`,children:`Calendar`}),(0,V.jsx)(`button`,{"aria-selected":S===`list`,className:S===`list`?`active`:void 0,onClick:()=>ie(`list`),role:`tab`,type:`button`,children:`List`})]}),(0,V.jsxs)(`div`,{className:`scheduled-work-header-actions`,children:[(0,V.jsx)(`button`,{"aria-label":`Refresh schedules`,className:`scheduled-icon-button`,disabled:!e||l.loading||d.loading||u.loading||m,onClick:()=>void ae(),title:`Refresh schedules`,type:`button`,children:(0,V.jsx)(g,{className:w?`scheduled-spin`:void 0,size:16})}),(0,V.jsxs)(`label`,{className:`scheduled-filter`,children:[(0,V.jsx)(T,{"aria-hidden":`true`,size:16}),(0,V.jsxs)(`select`,{"aria-label":`Schedule filter`,onChange:e=>x(e.target.value),value:b,children:[(0,V.jsx)(`option`,{value:`active`,children:`Active`}),(0,V.jsx)(`option`,{value:`paused`,children:`Paused`}),(0,V.jsx)(`option`,{value:`all`,children:`All`})]})]})]})]}),(0,V.jsx)(`section`,{"aria-busy":l.loading||d.loading||u.loading||m,className:`scheduled-list`,children:e?(l.loading||d.loading||u.loading||m)&&N.length===0&&d.schedules.length===0&&u.workflows.length===0&&!f?.workflows.length?(0,V.jsx)(ne,{label:`Loading schedules`}):l.error&&d.error&&N.length===0&&d.schedules.length===0?(0,V.jsx)(te,{children:`Schedules are unavailable. Refresh to try again.`}):G.length===0&&!f?.workflows.length?(0,V.jsx)(te,{children:`Create a scheduled task here or ask for one in Work.`}):S===`calendar`?(0,V.jsx)(re,{items:K,onSelect:q,selectedKey:j}):(0,V.jsxs)(`div`,{className:`scheduled-list-rows`,children:[f?.workflows.map(e=>(0,V.jsx)(ue,{entry:e,onSelect:()=>q(Z(e.workflow.id)),selected:j===Z(e.workflow.id)},Z(e.workflow.id))),G.map(e=>e.kind===`chat`?(0,V.jsx)(pe,{cadence:he(e.workflow.recurrence),onSelect:()=>q(X(e.workflow.id)),selected:j===X(e.workflow.id),workflow:e.workflow},X(e.workflow.id)):e.kind===`local`?(0,V.jsx)(de,{cadence:De(e.schedule),onSelect:()=>q(Y(e.schedule.id)),schedule:e.schedule,selected:j===Y(e.schedule.id)},Y(e.schedule.id)):(0,V.jsx)(fe,{cadence:we(e.row.schedule),definition:e.row.definition,onSelect:()=>q(Q(e.row.schedule.id)),schedule:e.row.schedule,selected:j===Q(e.row.schedule.id)},Q(e.row.schedule.id)))]}):(0,V.jsx)(te,{children:`Connect to OpenPond to view scheduled Work.`})})]})}),U&&f&&e?(0,V.jsx)(ve,{catalog:f,connection:e,detailExpanded:a,entry:U,onClose:J,onDetailResizeStart:s,onOpenSession:n,onToggleDetailExpanded:c},U.workflow.id):z?(0,V.jsx)(je,{onClose:J,onDelete:async()=>{await l.remove(z.schedule.id),J()},onRun:()=>l.run(z.schedule.id),onSave:e=>l.update(z.schedule.id,e),onToggle:()=>l.update(z.schedule.id,{enabled:!z.schedule.enabled}),pending:l.pendingScheduleIds.has(z.schedule.id),row:z,runs:W,detailExpanded:a,onDetailResizeStart:s,onToggleDetailExpanded:c,webBaseUrl:l.webBaseUrl},`${z.schedule.id}:${z.definition.version}:${z.schedule.configurationVersion}`):H?(0,V.jsx)(ge,{detailExpanded:a,onClose:J,onDelete:async()=>{await u.remove(H.id),J()},onDetailResizeStart:s,onRun:()=>u.run(H.id),onToggle:()=>u.update(H.id,{enabled:!H.enabled}),onToggleDetailExpanded:c,pending:u.pendingIds.has(H.id),runs:u.runs.filter(e=>e.workflowId===H.id),workflow:H},H.id):B?(0,V.jsx)(Ae,{connection:e,onClose:J,onRun:()=>d.run(B),onToggle:()=>d.toggle(B),pending:d.pendingScheduleIds.has(B.id),schedule:B,detailExpanded:a,onDetailResizeStart:s,onToggleDetailExpanded:c},B.id):null]})}function Ae({connection:e,detailExpanded:t,onClose:n,onDetailResizeStart:r,onRun:i,onToggleDetailExpanded:a,onToggle:o,pending:s,schedule:c}){let l=Pe(e,c.id);return y(l.error,{prefix:`Local schedule runs`}),(0,V.jsxs)(W,{detailExpanded:t,label:`${c.scheduleName} details`,onClose:n,onDetailResizeStart:r,onToggleDetailExpanded:a,children:[(0,V.jsx)(`div`,{className:`scheduled-detail-header`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`scheduled-detail-title-row`,children:[(0,V.jsx)(`h2`,{children:`Schedule details`}),(0,V.jsx)(`span`,{children:c.enabled?`Active`:`Paused`})]}),(0,V.jsx)(`p`,{children:c.scheduleName})]})}),(0,V.jsxs)(G,{title:`Task`,children:[(0,V.jsxs)(`dl`,{className:`scheduled-detail-fields`,children:[(0,V.jsx)(K,{label:`Environment`,value:`Local`}),(0,V.jsx)(K,{label:`Project`,value:c.localProjectName}),(0,V.jsx)(K,{label:`Agent`,value:c.agentName}),(0,V.jsx)(K,{label:`Action`,value:c.targetAction})]}),(0,V.jsx)(`pre`,{className:`scheduled-prompt`,children:Ne(c)})]}),(0,V.jsxs)(G,{title:`Schedule`,children:[(0,V.jsxs)(`dl`,{className:`scheduled-detail-fields`,children:[(0,V.jsx)(K,{label:`Cadence`,value:De(c)}),(0,V.jsx)(K,{label:`Expression`,value:c.scheduleExpression}),(0,V.jsx)(K,{label:`Timezone`,value:c.timezone??`Local time`}),(0,V.jsx)(K,{label:`Next run`,value:L(c.nextRunAt,c.timezone)}),(0,V.jsx)(K,{label:`Last run`,value:L(c.lastRunAt,c.timezone)})]}),c.lastError?(0,V.jsx)(`p`,{className:`scheduled-detail-error`,children:c.lastError}):null]}),(0,V.jsxs)(`div`,{className:`scheduled-detail-actions`,children:[(0,V.jsxs)(`button`,{disabled:s,onClick:()=>void i(),type:`button`,children:[(0,V.jsx)(x,{size:15}),(0,V.jsx)(`span`,{children:`Run now`})]}),(0,V.jsxs)(`button`,{disabled:s,onClick:()=>void o(),type:`button`,children:[c.enabled?(0,V.jsx)(u,{size:15}):(0,V.jsx)(h,{size:15}),(0,V.jsx)(`span`,{children:c.enabled?`Pause`:`Resume`})]})]}),(0,V.jsx)(G,{title:`Runs`,children:l.loading&&l.runs.length===0?(0,V.jsx)(ne,{label:`Loading runs`}):l.runs.length===0?(0,V.jsx)(`p`,{className:`scheduled-no-runs`,children:`No runs yet.`}):(0,V.jsx)(`div`,{className:`scheduled-run-list`,children:l.runs.map(e=>(0,V.jsx)(H,{run:e},e.id))})})]})}function je({detailExpanded:e,onClose:t,onDelete:n,onDetailResizeStart:r,onRun:i,onSave:a,onToggleDetailExpanded:o,onToggle:s,pending:l,row:d,runs:p,webBaseUrl:m}){let g=Me(d.schedule),[v,y]=(0,O.useState)(d.definition.name),[b,S]=(0,O.useState)(d.definition.prompt),[C,w]=(0,O.useState)(g.kind),[T,E]=(0,O.useState)(g.timeZone),[D,k]=(0,O.useState)(g.startDate),[A,j]=(0,O.useState)(g.localTime),[M,ee]=(0,O.useState)(g.weekdays?.[0]??`monday`),[N,P]=(0,O.useState)(g.dayOfMonth??1),F=p[0]?.conversationId??null,I=m?Fe(m,F):null,R=v!==d.definition.name||b!==d.definition.prompt||C!==g.kind||T!==g.timeZone||D!==g.startDate||A!==g.localTime||M!==(g.weekdays?.[0]??`monday`)||N!==(g.dayOfMonth??1);async function B(e){e.preventDefault(),await a({name:v,prompt:b,recurrence:{version:1,kind:C,timeZone:T,startDate:D,localTime:A,end:{kind:`never`},...C===`weekly`?{weekdays:[M]}:{},...C===`monthly`?{dayOfMonth:N}:{}}})}return(0,V.jsx)(W,{detailExpanded:e,label:`${d.definition.name} details`,onClose:t,onDetailResizeStart:r,onToggleDetailExpanded:o,children:(0,V.jsxs)(`form`,{onSubmit:B,children:[(0,V.jsxs)(`div`,{className:`scheduled-detail-header`,children:[(0,V.jsx)(`div`,{children:(0,V.jsxs)(`div`,{className:`scheduled-detail-title-row`,children:[(0,V.jsx)(`h2`,{children:`Schedule details`}),(0,V.jsx)(`span`,{children:d.schedule.enabled?`Active`:`Paused`})]})}),(0,V.jsx)(`div`,{className:`scheduled-detail-header-controls`,children:(0,V.jsx)(`button`,{"aria-label":`Delete schedule`,className:`scheduled-icon-button`,disabled:l,onClick:()=>void n(),title:`Delete schedule`,type:`button`,children:(0,V.jsx)(c,{size:16})})})]}),(0,V.jsxs)(G,{title:`Task`,children:[(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`input`,{maxLength:180,onChange:e=>y(e.target.value),required:!0,value:v})]}),(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Prompt`}),(0,V.jsx)(`textarea`,{onChange:e=>S(e.target.value),required:!0,value:b})]})]}),(0,V.jsxs)(G,{title:`Schedule`,children:[(0,V.jsxs)(`div`,{className:`scheduled-field-grid`,children:[(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Repeat`}),(0,V.jsxs)(`select`,{onChange:e=>w(e.target.value),value:C,children:[(0,V.jsx)(`option`,{value:`once`,children:`Once`}),(0,V.jsx)(`option`,{value:`daily`,children:`Daily`}),(0,V.jsx)(`option`,{value:`weekdays`,children:`Weekdays`}),(0,V.jsx)(`option`,{value:`weekly`,children:`Weekly`}),(0,V.jsx)(`option`,{value:`monthly`,children:`Monthly`})]})]}),C===`weekly`?(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Day`}),(0,V.jsx)(`select`,{onChange:e=>ee(e.target.value),value:M,children:Oe.map(e=>(0,V.jsx)(`option`,{value:e,children:z(e)},e))})]}):C===`monthly`?(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Day of month`}),(0,V.jsx)(`input`,{max:31,min:1,onChange:e=>P(Number(e.target.value)),type:`number`,value:N})]}):null,(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Start date`}),(0,V.jsx)(`input`,{onChange:e=>k(e.target.value),required:!0,type:`date`,value:D})]}),(0,V.jsxs)(`label`,{className:`scheduled-field`,children:[(0,V.jsx)(`span`,{children:`Time`}),(0,V.jsx)(`input`,{onChange:e=>j(e.target.value),required:!0,type:`time`,value:A})]}),(0,V.jsxs)(`label`,{className:`scheduled-field scheduled-field-wide`,children:[(0,V.jsx)(`span`,{children:`Timezone`}),(0,V.jsx)(`input`,{onChange:e=>E(e.target.value),required:!0,value:T})]})]}),(0,V.jsxs)(`p`,{className:`scheduled-next-run`,children:[`Next run: `,L(d.schedule.nextRunAt,g.timeZone)]})]}),(0,V.jsxs)(`div`,{className:`scheduled-detail-actions`,children:[R?(0,V.jsxs)(`button`,{disabled:l,type:`submit`,children:[(0,V.jsx)(_,{size:15}),(0,V.jsx)(`span`,{children:`Save`})]}):null,(0,V.jsxs)(`button`,{disabled:l,onClick:()=>void i(),type:`button`,children:[(0,V.jsx)(x,{size:15}),(0,V.jsx)(`span`,{children:`Run now`})]}),(0,V.jsxs)(`button`,{disabled:l,onClick:()=>void s(),type:`button`,children:[d.schedule.enabled?(0,V.jsx)(u,{size:15}):(0,V.jsx)(h,{size:15}),(0,V.jsx)(`span`,{children:d.schedule.enabled?`Pause`:`Resume`})]})]}),(0,V.jsxs)(`button`,{className:`scheduled-open-chat`,disabled:l||!I,onClick:()=>{I&&Ie(I,F)},type:`button`,children:[(0,V.jsx)(`span`,{children:`Open hosted chat`}),(0,V.jsx)(f,{size:14})]}),(0,V.jsx)(G,{title:`Runs`,children:p.length===0?(0,V.jsx)(`p`,{className:`scheduled-no-runs`,children:`No runs yet.`}):(0,V.jsx)(`div`,{className:`scheduled-run-list`,children:p.map(e=>(0,V.jsx)(U,{onOpen:()=>{m&&Ie(Fe(m,e.conversationId),e.conversationId)},run:e},e.id))})})]})})}function Me(e){return e.recurrence??{version:1,kind:`daily`,timeZone:e.timeZone||Re(),startDate:Le(),localTime:`08:00`,end:{kind:`never`}}}function Ne(e){let t=e.input.prompt;return typeof t==`string`&&t.trim()?t.trim():Object.keys(e.input).length>0?JSON.stringify(e.input,null,2):`No task input configured.`}function Pe(e,t){let[n,r]=(0,O.useState)([]),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null);return(0,O.useEffect)(()=>{if(!e){r([]),a(!1),s(null);return}let n=!1;return a(!0),E.localAgentScheduleRuns(e,t,{limit:20}).then(e=>{n||(r(e.runs),s(null))}).catch(e=>{n||s(ze(e))}).finally(()=>{n||a(!1)}),()=>{n=!0}},[e,t]),{error:o,loading:i,runs:n}}function Fe(e,t){let n=new URL(e);return n.pathname=t?`/sandboxes/work/${encodeURIComponent(t)}`:`/sandboxes/work`,n.search=``,n.hash=``,n.toString()}async function Ie(e,t){let n=window.openpond?.browser;n?.openExternal&&(await n.openExternal({conversationId:t??`hosted-scheduled-work`,url:e})).ok||window.open(e,`_blank`,`noopener,noreferrer`)}function Le(){return new Date().toISOString().slice(0,10)}function Re(){return Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`}function ze(e){return e instanceof Error?e.message:String(e)}export{ke as ScheduledWorkPage};
|