@recombine-ai/bosun 0.16.0 → 0.16.2
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/build/client/_app/immutable/assets/0.Rrc0O--C.css +1 -0
- package/build/client/_app/immutable/assets/0.Rrc0O--C.css.br +0 -0
- package/build/client/_app/immutable/assets/0.Rrc0O--C.css.gz +0 -0
- package/build/client/_app/immutable/assets/2.DtxQDOXx.css +1 -0
- package/build/client/_app/immutable/assets/2.DtxQDOXx.css.br +0 -0
- package/build/client/_app/immutable/assets/2.DtxQDOXx.css.gz +0 -0
- package/build/client/_app/immutable/assets/ReadOnlyMonacoDiff.iiWNRlR-.css +1 -0
- package/build/client/_app/immutable/assets/ReadOnlyMonacoDiff.iiWNRlR-.css.br +0 -0
- package/build/client/_app/immutable/assets/ReadOnlyMonacoDiff.iiWNRlR-.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{Cyai3SOj.js → B1HdnQRQ.js} +1 -1
- package/build/client/_app/immutable/chunks/B1HdnQRQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1HdnQRQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{uLGP0py1.js → B5zf3x62.js} +1 -1
- package/build/client/_app/immutable/chunks/B5zf3x62.js.br +0 -0
- package/build/client/_app/immutable/chunks/B5zf3x62.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Buo-57fF.js → BHHfrjbV.js} +1 -1
- package/build/client/_app/immutable/chunks/BHHfrjbV.js.br +2 -0
- package/build/client/_app/immutable/chunks/BHHfrjbV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BbGYcfPY.js +3 -0
- package/build/client/_app/immutable/chunks/BbGYcfPY.js.br +0 -0
- package/build/client/_app/immutable/chunks/BbGYcfPY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CX0Ekq8t.js → Bmd5zhWC.js} +1 -1
- package/build/client/_app/immutable/chunks/Bmd5zhWC.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bmd5zhWC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dslf9OwW.js → BnqH7p3U.js} +1 -1
- package/build/client/_app/immutable/chunks/BnqH7p3U.js.br +0 -0
- package/build/client/_app/immutable/chunks/BnqH7p3U.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CJYOmGlC.js → Bog028VR.js} +1 -1
- package/build/client/_app/immutable/chunks/Bog028VR.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bog028VR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{iAhzu4tv.js → Bv1mNXs0.js} +1 -1
- package/build/client/_app/immutable/chunks/Bv1mNXs0.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bv1mNXs0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BD9x_mnu.js → BvjXTrOz.js} +1 -1
- package/build/client/_app/immutable/chunks/BvjXTrOz.js.br +0 -0
- package/build/client/_app/immutable/chunks/BvjXTrOz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C1R-s4aD.js +1 -0
- package/build/client/_app/immutable/chunks/C1R-s4aD.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1R-s4aD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DCuEIs0S.js → CC1OcqhR.js} +1 -1
- package/build/client/_app/immutable/chunks/CC1OcqhR.js.br +0 -0
- package/build/client/_app/immutable/chunks/CC1OcqhR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CEHsomMo.js +1 -0
- package/build/client/_app/immutable/chunks/CEHsomMo.js.br +0 -0
- package/build/client/_app/immutable/chunks/CEHsomMo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CVlsAO8k.js → CJcZ2GVC.js} +1 -1
- package/build/client/_app/immutable/chunks/CJcZ2GVC.js.br +0 -0
- package/build/client/_app/immutable/chunks/CJcZ2GVC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DJriQKD9.js → CN555stc.js} +1 -1
- package/build/client/_app/immutable/chunks/CN555stc.js.br +0 -0
- package/build/client/_app/immutable/chunks/CN555stc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CQg2Mme0.js +9 -0
- package/build/client/_app/immutable/chunks/CQg2Mme0.js.br +0 -0
- package/build/client/_app/immutable/chunks/CQg2Mme0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CXESoUel.js → Cp_st-64.js} +1 -1
- package/build/client/_app/immutable/chunks/Cp_st-64.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cp_st-64.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CPXdAKdv.js → D8mA-uZ4.js} +1 -1
- package/build/client/_app/immutable/chunks/D8mA-uZ4.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8mA-uZ4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Ca197UDq.js → DCXjBDmY.js} +1 -1
- package/build/client/_app/immutable/chunks/{Ca197UDq.js.br → DCXjBDmY.js.br} +0 -0
- package/build/client/_app/immutable/chunks/DCXjBDmY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DSLyVE1P.js +1 -0
- package/build/client/_app/immutable/chunks/DSLyVE1P.js.br +0 -0
- package/build/client/_app/immutable/chunks/DSLyVE1P.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{07xNIa59.js → Ddv5LgEc.js} +1 -1
- package/build/client/_app/immutable/chunks/Ddv5LgEc.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ddv5LgEc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{nYD9wsyN.js → DfcDjAv-.js} +1 -1
- package/build/client/_app/immutable/chunks/DfcDjAv-.js.br +0 -0
- package/build/client/_app/immutable/chunks/DfcDjAv-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D-B5X35l.js → Dg0A8wPA.js} +1 -1
- package/build/client/_app/immutable/chunks/Dg0A8wPA.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dg0A8wPA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BPNEONy5.js → Dm49pcMm.js} +1 -1
- package/build/client/_app/immutable/chunks/Dm49pcMm.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dm49pcMm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BI42X8h_.js → DneQQ7D5.js} +1 -1
- package/build/client/_app/immutable/chunks/DneQQ7D5.js.br +0 -0
- package/build/client/_app/immutable/chunks/DneQQ7D5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C39ai1md.js → DoD3q5w5.js} +1 -1
- package/build/client/_app/immutable/chunks/DoD3q5w5.js.br +0 -0
- package/build/client/_app/immutable/chunks/DoD3q5w5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BLu86SbA.js → DtXXy94i.js} +1 -1
- package/build/client/_app/immutable/chunks/DtXXy94i.js.br +0 -0
- package/build/client/_app/immutable/chunks/DtXXy94i.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CAjPRvNs.js → Dy2CFyD6.js} +1 -1
- package/build/client/_app/immutable/chunks/Dy2CFyD6.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dy2CFyD6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DyBwTDJp.js +2 -0
- package/build/client/_app/immutable/chunks/DyBwTDJp.js.br +0 -0
- package/build/client/_app/immutable/chunks/DyBwTDJp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BsDZe4N6.js → ILTCveYH.js} +1 -1
- package/build/client/_app/immutable/chunks/ILTCveYH.js.br +0 -0
- package/build/client/_app/immutable/chunks/ILTCveYH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bj8jfBTi.js → UqjCSZmA.js} +1 -1
- package/build/client/_app/immutable/chunks/UqjCSZmA.js.br +0 -0
- package/build/client/_app/immutable/chunks/UqjCSZmA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_YcrHZ6P.js +1 -0
- package/build/client/_app/immutable/chunks/_YcrHZ6P.js.br +2 -0
- package/build/client/_app/immutable/chunks/_YcrHZ6P.js.gz +0 -0
- package/build/client/_app/immutable/chunks/i6ygh6h8.js +1 -0
- package/build/client/_app/immutable/chunks/i6ygh6h8.js.br +2 -0
- package/build/client/_app/immutable/chunks/i6ygh6h8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/oRi68ch3.js +1 -0
- package/build/client/_app/immutable/chunks/oRi68ch3.js.br +0 -0
- package/build/client/_app/immutable/chunks/oRi68ch3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BJTwdUYr.js → pPpIn6tB.js} +1 -1
- package/build/client/_app/immutable/chunks/pPpIn6tB.js.br +0 -0
- package/build/client/_app/immutable/chunks/pPpIn6tB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C7he4XPB.js → r0sHOWrM.js} +1 -1
- package/build/client/_app/immutable/chunks/r0sHOWrM.js.br +0 -0
- package/build/client/_app/immutable/chunks/r0sHOWrM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CaHl3dME.js → wcTQUnZO.js} +1 -1
- package/build/client/_app/immutable/chunks/wcTQUnZO.js.br +0 -0
- package/build/client/_app/immutable/chunks/wcTQUnZO.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.Du7JgOF0.js → app.DdO0gkPg.js} +2 -2
- package/build/client/_app/immutable/entry/app.DdO0gkPg.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DdO0gkPg.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.eAjDq0c9.js +1 -0
- package/build/client/_app/immutable/entry/start.eAjDq0c9.js.br +2 -0
- package/build/client/_app/immutable/entry/start.eAjDq0c9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.EJrjlOP2.js → 0.nG3DdvIX.js} +1 -1
- package/build/client/_app/immutable/nodes/0.nG3DdvIX.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.nG3DdvIX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.Ceu0XS6v.js +1 -0
- package/build/client/_app/immutable/nodes/1.Ceu0XS6v.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.Ceu0XS6v.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.dm2dgy31.js +13 -0
- package/build/client/_app/immutable/nodes/10.dm2dgy31.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.dm2dgy31.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.BFy4oAT6.js → 15.D2I0y3ys.js} +1 -1
- package/build/client/_app/immutable/nodes/15.D2I0y3ys.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.D2I0y3ys.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{17.DQQN2LTu.js → 17.CKxGp0E7.js} +1 -1
- package/build/client/_app/immutable/nodes/17.CKxGp0E7.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.CKxGp0E7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{18.Dx1VeGYs.js → 18.DHJxyQpw.js} +1 -1
- package/build/client/_app/immutable/nodes/18.DHJxyQpw.js.br +0 -0
- package/build/client/_app/immutable/nodes/18.DHJxyQpw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DesR2keg.js +35 -0
- package/build/client/_app/immutable/nodes/2.DesR2keg.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DesR2keg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.D2P9M-PP.js → 3.BUKrXGR_.js} +1 -1
- package/build/client/_app/immutable/nodes/3.BUKrXGR_.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BUKrXGR_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.Cx97sxk5.js → 4.C8VxVbVn.js} +1 -1
- package/build/client/_app/immutable/nodes/4.C8VxVbVn.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.C8VxVbVn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.BAliV6Wc.js → 5.BjrnKYaA.js} +1 -1
- package/build/client/_app/immutable/nodes/5.BjrnKYaA.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BjrnKYaA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.CmUnus-n.js → 6.C_hEzPrU.js} +1 -1
- package/build/client/_app/immutable/nodes/6.C_hEzPrU.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.C_hEzPrU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.DLYtZXzs.js → 8.BTYaOiDC.js} +1 -1
- package/build/client/_app/immutable/nodes/8.BTYaOiDC.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.BTYaOiDC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DVspuDYY.js +2 -0
- package/build/client/_app/immutable/nodes/9.DVspuDYY.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DVspuDYY.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/0-D_duQDWy.js +9 -0
- package/build/server/chunks/0-D_duQDWy.js.map +1 -0
- package/build/server/chunks/1-C0HdTvXW.js +9 -0
- package/build/server/chunks/{1-kigiZghR.js.map → 1-C0HdTvXW.js.map} +1 -1
- package/build/server/chunks/10-DcfhCR4R.js +9 -0
- package/build/server/chunks/10-DcfhCR4R.js.map +1 -0
- package/build/server/chunks/15-BQcb9C_y.js +9 -0
- package/build/server/chunks/{15-BRw8wtLp.js.map → 15-BQcb9C_y.js.map} +1 -1
- package/build/server/chunks/17-DuVCTioj.js +9 -0
- package/build/server/chunks/17-DuVCTioj.js.map +1 -0
- package/build/server/chunks/18-CT0VFW_p.js +9 -0
- package/build/server/chunks/18-CT0VFW_p.js.map +1 -0
- package/build/server/chunks/2-DgTzKQAP.js +9 -0
- package/build/server/chunks/2-DgTzKQAP.js.map +1 -0
- package/build/server/chunks/3-eQMSMzXP.js +9 -0
- package/build/server/chunks/3-eQMSMzXP.js.map +1 -0
- package/build/server/chunks/4-OaAJtDqP.js +9 -0
- package/build/server/chunks/4-OaAJtDqP.js.map +1 -0
- package/build/server/chunks/5-CBdMutbv.js +9 -0
- package/build/server/chunks/{5-Cumig7Am.js.map → 5-CBdMutbv.js.map} +1 -1
- package/build/server/chunks/6-FoEi7ggm.js +9 -0
- package/build/server/chunks/{6-Ez7v6PpX.js.map → 6-FoEi7ggm.js.map} +1 -1
- package/build/server/chunks/8-B44yRkfX.js +9 -0
- package/build/server/chunks/8-B44yRkfX.js.map +1 -0
- package/build/server/chunks/9-eUjFpHzI.js +9 -0
- package/build/server/chunks/9-eUjFpHzI.js.map +1 -0
- package/build/server/chunks/{AgentSidebar-C--dGIV5.js → AgentSidebar-BWBnqHnV.js} +4 -4
- package/build/server/chunks/{AgentSidebar-C--dGIV5.js.map → AgentSidebar-BWBnqHnV.js.map} +1 -1
- package/build/server/chunks/{Button-oIUr2LUP.js → Button-DH7gdU0s.js} +2 -2
- package/build/server/chunks/{Button-oIUr2LUP.js.map → Button-DH7gdU0s.js.map} +1 -1
- package/build/server/chunks/{ChatStepTrace-CX2Zolmp.js → ChatStepTrace-BivoNYOY.js} +6 -4
- package/build/server/chunks/ChatStepTrace-BivoNYOY.js.map +1 -0
- package/build/server/chunks/{Dropdown-DfCyYHqi.js → Dropdown-DnARl86Q.js} +2 -2
- package/build/server/chunks/{Dropdown-DfCyYHqi.js.map → Dropdown-DnARl86Q.js.map} +1 -1
- package/build/server/chunks/{Icon-DadJPtVP.js → Icon-DP1YKCRV.js} +2 -2
- package/build/server/chunks/{Icon-DadJPtVP.js.map → Icon-DP1YKCRV.js.map} +1 -1
- package/build/server/chunks/{Input-R74u4cO5.js → Input-CUJ9Cg7b.js} +2 -2
- package/build/server/chunks/{Input-R74u4cO5.js.map → Input-CUJ9Cg7b.js.map} +1 -1
- package/build/server/chunks/{Modal-CAzVFw5x.js → Modal-CGJuNpZ0.js} +21 -9
- package/build/server/chunks/{Modal-CAzVFw5x.js.map → Modal-CGJuNpZ0.js.map} +1 -1
- package/build/server/chunks/{Panel-D0IY1AzO.js → Panel-zvjxe036.js} +2 -2
- package/build/server/chunks/{Panel-D0IY1AzO.js.map → Panel-zvjxe036.js.map} +1 -1
- package/build/server/chunks/{Tab-D13L_Up5.js → Tab-CUkyLqbN.js} +4 -4
- package/build/server/chunks/{Tab-D13L_Up5.js.map → Tab-CUkyLqbN.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-D4EOIHJJ.js → _layout.svelte-B-0DHjLB.js} +8 -8
- package/build/server/chunks/{_layout.svelte-D4EOIHJJ.js.map → _layout.svelte-B-0DHjLB.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-Blfto3jh.js → _layout.svelte-B88WMyk0.js} +681 -31
- package/build/server/chunks/_layout.svelte-B88WMyk0.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-Dk-9LkfL.js → _layout.svelte-BnrWYuLv.js} +10 -10
- package/build/server/chunks/{_layout.svelte-Dk-9LkfL.js.map → _layout.svelte-BnrWYuLv.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-BIMexfnk.js → _layout.svelte-wi6o5Ecu.js} +14 -14
- package/build/server/chunks/{_layout.svelte-BIMexfnk.js.map → _layout.svelte-wi6o5Ecu.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DZvcjON6.js → _page.svelte-57pyhszV.js} +10 -10
- package/build/server/chunks/{_page.svelte-DZvcjON6.js.map → _page.svelte-57pyhszV.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DhhqK6z3.js → _page.svelte-BSVJ2d2G.js} +13 -12
- package/build/server/chunks/_page.svelte-BSVJ2d2G.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B1erTzoN.js → _page.svelte-BoHt2cpr.js} +5 -5
- package/build/server/chunks/{_page.svelte-B1erTzoN.js.map → _page.svelte-BoHt2cpr.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CeO_ScC8.js → _page.svelte-CHgQjBQj.js} +2 -2
- package/build/server/chunks/{_page.svelte-CeO_ScC8.js.map → _page.svelte-CHgQjBQj.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CoCBnE2l.js → _page.svelte-CeS_21Ho.js} +11 -11
- package/build/server/chunks/{_page.svelte-CoCBnE2l.js.map → _page.svelte-CeS_21Ho.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-D5S0QjlI.js → _page.svelte-DHSYVLoj.js} +12 -12
- package/build/server/chunks/{_page.svelte-D5S0QjlI.js.map → _page.svelte-DHSYVLoj.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-xf-0yXQM.js → _page.svelte-DhFNFMnl.js} +21 -19
- package/build/server/chunks/_page.svelte-DhFNFMnl.js.map +1 -0
- package/build/server/chunks/{_page.svelte-YoDx7gDL.js → _page.svelte-h_J4lNT9.js} +6 -6
- package/build/server/chunks/{_page.svelte-YoDx7gDL.js.map → _page.svelte-h_J4lNT9.js.map} +1 -1
- package/build/server/chunks/{agents-context-w03Lz_6n.js → agents-context-CbFsZmi5.js} +2 -2
- package/build/server/chunks/{agents-context-w03Lz_6n.js.map → agents-context-CbFsZmi5.js.map} +1 -1
- package/build/server/chunks/{client-WFEvX_be.js → client-DO-hqMbT.js} +4 -4
- package/build/server/chunks/{client-WFEvX_be.js.map → client-DO-hqMbT.js.map} +1 -1
- package/build/server/chunks/{conversation-view-memory-B0PllWRL.js → conversation-view-memory-CtbUZd_L.js} +2 -2
- package/build/server/chunks/{conversation-view-memory-B0PllWRL.js.map → conversation-view-memory-CtbUZd_L.js.map} +1 -1
- package/build/server/chunks/{edit-workspace-context-biaZqjOf.js → edit-workspace-context-tyHBPujC.js} +2 -2
- package/build/server/chunks/{edit-workspace-context-biaZqjOf.js.map → edit-workspace-context-tyHBPujC.js.map} +1 -1
- package/build/server/chunks/error.svelte-DmKKN1RU.js +15 -0
- package/build/server/chunks/{error.svelte-BjIDhioc.js.map → error.svelte-DmKKN1RU.js.map} +1 -1
- package/build/server/chunks/{index-rHCWxLFZ.js → index-LMsd1ih2.js} +2 -2
- package/build/server/chunks/{index-rHCWxLFZ.js.map → index-LMsd1ih2.js.map} +1 -1
- package/build/server/chunks/{index-server-BMxlf3ZC.js → index-server-BRr5mZEq.js} +2 -2
- package/build/server/chunks/{index-server-BMxlf3ZC.js.map → index-server-BRr5mZEq.js.map} +1 -1
- package/build/server/chunks/{index2-DdOgqE2_.js → index2-ClgfzZ89.js} +3 -3
- package/build/server/chunks/{index2-DdOgqE2_.js.map → index2-ClgfzZ89.js.map} +1 -1
- package/build/server/chunks/{index3-DC4GTqD1.js → index3-BdRUAffj.js} +2 -2
- package/build/server/chunks/{index3-DC4GTqD1.js.map → index3-BdRUAffj.js.map} +1 -1
- package/build/server/chunks/{root-UeqiktJA.js → root-4q2Pr7ck.js} +2 -2
- package/build/server/chunks/{root-UeqiktJA.js.map → root-4q2Pr7ck.js.map} +1 -1
- package/build/server/chunks/{state.svelte-CLOYXiU6.js → state.svelte-Bd1i-u49.js} +3 -3
- package/build/server/chunks/{state.svelte-CLOYXiU6.js.map → state.svelte-Bd1i-u49.js.map} +1 -1
- package/build/server/index.js +4 -4
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +14 -14
- package/build/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/backend/lib/apply-v4a-diff.spec.ts +45 -0
- package/src/backend/lib/apply-v4a-diff.ts +167 -0
- package/src/backend/roleplay/agents.ts +16 -2
- package/src/backend/roleplay/old-server.ts +18 -4
- package/src/backend/roleplay/prompt-edit-progress.ts +36 -0
- package/src/backend/roleplay/prompt-edit-proposals.ts +38 -0
- package/src/backend/roleplay/router.ts +63 -15
- package/src/backend/roleplay/step-registry.spec.ts +20 -0
- package/src/backend/roleplay/step-registry.ts +13 -2
- package/src/backend/roleplay/suggest-prompt-edit.ts +163 -0
- package/src/backend/roleplay/variants.ts +8 -4
- package/src/backend/tests/academy-json.spec.ts +32 -0
- package/src/backend/tests/academy.ts +10 -2
- package/src/backend/tests/data.ts +1 -0
- package/src/backend/tests/emulate-agents.spec.ts +106 -0
- package/src/backend/tests/emulate-agents.ts +42 -4
- package/src/backend/tests/json-field-match.ts +29 -8
- package/src/backend/tests/pii-sanitizer.spec.ts +122 -6
- package/src/backend/tests/pii-sanitizer.ts +140 -29
- package/src/backend/tests/router.ts +22 -3
- package/src/backend/tests/suite.spec.ts +20 -0
- package/src/backend/tests/suite.ts +7 -2
- package/src/lib/components/Modal.svelte +42 -13
- package/src/lib/components/Textarea.svelte +41 -0
- package/src/lib/edit/edit-workspace-context.ts +12 -0
- package/src/lib/ws-message.ts +7 -0
- package/build/client/_app/immutable/assets/0.FwR3B_mV.css +0 -1
- package/build/client/_app/immutable/assets/0.FwR3B_mV.css.br +0 -0
- package/build/client/_app/immutable/assets/0.FwR3B_mV.css.gz +0 -0
- package/build/client/_app/immutable/assets/2.DxwYfh1z.css +0 -1
- package/build/client/_app/immutable/assets/2.DxwYfh1z.css.br +0 -0
- package/build/client/_app/immutable/assets/2.DxwYfh1z.css.gz +0 -0
- package/build/client/_app/immutable/assets/Modal.tn0RQdqM.css +0 -0
- package/build/client/_app/immutable/assets/Modal.tn0RQdqM.css.br +0 -1
- package/build/client/_app/immutable/assets/Modal.tn0RQdqM.css.gz +0 -0
- package/build/client/_app/immutable/chunks/07xNIa59.js.br +0 -0
- package/build/client/_app/immutable/chunks/07xNIa59.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BD9x_mnu.js.br +0 -0
- package/build/client/_app/immutable/chunks/BD9x_mnu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BDl2QuyN.js +0 -1
- package/build/client/_app/immutable/chunks/BDl2QuyN.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDl2QuyN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BI42X8h_.js.br +0 -0
- package/build/client/_app/immutable/chunks/BI42X8h_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJTwdUYr.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJTwdUYr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BLu86SbA.js.br +0 -0
- package/build/client/_app/immutable/chunks/BLu86SbA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNifnXkO.js +0 -1
- package/build/client/_app/immutable/chunks/BNifnXkO.js.br +0 -2
- package/build/client/_app/immutable/chunks/BNifnXkO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BPNEONy5.js.br +0 -0
- package/build/client/_app/immutable/chunks/BPNEONy5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B_K7D6rX.js +0 -2
- package/build/client/_app/immutable/chunks/B_K7D6rX.js.br +0 -0
- package/build/client/_app/immutable/chunks/B_K7D6rX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bj8jfBTi.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bj8jfBTi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BsDZe4N6.js.br +0 -0
- package/build/client/_app/immutable/chunks/BsDZe4N6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Buo-57fF.js.br +0 -0
- package/build/client/_app/immutable/chunks/Buo-57fF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C39ai1md.js.br +0 -0
- package/build/client/_app/immutable/chunks/C39ai1md.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C7he4XPB.js.br +0 -0
- package/build/client/_app/immutable/chunks/C7he4XPB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CAjPRvNs.js.br +0 -0
- package/build/client/_app/immutable/chunks/CAjPRvNs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CJYOmGlC.js.br +0 -0
- package/build/client/_app/immutable/chunks/CJYOmGlC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CPXdAKdv.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPXdAKdv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CVlsAO8k.js.br +0 -0
- package/build/client/_app/immutable/chunks/CVlsAO8k.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CX0Ekq8t.js.br +0 -0
- package/build/client/_app/immutable/chunks/CX0Ekq8t.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CXESoUel.js.br +0 -0
- package/build/client/_app/immutable/chunks/CXESoUel.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ca197UDq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CaHl3dME.js.br +0 -0
- package/build/client/_app/immutable/chunks/CaHl3dME.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cql_e8Of.js +0 -1
- package/build/client/_app/immutable/chunks/Cql_e8Of.js.br +0 -2
- package/build/client/_app/immutable/chunks/Cql_e8Of.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CxLomzuE.js +0 -1
- package/build/client/_app/immutable/chunks/CxLomzuE.js.br +0 -0
- package/build/client/_app/immutable/chunks/CxLomzuE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cyai3SOj.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cyai3SOj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CyvQWZoe.js +0 -8
- package/build/client/_app/immutable/chunks/CyvQWZoe.js.br +0 -0
- package/build/client/_app/immutable/chunks/CyvQWZoe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CzXNWL4m.js +0 -1
- package/build/client/_app/immutable/chunks/CzXNWL4m.js.br +0 -1
- package/build/client/_app/immutable/chunks/CzXNWL4m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D-B5X35l.js.br +0 -0
- package/build/client/_app/immutable/chunks/D-B5X35l.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DCuEIs0S.js.br +0 -0
- package/build/client/_app/immutable/chunks/DCuEIs0S.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DJriQKD9.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJriQKD9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dslf9OwW.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dslf9OwW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/QpaC6J6s.js +0 -1
- package/build/client/_app/immutable/chunks/QpaC6J6s.js.br +0 -0
- package/build/client/_app/immutable/chunks/QpaC6J6s.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_U9sB4BM.js +0 -3
- package/build/client/_app/immutable/chunks/_U9sB4BM.js.br +0 -0
- package/build/client/_app/immutable/chunks/_U9sB4BM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/iAhzu4tv.js.br +0 -0
- package/build/client/_app/immutable/chunks/iAhzu4tv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/nYD9wsyN.js.br +0 -0
- package/build/client/_app/immutable/chunks/nYD9wsyN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uLGP0py1.js.br +0 -0
- package/build/client/_app/immutable/chunks/uLGP0py1.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.Du7JgOF0.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Du7JgOF0.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BssSvo4L.js +0 -1
- package/build/client/_app/immutable/entry/start.BssSvo4L.js.br +0 -2
- package/build/client/_app/immutable/entry/start.BssSvo4L.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.EJrjlOP2.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.EJrjlOP2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BX3yW9Ki.js +0 -1
- package/build/client/_app/immutable/nodes/1.BX3yW9Ki.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BX3yW9Ki.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.HnX8Jhtn.js +0 -13
- package/build/client/_app/immutable/nodes/10.HnX8Jhtn.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.HnX8Jhtn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.BFy4oAT6.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BFy4oAT6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.DQQN2LTu.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.DQQN2LTu.js.gz +0 -0
- package/build/client/_app/immutable/nodes/18.Dx1VeGYs.js.br +0 -0
- package/build/client/_app/immutable/nodes/18.Dx1VeGYs.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BSZUitGm.js +0 -35
- package/build/client/_app/immutable/nodes/2.BSZUitGm.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BSZUitGm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.D2P9M-PP.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.D2P9M-PP.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.Cx97sxk5.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.Cx97sxk5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.BAliV6Wc.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BAliV6Wc.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CmUnus-n.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CmUnus-n.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DLYtZXzs.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DLYtZXzs.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DQ0jyQBU.js +0 -2
- package/build/client/_app/immutable/nodes/9.DQ0jyQBU.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DQ0jyQBU.js.gz +0 -0
- package/build/server/chunks/0-DB4bFp_f.js +0 -9
- package/build/server/chunks/0-DB4bFp_f.js.map +0 -1
- package/build/server/chunks/1-kigiZghR.js +0 -9
- package/build/server/chunks/10-C49_L5kn.js +0 -9
- package/build/server/chunks/10-C49_L5kn.js.map +0 -1
- package/build/server/chunks/15-BRw8wtLp.js +0 -9
- package/build/server/chunks/17-Dbb76ckK.js +0 -9
- package/build/server/chunks/17-Dbb76ckK.js.map +0 -1
- package/build/server/chunks/18-CvqluQBN.js +0 -9
- package/build/server/chunks/18-CvqluQBN.js.map +0 -1
- package/build/server/chunks/2-JGarRt-z.js +0 -9
- package/build/server/chunks/2-JGarRt-z.js.map +0 -1
- package/build/server/chunks/3-CnXV_OO3.js +0 -9
- package/build/server/chunks/3-CnXV_OO3.js.map +0 -1
- package/build/server/chunks/4-B-XLuotH.js +0 -9
- package/build/server/chunks/4-B-XLuotH.js.map +0 -1
- package/build/server/chunks/5-Cumig7Am.js +0 -9
- package/build/server/chunks/6-Ez7v6PpX.js +0 -9
- package/build/server/chunks/8-COGeKy3N.js +0 -9
- package/build/server/chunks/8-COGeKy3N.js.map +0 -1
- package/build/server/chunks/9-DlMHnRdZ.js +0 -9
- package/build/server/chunks/9-DlMHnRdZ.js.map +0 -1
- package/build/server/chunks/ChatStepTrace-CX2Zolmp.js.map +0 -1
- package/build/server/chunks/_layout.svelte-Blfto3jh.js.map +0 -1
- package/build/server/chunks/_page.svelte-DhhqK6z3.js.map +0 -1
- package/build/server/chunks/_page.svelte-xf-0yXQM.js.map +0 -1
- package/build/server/chunks/error.svelte-BjIDhioc.js +0 -15
|
@@ -1,26 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as Panel } from './Panel-
|
|
3
|
-
import { B as Button } from './Button-
|
|
4
|
-
import { D as Dropdown } from './Dropdown-
|
|
5
|
-
import { I as Icon } from './Icon-
|
|
6
|
-
import { T as Tabs, a as Tab } from './Tab-
|
|
7
|
-
import { M as Modal } from './Modal-
|
|
8
|
-
import { o as onDestroy } from './index-server-
|
|
9
|
-
import { g as goto, r as replaceState } from './client-
|
|
10
|
-
import { p as page } from './index2-
|
|
1
|
+
import { l as derived, k as escape_html, m as attr, n as stringify, o as attr_class, p as ensure_array_like, q as attributes, r as clsx, t as bind_props } from './index-LMsd1ih2.js';
|
|
2
|
+
import { P as Panel } from './Panel-zvjxe036.js';
|
|
3
|
+
import { B as Button } from './Button-DH7gdU0s.js';
|
|
4
|
+
import { D as Dropdown } from './Dropdown-DnARl86Q.js';
|
|
5
|
+
import { I as Icon } from './Icon-DP1YKCRV.js';
|
|
6
|
+
import { T as Tabs, a as Tab } from './Tab-CUkyLqbN.js';
|
|
7
|
+
import { M as Modal } from './Modal-CGJuNpZ0.js';
|
|
8
|
+
import { o as onDestroy, t as tick } from './index-server-BRr5mZEq.js';
|
|
9
|
+
import { g as goto, r as replaceState } from './client-DO-hqMbT.js';
|
|
10
|
+
import { p as page } from './index2-ClgfzZ89.js';
|
|
11
11
|
import { p as public_env } from './shared-server-DaWdgxVh.js';
|
|
12
12
|
import { t as trpc } from './trpc-client-D8L6vWf4.js';
|
|
13
|
-
import 'nunjucks';
|
|
14
|
-
import { A as AgentSidebar } from './AgentSidebar-
|
|
15
|
-
import { g as getAgentsContext } from './agents-context-
|
|
16
|
-
import { s as setEditWorkspaceContext, g as getEditWorkspaceContext } from './edit-workspace-context-
|
|
13
|
+
import nunjucks from 'nunjucks';
|
|
14
|
+
import { A as AgentSidebar } from './AgentSidebar-BWBnqHnV.js';
|
|
15
|
+
import { g as getAgentsContext } from './agents-context-CbFsZmi5.js';
|
|
16
|
+
import { s as setEditWorkspaceContext, g as getEditWorkspaceContext } from './edit-workspace-context-tyHBPujC.js';
|
|
17
17
|
import 'js-yaml';
|
|
18
18
|
import { c as clearChatContent, a as clearLogs } from './log-content.svelte-CfQzj-v_.js';
|
|
19
|
-
import './index3-
|
|
20
|
-
import './root-
|
|
21
|
-
import './state.svelte-
|
|
19
|
+
import './index3-BdRUAffj.js';
|
|
20
|
+
import './root-4q2Pr7ck.js';
|
|
21
|
+
import './state.svelte-Bd1i-u49.js';
|
|
22
22
|
import '@trpc/client';
|
|
23
23
|
|
|
24
|
+
function Textarea($$renderer, $$props) {
|
|
25
|
+
$$renderer.component(($$renderer2) => {
|
|
26
|
+
let {
|
|
27
|
+
class: className = "",
|
|
28
|
+
value = "",
|
|
29
|
+
variant = "config",
|
|
30
|
+
el = void 0,
|
|
31
|
+
$$slots,
|
|
32
|
+
$$events,
|
|
33
|
+
...rest
|
|
34
|
+
} = $$props;
|
|
35
|
+
let classes = derived(() => variant === "chat" ? `textarea-chat ${className}` : `textarea-config ${className}`);
|
|
36
|
+
$$renderer2.push(`<textarea${attributes({ class: clsx(classes()), ...rest }, "svelte-1ilrf3m")}>`);
|
|
37
|
+
const $$body = escape_html(value);
|
|
38
|
+
if ($$body) {
|
|
39
|
+
$$renderer2.push(`${$$body}`);
|
|
40
|
+
}
|
|
41
|
+
$$renderer2.push(`</textarea>`);
|
|
42
|
+
bind_props($$props, { value, el });
|
|
43
|
+
});
|
|
44
|
+
}
|
|
24
45
|
function PopoverModal($$renderer, $$props) {
|
|
25
46
|
let { title, onClose, children } = $$props;
|
|
26
47
|
$$renderer.push(`<div class="absolute inset-0 z-20 bg-black/20"></div> <div class="absolute inset-2 z-30 flex min-w-0 flex-col overflow-hidden rounded-lg border border-rc-gray-600 bg-rc-gray-900 shadow-2xl"><div class="flex items-center justify-between border-b border-rc-gray-700 px-3 py-2"><button type="button" class="inline-flex h-7 w-7 items-center justify-center rounded-md text-rc-gray-200 hover:bg-rc-gray-700" aria-label="Close" title="Close">X</button> <div class="text-sm font-semibold text-rc-gray-200">${escape_html(title)}</div> <div class="w-7"></div></div> <div class="flex min-h-0 flex-1 flex-col overflow-hidden">`);
|
|
@@ -208,12 +229,20 @@ function persistEditorViewState(key, editor) {
|
|
|
208
229
|
function PromptEditor($$renderer, $$props) {
|
|
209
230
|
$$renderer.component(($$renderer2) => {
|
|
210
231
|
let {
|
|
232
|
+
initialPrompt,
|
|
233
|
+
onPromptChanged,
|
|
211
234
|
class: className,
|
|
235
|
+
agentId,
|
|
236
|
+
stepName,
|
|
212
237
|
showSchemaButton,
|
|
213
238
|
onSchemaClick,
|
|
214
239
|
readOnly = false,
|
|
240
|
+
readOnlyMessage = "",
|
|
241
|
+
bottomPadding = 0,
|
|
215
242
|
showPreviewToggle = true,
|
|
216
|
-
preview = null
|
|
243
|
+
preview = null,
|
|
244
|
+
onPreviewChange,
|
|
245
|
+
onEditorReady
|
|
217
246
|
} = $$props;
|
|
218
247
|
let internalPreview = false;
|
|
219
248
|
const effectivePreview = derived(() => preview !== null ? preview : internalPreview);
|
|
@@ -249,6 +278,14 @@ function PromptEditor($$renderer, $$props) {
|
|
|
249
278
|
});
|
|
250
279
|
});
|
|
251
280
|
}
|
|
281
|
+
function ReadOnlyMonacoDiff($$renderer, $$props) {
|
|
282
|
+
$$renderer.component(($$renderer2) => {
|
|
283
|
+
let {
|
|
284
|
+
class: className = ""
|
|
285
|
+
} = $$props;
|
|
286
|
+
$$renderer2.push(`<div${attr_class(`overflow-hidden rounded-md border border-rc-gray-700 ${className}`)}><div class="h-full w-full"></div></div>`);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
252
289
|
function ModeAsyncPopoverContent($$renderer, $$props) {
|
|
253
290
|
$$renderer.component(($$renderer2) => {
|
|
254
291
|
const { state: workspace, actions } = getEditWorkspaceContext();
|
|
@@ -540,6 +577,198 @@ function focusQuote(state, quote) {
|
|
|
540
577
|
}
|
|
541
578
|
};
|
|
542
579
|
}
|
|
580
|
+
function findAllOverlappingBestEffort(haystack, needle) {
|
|
581
|
+
const text = String(haystack ?? "");
|
|
582
|
+
const variants = buildNeedleVariants(needle);
|
|
583
|
+
const normalizedText = normalizeForMatching(text);
|
|
584
|
+
for (const variant of variants) {
|
|
585
|
+
const exact = findAllOverlappingExact(text, variant);
|
|
586
|
+
if (exact.length > 0) return exact;
|
|
587
|
+
const flexible = findAllOverlappingFlexible(text, variant);
|
|
588
|
+
if (flexible.length > 0) return flexible;
|
|
589
|
+
const normalizedNeedle = normalizeForMatching(variant);
|
|
590
|
+
if (normalizedText !== text || normalizedNeedle !== variant) {
|
|
591
|
+
const exactNorm = findAllOverlappingExact(normalizedText, normalizedNeedle);
|
|
592
|
+
if (exactNorm.length > 0) return exactNorm;
|
|
593
|
+
const flexibleNorm = findAllOverlappingFlexible(normalizedText, normalizedNeedle);
|
|
594
|
+
if (flexibleNorm.length > 0) return flexibleNorm;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return [];
|
|
598
|
+
}
|
|
599
|
+
function findAllOverlappingExact(haystack, needle) {
|
|
600
|
+
const n = String(needle ?? "");
|
|
601
|
+
if (!n) return [];
|
|
602
|
+
const out = [];
|
|
603
|
+
let idx = 0;
|
|
604
|
+
while (idx <= haystack.length - n.length) {
|
|
605
|
+
const found = haystack.indexOf(n, idx);
|
|
606
|
+
if (found === -1) break;
|
|
607
|
+
out.push({ start: found, end: found + n.length });
|
|
608
|
+
idx = found + 1;
|
|
609
|
+
}
|
|
610
|
+
return out;
|
|
611
|
+
}
|
|
612
|
+
function findAllOverlappingFlexible(haystack, needle) {
|
|
613
|
+
const raw = String(needle ?? "");
|
|
614
|
+
if (!raw.trim()) return [];
|
|
615
|
+
const pattern = escapeRegex(raw).replace(/\s+/g, "\\s+");
|
|
616
|
+
let re;
|
|
617
|
+
try {
|
|
618
|
+
re = new RegExp(`(?=(${pattern}))`, "gu");
|
|
619
|
+
} catch {
|
|
620
|
+
return [];
|
|
621
|
+
}
|
|
622
|
+
const out = [];
|
|
623
|
+
let m;
|
|
624
|
+
while ((m = re.exec(haystack)) !== null) {
|
|
625
|
+
const start = m.index;
|
|
626
|
+
const matched = m[1] ?? "";
|
|
627
|
+
const end = start + matched.length;
|
|
628
|
+
if (end > start) out.push({ start, end });
|
|
629
|
+
if (re.lastIndex === start) re.lastIndex += 1;
|
|
630
|
+
}
|
|
631
|
+
return out;
|
|
632
|
+
}
|
|
633
|
+
function buildNeedleVariants(raw) {
|
|
634
|
+
const base = String(raw ?? "");
|
|
635
|
+
const trimmed = base.trim();
|
|
636
|
+
const variants = /* @__PURE__ */ new Set();
|
|
637
|
+
for (const v of [base, trimmed]) {
|
|
638
|
+
if (v) variants.add(v);
|
|
639
|
+
}
|
|
640
|
+
const noBullet = trimmed.replace(/^[-*•]\s+/, "");
|
|
641
|
+
if (noBullet && noBullet !== trimmed) variants.add(noBullet);
|
|
642
|
+
const noNumbering = trimmed.replace(/^(?:\(?\d+\)?[.)]|[a-zA-Z][.)])\s+/, "");
|
|
643
|
+
if (noNumbering && noNumbering !== trimmed) variants.add(noNumbering);
|
|
644
|
+
return [...variants].filter((v) => v.trim().length > 0);
|
|
645
|
+
}
|
|
646
|
+
function normalizeForMatching(text) {
|
|
647
|
+
return String(text ?? "").replace(/\r/g, "\n").replace(/[\u00A0\u2007\u202F\u2009\u200A\u200B\uFEFF]/g, " ").replace(/[\u201C\u201D\u201E\u00AB\u00BB]/g, '"').replace(/[\u2018\u2019]/g, "'").replace(/[\u2013\u2014]/g, "-");
|
|
648
|
+
}
|
|
649
|
+
function escapeRegex(text) {
|
|
650
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
651
|
+
}
|
|
652
|
+
function createPromptHighlighter(editor, monaco) {
|
|
653
|
+
const highlightDecorations = editor.createDecorationsCollection();
|
|
654
|
+
const focusDecorations = editor.createDecorationsCollection();
|
|
655
|
+
let currentHighlights = null;
|
|
656
|
+
let highlightRangesByQuote = /* @__PURE__ */ new Map();
|
|
657
|
+
let cursorByQuote = /* @__PURE__ */ new Map();
|
|
658
|
+
let lastHandledFocusNonce = 0;
|
|
659
|
+
function resetCaches() {
|
|
660
|
+
highlightRangesByQuote = /* @__PURE__ */ new Map();
|
|
661
|
+
cursorByQuote = /* @__PURE__ */ new Map();
|
|
662
|
+
lastHandledFocusNonce = 0;
|
|
663
|
+
}
|
|
664
|
+
function clamp(n, min, max) {
|
|
665
|
+
if (Number.isNaN(n)) return min;
|
|
666
|
+
return Math.max(min, Math.min(max, n));
|
|
667
|
+
}
|
|
668
|
+
function overviewColorForLevel(level) {
|
|
669
|
+
const l = clamp(level, 1, 10);
|
|
670
|
+
const alpha = clamp(0.22 + l * 0.06, 0.28, 0.82);
|
|
671
|
+
return `rgba(220, 38, 38, ${alpha})`;
|
|
672
|
+
}
|
|
673
|
+
function getHighlightRanges(quote, text) {
|
|
674
|
+
const q = String(quote ?? "");
|
|
675
|
+
if (!q) return [];
|
|
676
|
+
const cached = highlightRangesByQuote.get(q);
|
|
677
|
+
if (cached) return cached;
|
|
678
|
+
const found = findAllOverlappingBestEffort(text, q);
|
|
679
|
+
highlightRangesByQuote.set(q, found);
|
|
680
|
+
return found;
|
|
681
|
+
}
|
|
682
|
+
function updateHighlightDecorations(quotes) {
|
|
683
|
+
const model = editor.getModel();
|
|
684
|
+
if (!model) return;
|
|
685
|
+
const text = model.getValue() ?? "";
|
|
686
|
+
const decorations = [];
|
|
687
|
+
const ordered = [...quotes || []].sort((a, b) => (a.count || 0) - (b.count || 0));
|
|
688
|
+
for (const q of ordered) {
|
|
689
|
+
const quote = String(q.quote || "");
|
|
690
|
+
if (!quote) continue;
|
|
691
|
+
const level = clamp(Number(q.count || 0), 1, 10);
|
|
692
|
+
const color = overviewColorForLevel(level);
|
|
693
|
+
const matches = getHighlightRanges(quote, text);
|
|
694
|
+
for (const m of matches) {
|
|
695
|
+
const startPos = model.getPositionAt(m.start);
|
|
696
|
+
const endPos = model.getPositionAt(m.end);
|
|
697
|
+
decorations.push({
|
|
698
|
+
range: new monaco.Range(
|
|
699
|
+
startPos.lineNumber,
|
|
700
|
+
startPos.column,
|
|
701
|
+
endPos.lineNumber,
|
|
702
|
+
endPos.column
|
|
703
|
+
),
|
|
704
|
+
options: {
|
|
705
|
+
inlineClassName: `analysis-quote analysis-quote-l${level}`,
|
|
706
|
+
overviewRuler: { color, position: monaco.editor.OverviewRulerLane.Center }
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
highlightDecorations.set(decorations);
|
|
712
|
+
}
|
|
713
|
+
function revealNextOccurrence(quote) {
|
|
714
|
+
const model = editor.getModel();
|
|
715
|
+
if (!model) return;
|
|
716
|
+
const text = model.getValue() ?? "";
|
|
717
|
+
const occurrences = getHighlightRanges(quote, text);
|
|
718
|
+
if (occurrences.length === 0) return;
|
|
719
|
+
const current = cursorByQuote.get(quote) ?? -1;
|
|
720
|
+
const nextIdx = (current + 1) % occurrences.length;
|
|
721
|
+
cursorByQuote.set(quote, nextIdx);
|
|
722
|
+
const chosen = occurrences[nextIdx];
|
|
723
|
+
const startPos = model.getPositionAt(chosen.start);
|
|
724
|
+
const endPos = model.getPositionAt(chosen.end);
|
|
725
|
+
const range = new monaco.Range(
|
|
726
|
+
startPos.lineNumber,
|
|
727
|
+
startPos.column,
|
|
728
|
+
endPos.lineNumber,
|
|
729
|
+
endPos.column
|
|
730
|
+
);
|
|
731
|
+
focusDecorations.set([{ range, options: { inlineClassName: "analysis-quote-focus" } }]);
|
|
732
|
+
editor.setSelection(range);
|
|
733
|
+
editor.revealRangeInCenter(range, monaco.editor.ScrollType.Smooth);
|
|
734
|
+
editor.focus();
|
|
735
|
+
}
|
|
736
|
+
function applyHighlights(next) {
|
|
737
|
+
currentHighlights = next;
|
|
738
|
+
if (!currentHighlights) {
|
|
739
|
+
highlightDecorations.clear();
|
|
740
|
+
focusDecorations.clear();
|
|
741
|
+
resetCaches();
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
updateHighlightDecorations(currentHighlights.quotes || []);
|
|
745
|
+
if (currentHighlights.focusQuote && currentHighlights.focusNonce !== lastHandledFocusNonce) {
|
|
746
|
+
lastHandledFocusNonce = currentHighlights.focusNonce;
|
|
747
|
+
revealNextOccurrence(currentHighlights.focusQuote);
|
|
748
|
+
} else if (!currentHighlights.focusQuote) {
|
|
749
|
+
focusDecorations.clear();
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
const onDidChange = editor.onDidChangeModelContent(() => {
|
|
753
|
+
if (!currentHighlights) return;
|
|
754
|
+
highlightRangesByQuote = /* @__PURE__ */ new Map();
|
|
755
|
+
focusDecorations.clear();
|
|
756
|
+
updateHighlightDecorations(currentHighlights.quotes || []);
|
|
757
|
+
});
|
|
758
|
+
return {
|
|
759
|
+
setHighlights: applyHighlights,
|
|
760
|
+
dispose: () => {
|
|
761
|
+
try {
|
|
762
|
+
onDidChange.dispose();
|
|
763
|
+
highlightDecorations.clear();
|
|
764
|
+
focusDecorations.clear();
|
|
765
|
+
} finally {
|
|
766
|
+
currentHighlights = null;
|
|
767
|
+
resetCaches();
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
543
772
|
function _layout($$renderer, $$props) {
|
|
544
773
|
$$renderer.component(($$renderer2) => {
|
|
545
774
|
let { params, children } = $$props;
|
|
@@ -567,6 +796,7 @@ function _layout($$renderer, $$props) {
|
|
|
567
796
|
steps: [],
|
|
568
797
|
currentStep: null,
|
|
569
798
|
promptDrafts: {},
|
|
799
|
+
promptEdits: {},
|
|
570
800
|
context: null,
|
|
571
801
|
promptContext: null,
|
|
572
802
|
agentStates: [],
|
|
@@ -588,15 +818,211 @@ function _layout($$renderer, $$props) {
|
|
|
588
818
|
wsClient.sendMessage({ channel: "app-events", event });
|
|
589
819
|
}
|
|
590
820
|
const activeStepName = derived(() => workspace.currentStep?.name ?? null);
|
|
821
|
+
const promptEditKey = (agentId, stepName) => `${agentId}\0${stepName}`;
|
|
822
|
+
const activePromptEdit = derived(() => {
|
|
823
|
+
const stepName = activeStepName();
|
|
824
|
+
if (!stepName) return null;
|
|
825
|
+
return workspace.promptEdits[promptEditKey(workspace.agentId, stepName)] ?? null;
|
|
826
|
+
});
|
|
591
827
|
const activePromptDraft = derived(() => {
|
|
592
828
|
const stepName = activeStepName();
|
|
593
829
|
if (!stepName) return "";
|
|
594
830
|
const draft = workspace.promptDrafts[stepName];
|
|
595
831
|
return typeof draft === "string" ? draft : "";
|
|
596
832
|
});
|
|
597
|
-
|
|
833
|
+
const activeRuntimePrompt = derived(() => activePromptEdit()?.suggestedPrompt ?? activePromptDraft());
|
|
834
|
+
function getPromptOverrides(agentId = workspace.agentId) {
|
|
835
|
+
const overrides = {};
|
|
836
|
+
for (const proposal of Object.values(workspace.promptEdits)) {
|
|
837
|
+
if (proposal.agentId === agentId) overrides[proposal.step] = proposal.suggestedPrompt;
|
|
838
|
+
}
|
|
839
|
+
return overrides;
|
|
840
|
+
}
|
|
841
|
+
function syncRuntimePromptOverrides() {
|
|
842
|
+
if (!workspace.wsLoaded) return;
|
|
843
|
+
sendAppEvent({
|
|
844
|
+
type: "prompt-overrides-updated",
|
|
845
|
+
prompts: getPromptOverrides()
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
function activePromptEditFor(agentId, stepName) {
|
|
849
|
+
if (!stepName) return null;
|
|
850
|
+
return workspace.promptEdits[promptEditKey(agentId, stepName)] ?? null;
|
|
851
|
+
}
|
|
852
|
+
let promptSaveTimer = null;
|
|
853
|
+
let pendingPromptSave = null;
|
|
854
|
+
let promptSaveQueue = Promise.resolve();
|
|
855
|
+
const PROMPT_SAVE_DEBOUNCE_MS = 800;
|
|
856
|
+
function clearPromptSaveTimer() {
|
|
857
|
+
if (!promptSaveTimer) return;
|
|
858
|
+
clearTimeout(promptSaveTimer);
|
|
859
|
+
promptSaveTimer = null;
|
|
860
|
+
}
|
|
861
|
+
async function persistPromptSave(agentId, stepName, prompt) {
|
|
862
|
+
try {
|
|
863
|
+
await trpc.agents.savePrompt.mutate({ agentId, step: stepName, prompt });
|
|
864
|
+
} catch (error) {
|
|
865
|
+
console.error("Failed to save prompt", error);
|
|
866
|
+
const currentDraft = workspace.promptDrafts[stepName];
|
|
867
|
+
if (workspace.agentId === agentId && currentDraft === prompt) {
|
|
868
|
+
pendingPromptSave = { stepName, prompt };
|
|
869
|
+
}
|
|
870
|
+
throw error;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
function queuePromptSave(agentId, stepName, prompt) {
|
|
874
|
+
const op = promptSaveQueue.catch(() => {
|
|
875
|
+
}).then(() => persistPromptSave(agentId, stepName, prompt));
|
|
876
|
+
promptSaveQueue = op.catch(() => {
|
|
877
|
+
});
|
|
878
|
+
return op;
|
|
879
|
+
}
|
|
598
880
|
async function flushPromptSave() {
|
|
599
|
-
return;
|
|
881
|
+
if (!pendingPromptSave) return;
|
|
882
|
+
const agentId = workspace.agentId.trim();
|
|
883
|
+
if (!agentId) return;
|
|
884
|
+
const { stepName, prompt } = pendingPromptSave;
|
|
885
|
+
clearPromptSaveTimer();
|
|
886
|
+
pendingPromptSave = null;
|
|
887
|
+
await queuePromptSave(agentId, stepName, prompt);
|
|
888
|
+
}
|
|
889
|
+
function schedulePromptSave(stepName, prompt) {
|
|
890
|
+
pendingPromptSave = { stepName, prompt };
|
|
891
|
+
clearPromptSaveTimer();
|
|
892
|
+
promptSaveTimer = setTimeout(
|
|
893
|
+
() => {
|
|
894
|
+
promptSaveTimer = null;
|
|
895
|
+
void flushPromptSave();
|
|
896
|
+
},
|
|
897
|
+
PROMPT_SAVE_DEBOUNCE_MS
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
function handlePromptChanged(newPrompt) {
|
|
901
|
+
const stepName = activeStepName();
|
|
902
|
+
if (!stepName) return;
|
|
903
|
+
workspace.promptDrafts[stepName] = newPrompt;
|
|
904
|
+
schedulePromptSave(stepName, newPrompt);
|
|
905
|
+
}
|
|
906
|
+
let aiEditModalOpen = false;
|
|
907
|
+
let aiEditRequest = "";
|
|
908
|
+
let aiEditGenerating = false;
|
|
909
|
+
let aiEditProgress = null;
|
|
910
|
+
function formatAiEditStatus(summary) {
|
|
911
|
+
const plainText = (summary || "").replace(/[*_`]/g, "").replace(/(^|\s)#{1,6}\s+/g, " ").replace(/\s+/g, " ").trim();
|
|
912
|
+
return plainText || "Thinking...";
|
|
913
|
+
}
|
|
914
|
+
const aiEditStatus = derived(() => formatAiEditStatus(aiEditProgress?.summary));
|
|
915
|
+
let aiEditError = null;
|
|
916
|
+
let aiEditResolutionError = null;
|
|
917
|
+
let aiEditResolving = false;
|
|
918
|
+
let noChangesModalOpen = false;
|
|
919
|
+
let aiEditRequestId = 0;
|
|
920
|
+
function openAiEditModal() {
|
|
921
|
+
if (!workspace.currentStep || activePromptEdit()) return;
|
|
922
|
+
aiEditRequest = "";
|
|
923
|
+
aiEditError = null;
|
|
924
|
+
noChangesModalOpen = false;
|
|
925
|
+
aiEditModalOpen = true;
|
|
926
|
+
}
|
|
927
|
+
function closeAiEditModal() {
|
|
928
|
+
aiEditRequestId += 1;
|
|
929
|
+
aiEditGenerating = false;
|
|
930
|
+
aiEditModalOpen = false;
|
|
931
|
+
noChangesModalOpen = false;
|
|
932
|
+
}
|
|
933
|
+
async function pollAiEditProgress(progressId, requestId) {
|
|
934
|
+
while (requestId === aiEditRequestId && aiEditGenerating) {
|
|
935
|
+
try {
|
|
936
|
+
const progress = await trpc.agents.promptEditProgress.query({ id: progressId });
|
|
937
|
+
if (requestId !== aiEditRequestId || !aiEditGenerating) return;
|
|
938
|
+
if (progress) {
|
|
939
|
+
aiEditProgress = {
|
|
940
|
+
phase: progress.phase,
|
|
941
|
+
activity: progress.activity,
|
|
942
|
+
summary: progress.summary
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
} catch (error) {
|
|
946
|
+
if (requestId === aiEditRequestId) {
|
|
947
|
+
console.warn("Failed to read prompt edit progress", error);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
async function requestAiEdit() {
|
|
954
|
+
const request = aiEditRequest.trim();
|
|
955
|
+
const stepName = activeStepName();
|
|
956
|
+
const agentId = workspace.agentId.trim();
|
|
957
|
+
if (!request || !stepName || !agentId || aiEditGenerating) return;
|
|
958
|
+
const requestId = ++aiEditRequestId;
|
|
959
|
+
const progressId = crypto.randomUUID();
|
|
960
|
+
aiEditGenerating = true;
|
|
961
|
+
aiEditProgress = null;
|
|
962
|
+
aiEditError = null;
|
|
963
|
+
void pollAiEditProgress(progressId, requestId);
|
|
964
|
+
try {
|
|
965
|
+
await flushPromptSave();
|
|
966
|
+
const result = await trpc.agents.suggestPromptEdit.mutate({ agentId, step: stepName, request, progressId });
|
|
967
|
+
if (requestId !== aiEditRequestId) return;
|
|
968
|
+
if (result.status === "unchanged") {
|
|
969
|
+
noChangesModalOpen = true;
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
const proposal = result.proposal;
|
|
973
|
+
workspace.promptEdits[promptEditKey(proposal.agentId, proposal.step)] = proposal;
|
|
974
|
+
setQueryParam("promptEdit", proposal.id);
|
|
975
|
+
aiEditModalOpen = false;
|
|
976
|
+
previewEnabled = false;
|
|
977
|
+
syncRuntimePromptOverrides();
|
|
978
|
+
} catch (error) {
|
|
979
|
+
if (requestId !== aiEditRequestId) return;
|
|
980
|
+
console.error("Failed to suggest prompt edits", error);
|
|
981
|
+
aiEditError = error instanceof Error ? error.message : "Failed to suggest edits";
|
|
982
|
+
} finally {
|
|
983
|
+
if (requestId === aiEditRequestId) {
|
|
984
|
+
aiEditGenerating = false;
|
|
985
|
+
aiEditProgress = null;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
function removePromptEditFromWorkspace(proposalId) {
|
|
990
|
+
for (const [key, proposal] of Object.entries(workspace.promptEdits)) {
|
|
991
|
+
if (proposal.id === proposalId) delete workspace.promptEdits[key];
|
|
992
|
+
}
|
|
993
|
+
if (page.url.searchParams.get("promptEdit") === proposalId) setQueryParam("promptEdit", null);
|
|
994
|
+
}
|
|
995
|
+
function rejectAiEdit() {
|
|
996
|
+
const proposal = activePromptEdit();
|
|
997
|
+
if (!proposal || aiEditResolving) return;
|
|
998
|
+
closeModePopover();
|
|
999
|
+
aiEditResolutionError = null;
|
|
1000
|
+
removePromptEditFromWorkspace(proposal.id);
|
|
1001
|
+
syncRuntimePromptOverrides();
|
|
1002
|
+
void trpc.agents.rejectPromptEdit.mutate({ id: proposal.id }).catch((error) => {
|
|
1003
|
+
console.error("Failed to release rejected prompt edit", error);
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
async function acceptAiEdit() {
|
|
1007
|
+
const proposal = activePromptEdit();
|
|
1008
|
+
if (!proposal || aiEditResolving) return;
|
|
1009
|
+
closeModePopover();
|
|
1010
|
+
aiEditResolving = true;
|
|
1011
|
+
aiEditResolutionError = null;
|
|
1012
|
+
try {
|
|
1013
|
+
const result = await trpc.agents.acceptPromptEdit.mutate({ id: proposal.id });
|
|
1014
|
+
workspace.promptDrafts[proposal.step] = result.prompt;
|
|
1015
|
+
workspace.steps = workspace.steps.map((step) => step.name === proposal.step ? { ...step, prompt: result.prompt } : step);
|
|
1016
|
+
workspace.currentStep = workspace.steps.find((step) => step.name === activeStepName()) ?? workspace.currentStep;
|
|
1017
|
+
await tick();
|
|
1018
|
+
removePromptEditFromWorkspace(proposal.id);
|
|
1019
|
+
syncRuntimePromptOverrides();
|
|
1020
|
+
} catch (error) {
|
|
1021
|
+
console.error("Failed to accept prompt edit", error);
|
|
1022
|
+
aiEditResolutionError = error instanceof Error ? error.message : "Failed to save prompt";
|
|
1023
|
+
} finally {
|
|
1024
|
+
aiEditResolving = false;
|
|
1025
|
+
}
|
|
600
1026
|
}
|
|
601
1027
|
const schemaValue = derived(() => workspace.currentStep?.schema ?? null);
|
|
602
1028
|
const hasSchema = derived(() => !!schemaValue() && schemaValue().trim().length > 0);
|
|
@@ -646,6 +1072,7 @@ function _layout($$renderer, $$props) {
|
|
|
646
1072
|
const qs = new URLSearchParams();
|
|
647
1073
|
if (stepName) qs.set("step", stepName);
|
|
648
1074
|
if (region) qs.set("region", region);
|
|
1075
|
+
if (activePromptEdit()) qs.set("promptEdit", activePromptEdit().id);
|
|
649
1076
|
qs.size ? `${base}?${qs.toString()}` : base;
|
|
650
1077
|
goto();
|
|
651
1078
|
}
|
|
@@ -704,8 +1131,38 @@ function _layout($$renderer, $$props) {
|
|
|
704
1131
|
function focusOnQuote(quote) {
|
|
705
1132
|
workspace.edit = focusQuote(workspace.edit, quote);
|
|
706
1133
|
}
|
|
707
|
-
let
|
|
1134
|
+
let basePromptHighlighter = null;
|
|
1135
|
+
let inspectionPromptHighlighter = null;
|
|
708
1136
|
let previewEnabled = false;
|
|
1137
|
+
function renderPromptPreview(prompt) {
|
|
1138
|
+
try {
|
|
1139
|
+
nunjucks.configure({ autoescape: false, trimBlocks: true, lstripBlocks: true });
|
|
1140
|
+
return nunjucks.renderString(prompt, workspace.promptContext ?? workspace.context ?? {});
|
|
1141
|
+
} catch (error) {
|
|
1142
|
+
console.error("Failed to render prompt preview", error);
|
|
1143
|
+
return prompt;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
const pendingDiffOriginal = derived(() => {
|
|
1147
|
+
const proposal = activePromptEdit();
|
|
1148
|
+
if (!proposal) return "";
|
|
1149
|
+
return previewEnabled ? renderPromptPreview(proposal.originalPrompt) : proposal.originalPrompt;
|
|
1150
|
+
});
|
|
1151
|
+
const pendingDiffModified = derived(() => {
|
|
1152
|
+
const proposal = activePromptEdit();
|
|
1153
|
+
if (!proposal) return "";
|
|
1154
|
+
return previewEnabled ? renderPromptPreview(proposal.suggestedPrompt) : proposal.suggestedPrompt;
|
|
1155
|
+
});
|
|
1156
|
+
function handleBasePromptEditorReady(editor, monaco) {
|
|
1157
|
+
basePromptHighlighter?.dispose();
|
|
1158
|
+
basePromptHighlighter = createPromptHighlighter(editor, monaco);
|
|
1159
|
+
basePromptHighlighter.setHighlights(workspace.edit.highlights);
|
|
1160
|
+
}
|
|
1161
|
+
function handleInspectionPromptEditorReady(editor, monaco) {
|
|
1162
|
+
inspectionPromptHighlighter?.dispose();
|
|
1163
|
+
inspectionPromptHighlighter = createPromptHighlighter(editor, monaco);
|
|
1164
|
+
inspectionPromptHighlighter.setHighlights(workspace.edit.highlights);
|
|
1165
|
+
}
|
|
709
1166
|
function clamp(n, min, max) {
|
|
710
1167
|
return Math.max(min, Math.min(max, n));
|
|
711
1168
|
}
|
|
@@ -730,7 +1187,7 @@ function _layout($$renderer, $$props) {
|
|
|
730
1187
|
const res = await trpc.tests.findPromptIssues.mutate({
|
|
731
1188
|
agent: workspace.agentId,
|
|
732
1189
|
step: workspace.currentStep.name,
|
|
733
|
-
prompt:
|
|
1190
|
+
prompt: activeRuntimePrompt()
|
|
734
1191
|
});
|
|
735
1192
|
const quoteCounts = buildQuoteCountsFromIssues(res.issues || []);
|
|
736
1193
|
if (workspace.edit.popover?.requestId !== requestId) return;
|
|
@@ -772,6 +1229,8 @@ function _layout($$renderer, $$props) {
|
|
|
772
1229
|
const qs = new URLSearchParams();
|
|
773
1230
|
if (stepName) qs.set("step", stepName);
|
|
774
1231
|
if (region) qs.set("region", region);
|
|
1232
|
+
const targetProposal = activePromptEditFor(agentId, stepName);
|
|
1233
|
+
if (targetProposal) qs.set("promptEdit", targetProposal.id);
|
|
775
1234
|
qs.size ? `${base}?${qs.toString()}` : base;
|
|
776
1235
|
goto();
|
|
777
1236
|
}
|
|
@@ -799,9 +1258,12 @@ function _layout($$renderer, $$props) {
|
|
|
799
1258
|
console.warn("[roleplay] Ignoring chat message while websocket session is reconnecting");
|
|
800
1259
|
return;
|
|
801
1260
|
}
|
|
1261
|
+
syncRuntimePromptOverrides();
|
|
802
1262
|
wsClient.sendMessage({ channel: "chat", message });
|
|
803
1263
|
},
|
|
804
1264
|
flushPromptSave,
|
|
1265
|
+
getPromptOverrides: () => getPromptOverrides(),
|
|
1266
|
+
getActivePromptEditId: () => activePromptEdit()?.id ?? null,
|
|
805
1267
|
selectState: (stateId) => {
|
|
806
1268
|
void flushPromptSave();
|
|
807
1269
|
closeAllPopovers();
|
|
@@ -812,7 +1274,8 @@ function _layout($$renderer, $$props) {
|
|
|
812
1274
|
type: "select-agent",
|
|
813
1275
|
agent: workspace.agentId,
|
|
814
1276
|
state: stateId,
|
|
815
|
-
region: workspace.region
|
|
1277
|
+
region: workspace.region,
|
|
1278
|
+
promptOverrides: getPromptOverrides()
|
|
816
1279
|
});
|
|
817
1280
|
},
|
|
818
1281
|
hangup() {
|
|
@@ -826,8 +1289,11 @@ function _layout($$renderer, $$props) {
|
|
|
826
1289
|
});
|
|
827
1290
|
onDestroy(() => {
|
|
828
1291
|
void flushPromptSave();
|
|
829
|
-
|
|
830
|
-
|
|
1292
|
+
clearPromptSaveTimer();
|
|
1293
|
+
basePromptHighlighter?.dispose();
|
|
1294
|
+
basePromptHighlighter = null;
|
|
1295
|
+
inspectionPromptHighlighter?.dispose();
|
|
1296
|
+
inspectionPromptHighlighter = null;
|
|
831
1297
|
});
|
|
832
1298
|
let $$settled = true;
|
|
833
1299
|
let $$inner_renderer;
|
|
@@ -958,7 +1424,7 @@ function _layout($$renderer, $$props) {
|
|
|
958
1424
|
$$renderer4.push(`<!--]--></div>`);
|
|
959
1425
|
}
|
|
960
1426
|
});
|
|
961
|
-
$$renderer3.push(`<!----> <div class="flex h-full min-w-0 flex-col"><div class="flex h-14 flex-none items-center justify-between gap-3 border-b border-rc-gray-700 p-2"><div class="min-w-0"><div class="truncate font-semibold text-rc-gray-100">${escape_html(workspace.currentStep?.name ?? "Prompt")}</div></div> <div class="flex items-center gap-3"><label class="inline-flex items-center gap-2 text-rc-gray-300"><input type="checkbox"${attr("checked", previewEnabled, true)}${attr("disabled", !workspace.currentStep, true)} aria-label="Preview rendered prompt" class="h-4 w-4 appearance-none rounded border border-rc-gray-300 bg-rc-gray-600 !accent-rc-gray-600 outline-none ring-0 checked:border-rc-gray-200 checked:bg-rc-gray-600 hover:border-rc-gray-200 hover:bg-rc-gray-600 focus:outline-none focus:ring-0 active:border-rc-gray-200 active:bg-rc-gray-600 disabled:cursor-not-allowed disabled:opacity-50"/> <span>Preview</span></label> `);
|
|
1427
|
+
$$renderer3.push(`<!----> <div class="flex h-full min-w-0 flex-col"><div class="flex h-14 flex-none items-center justify-between gap-3 border-b border-rc-gray-700 p-2"><div class="min-w-0"><div class="truncate font-semibold text-rc-gray-100">${escape_html(workspace.currentStep?.name ?? "Prompt")}</div></div> <div class="flex items-center gap-3"><label class="inline-flex items-center gap-2 text-rc-gray-300"><input type="checkbox"${attr("checked", previewEnabled, true)}${attr("disabled", !workspace.currentStep || !!activePromptEdit() && !!workspace.edit.popover, true)} aria-label="Preview rendered prompt" class="h-4 w-4 appearance-none rounded border border-rc-gray-300 bg-rc-gray-600 !accent-rc-gray-600 outline-none ring-0 checked:border-rc-gray-200 checked:bg-rc-gray-600 hover:border-rc-gray-200 hover:bg-rc-gray-600 focus:outline-none focus:ring-0 active:border-rc-gray-200 active:bg-rc-gray-600 disabled:cursor-not-allowed disabled:opacity-50"/> <span>Preview</span></label> `);
|
|
962
1428
|
Button($$renderer3, {
|
|
963
1429
|
variant: "secondary",
|
|
964
1430
|
disabled: !workspace.currentStep || findIssuesRunning,
|
|
@@ -968,23 +1434,110 @@ function _layout($$renderer, $$props) {
|
|
|
968
1434
|
},
|
|
969
1435
|
$$slots: { default: true }
|
|
970
1436
|
});
|
|
1437
|
+
$$renderer3.push(`<!----> `);
|
|
1438
|
+
Button($$renderer3, {
|
|
1439
|
+
variant: "secondary",
|
|
1440
|
+
disabled: !workspace.currentStep || !!activePromptEdit() || aiEditGenerating,
|
|
1441
|
+
onclick: openAiEditModal,
|
|
1442
|
+
children: ($$renderer4) => {
|
|
1443
|
+
$$renderer4.push(`<!---->Edit with AI`);
|
|
1444
|
+
},
|
|
1445
|
+
$$slots: { default: true }
|
|
1446
|
+
});
|
|
971
1447
|
$$renderer3.push(`<!----></div></div> <div class="min-h-0 flex-1">`);
|
|
972
1448
|
if (workspace.currentStep) {
|
|
973
1449
|
$$renderer3.push("<!--[0-->");
|
|
974
|
-
$$renderer3.push(
|
|
1450
|
+
$$renderer3.push(`<div class="relative h-full min-w-0"><!---->`);
|
|
975
1451
|
{
|
|
976
1452
|
PromptEditor($$renderer3, {
|
|
977
1453
|
class: "h-full min-w-0 border-thin border-rc-gray-650 bg-rc-gray-800 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0",
|
|
978
1454
|
initialPrompt: activePromptDraft(),
|
|
979
1455
|
agentId: workspace.agentId,
|
|
980
1456
|
stepName: workspace.currentStep.name,
|
|
981
|
-
|
|
1457
|
+
onPromptChanged: handlePromptChanged,
|
|
1458
|
+
showSchemaButton: hasSchema() && !activePromptEdit(),
|
|
982
1459
|
onSchemaClick: openSchemaModal,
|
|
1460
|
+
readOnly: !!activePromptEdit(),
|
|
1461
|
+
readOnlyMessage: activePromptEdit() ? "Accept or reject the AI suggestion before editing." : "",
|
|
983
1462
|
showPreviewToggle: false,
|
|
984
|
-
preview: previewEnabled
|
|
1463
|
+
preview: activePromptEdit() ? false : previewEnabled,
|
|
1464
|
+
onEditorReady: handleBasePromptEditorReady
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
$$renderer3.push(`<!----> `);
|
|
1468
|
+
if (activePromptEdit()) {
|
|
1469
|
+
$$renderer3.push("<!--[0-->");
|
|
1470
|
+
$$renderer3.push(`<div class="absolute inset-0 z-10 min-w-0">`);
|
|
1471
|
+
if (workspace.edit.popover) {
|
|
1472
|
+
$$renderer3.push("<!--[0-->");
|
|
1473
|
+
PromptEditor($$renderer3, {
|
|
1474
|
+
class: "h-full min-w-0 border-thin border-rc-gray-650 bg-rc-gray-800 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0",
|
|
1475
|
+
initialPrompt: activePromptEdit().suggestedPrompt,
|
|
1476
|
+
agentId: workspace.agentId,
|
|
1477
|
+
stepName: workspace.currentStep.name,
|
|
1478
|
+
onPromptChanged: () => {
|
|
1479
|
+
},
|
|
1480
|
+
showSchemaButton: false,
|
|
1481
|
+
readOnly: true,
|
|
1482
|
+
readOnlyMessage: "Accept or reject the AI suggestion before editing.",
|
|
1483
|
+
bottomPadding: 56,
|
|
1484
|
+
showPreviewToggle: false,
|
|
1485
|
+
onEditorReady: handleInspectionPromptEditorReady
|
|
1486
|
+
});
|
|
1487
|
+
} else {
|
|
1488
|
+
$$renderer3.push("<!--[-1-->");
|
|
1489
|
+
ReadOnlyMonacoDiff($$renderer3, {
|
|
1490
|
+
class: "h-full min-w-0 !rounded-none",
|
|
1491
|
+
original: pendingDiffOriginal(),
|
|
1492
|
+
modified: pendingDiffModified()
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
$$renderer3.push(`<!--]--> <div class="absolute bottom-2 left-3 z-20 flex items-center gap-2">`);
|
|
1496
|
+
Button($$renderer3, {
|
|
1497
|
+
variant: "secondary",
|
|
1498
|
+
disabled: aiEditResolving,
|
|
1499
|
+
onclick: rejectAiEdit,
|
|
1500
|
+
children: ($$renderer4) => {
|
|
1501
|
+
$$renderer4.push(`<!---->✕ Reject`);
|
|
1502
|
+
},
|
|
1503
|
+
$$slots: { default: true }
|
|
1504
|
+
});
|
|
1505
|
+
$$renderer3.push(`<!----> `);
|
|
1506
|
+
Button($$renderer3, {
|
|
1507
|
+
disabled: aiEditResolving,
|
|
1508
|
+
onclick: acceptAiEdit,
|
|
1509
|
+
children: ($$renderer4) => {
|
|
1510
|
+
$$renderer4.push(`<!---->✓ Accept`);
|
|
1511
|
+
},
|
|
1512
|
+
$$slots: { default: true }
|
|
985
1513
|
});
|
|
1514
|
+
$$renderer3.push(`<!----> `);
|
|
1515
|
+
if (aiEditResolutionError) {
|
|
1516
|
+
$$renderer3.push("<!--[0-->");
|
|
1517
|
+
$$renderer3.push(`<span class="max-w-64 text-sm text-red-300">${escape_html(aiEditResolutionError)}</span>`);
|
|
1518
|
+
} else {
|
|
1519
|
+
$$renderer3.push("<!--[-1-->");
|
|
1520
|
+
}
|
|
1521
|
+
$$renderer3.push(`<!--]--></div> `);
|
|
1522
|
+
if (hasSchema()) {
|
|
1523
|
+
$$renderer3.push("<!--[0-->");
|
|
1524
|
+
Button($$renderer3, {
|
|
1525
|
+
variant: "secondary",
|
|
1526
|
+
onclick: openSchemaModal,
|
|
1527
|
+
class: "absolute bottom-2 right-6 z-20 !font-medium",
|
|
1528
|
+
children: ($$renderer4) => {
|
|
1529
|
+
$$renderer4.push(`<!---->Schema`);
|
|
1530
|
+
},
|
|
1531
|
+
$$slots: { default: true }
|
|
1532
|
+
});
|
|
1533
|
+
} else {
|
|
1534
|
+
$$renderer3.push("<!--[-1-->");
|
|
1535
|
+
}
|
|
1536
|
+
$$renderer3.push(`<!--]--></div>`);
|
|
1537
|
+
} else {
|
|
1538
|
+
$$renderer3.push("<!--[-1-->");
|
|
986
1539
|
}
|
|
987
|
-
$$renderer3.push(
|
|
1540
|
+
$$renderer3.push(`<!--]--></div>`);
|
|
988
1541
|
} else {
|
|
989
1542
|
$$renderer3.push("<!--[-1-->");
|
|
990
1543
|
Panel($$renderer3, {
|
|
@@ -1071,6 +1624,103 @@ function _layout($$renderer, $$props) {
|
|
|
1071
1624
|
}
|
|
1072
1625
|
});
|
|
1073
1626
|
$$renderer3.push(`<!----></div></div></div></div> `);
|
|
1627
|
+
{
|
|
1628
|
+
let children2 = function($$renderer4) {
|
|
1629
|
+
$$renderer4.push(`<div class="flex flex-col gap-2"><label for="ai-edit-request" class="font-semibold text-rc-gray-100">What do you want to change?</label> `);
|
|
1630
|
+
Textarea($$renderer4, {
|
|
1631
|
+
id: "ai-edit-request",
|
|
1632
|
+
rows: 6,
|
|
1633
|
+
disabled: aiEditGenerating,
|
|
1634
|
+
placeholder: "I want the agent to ask the user's name during the greeting",
|
|
1635
|
+
class: "rc-scroll disabled:cursor-wait disabled:opacity-70",
|
|
1636
|
+
get value() {
|
|
1637
|
+
return aiEditRequest;
|
|
1638
|
+
},
|
|
1639
|
+
set value($$value) {
|
|
1640
|
+
aiEditRequest = $$value;
|
|
1641
|
+
$$settled = false;
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
$$renderer4.push(`<!----> `);
|
|
1645
|
+
if (aiEditError) {
|
|
1646
|
+
$$renderer4.push("<!--[0-->");
|
|
1647
|
+
$$renderer4.push(`<div class="text-sm text-red-300">${escape_html(aiEditError)}</div>`);
|
|
1648
|
+
} else {
|
|
1649
|
+
$$renderer4.push("<!--[-1-->");
|
|
1650
|
+
}
|
|
1651
|
+
$$renderer4.push(`<!--]--></div>`);
|
|
1652
|
+
}, footer = function($$renderer4) {
|
|
1653
|
+
Button($$renderer4, {
|
|
1654
|
+
variant: "outlined",
|
|
1655
|
+
size: "small",
|
|
1656
|
+
onclick: closeAiEditModal,
|
|
1657
|
+
children: ($$renderer5) => {
|
|
1658
|
+
$$renderer5.push(`<!---->Cancel`);
|
|
1659
|
+
},
|
|
1660
|
+
$$slots: { default: true }
|
|
1661
|
+
});
|
|
1662
|
+
$$renderer4.push(`<!----> `);
|
|
1663
|
+
Button($$renderer4, {
|
|
1664
|
+
size: "small",
|
|
1665
|
+
disabled: !aiEditRequest.trim() || aiEditGenerating,
|
|
1666
|
+
onclick: requestAiEdit,
|
|
1667
|
+
children: ($$renderer5) => {
|
|
1668
|
+
$$renderer5.push(`<!---->${escape_html(aiEditGenerating ? "Suggesting edits…" : "Suggest edits")}`);
|
|
1669
|
+
},
|
|
1670
|
+
$$slots: { default: true }
|
|
1671
|
+
});
|
|
1672
|
+
$$renderer4.push(`<!---->`);
|
|
1673
|
+
}, underlay = function($$renderer4) {
|
|
1674
|
+
$$renderer4.push(`<div class="min-w-0 truncate whitespace-nowrap text-base text-rc-gray-300"${attr("title", aiEditStatus())}>${escape_html(aiEditStatus())}</div>`);
|
|
1675
|
+
};
|
|
1676
|
+
Modal($$renderer3, {
|
|
1677
|
+
title: "Edit with AI",
|
|
1678
|
+
class: "!max-w-xl",
|
|
1679
|
+
underlayOpen: aiEditGenerating,
|
|
1680
|
+
get open() {
|
|
1681
|
+
return aiEditModalOpen;
|
|
1682
|
+
},
|
|
1683
|
+
set open($$value) {
|
|
1684
|
+
aiEditModalOpen = $$value;
|
|
1685
|
+
$$settled = false;
|
|
1686
|
+
},
|
|
1687
|
+
children: children2,
|
|
1688
|
+
footer,
|
|
1689
|
+
underlay,
|
|
1690
|
+
$$slots: { default: true, footer: true, underlay: true }
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
$$renderer3.push(`<!----> `);
|
|
1694
|
+
{
|
|
1695
|
+
let children2 = function($$renderer4) {
|
|
1696
|
+
$$renderer4.push(`<p class="text-rc-gray-200">Try changing your request and suggest edits again.</p>`);
|
|
1697
|
+
}, footer = function($$renderer4) {
|
|
1698
|
+
Button($$renderer4, {
|
|
1699
|
+
size: "small",
|
|
1700
|
+
onclick: () => noChangesModalOpen = false,
|
|
1701
|
+
children: ($$renderer5) => {
|
|
1702
|
+
$$renderer5.push(`<!---->Close`);
|
|
1703
|
+
},
|
|
1704
|
+
$$slots: { default: true }
|
|
1705
|
+
});
|
|
1706
|
+
};
|
|
1707
|
+
Modal($$renderer3, {
|
|
1708
|
+
title: "No changes were suggested",
|
|
1709
|
+
class: "!z-[60] !max-w-md",
|
|
1710
|
+
overlayClass: "!z-[60]",
|
|
1711
|
+
get open() {
|
|
1712
|
+
return noChangesModalOpen;
|
|
1713
|
+
},
|
|
1714
|
+
set open($$value) {
|
|
1715
|
+
noChangesModalOpen = $$value;
|
|
1716
|
+
$$settled = false;
|
|
1717
|
+
},
|
|
1718
|
+
children: children2,
|
|
1719
|
+
footer,
|
|
1720
|
+
$$slots: { default: true, footer: true }
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
$$renderer3.push(`<!----> `);
|
|
1074
1724
|
if (schemaValue()) {
|
|
1075
1725
|
$$renderer3.push("<!--[0-->");
|
|
1076
1726
|
{
|
|
@@ -1140,4 +1790,4 @@ function _layout($$renderer, $$props) {
|
|
|
1140
1790
|
}
|
|
1141
1791
|
|
|
1142
1792
|
export { _layout as default };
|
|
1143
|
-
//# sourceMappingURL=_layout.svelte-
|
|
1793
|
+
//# sourceMappingURL=_layout.svelte-B88WMyk0.js.map
|