@kilocode/cli-darwin-x64-baseline 7.4.8 → 7.4.11

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.
@@ -11,13 +11,13 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU
11
11
  <path d="M12 2H2V18H18V8M6 11.3818V14H8.61818L18 4.61818L15.3818 2L6 11.3818Z" stroke="currentColor"/>`,"pencil-line":'<path d="M9.58301 17.9166H17.9163M17.9163 5.83325L14.1663 2.08325L2.08301 14.1666V17.9166H5.83301L17.9163 5.83325Z" stroke="currentColor" stroke-linecap="square"/>',mcp:'<g><path d="M0.972656 9.37176L9.5214 1.60019C10.7018 0.527151 12.6155 0.527151 13.7957 1.60019C14.9761 2.67321 14.9761 4.41295 13.7957 5.48599L7.3397 11.3552" stroke="currentColor" stroke-linecap="round"/><path d="M7.42871 11.2747L13.7957 5.48643C14.9761 4.41338 16.8898 4.41338 18.0702 5.48643L18.1147 5.52688C19.2951 6.59993 19.2951 8.33966 18.1147 9.4127L10.3831 16.4414C9.98966 16.7991 9.98966 17.379 10.3831 17.7366L11.9707 19.1799" stroke="currentColor" stroke-linecap="round"/><path d="M11.6587 3.54346L5.33619 9.29119C4.15584 10.3642 4.15584 12.1039 5.33619 13.177C6.51649 14.25 8.43019 14.25 9.61054 13.177L15.9331 7.42923" stroke="currentColor" stroke-linecap="round"/></g>',glasses:'<path d="M0.416626 7.91667H1.66663M19.5833 7.91667H18.3333M11.866 7.57987C11.3165 7.26398 10.6793 7.08333 9.99996 7.08333C9.32061 7.08333 8.68344 7.26398 8.13389 7.57987M8.74996 10C8.74996 12.0711 7.07103 13.75 4.99996 13.75C2.92889 13.75 1.24996 12.0711 1.24996 10C1.24996 7.92893 2.92889 6.25 4.99996 6.25C7.07103 6.25 8.74996 7.92893 8.74996 10ZM18.75 10C18.75 12.0711 17.071 13.75 15 13.75C12.9289 13.75 11.25 12.0711 11.25 10C11.25 7.92893 12.9289 6.25 15 6.25C17.071 6.25 18.75 7.92893 18.75 10Z" stroke="currentColor" stroke-linecap="square"/>',"magnifying-glass-menu":'<path d="M2.08325 10.0002H4.58325M2.08325 5.41683H5.41659M2.08325 14.5835H5.41659M16.4583 13.9585L18.7499 16.2502M17.9166 10.0002C17.9166 12.9917 15.4915 15.4168 12.4999 15.4168C9.50838 15.4168 7.08325 12.9917 7.08325 10.0002C7.08325 7.00862 9.50838 4.5835 12.4999 4.5835C15.4915 4.5835 17.9166 7.00862 17.9166 10.0002Z" stroke="currentColor" stroke-linecap="square"/>',"window-cursor":'<path d="M17.9166 10.4167V3.75H2.08325V17.0833H10.4166M17.9166 13.5897L11.6666 11.6667L13.5897 17.9167L15.032 15.0321L17.9166 13.5897Z" stroke="currentColor" stroke-width="1.07143" stroke-linecap="square"/><path d="M5.00024 6.125C5.29925 6.12518 5.54126 6.36795 5.54126 6.66699C5.54108 6.96589 5.29914 7.20783 5.00024 7.20801C4.7012 7.20801 4.45843 6.966 4.45825 6.66699C4.45825 6.36784 4.70109 6.125 5.00024 6.125ZM7.91626 6.125C8.21541 6.125 8.45825 6.36784 8.45825 6.66699C8.45808 6.966 8.21531 7.20801 7.91626 7.20801C7.61736 7.20783 7.37542 6.96589 7.37524 6.66699C7.37524 6.36795 7.61726 6.12518 7.91626 6.125ZM10.8333 6.125C11.1324 6.125 11.3752 6.36784 11.3752 6.66699C11.3751 6.966 11.1323 7.20801 10.8333 7.20801C10.5342 7.20801 10.2914 6.966 10.2913 6.66699C10.2913 6.36784 10.5341 6.125 10.8333 6.125Z" fill="currentColor" stroke="currentColor" stroke-width="0.25" stroke-linecap="square"/>',task:'<path d="M9.99992 2.0835V17.9168M7.08325 3.75016H2.08325V16.2502H7.08325M12.9166 16.2502H17.9166V3.75016H12.9166" stroke="currentColor" stroke-linecap="square"/>',play:'<path d="M6 4L16 10L6 16V4Z" fill="currentColor"/>',stop:'<rect x="5" y="5" width="10" height="10" fill="currentColor"/>',status:'<path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>',"status-active":`<path d="M18 2H2V10H18V2Z" fill="currentColor" fill-opacity="0.1"/>
12
12
  <path d="M2 18H18V10H2V18Z" fill="currentColor" fill-opacity="0.1"/>
13
13
  <path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,sidebar:'<path d="M7.86667 2H5.2H2V18H5.2H7.86667M7.86667 2H18V18H7.86667M7.86667 2V18" stroke="currentColor"/>',"sidebar-active":`<path d="M2 2V18H5.2H7.86667V2H5.2H2Z" fill="currentColor" fill-opacity="0.1"/>
14
- <path d="M7.86667 2H5.2H2V18H5.2H7.86667M7.86667 2H18V18H7.86667M7.86667 2V18" stroke="currentColor"/>`,"layout-left":'<path d="M2.91675 2.91699L2.91675 2.41699L2.41675 2.41699L2.41675 2.91699L2.91675 2.91699ZM17.0834 2.91699L17.5834 2.91699L17.5834 2.41699L17.0834 2.41699L17.0834 2.91699ZM17.0834 17.0837L17.0834 17.5837L17.5834 17.5837L17.5834 17.0837L17.0834 17.0837ZM2.91675 17.0837L2.41675 17.0837L2.41675 17.5837L2.91675 17.5837L2.91675 17.0837ZM7.41674 17.0837L7.41674 17.5837L8.41674 17.5837L8.41674 17.0837L7.91674 17.0837L7.41674 17.0837ZM8.41674 2.91699L8.41674 2.41699L7.41674 2.41699L7.41674 2.91699L7.91674 2.91699L8.41674 2.91699ZM2.91675 2.91699L2.91675 3.41699L17.0834 3.41699L17.0834 2.91699L17.0834 2.41699L2.91675 2.41699L2.91675 2.91699ZM17.0834 2.91699L16.5834 2.91699L16.5834 17.0837L17.0834 17.0837L17.5834 17.0837L17.5834 2.91699L17.0834 2.91699ZM17.0834 17.0837L17.0834 16.5837L2.91675 16.5837L2.91675 17.0837L2.91675 17.5837L17.0834 17.5837L17.0834 17.0837ZM2.91675 17.0837L3.41675 17.0837L3.41675 2.91699L2.91675 2.91699L2.41675 2.91699L2.41675 17.0837L2.91675 17.0837ZM7.91674 17.0837L8.41674 17.0837L8.41674 2.91699L7.91674 2.91699L7.41674 2.91699L7.41674 17.0837L7.91674 17.0837Z" fill="currentColor"/>',"layout-left-partial":'<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>',"layout-left-full":'<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>',"layout-right":'<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>',"layout-right-partial":'<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />',"layout-right-full":'<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />',"square-arrow-top-right":'<path d="M7.91675 2.9165H2.91675V17.0832H17.0834V12.0832M12.0834 2.9165H17.0834V7.9165M9.58342 10.4165L16.6667 3.33317" stroke="currentColor" stroke-linecap="square"/>',"open-file":'<path d="M7.91602 2.91406H2.91602V17.0807H17.0827V12.0807M12.0827 2.91406H17.0827V7.91406M9.58268 10.4141L16.666 3.33073" stroke="currentColor" stroke-linecap="square"/>',"go-to-file":'<path d="M12.5 2.917H7.5V17.083H16.667V7.083L12.5 2.917ZM12.5 2.917V7.083H16.667M5 14.167V7.917M2.917 10L5 7.917L7.083 10" stroke="currentColor" stroke-linecap="square"/>',"speech-bubble":'<path d="M18.3334 10.0003C18.3334 5.57324 15.0927 2.91699 10.0001 2.91699C4.90749 2.91699 1.66675 5.57324 1.66675 10.0003C1.66675 11.1497 2.45578 13.1016 2.5771 13.3949C2.5878 13.4207 2.59839 13.4444 2.60802 13.4706C2.69194 13.6996 3.04282 14.9364 1.66675 16.7684C3.5186 17.6538 5.48526 16.1982 5.48526 16.1982C6.84592 16.9202 8.46491 17.0837 10.0001 17.0837C15.0927 17.0837 18.3334 14.4274 18.3334 10.0003Z" stroke="currentColor" stroke-linecap="square"/>',comment:'<path d="M16.25 3.75H3.75V16.25L6.875 14.4643H16.25V3.75Z" stroke="currentColor" stroke-linecap="square"/>',"folder-add-left":'<path d="M2.08333 9.58268V2.91602H8.33333L10 5.41602H17.9167V16.2493H8.75M3.75 12.0827V14.5827M3.75 14.5827V17.0827M3.75 14.5827H1.25M3.75 14.5827H6.25" stroke="currentColor" stroke-linecap="square"/>',github:'<path d="M10.0001 1.62549C14.6042 1.62549 18.3334 5.35465 18.3334 9.95882C18.333 11.7049 17.785 13.4068 16.7666 14.8251C15.7482 16.2434 14.3107 17.3066 12.6563 17.8651C12.2397 17.9484 12.0834 17.688 12.0834 17.4692C12.0834 17.188 12.0938 16.2922 12.0938 15.1776C12.0938 14.3963 11.8334 13.8963 11.5313 13.6359C13.3855 13.4276 15.3334 12.7192 15.3334 9.52132C15.3334 8.60465 15.0105 7.86507 14.4792 7.28174C14.5626 7.0734 14.8542 6.21924 14.3959 5.0734C14.3959 5.0734 13.698 4.84424 12.1042 5.92757C11.4376 5.74007 10.7292 5.64632 10.0209 5.64632C9.31258 5.64632 8.60425 5.74007 7.93758 5.92757C6.34383 4.85465 5.64592 5.0734 5.64592 5.0734C5.18758 6.21924 5.47925 7.0734 5.56258 7.28174C5.03133 7.86507 4.70842 8.61507 4.70842 9.52132C4.70842 12.7088 6.64592 13.4276 8.50008 13.6359C8.2605 13.8442 8.04175 14.2088 7.96883 14.7505C7.48967 14.9692 6.29175 15.3234 5.54175 14.063C5.3855 13.813 4.91675 13.1984 4.2605 13.2088C3.56258 13.2192 3.97925 13.6047 4.27092 13.7609C4.62508 13.9588 5.03133 14.6984 5.12508 14.938C5.29175 15.4067 5.83342 16.3026 7.92717 15.9172C7.92717 16.6151 7.93758 17.2713 7.93758 17.4692C7.93758 17.688 7.78133 17.938 7.36467 17.8651C5.70491 17.3126 4.26126 16.2515 3.23851 14.8324C2.21576 13.4133 1.66583 11.7081 1.66675 9.95882C1.66675 5.35465 5.39592 1.62549 10.0001 1.62549Z" fill="currentColor"/>',discord:'<path d="M16.0742 4.45014C14.9244 3.92097 13.7106 3.54556 12.4638 3.3335C12.2932 3.64011 12.1388 3.95557 12.0013 4.27856C10.6732 4.07738 9.32261 4.07738 7.99451 4.27856C7.85694 3.9556 7.70257 3.64014 7.53203 3.3335C6.28441 3.54735 5.06981 3.92365 3.91889 4.45291C1.63401 7.85128 1.01462 11.1652 1.32431 14.4322C2.6624 15.426 4.16009 16.1819 5.7523 16.6668C6.11082 16.1821 6.42806 15.6678 6.70066 15.1295C6.18289 14.9351 5.68315 14.6953 5.20723 14.4128C5.33249 14.3215 5.45499 14.2274 5.57336 14.136C6.95819 14.7907 8.46965 15.1302 9.99997 15.1302C11.5303 15.1302 13.0418 14.7907 14.4266 14.136C14.5463 14.2343 14.6688 14.3284 14.7927 14.4128C14.3159 14.6957 13.8152 14.9361 13.2965 15.1309C13.5688 15.669 13.8861 16.1828 14.2449 16.6668C15.8385 16.1838 17.3373 15.4283 18.6756 14.4335C19.039 10.645 18.0549 7.36145 16.0742 4.45014ZM7.09294 12.423C6.22992 12.423 5.51693 11.6357 5.51693 10.6671C5.51693 9.69852 6.20514 8.90427 7.09019 8.90427C7.97524 8.90427 8.68272 9.69852 8.66758 10.6671C8.65244 11.6357 7.97248 12.423 7.09294 12.423ZM12.907 12.423C12.0426 12.423 11.3324 11.6357 11.3324 10.6671C11.3324 9.69852 12.0206 8.90427 12.907 8.90427C13.7934 8.90427 14.4954 9.69852 14.4803 10.6671C14.4651 11.6357 13.7865 12.423 12.907 12.423Z" fill="currentColor"/>',"layout-bottom":'<path d="M2.91699 17.0832L2.41699 17.0832L2.41699 17.5832L2.91699 17.5832L2.91699 17.0832ZM2.91699 2.91653L2.91699 2.41653L2.41699 2.41653L2.41699 2.91653L2.91699 2.91653ZM17.0837 2.91653L17.5837 2.91653L17.5837 2.41653L17.0837 2.41653L17.0837 2.91653ZM17.0837 17.0832L17.5837 17.0832L17.5837 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.5827L17.5837 12.5827L17.5837 11.5827L17.0837 11.5827L17.0837 12.0827L17.0837 12.5827ZM2.91699 11.5827L2.41699 11.5827L2.41699 12.5827L2.91699 12.5827L2.91699 12.0827L2.91699 11.5827ZM2.91699 17.0832L3.41699 17.0832L3.41699 2.91653L2.91699 2.91653L2.41699 2.91653L2.41699 17.0832L2.91699 17.0832ZM2.91699 2.91653L2.91699 3.41653L17.0837 3.41653L17.0837 2.91653L17.0837 2.41653L2.91699 2.41653L2.91699 2.91653ZM17.0837 2.91653L16.5837 2.91653L16.5837 17.0832L17.0837 17.0832L17.5837 17.0832L17.5837 2.91653L17.0837 2.91653ZM17.0837 17.0832L17.0837 16.5832L2.91699 16.5832L2.91699 17.0832L2.91699 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.0827L17.0837 11.5827L2.91699 11.5827L2.91699 12.0827L2.91699 12.5827L17.0837 12.5827L17.0837 12.0827Z" fill="currentColor"/>',"layout-bottom-partial":'<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>',"layout-bottom-full":'<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>',"dot-grid":'<path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" fill="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" fill="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" fill="currentColor"/><path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" stroke="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" stroke="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" stroke="currentColor"/>',"circle-check":'<path d="M12.4987 7.91732L8.7487 12.5007L7.08203 10.834M17.9154 10.0007C17.9154 14.3729 14.371 17.9173 9.9987 17.9173C5.62644 17.9173 2.08203 14.3729 2.08203 10.0007C2.08203 5.6284 5.62644 2.08398 9.9987 2.08398C14.371 2.08398 17.9154 5.6284 17.9154 10.0007Z" stroke="currentColor" stroke-linecap="square"/>',copy:'<path d="M6.2513 6.24935V2.91602H17.0846V13.7493H13.7513M13.7513 6.24935V17.0827H2.91797V6.24935H13.7513Z" stroke="currentColor" stroke-linecap="round"/>',check:'<path d="M5 11.9657L8.37838 14.7529L15 5.83398" stroke="currentColor" stroke-linecap="square"/>',photo:'<path d="M16.6665 16.6666L11.6665 11.6666L9.99984 13.3333L6.6665 9.99996L3.08317 13.5833M2.9165 2.91663H17.0832V17.0833H2.9165V2.91663ZM13.3332 7.49996C13.3332 8.30537 12.6803 8.95829 11.8748 8.95829C11.0694 8.95829 10.4165 8.30537 10.4165 7.49996C10.4165 6.69454 11.0694 6.04163 11.8748 6.04163C12.6803 6.04163 13.3332 6.69454 13.3332 7.49996Z" stroke="currentColor" stroke-linecap="square"/>',share:'<path d="M10.0013 12.0846L10.0013 3.33464M13.7513 6.66797L10.0013 2.91797L6.2513 6.66797M17.0846 10.418V17.0846H2.91797V10.418" stroke="currentColor" stroke-linecap="square"/>',shield:'<path d="M7.49935 9.3737L9.16602 11.0404L12.4994 7.70703M9.99935 2.08203L17.0827 4.3737V9.92565C17.0827 14.0694 13.3327 16.2487 9.99935 18.047C6.66602 16.2487 2.91602 14.0694 2.91602 9.92565V4.3737L9.99935 2.08203Z" stroke="currentColor" stroke-linecap="square"/>',lock:'<path d="M5.833 8.33366V6.25033C5.833 3.71903 7.96805 1.66699 10.4993 1.66699C13.0307 1.66699 15.166 3.71903 15.166 6.25033V8.33366M4.16634 8.33366H16.833C17.7535 8.33366 18.4997 9.07985 18.4997 10.0003V16.667C18.4997 17.5875 17.7535 18.3337 16.833 18.3337H4.16634C3.24586 18.3337 2.49967 17.5875 2.49967 16.667V10.0003C2.49967 9.07985 3.24586 8.33366 4.16634 8.33366Z" stroke="currentColor" stroke-linecap="square"/>',download:'<path d="M13.9583 10.6257L10 14.584L6.04167 10.6257M10 2.08398V13.959M16.25 17.9173H3.75" stroke="currentColor" stroke-linecap="square"/>',menu:'<path d="M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5" stroke="currentColor" stroke-linecap="square"/>',server:'<rect x="3.35547" y="1.92969" width="13.2857" height="16.1429" stroke="currentColor"/><rect x="3.35547" y="11.9297" width="13.2857" height="6.14286" stroke="currentColor"/><rect x="12.8555" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/><rect x="10" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/>',branch:'<path d="M14.2036 7.19987L14.2079 6.69989L13.2079 6.69132L13.2036 7.1913L13.7036 7.19559L14.2036 7.19987ZM8.14804 5.09032H7.64804C7.64804 5.75797 7.06861 6.34471 6.29619 6.34471V6.84471V7.34471C7.56926 7.34471 8.64804 6.36051 8.64804 5.09032H8.14804ZM6.29619 6.84471V6.34471C5.52376 6.34471 4.94434 5.75797 4.94434 5.09032H4.44434H3.94434C3.94434 6.36051 5.02311 7.34471 6.29619 7.34471V6.84471ZM4.44434 5.09032H4.94434C4.94434 4.42267 5.52376 3.83594 6.29619 3.83594V3.33594V2.83594C5.02311 2.83594 3.94434 3.82013 3.94434 5.09032H4.44434ZM6.29619 3.33594V3.83594C7.06861 3.83594 7.64804 4.42267 7.64804 5.09032H8.14804H8.64804C8.64804 3.82013 7.56926 2.83594 6.29619 2.83594V3.33594ZM8.14804 14.9149H7.64804C7.64804 15.5825 7.06861 16.1693 6.29619 16.1693V16.6693V17.1693C7.56926 17.1693 8.64804 16.1851 8.64804 14.9149H8.14804ZM6.29619 16.6693V16.1693C5.52376 16.1693 4.94434 15.5825 4.94434 14.9149H4.44434H3.94434C3.94434 16.1851 5.02311 17.1693 6.29619 17.1693V16.6693ZM4.44434 14.9149H4.94434C4.94434 14.2472 5.52376 13.6605 6.29619 13.6605V13.1605V12.6605C5.02311 12.6605 3.94434 13.6447 3.94434 14.9149H4.44434ZM6.29619 13.1605V13.6605C7.06861 13.6605 7.64804 14.2472 7.64804 14.9149H8.14804H8.64804C8.64804 13.6447 7.56926 12.6605 6.29619 12.6605V13.1605ZM15.5554 5.09032H15.0554C15.0554 5.75797 14.476 6.34471 13.7036 6.34471V6.84471V7.34471C14.9767 7.34471 16.0554 6.36051 16.0554 5.09032H15.5554ZM13.7036 6.84471V6.34471C12.9312 6.34471 12.3517 5.75797 12.3517 5.09032H11.8517H11.3517C11.3517 6.36051 12.4305 7.34471 13.7036 7.34471V6.84471ZM11.8517 5.09032H12.3517C12.3517 4.42267 12.9312 3.83594 13.7036 3.83594V3.33594V2.83594C12.4305 2.83594 11.3517 3.82013 11.3517 5.09032H11.8517ZM13.7036 3.33594V3.83594C14.476 3.83594 15.0554 4.42267 15.0554 5.09032H15.5554H16.0554C16.0554 3.82013 14.9767 2.83594 13.7036 2.83594V3.33594ZM13.7036 7.19559L13.2036 7.1913L13.1544 12.9277L13.6544 12.932L14.1544 12.9363L14.2036 7.19987L13.7036 7.19559ZM6.29619 6.84471H5.79619V13.1605H6.29619H6.79619V6.84471H6.29619ZM11.6545 14.9149V14.4149H8.14804V14.9149V15.4149H11.6545V14.9149ZM13.6544 12.932L13.1544 12.9277C13.1474 13.7511 12.4779 14.4149 11.6545 14.4149V14.9149V15.4149C13.0269 15.4149 14.1426 14.3086 14.1544 12.9363L13.6544 12.932Z" fill="currentColor"/>',edit:'<path d="M17.0832 17.0807V17.5807H17.5832V17.0807H17.0832ZM2.9165 17.0807H2.4165V17.5807H2.9165V17.0807ZM2.9165 2.91406V2.41406H2.4165V2.91406H2.9165ZM9.58317 3.41406H10.0832V2.41406H9.58317V2.91406V3.41406ZM17.5832 10.4141V9.91406H16.5832V10.4141H17.0832H17.5832ZM6.24984 11.2474L5.89628 10.8938L5.74984 11.0403V11.2474H6.24984ZM6.24984 13.7474H5.74984V14.2474H6.24984V13.7474ZM8.74984 13.7474V14.2474H8.95694L9.10339 14.101L8.74984 13.7474ZM15.2082 2.28906L15.5617 1.93551L15.2082 1.58196L14.8546 1.93551L15.2082 2.28906ZM17.7082 4.78906L18.0617 5.14262L18.4153 4.78906L18.0617 4.43551L17.7082 4.78906ZM17.0832 17.0807V16.5807H2.9165V17.0807V17.5807H17.0832V17.0807ZM2.9165 17.0807H3.4165V2.91406H2.9165H2.4165V17.0807H2.9165ZM2.9165 2.91406V3.41406H9.58317V2.91406V2.41406H2.9165V2.91406ZM17.0832 10.4141H16.5832V17.0807H17.0832H17.5832V10.4141H17.0832ZM6.24984 11.2474H5.74984V13.7474H6.24984H6.74984V11.2474H6.24984ZM6.24984 13.7474V14.2474H8.74984V13.7474V13.2474H6.24984V13.7474ZM6.24984 11.2474L6.60339 11.6009L15.5617 2.64262L15.2082 2.28906L14.8546 1.93551L5.89628 10.8938L6.24984 11.2474ZM15.2082 2.28906L14.8546 2.64262L17.3546 5.14262L17.7082 4.78906L18.0617 4.43551L15.5617 1.93551L15.2082 2.28906ZM17.7082 4.78906L17.3546 4.43551L8.39628 13.3938L8.74984 13.7474L9.10339 14.101L18.0617 5.14262L17.7082 4.78906Z" fill="currentColor"/>',history:'<path d="M10 3.33301C6.31811 3.33301 3.33337 6.31775 3.33337 9.99967C3.33337 13.6816 6.31811 16.6663 10 16.6663C13.682 16.6663 16.6667 13.6816 16.6667 9.99967H15.4167C15.4167 12.9912 12.9915 15.4163 10 15.4163C7.00851 15.4163 4.58337 12.9912 4.58337 9.99967C4.58337 7.00818 7.00851 4.58301 10 4.58301C11.6454 4.58301 13.1219 5.29453 14.1525 6.42634L12.0834 6.42634V7.67634H16.0417V3.74967H14.7917V5.52741C13.5128 4.15283 11.8556 3.33301 10 3.33301ZM10.625 7.08301H9.37504V10.2588L11.8413 12.7251L12.7252 11.8412L10.625 9.74106V7.08301Z" fill="currentColor"/>',help:'<path d="M7.91683 7.91927V6.2526H12.0835V8.7526L10.0002 10.0026V12.0859M10.0002 13.7526V13.7609M17.9168 10.0026C17.9168 14.3749 14.3724 17.9193 10.0002 17.9193C5.62791 17.9193 2.0835 14.3749 2.0835 10.0026C2.0835 5.63035 5.62791 2.08594 10.0002 2.08594C14.3724 2.08594 17.9168 5.63035 17.9168 10.0026Z" stroke="currentColor" stroke-linecap="square"/>',"settings-gear":'<path d="M7.62516 4.46094L5.05225 3.86719L3.86475 5.05469L4.4585 7.6276L2.0835 9.21094V10.7943L4.4585 12.3776L3.86475 14.9505L5.05225 16.138L7.62516 15.5443L9.2085 17.9193H10.7918L12.3752 15.5443L14.9481 16.138L16.1356 14.9505L15.5418 12.3776L17.9168 10.7943V9.21094L15.5418 7.6276L16.1356 5.05469L14.9481 3.86719L12.3752 4.46094L10.7918 2.08594H9.2085L7.62516 4.46094Z" stroke="currentColor"/><path d="M12.5002 10.0026C12.5002 11.3833 11.3809 12.5026 10.0002 12.5026C8.61945 12.5026 7.50016 11.3833 7.50016 10.0026C7.50016 8.62189 8.61945 7.5026 10.0002 7.5026C11.3809 7.5026 12.5002 8.62189 12.5002 10.0026Z" stroke="currentColor"/>',dash:'<rect x="5" y="9.5" width="10" height="1" fill="currentColor"/>',"cloud-upload":'<path d="M12.0833 16.25H15C17.0711 16.25 18.75 14.5711 18.75 12.5C18.75 10.5649 17.2843 8.97217 15.4025 8.77133C15.2 6.13103 12.8586 4.08333 10 4.08333C7.71532 4.08333 5.76101 5.49781 4.96501 7.49881C2.84892 7.90461 1.25 9.76559 1.25 11.6667C1.25 13.9813 3.30203 16.25 5.83333 16.25H7.91667M10 16.25V10.4167M12.0833 11.875L10 9.79167L7.91667 11.875" stroke="currentColor" stroke-linecap="square"/>',trash:'<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>',sliders:'<path d="M3.625 6.25H10.9375M16.375 13.75H10.5625M3.625 13.75H4.9375M11.125 6.25C11.125 4.79969 12.2997 3.625 13.75 3.625C15.2003 3.625 16.375 4.79969 16.375 6.25C16.375 7.70031 15.2003 8.875 13.75 8.875C12.2997 8.875 11.125 7.70031 11.125 6.25ZM10.375 13.75C10.375 15.2003 9.20031 16.375 7.75 16.375C6.29969 16.375 5.125 15.2003 5.125 13.75C5.125 12.2997 6.29969 11.125 7.75 11.125C9.20031 11.125 10.375 12.2997 10.375 13.75Z" stroke="currentColor" stroke-linecap="square"/>',keyboard:'<path d="M5.125 7.375V4.375H14.875V2.875M8.3125 13.9375H11.6875M8.125 13.9375H11.875M2.125 7.375H17.875V17.125H2.125V7.375ZM5.5 10.375H5.125V10.75H5.5V10.375ZM8.5 10.375H8.125V10.75H8.5V10.375ZM11.875 10.375H11.5V10.75H11.875V10.375ZM14.875 10.375H14.5V10.75H14.875V10.375ZM14.875 13.75H14.5V14.125H14.875V13.75ZM5.5 13.75H5.125V14.125H5.5V13.75Z" stroke="currentColor" stroke-linecap="square"/>',selector:'<path d="M6.66626 12.5033L9.99959 15.8366L13.3329 12.5033M6.66626 7.50326L9.99959 4.16992L13.3329 7.50326" stroke="currentColor" stroke-linecap="square"/>',"arrow-down-to-line":'<path d="M15.2083 11.6667L10 16.875L4.79167 11.6667M10 16.25V3.125" stroke="currentColor" stroke-width="1.25" stroke-linecap="square"/>',star:'<path d="M10 2.5l2.35 4.76 5.25.77-3.8 3.7.9 5.24L10 14.64l-4.7 2.47.9-5.24-3.8-3.7 5.25-.77L10 2.5z" stroke="currentColor" stroke-linejoin="round"/>',"star-filled":'<path d="M10 2.5l2.35 4.76 5.25.77-3.8 3.7.9 5.24L10 14.64l-4.7 2.47.9-5.24-3.8-3.7 5.25-.77L10 2.5z" fill="currentColor" stroke="currentColor" stroke-linejoin="round"/>',warning:'<path d="M10 7.91667V11.6667M10 13.7417V13.75M10 2.5L1.875 16.25H18.125L10 2.5Z" stroke="currentColor" stroke-linecap="square"/>',reset:'<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>',link:'<path d="M2.08334 12.0833L1.72979 11.7298L1.37624 12.0833L1.72979 12.4369L2.08334 12.0833ZM7.91668 17.9167L7.56312 18.2702L7.91668 18.6238L8.27023 18.2702L7.91668 17.9167ZM17.9167 7.91666L18.2702 8.27022L18.6238 7.91666L18.2702 7.56311L17.9167 7.91666ZM12.0833 2.08333L12.4369 1.72977L12.0833 1.37622L11.7298 1.72977L12.0833 2.08333ZM8.39646 5.06311L8.0429 5.41666L8.75001 6.12377L9.10356 5.77021L8.75001 5.41666L8.39646 5.06311ZM5.77023 9.10355L6.12378 8.74999L5.41668 8.04289L5.06312 8.39644L5.41668 8.74999L5.77023 9.10355ZM14.2298 10.8964L13.8762 11.25L14.5833 11.9571L14.9369 11.6035L14.5833 11.25L14.2298 10.8964ZM11.6036 14.9369L11.9571 14.5833L11.25 13.8762L10.8965 14.2298L11.25 14.5833L11.6036 14.9369ZM7.14646 12.1464L6.7929 12.5L7.50001 13.2071L7.85356 12.8535L7.50001 12.5L7.14646 12.1464ZM12.8536 7.85355L13.2071 7.49999L12.5 6.79289L12.1465 7.14644L12.5 7.49999L12.8536 7.85355ZM2.08334 12.0833L1.72979 12.4369L7.56312 18.2702L7.91668 17.9167L8.27023 17.5631L2.4369 11.7298L2.08334 12.0833ZM17.9167 7.91666L18.2702 7.56311L12.4369 1.72977L12.0833 2.08333L11.7298 2.43688L17.5631 8.27022L17.9167 7.91666ZM12.0833 2.08333L11.7298 1.72977L8.39646 5.06311L8.75001 5.41666L9.10356 5.77021L12.4369 2.43688L12.0833 2.08333ZM5.41668 8.74999L5.06312 8.39644L1.72979 11.7298L2.08334 12.0833L2.4369 12.4369L5.77023 9.10355L5.41668 8.74999ZM14.5833 11.25L14.9369 11.6035L18.2702 8.27022L17.9167 7.91666L17.5631 7.56311L14.2298 10.8964L14.5833 11.25ZM7.91668 17.9167L8.27023 18.2702L11.6036 14.9369L11.25 14.5833L10.8965 14.2298L7.56312 17.5631L7.91668 17.9167ZM7.50001 12.5L7.85356 12.8535L12.8536 7.85355L12.5 7.49999L12.1465 7.14644L7.14646 12.1464L7.50001 12.5Z" fill="currentColor"/>',providers:'<path d="M10.0001 4.37562V2.875M13 4.37793V2.87793M7.00014 4.37793V2.875M10 17.1279V15.6279M13 17.1279V15.6279M7 17.1279V15.6279M15.625 13.0029H17.125M15.625 7.00293H17.125M15.625 10.0029H17.125M2.875 10.0029H4.375M2.875 13.0029H4.375M2.875 7.00293H4.375M4.375 4.37793H15.625V15.6279H4.375V4.37793ZM12.6241 10.0022C12.6241 11.4519 11.4488 12.6272 9.99908 12.6272C8.54934 12.6272 7.37408 11.4519 7.37408 10.0022C7.37408 8.55245 8.54934 7.3772 9.99908 7.3772C11.4488 7.3772 12.6241 8.55245 12.6241 10.0022Z" stroke="currentColor" stroke-linecap="square"/>',layers:'<path d="M10 2.5L2.5 6.25L10 10L17.5 6.25L10 2.5Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2.5 13.75L10 17.5L17.5 13.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2.5 10L10 13.75L17.5 10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',models:'<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C12.2917 10 10 12.2917 10 17.5C10 12.2917 7.70833 10 2.5 10C7.70833 10 10 7.70833 10 2.5C10 7.70833 12.2917 10 17.5 10Z" stroke="currentColor"/>',discard:'<path d="M7.5 5L4.167 8.333L7.5 11.667M4.583 8.333h6.667a4.167 4.167 0 0 1 4.167 4.167" stroke="currentColor" stroke-linecap="square"/>',"arrow-undo-down":'<path d="M4.08333 11.0859L1.75 8.7526L4.08333 6.41927M2.33333 8.7526L12.5417 8.7526L12.5417 3.21094L7 3.21094" stroke="currentColor" stroke-width="1" stroke-linecap="square"/>'},NQ="opencode-icon-sprite",Yu=e=>`opencode-icon-${e}`;let Ll=!1;function Pu(e){return e==="magnifying-glass"||e==="arrow-undo-down"?"0 0 16 16":"0 0 20 20"}function jD(){if(Ll||typeof document>"u")return;if(document.getElementById(NQ)){Ll=!0;return}const e=document.body;if(!e)return;const A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.id=NQ,A.setAttribute("aria-hidden","true"),A.setAttribute("width","0"),A.setAttribute("height","0"),A.style.position="absolute",A.style.overflow="hidden",A.style.display="none",A.innerHTML=Object.entries(VD).map(([t,n])=>{const i=t;return`<symbol id="${Yu(i)}" viewBox="${Pu(i)}">${n}</symbol>`}).join(""),e.insertBefore(A,e.firstChild),Ll=!0}function ki(e){const[A,t]=uA(e,["name","size","class","classList"]);return _1(jD),(()=>{var n=PD(),i=n.firstChild,r=i.firstChild;return f1(i,gA({get classList(){return{...A.classList,[A.class??""]:!!A.class}},get viewBox(){return Pu(A.name)}},t),!0,!0),P(o=>{var s=A.size||"normal",a=`#${Yu(A.name)}`;return s!==o.e&&z(n,"data-size",o.e=s),a!==o.t&&z(r,"href",o.t=a),o},{e:void 0,t:void 0}),n})()}var $D=v("<div data-component=icon><svg data-slot=icon-svg fill=none aria-hidden=true>");const Fl={"book-open-check":{viewBox:"0 0 24 24",path:'<path d="M12 21V7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="m16 12 2 2 4-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'},"circuit-board":{viewBox:"0 0 16 16",path:'<path d="M12.5 1H3.5C2.121 1 1 2.121 1 3.5V12.5C1 13.879 2.121 15 3.5 15H12.5C13.879 15 15 13.879 15 12.5V3.5C15 2.121 13.879 1 12.5 1ZM6 6.5C6 6.775 5.775 7 5.5 7C5.225 7 5 6.775 5 6.5C5 6.225 5.225 6 5.5 6C5.775 6 6 6.225 6 6.5ZM12.5 14H6V11.5C6 11.225 6.225 11 6.5 11H9.092C9.299 11.581 9.849 12 10.5 12C11.327 12 12 11.327 12 10.5C12 9.673 11.327 9 10.5 9C9.849 9 9.299 9.419 9.092 10H6.5C5.673 10 5 10.673 5 11.5V14H3.5C2.673 14 2 13.327 2 12.5V3.5C2 2.673 2.673 2 3.5 2H5V5.092C4.419 5.299 4 5.849 4 6.5C4 7.327 4.673 8 5.5 8C6.327 8 7 7.327 7 6.5C7 5.849 6.581 5.299 6 5.092V2H12.5C13.327 2 14 2.673 14 3.5V6H10.908C10.701 5.419 10.151 5 9.5 5C8.673 5 8 5.673 8 6.5C8 7.327 8.673 8 9.5 8C10.151 8 10.701 7.581 10.908 7H14V12.5C14 13.327 13.327 14 12.5 14ZM10 10.5C10 10.225 10.225 10 10.5 10C10.775 10 11 10.225 11 10.5C11 10.775 10.775 11 10.5 11C10.225 11 10 10.775 10 10.5ZM10 6.5C10 6.775 9.775 7 9.5 7C9.225 7 9 6.775 9 6.5C9 6.225 9.225 6 9.5 6C9.775 6 10 6.225 10 6.5Z" fill="currentColor"/>'},globe:{viewBox:"0 0 20 20",path:'<circle cx="10" cy="10" r="7" stroke="currentColor" stroke-width="2"/><path d="M3.25 10H16.75M10 3C12 4.875 13 7.2 13 10C13 12.8 12 15.125 10 17M10 3C8 4.875 7 7.2 7 10C7 12.8 8 15.125 10 17" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'},organization:{viewBox:"0 0 16 16",path:'<path d="M6.00195 4.00002C6.00195 2.89655 6.89649 2.00201 7.99995 2.00201C9.10342 2.00201 9.99796 2.89655 9.99796 4.00002C9.99796 5.10348 9.10342 5.99802 7.99995 5.99802C6.89649 5.99802 6.00195 5.10348 6.00195 4.00002ZM7.99995 3.00201C7.44877 3.00201 7.00195 3.44883 7.00195 4.00002C7.00195 4.5512 7.44877 4.99802 7.99995 4.99802C8.55114 4.99802 8.99796 4.5512 8.99796 4.00002C8.99796 3.44883 8.55114 3.00201 7.99995 3.00201ZM11 4.5C11 3.67157 11.6716 3 12.5 3C13.3284 3 14 3.67157 14 4.5C14 5.32843 13.3284 6 12.5 6C11.6716 6 11 5.32843 11 4.5ZM12.5 4C12.2239 4 12 4.22386 12 4.5C12 4.77614 12.2239 5 12.5 5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4ZM3.5 3C2.67157 3 2 3.67157 2 4.5C2 5.32843 2.67157 6 3.5 6C4.32843 6 5 5.32843 5 4.5C5 3.67157 4.32843 3 3.5 3ZM3 4.5C3 4.22386 3.22386 4 3.5 4C3.77614 4 4 4.22386 4 4.5C4 4.77614 3.77614 5 3.5 5C3.22386 5 3 4.77614 3 4.5ZM4.26756 6.99969C4.09739 7.29387 4 7.63541 4 7.99969L2 7.99969V10.5C2 11.3285 2.67157 12 3.5 12C3.71194 12 3.91361 11.9561 4.09639 11.8768C4.1705 12.2082 4.28572 12.524 4.43643 12.8187C4.14721 12.9356 3.83112 13 3.5 13C2.11929 13 1 11.8807 1 10.5V7.99969C1 7.44741 1.44772 6.99969 2 6.99969H4.26756ZM11.5636 12.8187C11.8528 12.9356 12.1689 13 12.5 13C13.8807 13 15 11.8807 15 10.5V7.99969C15 7.44741 14.5523 6.99969 14 6.99969H11.7324C11.9026 7.29387 12 7.63541 12 7.9997L14 7.99969V10.5C14 11.3285 13.3284 12 12.5 12C12.2881 12 12.0864 11.9561 11.9036 11.8768C11.8295 12.2082 11.7143 12.524 11.5636 12.8187ZM6 6.99969C5.44772 6.99969 5 7.44741 5 7.99969V11C5 12.6569 6.34315 14 8 14C9.65685 14 11 12.6569 11 11V7.99969C11 7.44741 10.5523 6.99969 10 6.99969H6ZM6 7.99969L10 7.99969V11C10 12.1046 9.10457 13 8 13C6.89543 13 6 12.1046 6 11V7.99969Z" fill="currentColor"/>'},"thumbs-up":{viewBox:"0 0 20 20",path:'<path d="M1 8.25a1.25 1.25 0 1 1 2.5 0v7.5a1.25 1.25 0 1 1-2.5 0v-7.5ZM11 3V1.7c0-.268.14-.526.395-.607A2 2 0 0 1 14 3c0 .995-.182 1.948-.514 2.826-.204.54.166 1.174.744 1.174h2.52c1.243 0 2.261 1.01 2.146 2.247a23.864 23.864 0 0 1-1.341 5.974C17.153 16.323 16.072 17 14.9 17h-3.192a3 3 0 0 1-1.341-.317l-2.734-1.366A3 3 0 0 0 6.292 15H5V8h.963c.685 0 1.258-.483 1.612-1.068a4.011 4.011 0 0 1 2.166-1.73c.432-.143.853-.386 1.011-.814.16-.432.248-.9.248-1.388Z" stroke="currentColor" fill="none" stroke-linejoin="round"/>'},"thumbs-down":{viewBox:"0 0 20 20",path:'<path d="M18.905 12.75a1.25 1.25 0 0 1-2.5 0v-7.5a1.25 1.25 0 0 1 2.5 0v7.5ZM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 0 1 5.905 17c0-.995.182-1.948.514-2.826.204-.54-.166-1.174-.744-1.174h-2.52c-1.243 0-2.261-1.01-2.146-2.247a23.864 23.864 0 0 1 1.341-5.974C2.547 3.677 3.628 3 4.8 3h3.192a3 3 0 0 1 1.341.317l2.734 1.366A3 3 0 0 0 13.408 5H15v7h-.963c-.685 0-1.258.483-1.612 1.068a4.011 4.011 0 0 1-2.166 1.73c-.432.143-.853.386-1.011.814-.16.432-.248.9-.248 1.388Z" stroke="currentColor" fill="none" stroke-linejoin="round"/>'},"thumbs-up-filled":{viewBox:"0 0 20 20",path:'<path d="M1 8.25a1.25 1.25 0 1 1 2.5 0v7.5a1.25 1.25 0 1 1-2.5 0v-7.5ZM11 3V1.7c0-.268.14-.526.395-.607A2 2 0 0 1 14 3c0 .995-.182 1.948-.514 2.826-.204.54.166 1.174.744 1.174h2.52c1.243 0 2.261 1.01 2.146 2.247a23.864 23.864 0 0 1-1.341 5.974C17.153 16.323 16.072 17 14.9 17h-3.192a3 3 0 0 1-1.341-.317l-2.734-1.366A3 3 0 0 0 6.292 15H5V8h.963c.685 0 1.258-.483 1.612-1.068a4.011 4.011 0 0 1 2.166-1.73c.432-.143.853-.386 1.011-.814.16-.432.248-.9.248-1.388Z" fill="currentColor"/>'},"thumbs-down-filled":{viewBox:"0 0 20 20",path:'<path d="M18.905 12.75a1.25 1.25 0 0 1-2.5 0v-7.5a1.25 1.25 0 0 1 2.5 0v7.5ZM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 0 1 5.905 17c0-.995.182-1.948.514-2.826.204-.54-.166-1.174-.744-1.174h-2.52c-1.243 0-2.261-1.01-2.146-2.247a23.864 23.864 0 0 1 1.341-5.974C2.547 3.677 3.628 3 4.8 3h3.192a3 3 0 0 1 1.341.317l2.734 1.366A3 3 0 0 0 13.408 5H15v7h-.963c-.685 0-1.258.483-1.612 1.068a4.011 4.011 0 0 1-2.166 1.73c-.432.143-.853.386-1.011.814-.16.432-.248.9-.248 1.388Z" fill="currentColor"/>'},"files-expand":{viewBox:"0 0 16 16",path:'<path d="M15 6V11C15 13.21 13.21 15 11 15H6C5.26 15 4.62 14.6 4.27 14H11C12.65 14 14 12.65 14 11V4.27C14.6 4.62 15 5.26 15 6ZM11 13H4C2.897 13 2 12.103 2 11V4C2 2.897 2.897 2 4 2H11C12.103 2 13 2.897 13 4V11C13 12.103 12.103 13 11 13ZM4 12H11C11.551 12 12 11.552 12 11V4C12 3.449 11.551 3 11 3H4C3.449 3 3 3.449 3 4V11C3 11.552 3.449 12 4 12ZM9.5 7H8V5.5C8 5.224 7.776 5 7.5 5C7.224 5 7 5.224 7 5.5V7H5.5C5.224 7 5 7.224 5 7.5C5 7.776 5.224 8 5.5 8H7V9.5C7 9.776 7.224 10 7.5 10C7.776 10 8 9.776 8 9.5V8H9.5C9.776 8 10 7.776 10 7.5C10 7.224 9.776 7 9.5 7Z" fill="currentColor"/>'},"files-collapse":{viewBox:"0 0 16 16",path:'<path d="M14 4.27051C14.5999 4.62053 15 5.26009 15 6V11C15 13.21 13.21 15 11 15H6C5.26009 15 4.62053 14.5999 4.27051 14H11C12.65 14 14 12.65 14 11V4.27051Z" fill="currentColor"/><path d="M9.5 7C9.776 7 10 7.224 10 7.5C10 7.776 9.776 8 9.5 8H5.5C5.224 8 5 7.776 5 7.5C5 7.224 5.224 7 5.5 7H9.5Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11 2C12.103 2 13 2.897 13 4V11C13 12.103 12.103 13 11 13H4C2.897 13 2 12.103 2 11V4C2 2.897 2.897 2 4 2H11ZM4 3C3.449 3 3 3.449 3 4V11C3 11.552 3.449 12 4 12H11C11.551 12 12 11.552 12 11V4C12 3.449 11.551 3 11 3H4Z" fill="currentColor"/>'},reload:{viewBox:"0 0 24 24",path:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 3v5h-5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 21v-5h5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>'}};function S1(e){const[A,t]=uA(e,["name","size","class","classList"]);return A.name in Fl?(()=>{var n=$D(),i=n.firstChild;return f1(i,gA({get classList(){return{...A.classList,[A.class??""]:!!A.class}},get viewBox(){return Fl[A.name].viewBox},get innerHTML(){return Fl[A.name].path}},t),!0,!1),P(()=>z(n,"data-size",A.size||"normal")),n})():E(ki,gA(t,{get name(){return A.name},get size(){return A.size},get class(){return A.class},get classList(){return A.classList}}))}function zD(e){return!e||e==="normal"?"icon":e==="small"?"icon-sm":e==="large"?"icon-lg":e}function WD(e){return!e||e==="default"?"secondary":e}function Te(e){const[A,t]=uA(e,["variant","size","icon","iconSize","active","class","classList","children"]);return E(Ra,gA(t,{"data-component":"icon-button",get"data-size"(){return zD(A.size)},get"data-variant"(){return WD(A.variant)},get"data-active"(){return A.active||void 0},get"aria-pressed"(){return A.active||void 0},get classList(){return{...A.classList,[A.class??""]:!!A.class}},get children(){return[E(H,{get when(){return A.icon},children:n=>E(S1,{get name(){return n()},get size(){return A.iconSize??"small"}})}),MA(()=>A.children)]}}))}const ZD=({onRequest:e,onSseError:A,onSseEvent:t,responseTransformer:n,responseValidator:i,sseDefaultRetryDelay:r,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:a,url:l,...g})=>{let c;const d=a??(C=>new Promise(h=>setTimeout(h,C)));return{stream:async function*(){let C=r??3e3,h=0;const I=g.signal??new AbortController().signal;for(;!I.aborted;){h++;const u=g.headers instanceof Headers?g.headers:new Headers(g.headers);c!==void 0&&u.set("Last-Event-ID",c);try{const p={redirect:"follow",...g,body:g.serializedBody,headers:u,signal:I};let w=new Request(l,p);e&&(w=await e(l,p));const y=await(g.fetch??globalThis.fetch)(w);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");const M=y.body.pipeThrough(new TextDecoderStream).getReader();let D="";const k=()=>{try{M.cancel()}catch{}};I.addEventListener("abort",k);try{for(;;){const{done:_,value:L}=await M.read();if(_)break;D+=L,D=D.replace(/\r\n/g,`
14
+ <path d="M7.86667 2H5.2H2V18H5.2H7.86667M7.86667 2H18V18H7.86667M7.86667 2V18" stroke="currentColor"/>`,"layout-left":'<path d="M2.91675 2.91699L2.91675 2.41699L2.41675 2.41699L2.41675 2.91699L2.91675 2.91699ZM17.0834 2.91699L17.5834 2.91699L17.5834 2.41699L17.0834 2.41699L17.0834 2.91699ZM17.0834 17.0837L17.0834 17.5837L17.5834 17.5837L17.5834 17.0837L17.0834 17.0837ZM2.91675 17.0837L2.41675 17.0837L2.41675 17.5837L2.91675 17.5837L2.91675 17.0837ZM7.41674 17.0837L7.41674 17.5837L8.41674 17.5837L8.41674 17.0837L7.91674 17.0837L7.41674 17.0837ZM8.41674 2.91699L8.41674 2.41699L7.41674 2.41699L7.41674 2.91699L7.91674 2.91699L8.41674 2.91699ZM2.91675 2.91699L2.91675 3.41699L17.0834 3.41699L17.0834 2.91699L17.0834 2.41699L2.91675 2.41699L2.91675 2.91699ZM17.0834 2.91699L16.5834 2.91699L16.5834 17.0837L17.0834 17.0837L17.5834 17.0837L17.5834 2.91699L17.0834 2.91699ZM17.0834 17.0837L17.0834 16.5837L2.91675 16.5837L2.91675 17.0837L2.91675 17.5837L17.0834 17.5837L17.0834 17.0837ZM2.91675 17.0837L3.41675 17.0837L3.41675 2.91699L2.91675 2.91699L2.41675 2.91699L2.41675 17.0837L2.91675 17.0837ZM7.91674 17.0837L8.41674 17.0837L8.41674 2.91699L7.91674 2.91699L7.41674 2.91699L7.41674 17.0837L7.91674 17.0837Z" fill="currentColor"/>',"layout-left-partial":'<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>',"layout-left-full":'<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>',"layout-right":'<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>',"layout-right-partial":'<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />',"layout-right-full":'<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />',"square-arrow-top-right":'<path d="M7.91675 2.9165H2.91675V17.0832H17.0834V12.0832M12.0834 2.9165H17.0834V7.9165M9.58342 10.4165L16.6667 3.33317" stroke="currentColor" stroke-linecap="square"/>',"open-file":'<path d="M7.91602 2.91406H2.91602V17.0807H17.0827V12.0807M12.0827 2.91406H17.0827V7.91406M9.58268 10.4141L16.666 3.33073" stroke="currentColor" stroke-linecap="square"/>',"go-to-file":'<path d="M12.5 2.917H7.5V17.083H16.667V7.083L12.5 2.917ZM12.5 2.917V7.083H16.667M5 14.167V7.917M2.917 10L5 7.917L7.083 10" stroke="currentColor" stroke-linecap="square"/>',"speech-bubble":'<path d="M18.3334 10.0003C18.3334 5.57324 15.0927 2.91699 10.0001 2.91699C4.90749 2.91699 1.66675 5.57324 1.66675 10.0003C1.66675 11.1497 2.45578 13.1016 2.5771 13.3949C2.5878 13.4207 2.59839 13.4444 2.60802 13.4706C2.69194 13.6996 3.04282 14.9364 1.66675 16.7684C3.5186 17.6538 5.48526 16.1982 5.48526 16.1982C6.84592 16.9202 8.46491 17.0837 10.0001 17.0837C15.0927 17.0837 18.3334 14.4274 18.3334 10.0003Z" stroke="currentColor" stroke-linecap="square"/>',comment:'<path d="M16.25 3.75H3.75V16.25L6.875 14.4643H16.25V3.75Z" stroke="currentColor" stroke-linecap="square"/>',"folder-add-left":'<path d="M2.08333 9.58268V2.91602H8.33333L10 5.41602H17.9167V16.2493H8.75M3.75 12.0827V14.5827M3.75 14.5827V17.0827M3.75 14.5827H1.25M3.75 14.5827H6.25" stroke="currentColor" stroke-linecap="square"/>',github:'<path d="M10.0001 1.62549C14.6042 1.62549 18.3334 5.35465 18.3334 9.95882C18.333 11.7049 17.785 13.4068 16.7666 14.8251C15.7482 16.2434 14.3107 17.3066 12.6563 17.8651C12.2397 17.9484 12.0834 17.688 12.0834 17.4692C12.0834 17.188 12.0938 16.2922 12.0938 15.1776C12.0938 14.3963 11.8334 13.8963 11.5313 13.6359C13.3855 13.4276 15.3334 12.7192 15.3334 9.52132C15.3334 8.60465 15.0105 7.86507 14.4792 7.28174C14.5626 7.0734 14.8542 6.21924 14.3959 5.0734C14.3959 5.0734 13.698 4.84424 12.1042 5.92757C11.4376 5.74007 10.7292 5.64632 10.0209 5.64632C9.31258 5.64632 8.60425 5.74007 7.93758 5.92757C6.34383 4.85465 5.64592 5.0734 5.64592 5.0734C5.18758 6.21924 5.47925 7.0734 5.56258 7.28174C5.03133 7.86507 4.70842 8.61507 4.70842 9.52132C4.70842 12.7088 6.64592 13.4276 8.50008 13.6359C8.2605 13.8442 8.04175 14.2088 7.96883 14.7505C7.48967 14.9692 6.29175 15.3234 5.54175 14.063C5.3855 13.813 4.91675 13.1984 4.2605 13.2088C3.56258 13.2192 3.97925 13.6047 4.27092 13.7609C4.62508 13.9588 5.03133 14.6984 5.12508 14.938C5.29175 15.4067 5.83342 16.3026 7.92717 15.9172C7.92717 16.6151 7.93758 17.2713 7.93758 17.4692C7.93758 17.688 7.78133 17.938 7.36467 17.8651C5.70491 17.3126 4.26126 16.2515 3.23851 14.8324C2.21576 13.4133 1.66583 11.7081 1.66675 9.95882C1.66675 5.35465 5.39592 1.62549 10.0001 1.62549Z" fill="currentColor"/>',discord:'<path d="M16.0742 4.45014C14.9244 3.92097 13.7106 3.54556 12.4638 3.3335C12.2932 3.64011 12.1388 3.95557 12.0013 4.27856C10.6732 4.07738 9.32261 4.07738 7.99451 4.27856C7.85694 3.9556 7.70257 3.64014 7.53203 3.3335C6.28441 3.54735 5.06981 3.92365 3.91889 4.45291C1.63401 7.85128 1.01462 11.1652 1.32431 14.4322C2.6624 15.426 4.16009 16.1819 5.7523 16.6668C6.11082 16.1821 6.42806 15.6678 6.70066 15.1295C6.18289 14.9351 5.68315 14.6953 5.20723 14.4128C5.33249 14.3215 5.45499 14.2274 5.57336 14.136C6.95819 14.7907 8.46965 15.1302 9.99997 15.1302C11.5303 15.1302 13.0418 14.7907 14.4266 14.136C14.5463 14.2343 14.6688 14.3284 14.7927 14.4128C14.3159 14.6957 13.8152 14.9361 13.2965 15.1309C13.5688 15.669 13.8861 16.1828 14.2449 16.6668C15.8385 16.1838 17.3373 15.4283 18.6756 14.4335C19.039 10.645 18.0549 7.36145 16.0742 4.45014ZM7.09294 12.423C6.22992 12.423 5.51693 11.6357 5.51693 10.6671C5.51693 9.69852 6.20514 8.90427 7.09019 8.90427C7.97524 8.90427 8.68272 9.69852 8.66758 10.6671C8.65244 11.6357 7.97248 12.423 7.09294 12.423ZM12.907 12.423C12.0426 12.423 11.3324 11.6357 11.3324 10.6671C11.3324 9.69852 12.0206 8.90427 12.907 8.90427C13.7934 8.90427 14.4954 9.69852 14.4803 10.6671C14.4651 11.6357 13.7865 12.423 12.907 12.423Z" fill="currentColor"/>',"layout-bottom":'<path d="M2.91699 17.0832L2.41699 17.0832L2.41699 17.5832L2.91699 17.5832L2.91699 17.0832ZM2.91699 2.91653L2.91699 2.41653L2.41699 2.41653L2.41699 2.91653L2.91699 2.91653ZM17.0837 2.91653L17.5837 2.91653L17.5837 2.41653L17.0837 2.41653L17.0837 2.91653ZM17.0837 17.0832L17.5837 17.0832L17.5837 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.5827L17.5837 12.5827L17.5837 11.5827L17.0837 11.5827L17.0837 12.0827L17.0837 12.5827ZM2.91699 11.5827L2.41699 11.5827L2.41699 12.5827L2.91699 12.5827L2.91699 12.0827L2.91699 11.5827ZM2.91699 17.0832L3.41699 17.0832L3.41699 2.91653L2.91699 2.91653L2.41699 2.91653L2.41699 17.0832L2.91699 17.0832ZM2.91699 2.91653L2.91699 3.41653L17.0837 3.41653L17.0837 2.91653L17.0837 2.41653L2.91699 2.41653L2.91699 2.91653ZM17.0837 2.91653L16.5837 2.91653L16.5837 17.0832L17.0837 17.0832L17.5837 17.0832L17.5837 2.91653L17.0837 2.91653ZM17.0837 17.0832L17.0837 16.5832L2.91699 16.5832L2.91699 17.0832L2.91699 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.0827L17.0837 11.5827L2.91699 11.5827L2.91699 12.0827L2.91699 12.5827L17.0837 12.5827L17.0837 12.0827Z" fill="currentColor"/>',"layout-bottom-partial":'<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>',"layout-bottom-full":'<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>',"dot-grid":'<path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" fill="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" fill="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" fill="currentColor"/><path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" stroke="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" stroke="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" stroke="currentColor"/>',"circle-check":'<path d="M12.4987 7.91732L8.7487 12.5007L7.08203 10.834M17.9154 10.0007C17.9154 14.3729 14.371 17.9173 9.9987 17.9173C5.62644 17.9173 2.08203 14.3729 2.08203 10.0007C2.08203 5.6284 5.62644 2.08398 9.9987 2.08398C14.371 2.08398 17.9154 5.6284 17.9154 10.0007Z" stroke="currentColor" stroke-linecap="square"/>',copy:'<path d="M6.2513 6.24935V2.91602H17.0846V13.7493H13.7513M13.7513 6.24935V17.0827H2.91797V6.24935H13.7513Z" stroke="currentColor" stroke-linecap="round"/>',check:'<path d="M5 11.9657L8.37838 14.7529L15 5.83398" stroke="currentColor" stroke-linecap="square"/>',photo:'<path d="M16.6665 16.6666L11.6665 11.6666L9.99984 13.3333L6.6665 9.99996L3.08317 13.5833M2.9165 2.91663H17.0832V17.0833H2.9165V2.91663ZM13.3332 7.49996C13.3332 8.30537 12.6803 8.95829 11.8748 8.95829C11.0694 8.95829 10.4165 8.30537 10.4165 7.49996C10.4165 6.69454 11.0694 6.04163 11.8748 6.04163C12.6803 6.04163 13.3332 6.69454 13.3332 7.49996Z" stroke="currentColor" stroke-linecap="square"/>',share:'<path d="M10.0013 12.0846L10.0013 3.33464M13.7513 6.66797L10.0013 2.91797L6.2513 6.66797M17.0846 10.418V17.0846H2.91797V10.418" stroke="currentColor" stroke-linecap="square"/>',shield:'<path d="M7.49935 9.3737L9.16602 11.0404L12.4994 7.70703M9.99935 2.08203L17.0827 4.3737V9.92565C17.0827 14.0694 13.3327 16.2487 9.99935 18.047C6.66602 16.2487 2.91602 14.0694 2.91602 9.92565V4.3737L9.99935 2.08203Z" stroke="currentColor" stroke-linecap="square"/>',lock:'<path d="M5.833 8.33366V6.25033C5.833 3.71903 7.96805 1.66699 10.4993 1.66699C13.0307 1.66699 15.166 3.71903 15.166 6.25033V8.33366M4.16634 8.33366H16.833C17.7535 8.33366 18.4997 9.07985 18.4997 10.0003V16.667C18.4997 17.5875 17.7535 18.3337 16.833 18.3337H4.16634C3.24586 18.3337 2.49967 17.5875 2.49967 16.667V10.0003C2.49967 9.07985 3.24586 8.33366 4.16634 8.33366Z" stroke="currentColor" stroke-linecap="square"/>',download:'<path d="M13.9583 10.6257L10 14.584L6.04167 10.6257M10 2.08398V13.959M16.25 17.9173H3.75" stroke="currentColor" stroke-linecap="square"/>',menu:'<path d="M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5" stroke="currentColor" stroke-linecap="square"/>',server:'<rect x="3.35547" y="1.92969" width="13.2857" height="16.1429" stroke="currentColor"/><rect x="3.35547" y="11.9297" width="13.2857" height="6.14286" stroke="currentColor"/><rect x="12.8555" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/><rect x="10" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/>',branch:'<path d="M14.2036 7.19987L14.2079 6.69989L13.2079 6.69132L13.2036 7.1913L13.7036 7.19559L14.2036 7.19987ZM8.14804 5.09032H7.64804C7.64804 5.75797 7.06861 6.34471 6.29619 6.34471V6.84471V7.34471C7.56926 7.34471 8.64804 6.36051 8.64804 5.09032H8.14804ZM6.29619 6.84471V6.34471C5.52376 6.34471 4.94434 5.75797 4.94434 5.09032H4.44434H3.94434C3.94434 6.36051 5.02311 7.34471 6.29619 7.34471V6.84471ZM4.44434 5.09032H4.94434C4.94434 4.42267 5.52376 3.83594 6.29619 3.83594V3.33594V2.83594C5.02311 2.83594 3.94434 3.82013 3.94434 5.09032H4.44434ZM6.29619 3.33594V3.83594C7.06861 3.83594 7.64804 4.42267 7.64804 5.09032H8.14804H8.64804C8.64804 3.82013 7.56926 2.83594 6.29619 2.83594V3.33594ZM8.14804 14.9149H7.64804C7.64804 15.5825 7.06861 16.1693 6.29619 16.1693V16.6693V17.1693C7.56926 17.1693 8.64804 16.1851 8.64804 14.9149H8.14804ZM6.29619 16.6693V16.1693C5.52376 16.1693 4.94434 15.5825 4.94434 14.9149H4.44434H3.94434C3.94434 16.1851 5.02311 17.1693 6.29619 17.1693V16.6693ZM4.44434 14.9149H4.94434C4.94434 14.2472 5.52376 13.6605 6.29619 13.6605V13.1605V12.6605C5.02311 12.6605 3.94434 13.6447 3.94434 14.9149H4.44434ZM6.29619 13.1605V13.6605C7.06861 13.6605 7.64804 14.2472 7.64804 14.9149H8.14804H8.64804C8.64804 13.6447 7.56926 12.6605 6.29619 12.6605V13.1605ZM15.5554 5.09032H15.0554C15.0554 5.75797 14.476 6.34471 13.7036 6.34471V6.84471V7.34471C14.9767 7.34471 16.0554 6.36051 16.0554 5.09032H15.5554ZM13.7036 6.84471V6.34471C12.9312 6.34471 12.3517 5.75797 12.3517 5.09032H11.8517H11.3517C11.3517 6.36051 12.4305 7.34471 13.7036 7.34471V6.84471ZM11.8517 5.09032H12.3517C12.3517 4.42267 12.9312 3.83594 13.7036 3.83594V3.33594V2.83594C12.4305 2.83594 11.3517 3.82013 11.3517 5.09032H11.8517ZM13.7036 3.33594V3.83594C14.476 3.83594 15.0554 4.42267 15.0554 5.09032H15.5554H16.0554C16.0554 3.82013 14.9767 2.83594 13.7036 2.83594V3.33594ZM13.7036 7.19559L13.2036 7.1913L13.1544 12.9277L13.6544 12.932L14.1544 12.9363L14.2036 7.19987L13.7036 7.19559ZM6.29619 6.84471H5.79619V13.1605H6.29619H6.79619V6.84471H6.29619ZM11.6545 14.9149V14.4149H8.14804V14.9149V15.4149H11.6545V14.9149ZM13.6544 12.932L13.1544 12.9277C13.1474 13.7511 12.4779 14.4149 11.6545 14.4149V14.9149V15.4149C13.0269 15.4149 14.1426 14.3086 14.1544 12.9363L13.6544 12.932Z" fill="currentColor"/>',edit:'<path d="M17.0832 17.0807V17.5807H17.5832V17.0807H17.0832ZM2.9165 17.0807H2.4165V17.5807H2.9165V17.0807ZM2.9165 2.91406V2.41406H2.4165V2.91406H2.9165ZM9.58317 3.41406H10.0832V2.41406H9.58317V2.91406V3.41406ZM17.5832 10.4141V9.91406H16.5832V10.4141H17.0832H17.5832ZM6.24984 11.2474L5.89628 10.8938L5.74984 11.0403V11.2474H6.24984ZM6.24984 13.7474H5.74984V14.2474H6.24984V13.7474ZM8.74984 13.7474V14.2474H8.95694L9.10339 14.101L8.74984 13.7474ZM15.2082 2.28906L15.5617 1.93551L15.2082 1.58196L14.8546 1.93551L15.2082 2.28906ZM17.7082 4.78906L18.0617 5.14262L18.4153 4.78906L18.0617 4.43551L17.7082 4.78906ZM17.0832 17.0807V16.5807H2.9165V17.0807V17.5807H17.0832V17.0807ZM2.9165 17.0807H3.4165V2.91406H2.9165H2.4165V17.0807H2.9165ZM2.9165 2.91406V3.41406H9.58317V2.91406V2.41406H2.9165V2.91406ZM17.0832 10.4141H16.5832V17.0807H17.0832H17.5832V10.4141H17.0832ZM6.24984 11.2474H5.74984V13.7474H6.24984H6.74984V11.2474H6.24984ZM6.24984 13.7474V14.2474H8.74984V13.7474V13.2474H6.24984V13.7474ZM6.24984 11.2474L6.60339 11.6009L15.5617 2.64262L15.2082 2.28906L14.8546 1.93551L5.89628 10.8938L6.24984 11.2474ZM15.2082 2.28906L14.8546 2.64262L17.3546 5.14262L17.7082 4.78906L18.0617 4.43551L15.5617 1.93551L15.2082 2.28906ZM17.7082 4.78906L17.3546 4.43551L8.39628 13.3938L8.74984 13.7474L9.10339 14.101L18.0617 5.14262L17.7082 4.78906Z" fill="currentColor"/>',history:'<path d="M10 3.33301C6.31811 3.33301 3.33337 6.31775 3.33337 9.99967C3.33337 13.6816 6.31811 16.6663 10 16.6663C13.682 16.6663 16.6667 13.6816 16.6667 9.99967H15.4167C15.4167 12.9912 12.9915 15.4163 10 15.4163C7.00851 15.4163 4.58337 12.9912 4.58337 9.99967C4.58337 7.00818 7.00851 4.58301 10 4.58301C11.6454 4.58301 13.1219 5.29453 14.1525 6.42634L12.0834 6.42634V7.67634H16.0417V3.74967H14.7917V5.52741C13.5128 4.15283 11.8556 3.33301 10 3.33301ZM10.625 7.08301H9.37504V10.2588L11.8413 12.7251L12.7252 11.8412L10.625 9.74106V7.08301Z" fill="currentColor"/>',help:'<path d="M7.91683 7.91927V6.2526H12.0835V8.7526L10.0002 10.0026V12.0859M10.0002 13.7526V13.7609M17.9168 10.0026C17.9168 14.3749 14.3724 17.9193 10.0002 17.9193C5.62791 17.9193 2.0835 14.3749 2.0835 10.0026C2.0835 5.63035 5.62791 2.08594 10.0002 2.08594C14.3724 2.08594 17.9168 5.63035 17.9168 10.0026Z" stroke="currentColor" stroke-linecap="square"/>',"settings-gear":'<path d="M7.62516 4.46094L5.05225 3.86719L3.86475 5.05469L4.4585 7.6276L2.0835 9.21094V10.7943L4.4585 12.3776L3.86475 14.9505L5.05225 16.138L7.62516 15.5443L9.2085 17.9193H10.7918L12.3752 15.5443L14.9481 16.138L16.1356 14.9505L15.5418 12.3776L17.9168 10.7943V9.21094L15.5418 7.6276L16.1356 5.05469L14.9481 3.86719L12.3752 4.46094L10.7918 2.08594H9.2085L7.62516 4.46094Z" stroke="currentColor"/><path d="M12.5002 10.0026C12.5002 11.3833 11.3809 12.5026 10.0002 12.5026C8.61945 12.5026 7.50016 11.3833 7.50016 10.0026C7.50016 8.62189 8.61945 7.5026 10.0002 7.5026C11.3809 7.5026 12.5002 8.62189 12.5002 10.0026Z" stroke="currentColor"/>',dash:'<rect x="5" y="9.5" width="10" height="1" fill="currentColor"/>',"cloud-upload":'<path d="M12.0833 16.25H15C17.0711 16.25 18.75 14.5711 18.75 12.5C18.75 10.5649 17.2843 8.97217 15.4025 8.77133C15.2 6.13103 12.8586 4.08333 10 4.08333C7.71532 4.08333 5.76101 5.49781 4.96501 7.49881C2.84892 7.90461 1.25 9.76559 1.25 11.6667C1.25 13.9813 3.30203 16.25 5.83333 16.25H7.91667M10 16.25V10.4167M12.0833 11.875L10 9.79167L7.91667 11.875" stroke="currentColor" stroke-linecap="square"/>',trash:'<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>',sliders:'<path d="M3.625 6.25H10.9375M16.375 13.75H10.5625M3.625 13.75H4.9375M11.125 6.25C11.125 4.79969 12.2997 3.625 13.75 3.625C15.2003 3.625 16.375 4.79969 16.375 6.25C16.375 7.70031 15.2003 8.875 13.75 8.875C12.2997 8.875 11.125 7.70031 11.125 6.25ZM10.375 13.75C10.375 15.2003 9.20031 16.375 7.75 16.375C6.29969 16.375 5.125 15.2003 5.125 13.75C5.125 12.2997 6.29969 11.125 7.75 11.125C9.20031 11.125 10.375 12.2997 10.375 13.75Z" stroke="currentColor" stroke-linecap="square"/>',keyboard:'<path d="M5.125 7.375V4.375H14.875V2.875M8.3125 13.9375H11.6875M8.125 13.9375H11.875M2.125 7.375H17.875V17.125H2.125V7.375ZM5.5 10.375H5.125V10.75H5.5V10.375ZM8.5 10.375H8.125V10.75H8.5V10.375ZM11.875 10.375H11.5V10.75H11.875V10.375ZM14.875 10.375H14.5V10.75H14.875V10.375ZM14.875 13.75H14.5V14.125H14.875V13.75ZM5.5 13.75H5.125V14.125H5.5V13.75Z" stroke="currentColor" stroke-linecap="square"/>',selector:'<path d="M6.66626 12.5033L9.99959 15.8366L13.3329 12.5033M6.66626 7.50326L9.99959 4.16992L13.3329 7.50326" stroke="currentColor" stroke-linecap="square"/>',"arrow-down-to-line":'<path d="M15.2083 11.6667L10 16.875L4.79167 11.6667M10 16.25V3.125" stroke="currentColor" stroke-width="1.25" stroke-linecap="square"/>',star:'<path d="M10 2.5l2.35 4.76 5.25.77-3.8 3.7.9 5.24L10 14.64l-4.7 2.47.9-5.24-3.8-3.7 5.25-.77L10 2.5z" stroke="currentColor" stroke-linejoin="round"/>',"star-filled":'<path d="M10 2.5l2.35 4.76 5.25.77-3.8 3.7.9 5.24L10 14.64l-4.7 2.47.9-5.24-3.8-3.7 5.25-.77L10 2.5z" fill="currentColor" stroke="currentColor" stroke-linejoin="round"/>',warning:'<path d="M10 7.91667V11.6667M10 13.7417V13.75M10 2.5L1.875 16.25H18.125L10 2.5Z" stroke="currentColor" stroke-linecap="square"/>',reset:'<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>',link:'<path d="M2.08334 12.0833L1.72979 11.7298L1.37624 12.0833L1.72979 12.4369L2.08334 12.0833ZM7.91668 17.9167L7.56312 18.2702L7.91668 18.6238L8.27023 18.2702L7.91668 17.9167ZM17.9167 7.91666L18.2702 8.27022L18.6238 7.91666L18.2702 7.56311L17.9167 7.91666ZM12.0833 2.08333L12.4369 1.72977L12.0833 1.37622L11.7298 1.72977L12.0833 2.08333ZM8.39646 5.06311L8.0429 5.41666L8.75001 6.12377L9.10356 5.77021L8.75001 5.41666L8.39646 5.06311ZM5.77023 9.10355L6.12378 8.74999L5.41668 8.04289L5.06312 8.39644L5.41668 8.74999L5.77023 9.10355ZM14.2298 10.8964L13.8762 11.25L14.5833 11.9571L14.9369 11.6035L14.5833 11.25L14.2298 10.8964ZM11.6036 14.9369L11.9571 14.5833L11.25 13.8762L10.8965 14.2298L11.25 14.5833L11.6036 14.9369ZM7.14646 12.1464L6.7929 12.5L7.50001 13.2071L7.85356 12.8535L7.50001 12.5L7.14646 12.1464ZM12.8536 7.85355L13.2071 7.49999L12.5 6.79289L12.1465 7.14644L12.5 7.49999L12.8536 7.85355ZM2.08334 12.0833L1.72979 12.4369L7.56312 18.2702L7.91668 17.9167L8.27023 17.5631L2.4369 11.7298L2.08334 12.0833ZM17.9167 7.91666L18.2702 7.56311L12.4369 1.72977L12.0833 2.08333L11.7298 2.43688L17.5631 8.27022L17.9167 7.91666ZM12.0833 2.08333L11.7298 1.72977L8.39646 5.06311L8.75001 5.41666L9.10356 5.77021L12.4369 2.43688L12.0833 2.08333ZM5.41668 8.74999L5.06312 8.39644L1.72979 11.7298L2.08334 12.0833L2.4369 12.4369L5.77023 9.10355L5.41668 8.74999ZM14.5833 11.25L14.9369 11.6035L18.2702 8.27022L17.9167 7.91666L17.5631 7.56311L14.2298 10.8964L14.5833 11.25ZM7.91668 17.9167L8.27023 18.2702L11.6036 14.9369L11.25 14.5833L10.8965 14.2298L7.56312 17.5631L7.91668 17.9167ZM7.50001 12.5L7.85356 12.8535L12.8536 7.85355L12.5 7.49999L12.1465 7.14644L7.14646 12.1464L7.50001 12.5Z" fill="currentColor"/>',providers:'<path d="M10.0001 4.37562V2.875M13 4.37793V2.87793M7.00014 4.37793V2.875M10 17.1279V15.6279M13 17.1279V15.6279M7 17.1279V15.6279M15.625 13.0029H17.125M15.625 7.00293H17.125M15.625 10.0029H17.125M2.875 10.0029H4.375M2.875 13.0029H4.375M2.875 7.00293H4.375M4.375 4.37793H15.625V15.6279H4.375V4.37793ZM12.6241 10.0022C12.6241 11.4519 11.4488 12.6272 9.99908 12.6272C8.54934 12.6272 7.37408 11.4519 7.37408 10.0022C7.37408 8.55245 8.54934 7.3772 9.99908 7.3772C11.4488 7.3772 12.6241 8.55245 12.6241 10.0022Z" stroke="currentColor" stroke-linecap="square"/>',layers:'<path d="M10 2.5L2.5 6.25L10 10L17.5 6.25L10 2.5Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2.5 13.75L10 17.5L17.5 13.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2.5 10L10 13.75L17.5 10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',models:'<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C12.2917 10 10 12.2917 10 17.5C10 12.2917 7.70833 10 2.5 10C7.70833 10 10 7.70833 10 2.5C10 7.70833 12.2917 10 17.5 10Z" stroke="currentColor"/>',discard:'<path d="M7.5 5L4.167 8.333L7.5 11.667M4.583 8.333h6.667a4.167 4.167 0 0 1 4.167 4.167" stroke="currentColor" stroke-linecap="square"/>',"arrow-undo-down":'<path d="M4.08333 11.0859L1.75 8.7526L4.08333 6.41927M2.33333 8.7526L12.5417 8.7526L12.5417 3.21094L7 3.21094" stroke="currentColor" stroke-width="1" stroke-linecap="square"/>'},NQ="opencode-icon-sprite",Yu=e=>`opencode-icon-${e}`;let Ll=!1;function Pu(e){return e==="magnifying-glass"||e==="arrow-undo-down"?"0 0 16 16":"0 0 20 20"}function jD(){if(Ll||typeof document>"u")return;if(document.getElementById(NQ)){Ll=!0;return}const e=document.body;if(!e)return;const A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.id=NQ,A.setAttribute("aria-hidden","true"),A.setAttribute("width","0"),A.setAttribute("height","0"),A.style.position="absolute",A.style.overflow="hidden",A.style.display="none",A.innerHTML=Object.entries(VD).map(([t,n])=>{const i=t;return`<symbol id="${Yu(i)}" viewBox="${Pu(i)}">${n}</symbol>`}).join(""),e.insertBefore(A,e.firstChild),Ll=!0}function ki(e){const[A,t]=uA(e,["name","size","class","classList"]);return _1(jD),(()=>{var n=PD(),i=n.firstChild,r=i.firstChild;return f1(i,gA({get classList(){return{...A.classList,[A.class??""]:!!A.class}},get viewBox(){return Pu(A.name)}},t),!0,!0),P(o=>{var s=A.size||"normal",a=`#${Yu(A.name)}`;return s!==o.e&&z(n,"data-size",o.e=s),a!==o.t&&z(r,"href",o.t=a),o},{e:void 0,t:void 0}),n})()}var $D=v("<div data-component=icon><svg data-slot=icon-svg fill=none aria-hidden=true>");const Fl={memory:{viewBox:"0 0 24 24",path:'<path d="M2 7h4M2 12h4M2 17h4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><rect width="16" height="20" x="4" y="2" rx="2" stroke="currentColor" stroke-width="2"/>'},database:{viewBox:"0 0 24 24",path:'<ellipse cx="12" cy="5" rx="7" ry="3" stroke="currentColor" stroke-width="2"/><path d="M5 5v7c0 1.66 3.13 3 7 3s7-1.34 7-3V5M5 12v7c0 1.66 3.13 3 7 3s7-1.34 7-3v-7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'},"book-open-check":{viewBox:"0 0 24 24",path:'<path d="M12 21V7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="m16 12 2 2 4-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'},"circuit-board":{viewBox:"0 0 16 16",path:'<path d="M12.5 1H3.5C2.121 1 1 2.121 1 3.5V12.5C1 13.879 2.121 15 3.5 15H12.5C13.879 15 15 13.879 15 12.5V3.5C15 2.121 13.879 1 12.5 1ZM6 6.5C6 6.775 5.775 7 5.5 7C5.225 7 5 6.775 5 6.5C5 6.225 5.225 6 5.5 6C5.775 6 6 6.225 6 6.5ZM12.5 14H6V11.5C6 11.225 6.225 11 6.5 11H9.092C9.299 11.581 9.849 12 10.5 12C11.327 12 12 11.327 12 10.5C12 9.673 11.327 9 10.5 9C9.849 9 9.299 9.419 9.092 10H6.5C5.673 10 5 10.673 5 11.5V14H3.5C2.673 14 2 13.327 2 12.5V3.5C2 2.673 2.673 2 3.5 2H5V5.092C4.419 5.299 4 5.849 4 6.5C4 7.327 4.673 8 5.5 8C6.327 8 7 7.327 7 6.5C7 5.849 6.581 5.299 6 5.092V2H12.5C13.327 2 14 2.673 14 3.5V6H10.908C10.701 5.419 10.151 5 9.5 5C8.673 5 8 5.673 8 6.5C8 7.327 8.673 8 9.5 8C10.151 8 10.701 7.581 10.908 7H14V12.5C14 13.327 13.327 14 12.5 14ZM10 10.5C10 10.225 10.225 10 10.5 10C10.775 10 11 10.225 11 10.5C11 10.775 10.775 11 10.5 11C10.225 11 10 10.775 10 10.5ZM10 6.5C10 6.775 9.775 7 9.5 7C9.225 7 9 6.775 9 6.5C9 6.225 9.225 6 9.5 6C9.775 6 10 6.225 10 6.5Z" fill="currentColor"/>'},globe:{viewBox:"0 0 20 20",path:'<circle cx="10" cy="10" r="7" stroke="currentColor" stroke-width="2"/><path d="M3.25 10H16.75M10 3C12 4.875 13 7.2 13 10C13 12.8 12 15.125 10 17M10 3C8 4.875 7 7.2 7 10C7 12.8 8 15.125 10 17" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'},organization:{viewBox:"0 0 16 16",path:'<path d="M6.00195 4.00002C6.00195 2.89655 6.89649 2.00201 7.99995 2.00201C9.10342 2.00201 9.99796 2.89655 9.99796 4.00002C9.99796 5.10348 9.10342 5.99802 7.99995 5.99802C6.89649 5.99802 6.00195 5.10348 6.00195 4.00002ZM7.99995 3.00201C7.44877 3.00201 7.00195 3.44883 7.00195 4.00002C7.00195 4.5512 7.44877 4.99802 7.99995 4.99802C8.55114 4.99802 8.99796 4.5512 8.99796 4.00002C8.99796 3.44883 8.55114 3.00201 7.99995 3.00201ZM11 4.5C11 3.67157 11.6716 3 12.5 3C13.3284 3 14 3.67157 14 4.5C14 5.32843 13.3284 6 12.5 6C11.6716 6 11 5.32843 11 4.5ZM12.5 4C12.2239 4 12 4.22386 12 4.5C12 4.77614 12.2239 5 12.5 5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4ZM3.5 3C2.67157 3 2 3.67157 2 4.5C2 5.32843 2.67157 6 3.5 6C4.32843 6 5 5.32843 5 4.5C5 3.67157 4.32843 3 3.5 3ZM3 4.5C3 4.22386 3.22386 4 3.5 4C3.77614 4 4 4.22386 4 4.5C4 4.77614 3.77614 5 3.5 5C3.22386 5 3 4.77614 3 4.5ZM4.26756 6.99969C4.09739 7.29387 4 7.63541 4 7.99969L2 7.99969V10.5C2 11.3285 2.67157 12 3.5 12C3.71194 12 3.91361 11.9561 4.09639 11.8768C4.1705 12.2082 4.28572 12.524 4.43643 12.8187C4.14721 12.9356 3.83112 13 3.5 13C2.11929 13 1 11.8807 1 10.5V7.99969C1 7.44741 1.44772 6.99969 2 6.99969H4.26756ZM11.5636 12.8187C11.8528 12.9356 12.1689 13 12.5 13C13.8807 13 15 11.8807 15 10.5V7.99969C15 7.44741 14.5523 6.99969 14 6.99969H11.7324C11.9026 7.29387 12 7.63541 12 7.9997L14 7.99969V10.5C14 11.3285 13.3284 12 12.5 12C12.2881 12 12.0864 11.9561 11.9036 11.8768C11.8295 12.2082 11.7143 12.524 11.5636 12.8187ZM6 6.99969C5.44772 6.99969 5 7.44741 5 7.99969V11C5 12.6569 6.34315 14 8 14C9.65685 14 11 12.6569 11 11V7.99969C11 7.44741 10.5523 6.99969 10 6.99969H6ZM6 7.99969L10 7.99969V11C10 12.1046 9.10457 13 8 13C6.89543 13 6 12.1046 6 11V7.99969Z" fill="currentColor"/>'},"thumbs-up":{viewBox:"0 0 20 20",path:'<path d="M1 8.25a1.25 1.25 0 1 1 2.5 0v7.5a1.25 1.25 0 1 1-2.5 0v-7.5ZM11 3V1.7c0-.268.14-.526.395-.607A2 2 0 0 1 14 3c0 .995-.182 1.948-.514 2.826-.204.54.166 1.174.744 1.174h2.52c1.243 0 2.261 1.01 2.146 2.247a23.864 23.864 0 0 1-1.341 5.974C17.153 16.323 16.072 17 14.9 17h-3.192a3 3 0 0 1-1.341-.317l-2.734-1.366A3 3 0 0 0 6.292 15H5V8h.963c.685 0 1.258-.483 1.612-1.068a4.011 4.011 0 0 1 2.166-1.73c.432-.143.853-.386 1.011-.814.16-.432.248-.9.248-1.388Z" stroke="currentColor" fill="none" stroke-linejoin="round"/>'},"thumbs-down":{viewBox:"0 0 20 20",path:'<path d="M18.905 12.75a1.25 1.25 0 0 1-2.5 0v-7.5a1.25 1.25 0 0 1 2.5 0v7.5ZM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 0 1 5.905 17c0-.995.182-1.948.514-2.826.204-.54-.166-1.174-.744-1.174h-2.52c-1.243 0-2.261-1.01-2.146-2.247a23.864 23.864 0 0 1 1.341-5.974C2.547 3.677 3.628 3 4.8 3h3.192a3 3 0 0 1 1.341.317l2.734 1.366A3 3 0 0 0 13.408 5H15v7h-.963c-.685 0-1.258.483-1.612 1.068a4.011 4.011 0 0 1-2.166 1.73c-.432.143-.853.386-1.011.814-.16.432-.248.9-.248 1.388Z" stroke="currentColor" fill="none" stroke-linejoin="round"/>'},"thumbs-up-filled":{viewBox:"0 0 20 20",path:'<path d="M1 8.25a1.25 1.25 0 1 1 2.5 0v7.5a1.25 1.25 0 1 1-2.5 0v-7.5ZM11 3V1.7c0-.268.14-.526.395-.607A2 2 0 0 1 14 3c0 .995-.182 1.948-.514 2.826-.204.54.166 1.174.744 1.174h2.52c1.243 0 2.261 1.01 2.146 2.247a23.864 23.864 0 0 1-1.341 5.974C17.153 16.323 16.072 17 14.9 17h-3.192a3 3 0 0 1-1.341-.317l-2.734-1.366A3 3 0 0 0 6.292 15H5V8h.963c.685 0 1.258-.483 1.612-1.068a4.011 4.011 0 0 1 2.166-1.73c.432-.143.853-.386 1.011-.814.16-.432.248-.9.248-1.388Z" fill="currentColor"/>'},"thumbs-down-filled":{viewBox:"0 0 20 20",path:'<path d="M18.905 12.75a1.25 1.25 0 0 1-2.5 0v-7.5a1.25 1.25 0 0 1 2.5 0v7.5ZM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 0 1 5.905 17c0-.995.182-1.948.514-2.826.204-.54-.166-1.174-.744-1.174h-2.52c-1.243 0-2.261-1.01-2.146-2.247a23.864 23.864 0 0 1 1.341-5.974C2.547 3.677 3.628 3 4.8 3h3.192a3 3 0 0 1 1.341.317l2.734 1.366A3 3 0 0 0 13.408 5H15v7h-.963c-.685 0-1.258.483-1.612 1.068a4.011 4.011 0 0 1-2.166 1.73c-.432.143-.853.386-1.011.814-.16.432-.248.9-.248 1.388Z" fill="currentColor"/>'},"files-expand":{viewBox:"0 0 16 16",path:'<path d="M15 6V11C15 13.21 13.21 15 11 15H6C5.26 15 4.62 14.6 4.27 14H11C12.65 14 14 12.65 14 11V4.27C14.6 4.62 15 5.26 15 6ZM11 13H4C2.897 13 2 12.103 2 11V4C2 2.897 2.897 2 4 2H11C12.103 2 13 2.897 13 4V11C13 12.103 12.103 13 11 13ZM4 12H11C11.551 12 12 11.552 12 11V4C12 3.449 11.551 3 11 3H4C3.449 3 3 3.449 3 4V11C3 11.552 3.449 12 4 12ZM9.5 7H8V5.5C8 5.224 7.776 5 7.5 5C7.224 5 7 5.224 7 5.5V7H5.5C5.224 7 5 7.224 5 7.5C5 7.776 5.224 8 5.5 8H7V9.5C7 9.776 7.224 10 7.5 10C7.776 10 8 9.776 8 9.5V8H9.5C9.776 8 10 7.776 10 7.5C10 7.224 9.776 7 9.5 7Z" fill="currentColor"/>'},"files-collapse":{viewBox:"0 0 16 16",path:'<path d="M14 4.27051C14.5999 4.62053 15 5.26009 15 6V11C15 13.21 13.21 15 11 15H6C5.26009 15 4.62053 14.5999 4.27051 14H11C12.65 14 14 12.65 14 11V4.27051Z" fill="currentColor"/><path d="M9.5 7C9.776 7 10 7.224 10 7.5C10 7.776 9.776 8 9.5 8H5.5C5.224 8 5 7.776 5 7.5C5 7.224 5.224 7 5.5 7H9.5Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11 2C12.103 2 13 2.897 13 4V11C13 12.103 12.103 13 11 13H4C2.897 13 2 12.103 2 11V4C2 2.897 2.897 2 4 2H11ZM4 3C3.449 3 3 3.449 3 4V11C3 11.552 3.449 12 4 12H11C11.551 12 12 11.552 12 11V4C12 3.449 11.551 3 11 3H4Z" fill="currentColor"/>'},reload:{viewBox:"0 0 24 24",path:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 3v5h-5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 21v-5h5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>'}};function S1(e){const[A,t]=uA(e,["name","size","class","classList"]);return A.name in Fl?(()=>{var n=$D(),i=n.firstChild;return f1(i,gA({get classList(){return{...A.classList,[A.class??""]:!!A.class}},get viewBox(){return Fl[A.name].viewBox},get innerHTML(){return Fl[A.name].path}},t),!0,!1),P(()=>z(n,"data-size",A.size||"normal")),n})():E(ki,gA(t,{get name(){return A.name},get size(){return A.size},get class(){return A.class},get classList(){return A.classList}}))}function zD(e){return!e||e==="normal"?"icon":e==="small"?"icon-sm":e==="large"?"icon-lg":e}function WD(e){return!e||e==="default"?"secondary":e}function Te(e){const[A,t]=uA(e,["variant","size","icon","iconSize","active","class","classList","children"]);return E(Ra,gA(t,{"data-component":"icon-button",get"data-size"(){return zD(A.size)},get"data-variant"(){return WD(A.variant)},get"data-active"(){return A.active||void 0},get"aria-pressed"(){return A.active||void 0},get classList(){return{...A.classList,[A.class??""]:!!A.class}},get children(){return[E(H,{get when(){return A.icon},children:n=>E(S1,{get name(){return n()},get size(){return A.iconSize??"small"}})}),MA(()=>A.children)]}}))}const ZD=({onRequest:e,onSseError:A,onSseEvent:t,responseTransformer:n,responseValidator:i,sseDefaultRetryDelay:r,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:a,url:l,...g})=>{let c;const d=a??(C=>new Promise(h=>setTimeout(h,C)));return{stream:async function*(){let C=r??3e3,h=0;const I=g.signal??new AbortController().signal;for(;!I.aborted;){h++;const u=g.headers instanceof Headers?g.headers:new Headers(g.headers);c!==void 0&&u.set("Last-Event-ID",c);try{const p={redirect:"follow",...g,body:g.serializedBody,headers:u,signal:I};let w=new Request(l,p);e&&(w=await e(l,p));const y=await(g.fetch??globalThis.fetch)(w);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");const M=y.body.pipeThrough(new TextDecoderStream).getReader();let D="";const k=()=>{try{M.cancel()}catch{}};I.addEventListener("abort",k);try{for(;;){const{done:_,value:L}=await M.read();if(_)break;D+=L,D=D.replace(/\r\n/g,`
15
15
  `).replace(/\r/g,`
16
16
  `);const x=D.split(`
17
17
 
18
18
  `);D=x.pop()??"";for(const N of x){const F=N.split(`
19
19
  `),J=[];let T;for(const W of F)if(W.startsWith("data:"))J.push(W.replace(/^data:\s*/,""));else if(W.startsWith("event:"))T=W.replace(/^event:\s*/,"");else if(W.startsWith("id:"))c=W.replace(/^id:\s*/,"");else if(W.startsWith("retry:")){const oA=Number.parseInt(W.replace(/^retry:\s*/,""),10);Number.isNaN(oA)||(C=oA)}let V,tA=!1;if(J.length){const W=J.join(`
20
- `);try{V=JSON.parse(W),tA=!0}catch{V=W}}tA&&(i&&await i(V),n&&(V=await n(V))),t?.({data:V,event:T,id:c,retry:C}),J.length&&(yield V)}}}finally{I.removeEventListener("abort",k),M.releaseLock()}break}catch(p){if(A?.(p),o!==void 0&&h>=o)break;const w=Math.min(C*2**(h-1),s??3e4);await d(w)}}}()}},XD=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Ak=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ek=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Vu=({allowReserved:e,explode:A,name:t,style:n,value:i})=>{if(!A){const s=(e?i:i.map(a=>encodeURIComponent(a))).join(Ak(n));switch(n){case"label":return`.${s}`;case"matrix":return`;${t}=${s}`;case"simple":return s;default:return`${t}=${s}`}}const r=XD(n),o=i.map(s=>n==="label"||n==="simple"?e?s:encodeURIComponent(s):Ua({allowReserved:e,name:t,value:s})).join(r);return n==="label"||n==="matrix"?r+o:o},Ua=({allowReserved:e,name:A,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${A}=${e?t:encodeURIComponent(t)}`},ju=({allowReserved:e,explode:A,name:t,style:n,value:i,valueOnly:r})=>{if(i instanceof Date)return r?i.toISOString():`${t}=${i.toISOString()}`;if(n!=="deepObject"&&!A){let a=[];Object.entries(i).forEach(([g,c])=>{a=[...a,g,e?c:encodeURIComponent(c)]});const l=a.join(",");switch(n){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}const o=ek(n),s=Object.entries(i).map(([a,l])=>Ua({allowReserved:e,name:n==="deepObject"?`${t}[${a}]`:a,value:l})).join(o);return n==="label"||n==="matrix"?o+s:s},tk=/\{[^{}]+\}/g,nk=({path:e,url:A})=>{let t=A;const n=A.match(tk);if(n)for(const i of n){let r=!1,o=i.substring(1,i.length-1),s="simple";o.endsWith("*")&&(r=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),s="label"):o.startsWith(";")&&(o=o.substring(1),s="matrix");const a=e[o];if(a==null)continue;if(Array.isArray(a)){t=t.replace(i,Vu({explode:r,name:o,style:s,value:a}));continue}if(typeof a=="object"){t=t.replace(i,ju({explode:r,name:o,style:s,value:a,valueOnly:!0}));continue}if(s==="matrix"){t=t.replace(i,`;${Ua({name:o,value:a})}`);continue}const l=encodeURIComponent(s==="label"?`.${a}`:a);t=t.replace(i,l)}return t},ik=({baseUrl:e,path:A,query:t,querySerializer:n,url:i})=>{const r=i.startsWith("/")?i:`/${i}`;let o=(e??"")+r;A&&(o=nk({path:A,url:o}));let s=t?n(t):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function xQ(e){const A=e.body!==void 0;if(A&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(A)return e.body}const rk=async(e,A)=>{const t=typeof A=="function"?await A(e):A;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t},ok={bodySerializer:e=>JSON.stringify(e,(A,t)=>typeof t=="bigint"?t.toString():t)},$u=({parameters:e={},...A}={})=>n=>{const i=[];if(n&&typeof n=="object")for(const r in n){const o=n[r];if(o==null)continue;const s=e[r]||A;if(Array.isArray(o)){const a=Vu({allowReserved:s.allowReserved,explode:!0,name:r,style:"form",value:o,...s.array});a&&i.push(a)}else if(typeof o=="object"){const a=ju({allowReserved:s.allowReserved,explode:!0,name:r,style:"deepObject",value:o,...s.object});a&&i.push(a)}else{const a=Ua({allowReserved:s.allowReserved,name:r,value:o});a&&i.push(a)}}return i.join("&")},sk=e=>{if(!e)return"stream";const A=e.split(";")[0]?.trim();if(A){if(A.startsWith("application/json")||A.endsWith("+json"))return"json";if(A==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>A.startsWith(t)))return"blob";if(A.startsWith("text/"))return"text"}},ak=(e,A)=>A?!!(e.headers.has(A)||e.query?.[A]||e.headers.get("Cookie")?.includes(`${A}=`)):!1,lk=async({security:e,...A})=>{for(const t of e){if(ak(A,t.name))continue;const n=await rk(t,A.auth);if(!n)continue;const i=t.name??"Authorization";switch(t.in){case"query":A.query||(A.query={}),A.query[i]=n;break;case"cookie":A.headers.append("Cookie",`${i}=${n}`);break;default:A.headers.set(i,n);break}}},SQ=e=>ik({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:$u(e.querySerializer),url:e.url}),LQ=(e,A)=>{const t={...e,...A};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=zu(e.headers,A.headers),t},gk=e=>{const A=[];return e.forEach((t,n)=>{A.push([n,t])}),A},zu=(...e)=>{const A=new Headers;for(const t of e){if(!t)continue;const n=t instanceof Headers?gk(t):Object.entries(t);for(const[i,r]of n)if(r===null)A.delete(i);else if(Array.isArray(r))for(const o of r)A.append(i,o);else r!==void 0&&A.set(i,typeof r=="object"?JSON.stringify(r):r)}return A};class _l{fns=[];clear(){this.fns=[]}eject(A){const t=this.getInterceptorIndex(A);this.fns[t]&&(this.fns[t]=null)}exists(A){const t=this.getInterceptorIndex(A);return!!this.fns[t]}getInterceptorIndex(A){return typeof A=="number"?this.fns[A]?A:-1:this.fns.indexOf(A)}update(A,t){const n=this.getInterceptorIndex(A);return this.fns[n]?(this.fns[n]=t,A):!1}use(A){return this.fns.push(A),this.fns.length-1}}const ck=()=>({error:new _l,request:new _l,response:new _l}),dk=$u({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Qk={"Content-Type":"application/json"},Wu=(e={})=>({...ok,headers:Qk,parseAs:"auto",querySerializer:dk,...e}),Zu=(e={})=>{let A=LQ(Wu(),e);const t=()=>({...A}),n=l=>(A=LQ(A,l),t()),i=ck(),r=async l=>{const g={...A,...l,fetch:l.fetch??A.fetch??globalThis.fetch,headers:zu(A.headers,l.headers),serializedBody:void 0};g.security&&await lk({...g,security:g.security}),g.requestValidator&&await g.requestValidator(g),g.body!==void 0&&g.bodySerializer&&(g.serializedBody=g.bodySerializer(g.body)),(g.body===void 0||g.serializedBody==="")&&g.headers.delete("Content-Type");const c=SQ(g);return{opts:g,url:c}},o=async l=>{const{opts:g,url:c}=await r(l),d={redirect:"follow",...g,body:xQ(g)};let Q=new Request(c,d);for(const m of i.request.fns)m&&(Q=await m(Q,g));const B=g.fetch;let C;try{C=await B(Q)}catch(m){let y=m;for(const M of i.error.fns)M&&(y=await M(m,void 0,Q,g));if(y=y||{},g.throwOnError)throw y;return g.responseStyle==="data"?void 0:{error:y,request:Q,response:void 0}}for(const m of i.response.fns)m&&(C=await m(C,Q,g));const h={request:Q,response:C};if(C.ok){const m=(g.parseAs==="auto"?sk(C.headers.get("Content-Type")):g.parseAs)??"json";if(C.status===204||C.headers.get("Content-Length")==="0"){let M;switch(m){case"arrayBuffer":case"blob":case"text":M=await C[m]();break;case"formData":M=new FormData;break;case"stream":M=C.body;break;default:M={};break}return g.responseStyle==="data"?M:{data:M,...h}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await C[m]();break;case"json":{const M=await C.text();y=M?JSON.parse(M):{};break}case"stream":return g.responseStyle==="data"?C.body:{data:C.body,...h}}return m==="json"&&(g.responseValidator&&await g.responseValidator(y),g.responseTransformer&&(y=await g.responseTransformer(y))),g.responseStyle==="data"?y:{data:y,...h}}const I=await C.text();let u;try{u=JSON.parse(I)}catch{}const p=u??I;let w=p;for(const m of i.error.fns)m&&(w=await m(p,C,Q,g));if(w=w||{},g.throwOnError)throw w;return g.responseStyle==="data"?void 0:{error:w,...h}},s=l=>g=>o({...g,method:l}),a=l=>async g=>{const{opts:c,url:d}=await r(g);return ZD({...c,body:c.body,headers:c.headers,method:l,onRequest:async(Q,B)=>{let C=new Request(Q,B);for(const h of i.request.fns)h&&(C=await h(C,c));return C},serializedBody:xQ(c),url:d})};return{buildUrl:SQ,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:t,head:s("HEAD"),interceptors:i,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:o,setConfig:n,sse:{connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),head:a("HEAD"),options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),trace:a("TRACE")},trace:s("TRACE")}},Bk={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ek=Object.entries(Bk),Xu=(e,A)=>{A||(A=new Map);for(const t of e)"in"in t?t.key&&A.set(t.key,{in:t.in,map:t.map}):"key"in t?A.set(t.key,{map:t.map}):t.args&&Xu(t.args,A);return A},Ck=e=>{for(const[A,t]of Object.entries(e))t&&typeof t=="object"&&!Object.keys(t).length&&delete e[A]},G=(e,A)=>{const t={body:{},headers:{},path:{},query:{}},n=Xu(A);let i;for(const[r,o]of e.entries())if(A[r]&&(i=A[r]),!!i)if("in"in i)if(i.key){const s=n.get(i.key),a=s.map||i.key;s.in&&(t[s.in][a]=o)}else t.body=o;else for(const[s,a]of Object.entries(o??{})){const l=n.get(s);if(l)if(l.in){const g=l.map||s;t[l.in][g]=a}else t[l.map]=a;else{const g=Ek.find(([c])=>s.startsWith(c));if(g){const[c,d]=g;t[d][s.slice(c.length)]=a}else if("allowExtra"in i&&i.allowExtra){for(const[c,d]of Object.entries(i.allowExtra))if(d){t[c][s]=a;break}}}}return Ck(t),t},uk=Zu(Wu({baseUrl:"http://localhost:4096"}));class EA{client;constructor(A){this.client=A?.client??uk}}class Ik{defaultKey="default";instances=new Map;get(A){const t=this.instances.get(A??this.defaultKey);if(!t)throw new Error('No SDK client found. Create one with "new KiloClient()" to fix this error.');return t}set(A,t){this.instances.set(t??this.defaultKey,A)}}class hk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"}]}]);return(t?.client??this.client).delete({url:"/auth/{providerID}",...t,...n})}set(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return(t?.client??this.client).put({url:"/auth/{providerID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}let fk=class extends EA{log(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"service"},{in:"body",key:"level"},{in:"body",key:"message"},{in:"body",key:"extra"}]}]);return(t?.client??this.client).post({url:"/log",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}agents(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/agent",...t,...n})}skills(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/skill",...t,...n})}};class pk extends EA{moveSession(A,t){const n=G([A],[{args:[{in:"body",key:"sessionID"},{in:"body",key:"destination"},{in:"body",key:"moveChanges"}]}]);return(t?.client??this.client).post({url:"/experimental/control-plane/move-session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class mk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/console",...t,...n})}listOrgs(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/console/orgs",...t,...n})}switchOrg(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"accountID"},{in:"body",key:"orgID"}]}]);return(t?.client??this.client).post({url:"/experimental/console/switch",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class wk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"projectID"},{in:"query",key:"worktrees"},{in:"query",key:"current"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"cursor"},{in:"query",key:"search"},{in:"query",key:"limit"},{in:"query",key:"archived"}]}]);return(t?.client??this.client).get({url:"/experimental/session",...t,...n})}background(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/session/{sessionID}/background",...t,...n})}}class yk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/resource",...t,...n})}}class Dk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"}]}]);return(t?.client??this.client).delete({url:"/experimental/project/{projectID}/copy",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}create(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"workspace"},{in:"body",key:"strategy"},{in:"body",key:"directory"},{in:"body",key:"name"},{in:"body",key:"context"}]}]);return(t?.client??this.client).post({url:"/experimental/project/{projectID}/copy",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}refresh(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/project/{projectID}/copy/refresh",...t,...n})}}class kk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace/adapter",...t,...n})}}class bk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"type"},{in:"body",key:"branch"},{in:"body",key:"extra"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}syncList(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace/sync-list",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace/status",...t,...n})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/experimental/workspace/{id}",...t,...n})}warp(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"sessionID"},{in:"body",key:"copyChanges"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace/warp",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_adapter;get adapter(){return this._adapter??=new kk({client:this.client})}}class vk extends EA{_controlPlane;get controlPlane(){return this._controlPlane??=new pk({client:this.client})}_console;get console(){return this._console??=new mk({client:this.client})}_session;get session(){return this._session??=new wk({client:this.client})}_resource;get resource(){return this._resource??=new yk({client:this.client})}_projectCopy;get projectCopy(){return this._projectCopy??=new Dk({client:this.client})}_workspace;get workspace(){return this._workspace??=new bk({client:this.client})}}class Mk extends EA{get(A){return(A?.client??this.client).get({url:"/global/config",...A})}update(A,t){const n=G([A],[{args:[{key:"config",map:"body"}]}]);return(t?.client??this.client).patch({url:"/global/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Nk extends EA{health(A){return(A?.client??this.client).get({url:"/global/health",...A})}event(A){return(A?.client??this.client).sse.get({url:"/global/event",...A})}dispose(A){return(A?.client??this.client).post({url:"/global/dispose",...A})}upgrade(A,t){const n=G([A],[{args:[{in:"body",key:"target"}]}]);return(t?.client??this.client).post({url:"/global/upgrade",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_config;get config(){return this._config??=new Mk({client:this.client})}}let xk=class extends EA{subscribe(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).sse.get({url:"/event",...t,...n})}};class Sk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return(t?.client??this.client).patch({url:"/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}warnings(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/warnings",...t,...n})}providers(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/providers",...t,...n})}overlay(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"}]}]);return(t?.client??this.client).get({url:"/config/overlay",...t,...n})}overlayUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"scope"},{in:"body",key:"set"},{in:"body",key:"unset"}]}]);return(t?.client??this.client).patch({url:"/config/overlay",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}sources(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/sources",...t,...n})}effective(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/effective",...t,...n})}rules(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"}]}]);return(t?.client??this.client).get({url:"/config/rules",...t,...n})}rulesUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"scope"},{in:"body",key:"content"}]}]);return(t?.client??this.client).put({url:"/config/rules",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}modelState(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/model-state",...t,...n})}modelStateUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"favorite"}]}]);return(t?.client??this.client).patch({url:"/config/model-state",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Lk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"provider"},{in:"query",key:"model"}]}]);return(t?.client??this.client).get({url:"/experimental/tool",...t,...n})}ids(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/tool/ids",...t,...n})}}class Fk extends EA{remove(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return(t?.client??this.client).delete({url:"/experimental/worktree",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/experimental/worktree",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reset(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/experimental/worktree/reset",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}diff(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff",...t,...n})}diffSummary(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff/summary",...t,...n})}diffFile(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"},{in:"query",key:"file"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff/file",...t,...n})}}class _k extends EA{text(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return(t?.client??this.client).get({url:"/find",...t,...n})}files(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"},{in:"query",key:"dirs"},{in:"query",key:"type"},{in:"query",key:"limit"}]}]);return(t?.client??this.client).get({url:"/find/file",...t,...n})}symbols(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return(t?.client??this.client).get({url:"/find/symbol",...t,...n})}}let Gk=class extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return(t?.client??this.client).get({url:"/file",...t,...n})}read(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return(t?.client??this.client).get({url:"/file/content",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/file/status",...t,...n})}};class Rk extends EA{dispose(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/instance/dispose",...t,...n})}reload(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/instance/reload",...t,...n})}}class Uk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/path",...t,...n})}}let Ok=class extends EA{raw(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs/diff/raw",...t,...n})}};class Kk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs/status",...t,...n})}diff(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"},{in:"query",key:"context"}]}]);return(t?.client??this.client).get({url:"/vcs/diff",...t,...n})}apply(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"patch"}]}]);return(t?.client??this.client).post({url:"/vcs/apply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_diff;get diff2(){return this._diff??=new Ok({client:this.client})}}class qk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/command",...t,...n})}}class Tk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/lsp",...t,...n})}}class Jk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/formatter",...t,...n})}}class Hk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/mcp/{name}/auth",...t,...n})}start(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth",...t,...n})}callback(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"code"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth/callback",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}authenticate(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...t,...n})}}class Yk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/mcp",...t,...n})}add(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return(t?.client??this.client).post({url:"/mcp",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}connect(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/connect",...t,...n})}disconnect(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/disconnect",...t,...n})}_auth;get auth(){return this._auth??=new Hk({client:this.client})}}class Pk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project",...t,...n})}current(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project/current",...t,...n})}initGit(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/project/git/init",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"icon"},{in:"body",key:"commands"}]}]);return(t?.client??this.client).patch({url:"/project/{projectID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}directories(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project/{projectID}/directories",...t,...n})}}class Vk extends EA{shells(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty/shells",...t,...n})}list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"},{in:"body",key:"args"},{in:"body",key:"cwd"},{in:"body",key:"title"},{in:"body",key:"env"}]}]);return(t?.client??this.client).post({url:"/pty",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/pty/{ptyID}",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty/{ptyID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"sessionID"},{in:"body",key:"size"}]}]);return(t?.client??this.client).put({url:"/pty/{ptyID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}connectToken(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...t,...n})}connect(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"cursor"},{in:"query",key:"ticket"}]}]);return(t?.client??this.client).get({url:"/pty/{ptyID}/connect",...t,...n})}}class jk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/question",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"answers"}]}]);return(t?.client??this.client).post({url:"/question/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/question/{requestID}/reject",...t,...n})}}class $k extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/permission",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return(t?.client??this.client).post({url:"/permission/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}saveAlwaysRules(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"approvedAlways"},{in:"body",key:"deniedAlways"}]}]);return(t?.client??this.client).post({url:"/permission/{requestID}/always-rules",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}allowEverything(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enable"},{in:"body",key:"requestID"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/permission/allow-everything",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}respond(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"permissionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"response"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/permissions/{permissionID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class zk extends EA{authorize(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"inputs"}]}]);return(t?.client??this.client).post({url:"/provider/{providerID}/oauth/authorize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}callback(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"code"}]}]);return(t?.client??this.client).post({url:"/provider/{providerID}/oauth/callback",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Wk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/provider",...t,...n})}auth(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/provider/auth",...t,...n})}_oauth;get oauth(){return this._oauth??=new zk({client:this.client})}}class Zk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"},{in:"query",key:"path"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"search"},{in:"query",key:"limit"}]}]);return(t?.client??this.client).get({url:"/session",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"parentID"},{in:"body",key:"title"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"metadata"},{in:"body",key:"permission"},{in:"body",key:"platform"},{in:"body",key:"workspaceID"},{in:"body",key:"sandboxInheritanceToken"}]}]);return(t?.client??this.client).post({url:"/session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/status",...t,...n})}delete(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"metadata"},{in:"body",key:"permission"},{in:"body",key:"time"}]}]);return(t?.client??this.client).patch({url:"/session/{sessionID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}children(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/children",...t,...n})}todo(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/todo",...t,...n})}diff(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"messageID"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/diff",...t,...n})}messages(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"before"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/message",...t,...n})}prompt(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"agent"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"editorContext"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}deleteMessage(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}",...t,...n})}message(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/message/{messageID}",...t,...n})}fork(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/fork",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}abort(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/abort",...t,...n})}init(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"modelID"},{in:"body",key:"providerID"},{in:"body",key:"messageID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/init",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}unshare(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/share",...t,...n})}share(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/share",...t,...n})}summarize(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"providerID"},{in:"body",key:"modelID"},{in:"body",key:"auto"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/summarize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}promptAsync(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"agent"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"editorContext"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/prompt_async",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}command(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"arguments"},{in:"body",key:"command"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/command",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}shell(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"command"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/shell",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}revert(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"partID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/revert",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}unrevert(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/unrevert",...t,...n})}viewed(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"viewer"},{in:"body",key:"attached"},{in:"body",key:"visible"}]}]);return(t?.client??this.client).post({url:"/session/viewed",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Xk extends EA{delete(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"part",map:"body"}]}]);return(t?.client??this.client).patch({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class A3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/sync/history",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class e3 extends EA{start(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/sync/start",...t,...n})}replay(A,t){const n=G([A],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"events"}]}]);return(t?.client??this.client).post({url:"/sync/replay",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}steal(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/sync/steal",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_history;get history(){return this._history??=new A3({client:this.client})}}class t3 extends EA{next(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/control/next",...t,...n})}response(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/tui/control/response",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class n3 extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/config",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"},{in:"body",key:"$schema"},{in:"body",key:"theme"},{in:"body",key:"keybinds"},{in:"body",key:"plugin"},{in:"body",key:"plugin_enabled"},{in:"body",key:"title_icon"},{in:"body",key:"scroll_speed"},{in:"body",key:"scroll_acceleration"},{in:"body",key:"diff_style"},{in:"body",key:"mouse"},{in:"body",key:"attention"}]}]);return(t?.client??this.client).patch({url:"/tui/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class i3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/keybinds",...t,...n})}}class r3 extends EA{appendPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return(t?.client??this.client).post({url:"/tui/append-prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}openHelp(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-help",...t,...n})}openSessions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-sessions",...t,...n})}openThemes(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-themes",...t,...n})}openModels(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-models",...t,...n})}submitPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/submit-prompt",...t,...n})}clearPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/clear-prompt",...t,...n})}executeCommand(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return(t?.client??this.client).post({url:"/tui/execute-command",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}showToast(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"message"},{in:"body",key:"variant"},{in:"body",key:"duration"}]}]);return(t?.client??this.client).post({url:"/tui/show-toast",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}publish(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/tui/publish",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}selectSession(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/tui/select-session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_control;get control(){return this._control??=new t3({client:this.client})}_config;get config(){return this._config??=new n3({client:this.client})}_keybind;get keybind(){return this._keybind??=new i3({client:this.client})}}class o3 extends EA{preview(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"scope"},{in:"body",key:"description"},{in:"body",key:"mode"},{in:"body",key:"model"},{in:"body",key:"color"},{in:"body",key:"steps"},{in:"body",key:"tools"},{in:"body",key:"permission"},{in:"body",key:"prompt"}]}]);return(t?.client??this.client).post({url:"/agent-builder/preview",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}save(A,t){const n=G([A],[{args:[{in:"path",key:"path_id",map:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_id",map:"id"},{in:"body",key:"scope"},{in:"body",key:"description"},{in:"body",key:"mode"},{in:"body",key:"model"},{in:"body",key:"color"},{in:"body",key:"steps"},{in:"body",key:"tools"},{in:"body",key:"permission"},{in:"body",key:"prompt"}]}]);return(t?.client??this.client).put({url:"/agent-builder/{id}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class s3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process/{processID}",...t,...n})}logs(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process/{processID}/logs",...t,...n})}stop(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/{processID}/stop",...t,...n})}restart(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/{processID}/restart",...t,...n})}stopSession(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/session/{sessionID}/stop",...t,...n})}}class a3 extends EA{generate(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"prompt"},{in:"body",key:"providerID"},{in:"body",key:"modelID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/branch-name",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class l3 extends EA{generate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"path"},{in:"body",key:"selectedFiles"},{in:"body",key:"previousMessage"},{in:"body",key:"language"}]}]);return(t?.client??this.client).post({url:"/commit-message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class g3 extends EA{enhance(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return(t?.client??this.client).post({url:"/enhance-prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class c3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/status",...t,...n})}warnings(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/warnings",...t,...n})}models(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/models",...t,...n})}}class d3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/interactive-terminal",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/interactive-terminal/{terminalID}",...t,...n})}write(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"interactiveTerminalWriteInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/input",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}resize(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"interactiveTerminalResizeInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/resize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}close(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/close",...t,...n})}}class Q3 extends EA{transcriptions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"model"},{in:"body",key:"input_audio"},{in:"body",key:"language"},{in:"body",key:"prompt"},{in:"body",key:"temperature"}]}]);return(t?.client??this.client).post({url:"/kilo/audio/transcriptions",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class B3 extends EA{images(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/models/images",...t,...n})}}class E3 extends EA{set(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"organizationId"}]}]);return(t?.client??this.client).post({url:"/kilo/organization",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class C3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/claw/status",...t,...n})}chatCredentials(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/claw/chat-credentials",...t,...n})}}class u3 extends EA{get(A,t){const n=G([A],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/cloud/session/{id}",...t,...n})}import(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionId"}]}]);return(t?.client??this.client).post({url:"/kilo/cloud/session/import",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class I3 extends EA{_session;get session(){return this._session??=new u3({client:this.client})}}class h3 extends EA{profile(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/profile",...t,...n})}authStatus(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/auth-status",...t,...n})}modes(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/modes",...t,...n})}fim(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"prefix"},{in:"body",key:"suffix"},{in:"body",key:"provider"},{in:"body",key:"model"},{in:"body",key:"maxTokens"},{in:"body",key:"temperature"}]}]);return(t?.client??this.client).sse.post({url:"/kilo/fim",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}edit(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"provider"},{in:"body",key:"model"},{in:"body",key:"maxTokens"},{in:"body",key:"currentFilePath"},{in:"body",key:"currentFileContent"},{in:"body",key:"cursorLine"},{in:"body",key:"cursorCharacter"},{in:"body",key:"editableRegionStartLine"},{in:"body",key:"editableRegionEndLine"},{in:"body",key:"recentlyViewedSnippets"},{in:"body",key:"editDiffHistory"}]}]);return(t?.client??this.client).post({url:"/kilo/edit",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}notifications(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/notifications",...t,...n})}cloudSessions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"cursor"},{in:"query",key:"limit"},{in:"query",key:"gitUrl"}]}]);return(t?.client??this.client).get({url:"/kilo/cloud-sessions",...t,...n})}_audio;get audio(){return this._audio??=new Q3({client:this.client})}_models;get models(){return this._models??=new B3({client:this.client})}_organization;get organization(){return this._organization??=new E3({client:this.client})}_claw;get claw(){return this._claw??=new C3({client:this.client})}_cloud;get cloud(){return this._cloud??=new I3({client:this.client})}}class f3 extends EA{snapshot(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/kilocode/heap/snapshot",...t,...n})}}class p3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/notebook",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"result"}]}]);return(t?.client??this.client).post({url:"/kilocode/notebook/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"error"}]}]);return(t?.client??this.client).post({url:"/kilocode/notebook/{requestID}/reject",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class m3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/agent-manager",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"result"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent-manager/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"error"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent-manager/{requestID}/reject",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class w3 extends EA{project(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"worktree"},{in:"body",key:"vcs"},{in:"body",key:"name"},{in:"body",key:"iconUrl"},{in:"body",key:"iconColor"},{in:"body",key:"timeCreated"},{in:"body",key:"timeUpdated"},{in:"body",key:"timeInitialized"},{in:"body",key:"sandboxes"},{in:"body",key:"commands"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/project",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}session(A,t){const n=G([A],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"projectID"},{in:"body",key:"force"},{in:"body",key:"workspaceID"},{in:"body",key:"parentID"},{in:"body",key:"slug"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"title"},{in:"body",key:"version"},{in:"body",key:"shareURL"},{in:"body",key:"summary"},{in:"body",key:"revert"},{in:"body",key:"permission"},{in:"body",key:"timeCreated"},{in:"body",key:"timeUpdated"},{in:"body",key:"timeCompacting"},{in:"body",key:"timeArchived"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}message(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"sessionID"},{in:"body",key:"timeCreated"},{in:"body",key:"data"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}part(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"messageID"},{in:"body",key:"sessionID"},{in:"body",key:"timeCreated"},{in:"body",key:"data"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/part",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class y3 extends EA{agentRequirements(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"agent"}]}]);return(t?.client??this.client).get({url:"/kilocode/agent/requirements",...t,...n})}removeSkill(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"location"}]}]);return(t?.client??this.client).post({url:"/kilocode/skill/remove",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}removeAgent(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent/remove",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}sessionModelUsage(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/model-usage",...t,...n})}_heap;get heap(){return this._heap??=new f3({client:this.client})}_notebook;get notebook(){return this._notebook??=new p3({client:this.client})}_agentManager;get agentManager(){return this._agentManager??=new m3({client:this.client})}_sessionImport;get sessionImport(){return this._sessionImport??=new w3({client:this.client})}}class D3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/anaconda-desktop/status",...t,...n})}open(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/kilocode/anaconda-desktop/open",...t,...n})}sync(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"acknowledgeToolLimitations"}]}]);return(t?.client??this.client).post({url:"/kilocode/anaconda-desktop/sync",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class k3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/network",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/network/{requestID}/reply",...t,...n})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/network/{requestID}/reject",...t,...n})}}class b3 extends EA{enable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/remote/enable",...t,...n})}disable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/remote/disable",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/remote/status",...t,...n})}}class v3 extends EA{support(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/sandbox/support",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/sandbox",...t,...n})}toggle(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/sandbox/toggle",...t,...n})}}class M3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/suggestion",...t,...n})}accept(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"index"}]}]);return(t?.client??this.client).post({url:"/suggestion/{requestID}/accept",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}dismiss(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/suggestion/{requestID}/dismiss",...t,...n})}}class N3 extends EA{capture(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"event"},{in:"body",key:"properties"}]}]);return(t?.client??this.client).post({url:"/telemetry/capture",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}setEnabled(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return(t?.client??this.client).post({url:"/telemetry/setEnabled",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class x3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/memory/status",...t,...n})}show(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/memory/show",...t,...n})}enable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/enable",...t,...n})}disable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/disable",...t,...n})}configure(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"autoConsolidate"}]}]);return(t?.client??this.client).post({url:"/memory/configure",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}rebuild(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/rebuild",...t,...n})}remember(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"},{in:"body",key:"key"},{in:"body",key:"file"},{in:"body",key:"section"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/remember",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}correct(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"},{in:"body",key:"key"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/correct",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}forget(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"query"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/forget",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}purge(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"confirm"}]}]);return(t?.client??this.client).post({url:"/memory/purge",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class S3 extends EA{get(A){return(A?.client??this.client).get({url:"/api/health",...A})}}class L3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/agent",...t,...n})}}class F3 extends EA{list(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/permission/request",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/permission/request/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class _3 extends EA{reply(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"},{key:"questionV2Reply",map:"body"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/question/request/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/question/request/{requestID}/reject",...t,...n})}}class G3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"order"},{in:"query",key:"search"},{in:"query",key:"directory"},{in:"query",key:"project"},{in:"query",key:"subpath"},{in:"query",key:"cursor"}]}]);return(t?.client??this.client).get({url:"/api/session",...t,...n})}prompt(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"body",key:"id"},{in:"body",key:"prompt"},{in:"body",key:"delivery"},{in:"body",key:"resume"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}compact(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/compact",...t,...n})}wait(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/wait",...t,...n})}context(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/context",...t,...n})}messages(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"limit"},{in:"query",key:"order"},{in:"query",key:"cursor"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/message",...t,...n})}_permission;get permission(){return this._permission??=new F3({client:this.client})}_question;get question(){return this._question??=new _3({client:this.client})}}class R3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/model",...t,...n})}}class U3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/provider",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/provider/{providerID}",...t,...n})}}let O3=class extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/permission/request",...t,...n})}};class K3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"projectID"}]}]);return(t?.client??this.client).get({url:"/api/permission/saved",...t,...n})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"id"}]}]);return(t?.client??this.client).delete({url:"/api/permission/saved/{id}",...t,...n})}}class q3 extends EA{_request;get request(){return this._request??=new O3({client:this.client})}_saved;get saved(){return this._saved??=new K3({client:this.client})}}class T3 extends EA{read(A,t){const n=G([A],[{args:[{in:"query",key:"location"},{in:"query",key:"path"},{in:"query",key:"reference"}]}]);return(t?.client??this.client).get({url:"/api/fs/read",...t,...n})}list(A,t){const n=G([A],[{args:[{in:"query",key:"location"},{in:"query",key:"path"},{in:"query",key:"reference"}]}]);return(t?.client??this.client).get({url:"/api/fs/list",...t,...n})}}class J3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/command",...t,...n})}}class H3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/skill",...t,...n})}}class Y3 extends EA{subscribe(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).sse.get({url:"/api/event",...t,...n})}}class P3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/question/request",...t,...n})}}class V3 extends EA{_request;get request(){return this._request??=new P3({client:this.client})}}class j3 extends EA{_health;get health(){return this._health??=new S3({client:this.client})}_agent;get agent(){return this._agent??=new L3({client:this.client})}_session;get session(){return this._session??=new G3({client:this.client})}_model;get model(){return this._model??=new R3({client:this.client})}_provider;get provider(){return this._provider??=new U3({client:this.client})}_permission;get permission(){return this._permission??=new q3({client:this.client})}_fs;get fs(){return this._fs??=new T3({client:this.client})}_command;get command(){return this._command??=new J3({client:this.client})}_skill;get skill(){return this._skill??=new H3({client:this.client})}_event;get event(){return this._event??=new Y3({client:this.client})}_question;get question(){return this._question??=new V3({client:this.client})}}class p0 extends EA{static __registry=new Ik;constructor(A){super(A),p0.__registry.set(this,A?.key)}_auth;get auth(){return this._auth??=new hk({client:this.client})}_app;get app(){return this._app??=new fk({client:this.client})}_experimental;get experimental(){return this._experimental??=new vk({client:this.client})}_global;get global(){return this._global??=new Nk({client:this.client})}_event;get event(){return this._event??=new xk({client:this.client})}_config;get config(){return this._config??=new Sk({client:this.client})}_tool;get tool(){return this._tool??=new Lk({client:this.client})}_worktree;get worktree(){return this._worktree??=new Fk({client:this.client})}_find;get find(){return this._find??=new _k({client:this.client})}_file;get file(){return this._file??=new Gk({client:this.client})}_instance;get instance(){return this._instance??=new Rk({client:this.client})}_path;get path(){return this._path??=new Uk({client:this.client})}_vcs;get vcs(){return this._vcs??=new Kk({client:this.client})}_command;get command(){return this._command??=new qk({client:this.client})}_lsp;get lsp(){return this._lsp??=new Tk({client:this.client})}_formatter;get formatter(){return this._formatter??=new Jk({client:this.client})}_mcp;get mcp(){return this._mcp??=new Yk({client:this.client})}_project;get project(){return this._project??=new Pk({client:this.client})}_pty;get pty(){return this._pty??=new Vk({client:this.client})}_question;get question(){return this._question??=new jk({client:this.client})}_permission;get permission(){return this._permission??=new $k({client:this.client})}_provider;get provider(){return this._provider??=new Wk({client:this.client})}_session;get session(){return this._session??=new Zk({client:this.client})}_part;get part(){return this._part??=new Xk({client:this.client})}_sync;get sync(){return this._sync??=new e3({client:this.client})}_tui;get tui(){return this._tui??=new r3({client:this.client})}_agentBuilder;get agentBuilder(){return this._agentBuilder??=new o3({client:this.client})}_backgroundProcess;get backgroundProcess(){return this._backgroundProcess??=new s3({client:this.client})}_branchName;get branchName(){return this._branchName??=new a3({client:this.client})}_commitMessage;get commitMessage(){return this._commitMessage??=new l3({client:this.client})}_enhancePrompt;get enhancePrompt(){return this._enhancePrompt??=new g3({client:this.client})}_indexing;get indexing(){return this._indexing??=new c3({client:this.client})}_interactiveTerminal;get interactiveTerminal(){return this._interactiveTerminal??=new d3({client:this.client})}_kilo;get kilo(){return this._kilo??=new h3({client:this.client})}_kilocode;get kilocode(){return this._kilocode??=new y3({client:this.client})}_anacondaDesktop;get anacondaDesktop(){return this._anacondaDesktop??=new D3({client:this.client})}_network;get network(){return this._network??=new k3({client:this.client})}_remote;get remote(){return this._remote??=new b3({client:this.client})}_sandbox;get sandbox(){return this._sandbox??=new v3({client:this.client})}_suggestion;get suggestion(){return this._suggestion??=new M3({client:this.client})}_telemetry;get telemetry(){return this._telemetry??=new N3({client:this.client})}_memory;get memory(){return this._memory??=new x3({client:this.client})}_v2;get v2(){return this._v2??=new j3({client:this.client})}}function $3(e,A,t,n){if(!n?.throwOnError||e instanceof Error)return e;if(typeof e=="object"&&e!==null&&Object.keys(e).length>0){const r=e,o=typeof r.data?.message=="string"&&r.data.message||typeof r.message=="string"&&r.message||typeof r.name=="string"&&r.name||FQ(t,A);return new Error(o,{cause:{body:e,status:A?.status}})}if(typeof e=="string"&&e.length>0)return new Error(e,{cause:{body:e,status:A?.status}});const i=A?"(empty response body)":"network error (no response)";return new Error(`kilo server ${FQ(t,A)}: ${i}`,{cause:{body:e,status:A?.status}})}function FQ(e,A){const t=e?.method??"?",n=e?.url??"?",i=A?.status,r=A?.statusText;return`${t} ${n}${i?" → "+i:""}${r?" "+r:""}`}function z3(e,A,t){if(e)return A&&(e===A||t&&e===t(A))?A:e}function W3(e,A){if(e.method!=="GET"&&e.method!=="HEAD")return e;const t=new URL(e.url);let n=!1;for(const[r,o]of[["x-kilo-directory","directory"],["x-kilo-workspace","workspace"]]){const s=z3(e.headers.get(r),o==="directory"?A.directory:A.workspace,o==="directory"?encodeURIComponent:void 0);if(s){for(const a of t.pathname.startsWith("/api/")?[o,`location[${o}]`]:[o])t.searchParams.has(a)||t.searchParams.set(a,s);n=!0}}if(!n)return e;const i=new Request(t,e);return i.headers.delete("x-kilo-directory"),i.headers.delete("x-kilo-workspace"),i}function Z3(e){e?.fetch||(e={...e,fetch:n=>fetch(n,{duplex:"half",timeout:!1})}),e?.directory&&(e.headers={...e.headers,"x-kilo-directory":encodeURIComponent(e.directory)}),e?.experimental_workspaceID&&(e.headers={...e.headers,"x-kilo-workspace":e.experimental_workspaceID}),e.duplex="half";const A=Zu(e);return A.interceptors.request.use(t=>W3(t,{directory:e?.directory,workspace:e?.experimental_workspaceID})),A.interceptors.response.use(t=>{if(t.headers.get("content-type")==="text/html")throw new Error("Request is not supported by this version of OpenCode Server (Server responded with text/html)");return t}),A.interceptors.error.use($3),new p0({client:A})}const X3=Array.from({length:20},(e,A)=>4097+A),Ab=1440*60*1e3,m0="kilo.config.server",Cr={},w0=window.fetch.bind(window);function eb(e){const A=new TextEncoder().encode(e);return btoa(String.fromCharCode(...A))}function _Q(e){return e?decodeURIComponent(e):""}function Oa(e){const A=new URL(e),t=_Q(A.username)||"kilo",n=_Q(A.password)||"kilo";return A.username="",A.password="",A.search="",A.hash="",{url:A.toString().replace(/\/$/,""),token:eb(`${t}:${n}`)}}function ee(e){const A=Oa(e.url);return Z3({baseUrl:A.url,directory:Ka(e.dir),headers:{Authorization:`Basic ${A.token}`},fetch:w0})}function Ka(e){const A=e.trim();if(A)return A}function Ps(e){return e instanceof Error?e.message:typeof e=="string"?e:e==null?"Unknown error":JSON.stringify(e)}function UA(e,A){if(A.error)throw new Error(`${e}: ${Ps(A.error)}`);if(A.data===void 0)throw new Error(`${e}: empty response`);return A.data}async function tb(e){const t=(await Ta(e)).find(n=>n.id===e.project);if(!t)throw new Error(`Project not found: ${e.project}`);return t}async function ct(e,A){return await A.then(t=>{if(t.error){console.warn(`${e}: ${Ps(t.error)}`);return}return t.data}).catch(t=>{console.warn(`${e}: ${Ps(t)}`)})}function nb(e){if(typeof e!="string")return;const A=e.indexOf("/");if(!(A<=0||A>=e.length-1))return{provider:e.slice(0,A),model:e.slice(A+1)}}function qa(e){const A=Ka(e.dir);return A?{directory:A}:void 0}function ib(e){return e.split("_").filter(Boolean).map(A=>A.charAt(0).toUpperCase()+A.slice(1)).join(" ")}function rb(e){return{keybinds:Object.entries(e.keybinds??{}).map(([A,t])=>({id:A,label:ib(A),group:"Configured",default:t??"none",description:"Configured TUI keybind"}))}}function Vs(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")||"/"}function ob(e,A){const t=Vs(e),n=Vs(A);return n===t?!0:n.startsWith(`${t}/`)}function AI(e){return e.id!=="global"?!0:Vs(e.worktree)!=="/"}function sb(e,A){return[e.worktree,...e.sandboxes].reduce((t,n)=>ob(n,A)?Math.max(t,Vs(n).length):t,-1)}function ab(e,A){const t=e.find(n=>n.id===A.projectID);return t||e.reduce((n,i)=>{const r=sb(i,A.directory);return r<=n.score?n:{item:i,score:r}},{score:-1}).item}async function eI(e){const A=new AbortController,t=window.setTimeout(()=>A.abort(),400),n=Oa(e);return await w0(`${n.url}/global/health`,{headers:{Authorization:`Basic ${n.token}`},signal:A.signal}).then(i=>i.ok?e:void 0).catch(()=>{}).finally(()=>window.clearTimeout(t))}function lb(e){return Array.isArray(e)?e.filter(A=>{if(!A||typeof A!="object")return!1;const t=A;return typeof t.id=="string"&&typeof t.worktree=="string"&&typeof t.time?.updated=="number"}):[]}function gb(e){return e.reduce((A,t)=>Math.max(A,t.time.updated),0)}async function cb(e){if(!await eI(e))return;const t=new AbortController,n=window.setTimeout(()=>t.abort(),400),i=Oa(e);return await w0(`${i.url}/project`,{headers:{Authorization:`Basic ${i.token}`},signal:t.signal}).then(async r=>{if(!r.ok)return{url:e,count:0,time:0};const o=lb(await r.json()).filter(AI);return{url:e,count:o.length,time:gb(o)}}).catch(()=>({url:e,count:0,time:0})).finally(()=>window.clearTimeout(n))}function GQ(e){return Number(new URL(e).port)||0}function RQ(e){return new URL(e).hostname==="127.0.0.1"?1:0}function G1(){return window.localStorage.getItem(m0)??""}function Xe(e){window.localStorage.setItem(m0,e)}function ri(){window.localStorage.removeItem(m0)}async function db(e){return await eI(e)!==void 0}async function Qb(){const e=X3.flatMap(t=>[`http://127.0.0.1:${t}`,`http://localhost:${t}`]);return(await Promise.all(e.map(cb))).filter(t=>t!==void 0).toSorted((t,n)=>n.count-t.count||n.time-t.time||GQ(n.url)-GQ(t.url)||RQ(n.url)-RQ(t.url))[0]?.url}async function oi(){if(Cr.run)return await Cr.run;const e=Qb().finally(()=>{Cr.run===e&&(Cr.run=void 0)});return Cr.run=e,await e}async function Wi(){const e=await oi();if(e)return e;const A=G1();if(A){if(await db(A))return A;ri()}}async function Bb(e){const A=ee(e),[t,n,i,r,o,s,a,l,g,c,d,Q]=await Promise.all([A.global.health(),A.config.overlay({scope:e.scope}),A.config.modelState(),A.provider.list(),A.provider.auth(),A.tui.config.get(),ct("TUI keybinds",A.tui.keybind.list()),A.tool.ids(),A.mcp.status(),A.lsp.status(),A.formatter.status(),A.app.agents()]),B=UA("Config overlay",n),C=nb(B.effective.model),h=C?await ct("Tool metadata",A.tool.list(C)):void 0,I=UA("TUI config",s);return{health:UA("Health",t),effective:B.effective,overlay:B,sources:{sources:B.sources},modelState:UA("Model state",i),providers:UA("Providers",r),authMethods:UA("Provider auth methods",o),tui:I,keybinds:a??rb(I),tools:UA("Tools",l),toolDetails:h??[],mcp:UA("MCP status",g),lsp:UA("LSP status",c),formatter:UA("Formatter status",d),agents:UA("Agents",Q)}}async function Eb(e){return UA("Kilo embedding models",await ee(e).indexing.models())}async function tI(e){const t=await ee(e).kilo.profile(qa(e));return UA("Kilo profile",t)}async function Cb(e,A){const t=ee(e),n=await t.kilo.organization.set({...qa(e),organizationId:A});UA("Switch Kilo account",n),await t.global.dispose()}async function ub(e){const A=ee(e),t=await A.auth.remove({providerID:"kilo"});UA("Log out of Kilo",t),await A.global.dispose()}async function Ib(e){const t=await ee(e).provider.oauth.authorize({...qa(e),providerID:"kilo",method:0});return UA("Start Kilo login",t)}async function hb(e,A){const t=ee(e),n=await t.provider.oauth.callback({...qa(e),providerID:"kilo",method:0},A?{signal:A}:void 0);UA("Complete Kilo login",n),await t.global.dispose()}async function nI(e){const A=ee(e),t=Ka(e.dir),n=await A.project.list(t?{directory:t}:void 0);return UA("Projects",n)}async function Ta(e){return(await nI(e)).filter(AI)}async function fb(e){const A=ee(e),[t,n]=await Promise.all([Ta(e),A.experimental.session.list({archived:!1,start:Date.now()-Ab,limit:500})]),i=UA("Recent sessions",n),r=new Map;for(const o of i){const s=ab(t,o);s&&r.set(s.id,(r.get(s.id)??0)+1)}return t.map(o=>({...o,sessions:r.get(o.id)??0})).filter(o=>o.sessions>0)}async function pb(e){const A=await tb(e),t={url:e.url,dir:A.worktree},n=ee(t),[i,r,o]=await Promise.all([n.config.overlay({scope:"global"}),n.vcs.get({directory:t.dir}),n.worktree.list({directory:t.dir})]),s=UA("Config",i),a=UA("Worktrees",o),l=await Promise.all([t.dir,...a.map(g=>g.directory)].map(g=>Db({url:e.url},g)));return{project:A,config:s.global,vcs:UA("VCS",r),worktrees:a,terminals:l.flat()}}async function mb(e,A){const t=ee(e),n=A?.trim(),i=await t.worktree.create({directory:e.dir,...n?{worktreeCreateInput:{name:n}}:{}});return UA("Create worktree",i)}async function wb(e,A){const n=await ee(e).worktree.remove({directory:e.dir,worktreeRemoveInput:{directory:A}});return UA("Remove worktree",n)}async function yb(e,A){const n=await ee(e).worktree.reset({directory:e.dir,worktreeResetInput:{directory:A}});return UA("Reset worktree",n)}async function Db(e,A){const t=ee({url:e.url,dir:A}),[n,i,r,o]=await Promise.all([t.pty.list({directory:A}),ct("Session status",t.session.status({directory:A})),ct("Pending permissions",t.permission.list({directory:A})),ct("Pending questions",t.question.list({directory:A}))]),s=UA("Terminals",n),a=i??{},l=UQ(r??[]),g=UQ(o??[]),c=new Map;return await Promise.all(s.map(async d=>{if(!d.sessionID||c.has(d.sessionID))return;const Q=await ct("Session",t.session.get({directory:A,sessionID:d.sessionID}));Q&&c.set(d.sessionID,Q)})),s.map(d=>{const Q=d.sessionID?c.get(d.sessionID):void 0;return{...d,directory:A,session:Q,sessionStatus:d.sessionID?a[d.sessionID]:void 0,attention:d.sessionID?vb(d.sessionID,l,g):void 0}})}function iI(e){return new Set(e.flatMap(A=>A.sessionID?[A.sessionID]:[]))}function UQ(e){return new Set(e.map(A=>A.sessionID))}function OQ(e,A){return e.some(t=>A.has(t.sessionID))}async function kb(e,A){const t=ee({url:e.url,dir:A}),[n,i,r,o]=await Promise.all([ct("Session status",t.session.status({directory:A})),ct("Terminals",t.pty.list({directory:A})),ct("Pending permissions",t.permission.list({directory:A})),ct("Pending questions",t.question.list({directory:A}))]),s=iI(i??[]),a=Object.entries(n??{}).some(([g,c])=>s.has(g)&&c.type!=="idle"),l=OQ(r??[],s)||OQ(o??[],s);return{busy:a,attention:l}}async function bb(e,A){const t=ee({url:e.url,dir:A}),n=await ct("Terminals",t.pty.list({directory:A}));return iI(n??[])}function vb(e,A,t){if(A.has(e))return"permission";if(t.has(e))return"question"}async function Mb(e,A){const n=await ee({url:e.url,dir:A}).worktree.diffSummary({directory:A});return UA("Worktree diff",n)}async function Nb(e,A,t){const i=await ee({url:e.url,dir:A}).worktree.diffFile({directory:A,file:t});return UA("Worktree diff file",i)}async function xb(e,A,t="Kilo session"){const i=await ee({url:e.url,dir:A}).pty.create({directory:A,command:"kilo",cwd:A,title:t});return UA("Create terminal",i)}async function Sb(e,A){const n=await ee({url:e.url,dir:e.dir}).pty.remove({directory:e.dir,ptyID:A});return UA("Remove terminal",n)}async function KQ(e,A,t,n){const r=await ee(e).session.viewed({directory:e.dir,viewer:A,attached:t,visible:n});return UA("Viewed sessions",r)}function rI(e,A){const t=ee(e),n=new AbortController;return(async()=>{const i=await t.global.event({signal:n.signal,sseMaxRetryAttempts:0});for await(const r of i.stream){if(n.signal.aborted)return;A(r)}})().catch(i=>{n.signal.aborted||console.warn(`Project events: ${Ps(i)}`)}),()=>n.abort()}async function Lb(e,A,t,n){const r=await ee({url:e.url,dir:e.dir}).pty.update({directory:e.dir,ptyID:A,size:{cols:t,rows:n}});return UA("Resize terminal",r)}function Fb(e,A,t=0){const n=Oa(e.url),i=new URL(`/pty/${encodeURIComponent(A)}/connect`,n.url);return i.protocol=i.protocol==="https:"?"wss:":"ws:",i.searchParams.set("directory",e.dir),i.searchParams.set("cursor",String(t)),i.searchParams.set("auth_token",n.token),i.toString()}async function Ao(e,A,t){const n=ee(e),i=Object.keys(A).length?A:void 0,r=await n.config.overlayUpdate({directory:Ka(e.dir),scope:e.scope,set:i,unset:t});return UA("Update config",r)}async function _b(e,A){return Ao(e,A)}async function Gb(e,A){return Ao(e,{},A)}async function Rb(e,A){const n=await ee(e).config.modelStateUpdate({favorite:A});return UA("Update model state",n)}async function Ub(e,A,t,n){const i=ee(e),r=n?{type:"api",key:t,metadata:n}:{type:"api",key:t},o=await i.auth.set({providerID:A,auth:r});UA("Connect provider",o),await i.global.dispose()}async function Ob(e,A,t,n){const r=await ee(e).provider.oauth.authorize({providerID:A,method:t,inputs:n});return UA("Authorize provider",r)}async function Kb(e,A,t,n){const i=ee(e),r=await i.provider.oauth.callback({providerID:A,method:t,code:n});UA("Complete provider authorization",r),await i.global.dispose()}async function qb(e,A){const n=await ee(e).mcp.connect({name:A});return UA("Connect MCP server",n)}async function Tb(e,A){const n=await ee(e).mcp.disconnect({name:A});return UA("Disconnect MCP server",n)}async function Jb(e,A){const n=await ee(e).mcp.auth.authenticate({name:A});return UA("Authenticate MCP server",n)}async function Hb(e,A){const n=await ee(e).tui.config.update({scope:e.scope,...A});return UA("Update TUI config",n)}async function Yb(e,A){const n=await ee(e).agentBuilder.preview(A);return UA("Preview agent",n)}async function Pb(e,A){const n=await ee(e).agentBuilder.save({path_id:A.id,scope:A.scope,description:A.description,mode:A.mode,model:A.model,color:A.color,steps:A.steps,tools:A.tools,permission:A.permission,prompt:A.prompt});return UA("Save agent",n)}function Vb(e){return!e||e==="normal"?"default":e==="small"?"sm":e==="large"?"lg":e}function jb(e){return!e||e==="default"?"primary":e}function BA(e){const[A,t]=uA(e,["variant","size","icon","class","classList","children"]);return E(Ra,gA(t,{"data-component":"button",get"data-size"(){return Vb(A.size)},get"data-variant"(){return jb(A.variant)},get"data-icon"(){return A.icon?"inline-start":void 0},get classList(){return{...A.classList,[A.class??""]:!!A.class}},get children(){return[E(H,{get when(){return A.icon},children:n=>E(S1,{get name(){return n()},size:"small"})}),MA(()=>A.children)]}}))}function $b(e,A){const t=Object.fromEntries(Object.entries(A).filter(n=>n[1]!==void 0));if(typeof e=="string"){const n=Object.entries(t).map(i=>`${i[0]}:${i[1]}`).join(";");return n?`${e};${n}`:e}return{...e??{},...t}}var zb=v("<div>");function ZA(e){const[A,t]=uA(e,["variant","size","padding","style","class","classList","children"]),n=()=>typeof A.padding=="number"?`${A.padding}px`:A.padding;return(()=>{var i=zb();return f1(i,gA(t,{"data-component":"card",get"data-variant"(){return A.variant??"normal"},get"data-size"(){return A.size??"default"},get style(){return $b(A.style,{"--kw-card-padding":n()})},get classList(){return{...A.classList,[A.class??""]:!!A.class}}}),!1,!0),f(i,()=>A.children),i})()}var Wb=v("<span>");function oI(e){const[A,t]=uA(e,["size","tone","class","classList","children"]);return(()=>{var n=Wb();return f1(n,gA(t,{"data-component":"tag",get"data-size"(){return A.size??"normal"},get"data-tone"(){return A.tone??"neutral"},get classList(){return{...A.classList,[A.class??""]:!!A.class}}}),!1,!0),f(n,()=>A.children),n})()}var Zb=v("<span data-slot=status-dot aria-hidden=true>"),Xb=v("<p>"),A8=v("<section data-component=section-title><div><h2>"),e8=v("<div data-component=banner role=alert><div><span>"),t8=v("<strong>"),n8=v("<span data-slot=config-row-accent>"),i8=v("<div data-slot=config-row-body><div data-slot=config-row-title>"),r8=v("<div data-slot=config-row-trailing>"),o8=v("<div data-slot=config-row-leading>"),s8=v("<div data-slot=config-row-subtitle>"),a8=v("<div data-slot=config-row-actions>"),l8=v("<a data-component=config-row>"),g8=v("<button type=button data-component=config-row>"),c8=v("<div data-component=config-row>");function Ae(e){return E(oI,gA(e,{"data-slot":"config-tag"}))}function Me(e){return E(Ae,gA(e,{tone:"neutral"}))}function sI(e){return e.source==="project"||e.source==="local override"?"project":e.source==="global"||e.source==="inherited"?"global":e.overridden?"project":e.inherited?"global":"default"}function aI(e){return(()=>{var A=Zb();return P(()=>z(A,"data-tone",e.tone)),A})()}function eo(e){const A=()=>["connected","healthy","running"].includes(e.status)?{tone:"success",label:e.status==="healthy"?"Healthy":e.status==="running"?"Running":"Connected"}:["failed","error","unhealthy"].includes(e.status)?{tone:"critical",label:e.status==="unhealthy"?"Unhealthy":e.status==="failed"?"Failed":"Error"}:e.status==="stopped"?{tone:"neutral",label:"Stopped"}:{tone:"neutral",label:e.status||"Unknown"};return E(Ae,{get tone(){return A().tone},class:"kw-status-tag",get children(){return[E(aI,{get tone(){return MA(()=>A().tone==="critical")()?"critical":A().tone==="success"?"success":"neutral"}}),MA(()=>A().label)]}})}function lI(e){const A=()=>sI(e),t=()=>A().toUpperCase();return E(Ae,{class:"mono",get tone(){return A()==="project"?"info":"neutral"},get children(){return t()}})}function Ct(e){return(()=>{var A=A8(),t=A.firstChild,n=t.firstChild;return f(n,()=>e.children),f(t,()=>e.trailing,null),f(A,E(H,{get when(){return e.description},children:i=>(()=>{var r=Xb();return f(r,i),r})()}),null),A})()}function d8(e){const A=()=>e.tone==="critical"||e.tone==="warning"?"warning":e.tone==="success"?"circle-check":"help";return(()=>{var t=e8(),n=t.firstChild,i=n.firstChild;return f(t,E(S1,{get name(){return A()},size:"small"}),n),f(n,E(H,{get when(){return e.title},children:r=>(()=>{var o=t8();return f(o,r),o})()}),i),f(i,()=>e.children),f(t,()=>e.action,null),P(()=>z(t,"data-tone",e.tone??"info")),t})()}function x1(e){const A=()=>sI({source:e.source})==="project"||e.highlightOverride,t=()=>[E(H,{get when(){return A()},get children(){return n8()}}),E(H,{get when(){return e.leading},children:n=>(()=>{var i=o8();return f(i,n),i})()}),(()=>{var n=i8(),i=n.firstChild;return f(i,()=>e.title),f(n,E(H,{get when(){return e.subtitle},children:r=>(()=>{var o=s8();return f(o,r),o})()}),null),n})(),(()=>{var n=r8();return f(n,E(H,{get when(){return e.source!==void 0},get children(){return E(lI,{get source(){return e.source}})}}),null),f(n,()=>e.status,null),f(n,E(H,{get when(){return e.actions},children:i=>(()=>{var r=a8();return f(r,i),r})()}),null),n})()];return e.href?(()=>{var n=l8();return f(n,t),P(i=>{var r=A()||void 0,o=e.href;return r!==i.e&&z(n,"data-override",i.e=r),o!==i.t&&z(n,"href",i.t=o),i},{e:void 0,t:void 0}),n})():e.onClick?(()=>{var n=g8();return re(n,"click",e.onClick,!0),f(n,t),P(()=>z(n,"data-override",A()||void 0)),n})():(()=>{var n=c8();return f(n,t),P(()=>z(n,"data-override",A()||void 0)),n})()}Ee(["click"]);var Q8=v("<details><summary></summary><div class=models-select-menu role=listbox>"),B8=v("<button class=models-select-option type=button role=option>");function W1(e){const A=()=>e.options.find(i=>i.value===e.value)?.label??e.value;function t(i,r){e.disabled||i.disabled||(e.onSelect(i.value),r.currentTarget.closest("details")?.removeAttribute("open"))}function n(i){if(e.disabled){i.currentTarget.removeAttribute("open");return}i.currentTarget.open&&i.currentTarget.parentElement?.querySelectorAll(".models-select[open]").forEach(r=>{r!==i.currentTarget&&r.removeAttribute("open")})}return(()=>{var i=Q8(),r=i.firstChild,o=r.nextSibling;return i.addEventListener("toggle",n),f(r,A),f(o,E(vA,{get each(){return e.options},children:s=>(()=>{var a=B8();return a.$$click=l=>t(s,l),f(a,()=>s.label),P(l=>{var g=s.value===e.value,c=!!s.disabled,d=s.value===e.value,Q=e.disabled||s.disabled;return g!==l.e&&a.classList.toggle("selected",l.e=g),c!==l.t&&a.classList.toggle("disabled",l.t=c),d!==l.a&&z(a,"aria-selected",l.a=d),Q!==l.o&&(a.disabled=l.o=Q),l},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()})),P(s=>{var a=`models-select ${e.class??""}`,l=!!e.disabled,g=!!e.invalid,c=e.label,d=e.disabled,Q=e.label;return a!==s.e&&Vn(i,s.e=a),l!==s.t&&i.classList.toggle("disabled",s.t=l),g!==s.a&&i.classList.toggle("invalid",s.a=g),c!==s.o&&z(r,"aria-label",s.o=c),d!==s.i&&z(r,"aria-disabled",s.i=d),Q!==s.n&&z(o,"aria-label",s.n=Q),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i})()}Ee(["click"]);var E8=v("<label data-component=search-field><span data-slot=search-label></span><input>");function At(e){const[A,t]=uA(e,["label","value","variant","hideLabel","inputClass","class","classList","onValue"]);return(()=>{var n=E8(),i=n.firstChild,r=i.nextSibling;return f(i,()=>A.label),f1(r,gA(t,{get class(){return A.inputClass},type:"search",get value(){return A.value},get"aria-label"(){return MA(()=>A.hideLabel===!1)()?void 0:A.label},onInput:o=>A.onValue(o.currentTarget.value)}),!1,!1),P(o=>{var s=A.variant??"list",a=A.hideLabel===!1?"visible":"hidden",l={...A.classList,[A.class??""]:!!A.class};return s!==o.e&&z(n,"data-variant",o.e=s),a!==o.t&&z(n,"data-label",o.t=a),o.a=$i(n,l,o.a),o},{e:void 0,t:void 0,a:void 0}),n})()}const gI=we();function ze(){const e=fe(gI);if(!e)throw new Error("useConfig must be used within ConfigLayout");return e}function y0(){return"/console/".replace(/\/$/,"")}function wo(e,A=y0()){return!A||A==="/"?e:e===A?"/":e.startsWith(`${A}/`)?e.slice(A.length):e}function cI(e,A=y0()){const t=wo(e,A),n=t.indexOf("/settings");return n>0?`${t.slice(0,n)}/settings`:t.startsWith("/config")?"/config":"/settings"}function C8(e,A=y0()){const t=wo(e,A);return t==="/profile"||t.startsWith("/kilo/login")?"/profile":t.startsWith("/settings")||t.startsWith("/config")?"/settings":t.startsWith("/projects/")?"/project":"/projects"}const u8={apply_patch:"Apply Patch",bash:"Bash",edit:"Edit File",glob:"Find Files",grep:"Search Content",lsp:"Language Server",question:"Ask User",read:"Read File",recall:"Local Recall",skill:"Load Skill",task:"Subagent Task",todowrite:"Todo List",webfetch:"Fetch URL",websearch:"Web Search",write:"Write File"},I8={apply_patch:["Apply structured patches to add, update, move, or delete files.","Keeps edits explicit and easy to review."],bash:["Run shell commands in the current workspace.","Supports timeouts, working directories, and command descriptions."],edit:["Replace exact text inside an existing file.","Can update one match or all matches when needed."],glob:["Find files by path patterns.","Useful for locating files before reading or editing them."],grep:["Search file contents with regular expressions.","Can limit results to a file pattern such as TypeScript or CSS files."],lsp:["Use language-server features for code navigation.","Supports operations such as definitions, references, and diagnostics."],question:["Ask the user for a decision during execution.","Supports single-choice and multi-choice prompts."],read:["Read files, directories, images, and PDFs from the workspace.","Supports line offsets and limits for large files."],recall:["Search and read previous project conversations.","Useful for recovering prior decisions or implementation context."],skill:["Load task-specific instructions and workflows.","Applies specialized repo guidance when a matching skill exists."],task:["Delegate focused exploration or implementation work to a subagent.","Useful for parallel codebase research and complex subtasks."],todowrite:["Track multi-step implementation work.","Shows progress with pending, in-progress, and completed states."],webfetch:["Fetch and convert web pages for analysis.","Supports markdown, text, and HTML output formats."],websearch:["Search the web for external information.","Supports fast, automatic, and deep search modes."],write:["Create or overwrite files with complete contents.","Best for new files or full-file replacements."]},h8=new Set(["api","html","id","json","lsp","mcp","pdf","url"]);function OA(e){return e.trim()}function Un(e){return e==null||e===""?"Not set":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)??"Unserializable value"}function dI(e){return[...e].sort((A,t)=>A.localeCompare(t))}function tc(e){return e.split(/\s+/).map(A=>A.trim()).filter(Boolean)}function F1(e){return e.trim().split(/[\s._/-]+/).filter(Boolean).map(A=>/^[A-Z0-9]+$/.test(A)&&A.length<=4?A:`${A[0]?.toUpperCase()??""}${A.slice(1).toLowerCase()}`).join(" ")}function f8(e){const A=e.toLowerCase();return h8.has(A)?A.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function qQ(e){return e.length<=180?e:`${e.slice(0,177)}...`}function p8(e){const A=e.replace(/```[\s\S]*?```/g," ").replace(/[*`#>_-]+/g," ").replace(/\s+/g," ").trim(),t=A.split(/(?:\.|\?|!)\s+/).map(n=>n.trim()).filter(Boolean).slice(0,2);return t.length?t.map(qQ):A?[qQ(A)]:[]}function bt(e){const A=u8[e];if(A)return A;const t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[._:/-]+/g," ").replace(/\s+/g," ").trim();return t?t.split(" ").map(f8).join(" "):e}function D0(e){const A=I8[e.id];if(A)return A;const t=e.detail?.description.trim();return t?p8(t):["No capability description is available for this tool."]}function _i(e){return e.split(",").map(A=>A.trim()).filter(Boolean)}function TQ(e){return!e||typeof e!="object"||Array.isArray(e)?0:Object.keys(e).length}function be(e){return e instanceof Error?e.message:typeof e=="string"?e:Un(e)}function m8(e){return e==="subagent"?"subagent":e==="all"?"all":"primary"}var w8=v("<main class=config-page><section class=config-page-header><div><h1>"),y8=v("<p>"),D8=v("<div class=config-page-actions>"),k8=v("<section class=config-toolbar>"),b8=v("<div class=config-toolbar-controls>"),v8=v("<div class=config-toolbar-meta>");function We(e){return(()=>{var A=w8(),t=A.firstChild,n=t.firstChild,i=n.firstChild;return f(i,()=>e.title),f(n,E(H,{get when(){return e.description},children:r=>(()=>{var o=y8();return f(o,r),o})()}),null),f(t,E(H,{get when(){return e.actions},children:r=>(()=>{var o=D8();return f(o,r),o})()}),null),f(A,()=>e.children,null),A})()}function QI(e){return E(H,{get when(){return e.children||e.meta},get children(){var A=k8();return f(A,E(H,{get when(){return e.children},children:t=>(()=>{var n=b8();return f(n,t),n})()}),null),f(A,E(H,{get when(){return e.meta},children:t=>(()=>{var n=v8();return f(n,t),n})()}),null),A}})}function Oe(e){return E(lI,e)}const BI=[{value:"ask",label:"Ask"},{value:"allow",label:"Allow"},{value:"deny",label:"Deny"}],$t=[{id:"external_directory",title:"External Directory",description:"Access files outside the project directory.",noun:"path",placeholder:"e.g. ~/Downloads/**"},{id:"bash",title:"Bash",description:"Run shell commands.",noun:"command",placeholder:"e.g. git status or npm *"},{id:"read",title:"Read",description:"Read files by matching file paths.",noun:"path",placeholder:"e.g. **/*.env"},{id:"edit",title:"Edit",description:"Modify files, including writes, patches, and multi-edits.",noun:"path",placeholder:"e.g. src/**/*.ts"}],k0=[{id:"glob",title:"Glob",description:"Match files using glob patterns."},{id:"grep",title:"Grep",description:"Search file contents using regular expressions."},{id:"list",title:"List",description:"List files within a directory."},{id:"task",title:"Task",description:"Launch sub-agents."},{id:"skill",title:"Skill",description:"Load a skill by name."},{id:"lsp",title:"LSP",description:"Run language server queries."},{id:"todowrite",title:"Todo Write",description:"Update the todo list."},{id:"question",title:"Question",description:"Ask the user a question."},{id:"webfetch",title:"Web Fetch",description:"Fetch content from a URL."},{id:"websearch",title:"Web Search",description:"Search the web."},{id:"doom_loop",title:"Doom Loop",description:"Detect repeated tool calls with identical input."},{id:"agent_manager",title:"Agent Manager",description:"Manage Agent Manager operations."}],EI=[...$t,...k0],M8=new Set($t.map(e=>e.id)),N8=new Set(EI.map(e=>e.id));function b0(e,A="ask"){return e==="ask"||e==="allow"||e==="deny"?e:A}function Ja(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function CI(e){return Ja(e.effective.permission)}function v0(e,A){return e.overlay.collections.permission?.find(t=>t.key===A)}function uI(e,A){return typeof e.effective.permission=="string"?e.effective.permission:CI(e)[A]}function II(e){return b0(e.effective.permission)}function x8(e,A){return e?A==="*"&&typeof e.value=="string"?e.path:[...e.path,A]:["permission",A]}function to(e,A,t,n){if(!(t!=="ask"&&t!=="allow"&&t!=="deny"))return{tool:e,pattern:A,action:t,source:n?.source??"default",inherited:n?.inherited??!1,overridden:n?.overridden??!1,path:n?x8(n,A):["permission",e,A]}}function S8(e){const A=e.value;if(A&&typeof A=="object"&&!Array.isArray(A))return Object.entries(A).flatMap(([n,i])=>to(e.key,n,i,e)??[]);const t=to(e.key,"*",A,e);return t?[t]:[]}function L8(e,A,t){const n=Ja(A);if(Object.keys(n).length)return Object.entries(n).flatMap(([r,o])=>to(e,r,o,t)??[]);const i=to(e,"*",A,t);return i?[i]:[]}function F8(e,A){const t=v0(e,A.id),n=uI(e,A.id),i=Ja(n),r=II(e);return{...A,action:b0(typeof n=="string"?n:i["*"],r),source:t?.source??"default",inherited:t?.inherited??!1,overridden:t?.overridden??!1}}function _8(e,A){const t=v0(e,A.id),n=uI(e,A.id),i=Ja(n),r=II(e);return{...A,action:b0(typeof n=="string"?n:i["*"],r),source:t?.source??"default",inherited:t?.inherited??!1,overridden:t?.overridden??!1,rules:Object.entries(i).filter(([o])=>o!=="*").flatMap(([o,s])=>to(A.id,o,s,t)??[])}}function G8(){const e=ze(),A=()=>e.data(),[t,n]=R("closed"),[i,r]=R("external_directory"),[o,s]=R(""),[a,l]=R("ask"),g=U(()=>(A()?.overlay.collections.permission??[]).flatMap(S8)),c=U(()=>{const w=A();return w?$t.map(m=>_8(w,m)):[]}),d=U(()=>{const w=A();return w?k0.map(m=>F8(w,m)):[]}),Q=U(()=>{const w=A();return w?Object.entries(CI(w)).filter(([m])=>!N8.has(m)).flatMap(([m,y])=>L8(m,y,v0(w,m))).sort((m,y)=>m.tool.localeCompare(y.tool)||m.pattern.localeCompare(y.pattern)):[]}),B=U(()=>$t.find(w=>w.id===i())??$t[0]);function C(w){r(w),s(""),l("ask"),n("rule")}function h(){n("closed")}function I(){const w=A(),m=OA(o());if(!w||!m){e.fail(`Enter a ${B().noun} pattern before saving.`);return}const y={[i()]:{[m]:a()}};e.save({permission:y}),h()}function u(w,m){const y=M8.has(w)?{[w]:{"*":m}}:{[w]:m};e.save({permission:y})}function p(w){e.unset([w.path])}return{ctx:e,mode:t,kind:i,pattern:o,setPattern:s,action:a,setAction:l,rules:g,groups:c,settings:d,other:Q,selected:B,open:C,close:h,add:I,setDefault:u,remove:p}}var nc=v("<div class=permission-row-meta>"),R8=v('<details class="models-select permission-select"><summary></summary><div class=models-select-menu role=listbox>'),U8=v("<button class=models-select-option type=button role=option>"),O8=v("<section class=permission-group><div class=permission-rules>"),K8=v("<div class=permissions><section class=permission-group><div class=permission-rules>"),q8=v("<div class=drawer-scrim>"),T8=v('<aside class="provider-drawer permission-drawer"aria-label="Permission rule configuration"><header class=drawer-header><div><h2></h2><span></span></div></header><div class="provider-form permission-form"><label class="required-field wide"><input></label><label class="required-field wide">Method</label></div><footer class=drawer-footer>'),J8=v("<span class=config-title-count>Permissions"),H8=v("<section class=permission-group><header class=permission-group-header><div class=permission-group-copy><h2></h2><span></span><p></p></div><div class=permission-section-actions></div></header><div class=permission-rules>"),Y8=v("<p class=permission-empty>No specific <!> rules."),P8=v("<span class=permission-pattern>"),V8=v("<span class=permission-subtitle><span></span><span class=permission-pattern>");function hI(e){return e==="allow"?"success":e==="deny"?"critical":"warning"}function M0(e){return BI.find(A=>A.value===e)?.label??e}function JQ(e){return(()=>{var A=nc();return f(A,E(Ae,{get tone(){return hI(e.rule.action)},get children(){return M0(e.rule.action)}}),null),f(A,E(Oe,{get source(){return e.rule.source},get inherited(){return e.rule.inherited},get overridden(){return e.rule.overridden}}),null),A})()}function Gi(e){const A=()=>M0(e.value);function t(i,r){e.disabled||(e.onSelect(i),r.currentTarget.closest("details")?.removeAttribute("open"))}function n(i){if(e.disabled){i.currentTarget.removeAttribute("open");return}i.currentTarget.open&&i.currentTarget.parentElement?.querySelectorAll(".models-select[open]").forEach(r=>{r!==i.currentTarget&&r.removeAttribute("open")})}return(()=>{var i=R8(),r=i.firstChild,o=r.nextSibling;return i.addEventListener("toggle",n),f(r,A),f(o,E(vA,{each:BI,children:s=>(()=>{var a=U8();return a.$$click=l=>t(s.value,l),f(a,()=>s.label),P(l=>{var g=s.value===e.value,c=s.value===e.value;return g!==l.e&&a.classList.toggle("selected",l.e=g),c!==l.t&&z(a,"aria-selected",l.t=c),l},{e:void 0,t:void 0}),a})()})),P(s=>{var a=!!e.disabled,l=e.label,g=e.disabled,c=e.label;return a!==s.e&&i.classList.toggle("disabled",s.e=a),l!==s.t&&z(r,"aria-label",s.t=l),g!==s.a&&z(r,"aria-disabled",s.a=g),c!==s.o&&z(o,"aria-label",s.o=c),s},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()}function j8(){const e=G8();return E(We,{get title(){return(()=>{var A=J8();return A.firstChild,f(A,E(Me,{get children(){return e.groups().length+e.settings().length}}),null),A})()},description:"Control what tools agents can use by default and add pattern-specific allow, ask, or deny rules.",get children(){return[(()=>{var A=K8(),t=A.firstChild,n=t.firstChild;return f(A,E(vA,{get each(){return e.groups()},children:i=>(()=>{var r=H8(),o=r.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling,g=l.nextSibling,c=s.nextSibling,d=o.nextSibling;return f(a,()=>i.title),f(l,()=>i.id),f(g,()=>i.description),f(c,E(Me,{get children(){return i.rules.length}}),null),f(c,E(BA,{icon:"plus",variant:"primary",get disabled(){return!!e.ctx.saving()},onClick:()=>e.open(i.id),children:"Add rule"}),null),f(r,E(x1,{title:"Default method",get subtitle(){return`Used for ${i.noun}s that do not match a specific rule.`},get status(){return(()=>{var Q=nc();return f(Q,E(Oe,{get source(){return i.source},get inherited(){return i.inherited},get overridden(){return i.overridden}})),Q})()},get actions(){return E(Gi,{get label(){return`Default method for ${i.title}`},get value(){return i.action},get disabled(){return!!e.ctx.saving()},onSelect:Q=>e.setDefault(i.id,Q)})}}),d),f(d,E(H,{get when(){return i.rules.length},get fallback(){return(()=>{var Q=Y8(),B=Q.firstChild,C=B.nextSibling;return C.nextSibling,f(Q,()=>i.noun,C),Q})()},get children(){return E(vA,{get each(){return i.rules},children:Q=>E(x1,{get title(){return(()=>{var B=P8();return f(B,()=>Q.pattern),B})()},get subtitle(){return`${i.title} ${i.noun} rule`},get status(){return E(JQ,{rule:Q})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${i.title} rule ${Q.pattern}`},get disabled(){return!!e.ctx.saving()},onClick:()=>e.remove(Q)})}})})}})),r})()}),t),f(t,E(Ct,{get trailing(){return E(Me,{get children(){return e.settings().length}})},description:"Default methods for additional built-in tool permissions.",children:"Tool Defaults"}),n),f(n,E(vA,{get each(){return e.settings()},children:i=>E(x1,{get title(){return i.title},get subtitle(){return`${i.id} · ${i.description}`},get status(){return(()=>{var r=nc();return f(r,E(Oe,{get source(){return i.source},get inherited(){return i.inherited},get overridden(){return i.overridden}})),r})()},get actions(){return E(Gi,{get label(){return`Default method for ${i.title}`},get value(){return i.action},get disabled(){return!!e.ctx.saving()},onSelect:r=>e.setDefault(i.id,r)})}})})),f(A,E(H,{get when(){return e.other().length},get children(){var i=O8(),r=i.firstChild;return f(i,E(Ct,{get trailing(){return E(Me,{get children(){return e.other().length}})},description:"Additional tool permission rules from config.",children:"Other Permissions"}),r),f(r,E(vA,{get each(){return e.other()},children:o=>E(x1,{get title(){return bt(o.tool)},get subtitle(){return(()=>{var s=V8(),a=s.firstChild,l=a.nextSibling;return f(a,()=>o.tool),f(l,()=>o.pattern),s})()},get status(){return E(JQ,{rule:o})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${o.tool} rule ${o.pattern}`},get disabled(){return!!e.ctx.saving()},onClick:()=>e.remove(o)})}})})),i}}),null),A})(),E(H,{get when(){return e.mode()==="rule"},get children(){return[(()=>{var A=q8();return re(A,"click",e.close,!0),A})(),(()=>{var A=T8(),t=A.firstChild,n=t.firstChild,i=n.firstChild,r=i.nextSibling,o=t.nextSibling,s=o.firstChild,a=s.firstChild,l=s.nextSibling;l.firstChild;var g=o.nextSibling;return f(i,()=>`Add ${e.selected().title} Rule`),f(r,()=>`${e.selected().id} · ${e.selected().description}`),f(t,E(BA,{variant:"ghost","aria-label":"Close permission rule overlay",get onClick(){return e.close},children:"X"}),null),f(s,()=>e.selected().noun==="command"?"Command pattern":"Path pattern",a),a.$$input=c=>e.setPattern(c.currentTarget.value),z(a,"spellcheck",!1),f(l,E(Gi,{label:"Rule method",get value(){return e.action()},get disabled(){return!!e.ctx.saving()},get onSelect(){return e.setAction}}),null),f(g,E(BA,{variant:"ghost",get onClick(){return e.close},children:"Cancel"}),null),f(g,E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()},get onClick(){return e.add},children:"Save Rule"}),null),P(()=>z(a,"placeholder",e.selected().placeholder)),P(()=>a.value=e.pattern()),A})()]}})]}})}Ee(["click","input"]);const $8=["Review the current diff and report risks, regressions, and missing tests.","Plan the work in small steps, then implement the smallest correct change.","Inspect relevant files first, then summarize the root cause before editing.","Run the smallest relevant validation checks and report any remaining failures."];function z8(e,A){return e.id==="kilo"?-1:A.id==="kilo"?1:e.name.localeCompare(A.name)}function W8(e,A){return e.provider.id===A.providerID&&e.model.id===A.modelID?!0:e.model.providerID===A.providerID&&e.model.id===A.modelID}function Gl(e){const A=OA(e);if(A)return A}function Z8(e){const A=Number(e);if(Number.isInteger(A)&&A>0)return A}function Jt(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function cn(e){return typeof e=="string"?e:""}function X8(e){if(typeof e=="number"&&Number.isFinite(e))return e}function HQ(e,A="ask"){return e==="allow"||e==="deny"||e==="ask"?e:A}function ic(e,A,t){if(!(t!=="allow"&&t!=="deny"&&t!=="ask"))return{tool:e,pattern:A,action:t}}function YQ(e,A){const t=Jt(A);if(Object.keys(t).length)return Object.entries(t).flatMap(([i,r])=>ic(e,i,r)??[]);const n=ic(e,"*",A);return n?[n]:[]}const A7=new Set($t.map(e=>e.id)),e7=new Set(EI.map(e=>e.id));function t7(e){const A=e.options.source;if(typeof A=="string")return A}function n7(e){const A=Object.entries(i7(e));return{tools:dI(A.filter(([,t])=>t==="allow").map(([t])=>t)),permission:Object.fromEntries(A.filter(([,t])=>t!=="allow"))}}function i7(e){return Array.isArray(e)?e.reduce((A,t)=>{const n=Jt(t),i=cn(n.permission),r=cn(n.action);if(!i||!r)return A;const o=cn(n.pattern)||"*";if(o==="*")return{...A,[i]:r};const s=A[i],a=s&&typeof s=="object"&&!Array.isArray(s)?s:{};return{...A,[i]:{...a,[o]:r}}},{}):Jt(e)}function r7(e,A){return(e.overlay.collections.agent??[]).find(t=>t.key===A)}function ur(e){return e.displayName??F1(e.name)}function o7(e){return e.model?`${e.model.providerID}/${e.model.modelID}`:""}function rc(e,A){return!(e.native||A?.inherited||A?.editable===!1||t7(e)==="organization")}function s7(e){const A=ze(),t=()=>A.data(),n=U(()=>A.query()?.scope??"project"),[i,r]=R(),[o,s]=R(!0),[a,l]=R(!1),[g,c]=R("reviewer"),[d,Q]=R(""),[B,C]=R("subagent"),[h,I]=R(""),[u,p]=R(""),[w,m]=R(""),[y,M]=R([]),[D,k]=R(""),[_,L]=R("external_directory"),[x,N]=R(""),[F,J]=R("ask"),[T,V]=R({}),[tA,W]=R(),[oA,CA]=R("closed"),[eA,IA]=R(""),[Y,q]=R(""),[j,nA]=R(""),[Z,cA]=R([]),iA=U(()=>{const X=t();if(!X)return[];const dA=new Set([...Object.keys(X.effective.provider??{}),...X.providers.connected]);return X.providers.all.filter(yA=>dA.has(yA.id)).filter(yA=>Object.keys(yA.models).length>0).sort(z8)}),hA=U(()=>iA().flatMap(X=>Object.values(X.models).map(dA=>({id:`${X.id}/${dA.id}`,provider:X,model:dA})))),fA=U(()=>t()?.modelState.favorite??[]),$=X=>fA().some(dA=>W8(X,dA)),b=U(()=>{const X=eA().trim().toLowerCase();return hA().filter(dA=>X?`${dA.id} ${dA.model.name} ${dA.provider.name}`.toLowerCase().includes(X):!0).sort((dA,yA)=>{const HA=Number($(yA))-Number($(dA));if(HA!==0)return HA;const ce=dA.model.name.localeCompare(yA.model.name);if(ce!==0)return ce;const te=dA.provider.name.localeCompare(yA.provider.name);return te!==0?te:dA.id.localeCompare(yA.id)})}),wA=X=>{if(typeof X=="string")return hA().find(dA=>dA.id===X||`${dA.model.providerID}/${dA.model.id}`===X)},kA=U(()=>wA(h())),bA=U(()=>{const X=t();if(!X)return[];const dA=j().trim().toLowerCase(),yA=new Map(X.toolDetails.map(HA=>[HA.id,HA]));return X.tools.map(HA=>({id:HA,detail:yA.get(HA)})).filter(HA=>dA?`${HA.id} ${bt(HA.id)} ${D0(HA).join(" ")}`.toLowerCase().includes(dA):!0).sort((HA,ce)=>bt(HA.id).localeCompare(bt(ce.id)))}),$A=U(()=>new Set(Z())),qA=U(()=>Object.entries(T()).flatMap(([X,dA])=>YQ(X,dA))),YA=U(()=>$t.map(X=>{const dA=T()[X.id],yA=Jt(dA);return{...X,action:HQ(typeof dA=="string"?dA:yA["*"]),rules:Object.entries(yA).filter(([HA])=>HA!=="*").flatMap(([HA,ce])=>ic(X.id,HA,ce)??[])}})),He=U(()=>k0.map(X=>{const dA=T()[X.id],yA=Jt(dA);return{...X,action:HQ(typeof dA=="string"?dA:yA["*"])}})),ye=U(()=>Object.entries(T()).filter(([X])=>!e7.has(X)).flatMap(([X,dA])=>YQ(X,dA)).sort((X,dA)=>X.tool.localeCompare(dA.tool)||X.pattern.localeCompare(dA.pattern))),ie=U(()=>$t.find(X=>X.id===_())??$t[0]);function GA(X="reviewer"){c(X),Q(""),C("subagent"),I(""),p(""),m(""),M([]),k(""),V({}),W(void 0),l(!1),CA("closed"),L("external_directory"),N(""),J("ask"),IA(""),q(""),nA(""),cA([])}rA(()=>{e?.()||i()!==""&&(GA(),s(!0),r(""))}),rA(()=>{const X=t(),dA=e?.();if(!X||!dA||i()===dA)return;GA(dA),s(!1),r(dA);const yA=X.agents.find(w1=>w1.name===dA);if(!yA){A.fail(`Agent not found: ${dA}`);return}const HA=r7(X,dA),ce=rc(yA,HA);A.fail(""),s(!0),l(!ce);const te=Jt(HA?.value),R1=n7(te.permission??(ce?void 0:yA.permission)),U1=X8(te.steps)??yA.steps;c(yA.name),Q(cn(te.description)||yA.description||""),C(m8(cn(te.mode)||yA.mode)),I(cn(te.model)||o7(yA)),p(cn(te.color)||yA.color||""),m(U1?String(U1):""),M(R1.tools),V(R1.permission),k(cn(te.prompt)||yA.prompt||"")});function VA(){CA("closed")}function NA(){return a()?(A.fail("Inspected agents are read-only."),!1):!0}function Ie(){const X=m1();X&&(W(void 0),CA("markdown"),A.run("Previewing agent",()=>Yb(A.target(),X).then(W),{refetch:!1}))}function ae(){NA()&&(IA(""),q(h()),CA("model"))}function Le(X){q(X.id)}function Ye(){if(!NA())return;const X=Y();if(!X){A.fail("Select a model before saving the agent model field.");return}I(X),VA()}function e1(){NA()&&I("")}function jA(){NA()&&(nA(""),cA(y()),CA("tools"))}function aA(X){if(!NA())return;const dA=new Set(Z());dA.has(X)?dA.delete(X):dA.add(X),cA(dI(dA))}function xA(){NA()&&(M(Z()),VA())}function JA(){NA()&&M([])}function Fe(X){NA()&&(L(X),N(""),J("ask"),CA("permission"))}function Pe(X,dA){if(!NA())return;const yA={...T()};if(!A7.has(X)){yA[X]=dA,V(yA);return}const HA=Jt(yA[X]);yA[X]={...HA,"*":dA},V(yA)}function Ce(){if(!NA())return;const X=OA(x());if(!X){A.fail(`Enter a ${ie().noun} pattern before saving.`);return}const dA=_(),yA={...T()},HA=yA[dA],ce=HA&&typeof HA=="object"&&!Array.isArray(HA)?{...HA}:{};ce[X]=F(),yA[dA]=ce,V(yA),VA()}function Ue(X){if(!NA())return;const dA={...T()};if(X.pattern==="*"){const HA={...Jt(dA[X.tool])};if(Object.keys(HA).length){delete HA["*"],Object.keys(HA).length?dA[X.tool]=HA:delete dA[X.tool],V(dA);return}delete dA[X.tool],V(dA);return}const yA={...Jt(dA[X.tool])};delete yA[X.pattern],Object.keys(yA).length?dA[X.tool]=yA:delete dA[X.tool],V(dA)}function E1(X){if(!NA())return;const dA=OA(D());k(dA?`${dA}
20
+ `);try{V=JSON.parse(W),tA=!0}catch{V=W}}tA&&(i&&await i(V),n&&(V=await n(V))),t?.({data:V,event:T,id:c,retry:C}),J.length&&(yield V)}}}finally{I.removeEventListener("abort",k),M.releaseLock()}break}catch(p){if(A?.(p),o!==void 0&&h>=o)break;const w=Math.min(C*2**(h-1),s??3e4);await d(w)}}}()}},XD=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Ak=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ek=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Vu=({allowReserved:e,explode:A,name:t,style:n,value:i})=>{if(!A){const s=(e?i:i.map(a=>encodeURIComponent(a))).join(Ak(n));switch(n){case"label":return`.${s}`;case"matrix":return`;${t}=${s}`;case"simple":return s;default:return`${t}=${s}`}}const r=XD(n),o=i.map(s=>n==="label"||n==="simple"?e?s:encodeURIComponent(s):Ua({allowReserved:e,name:t,value:s})).join(r);return n==="label"||n==="matrix"?r+o:o},Ua=({allowReserved:e,name:A,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${A}=${e?t:encodeURIComponent(t)}`},ju=({allowReserved:e,explode:A,name:t,style:n,value:i,valueOnly:r})=>{if(i instanceof Date)return r?i.toISOString():`${t}=${i.toISOString()}`;if(n!=="deepObject"&&!A){let a=[];Object.entries(i).forEach(([g,c])=>{a=[...a,g,e?c:encodeURIComponent(c)]});const l=a.join(",");switch(n){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}const o=ek(n),s=Object.entries(i).map(([a,l])=>Ua({allowReserved:e,name:n==="deepObject"?`${t}[${a}]`:a,value:l})).join(o);return n==="label"||n==="matrix"?o+s:s},tk=/\{[^{}]+\}/g,nk=({path:e,url:A})=>{let t=A;const n=A.match(tk);if(n)for(const i of n){let r=!1,o=i.substring(1,i.length-1),s="simple";o.endsWith("*")&&(r=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),s="label"):o.startsWith(";")&&(o=o.substring(1),s="matrix");const a=e[o];if(a==null)continue;if(Array.isArray(a)){t=t.replace(i,Vu({explode:r,name:o,style:s,value:a}));continue}if(typeof a=="object"){t=t.replace(i,ju({explode:r,name:o,style:s,value:a,valueOnly:!0}));continue}if(s==="matrix"){t=t.replace(i,`;${Ua({name:o,value:a})}`);continue}const l=encodeURIComponent(s==="label"?`.${a}`:a);t=t.replace(i,l)}return t},ik=({baseUrl:e,path:A,query:t,querySerializer:n,url:i})=>{const r=i.startsWith("/")?i:`/${i}`;let o=(e??"")+r;A&&(o=nk({path:A,url:o}));let s=t?n(t):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function xQ(e){const A=e.body!==void 0;if(A&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(A)return e.body}const rk=async(e,A)=>{const t=typeof A=="function"?await A(e):A;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t},ok={bodySerializer:e=>JSON.stringify(e,(A,t)=>typeof t=="bigint"?t.toString():t)},$u=({parameters:e={},...A}={})=>n=>{const i=[];if(n&&typeof n=="object")for(const r in n){const o=n[r];if(o==null)continue;const s=e[r]||A;if(Array.isArray(o)){const a=Vu({allowReserved:s.allowReserved,explode:!0,name:r,style:"form",value:o,...s.array});a&&i.push(a)}else if(typeof o=="object"){const a=ju({allowReserved:s.allowReserved,explode:!0,name:r,style:"deepObject",value:o,...s.object});a&&i.push(a)}else{const a=Ua({allowReserved:s.allowReserved,name:r,value:o});a&&i.push(a)}}return i.join("&")},sk=e=>{if(!e)return"stream";const A=e.split(";")[0]?.trim();if(A){if(A.startsWith("application/json")||A.endsWith("+json"))return"json";if(A==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>A.startsWith(t)))return"blob";if(A.startsWith("text/"))return"text"}},ak=(e,A)=>A?!!(e.headers.has(A)||e.query?.[A]||e.headers.get("Cookie")?.includes(`${A}=`)):!1,lk=async({security:e,...A})=>{for(const t of e){if(ak(A,t.name))continue;const n=await rk(t,A.auth);if(!n)continue;const i=t.name??"Authorization";switch(t.in){case"query":A.query||(A.query={}),A.query[i]=n;break;case"cookie":A.headers.append("Cookie",`${i}=${n}`);break;default:A.headers.set(i,n);break}}},SQ=e=>ik({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:$u(e.querySerializer),url:e.url}),LQ=(e,A)=>{const t={...e,...A};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=zu(e.headers,A.headers),t},gk=e=>{const A=[];return e.forEach((t,n)=>{A.push([n,t])}),A},zu=(...e)=>{const A=new Headers;for(const t of e){if(!t)continue;const n=t instanceof Headers?gk(t):Object.entries(t);for(const[i,r]of n)if(r===null)A.delete(i);else if(Array.isArray(r))for(const o of r)A.append(i,o);else r!==void 0&&A.set(i,typeof r=="object"?JSON.stringify(r):r)}return A};class _l{fns=[];clear(){this.fns=[]}eject(A){const t=this.getInterceptorIndex(A);this.fns[t]&&(this.fns[t]=null)}exists(A){const t=this.getInterceptorIndex(A);return!!this.fns[t]}getInterceptorIndex(A){return typeof A=="number"?this.fns[A]?A:-1:this.fns.indexOf(A)}update(A,t){const n=this.getInterceptorIndex(A);return this.fns[n]?(this.fns[n]=t,A):!1}use(A){return this.fns.push(A),this.fns.length-1}}const ck=()=>({error:new _l,request:new _l,response:new _l}),dk=$u({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Qk={"Content-Type":"application/json"},Wu=(e={})=>({...ok,headers:Qk,parseAs:"auto",querySerializer:dk,...e}),Zu=(e={})=>{let A=LQ(Wu(),e);const t=()=>({...A}),n=l=>(A=LQ(A,l),t()),i=ck(),r=async l=>{const g={...A,...l,fetch:l.fetch??A.fetch??globalThis.fetch,headers:zu(A.headers,l.headers),serializedBody:void 0};g.security&&await lk({...g,security:g.security}),g.requestValidator&&await g.requestValidator(g),g.body!==void 0&&g.bodySerializer&&(g.serializedBody=g.bodySerializer(g.body)),(g.body===void 0||g.serializedBody==="")&&g.headers.delete("Content-Type");const c=SQ(g);return{opts:g,url:c}},o=async l=>{const{opts:g,url:c}=await r(l),d={redirect:"follow",...g,body:xQ(g)};let Q=new Request(c,d);for(const m of i.request.fns)m&&(Q=await m(Q,g));const B=g.fetch;let C;try{C=await B(Q)}catch(m){let y=m;for(const M of i.error.fns)M&&(y=await M(m,void 0,Q,g));if(y=y||{},g.throwOnError)throw y;return g.responseStyle==="data"?void 0:{error:y,request:Q,response:void 0}}for(const m of i.response.fns)m&&(C=await m(C,Q,g));const h={request:Q,response:C};if(C.ok){const m=(g.parseAs==="auto"?sk(C.headers.get("Content-Type")):g.parseAs)??"json";if(C.status===204||C.headers.get("Content-Length")==="0"){let M;switch(m){case"arrayBuffer":case"blob":case"text":M=await C[m]();break;case"formData":M=new FormData;break;case"stream":M=C.body;break;default:M={};break}return g.responseStyle==="data"?M:{data:M,...h}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await C[m]();break;case"json":{const M=await C.text();y=M?JSON.parse(M):{};break}case"stream":return g.responseStyle==="data"?C.body:{data:C.body,...h}}return m==="json"&&(g.responseValidator&&await g.responseValidator(y),g.responseTransformer&&(y=await g.responseTransformer(y))),g.responseStyle==="data"?y:{data:y,...h}}const I=await C.text();let u;try{u=JSON.parse(I)}catch{}const p=u??I;let w=p;for(const m of i.error.fns)m&&(w=await m(p,C,Q,g));if(w=w||{},g.throwOnError)throw w;return g.responseStyle==="data"?void 0:{error:w,...h}},s=l=>g=>o({...g,method:l}),a=l=>async g=>{const{opts:c,url:d}=await r(g);return ZD({...c,body:c.body,headers:c.headers,method:l,onRequest:async(Q,B)=>{let C=new Request(Q,B);for(const h of i.request.fns)h&&(C=await h(C,c));return C},serializedBody:xQ(c),url:d})};return{buildUrl:SQ,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:t,head:s("HEAD"),interceptors:i,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:o,setConfig:n,sse:{connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),head:a("HEAD"),options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),trace:a("TRACE")},trace:s("TRACE")}},Bk={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ek=Object.entries(Bk),Xu=(e,A)=>{A||(A=new Map);for(const t of e)"in"in t?t.key&&A.set(t.key,{in:t.in,map:t.map}):"key"in t?A.set(t.key,{map:t.map}):t.args&&Xu(t.args,A);return A},Ck=e=>{for(const[A,t]of Object.entries(e))t&&typeof t=="object"&&!Object.keys(t).length&&delete e[A]},G=(e,A)=>{const t={body:{},headers:{},path:{},query:{}},n=Xu(A);let i;for(const[r,o]of e.entries())if(A[r]&&(i=A[r]),!!i)if("in"in i)if(i.key){const s=n.get(i.key),a=s.map||i.key;s.in&&(t[s.in][a]=o)}else t.body=o;else for(const[s,a]of Object.entries(o??{})){const l=n.get(s);if(l)if(l.in){const g=l.map||s;t[l.in][g]=a}else t[l.map]=a;else{const g=Ek.find(([c])=>s.startsWith(c));if(g){const[c,d]=g;t[d][s.slice(c.length)]=a}else if("allowExtra"in i&&i.allowExtra){for(const[c,d]of Object.entries(i.allowExtra))if(d){t[c][s]=a;break}}}}return Ck(t),t},uk=Zu(Wu({baseUrl:"http://localhost:4096"}));class EA{client;constructor(A){this.client=A?.client??uk}}class Ik{defaultKey="default";instances=new Map;get(A){const t=this.instances.get(A??this.defaultKey);if(!t)throw new Error('No SDK client found. Create one with "new KiloClient()" to fix this error.');return t}set(A,t){this.instances.set(t??this.defaultKey,A)}}class hk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"}]}]);return(t?.client??this.client).delete({url:"/auth/{providerID}",...t,...n})}set(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return(t?.client??this.client).put({url:"/auth/{providerID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}let fk=class extends EA{log(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"service"},{in:"body",key:"level"},{in:"body",key:"message"},{in:"body",key:"extra"}]}]);return(t?.client??this.client).post({url:"/log",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}agents(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/agent",...t,...n})}skills(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/skill",...t,...n})}};class pk extends EA{moveSession(A,t){const n=G([A],[{args:[{in:"body",key:"sessionID"},{in:"body",key:"destination"},{in:"body",key:"moveChanges"}]}]);return(t?.client??this.client).post({url:"/experimental/control-plane/move-session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class mk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/console",...t,...n})}listOrgs(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/console/orgs",...t,...n})}switchOrg(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"accountID"},{in:"body",key:"orgID"}]}]);return(t?.client??this.client).post({url:"/experimental/console/switch",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class wk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"projectID"},{in:"query",key:"worktrees"},{in:"query",key:"current"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"cursor"},{in:"query",key:"search"},{in:"query",key:"limit"},{in:"query",key:"archived"}]}]);return(t?.client??this.client).get({url:"/experimental/session",...t,...n})}background(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/session/{sessionID}/background",...t,...n})}}class yk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/resource",...t,...n})}}class Dk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"}]}]);return(t?.client??this.client).delete({url:"/experimental/project/{projectID}/copy",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}create(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"workspace"},{in:"body",key:"strategy"},{in:"body",key:"directory"},{in:"body",key:"name"},{in:"body",key:"context"}]}]);return(t?.client??this.client).post({url:"/experimental/project/{projectID}/copy",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}refresh(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/project/{projectID}/copy/refresh",...t,...n})}}class kk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace/adapter",...t,...n})}}class bk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"type"},{in:"body",key:"branch"},{in:"body",key:"extra"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}syncList(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace/sync-list",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/workspace/status",...t,...n})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/experimental/workspace/{id}",...t,...n})}warp(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"sessionID"},{in:"body",key:"copyChanges"}]}]);return(t?.client??this.client).post({url:"/experimental/workspace/warp",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_adapter;get adapter(){return this._adapter??=new kk({client:this.client})}}class vk extends EA{_controlPlane;get controlPlane(){return this._controlPlane??=new pk({client:this.client})}_console;get console(){return this._console??=new mk({client:this.client})}_session;get session(){return this._session??=new wk({client:this.client})}_resource;get resource(){return this._resource??=new yk({client:this.client})}_projectCopy;get projectCopy(){return this._projectCopy??=new Dk({client:this.client})}_workspace;get workspace(){return this._workspace??=new bk({client:this.client})}}class Mk extends EA{get(A){return(A?.client??this.client).get({url:"/global/config",...A})}update(A,t){const n=G([A],[{args:[{key:"config",map:"body"}]}]);return(t?.client??this.client).patch({url:"/global/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Nk extends EA{health(A){return(A?.client??this.client).get({url:"/global/health",...A})}event(A){return(A?.client??this.client).sse.get({url:"/global/event",...A})}dispose(A){return(A?.client??this.client).post({url:"/global/dispose",...A})}upgrade(A,t){const n=G([A],[{args:[{in:"body",key:"target"}]}]);return(t?.client??this.client).post({url:"/global/upgrade",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_config;get config(){return this._config??=new Mk({client:this.client})}}let xk=class extends EA{subscribe(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).sse.get({url:"/event",...t,...n})}};class Sk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return(t?.client??this.client).patch({url:"/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}warnings(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/warnings",...t,...n})}providers(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/providers",...t,...n})}overlay(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"}]}]);return(t?.client??this.client).get({url:"/config/overlay",...t,...n})}overlayUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"scope"},{in:"body",key:"set"},{in:"body",key:"unset"}]}]);return(t?.client??this.client).patch({url:"/config/overlay",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}sources(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/sources",...t,...n})}effective(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/effective",...t,...n})}rules(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"}]}]);return(t?.client??this.client).get({url:"/config/rules",...t,...n})}rulesUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"scope"},{in:"body",key:"content"}]}]);return(t?.client??this.client).put({url:"/config/rules",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}modelState(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/config/model-state",...t,...n})}modelStateUpdate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"favorite"}]}]);return(t?.client??this.client).patch({url:"/config/model-state",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Lk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"provider"},{in:"query",key:"model"}]}]);return(t?.client??this.client).get({url:"/experimental/tool",...t,...n})}ids(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/tool/ids",...t,...n})}}class Fk extends EA{remove(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return(t?.client??this.client).delete({url:"/experimental/worktree",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/experimental/worktree",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reset(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/experimental/worktree/reset",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}diff(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff",...t,...n})}diffSummary(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff/summary",...t,...n})}diffFile(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"base"},{in:"query",key:"file"}]}]);return(t?.client??this.client).get({url:"/experimental/worktree/diff/file",...t,...n})}}class _k extends EA{text(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return(t?.client??this.client).get({url:"/find",...t,...n})}files(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"},{in:"query",key:"dirs"},{in:"query",key:"type"},{in:"query",key:"limit"}]}]);return(t?.client??this.client).get({url:"/find/file",...t,...n})}symbols(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return(t?.client??this.client).get({url:"/find/symbol",...t,...n})}}let Gk=class extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return(t?.client??this.client).get({url:"/file",...t,...n})}read(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return(t?.client??this.client).get({url:"/file/content",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/file/status",...t,...n})}};class Rk extends EA{dispose(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/instance/dispose",...t,...n})}reload(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/instance/reload",...t,...n})}}class Uk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/path",...t,...n})}}let Ok=class extends EA{raw(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs/diff/raw",...t,...n})}};class Kk extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/vcs/status",...t,...n})}diff(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"},{in:"query",key:"context"}]}]);return(t?.client??this.client).get({url:"/vcs/diff",...t,...n})}apply(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"patch"}]}]);return(t?.client??this.client).post({url:"/vcs/apply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_diff;get diff2(){return this._diff??=new Ok({client:this.client})}}class qk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/command",...t,...n})}}class Tk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/lsp",...t,...n})}}class Jk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/formatter",...t,...n})}}class Hk extends EA{remove(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/mcp/{name}/auth",...t,...n})}start(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth",...t,...n})}callback(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"code"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth/callback",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}authenticate(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...t,...n})}}class Yk extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/mcp",...t,...n})}add(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return(t?.client??this.client).post({url:"/mcp",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}connect(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/connect",...t,...n})}disconnect(A,t){const n=G([A],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/mcp/{name}/disconnect",...t,...n})}_auth;get auth(){return this._auth??=new Hk({client:this.client})}}class Pk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project",...t,...n})}current(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project/current",...t,...n})}initGit(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/project/git/init",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"icon"},{in:"body",key:"commands"}]}]);return(t?.client??this.client).patch({url:"/project/{projectID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}directories(A,t){const n=G([A],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/project/{projectID}/directories",...t,...n})}}class Vk extends EA{shells(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty/shells",...t,...n})}list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"},{in:"body",key:"args"},{in:"body",key:"cwd"},{in:"body",key:"title"},{in:"body",key:"env"}]}]);return(t?.client??this.client).post({url:"/pty",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/pty/{ptyID}",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/pty/{ptyID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"sessionID"},{in:"body",key:"size"}]}]);return(t?.client??this.client).put({url:"/pty/{ptyID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}connectToken(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...t,...n})}connect(A,t){const n=G([A],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"cursor"},{in:"query",key:"ticket"}]}]);return(t?.client??this.client).get({url:"/pty/{ptyID}/connect",...t,...n})}}class jk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/question",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"answers"}]}]);return(t?.client??this.client).post({url:"/question/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/question/{requestID}/reject",...t,...n})}}class $k extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/permission",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return(t?.client??this.client).post({url:"/permission/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}saveAlwaysRules(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"approvedAlways"},{in:"body",key:"deniedAlways"}]}]);return(t?.client??this.client).post({url:"/permission/{requestID}/always-rules",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}allowEverything(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enable"},{in:"body",key:"requestID"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/permission/allow-everything",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}respond(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"permissionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"response"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/permissions/{permissionID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class zk extends EA{authorize(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"inputs"}]}]);return(t?.client??this.client).post({url:"/provider/{providerID}/oauth/authorize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}callback(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"code"}]}]);return(t?.client??this.client).post({url:"/provider/{providerID}/oauth/callback",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Wk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/provider",...t,...n})}auth(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/provider/auth",...t,...n})}_oauth;get oauth(){return this._oauth??=new zk({client:this.client})}}class Zk extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"},{in:"query",key:"path"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"search"},{in:"query",key:"limit"}]}]);return(t?.client??this.client).get({url:"/session",...t,...n})}create(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"parentID"},{in:"body",key:"title"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"metadata"},{in:"body",key:"permission"},{in:"body",key:"platform"},{in:"body",key:"workspaceID"},{in:"body",key:"sandboxInheritanceToken"}]}]);return(t?.client??this.client).post({url:"/session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/status",...t,...n})}delete(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"metadata"},{in:"body",key:"permission"},{in:"body",key:"time"}]}]);return(t?.client??this.client).patch({url:"/session/{sessionID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}children(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/children",...t,...n})}todo(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/todo",...t,...n})}diff(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"messageID"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/diff",...t,...n})}messages(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"before"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/message",...t,...n})}prompt(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"agent"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"editorContext"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}deleteMessage(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}",...t,...n})}message(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/message/{messageID}",...t,...n})}fork(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/fork",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}abort(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/abort",...t,...n})}init(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"modelID"},{in:"body",key:"providerID"},{in:"body",key:"messageID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/init",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}unshare(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/share",...t,...n})}share(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/share",...t,...n})}summarize(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"providerID"},{in:"body",key:"modelID"},{in:"body",key:"auto"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/summarize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}promptAsync(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"agent"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"editorContext"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/prompt_async",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}command(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"arguments"},{in:"body",key:"command"},{in:"body",key:"variant"},{in:"body",key:"snapshotInitialization"},{in:"body",key:"parts"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/command",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}shell(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"command"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/shell",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}revert(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"partID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/revert",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}unrevert(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/unrevert",...t,...n})}viewed(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"viewer"},{in:"body",key:"attached"},{in:"body",key:"visible"}]}]);return(t?.client??this.client).post({url:"/session/viewed",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class Xk extends EA{delete(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"part",map:"body"}]}]);return(t?.client??this.client).patch({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class A3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/sync/history",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class e3 extends EA{start(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/sync/start",...t,...n})}replay(A,t){const n=G([A],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"events"}]}]);return(t?.client??this.client).post({url:"/sync/replay",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}steal(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/sync/steal",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_history;get history(){return this._history??=new A3({client:this.client})}}class t3 extends EA{next(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/control/next",...t,...n})}response(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/tui/control/response",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class n3 extends EA{get(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/config",...t,...n})}update(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"scope"},{in:"body",key:"$schema"},{in:"body",key:"theme"},{in:"body",key:"keybinds"},{in:"body",key:"plugin"},{in:"body",key:"plugin_enabled"},{in:"body",key:"title_icon"},{in:"body",key:"scroll_speed"},{in:"body",key:"scroll_acceleration"},{in:"body",key:"diff_style"},{in:"body",key:"mouse"},{in:"body",key:"attention"}]}]);return(t?.client??this.client).patch({url:"/tui/config",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class i3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/tui/keybinds",...t,...n})}}class r3 extends EA{appendPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return(t?.client??this.client).post({url:"/tui/append-prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}openHelp(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-help",...t,...n})}openSessions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-sessions",...t,...n})}openThemes(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-themes",...t,...n})}openModels(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/open-models",...t,...n})}submitPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/submit-prompt",...t,...n})}clearPrompt(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/tui/clear-prompt",...t,...n})}executeCommand(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return(t?.client??this.client).post({url:"/tui/execute-command",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}showToast(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"message"},{in:"body",key:"variant"},{in:"body",key:"duration"}]}]);return(t?.client??this.client).post({url:"/tui/show-toast",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}publish(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return(t?.client??this.client).post({url:"/tui/publish",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}selectSession(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/tui/select-session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}_control;get control(){return this._control??=new t3({client:this.client})}_config;get config(){return this._config??=new n3({client:this.client})}_keybind;get keybind(){return this._keybind??=new i3({client:this.client})}}class o3 extends EA{preview(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"scope"},{in:"body",key:"description"},{in:"body",key:"mode"},{in:"body",key:"model"},{in:"body",key:"color"},{in:"body",key:"steps"},{in:"body",key:"tools"},{in:"body",key:"permission"},{in:"body",key:"prompt"}]}]);return(t?.client??this.client).post({url:"/agent-builder/preview",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}save(A,t){const n=G([A],[{args:[{in:"path",key:"path_id",map:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_id",map:"id"},{in:"body",key:"scope"},{in:"body",key:"description"},{in:"body",key:"mode"},{in:"body",key:"model"},{in:"body",key:"color"},{in:"body",key:"steps"},{in:"body",key:"tools"},{in:"body",key:"permission"},{in:"body",key:"prompt"}]}]);return(t?.client??this.client).put({url:"/agent-builder/{id}",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class s3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process/{processID}",...t,...n})}logs(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/background-process/{processID}/logs",...t,...n})}stop(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/{processID}/stop",...t,...n})}restart(A,t){const n=G([A],[{args:[{in:"path",key:"processID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/{processID}/restart",...t,...n})}stopSession(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/background-process/session/{sessionID}/stop",...t,...n})}}class a3 extends EA{generate(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"prompt"},{in:"body",key:"providerID"},{in:"body",key:"modelID"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/branch-name",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class l3 extends EA{generate(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"path"},{in:"body",key:"selectedFiles"},{in:"body",key:"previousMessage"},{in:"body",key:"language"}]}]);return(t?.client??this.client).post({url:"/commit-message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class g3 extends EA{enhance(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return(t?.client??this.client).post({url:"/enhance-prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class c3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/status",...t,...n})}warnings(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/warnings",...t,...n})}models(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/indexing/models",...t,...n})}}class d3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/interactive-terminal",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/interactive-terminal/{terminalID}",...t,...n})}write(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"interactiveTerminalWriteInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/input",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}resize(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"interactiveTerminalResizeInput",map:"body"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/resize",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}close(A,t){const n=G([A],[{args:[{in:"path",key:"terminalID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/interactive-terminal/{terminalID}/close",...t,...n})}}class Q3 extends EA{transcriptions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"model"},{in:"body",key:"input_audio"},{in:"body",key:"language"},{in:"body",key:"prompt"},{in:"body",key:"temperature"}]}]);return(t?.client??this.client).post({url:"/kilo/audio/transcriptions",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class B3 extends EA{images(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/models/images",...t,...n})}}class E3 extends EA{set(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"organizationId"}]}]);return(t?.client??this.client).post({url:"/kilo/organization",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class C3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/claw/status",...t,...n})}chatCredentials(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/claw/chat-credentials",...t,...n})}}class u3 extends EA{get(A,t){const n=G([A],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/cloud/session/{id}",...t,...n})}import(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionId"}]}]);return(t?.client??this.client).post({url:"/kilo/cloud/session/import",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class I3 extends EA{_session;get session(){return this._session??=new u3({client:this.client})}}class h3 extends EA{profile(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/profile",...t,...n})}authStatus(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/auth-status",...t,...n})}modes(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/modes",...t,...n})}fim(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"prefix"},{in:"body",key:"suffix"},{in:"body",key:"provider"},{in:"body",key:"model"},{in:"body",key:"maxTokens"},{in:"body",key:"temperature"}]}]);return(t?.client??this.client).sse.post({url:"/kilo/fim",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}edit(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"provider"},{in:"body",key:"model"},{in:"body",key:"maxTokens"},{in:"body",key:"currentFilePath"},{in:"body",key:"currentFileContent"},{in:"body",key:"cursorLine"},{in:"body",key:"cursorCharacter"},{in:"body",key:"editableRegionStartLine"},{in:"body",key:"editableRegionEndLine"},{in:"body",key:"recentlyViewedSnippets"},{in:"body",key:"editDiffHistory"}]}]);return(t?.client??this.client).post({url:"/kilo/edit",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}notifications(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilo/notifications",...t,...n})}cloudSessions(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"cursor"},{in:"query",key:"limit"},{in:"query",key:"gitUrl"}]}]);return(t?.client??this.client).get({url:"/kilo/cloud-sessions",...t,...n})}_audio;get audio(){return this._audio??=new Q3({client:this.client})}_models;get models(){return this._models??=new B3({client:this.client})}_organization;get organization(){return this._organization??=new E3({client:this.client})}_claw;get claw(){return this._claw??=new C3({client:this.client})}_cloud;get cloud(){return this._cloud??=new I3({client:this.client})}}class f3 extends EA{snapshot(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/kilocode/heap/snapshot",...t,...n})}}class p3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/notebook",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"result"}]}]);return(t?.client??this.client).post({url:"/kilocode/notebook/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"error"}]}]);return(t?.client??this.client).post({url:"/kilocode/notebook/{requestID}/reject",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class m3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/agent-manager",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"result"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent-manager/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"error"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent-manager/{requestID}/reject",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class w3 extends EA{project(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"worktree"},{in:"body",key:"vcs"},{in:"body",key:"name"},{in:"body",key:"iconUrl"},{in:"body",key:"iconColor"},{in:"body",key:"timeCreated"},{in:"body",key:"timeUpdated"},{in:"body",key:"timeInitialized"},{in:"body",key:"sandboxes"},{in:"body",key:"commands"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/project",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}session(A,t){const n=G([A],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"projectID"},{in:"body",key:"force"},{in:"body",key:"workspaceID"},{in:"body",key:"parentID"},{in:"body",key:"slug"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"title"},{in:"body",key:"version"},{in:"body",key:"shareURL"},{in:"body",key:"summary"},{in:"body",key:"revert"},{in:"body",key:"permission"},{in:"body",key:"timeCreated"},{in:"body",key:"timeUpdated"},{in:"body",key:"timeCompacting"},{in:"body",key:"timeArchived"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/session",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}message(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"sessionID"},{in:"body",key:"timeCreated"},{in:"body",key:"data"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/message",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}part(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"messageID"},{in:"body",key:"sessionID"},{in:"body",key:"timeCreated"},{in:"body",key:"data"}]}]);return(t?.client??this.client).post({url:"/kilocode/session-import/part",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class y3 extends EA{agentRequirements(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"agent"}]}]);return(t?.client??this.client).get({url:"/kilocode/agent/requirements",...t,...n})}removeSkill(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"location"}]}]);return(t?.client??this.client).post({url:"/kilocode/skill/remove",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}removeAgent(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"}]}]);return(t?.client??this.client).post({url:"/kilocode/agent/remove",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}sessionModelUsage(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/model-usage",...t,...n})}_heap;get heap(){return this._heap??=new f3({client:this.client})}_notebook;get notebook(){return this._notebook??=new p3({client:this.client})}_agentManager;get agentManager(){return this._agentManager??=new m3({client:this.client})}_sessionImport;get sessionImport(){return this._sessionImport??=new w3({client:this.client})}}class D3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/kilocode/anaconda-desktop/status",...t,...n})}open(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/kilocode/anaconda-desktop/open",...t,...n})}sync(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"acknowledgeToolLimitations"}]}]);return(t?.client??this.client).post({url:"/kilocode/anaconda-desktop/sync",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class k3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/network",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/network/{requestID}/reply",...t,...n})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/network/{requestID}/reject",...t,...n})}}class b3 extends EA{enable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/remote/enable",...t,...n})}disable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/remote/disable",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/remote/status",...t,...n})}}class v3 extends EA{support(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/sandbox/support",...t,...n})}status(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/session/{sessionID}/sandbox",...t,...n})}toggle(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/session/{sessionID}/sandbox/toggle",...t,...n})}}class M3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/suggestion",...t,...n})}accept(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"index"}]}]);return(t?.client??this.client).post({url:"/suggestion/{requestID}/accept",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}dismiss(A,t){const n=G([A],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/suggestion/{requestID}/dismiss",...t,...n})}}class N3 extends EA{capture(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"event"},{in:"body",key:"properties"}]}]);return(t?.client??this.client).post({url:"/telemetry/capture",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}setEnabled(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return(t?.client??this.client).post({url:"/telemetry/setEnabled",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class x3 extends EA{status(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/memory/status",...t,...n})}show(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).get({url:"/memory/show",...t,...n})}enable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/enable",...t,...n})}disable(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/disable",...t,...n})}configure(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"autoConsolidate"},{in:"body",key:"verbose"}]}]);return(t?.client??this.client).post({url:"/memory/configure",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}rebuild(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return(t?.client??this.client).post({url:"/memory/rebuild",...t,...n})}remember(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"},{in:"body",key:"key"},{in:"body",key:"file"},{in:"body",key:"section"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/remember",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}correct(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"},{in:"body",key:"key"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/correct",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}forget(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"query"},{in:"body",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/memory/forget",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}purge(A,t){const n=G([A],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"confirm"}]}]);return(t?.client??this.client).post({url:"/memory/purge",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class S3 extends EA{get(A){return(A?.client??this.client).get({url:"/api/health",...A})}}class L3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/agent",...t,...n})}}class F3 extends EA{list(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/permission/request",...t,...n})}reply(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/permission/request/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}}class _3 extends EA{reply(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"},{key:"questionV2Reply",map:"body"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/question/request/{requestID}/reply",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}reject(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"requestID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/question/request/{requestID}/reject",...t,...n})}}class G3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"order"},{in:"query",key:"search"},{in:"query",key:"directory"},{in:"query",key:"project"},{in:"query",key:"subpath"},{in:"query",key:"cursor"}]}]);return(t?.client??this.client).get({url:"/api/session",...t,...n})}prompt(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"body",key:"id"},{in:"body",key:"prompt"},{in:"body",key:"delivery"},{in:"body",key:"resume"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/prompt",...t,...n,headers:{"Content-Type":"application/json",...t?.headers,...n.headers}})}compact(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/compact",...t,...n})}wait(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).post({url:"/api/session/{sessionID}/wait",...t,...n})}context(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/context",...t,...n})}messages(A,t){const n=G([A],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"limit"},{in:"query",key:"order"},{in:"query",key:"cursor"}]}]);return(t?.client??this.client).get({url:"/api/session/{sessionID}/message",...t,...n})}_permission;get permission(){return this._permission??=new F3({client:this.client})}_question;get question(){return this._question??=new _3({client:this.client})}}class R3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/model",...t,...n})}}class U3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/provider",...t,...n})}get(A,t){const n=G([A],[{args:[{in:"path",key:"providerID"},{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/provider/{providerID}",...t,...n})}}let O3=class extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/permission/request",...t,...n})}};class K3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"projectID"}]}]);return(t?.client??this.client).get({url:"/api/permission/saved",...t,...n})}remove(A,t){const n=G([A],[{args:[{in:"path",key:"id"}]}]);return(t?.client??this.client).delete({url:"/api/permission/saved/{id}",...t,...n})}}class q3 extends EA{_request;get request(){return this._request??=new O3({client:this.client})}_saved;get saved(){return this._saved??=new K3({client:this.client})}}class T3 extends EA{read(A,t){const n=G([A],[{args:[{in:"query",key:"location"},{in:"query",key:"path"},{in:"query",key:"reference"}]}]);return(t?.client??this.client).get({url:"/api/fs/read",...t,...n})}list(A,t){const n=G([A],[{args:[{in:"query",key:"location"},{in:"query",key:"path"},{in:"query",key:"reference"}]}]);return(t?.client??this.client).get({url:"/api/fs/list",...t,...n})}}class J3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/command",...t,...n})}}class H3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/skill",...t,...n})}}class Y3 extends EA{subscribe(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).sse.get({url:"/api/event",...t,...n})}}class P3 extends EA{list(A,t){const n=G([A],[{args:[{in:"query",key:"location"}]}]);return(t?.client??this.client).get({url:"/api/question/request",...t,...n})}}class V3 extends EA{_request;get request(){return this._request??=new P3({client:this.client})}}class j3 extends EA{_health;get health(){return this._health??=new S3({client:this.client})}_agent;get agent(){return this._agent??=new L3({client:this.client})}_session;get session(){return this._session??=new G3({client:this.client})}_model;get model(){return this._model??=new R3({client:this.client})}_provider;get provider(){return this._provider??=new U3({client:this.client})}_permission;get permission(){return this._permission??=new q3({client:this.client})}_fs;get fs(){return this._fs??=new T3({client:this.client})}_command;get command(){return this._command??=new J3({client:this.client})}_skill;get skill(){return this._skill??=new H3({client:this.client})}_event;get event(){return this._event??=new Y3({client:this.client})}_question;get question(){return this._question??=new V3({client:this.client})}}class p0 extends EA{static __registry=new Ik;constructor(A){super(A),p0.__registry.set(this,A?.key)}_auth;get auth(){return this._auth??=new hk({client:this.client})}_app;get app(){return this._app??=new fk({client:this.client})}_experimental;get experimental(){return this._experimental??=new vk({client:this.client})}_global;get global(){return this._global??=new Nk({client:this.client})}_event;get event(){return this._event??=new xk({client:this.client})}_config;get config(){return this._config??=new Sk({client:this.client})}_tool;get tool(){return this._tool??=new Lk({client:this.client})}_worktree;get worktree(){return this._worktree??=new Fk({client:this.client})}_find;get find(){return this._find??=new _k({client:this.client})}_file;get file(){return this._file??=new Gk({client:this.client})}_instance;get instance(){return this._instance??=new Rk({client:this.client})}_path;get path(){return this._path??=new Uk({client:this.client})}_vcs;get vcs(){return this._vcs??=new Kk({client:this.client})}_command;get command(){return this._command??=new qk({client:this.client})}_lsp;get lsp(){return this._lsp??=new Tk({client:this.client})}_formatter;get formatter(){return this._formatter??=new Jk({client:this.client})}_mcp;get mcp(){return this._mcp??=new Yk({client:this.client})}_project;get project(){return this._project??=new Pk({client:this.client})}_pty;get pty(){return this._pty??=new Vk({client:this.client})}_question;get question(){return this._question??=new jk({client:this.client})}_permission;get permission(){return this._permission??=new $k({client:this.client})}_provider;get provider(){return this._provider??=new Wk({client:this.client})}_session;get session(){return this._session??=new Zk({client:this.client})}_part;get part(){return this._part??=new Xk({client:this.client})}_sync;get sync(){return this._sync??=new e3({client:this.client})}_tui;get tui(){return this._tui??=new r3({client:this.client})}_agentBuilder;get agentBuilder(){return this._agentBuilder??=new o3({client:this.client})}_backgroundProcess;get backgroundProcess(){return this._backgroundProcess??=new s3({client:this.client})}_branchName;get branchName(){return this._branchName??=new a3({client:this.client})}_commitMessage;get commitMessage(){return this._commitMessage??=new l3({client:this.client})}_enhancePrompt;get enhancePrompt(){return this._enhancePrompt??=new g3({client:this.client})}_indexing;get indexing(){return this._indexing??=new c3({client:this.client})}_interactiveTerminal;get interactiveTerminal(){return this._interactiveTerminal??=new d3({client:this.client})}_kilo;get kilo(){return this._kilo??=new h3({client:this.client})}_kilocode;get kilocode(){return this._kilocode??=new y3({client:this.client})}_anacondaDesktop;get anacondaDesktop(){return this._anacondaDesktop??=new D3({client:this.client})}_network;get network(){return this._network??=new k3({client:this.client})}_remote;get remote(){return this._remote??=new b3({client:this.client})}_sandbox;get sandbox(){return this._sandbox??=new v3({client:this.client})}_suggestion;get suggestion(){return this._suggestion??=new M3({client:this.client})}_telemetry;get telemetry(){return this._telemetry??=new N3({client:this.client})}_memory;get memory(){return this._memory??=new x3({client:this.client})}_v2;get v2(){return this._v2??=new j3({client:this.client})}}function $3(e,A,t,n){if(!n?.throwOnError||e instanceof Error)return e;if(typeof e=="object"&&e!==null&&Object.keys(e).length>0){const r=e,o=typeof r.data?.message=="string"&&r.data.message||typeof r.message=="string"&&r.message||typeof r.name=="string"&&r.name||FQ(t,A);return new Error(o,{cause:{body:e,status:A?.status}})}if(typeof e=="string"&&e.length>0)return new Error(e,{cause:{body:e,status:A?.status}});const i=A?"(empty response body)":"network error (no response)";return new Error(`kilo server ${FQ(t,A)}: ${i}`,{cause:{body:e,status:A?.status}})}function FQ(e,A){const t=e?.method??"?",n=e?.url??"?",i=A?.status,r=A?.statusText;return`${t} ${n}${i?" → "+i:""}${r?" "+r:""}`}function z3(e,A,t){if(e)return A&&(e===A||t&&e===t(A))?A:e}function W3(e,A){if(e.method!=="GET"&&e.method!=="HEAD")return e;const t=new URL(e.url);let n=!1;for(const[r,o]of[["x-kilo-directory","directory"],["x-kilo-workspace","workspace"]]){const s=z3(e.headers.get(r),o==="directory"?A.directory:A.workspace,o==="directory"?encodeURIComponent:void 0);if(s){for(const a of t.pathname.startsWith("/api/")?[o,`location[${o}]`]:[o])t.searchParams.has(a)||t.searchParams.set(a,s);n=!0}}if(!n)return e;const i=new Request(t,e);return i.headers.delete("x-kilo-directory"),i.headers.delete("x-kilo-workspace"),i}function Z3(e){e?.fetch||(e={...e,fetch:n=>fetch(n,{duplex:"half",timeout:!1})}),e?.directory&&(e.headers={...e.headers,"x-kilo-directory":encodeURIComponent(e.directory)}),e?.experimental_workspaceID&&(e.headers={...e.headers,"x-kilo-workspace":e.experimental_workspaceID}),e.duplex="half";const A=Zu(e);return A.interceptors.request.use(t=>W3(t,{directory:e?.directory,workspace:e?.experimental_workspaceID})),A.interceptors.response.use(t=>{if(t.headers.get("content-type")==="text/html")throw new Error("Request is not supported by this version of OpenCode Server (Server responded with text/html)");return t}),A.interceptors.error.use($3),new p0({client:A})}const X3=Array.from({length:20},(e,A)=>4097+A),Ab=1440*60*1e3,m0="kilo.config.server",Cr={},w0=window.fetch.bind(window);function eb(e){const A=new TextEncoder().encode(e);return btoa(String.fromCharCode(...A))}function _Q(e){return e?decodeURIComponent(e):""}function Oa(e){const A=new URL(e),t=_Q(A.username)||"kilo",n=_Q(A.password)||"kilo";return A.username="",A.password="",A.search="",A.hash="",{url:A.toString().replace(/\/$/,""),token:eb(`${t}:${n}`)}}function ee(e){const A=Oa(e.url);return Z3({baseUrl:A.url,directory:Ka(e.dir),headers:{Authorization:`Basic ${A.token}`},fetch:w0})}function Ka(e){const A=e.trim();if(A)return A}function Ps(e){return e instanceof Error?e.message:typeof e=="string"?e:e==null?"Unknown error":JSON.stringify(e)}function UA(e,A){if(A.error)throw new Error(`${e}: ${Ps(A.error)}`);if(A.data===void 0)throw new Error(`${e}: empty response`);return A.data}async function tb(e){const t=(await Ta(e)).find(n=>n.id===e.project);if(!t)throw new Error(`Project not found: ${e.project}`);return t}async function ct(e,A){return await A.then(t=>{if(t.error){console.warn(`${e}: ${Ps(t.error)}`);return}return t.data}).catch(t=>{console.warn(`${e}: ${Ps(t)}`)})}function nb(e){if(typeof e!="string")return;const A=e.indexOf("/");if(!(A<=0||A>=e.length-1))return{provider:e.slice(0,A),model:e.slice(A+1)}}function qa(e){const A=Ka(e.dir);return A?{directory:A}:void 0}function ib(e){return e.split("_").filter(Boolean).map(A=>A.charAt(0).toUpperCase()+A.slice(1)).join(" ")}function rb(e){return{keybinds:Object.entries(e.keybinds??{}).map(([A,t])=>({id:A,label:ib(A),group:"Configured",default:t??"none",description:"Configured TUI keybind"}))}}function Vs(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")||"/"}function ob(e,A){const t=Vs(e),n=Vs(A);return n===t?!0:n.startsWith(`${t}/`)}function AI(e){return e.id!=="global"?!0:Vs(e.worktree)!=="/"}function sb(e,A){return[e.worktree,...e.sandboxes].reduce((t,n)=>ob(n,A)?Math.max(t,Vs(n).length):t,-1)}function ab(e,A){const t=e.find(n=>n.id===A.projectID);return t||e.reduce((n,i)=>{const r=sb(i,A.directory);return r<=n.score?n:{item:i,score:r}},{score:-1}).item}async function eI(e){const A=new AbortController,t=window.setTimeout(()=>A.abort(),400),n=Oa(e);return await w0(`${n.url}/global/health`,{headers:{Authorization:`Basic ${n.token}`},signal:A.signal}).then(i=>i.ok?e:void 0).catch(()=>{}).finally(()=>window.clearTimeout(t))}function lb(e){return Array.isArray(e)?e.filter(A=>{if(!A||typeof A!="object")return!1;const t=A;return typeof t.id=="string"&&typeof t.worktree=="string"&&typeof t.time?.updated=="number"}):[]}function gb(e){return e.reduce((A,t)=>Math.max(A,t.time.updated),0)}async function cb(e){if(!await eI(e))return;const t=new AbortController,n=window.setTimeout(()=>t.abort(),400),i=Oa(e);return await w0(`${i.url}/project`,{headers:{Authorization:`Basic ${i.token}`},signal:t.signal}).then(async r=>{if(!r.ok)return{url:e,count:0,time:0};const o=lb(await r.json()).filter(AI);return{url:e,count:o.length,time:gb(o)}}).catch(()=>({url:e,count:0,time:0})).finally(()=>window.clearTimeout(n))}function GQ(e){return Number(new URL(e).port)||0}function RQ(e){return new URL(e).hostname==="127.0.0.1"?1:0}function G1(){return window.localStorage.getItem(m0)??""}function Xe(e){window.localStorage.setItem(m0,e)}function ri(){window.localStorage.removeItem(m0)}async function db(e){return await eI(e)!==void 0}async function Qb(){const e=X3.flatMap(t=>[`http://127.0.0.1:${t}`,`http://localhost:${t}`]);return(await Promise.all(e.map(cb))).filter(t=>t!==void 0).toSorted((t,n)=>n.count-t.count||n.time-t.time||GQ(n.url)-GQ(t.url)||RQ(n.url)-RQ(t.url))[0]?.url}async function oi(){if(Cr.run)return await Cr.run;const e=Qb().finally(()=>{Cr.run===e&&(Cr.run=void 0)});return Cr.run=e,await e}async function Wi(){const e=await oi();if(e)return e;const A=G1();if(A){if(await db(A))return A;ri()}}async function Bb(e){const A=ee(e),[t,n,i,r,o,s,a,l,g,c,d,Q]=await Promise.all([A.global.health(),A.config.overlay({scope:e.scope}),A.config.modelState(),A.provider.list(),A.provider.auth(),A.tui.config.get(),ct("TUI keybinds",A.tui.keybind.list()),A.tool.ids(),A.mcp.status(),A.lsp.status(),A.formatter.status(),A.app.agents()]),B=UA("Config overlay",n),C=nb(B.effective.model),h=C?await ct("Tool metadata",A.tool.list(C)):void 0,I=UA("TUI config",s);return{health:UA("Health",t),effective:B.effective,overlay:B,sources:{sources:B.sources},modelState:UA("Model state",i),providers:UA("Providers",r),authMethods:UA("Provider auth methods",o),tui:I,keybinds:a??rb(I),tools:UA("Tools",l),toolDetails:h??[],mcp:UA("MCP status",g),lsp:UA("LSP status",c),formatter:UA("Formatter status",d),agents:UA("Agents",Q)}}async function Eb(e){return UA("Kilo embedding models",await ee(e).indexing.models())}async function tI(e){const t=await ee(e).kilo.profile(qa(e));return UA("Kilo profile",t)}async function Cb(e,A){const t=ee(e),n=await t.kilo.organization.set({...qa(e),organizationId:A});UA("Switch Kilo account",n),await t.global.dispose()}async function ub(e){const A=ee(e),t=await A.auth.remove({providerID:"kilo"});UA("Log out of Kilo",t),await A.global.dispose()}async function Ib(e){const t=await ee(e).provider.oauth.authorize({...qa(e),providerID:"kilo",method:0});return UA("Start Kilo login",t)}async function hb(e,A){const t=ee(e),n=await t.provider.oauth.callback({...qa(e),providerID:"kilo",method:0},A?{signal:A}:void 0);UA("Complete Kilo login",n),await t.global.dispose()}async function nI(e){const A=ee(e),t=Ka(e.dir),n=await A.project.list(t?{directory:t}:void 0);return UA("Projects",n)}async function Ta(e){return(await nI(e)).filter(AI)}async function fb(e){const A=ee(e),[t,n]=await Promise.all([Ta(e),A.experimental.session.list({archived:!1,start:Date.now()-Ab,limit:500})]),i=UA("Recent sessions",n),r=new Map;for(const o of i){const s=ab(t,o);s&&r.set(s.id,(r.get(s.id)??0)+1)}return t.map(o=>({...o,sessions:r.get(o.id)??0})).filter(o=>o.sessions>0)}async function pb(e){const A=await tb(e),t={url:e.url,dir:A.worktree},n=ee(t),[i,r,o]=await Promise.all([n.config.overlay({scope:"global"}),n.vcs.get({directory:t.dir}),n.worktree.list({directory:t.dir})]),s=UA("Config",i),a=UA("Worktrees",o),l=await Promise.all([t.dir,...a.map(g=>g.directory)].map(g=>Db({url:e.url},g)));return{project:A,config:s.global,vcs:UA("VCS",r),worktrees:a,terminals:l.flat()}}async function mb(e,A){const t=ee(e),n=A?.trim(),i=await t.worktree.create({directory:e.dir,...n?{worktreeCreateInput:{name:n}}:{}});return UA("Create worktree",i)}async function wb(e,A){const n=await ee(e).worktree.remove({directory:e.dir,worktreeRemoveInput:{directory:A}});return UA("Remove worktree",n)}async function yb(e,A){const n=await ee(e).worktree.reset({directory:e.dir,worktreeResetInput:{directory:A}});return UA("Reset worktree",n)}async function Db(e,A){const t=ee({url:e.url,dir:A}),[n,i,r,o]=await Promise.all([t.pty.list({directory:A}),ct("Session status",t.session.status({directory:A})),ct("Pending permissions",t.permission.list({directory:A})),ct("Pending questions",t.question.list({directory:A}))]),s=UA("Terminals",n),a=i??{},l=UQ(r??[]),g=UQ(o??[]),c=new Map;return await Promise.all(s.map(async d=>{if(!d.sessionID||c.has(d.sessionID))return;const Q=await ct("Session",t.session.get({directory:A,sessionID:d.sessionID}));Q&&c.set(d.sessionID,Q)})),s.map(d=>{const Q=d.sessionID?c.get(d.sessionID):void 0;return{...d,directory:A,session:Q,sessionStatus:d.sessionID?a[d.sessionID]:void 0,attention:d.sessionID?vb(d.sessionID,l,g):void 0}})}function iI(e){return new Set(e.flatMap(A=>A.sessionID?[A.sessionID]:[]))}function UQ(e){return new Set(e.map(A=>A.sessionID))}function OQ(e,A){return e.some(t=>A.has(t.sessionID))}async function kb(e,A){const t=ee({url:e.url,dir:A}),[n,i,r,o]=await Promise.all([ct("Session status",t.session.status({directory:A})),ct("Terminals",t.pty.list({directory:A})),ct("Pending permissions",t.permission.list({directory:A})),ct("Pending questions",t.question.list({directory:A}))]),s=iI(i??[]),a=Object.entries(n??{}).some(([g,c])=>s.has(g)&&c.type!=="idle"),l=OQ(r??[],s)||OQ(o??[],s);return{busy:a,attention:l}}async function bb(e,A){const t=ee({url:e.url,dir:A}),n=await ct("Terminals",t.pty.list({directory:A}));return iI(n??[])}function vb(e,A,t){if(A.has(e))return"permission";if(t.has(e))return"question"}async function Mb(e,A){const n=await ee({url:e.url,dir:A}).worktree.diffSummary({directory:A});return UA("Worktree diff",n)}async function Nb(e,A,t){const i=await ee({url:e.url,dir:A}).worktree.diffFile({directory:A,file:t});return UA("Worktree diff file",i)}async function xb(e,A,t="Kilo session"){const i=await ee({url:e.url,dir:A}).pty.create({directory:A,command:"kilo",cwd:A,title:t});return UA("Create terminal",i)}async function Sb(e,A){const n=await ee({url:e.url,dir:e.dir}).pty.remove({directory:e.dir,ptyID:A});return UA("Remove terminal",n)}async function KQ(e,A,t,n){const r=await ee(e).session.viewed({directory:e.dir,viewer:A,attached:t,visible:n});return UA("Viewed sessions",r)}function rI(e,A){const t=ee(e),n=new AbortController;return(async()=>{const i=await t.global.event({signal:n.signal,sseMaxRetryAttempts:0});for await(const r of i.stream){if(n.signal.aborted)return;A(r)}})().catch(i=>{n.signal.aborted||console.warn(`Project events: ${Ps(i)}`)}),()=>n.abort()}async function Lb(e,A,t,n){const r=await ee({url:e.url,dir:e.dir}).pty.update({directory:e.dir,ptyID:A,size:{cols:t,rows:n}});return UA("Resize terminal",r)}function Fb(e,A,t=0){const n=Oa(e.url),i=new URL(`/pty/${encodeURIComponent(A)}/connect`,n.url);return i.protocol=i.protocol==="https:"?"wss:":"ws:",i.searchParams.set("directory",e.dir),i.searchParams.set("cursor",String(t)),i.searchParams.set("auth_token",n.token),i.toString()}async function Ao(e,A,t){const n=ee(e),i=Object.keys(A).length?A:void 0,r=await n.config.overlayUpdate({directory:Ka(e.dir),scope:e.scope,set:i,unset:t});return UA("Update config",r)}async function _b(e,A){return Ao(e,A)}async function Gb(e,A){return Ao(e,{},A)}async function Rb(e,A){const n=await ee(e).config.modelStateUpdate({favorite:A});return UA("Update model state",n)}async function Ub(e,A,t,n){const i=ee(e),r=n?{type:"api",key:t,metadata:n}:{type:"api",key:t},o=await i.auth.set({providerID:A,auth:r});UA("Connect provider",o),await i.global.dispose()}async function Ob(e,A,t,n){const r=await ee(e).provider.oauth.authorize({providerID:A,method:t,inputs:n});return UA("Authorize provider",r)}async function Kb(e,A,t,n){const i=ee(e),r=await i.provider.oauth.callback({providerID:A,method:t,code:n});UA("Complete provider authorization",r),await i.global.dispose()}async function qb(e,A){const n=await ee(e).mcp.connect({name:A});return UA("Connect MCP server",n)}async function Tb(e,A){const n=await ee(e).mcp.disconnect({name:A});return UA("Disconnect MCP server",n)}async function Jb(e,A){const n=await ee(e).mcp.auth.authenticate({name:A});return UA("Authenticate MCP server",n)}async function Hb(e,A){const n=await ee(e).tui.config.update({scope:e.scope,...A});return UA("Update TUI config",n)}async function Yb(e,A){const n=await ee(e).agentBuilder.preview(A);return UA("Preview agent",n)}async function Pb(e,A){const n=await ee(e).agentBuilder.save({path_id:A.id,scope:A.scope,description:A.description,mode:A.mode,model:A.model,color:A.color,steps:A.steps,tools:A.tools,permission:A.permission,prompt:A.prompt});return UA("Save agent",n)}function Vb(e){return!e||e==="normal"?"default":e==="small"?"sm":e==="large"?"lg":e}function jb(e){return!e||e==="default"?"primary":e}function BA(e){const[A,t]=uA(e,["variant","size","icon","class","classList","children"]);return E(Ra,gA(t,{"data-component":"button",get"data-size"(){return Vb(A.size)},get"data-variant"(){return jb(A.variant)},get"data-icon"(){return A.icon?"inline-start":void 0},get classList(){return{...A.classList,[A.class??""]:!!A.class}},get children(){return[E(H,{get when(){return A.icon},children:n=>E(S1,{get name(){return n()},size:"small"})}),MA(()=>A.children)]}}))}function $b(e,A){const t=Object.fromEntries(Object.entries(A).filter(n=>n[1]!==void 0));if(typeof e=="string"){const n=Object.entries(t).map(i=>`${i[0]}:${i[1]}`).join(";");return n?`${e};${n}`:e}return{...e??{},...t}}var zb=v("<div>");function ZA(e){const[A,t]=uA(e,["variant","size","padding","style","class","classList","children"]),n=()=>typeof A.padding=="number"?`${A.padding}px`:A.padding;return(()=>{var i=zb();return f1(i,gA(t,{"data-component":"card",get"data-variant"(){return A.variant??"normal"},get"data-size"(){return A.size??"default"},get style(){return $b(A.style,{"--kw-card-padding":n()})},get classList(){return{...A.classList,[A.class??""]:!!A.class}}}),!1,!0),f(i,()=>A.children),i})()}var Wb=v("<span>");function oI(e){const[A,t]=uA(e,["size","tone","class","classList","children"]);return(()=>{var n=Wb();return f1(n,gA(t,{"data-component":"tag",get"data-size"(){return A.size??"normal"},get"data-tone"(){return A.tone??"neutral"},get classList(){return{...A.classList,[A.class??""]:!!A.class}}}),!1,!0),f(n,()=>A.children),n})()}var Zb=v("<span data-slot=status-dot aria-hidden=true>"),Xb=v("<p>"),A8=v("<section data-component=section-title><div><h2>"),e8=v("<div data-component=banner role=alert><div><span>"),t8=v("<strong>"),n8=v("<span data-slot=config-row-accent>"),i8=v("<div data-slot=config-row-body><div data-slot=config-row-title>"),r8=v("<div data-slot=config-row-trailing>"),o8=v("<div data-slot=config-row-leading>"),s8=v("<div data-slot=config-row-subtitle>"),a8=v("<div data-slot=config-row-actions>"),l8=v("<a data-component=config-row>"),g8=v("<button type=button data-component=config-row>"),c8=v("<div data-component=config-row>");function Ae(e){return E(oI,gA(e,{"data-slot":"config-tag"}))}function Me(e){return E(Ae,gA(e,{tone:"neutral"}))}function sI(e){return e.source==="project"||e.source==="local override"?"project":e.source==="global"||e.source==="inherited"?"global":e.overridden?"project":e.inherited?"global":"default"}function aI(e){return(()=>{var A=Zb();return P(()=>z(A,"data-tone",e.tone)),A})()}function eo(e){const A=()=>["connected","healthy","running"].includes(e.status)?{tone:"success",label:e.status==="healthy"?"Healthy":e.status==="running"?"Running":"Connected"}:["failed","error","unhealthy"].includes(e.status)?{tone:"critical",label:e.status==="unhealthy"?"Unhealthy":e.status==="failed"?"Failed":"Error"}:e.status==="stopped"?{tone:"neutral",label:"Stopped"}:{tone:"neutral",label:e.status||"Unknown"};return E(Ae,{get tone(){return A().tone},class:"kw-status-tag",get children(){return[E(aI,{get tone(){return MA(()=>A().tone==="critical")()?"critical":A().tone==="success"?"success":"neutral"}}),MA(()=>A().label)]}})}function lI(e){const A=()=>sI(e),t=()=>A().toUpperCase();return E(Ae,{class:"mono",get tone(){return A()==="project"?"info":"neutral"},get children(){return t()}})}function Ct(e){return(()=>{var A=A8(),t=A.firstChild,n=t.firstChild;return f(n,()=>e.children),f(t,()=>e.trailing,null),f(A,E(H,{get when(){return e.description},children:i=>(()=>{var r=Xb();return f(r,i),r})()}),null),A})()}function d8(e){const A=()=>e.tone==="critical"||e.tone==="warning"?"warning":e.tone==="success"?"circle-check":"help";return(()=>{var t=e8(),n=t.firstChild,i=n.firstChild;return f(t,E(S1,{get name(){return A()},size:"small"}),n),f(n,E(H,{get when(){return e.title},children:r=>(()=>{var o=t8();return f(o,r),o})()}),i),f(i,()=>e.children),f(t,()=>e.action,null),P(()=>z(t,"data-tone",e.tone??"info")),t})()}function x1(e){const A=()=>sI({source:e.source})==="project"||e.highlightOverride,t=()=>[E(H,{get when(){return A()},get children(){return n8()}}),E(H,{get when(){return e.leading},children:n=>(()=>{var i=o8();return f(i,n),i})()}),(()=>{var n=i8(),i=n.firstChild;return f(i,()=>e.title),f(n,E(H,{get when(){return e.subtitle},children:r=>(()=>{var o=s8();return f(o,r),o})()}),null),n})(),(()=>{var n=r8();return f(n,E(H,{get when(){return e.source!==void 0},get children(){return E(lI,{get source(){return e.source}})}}),null),f(n,()=>e.status,null),f(n,E(H,{get when(){return e.actions},children:i=>(()=>{var r=a8();return f(r,i),r})()}),null),n})()];return e.href?(()=>{var n=l8();return f(n,t),P(i=>{var r=A()||void 0,o=e.href;return r!==i.e&&z(n,"data-override",i.e=r),o!==i.t&&z(n,"href",i.t=o),i},{e:void 0,t:void 0}),n})():e.onClick?(()=>{var n=g8();return re(n,"click",e.onClick,!0),f(n,t),P(()=>z(n,"data-override",A()||void 0)),n})():(()=>{var n=c8();return f(n,t),P(()=>z(n,"data-override",A()||void 0)),n})()}Ee(["click"]);var Q8=v("<details><summary></summary><div class=models-select-menu role=listbox>"),B8=v("<button class=models-select-option type=button role=option>");function W1(e){const A=()=>e.options.find(i=>i.value===e.value)?.label??e.value;function t(i,r){e.disabled||i.disabled||(e.onSelect(i.value),r.currentTarget.closest("details")?.removeAttribute("open"))}function n(i){if(e.disabled){i.currentTarget.removeAttribute("open");return}i.currentTarget.open&&i.currentTarget.parentElement?.querySelectorAll(".models-select[open]").forEach(r=>{r!==i.currentTarget&&r.removeAttribute("open")})}return(()=>{var i=Q8(),r=i.firstChild,o=r.nextSibling;return i.addEventListener("toggle",n),f(r,A),f(o,E(vA,{get each(){return e.options},children:s=>(()=>{var a=B8();return a.$$click=l=>t(s,l),f(a,()=>s.label),P(l=>{var g=s.value===e.value,c=!!s.disabled,d=s.value===e.value,Q=e.disabled||s.disabled;return g!==l.e&&a.classList.toggle("selected",l.e=g),c!==l.t&&a.classList.toggle("disabled",l.t=c),d!==l.a&&z(a,"aria-selected",l.a=d),Q!==l.o&&(a.disabled=l.o=Q),l},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()})),P(s=>{var a=`models-select ${e.class??""}`,l=!!e.disabled,g=!!e.invalid,c=e.label,d=e.disabled,Q=e.label;return a!==s.e&&Vn(i,s.e=a),l!==s.t&&i.classList.toggle("disabled",s.t=l),g!==s.a&&i.classList.toggle("invalid",s.a=g),c!==s.o&&z(r,"aria-label",s.o=c),d!==s.i&&z(r,"aria-disabled",s.i=d),Q!==s.n&&z(o,"aria-label",s.n=Q),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i})()}Ee(["click"]);var E8=v("<label data-component=search-field><span data-slot=search-label></span><input>");function At(e){const[A,t]=uA(e,["label","value","variant","hideLabel","inputClass","class","classList","onValue"]);return(()=>{var n=E8(),i=n.firstChild,r=i.nextSibling;return f(i,()=>A.label),f1(r,gA(t,{get class(){return A.inputClass},type:"search",get value(){return A.value},get"aria-label"(){return MA(()=>A.hideLabel===!1)()?void 0:A.label},onInput:o=>A.onValue(o.currentTarget.value)}),!1,!1),P(o=>{var s=A.variant??"list",a=A.hideLabel===!1?"visible":"hidden",l={...A.classList,[A.class??""]:!!A.class};return s!==o.e&&z(n,"data-variant",o.e=s),a!==o.t&&z(n,"data-label",o.t=a),o.a=$i(n,l,o.a),o},{e:void 0,t:void 0,a:void 0}),n})()}const gI=we();function ze(){const e=fe(gI);if(!e)throw new Error("useConfig must be used within ConfigLayout");return e}function y0(){return"/console/".replace(/\/$/,"")}function wo(e,A=y0()){return!A||A==="/"?e:e===A?"/":e.startsWith(`${A}/`)?e.slice(A.length):e}function cI(e,A=y0()){const t=wo(e,A),n=t.indexOf("/settings");return n>0?`${t.slice(0,n)}/settings`:t.startsWith("/config")?"/config":"/settings"}function C8(e,A=y0()){const t=wo(e,A);return t==="/profile"||t.startsWith("/kilo/login")?"/profile":t.startsWith("/settings")||t.startsWith("/config")?"/settings":t.startsWith("/projects/")?"/project":"/projects"}const u8={apply_patch:"Apply Patch",bash:"Bash",edit:"Edit File",glob:"Find Files",grep:"Search Content",lsp:"Language Server",question:"Ask User",read:"Read File",recall:"Local Recall",skill:"Load Skill",task:"Subagent Task",todowrite:"Todo List",webfetch:"Fetch URL",websearch:"Web Search",write:"Write File"},I8={apply_patch:["Apply structured patches to add, update, move, or delete files.","Keeps edits explicit and easy to review."],bash:["Run shell commands in the current workspace.","Supports timeouts, working directories, and command descriptions."],edit:["Replace exact text inside an existing file.","Can update one match or all matches when needed."],glob:["Find files by path patterns.","Useful for locating files before reading or editing them."],grep:["Search file contents with regular expressions.","Can limit results to a file pattern such as TypeScript or CSS files."],lsp:["Use language-server features for code navigation.","Supports operations such as definitions, references, and diagnostics."],question:["Ask the user for a decision during execution.","Supports single-choice and multi-choice prompts."],read:["Read files, directories, images, and PDFs from the workspace.","Supports line offsets and limits for large files."],recall:["Search and read previous project conversations.","Useful for recovering prior decisions or implementation context."],skill:["Load task-specific instructions and workflows.","Applies specialized repo guidance when a matching skill exists."],task:["Delegate focused exploration or implementation work to a subagent.","Useful for parallel codebase research and complex subtasks."],todowrite:["Track multi-step implementation work.","Shows progress with pending, in-progress, and completed states."],webfetch:["Fetch and convert web pages for analysis.","Supports markdown, text, and HTML output formats."],websearch:["Search the web for external information.","Supports fast, automatic, and deep search modes."],write:["Create or overwrite files with complete contents.","Best for new files or full-file replacements."]},h8=new Set(["api","html","id","json","lsp","mcp","pdf","url"]);function OA(e){return e.trim()}function Un(e){return e==null||e===""?"Not set":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)??"Unserializable value"}function dI(e){return[...e].sort((A,t)=>A.localeCompare(t))}function tc(e){return e.split(/\s+/).map(A=>A.trim()).filter(Boolean)}function F1(e){return e.trim().split(/[\s._/-]+/).filter(Boolean).map(A=>/^[A-Z0-9]+$/.test(A)&&A.length<=4?A:`${A[0]?.toUpperCase()??""}${A.slice(1).toLowerCase()}`).join(" ")}function f8(e){const A=e.toLowerCase();return h8.has(A)?A.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function qQ(e){return e.length<=180?e:`${e.slice(0,177)}...`}function p8(e){const A=e.replace(/```[\s\S]*?```/g," ").replace(/[*`#>_-]+/g," ").replace(/\s+/g," ").trim(),t=A.split(/(?:\.|\?|!)\s+/).map(n=>n.trim()).filter(Boolean).slice(0,2);return t.length?t.map(qQ):A?[qQ(A)]:[]}function bt(e){const A=u8[e];if(A)return A;const t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[._:/-]+/g," ").replace(/\s+/g," ").trim();return t?t.split(" ").map(f8).join(" "):e}function D0(e){const A=I8[e.id];if(A)return A;const t=e.detail?.description.trim();return t?p8(t):["No capability description is available for this tool."]}function _i(e){return e.split(",").map(A=>A.trim()).filter(Boolean)}function TQ(e){return!e||typeof e!="object"||Array.isArray(e)?0:Object.keys(e).length}function be(e){return e instanceof Error?e.message:typeof e=="string"?e:Un(e)}function m8(e){return e==="subagent"?"subagent":e==="all"?"all":"primary"}var w8=v("<main class=config-page><section class=config-page-header><div><h1>"),y8=v("<p>"),D8=v("<div class=config-page-actions>"),k8=v("<section class=config-toolbar>"),b8=v("<div class=config-toolbar-controls>"),v8=v("<div class=config-toolbar-meta>");function We(e){return(()=>{var A=w8(),t=A.firstChild,n=t.firstChild,i=n.firstChild;return f(i,()=>e.title),f(n,E(H,{get when(){return e.description},children:r=>(()=>{var o=y8();return f(o,r),o})()}),null),f(t,E(H,{get when(){return e.actions},children:r=>(()=>{var o=D8();return f(o,r),o})()}),null),f(A,()=>e.children,null),A})()}function QI(e){return E(H,{get when(){return e.children||e.meta},get children(){var A=k8();return f(A,E(H,{get when(){return e.children},children:t=>(()=>{var n=b8();return f(n,t),n})()}),null),f(A,E(H,{get when(){return e.meta},children:t=>(()=>{var n=v8();return f(n,t),n})()}),null),A}})}function Oe(e){return E(lI,e)}const BI=[{value:"ask",label:"Ask"},{value:"allow",label:"Allow"},{value:"deny",label:"Deny"}],$t=[{id:"external_directory",title:"External Directory",description:"Access files outside the project directory.",noun:"path",placeholder:"e.g. ~/Downloads/**"},{id:"bash",title:"Bash",description:"Run shell commands.",noun:"command",placeholder:"e.g. git status or npm *"},{id:"read",title:"Read",description:"Read files by matching file paths.",noun:"path",placeholder:"e.g. **/*.env"},{id:"edit",title:"Edit",description:"Modify files, including writes, patches, and multi-edits.",noun:"path",placeholder:"e.g. src/**/*.ts"}],k0=[{id:"glob",title:"Glob",description:"Match files using glob patterns."},{id:"grep",title:"Grep",description:"Search file contents using regular expressions."},{id:"list",title:"List",description:"List files within a directory."},{id:"task",title:"Task",description:"Launch sub-agents."},{id:"skill",title:"Skill",description:"Load a skill by name."},{id:"lsp",title:"LSP",description:"Run language server queries."},{id:"todowrite",title:"Todo Write",description:"Update the todo list."},{id:"question",title:"Question",description:"Ask the user a question."},{id:"webfetch",title:"Web Fetch",description:"Fetch content from a URL."},{id:"websearch",title:"Web Search",description:"Search the web."},{id:"doom_loop",title:"Doom Loop",description:"Detect repeated tool calls with identical input."},{id:"agent_manager",title:"Agent Manager",description:"Manage Agent Manager operations."}],EI=[...$t,...k0],M8=new Set($t.map(e=>e.id)),N8=new Set(EI.map(e=>e.id));function b0(e,A="ask"){return e==="ask"||e==="allow"||e==="deny"?e:A}function Ja(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function CI(e){return Ja(e.effective.permission)}function v0(e,A){return e.overlay.collections.permission?.find(t=>t.key===A)}function uI(e,A){return typeof e.effective.permission=="string"?e.effective.permission:CI(e)[A]}function II(e){return b0(e.effective.permission)}function x8(e,A){return e?A==="*"&&typeof e.value=="string"?e.path:[...e.path,A]:["permission",A]}function to(e,A,t,n){if(!(t!=="ask"&&t!=="allow"&&t!=="deny"))return{tool:e,pattern:A,action:t,source:n?.source??"default",inherited:n?.inherited??!1,overridden:n?.overridden??!1,path:n?x8(n,A):["permission",e,A]}}function S8(e){const A=e.value;if(A&&typeof A=="object"&&!Array.isArray(A))return Object.entries(A).flatMap(([n,i])=>to(e.key,n,i,e)??[]);const t=to(e.key,"*",A,e);return t?[t]:[]}function L8(e,A,t){const n=Ja(A);if(Object.keys(n).length)return Object.entries(n).flatMap(([r,o])=>to(e,r,o,t)??[]);const i=to(e,"*",A,t);return i?[i]:[]}function F8(e,A){const t=v0(e,A.id),n=uI(e,A.id),i=Ja(n),r=II(e);return{...A,action:b0(typeof n=="string"?n:i["*"],r),source:t?.source??"default",inherited:t?.inherited??!1,overridden:t?.overridden??!1}}function _8(e,A){const t=v0(e,A.id),n=uI(e,A.id),i=Ja(n),r=II(e);return{...A,action:b0(typeof n=="string"?n:i["*"],r),source:t?.source??"default",inherited:t?.inherited??!1,overridden:t?.overridden??!1,rules:Object.entries(i).filter(([o])=>o!=="*").flatMap(([o,s])=>to(A.id,o,s,t)??[])}}function G8(){const e=ze(),A=()=>e.data(),[t,n]=R("closed"),[i,r]=R("external_directory"),[o,s]=R(""),[a,l]=R("ask"),g=U(()=>(A()?.overlay.collections.permission??[]).flatMap(S8)),c=U(()=>{const w=A();return w?$t.map(m=>_8(w,m)):[]}),d=U(()=>{const w=A();return w?k0.map(m=>F8(w,m)):[]}),Q=U(()=>{const w=A();return w?Object.entries(CI(w)).filter(([m])=>!N8.has(m)).flatMap(([m,y])=>L8(m,y,v0(w,m))).sort((m,y)=>m.tool.localeCompare(y.tool)||m.pattern.localeCompare(y.pattern)):[]}),B=U(()=>$t.find(w=>w.id===i())??$t[0]);function C(w){r(w),s(""),l("ask"),n("rule")}function h(){n("closed")}function I(){const w=A(),m=OA(o());if(!w||!m){e.fail(`Enter a ${B().noun} pattern before saving.`);return}const y={[i()]:{[m]:a()}};e.save({permission:y}),h()}function u(w,m){const y=M8.has(w)?{[w]:{"*":m}}:{[w]:m};e.save({permission:y})}function p(w){e.unset([w.path])}return{ctx:e,mode:t,kind:i,pattern:o,setPattern:s,action:a,setAction:l,rules:g,groups:c,settings:d,other:Q,selected:B,open:C,close:h,add:I,setDefault:u,remove:p}}var nc=v("<div class=permission-row-meta>"),R8=v('<details class="models-select permission-select"><summary></summary><div class=models-select-menu role=listbox>'),U8=v("<button class=models-select-option type=button role=option>"),O8=v("<section class=permission-group><div class=permission-rules>"),K8=v("<div class=permissions><section class=permission-group><div class=permission-rules>"),q8=v("<div class=drawer-scrim>"),T8=v('<aside class="provider-drawer permission-drawer"aria-label="Permission rule configuration"><header class=drawer-header><div><h2></h2><span></span></div></header><div class="provider-form permission-form"><label class="required-field wide"><input></label><label class="required-field wide">Method</label></div><footer class=drawer-footer>'),J8=v("<span class=config-title-count>Permissions"),H8=v("<section class=permission-group><header class=permission-group-header><div class=permission-group-copy><h2></h2><span></span><p></p></div><div class=permission-section-actions></div></header><div class=permission-rules>"),Y8=v("<p class=permission-empty>No specific <!> rules."),P8=v("<span class=permission-pattern>"),V8=v("<span class=permission-subtitle><span></span><span class=permission-pattern>");function hI(e){return e==="allow"?"success":e==="deny"?"critical":"warning"}function M0(e){return BI.find(A=>A.value===e)?.label??e}function JQ(e){return(()=>{var A=nc();return f(A,E(Ae,{get tone(){return hI(e.rule.action)},get children(){return M0(e.rule.action)}}),null),f(A,E(Oe,{get source(){return e.rule.source},get inherited(){return e.rule.inherited},get overridden(){return e.rule.overridden}}),null),A})()}function Gi(e){const A=()=>M0(e.value);function t(i,r){e.disabled||(e.onSelect(i),r.currentTarget.closest("details")?.removeAttribute("open"))}function n(i){if(e.disabled){i.currentTarget.removeAttribute("open");return}i.currentTarget.open&&i.currentTarget.parentElement?.querySelectorAll(".models-select[open]").forEach(r=>{r!==i.currentTarget&&r.removeAttribute("open")})}return(()=>{var i=R8(),r=i.firstChild,o=r.nextSibling;return i.addEventListener("toggle",n),f(r,A),f(o,E(vA,{each:BI,children:s=>(()=>{var a=U8();return a.$$click=l=>t(s.value,l),f(a,()=>s.label),P(l=>{var g=s.value===e.value,c=s.value===e.value;return g!==l.e&&a.classList.toggle("selected",l.e=g),c!==l.t&&z(a,"aria-selected",l.t=c),l},{e:void 0,t:void 0}),a})()})),P(s=>{var a=!!e.disabled,l=e.label,g=e.disabled,c=e.label;return a!==s.e&&i.classList.toggle("disabled",s.e=a),l!==s.t&&z(r,"aria-label",s.t=l),g!==s.a&&z(r,"aria-disabled",s.a=g),c!==s.o&&z(o,"aria-label",s.o=c),s},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()}function j8(){const e=G8();return E(We,{get title(){return(()=>{var A=J8();return A.firstChild,f(A,E(Me,{get children(){return e.groups().length+e.settings().length}}),null),A})()},description:"Control what tools agents can use by default and add pattern-specific allow, ask, or deny rules.",get children(){return[(()=>{var A=K8(),t=A.firstChild,n=t.firstChild;return f(A,E(vA,{get each(){return e.groups()},children:i=>(()=>{var r=H8(),o=r.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling,g=l.nextSibling,c=s.nextSibling,d=o.nextSibling;return f(a,()=>i.title),f(l,()=>i.id),f(g,()=>i.description),f(c,E(Me,{get children(){return i.rules.length}}),null),f(c,E(BA,{icon:"plus",variant:"primary",get disabled(){return!!e.ctx.saving()},onClick:()=>e.open(i.id),children:"Add rule"}),null),f(r,E(x1,{title:"Default method",get subtitle(){return`Used for ${i.noun}s that do not match a specific rule.`},get status(){return(()=>{var Q=nc();return f(Q,E(Oe,{get source(){return i.source},get inherited(){return i.inherited},get overridden(){return i.overridden}})),Q})()},get actions(){return E(Gi,{get label(){return`Default method for ${i.title}`},get value(){return i.action},get disabled(){return!!e.ctx.saving()},onSelect:Q=>e.setDefault(i.id,Q)})}}),d),f(d,E(H,{get when(){return i.rules.length},get fallback(){return(()=>{var Q=Y8(),B=Q.firstChild,C=B.nextSibling;return C.nextSibling,f(Q,()=>i.noun,C),Q})()},get children(){return E(vA,{get each(){return i.rules},children:Q=>E(x1,{get title(){return(()=>{var B=P8();return f(B,()=>Q.pattern),B})()},get subtitle(){return`${i.title} ${i.noun} rule`},get status(){return E(JQ,{rule:Q})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${i.title} rule ${Q.pattern}`},get disabled(){return!!e.ctx.saving()},onClick:()=>e.remove(Q)})}})})}})),r})()}),t),f(t,E(Ct,{get trailing(){return E(Me,{get children(){return e.settings().length}})},description:"Default methods for additional built-in tool permissions.",children:"Tool Defaults"}),n),f(n,E(vA,{get each(){return e.settings()},children:i=>E(x1,{get title(){return i.title},get subtitle(){return`${i.id} · ${i.description}`},get status(){return(()=>{var r=nc();return f(r,E(Oe,{get source(){return i.source},get inherited(){return i.inherited},get overridden(){return i.overridden}})),r})()},get actions(){return E(Gi,{get label(){return`Default method for ${i.title}`},get value(){return i.action},get disabled(){return!!e.ctx.saving()},onSelect:r=>e.setDefault(i.id,r)})}})})),f(A,E(H,{get when(){return e.other().length},get children(){var i=O8(),r=i.firstChild;return f(i,E(Ct,{get trailing(){return E(Me,{get children(){return e.other().length}})},description:"Additional tool permission rules from config.",children:"Other Permissions"}),r),f(r,E(vA,{get each(){return e.other()},children:o=>E(x1,{get title(){return bt(o.tool)},get subtitle(){return(()=>{var s=V8(),a=s.firstChild,l=a.nextSibling;return f(a,()=>o.tool),f(l,()=>o.pattern),s})()},get status(){return E(JQ,{rule:o})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${o.tool} rule ${o.pattern}`},get disabled(){return!!e.ctx.saving()},onClick:()=>e.remove(o)})}})})),i}}),null),A})(),E(H,{get when(){return e.mode()==="rule"},get children(){return[(()=>{var A=q8();return re(A,"click",e.close,!0),A})(),(()=>{var A=T8(),t=A.firstChild,n=t.firstChild,i=n.firstChild,r=i.nextSibling,o=t.nextSibling,s=o.firstChild,a=s.firstChild,l=s.nextSibling;l.firstChild;var g=o.nextSibling;return f(i,()=>`Add ${e.selected().title} Rule`),f(r,()=>`${e.selected().id} · ${e.selected().description}`),f(t,E(BA,{variant:"ghost","aria-label":"Close permission rule overlay",get onClick(){return e.close},children:"X"}),null),f(s,()=>e.selected().noun==="command"?"Command pattern":"Path pattern",a),a.$$input=c=>e.setPattern(c.currentTarget.value),z(a,"spellcheck",!1),f(l,E(Gi,{label:"Rule method",get value(){return e.action()},get disabled(){return!!e.ctx.saving()},get onSelect(){return e.setAction}}),null),f(g,E(BA,{variant:"ghost",get onClick(){return e.close},children:"Cancel"}),null),f(g,E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()},get onClick(){return e.add},children:"Save Rule"}),null),P(()=>z(a,"placeholder",e.selected().placeholder)),P(()=>a.value=e.pattern()),A})()]}})]}})}Ee(["click","input"]);const $8=["Review the current diff and report risks, regressions, and missing tests.","Plan the work in small steps, then implement the smallest correct change.","Inspect relevant files first, then summarize the root cause before editing.","Run the smallest relevant validation checks and report any remaining failures."];function z8(e,A){return e.id==="kilo"?-1:A.id==="kilo"?1:e.name.localeCompare(A.name)}function W8(e,A){return e.provider.id===A.providerID&&e.model.id===A.modelID?!0:e.model.providerID===A.providerID&&e.model.id===A.modelID}function Gl(e){const A=OA(e);if(A)return A}function Z8(e){const A=Number(e);if(Number.isInteger(A)&&A>0)return A}function Jt(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function cn(e){return typeof e=="string"?e:""}function X8(e){if(typeof e=="number"&&Number.isFinite(e))return e}function HQ(e,A="ask"){return e==="allow"||e==="deny"||e==="ask"?e:A}function ic(e,A,t){if(!(t!=="allow"&&t!=="deny"&&t!=="ask"))return{tool:e,pattern:A,action:t}}function YQ(e,A){const t=Jt(A);if(Object.keys(t).length)return Object.entries(t).flatMap(([i,r])=>ic(e,i,r)??[]);const n=ic(e,"*",A);return n?[n]:[]}const A7=new Set($t.map(e=>e.id)),e7=new Set(EI.map(e=>e.id));function t7(e){const A=e.options.source;if(typeof A=="string")return A}function n7(e){const A=Object.entries(i7(e));return{tools:dI(A.filter(([,t])=>t==="allow").map(([t])=>t)),permission:Object.fromEntries(A.filter(([,t])=>t!=="allow"))}}function i7(e){return Array.isArray(e)?e.reduce((A,t)=>{const n=Jt(t),i=cn(n.permission),r=cn(n.action);if(!i||!r)return A;const o=cn(n.pattern)||"*";if(o==="*")return{...A,[i]:r};const s=A[i],a=s&&typeof s=="object"&&!Array.isArray(s)?s:{};return{...A,[i]:{...a,[o]:r}}},{}):Jt(e)}function r7(e,A){return(e.overlay.collections.agent??[]).find(t=>t.key===A)}function ur(e){return e.displayName??F1(e.name)}function o7(e){return e.model?`${e.model.providerID}/${e.model.modelID}`:""}function rc(e,A){return!(e.native||A?.inherited||A?.editable===!1||t7(e)==="organization")}function s7(e){const A=ze(),t=()=>A.data(),n=U(()=>A.query()?.scope??"project"),[i,r]=R(),[o,s]=R(!0),[a,l]=R(!1),[g,c]=R("reviewer"),[d,Q]=R(""),[B,C]=R("subagent"),[h,I]=R(""),[u,p]=R(""),[w,m]=R(""),[y,M]=R([]),[D,k]=R(""),[_,L]=R("external_directory"),[x,N]=R(""),[F,J]=R("ask"),[T,V]=R({}),[tA,W]=R(),[oA,CA]=R("closed"),[eA,IA]=R(""),[Y,q]=R(""),[j,nA]=R(""),[Z,cA]=R([]),iA=U(()=>{const X=t();if(!X)return[];const dA=new Set([...Object.keys(X.effective.provider??{}),...X.providers.connected]);return X.providers.all.filter(yA=>dA.has(yA.id)).filter(yA=>Object.keys(yA.models).length>0).sort(z8)}),hA=U(()=>iA().flatMap(X=>Object.values(X.models).map(dA=>({id:`${X.id}/${dA.id}`,provider:X,model:dA})))),fA=U(()=>t()?.modelState.favorite??[]),$=X=>fA().some(dA=>W8(X,dA)),b=U(()=>{const X=eA().trim().toLowerCase();return hA().filter(dA=>X?`${dA.id} ${dA.model.name} ${dA.provider.name}`.toLowerCase().includes(X):!0).sort((dA,yA)=>{const HA=Number($(yA))-Number($(dA));if(HA!==0)return HA;const ce=dA.model.name.localeCompare(yA.model.name);if(ce!==0)return ce;const te=dA.provider.name.localeCompare(yA.provider.name);return te!==0?te:dA.id.localeCompare(yA.id)})}),wA=X=>{if(typeof X=="string")return hA().find(dA=>dA.id===X||`${dA.model.providerID}/${dA.model.id}`===X)},kA=U(()=>wA(h())),bA=U(()=>{const X=t();if(!X)return[];const dA=j().trim().toLowerCase(),yA=new Map(X.toolDetails.map(HA=>[HA.id,HA]));return X.tools.map(HA=>({id:HA,detail:yA.get(HA)})).filter(HA=>dA?`${HA.id} ${bt(HA.id)} ${D0(HA).join(" ")}`.toLowerCase().includes(dA):!0).sort((HA,ce)=>bt(HA.id).localeCompare(bt(ce.id)))}),$A=U(()=>new Set(Z())),qA=U(()=>Object.entries(T()).flatMap(([X,dA])=>YQ(X,dA))),YA=U(()=>$t.map(X=>{const dA=T()[X.id],yA=Jt(dA);return{...X,action:HQ(typeof dA=="string"?dA:yA["*"]),rules:Object.entries(yA).filter(([HA])=>HA!=="*").flatMap(([HA,ce])=>ic(X.id,HA,ce)??[])}})),He=U(()=>k0.map(X=>{const dA=T()[X.id],yA=Jt(dA);return{...X,action:HQ(typeof dA=="string"?dA:yA["*"])}})),ye=U(()=>Object.entries(T()).filter(([X])=>!e7.has(X)).flatMap(([X,dA])=>YQ(X,dA)).sort((X,dA)=>X.tool.localeCompare(dA.tool)||X.pattern.localeCompare(dA.pattern))),ie=U(()=>$t.find(X=>X.id===_())??$t[0]);function GA(X="reviewer"){c(X),Q(""),C("subagent"),I(""),p(""),m(""),M([]),k(""),V({}),W(void 0),l(!1),CA("closed"),L("external_directory"),N(""),J("ask"),IA(""),q(""),nA(""),cA([])}rA(()=>{e?.()||i()!==""&&(GA(),s(!0),r(""))}),rA(()=>{const X=t(),dA=e?.();if(!X||!dA||i()===dA)return;GA(dA),s(!1),r(dA);const yA=X.agents.find(w1=>w1.name===dA);if(!yA){A.fail(`Agent not found: ${dA}`);return}const HA=r7(X,dA),ce=rc(yA,HA);A.fail(""),s(!0),l(!ce);const te=Jt(HA?.value),R1=n7(te.permission??(ce?void 0:yA.permission)),U1=X8(te.steps)??yA.steps;c(yA.name),Q(cn(te.description)||yA.description||""),C(m8(cn(te.mode)||yA.mode)),I(cn(te.model)||o7(yA)),p(cn(te.color)||yA.color||""),m(U1?String(U1):""),M(R1.tools),V(R1.permission),k(cn(te.prompt)||yA.prompt||"")});function VA(){CA("closed")}function NA(){return a()?(A.fail("Inspected agents are read-only."),!1):!0}function Ie(){const X=m1();X&&(W(void 0),CA("markdown"),A.run("Previewing agent",()=>Yb(A.target(),X).then(W),{refetch:!1}))}function ae(){NA()&&(IA(""),q(h()),CA("model"))}function Le(X){q(X.id)}function Ye(){if(!NA())return;const X=Y();if(!X){A.fail("Select a model before saving the agent model field.");return}I(X),VA()}function e1(){NA()&&I("")}function jA(){NA()&&(nA(""),cA(y()),CA("tools"))}function aA(X){if(!NA())return;const dA=new Set(Z());dA.has(X)?dA.delete(X):dA.add(X),cA(dI(dA))}function xA(){NA()&&(M(Z()),VA())}function JA(){NA()&&M([])}function Fe(X){NA()&&(L(X),N(""),J("ask"),CA("permission"))}function Pe(X,dA){if(!NA())return;const yA={...T()};if(!A7.has(X)){yA[X]=dA,V(yA);return}const HA=Jt(yA[X]);yA[X]={...HA,"*":dA},V(yA)}function Ce(){if(!NA())return;const X=OA(x());if(!X){A.fail(`Enter a ${ie().noun} pattern before saving.`);return}const dA=_(),yA={...T()},HA=yA[dA],ce=HA&&typeof HA=="object"&&!Array.isArray(HA)?{...HA}:{};ce[X]=F(),yA[dA]=ce,V(yA),VA()}function Ue(X){if(!NA())return;const dA={...T()};if(X.pattern==="*"){const HA={...Jt(dA[X.tool])};if(Object.keys(HA).length){delete HA["*"],Object.keys(HA).length?dA[X.tool]=HA:delete dA[X.tool],V(dA);return}delete dA[X.tool],V(dA);return}const yA={...Jt(dA[X.tool])};delete yA[X.pattern],Object.keys(yA).length?dA[X.tool]=yA:delete dA[X.tool],V(dA)}function E1(X){if(!NA())return;const dA=OA(D());k(dA?`${dA}
21
21
 
22
22
  ${X}`:X)}function m1(){if(!o()){A.fail("Select an agent before previewing or saving.");return}const X=OA(g()),dA=OA(D());if(!X||!dA){A.fail("Enter an agent id and prompt before previewing or saving.");return}const yA=T();return{scope:n(),id:X,description:Gl(d()),mode:B(),model:Gl(h()),color:Gl(u()),steps:Z8(w()),tools:y().length?y():void 0,permission:Object.keys(yA).length?yA:void 0,prompt:dA}}function pA(){if(!NA())return;const X=m1();X&&A.run("Saving agent",()=>Pb(A.target(),X).then(W))}return{ctx:A,snap:t,scope:n,id:g,setId:c,desc:d,setDesc:Q,mode:B,setMode:C,model:h,setModel:I,color:u,setColor:p,steps:w,setSteps:m,tools:y,prompt:D,setPrompt:k,permTool:_,setPermTool:L,permPattern:x,setPermPattern:N,permAction:F,setPermAction:J,permissionGroups:YA,permissionDefaults:He,permissionOther:ye,selectedPermission:ie,draft:tA,ready:o,locked:a,panel:oA,close:VA,openMarkdown:Ie,picker:eA,setPicker:IA,choice:Y,models:b,selected:kA,fav:$,openModel:ae,selectModel:Le,saveModel:Ye,clearModel:e1,search:j,setSearch:nA,options:bA,pickedDraft:$A,openTools:jA,rules:qA,openPermission:Fe,setPermissionDefault:Pe,removePermission:Ue,toggleTool:aA,saveTools:xA,clearTools:JA,addPermission:Ce,insert:E1,save:pA}}var a7=v("<div class=agent-builder-field-actions>"),l7=v('<div class="ui-field agent-builder-field"><div class=agent-builder-field-head><div><span></span></div></div><div class=agent-builder-control>'),g7=v("<small>"),c7=v("<div class=permission-row-meta>"),d7=v("<div class=agents>"),Q7=v("<span class=config-title-count>Agents"),B7=v("<p class=empty>"),E7=v("<section class=agent-section>"),C7=v("<div>"),u7=v("<span class=agent-mode-dot aria-hidden=true>"),I7=v("<span class=agent-subtitle><span class=agent-id></span><span class=agent-description>"),h7=v('<div class="tags agent-tags">'),f7=v("<header class=ui-card-header><div><h2>Identity</h2><p>Name, mode, and display metadata for this agent."),p7=v("<input class=mono placeholder=reviewer>"),m7=v('<input placeholder="Review code and report risks">'),w7=v('<div class=agent-color-control><input class=mono placeholder=#0e639c><div class=agent-color-swatches aria-label="Preset colors">'),y7=v("<input class=mono placeholder=optional inputmode=numeric>"),PQ=v('<div class="ui-form agent-builder-form">'),D7=v("<header class=ui-card-header><div><h2>Model And Tools</h2><p>Choose the model and default tool access written into the agent frontmatter."),Rl=v("<strong>"),k7=v('<div class="tag-cloud agent-tool-summary">'),b7=v("<header class=ui-card-header><div><h2>System Prompt</h2><p>Markdown instructions that define how this agent behaves."),v7=v('<textarea class="mono agent-prompt-input"placeholder="Describe how this agent should behave.">'),M7=v('<div class="ui-form agent-builder-form"><div class=agent-snippets><div class=block-title><strong>Prompt snippets</strong><span>Insert a starter instruction into the prompt, then customize it.</span></div><div class=snippet-list>'),N7=v("<header class=ui-card-header><div><h2>Agent Permissions</h2><p>Add scalar or pattern-specific overrides before previewing markdown."),x7=v("<section class=permission-group><div class=permission-rules>"),S7=v('<div class="ui-card-body agent-permissions-body"><div class="permissions agent-permissions"><section class=permission-group><div class=permission-rules>'),L7=v('<div class="builder agent-builder"><section class="builder-form agent-builder-stack">'),qo=v("<div class=drawer-scrim>"),F7=v('<aside class=provider-drawer aria-label="Agent model selector"><header class=drawer-header><div><h2>Choose Model</h2><span>Favorites are listed first, then models are sorted alphabetically.</span></div></header><div class="provider-picker model-picker"></div><footer class=drawer-footer>'),_7=v('<aside class=provider-drawer aria-label="Agent tool access selector"><header class=drawer-header><div><h2>Choose Tool Access</h2><span>Selected tools are written as allow permissions in the agent frontmatter.</span></div></header><div class="provider-picker tool-picker"></div><footer class=drawer-footer>'),G7=v('<aside class="provider-drawer permission-drawer"aria-label="Agent permission rule configuration"><header class=drawer-header><div><h2></h2><span></span></div></header><div class="provider-form permission-form"><label class="required-field wide"><input></label><label class="required-field wide">Method</label></div><footer class=drawer-footer>'),R7=v('<aside class=provider-drawer aria-label="Generated agent markdown"><header class=drawer-header><div><h2>Markdown</h2><span></span></div></header><div class="provider-picker markdown-picker">'),U7=v("<button class=agent-color-swatch type=button>"),VQ=v("<span class=mono>"),O7=v("<strong>No tools selected"),K7=v("<span>No allow permissions will be written."),q7=v("<section class=permission-group><header class=permission-group-header><div class=permission-group-copy><h2></h2><span></span><p></p></div><div class=permission-section-actions></div></header><div class=permission-rules>"),T7=v("<p class=permission-empty>No specific <!> rules."),J7=v("<span class=permission-pattern>"),H7=v("<span class=permission-subtitle><span></span><span class=permission-pattern>"),Y7=v("<p class=empty>No models match this filter."),P7=v('<button class="provider-option model-option"type=button><span class=model-star aria-hidden=true></span><div><strong></strong><span></span></div><div class=tags>'),V7=v("<p class=empty>No tools match this filter."),j7=v('<button class="provider-option tool-option"type=button><div class="model-main tool-main"><div class=model-title><div><strong></strong><span></span></div></div><div class=tags></div></div><ul class=tool-capabilities>'),$7=v("<li>"),z7=v("<p class=empty>Generating markdown preview..."),W7=v("<pre class=markdown-preview>");const Z7=["#0e639c","#89d185","#cca700","#f14c4c","#3794ff","#c586c0","#9cdcfe"],X7=[{value:"primary",label:"Primary"},{value:"subagent",label:"Subagent"},{value:"all",label:"Both"}];function jQ(e){return e.description??"No description available."}function Av(e){return e===0?"Project Agents":"Global Agents"}function fI(){const e=Ft(),A=La();return{href:n=>{const i=n?`/${encodeURIComponent(n)}`:"";return`${cI(e.pathname)}/agents${i}${e.search}`},nav:A}}function ev(e){return e.length===1?"1 tool":`${e.length} tools`}function rn(e){return(()=>{var A=l7(),t=A.firstChild,n=t.firstChild,i=n.firstChild,r=t.nextSibling;return f(i,()=>e.label),f(n,E(H,{get when(){return e.description},children:o=>(()=>{var s=g7();return f(s,o),s})()}),null),f(t,E(H,{get when(){return e.actions},get children(){var o=a7();return f(o,()=>e.actions),o}}),null),f(r,()=>e.children),A})()}function $Q(e){return(()=>{var A=c7();return f(A,E(Ae,{get tone(){return hI(e.action)},get children(){return M0(e.action)}})),A})()}function tv(){const e=fI(),A=ze(),[t,n]=R(""),i=()=>A.data(),r=U(()=>{const l=i();if(!l)return[];const g=A.query()?.scope??"global",c=new Map((l.overlay.collections.agent??[]).map(Q=>[Q.key,Q])),d=new Set((l.overlay.collections.agent??[]).filter(Q=>Q.source==="project").map(Q=>Q.key));return l.agents.filter(Q=>{const B=c.get(Q.name);return g==="global"?!B?.local:d.has(Q.name)||!B?.local}).map(Q=>({item:Q,entry:c.get(Q.name),rank:d.has(Q.name)?0:1})).sort((Q,B)=>Q.rank-B.rank||ur(Q.item).localeCompare(ur(B.item)))}),o=U(()=>{const l=t().trim().toLowerCase();return l?r().filter(g=>`${ur(g.item)} ${g.item.name} ${jQ(g.item)}`.toLowerCase().includes(l)):r()}),s=U(()=>[0,1].map(l=>o().filter(g=>g.rank===l)).filter(l=>l.length)),a=U(()=>r().length?"No agents match this filter.":"No agents loaded.");return E(H,{get when(){return i()},children:l=>E(We,{get title(){return(()=>{var g=Q7();return g.firstChild,f(g,E(Me,{get children(){return r().length}}),null),g})()},description:"Agents are reusable model, prompt, and tool configurations. Primary agents drive sessions; subagents are delegated to.",get actions(){return E(BA,{icon:"plus",variant:"primary",onClick:()=>e.nav(e.href("new")),children:"New agent"})},get children(){return[E(At,{label:"Filter agents",get value(){return t()},placeholder:"Filter by name or ID...",onValue:n}),(()=>{var g=d7();return f(g,E(H,{get when(){return s().length},get fallback(){return(()=>{var c=B7();return f(c,a),c})()},get children(){return E(vA,{get each(){return s()},children:c=>(()=>{var d=E7();return f(d,E(H,{get when(){return A.query()?.scope==="project"},get children(){return E(Ct,{get children(){return Av(c[0]?.rank??1)}})}}),null),f(d,E(vA,{each:c,children:Q=>(()=>{var B=C7();return f(B,E(x1,{get leading(){return(()=>{var C=u7();return P(()=>z(C,"data-mode",Q.item.mode)),C})()},get title(){return ur(Q.item)},get subtitle(){return(()=>{var C=I7(),h=C.firstChild,I=h.nextSibling;return f(h,()=>Q.item.name),f(I,()=>jQ(Q.item)),C})()},get status(){return(()=>{var C=h7();return f(C,E(Ae,{get tone(){return Q.item.mode==="primary"?"brand":"neutral"},get children(){return Q.item.mode}}),null),f(C,E(Ae,{get children(){return Q.item.native?"Native":"Custom"}}),null),f(C,E(H,{get when(){return Q.item.hidden},get children(){return E(Ae,{children:"Hidden"})}}),null),f(C,E(H,{get when(){return Q.item.deprecated},get children(){return E(Ae,{children:"Deprecated"})}}),null),f(C,E(H,{get when(){return Q.entry},children:h=>E(Oe,{get source(){return h().source},get inherited(){return h().inherited},get overridden(){return h().overridden}})}),null),C})()},get actions(){return E(Te,{get icon(){return rc(Q.item,Q.entry)?"edit":"eye"},variant:"ghost",get"aria-label"(){return`${rc(Q.item,Q.entry)?"Edit":"Inspect"} ${ur(Q.item)}`},onClick:()=>e.nav(e.href(Q.item.name))})}})),P(()=>B.classList.toggle("inherited",!!Q.entry?.inherited)),B})()}),null),d})()})}})),g})()]}})})}function zQ(){const e=fI(),A=mo(),t=()=>A.agentID==="new"?void 0:A.agentID,n=s7(t),i=U(()=>t()?n.locked()?"Inspect Agent":"Edit Agent":"Agent Builder");return E(H,{get when(){return n.snap()},children:r=>E(We,{get title(){return i()},description:"Build a reusable agent by combining a prompt, model, mode, and tool permissions.",get actions(){return[E(BA,{variant:"secondary",get disabled(){return!!n.ctx.saving()||!n.ready()},get onClick(){return n.openMarkdown},children:"Markdown"}),E(H,{get when(){return!n.locked()},get children(){return E(BA,{variant:"primary",get disabled(){return!!n.ctx.saving()||!n.ready()},get onClick(){return n.save},children:"Save"})}}),E(Te,{icon:"close",variant:"secondary","aria-label":"Close agent builder",onClick:()=>e.nav(e.href())})]},get children(){return[(()=>{var o=L7(),s=o.firstChild;return f(s,E(ZA,{class:"ui-card agent-builder-card",padding:0,get children(){return[f7(),(()=>{var a=PQ();return f(a,E(rn,{label:"Agent id",description:"Used in @ mentions, commands, and agent files.",get children(){var l=p7();return l.$$input=g=>n.setId(g.currentTarget.value),z(l,"spellcheck",!1),P(()=>l.readOnly=n.locked()),P(()=>l.value=n.id()),l}}),null),f(a,E(rn,{label:"Description",description:"Shown when choosing or delegating to the agent.",get children(){var l=m7();return l.$$input=g=>n.setDesc(g.currentTarget.value),P(()=>l.readOnly=n.locked()),P(()=>l.value=n.desc()),l}}),null),f(a,E(rn,{label:"Mode",description:"Primary agents can run sessions directly; subagents are delegated to by other agents.",get children(){return E(W1,{label:"Agent mode",get value(){return n.mode()},options:X7,get disabled(){return n.locked()},get onSelect(){return n.setMode}})}}),null),f(a,E(rn,{label:"Color",get children(){var l=w7(),g=l.firstChild,c=g.nextSibling;return g.$$input=d=>n.setColor(d.currentTarget.value),f(c,E(vA,{each:Z7,children:d=>(()=>{var Q=U7();return Q.$$click=()=>n.setColor(d),z(Q,"aria-label",`Use color ${d}`),Dt(Q,"background-color",d),P(B=>{var C=n.color()===d,h=n.locked();return C!==B.e&&Q.classList.toggle("selected",B.e=C),h!==B.t&&(Q.disabled=B.t=h),B},{e:void 0,t:void 0}),Q})()})),P(()=>g.readOnly=n.locked()),P(()=>g.value=n.color()),l}}),null),f(a,E(rn,{label:"Max steps",description:"Optional hard cap on tool-call iterations.",get children(){var l=y7();return l.$$input=g=>n.setSteps(g.currentTarget.value),P(()=>l.readOnly=n.locked()),P(()=>l.value=n.steps()),l}}),null),a})()]}}),null),f(s,E(ZA,{class:"ui-card agent-builder-card",padding:0,get children(){return[D7(),(()=>{var a=PQ();return f(a,E(rn,{label:"Model",description:"Leave unset to inherit the default model, or choose one to pin this agent to a specific model.",get actions(){return[E(H,{get when(){return MA(()=>!n.locked())()&&n.model()},get children(){return E(BA,{variant:"secondary",get disabled(){return!!n.ctx.saving()},get onClick(){return n.clearModel},children:"Use Default"})}}),E(Te,{icon:"edit",variant:"secondary","aria-label":"Edit agent model",get disabled(){return!!n.ctx.saving()||n.locked()},get onClick(){return n.openModel}})]},get children(){return E(H,{get when(){return n.selected()},get fallback(){return[(()=>{var l=Rl();return f(l,()=>n.model()||"Inherit default model"),l})(),E(H,{get when(){return n.model()},children:l=>(()=>{var g=VQ();return f(g,l),g})()})]},children:l=>[(()=>{var g=Rl();return f(g,()=>`${l().provider.name} / ${l().model.name}`),g})(),(()=>{var g=VQ();return f(g,()=>l().id),g})()]})}}),null),f(a,E(rn,{label:"Tool access",description:"Selected tools are written as allow permissions.",get actions(){return[E(H,{get when(){return MA(()=>!n.locked())()&&n.tools().length},get children(){return E(BA,{variant:"secondary",get disabled(){return!!n.ctx.saving()},get onClick(){return n.clearTools},children:"Clear"})}}),E(Te,{icon:"edit",variant:"secondary","aria-label":"Edit tool access",get disabled(){return!!n.ctx.saving()||n.locked()},get onClick(){return n.openTools}})]},get children(){return E(H,{get when(){return n.tools().length},get fallback(){return[O7(),K7()]},get children(){return[(()=>{var l=Rl();return f(l,()=>ev(n.tools())),l})(),(()=>{var l=k7();return f(l,E(vA,{get each(){return n.tools()},children:g=>E(Ae,{children:g})})),l})()]}})}}),null),a})()]}}),null),f(s,E(ZA,{class:"ui-card agent-builder-card",padding:0,get children(){return[b7(),(()=>{var a=M7(),l=a.firstChild,g=l.firstChild,c=g.nextSibling;return f(a,E(rn,{label:"Prompt",get children(){var d=v7();return d.$$input=Q=>n.setPrompt(Q.currentTarget.value),P(()=>d.readOnly=n.locked()),P(()=>d.value=n.prompt()),d}}),l),f(c,E(vA,{each:$8,children:d=>E(BA,{variant:"secondary",get disabled(){return!!n.ctx.saving()||n.locked()},onClick:()=>n.insert(d),children:d})})),a})()]}}),null),f(s,E(ZA,{class:"ui-card agent-builder-card",padding:0,get children(){return[(()=>{var a=N7();return a.firstChild,f(a,E(Me,{get children(){return n.rules().length}}),null),a})(),(()=>{var a=S7(),l=a.firstChild,g=l.firstChild,c=g.firstChild;return f(l,E(vA,{get each(){return n.permissionGroups()},children:d=>(()=>{var Q=q7(),B=Q.firstChild,C=B.firstChild,h=C.firstChild,I=h.nextSibling,u=I.nextSibling,p=C.nextSibling,w=B.nextSibling;return f(h,()=>d.title),f(I,()=>d.id),f(u,()=>d.description),f(p,E(Me,{get children(){return d.rules.length}}),null),f(p,E(BA,{icon:"plus",variant:"primary",get disabled(){return!!n.ctx.saving()||n.locked()},onClick:()=>n.openPermission(d.id),children:"Add rule"}),null),f(Q,E(x1,{title:"Default method",get subtitle(){return`Used for ${d.noun}s that do not match a specific rule.`},get actions(){return E(Gi,{get label(){return`Default method for ${d.title}`},get value(){return d.action},get disabled(){return!!n.ctx.saving()||n.locked()},onSelect:m=>n.setPermissionDefault(d.id,m)})}}),w),f(w,E(H,{get when(){return d.rules.length},get fallback(){return(()=>{var m=T7(),y=m.firstChild,M=y.nextSibling;return M.nextSibling,f(m,()=>d.noun,M),m})()},get children(){return E(vA,{get each(){return d.rules},children:m=>E(x1,{get title(){return(()=>{var y=J7();return f(y,()=>m.pattern),y})()},get subtitle(){return`${d.title} ${d.noun} rule`},get status(){return E($Q,{get action(){return m.action}})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${d.title} rule ${m.pattern}`},get disabled(){return!!n.ctx.saving()||n.locked()},onClick:()=>n.removePermission(m)})}})})}})),Q})()}),g),f(g,E(Ct,{get trailing(){return E(Me,{get children(){return n.permissionDefaults().length}})},description:"Default methods for additional built-in tool permissions.",children:"Tool Defaults"}),c),f(c,E(vA,{get each(){return n.permissionDefaults()},children:d=>E(x1,{get title(){return d.title},get subtitle(){return`${d.id} · ${d.description}`},get actions(){return E(Gi,{get label(){return`Default method for ${d.title}`},get value(){return d.action},get disabled(){return!!n.ctx.saving()||n.locked()},onSelect:Q=>n.setPermissionDefault(d.id,Q)})}})})),f(l,E(H,{get when(){return n.permissionOther().length},get children(){var d=x7(),Q=d.firstChild;return f(d,E(Ct,{get trailing(){return E(Me,{get children(){return n.permissionOther().length}})},description:"Additional tool permission rules from this agent.",children:"Other Permissions"}),Q),f(Q,E(vA,{get each(){return n.permissionOther()},children:B=>E(x1,{get title(){return bt(B.tool)},get subtitle(){return(()=>{var C=H7(),h=C.firstChild,I=h.nextSibling;return f(h,()=>B.tool),f(I,()=>B.pattern),C})()},get status(){return E($Q,{get action(){return B.action}})},get actions(){return E(Te,{icon:"trash",variant:"ghost",get"aria-label"(){return`Delete ${B.tool} rule ${B.pattern}`},get disabled(){return!!n.ctx.saving()||n.locked()},onClick:()=>n.removePermission(B)})}})})),d}}),null),a})()]}}),null),o})(),E(H,{get when(){return n.panel()==="model"},get children(){return[(()=>{var o=qo();return re(o,"click",n.close,!0),o})(),(()=>{var o=F7(),s=o.firstChild;s.firstChild;var a=s.nextSibling,l=a.nextSibling;return f(s,E(BA,{variant:"ghost","aria-label":"Close model selector",get onClick(){return n.close},children:"X"}),null),f(o,E(At,{class:"drawer-search",hideLabel:!1,label:"Filter models",get value(){return n.picker()},variant:"drawer",placeholder:"Search by name, provider, or ID",get onValue(){return n.setPicker}}),a),f(a,E(H,{get when(){return n.models().length},get fallback(){return Y7()},get children(){return E(vA,{get each(){return n.models()},children:g=>(()=>{var c=P7(),d=c.firstChild,Q=d.nextSibling,B=Q.firstChild,C=B.nextSibling,h=Q.nextSibling;return c.$$click=()=>n.selectModel(g),f(B,()=>g.model.name),f(C,()=>g.id),f(h,E(Ae,{get children(){return g.provider.name}}),null),f(h,E(Ae,{get children(){return g.model.isFree?"free":"paid"}}),null),P(I=>{var u=n.choice()===g.id,p=!!n.fav(g);return u!==I.e&&c.classList.toggle("selected",I.e=u),p!==I.t&&d.classList.toggle("active",I.t=p),I},{e:void 0,t:void 0}),c})()})}})),f(l,E(BA,{variant:"ghost",get onClick(){return n.close},children:"Cancel"}),null),f(l,E(BA,{variant:"primary",get disabled(){return!!n.ctx.saving()||n.locked()||!n.choice()},get onClick(){return n.saveModel},children:"Save"}),null),o})()]}}),E(H,{get when(){return n.panel()==="tools"},get children(){return[(()=>{var o=qo();return re(o,"click",n.close,!0),o})(),(()=>{var o=_7(),s=o.firstChild;s.firstChild;var a=s.nextSibling,l=a.nextSibling;return f(s,E(BA,{variant:"ghost","aria-label":"Close tool selector",get onClick(){return n.close},children:"X"}),null),f(o,E(At,{class:"drawer-search",hideLabel:!1,label:"Filter tools",get value(){return n.search()},variant:"drawer",placeholder:"Search by tool name, ID, or capability",get onValue(){return n.setSearch}}),a),f(a,E(H,{get when(){return n.options().length},get fallback(){return V7()},get children(){return E(vA,{get each(){return n.options()},children:g=>(()=>{var c=j7(),d=c.firstChild,Q=d.firstChild,B=Q.firstChild,C=B.firstChild,h=C.nextSibling,I=Q.nextSibling,u=d.nextSibling;return c.$$click=()=>n.toggleTool(g.id),f(C,()=>bt(g.id)),f(h,()=>g.id),f(I,E(Ae,{get children(){return n.pickedDraft().has(g.id)?"Allowed":"Off"}})),f(u,E(vA,{get each(){return D0(g)},children:p=>(()=>{var w=$7();return f(w,p),w})()})),P(p=>{var w=!!n.pickedDraft().has(g.id),m=n.pickedDraft().has(g.id);return w!==p.e&&c.classList.toggle("selected",p.e=w),m!==p.t&&z(c,"aria-pressed",p.t=m),p},{e:void 0,t:void 0}),c})()})}})),f(l,E(BA,{variant:"ghost",get onClick(){return n.close},children:"Cancel"}),null),f(l,E(BA,{variant:"primary",get disabled(){return!!n.ctx.saving()||n.locked()},get onClick(){return n.saveTools},children:"Save"}),null),o})()]}}),E(H,{get when(){return n.panel()==="permission"},get children(){return[(()=>{var o=qo();return re(o,"click",n.close,!0),o})(),(()=>{var o=G7(),s=o.firstChild,a=s.firstChild,l=a.firstChild,g=l.nextSibling,c=s.nextSibling,d=c.firstChild,Q=d.firstChild,B=d.nextSibling;B.firstChild;var C=c.nextSibling;return f(l,()=>`Add ${n.selectedPermission().title} Rule`),f(g,()=>`${n.selectedPermission().id} · ${n.selectedPermission().description}`),f(s,E(BA,{variant:"ghost","aria-label":"Close permission rule overlay",get onClick(){return n.close},children:"X"}),null),f(d,()=>n.selectedPermission().noun==="command"?"Command pattern":"Path pattern",Q),Q.$$input=h=>n.setPermPattern(h.currentTarget.value),z(Q,"spellcheck",!1),f(B,E(Gi,{label:"Rule method",get value(){return n.permAction()},get disabled(){return!!n.ctx.saving()||n.locked()},get onSelect(){return n.setPermAction}}),null),f(C,E(BA,{variant:"ghost",get onClick(){return n.close},children:"Cancel"}),null),f(C,E(BA,{variant:"primary",get disabled(){return!!n.ctx.saving()||n.locked()},get onClick(){return n.addPermission},children:"Save Rule"}),null),P(h=>{var I=n.selectedPermission().placeholder,u=n.locked();return I!==h.e&&z(Q,"placeholder",h.e=I),u!==h.t&&(Q.readOnly=h.t=u),h},{e:void 0,t:void 0}),P(()=>Q.value=n.permPattern()),o})()]}}),E(H,{get when(){return n.panel()==="markdown"},get children(){return[(()=>{var o=qo();return re(o,"click",n.close,!0),o})(),(()=>{var o=R7(),s=o.firstChild,a=s.firstChild,l=a.firstChild,g=l.nextSibling,c=s.nextSibling;return f(g,()=>n.draft()?.path??"Previewing the current agent configuration."),f(s,E(BA,{variant:"ghost","aria-label":"Close markdown preview",get onClick(){return n.close},children:"X"}),null),f(c,E(H,{get when(){return n.draft()},get fallback(){return z7()},children:d=>(()=>{var Q=W7();return f(Q,()=>d().markdown),Q})()})),o})()]}})]}})})}Ee(["input","click"]);const nv=["#0c0a09","#fafaf9","#f9f76f","#a6a09b","#3794ff","#44403b"],Ul=[{id:"aura",swatches:["#0f0f0f","#edecee","#a277ff","#f694ff","#a277ff","#2d2d2d"]},{id:"ayu",swatches:["#0B0E14","#BFBDB6","#59C2FF","#D2A6FF","#E6B450","#6C7380"]},{id:"carbonfox",swatches:["#161616","#f2f4f8","#33b1ff","#78a9ff","#ff7eb6","#303030"]},{id:"catppuccin",swatches:["#1e1e2e","#cdd6f4","#89b4fa","#cba6f7","#f5c2e7","#313244"]},{id:"catppuccin-frappe",swatches:["#303446","#c6d0f5","#8da4e2","#ca9ee6","#f4b8e4","#414559"]},{id:"catppuccin-macchiato",swatches:["#24273a","#cad3f5","#8aadf4","#c6a0f6","#f5bde6","#363a4f"]},{id:"cobalt2",swatches:["#193549","#ffffff","#0088ff","#9a5feb","#2affdf","#1f4662"]},{id:"colorblind",swatches:["#1A1A2E","#E8E8E8","#0077BB","#EE7733","#33BBEE","#1F4068"]},{id:"cursor",swatches:["#181818","#e4e4e4","#88c0d0","#81a1c1","#88c0d0","#e4e4e413"]},{id:"dracula",swatches:["#282a36","#f8f8f2","#bd93f9","#ff79c6","#8be9fd","#44475a"]},{id:"everforest",swatches:["#2d353b","#d3c6aa","#a7c080","#7fbbb3","#d699b6","#859289"]},{id:"flexoki",swatches:["#100F0F","#CECDC3","#DA702C","#4385BE","#8B7EC8","#575653"]},{id:"github",swatches:["#0d1117","#c9d1d9","#58a6ff","#bc8cff","#39c5cf","#30363d"]},{id:"gruvbox",swatches:["#282828","#ebdbb2","#83a598","#d3869b","#8ec07c","#665c54"]},{id:"kanagawa",swatches:["#1F1F28","#DCD7BA","#7E9CD8","#957FB8","#D27E99","#54546D"]},{id:"kilo",swatches:["#0c0a09","#fafaf9","#f9f76f","#a6a09b","#f9f76f","#44403b"]},{id:"kilo-v1",swatches:["#1e1e1e","#cccccc","#faf74f","#007acc","#007fd4","#3c3c3c"]},{id:"lucent-orng",swatches:["#000000","#eeeeee","#EC5B2B","#EE7948","#FFF7F1","#EC5B2B"]},{id:"material",swatches:["#263238","#eeffff","#82aaff","#c792ea","#89ddff","#37474f"]},{id:"matrix",swatches:["#0a0e0a","#62ff94","#2eff6a","#00efff","#c770ff","#1e2a1b"]},{id:"mercury",swatches:["#171721","#dddde5","#8da4f5","#a7b6f8","#8da4f5","#b4b7c81f"]},{id:"monokai",swatches:["#272822","#f8f8f2","#66d9ef","#ae81ff","#a6e22e","#3e3d32"]},{id:"nightowl",swatches:["#011627","#d6deeb","#82AAFF","#7fdbca","#c792ea","#5f7e97"]},{id:"nord",swatches:["#2E3440","#ECEFF4","#88C0D0","#81A1C1","#8FBCBB","#434C5E"]},{id:"one-dark",swatches:["#282c34","#abb2bf","#61afef","#c678dd","#56b6c2","#393f4a"]},{id:"opencode",swatches:["#0a0a0a","#eeeeee","#fab283","#5c9cf5","#9d7cd8","#484848"]},{id:"orng",swatches:["#0a0a0a","#eeeeee","#EC5B2B","#EE7948","#FFF7F1","#EC5B2B"]},{id:"osaka-jade",swatches:["#111c18","#C1C497","#2DD5B7","#D2689C","#549e6a","#3d4a44"]},{id:"palenight",swatches:["#292d3e","#a6accd","#82aaff","#c792ea","#89ddff","#32364a"]},{id:"rosepine",swatches:["#191724","#e0def4","#9ccfd8","#c4a7e7","#ebbcba","#403d52"]},{id:"solarized",swatches:["#002b36","#839496","#268bd2","#6c71c4","#2aa198","#073642"]},{id:"synthwave84",swatches:["#262335","#ffffff","#36f9f6","#ff7edb","#b084eb","#495495"]},{id:"tokyonight",swatches:["#1a1b26","#c8d3f5","#82aaff","#c099ff","#ff966c","#737aa2"]},{id:"vercel",swatches:["#000000","#EDEDED","#0070F3","#52A8FF","#8E4EC6","#1F1F1F"]},{id:"vesper",swatches:["#101010","#FFF","#FFC799","#99FFE4","#FFC799","#282828"]},{id:"zenburn",swatches:["#3f3f3f","#dcdccc","#8cd0d3","#dc8cc3","#93e0e3","#5f5f5f"]}];function N0(e){return e.split("-").filter(Boolean).map(A=>`${A[0]?.toUpperCase()??""}${A.slice(1)}`).join(" ")}function WQ(e){return{id:e,swatches:nv,custom:!0}}function iv(e){return e==="stacked"?"stacked":"auto"}function Ur(e,A){return typeof e=="boolean"?e:A}function rv(){const e=ze(),A=U(()=>e.data()?.tui.theme??"kilo"),[t,n]=R(""),[i,r]=R("closed"),[o,s]=R(""),[a,l]=R(""),[g,c]=R("3"),[d,Q]=R(!1),[B,C]=R("auto"),[h,I]=R(!0),[u,p]=R(!1),w=U(()=>{const F=OA(o()).toLowerCase(),J=Ul.filter(V=>F?`${V.id} ${N0(V.id)}`.toLowerCase().includes(F):!0),T=OA(o());return!T||Ul.some(V=>V.id===T)||J.length?J:[WQ(T)]});function m(F){return Ul.find(J=>J.id===F)??WQ(F||"kilo")}const y=U(()=>m(t())),M=U(()=>m(a()||t()));rA(()=>{const F=e.data()?.tui;n(A()),!u()&&(c(String(F?.scroll_speed??3)),Q(Ur(F?.scroll_acceleration?.enabled,!1)),C(iv(F?.diff_style)),I(Ur(F?.mouse,!0)))});function D(){l(t()),s(""),r("theme")}function k(){r("closed")}function _(F){l(F.id)}function L(F){p(!0),F()}function x(){const F=OA(a());if(!F){e.fail("Select a TUI theme before saving.");return}e.tui({theme:F}),n(F),k()}function N(){const F=Number(g());if(!Number.isFinite(F)||F<.001){e.fail("Enter a scroll speed of at least 0.001.");return}const J={scroll_speed:F,scroll_acceleration:{enabled:d()},diff_style:B(),mouse:h()};e.tui(J),p(!1)}return{ctx:e,current:A,theme:t,active:y,selected:M,mode:i,picker:o,setPicker:s,choice:a,options:w,edit:D,close:k,select:_,saveTheme:x,speed:g,setSpeed:F=>L(()=>c(F)),accel:d,setAccel:F=>L(()=>Q(F)),diff:B,setDiff:F=>L(()=>C(F)),mouse:h,setMouse:F=>L(()=>I(F)),dirty:u,save:N}}function ov(){const e=ze(),[A,t]=R(!1),[n,i]=R(!0),[r,o]=R(!0),[s,a]=R("0.4"),[l,g]=R("none"),[c,d]=R(!1);rA(()=>{if(c())return;const C=e.data()?.tui,h=C?.attention;t(Ur(h?.enabled,!1)),i(Ur(h?.notifications,!0)),o(Ur(h?.sound,!0)),a(String(h?.volume??.4)),g(C?.title_icon??"none")});function Q(C){d(!0),C()}function B(){const C=Number(s());if(!Number.isFinite(C)||C<0||C>1){e.fail("Enter an attention volume between 0 and 1.");return}e.tui({title_icon:l(),attention:{enabled:A(),notifications:n(),sound:r(),volume:C}}),d(!1)}return{ctx:e,alert:A,setAlert:C=>Q(()=>t(C)),notify:n,setNotify:C=>Q(()=>i(C)),sound:r,setSound:C=>Q(()=>o(C)),volume:s,setVolume:C=>Q(()=>a(C)),icon:l,setIcon:C=>Q(()=>g(C)),dirty:c,save:B}}var sv=v("<button class=ui-toggle type=button><span><strong></strong><small>"),av=v("<header class=ui-card-header><div><h2>Terminal title</h2><p>Choose how session status appears in the terminal tab title."),lv=v("<div class=ui-form><div class=ui-field><span>Title Icon</span><small>None hides status icons. Unicode and Emojis show working, attention, and finished states."),gv=v("<header class=ui-card-header><div><h2>Attention</h2><p>Control when the TUI asks for attention and how it notifies you."),cv=v('<div class="ui-form attention-form"><label class=ui-field><span>Volume</span><input type=number min=0 max=1 step=0.05><small>Use a value from 0 to 1. The docs example uses 0.4.'),dv=v("<div class=ui-settings>");const Qv=[{value:"none",label:"None"},{value:"unicode",label:"Unicode"},{value:"emojis",label:"Emojis"}];function Ol(e){return(()=>{var A=sv(),t=A.firstChild,n=t.firstChild,i=n.nextSibling;return re(A,"click",e.onChange,!0),f(n,()=>e.label),f(i,()=>e.description),f(A,E(Ae,{get tone(){return e.checked?"success":"neutral"},get children(){return e.checked?"On":"Off"}}),null),P(r=>{var o=!!e.checked,s=e.checked,a=e.disabled;return o!==r.e&&A.classList.toggle("selected",r.e=o),s!==r.t&&z(A,"aria-pressed",r.t=s),a!==r.a&&(A.disabled=r.a=a),r},{e:void 0,t:void 0,a:void 0}),A})()}function Bv(){const e=ov();return E(We,{title:"CLI Notifications",description:"Configure terminal title indicators, TUI attention alerts, desktop notifications, and sound defaults.",get actions(){return E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()||!e.dirty()},get onClick(){return e.save},children:"Save"})},get children(){var A=dv();return f(A,E(ZA,{class:"ui-card",padding:0,get children(){return[av(),(()=>{var t=lv(),n=t.firstChild,i=n.firstChild,r=i.nextSibling;return f(n,E(W1,{class:"title-icon-select",label:"Title Icon",get value(){return e.icon()},options:Qv,get disabled(){return!!e.ctx.saving()},get onSelect(){return e.setIcon}}),r),t})()]}}),null),f(A,E(ZA,{class:"ui-card",padding:0,get children(){return[gv(),(()=>{var t=cv(),n=t.firstChild,i=n.firstChild,r=i.nextSibling;return f(t,E(Ol,{label:"Attention alerts",description:"Turn on TUI attention events.",get checked(){return e.alert()},get disabled(){return!!e.ctx.saving()},onChange:()=>e.setAlert(!e.alert())}),n),f(t,E(Ol,{label:"Desktop notifications",description:"Show desktop notifications when attention alerts fire.",get checked(){return e.notify()},get disabled(){return!!e.ctx.saving()||!e.alert()},onChange:()=>e.setNotify(!e.notify())}),n),f(t,E(Ol,{label:"Sound",description:"Play an attention sound when alerts fire.",get checked(){return e.sound()},get disabled(){return!!e.ctx.saving()||!e.alert()},onChange:()=>e.setSound(!e.sound())}),n),r.$$input=o=>e.setVolume(o.currentTarget.value),P(()=>r.disabled=!e.alert()),P(()=>r.value=e.volume()),t})()]}}),null),A}})}Ee(["click","input"]);var Ev=v("<div class=theme-swatches aria-hidden=true>"),Cv=v("<span class=theme-swatch>"),uv=v("<div class=theme-preview><div><strong></strong><span class=mono>"),Iv=v("<button class=ui-toggle type=button><span><strong></strong><small>"),hv=v("<header class=ui-card-header><div><h2>Theme</h2><p>Choose the TUI palette. Custom theme IDs can still be typed in the selector search."),fv=v("<div class=ui-card-body>"),pv=v("<header class=ui-card-header><div><h2>Interaction</h2><p>Control mouse capture, scrolling, and diff rendering behavior in the terminal."),mv=v("<div class=ui-form><label class=ui-field><span>Diff style</span><small>Auto adapts to terminal width; stacked always uses a single-column diff.</small></label><label class=ui-field><span>Scroll speed</span><input type=number min=0.001 step=0.25><small>Default is 3. Use lower values for slower scrolling."),wv=v("<div class=ui-settings>"),yv=v("<div class=drawer-scrim>"),Dv=v('<aside class="provider-drawer theme-drawer"aria-label="Theme selector"><header class=drawer-header><div><h2>Choose Theme</h2><span>Select a built-in theme or type a custom theme ID in search.</span></div></header><div class="provider-picker theme-picker"></div><footer class="drawer-footer theme-footer"><div>'),kv=v("<p class=empty>No themes match this filter."),bv=v('<button class="provider-option theme-option"type=button><div><strong></strong><span>');const vv=[{value:"auto",label:"Auto"},{value:"stacked",label:"Stacked"}];function pI(e){return(()=>{var A=Ev();return f(A,E(vA,{get each(){return e.swatches},children:t=>(()=>{var n=Cv();return Dt(n,"background-color",t),n})()})),A})()}function ZQ(e){return(()=>{var A=uv(),t=A.firstChild,n=t.firstChild,i=n.nextSibling;return f(n,()=>N0(e.item.id)),f(i,(()=>{var r=MA(()=>!!e.item.custom);return()=>r()?`${e.item.id} / custom`:e.item.id})()),f(A,E(pI,{get swatches(){return e.item.swatches}}),null),A})()}function XQ(e){return(()=>{var A=Iv(),t=A.firstChild,n=t.firstChild,i=n.nextSibling;return re(A,"click",e.onChange,!0),f(n,()=>e.label),f(i,()=>e.description),f(A,E(Ae,{get tone(){return e.checked?"success":"neutral"},get children(){return e.checked?"On":"Off"}}),null),P(r=>{var o=!!e.checked,s=e.checked,a=e.disabled;return o!==r.e&&A.classList.toggle("selected",r.e=o),s!==r.t&&z(A,"aria-pressed",r.t=s),a!==r.a&&(A.disabled=r.a=a),r},{e:void 0,t:void 0,a:void 0}),A})()}function Mv(){const e=rv();return E(We,{title:"CLI UI",description:"Configure terminal UI preferences saved in tui.json.",get actions(){return E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()||!e.dirty()},get onClick(){return e.save},children:"Save"})},get children(){return[(()=>{var A=wv();return f(A,E(ZA,{class:"ui-card ui-theme-card",padding:0,get children(){return[(()=>{var t=hv();return t.firstChild,f(t,E(BA,{variant:"secondary",get disabled(){return!!e.ctx.saving()},get onClick(){return e.edit},children:"Change Theme"}),null),t})(),(()=>{var t=fv();return f(t,E(ZQ,{get item(){return e.active()}})),t})()]}}),null),f(A,E(ZA,{class:"ui-card",padding:0,get children(){return[pv(),(()=>{var t=mv(),n=t.firstChild,i=n.firstChild,r=i.nextSibling,o=n.nextSibling,s=o.firstChild,a=s.nextSibling;return f(n,E(W1,{label:"Diff style",get value(){return e.diff()},options:vv,get onSelect(){return e.setDiff}}),r),a.$$input=l=>e.setSpeed(l.currentTarget.value),f(t,E(XQ,{label:"Mouse capture",description:"Allow the TUI to receive mouse input. Defaults to on.",get checked(){return e.mouse()},get disabled(){return!!e.ctx.saving()},onChange:()=>e.setMouse(!e.mouse())}),null),f(t,E(XQ,{label:"Scroll acceleration",description:"Enable macOS-style scroll acceleration.",get checked(){return e.accel()},get disabled(){return!!e.ctx.saving()},onChange:()=>e.setAccel(!e.accel())}),null),P(()=>a.value=e.speed()),t})()]}}),null),A})(),E(H,{get when(){return e.mode()==="theme"},get children(){return[(()=>{var A=yv();return re(A,"click",e.close,!0),A})(),(()=>{var A=Dv(),t=A.firstChild;t.firstChild;var n=t.nextSibling,i=n.nextSibling,r=i.firstChild;return f(t,E(BA,{variant:"ghost","aria-label":"Close theme selector",get onClick(){return e.close},children:"X"}),null),f(A,E(At,{class:"drawer-search",hideLabel:!1,label:"Filter themes",get value(){return e.picker()},variant:"drawer",placeholder:"Search theme or type a custom ID",get onValue(){return e.setPicker}}),n),f(n,E(H,{get when(){return e.options().length},get fallback(){return kv()},get children(){return E(vA,{get each(){return e.options()},children:o=>(()=>{var s=bv(),a=s.firstChild,l=a.firstChild,g=l.nextSibling;return s.$$click=()=>e.select(o),f(l,()=>N0(o.id)),f(g,(()=>{var c=MA(()=>!!o.custom);return()=>c()?`${o.id} / custom theme`:o.id})()),f(s,E(pI,{get swatches(){return o.swatches}}),null),P(()=>s.classList.toggle("selected",e.choice()===o.id)),s})()})}})),f(i,E(ZQ,{get item(){return e.selected()}}),r),f(r,E(BA,{variant:"ghost",get onClick(){return e.close},children:"Cancel"}),null),f(r,E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()||!e.choice()},get onClick(){return e.saveTheme},children:"Save Theme"}),null),A})()]}})]}})}Ee(["click","input"]);var Nv=v("<svg>"),xv=v("<svg><rect width=3 height=3 rx=1></svg>",!1,!0,!1);const Sv=new Set([1,2,4,7,8,11,13,14]),Lv=new Set([0,3,12,15]),Fv=Array.from({length:16},(e,A)=>({id:A,x:A%4*4,y:Math.floor(A/4)*4,delay:Math.random()*1.5,duration:1+Math.random()*1,outer:Sv.has(A),corner:Lv.has(A)}));function x0(e){return(()=>{var A=Nv();return f1(A,gA(e,{viewBox:"0 0 15 15","data-component":"spinner",get classList(){return{...e.classList,[e.class??""]:!!e.class}},fill:"currentColor"}),!0,!0),f(A,E(vA,{each:Fv,children:t=>(()=>{var n=xv();return P(i=>{var r=t.x,o=t.y,s=t.corner?0:void 0,a=t.corner?void 0:`${t.outer?"pulse-opacity-dim":"pulse-opacity"} ${t.duration}s ease-in-out infinite`,l=t.corner?void 0:"both",g=t.corner?void 0:`${t.delay}s`;return r!==i.e&&z(n,"x",i.e=r),o!==i.t&&z(n,"y",i.t=o),s!==i.a&&Dt(n,"opacity",i.a=s),a!==i.o&&Dt(n,"animation",i.o=a),l!==i.i&&Dt(n,"animation-fill-mode",i.i=l),g!==i.n&&Dt(n,"animation-delay",i.n=g),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),n})()})),A})()}const js=300,zn=250,Ti=800,$s="unified";function oc(e){return e==="split"?"split":$s}function sc(e){return typeof e!="number"||!Number.isFinite(e)?js:Math.min(Ti,Math.max(zn,Math.round(e)))}function _v(e){const A=Number(e);if(Number.isInteger(A)&&!(A<zn||A>Ti))return A}function Gv(){const e=ze(),[A,t]=R(String(js)),[n,i]=R($s),[r,o]=R(!1);rA(()=>{if(r())return;const l=e.data()?.effective.console;t(String(sc(l?.context_sidebar_width))),i(oc(l?.diff_style))});function s(){const l=_v(A());if(l===void 0){e.fail(`Enter a sidebar width between ${zn} and ${Ti} pixels.`);return}e.patch({console:{context_sidebar_width:l,diff_style:n()}}),t(String(l)),o(!1)}function a(){e.unset([["console","context_sidebar_width"],["console","diff_style"]]),t(String(js)),i($s),o(!1)}return{ctx:e,width:A,setWidth:l=>{t(l),o(!0)},style:n,setStyle:l=>{i(oc(l)),o(!0)},dirty:r,configured:()=>{const l=e.data()?.effective.console;return l?.context_sidebar_width!==void 0||l?.diff_style!==void 0},save:s,reset:a}}var Rv=v("<header class=ui-card-header><div><h2>Project context sidebar</h2><p>Set the default width used by the Context and Changes panel in project consoles."),Uv=v("<div class=ui-form><label class=ui-field><span>Sidebar width</span><input type=number step=1><small>Width in pixels, between <!> and <!>. You can also resize the sidebar by dragging its left edge."),Ov=v("<header class=ui-card-header><div><h2>Diff review</h2><p>Choose the default layout used when reviewing changed files in project consoles."),Kv=v("<div class=ui-form><div class=ui-field><span>Diff layout</span><small>Unified shows changes in one column. Split shows the original and modified file side by side."),qv=v("<div class=ui-settings>");const Tv=[{value:"unified",label:"Unified"},{value:"split",label:"Split"}];function Jv(){const e=Gv();return E(We,{title:"Console UI",description:"Configure the local Kilo Console interface. These preferences are saved in your user config.",get actions(){return[E(H,{get when(){return e.configured()},get children(){return E(BA,{variant:"secondary",get disabled(){return!!e.ctx.saving()},get onClick(){return e.reset},children:"Use default"})}}),E(BA,{variant:"primary",get disabled(){return!!e.ctx.saving()||!e.dirty()},get"aria-busy"(){return!!e.ctx.saving()},get onClick(){return e.save},get children(){return[E(H,{get when(){return e.ctx.saving()},get children(){return E(x0,{})}}),"Save"]}})]},get children(){var A=qv();return f(A,E(ZA,{class:"ui-card",padding:0,get children(){return[Rv(),(()=>{var t=Uv(),n=t.firstChild,i=n.firstChild,r=i.nextSibling,o=r.nextSibling,s=o.firstChild,a=s.nextSibling,l=a.nextSibling,g=l.nextSibling;return g.nextSibling,r.$$input=c=>e.setWidth(c.currentTarget.value),z(r,"min",zn),z(r,"max",Ti),f(o,zn,a),f(o,Ti,g),P(()=>r.value=e.width()),t})()]}}),null),f(A,E(ZA,{class:"ui-card",padding:0,get children(){return[Ov(),(()=>{var t=Kv(),n=t.firstChild,i=n.firstChild,r=i.nextSibling;return f(n,E(W1,{class:"console-diff-select",label:"Diff layout",get value(){return e.style()},options:Tv,get disabled(){return!!e.ctx.saving()},get onSelect(){return e.setStyle}}),r),t})()]}}),null),A}})}Ee(["input"]);const mI=[{id:"air",ext:[".R"],req:"air command available"},{id:"biome",ext:[".js",".jsx",".ts",".tsx",".html",".css",".md",".json",".yaml"],req:"biome.json(c) config file"},{id:"cargofmt",ext:[".rs"],req:"cargo fmt command available"},{id:"clang-format",ext:[".c",".cpp",".h",".hpp",".ino"],req:".clang-format config file"},{id:"cljfmt",ext:[".clj",".cljs",".cljc",".edn"],req:"cljfmt command available"},{id:"dart",ext:[".dart"],req:"dart command available"},{id:"dfmt",ext:[".d"],req:"dfmt command available"},{id:"gleam",ext:[".gleam"],req:"gleam command available"},{id:"gofmt",ext:[".go"],req:"gofmt command available"},{id:"htmlbeautifier",ext:[".erb",".html.erb"],req:"htmlbeautifier command available"},{id:"ktlint",ext:[".kt",".kts"],req:"ktlint command available"},{id:"latexindent",ext:[".tex"],req:"latexindent command available"},{id:"mix",ext:[".ex",".exs",".eex",".heex",".leex",".neex",".sface"],req:"mix command available"},{id:"nixfmt",ext:[".nix"],req:"nixfmt command available"},{id:"ocamlformat",ext:[".ml",".mli"],req:"ocamlformat command and .ocamlformat config file"},{id:"ormolu",ext:[".hs"],req:"ormolu command available"},{id:"oxfmt",ext:[".js",".jsx",".ts",".tsx"],req:"oxfmt dependency and experimental flag",note:"Experimental"},{id:"pint",ext:[".php"],req:"laravel/pint dependency in composer.json"},{id:"prettier",ext:[".js",".jsx",".ts",".tsx",".html",".css",".md",".json",".yaml"],req:"prettier dependency in package.json"},{id:"rubocop",ext:[".rb",".rake",".gemspec",".ru"],req:"rubocop command available"},{id:"ruff",ext:[".py",".pyi"],req:"ruff command available with config"},{id:"rustfmt",ext:[".rs"],req:"rustfmt command available"},{id:"shfmt",ext:[".sh",".bash"],req:"shfmt command available"},{id:"standardrb",ext:[".rb",".rake",".gemspec",".ru"],req:"standardrb command available"},{id:"terraform",ext:[".tf",".tfvars"],req:"terraform command available"},{id:"uv",ext:[".py",".pyi"],req:"uv command available"},{id:"zig",ext:[".zig",".zon"],req:"zig command available"}],wI=[{id:"astro",ext:[".astro"],req:"Auto-installs for Astro projects"},{id:"bash",ext:[".sh",".bash",".zsh",".ksh"],req:"Auto-installs bash-language-server"},{id:"biome",ext:[".js",".jsx",".ts",".tsx",".json",".jsonc",".css"],req:"biome dependency or config available"},{id:"clangd",ext:[".c",".cpp",".cc",".cxx",".c++",".h",".hpp",".hh",".hxx",".h++"],req:"Auto-installs for C/C++ projects"},{id:"clojure-lsp",ext:[".clj",".cljs",".cljc",".edn"],req:"clojure-lsp command available"},{id:"csharp",title:"C#",ext:[".cs",".csx"],req:".NET SDK installed"},{id:"dart",ext:[".dart"],req:"dart command available"},{id:"deno",ext:[".ts",".tsx",".js",".jsx",".mjs"],req:"deno command available with deno.json/c"},{id:"dockerfile",title:"Dockerfile",ext:["Dockerfile",".dockerfile"],req:"Docker language server available"},{id:"elixir-ls",ext:[".ex",".exs"],req:"elixir command available"},{id:"eslint",title:"ESLint",ext:[".ts",".tsx",".js",".jsx",".mjs",".cjs",".mts",".cts",".vue"],req:"eslint dependency in project"},{id:"fsharp",title:"F#",ext:[".fs",".fsi",".fsx",".fsscript"],req:".NET SDK installed"},{id:"gleam",ext:[".gleam"],req:"gleam command available"},{id:"gopls",ext:[".go"],req:"go command available"},{id:"haskell-language-server",title:"HLS",ext:[".hs",".lhs"],req:"haskell-language-server-wrapper command available"},{id:"jdtls",title:"JDTLS",ext:[".java"],req:"Java SDK 21+ installed"},{id:"julials",title:"JuliaLS",ext:[".jl"],req:"julia and LanguageServer.jl installed"},{id:"kotlin-ls",ext:[".kt",".kts"],req:"Auto-installs for Kotlin projects"},{id:"lua-ls",ext:[".lua"],req:"Auto-installs for Lua projects"},{id:"nixd",ext:[".nix"],req:"nixd command available"},{id:"ocaml-lsp",ext:[".ml",".mli"],req:"ocamllsp command available"},{id:"oxlint",ext:[".ts",".tsx",".js",".jsx",".mjs",".cjs",".mts",".cts",".vue",".astro",".svelte"],req:"oxlint dependency in project"},{id:"php intelephense",title:"PHP Intelephense",ext:[".php"],req:"Auto-installs for PHP projects"},{id:"prisma",ext:[".prisma"],req:"prisma command available"},{id:"pyright",ext:[".py",".pyi"],req:"pyright dependency installed"},{id:"razor",ext:[".razor",".cshtml"],req:".NET SDK and VS Code C# extension installed"},{id:"ruby-lsp",ext:[".rb",".rake",".gemspec",".ru"],req:"ruby and gem commands available"},{id:"rust",ext:[".rs"],req:"rust-analyzer command available"},{id:"sourcekit-lsp",ext:[".swift",".objc",".objcpp"],req:"swift installed, Xcode on macOS"},{id:"svelte",ext:[".svelte"],req:"Auto-installs for Svelte projects"},{id:"terraform",ext:[".tf",".tfvars"],req:"Auto-installs from GitHub releases"},{id:"texlab",ext:[".tex"],req:"Auto-installs texlab"},{id:"tinymist",ext:[".typ",".typc"],req:"Auto-installs from GitHub releases"},{id:"ty",title:"Ty",ext:[".py",".pyi"],req:"Experimental Python LSP",note:"Experimental"},{id:"typescript",title:"TypeScript",ext:[".ts",".tsx",".js",".jsx",".mjs",".cjs",".mts",".cts"],req:"typescript dependency in project"},{id:"vue",ext:[".vue"],req:"Auto-installs for Vue projects"},{id:"yaml-ls",title:"YAML LS",ext:[".yaml",".yml"],req:"Auto-installs Red Hat yaml-language-server"},{id:"zls",title:"ZLS",ext:[".zig",".zon"],req:"zig command available"}],Hv=new Set(mI.map(e=>e.id)),Yv=new Set(wI.map(e=>e.id));function Zt(e){return!e||typeof e!="object"||Array.isArray(e)?{}:e}function yI(e){return Array.isArray(e)?e.filter(A=>typeof A=="string"):[]}function AB(e){return new Map(e.map(A=>[A.key,A]))}function eB(e){return e===!0||!!(e&&typeof e=="object")}function To(e){return Zt(e?.value).disabled===!0}function Jo(e){return yI(Zt(e?.value).command)}function Ho(e,A){return Object.fromEntries(Object.entries(Zt(Zt(e?.value)[A])).filter(t=>typeof t[1]=="string"))}function tB(e){return Zt(Zt(e?.value).initialization)}function Kl(e,A,t){const n=yI(Zt(A?.value).extensions);return n.length?n:t.length?t:e.ext}function Pv(e){return Object.entries(e).map(A=>`${A[0]}=${A[1]}`).join(`
23
23
  `)}function Vv(e){return Object.keys(e).length?JSON.stringify(e,null,2):""}function nB(e){const A=e.split(`
@@ -6,7 +6,7 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/console/favicon.svg" />
7
7
  <link rel="icon" type="image/x-icon" href="/console/favicon.ico" />
8
8
  <title>Kilo Console</title>
9
- <script type="module" crossorigin src="/console/assets/index-B6ezW3e7.js"></script>
9
+ <script type="module" crossorigin src="/console/assets/index-Borxgj6z.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/console/assets/index-DOlJm2Mm.css">
11
11
  </head>
12
12
  <body>
package/bin/kilo CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kilocode/cli-darwin-x64-baseline",
3
- "version": "7.4.8",
3
+ "version": "7.4.11",
4
4
  "license": "MIT",
5
5
  "preferUnplugged": true,
6
6
  "os": [