agent-tower 0.7.1-beta.4 → 0.7.1

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.
Files changed (119) hide show
  1. package/dist/runtime/__tests__/codex-runtime-resolution.test.js +0 -2
  2. package/dist/runtime/__tests__/codex-runtime-resolution.test.js.map +1 -1
  3. package/dist/web/assets/{AgentDemoPage-B__0_CPX.js → AgentDemoPage-Gr8q6VxC.js} +1 -1
  4. package/dist/web/assets/{AgentEnvironmentSettingsPage-uSnG5iV3.js → AgentEnvironmentSettingsPage-b0XzUzna.js} +1 -1
  5. package/dist/web/assets/{AgentLogo-CoAT8dNB.js → AgentLogo-q8Chady2.js} +1 -1
  6. package/dist/web/assets/{ConversationPage-BOfzGTyj.js → ConversationPage-DQRA8WuD.js} +1 -1
  7. package/dist/web/assets/CreateTaskInput-Dr6Lvllw.js +1 -0
  8. package/dist/web/assets/{DemoPage-CuDLCuUQ.js → DemoPage-DaDC_MIJ.js} +1 -1
  9. package/dist/web/assets/{ExecutionPermissionSelector-Cu7Z72Yk.js → ExecutionPermissionSelector-DglILGVC.js} +1 -1
  10. package/dist/web/assets/{GeneralSettingsPage-CmG_TW4-.js → GeneralSettingsPage-BKRf-usO.js} +1 -1
  11. package/dist/web/assets/{Icons-B6q-ul89.js → Icons-7lThaqQv.js} +1 -1
  12. package/dist/web/assets/{LoadingPreviewPage-Db5WcYw_.js → LoadingPreviewPage-BHAQCQDA.js} +1 -1
  13. package/dist/web/assets/{McpSettingsPage-CQV1RaHW.js → McpSettingsPage-CVOEPwCv.js} +1 -1
  14. package/dist/web/assets/{MemberAvatar-BQA5sE4L.js → MemberAvatar-DUXHTIXf.js} +1 -1
  15. package/dist/web/assets/{NotificationSettingsPage-BGKJ6wO0.js → NotificationSettingsPage-DBe1YCNN.js} +1 -1
  16. package/dist/web/assets/{ProfileSettingsPage-dTvp-LFa.js → ProfileSettingsPage-DwziCseV.js} +1 -1
  17. package/dist/web/assets/ProjectKanbanPage-Dcz8KXWU.js +86 -0
  18. package/dist/web/assets/{ProjectSettingsPage-CwLXTwwe.js → ProjectSettingsPage-hzSrj79M.js} +1 -1
  19. package/dist/web/assets/{ProviderSettingsPage-Ced1VN2f.js → ProviderSettingsPage-CC3zkdf6.js} +1 -1
  20. package/dist/web/assets/{SettingsMasterDetail-CEZsOwjq.js → SettingsMasterDetail-D5lNH2f6.js} +1 -1
  21. package/dist/web/assets/{TeamSettingsPage-lErIz31n.js → TeamSettingsPage-Cdbvh2ne.js} +1 -1
  22. package/dist/web/assets/{arc-CgQPLQJF.js → arc-d2D24uRQ.js} +1 -1
  23. package/dist/web/assets/{architectureDiagram-3BPJPVTR-BRns2_cB.js → architectureDiagram-3BPJPVTR-C_p9_AH2.js} +1 -1
  24. package/dist/web/assets/{blockDiagram-GPEHLZMM-DUIPlzPN.js → blockDiagram-GPEHLZMM-CKsR1Tax.js} +1 -1
  25. package/dist/web/assets/{c4Diagram-AAUBKEIU-BfWsGU4R.js → c4Diagram-AAUBKEIU-BBUKt2FW.js} +1 -1
  26. package/dist/web/assets/channel-D0hF47LU.js +1 -0
  27. package/dist/web/assets/check-BqhuHtHP.js +1 -0
  28. package/dist/web/assets/{chevron-down-Dz61D9cJ.js → chevron-down-Bw_76CB_.js} +1 -1
  29. package/dist/web/assets/{chevron-right-q_hHAFb1.js → chevron-right-DbcFf_Dw.js} +1 -1
  30. package/dist/web/assets/{chevron-up-ChWM4fJS.js → chevron-up-x1n3MhC-.js} +1 -1
  31. package/dist/web/assets/{chunk-2J33WTMH-DOverrRX.js → chunk-2J33WTMH-BcGNhDoU.js} +1 -1
  32. package/dist/web/assets/{chunk-4BX2VUAB-BakE7rwb.js → chunk-4BX2VUAB-9dL7TVjW.js} +1 -1
  33. package/dist/web/assets/{chunk-55IACEB6-BJY_hqWJ.js → chunk-55IACEB6-CzJzh0tH.js} +1 -1
  34. package/dist/web/assets/{chunk-727SXJPM-Bz_y_ixN.js → chunk-727SXJPM-Bp5EOgoG.js} +1 -1
  35. package/dist/web/assets/{chunk-AQP2D5EJ-DPrP1E5u.js → chunk-AQP2D5EJ-BaLnh9ac.js} +1 -1
  36. package/dist/web/assets/{chunk-FMBD7UC4--yjwIi92.js → chunk-FMBD7UC4-BcbzC8r4.js} +1 -1
  37. package/dist/web/assets/{chunk-ND2GUHAM-BlN7Zpnx.js → chunk-ND2GUHAM-DkT5Stbd.js} +1 -1
  38. package/dist/web/assets/{chunk-QZHKN3VN-b97Y7iON.js → chunk-QZHKN3VN-DszScpAV.js} +1 -1
  39. package/dist/web/assets/{circle-alert-B3BU6yxp.js → circle-alert-ChWS5BPS.js} +1 -1
  40. package/dist/web/assets/classDiagram-4FO5ZUOK-ulXJsBKw.js +1 -0
  41. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ulXJsBKw.js +1 -0
  42. package/dist/web/assets/{code-block-OCS4YCEC-pXxp6Ipb.js → code-block-OCS4YCEC-G8tEtSdL.js} +1 -1
  43. package/dist/web/assets/{confirm-dialog-CeNfH2ZR.js → confirm-dialog-0vHzUzvI.js} +1 -1
  44. package/dist/web/assets/{cose-bilkent-S5V4N54A-BE-ASlGZ.js → cose-bilkent-S5V4N54A-DueZsNr5.js} +1 -1
  45. package/dist/web/assets/{cssMode-B8d06lCF.js → cssMode-Dqx3XDOC.js} +1 -1
  46. package/dist/web/assets/{dagre-BM42HDAG-lAvNJn8H.js → dagre-BM42HDAG-BkQGrA8s.js} +1 -1
  47. package/dist/web/assets/{diagram-2AECGRRQ-DBgI60j-.js → diagram-2AECGRRQ-D4qtEjjj.js} +1 -1
  48. package/dist/web/assets/{diagram-5GNKFQAL-BqFMhpcI.js → diagram-5GNKFQAL-ZuFk-7GO.js} +1 -1
  49. package/dist/web/assets/{diagram-KO2AKTUF-8dtMJ7XC.js → diagram-KO2AKTUF-kwBr5lw0.js} +1 -1
  50. package/dist/web/assets/{diagram-LMA3HP47-CEbAGy_U.js → diagram-LMA3HP47-m88-mNyr.js} +1 -1
  51. package/dist/web/assets/{diagram-OG6HWLK6-BTy4Wqho.js → diagram-OG6HWLK6-B9gV1dxA.js} +1 -1
  52. package/dist/web/assets/{erDiagram-TEJ5UH35-Fe0pjB7H.js → erDiagram-TEJ5UH35-De_DsoOX.js} +1 -1
  53. package/dist/web/assets/{flowDiagram-I6XJVG4X-Cn5xoMyS.js → flowDiagram-I6XJVG4X-9VwLS0b3.js} +1 -1
  54. package/dist/web/assets/{folder-picker-DlJ9hExj.js → folder-picker-B0khMt7A.js} +1 -1
  55. package/dist/web/assets/{freemarker2-WBCTYbCf.js → freemarker2-CLp1Yffb.js} +1 -1
  56. package/dist/web/assets/{ganttDiagram-6RSMTGT7-Bwf7sOJW.js → ganttDiagram-6RSMTGT7-DoOyYr5i.js} +1 -1
  57. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DEqHf_N3.js → gitGraphDiagram-PVQCEYII-CMGuTxMz.js} +1 -1
  58. package/dist/web/assets/{handlebars-aoMw8XNP.js → handlebars-CmLfR6Uy.js} +1 -1
  59. package/dist/web/assets/{html-mP4L-gn5.js → html-D34UDOLc.js} +1 -1
  60. package/dist/web/assets/{htmlMode-BRkGssBX.js → htmlMode-qjrvkZFJ.js} +1 -1
  61. package/dist/web/assets/{index-DxE1UagD.js → index-DI7lHrAR.js} +4 -4
  62. package/dist/web/assets/{index-_mroLJ3-.js → index-DrzmyANC.js} +8 -8
  63. package/dist/web/assets/index-MMCbS8_L.css +1 -0
  64. package/dist/web/assets/{infoDiagram-5YYISTIA-BzITBBR6.js → infoDiagram-5YYISTIA-gUCDmQX7.js} +1 -1
  65. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-Bd9MT4ne.js → ishikawaDiagram-YF4QCWOH-CmfFhhIz.js} +1 -1
  66. package/dist/web/assets/javascript-D5tp0LcO.js +1 -0
  67. package/dist/web/assets/{journeyDiagram-JHISSGLW-CR2x5gV0.js → journeyDiagram-JHISSGLW-BvV5GoR_.js} +1 -1
  68. package/dist/web/assets/{jsonMode-BixD4b0P.js → jsonMode-BbjYNQ7Q.js} +1 -1
  69. package/dist/web/assets/{kanban-definition-UN3LZRKU-DZx-6dHw.js → kanban-definition-UN3LZRKU-BpTm0MC-.js} +1 -1
  70. package/dist/web/assets/{layers-DOM1D0GC.js → layers-DslPQJ3T.js} +1 -1
  71. package/dist/web/assets/{linear-BBLqccsD.js → linear-BJ_g8wqu.js} +1 -1
  72. package/dist/web/assets/{liquid-DGETTZ3q.js → liquid-DBu3_6XS.js} +1 -1
  73. package/dist/web/assets/{lspLanguageFeatures-DLBGi3go.js → lspLanguageFeatures-PSX0tqnR.js} +1 -1
  74. package/dist/web/assets/{mdx-Co95_1jL.js → mdx-Bb4nrA8s.js} +1 -1
  75. package/dist/web/assets/{mermaid-NOHMQCX5-K1Nm51AP.js → mermaid-NOHMQCX5-B44shuzc.js} +4 -4
  76. package/dist/web/assets/{message-square-eTP8tZLX.js → message-square-C-22K3oa.js} +1 -1
  77. package/dist/web/assets/{mindmap-definition-RKZ34NQL-BuB-92St.js → mindmap-definition-RKZ34NQL-DS5GLydx.js} +1 -1
  78. package/dist/web/assets/{modal-CSnK65Cb.js → modal-CFVLBZ5p.js} +1 -1
  79. package/dist/web/assets/{monaco-C17UmdbS.js → monaco-CkaUvvB4.js} +3 -3
  80. package/dist/web/assets/{pencil-l1-UifOH.js → pencil-DB3VPszm.js} +1 -1
  81. package/dist/web/assets/{pieDiagram-4H26LBE5--40xP_i_.js → pieDiagram-4H26LBE5-C1PJJGsh.js} +1 -1
  82. package/dist/web/assets/{python-CQw9WtC1.js → python-BfodDYt4.js} +1 -1
  83. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-BxiOfFTG.js → quadrantDiagram-W4KKPZXB-CzDfs-TQ.js} +1 -1
  84. package/dist/web/assets/{razor-Du_XbZEg.js → razor-DdED1MBH.js} +1 -1
  85. package/dist/web/assets/{requirementDiagram-4Y6WPE33-GR0Dtr4T.js → requirementDiagram-4Y6WPE33-qHbU7oZa.js} +1 -1
  86. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-tWpKambG.js → sankeyDiagram-5OEKKPKP-BfRgrEeN.js} +1 -1
  87. package/dist/web/assets/{select-DB6L9-KB.js → select-CL78HCY0.js} +1 -1
  88. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-ByVTWC_r.js → sequenceDiagram-3UESZ5HK-CGTNzKk3.js} +1 -1
  89. package/dist/web/assets/{server-CrODl9NC.js → server-Cd7APx6v.js} +1 -1
  90. package/dist/web/assets/{stateDiagram-AJRCARHV-Bd8b6zV5.js → stateDiagram-AJRCARHV-BY1LJ4b7.js} +1 -1
  91. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BV_JKRZC.js +1 -0
  92. package/dist/web/assets/{switch-DvXJc47w.js → switch-DmQ0Brgd.js} +1 -1
  93. package/dist/web/assets/{textarea-CSKljQWP.js → textarea-DOte4pMQ.js} +1 -1
  94. package/dist/web/assets/{timeline-definition-PNZ67QCA-BZhaE4Q8.js → timeline-definition-PNZ67QCA-BBhCKsly.js} +1 -1
  95. package/dist/web/assets/{trash-2-DdOhDOCv.js → trash-2-BSAHXKfW.js} +1 -1
  96. package/dist/web/assets/{tsMode-D9Lc5Ctp.js → tsMode-B6rHoWny.js} +1 -1
  97. package/dist/web/assets/{typescript-jsG0idOk.js → typescript-C2A3q8UY.js} +1 -1
  98. package/dist/web/assets/{upload-9nN5Lg83.js → upload-e87qV_RH.js} +1 -1
  99. package/dist/web/assets/{use-profiles-8YJrKR2I.js → use-profiles-Cv2zBJOC.js} +1 -1
  100. package/dist/web/assets/{use-projects-BdSJ4zPv.js → use-projects-C8WDJXdj.js} +1 -1
  101. package/dist/web/assets/{use-providers-BlqWIGOP.js → use-providers-CnpIgITQ.js} +1 -1
  102. package/dist/web/assets/{useNormalizedLogs-B_LoDoiT.js → useNormalizedLogs-AbIXa8s-.js} +1 -1
  103. package/dist/web/assets/{vennDiagram-CIIHVFJN-COnwMBZG.js → vennDiagram-CIIHVFJN-DrDrt_Jg.js} +1 -1
  104. package/dist/web/assets/{wardley-L42UT6IY-DnIbpfhs.js → wardley-L42UT6IY-CMYQm14y.js} +1 -1
  105. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-QNFL1GWo.js → wardleyDiagram-YWT4CUSO-COLA9A80.js} +1 -1
  106. package/dist/web/assets/{xml-C_Zqe3tk.js → xml-D4xDxfjR.js} +1 -1
  107. package/dist/web/assets/{xychartDiagram-2RQKCTM6-CW7FVlM3.js → xychartDiagram-2RQKCTM6-BDegkKoT.js} +1 -1
  108. package/dist/web/assets/{yaml-CETOqGaS.js → yaml-yJExA7tq.js} +1 -1
  109. package/dist/web/index.html +2 -2
  110. package/package.json +1 -1
  111. package/dist/web/assets/CreateTaskInput-DwQsAlWX.js +0 -1
  112. package/dist/web/assets/ProjectKanbanPage-CHZc9WB7.js +0 -92
  113. package/dist/web/assets/channel-CYUMBIeW.js +0 -1
  114. package/dist/web/assets/check-C_RQ5zOf.js +0 -1
  115. package/dist/web/assets/classDiagram-4FO5ZUOK-KLi01tMF.js +0 -1
  116. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-KLi01tMF.js +0 -1
  117. package/dist/web/assets/index-BoQh7Rhc.css +0 -1
  118. package/dist/web/assets/javascript-CzeLwCQy.js +0 -1
  119. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-A6YN_ZNd.js +0 -1
@@ -1,4 +1,4 @@
1
- import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./index-DxE1UagD.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-BBLqccsD.js";import"./index-_mroLJ3-.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
1
+ import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./index-DI7lHrAR.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-BJ_g8wqu.js";import"./index-DrzmyANC.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{l as e}from"./monaco-C17UmdbS.js";import"./ProjectKanbanPage-CHZc9WB7.js";import"./index-_mroLJ3-.js";import"./mermaid-NOHMQCX5-K1Nm51AP.js";import"./chevron-right-q_hHAFb1.js";import"./chevron-down-Dz61D9cJ.js";import"./confirm-dialog-CeNfH2ZR.js";import"./modal-CSnK65Cb.js";import"./Icons-B6q-ul89.js";import"./CreateTaskInput-DwQsAlWX.js";import"./ExecutionPermissionSelector-Cu7Z72Yk.js";import"./check-C_RQ5zOf.js";import"./AgentLogo-CoAT8dNB.js";import"./use-projects-BdSJ4zPv.js";import"./MemberAvatar-BQA5sE4L.js";import"./use-providers-BlqWIGOP.js";import"./trash-2-DdOhDOCv.js";import"./useNormalizedLogs-B_LoDoiT.js";import"./folder-picker-DlJ9hExj.js";import"./circle-alert-B3BU6yxp.js";import"./message-square-eTP8tZLX.js";import"./layers-DOM1D0GC.js";import"./chevron-up-ChWM4fJS.js";import"./select-DB6L9-KB.js";import"./textarea-CSKljQWP.js";import"./server-CrODl9NC.js";import"./upload-9nN5Lg83.js";import"./pencil-l1-UifOH.js";const v={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},A={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{v as conf,A as language};
1
+ import{l as e}from"./monaco-CkaUvvB4.js";import"./ProjectKanbanPage-Dcz8KXWU.js";import"./index-DrzmyANC.js";import"./mermaid-NOHMQCX5-B44shuzc.js";import"./chevron-right-DbcFf_Dw.js";import"./chevron-down-Bw_76CB_.js";import"./confirm-dialog-0vHzUzvI.js";import"./modal-CFVLBZ5p.js";import"./Icons-7lThaqQv.js";import"./CreateTaskInput-Dr6Lvllw.js";import"./ExecutionPermissionSelector-DglILGVC.js";import"./check-BqhuHtHP.js";import"./AgentLogo-q8Chady2.js";import"./use-projects-C8WDJXdj.js";import"./MemberAvatar-DUXHTIXf.js";import"./use-providers-CnpIgITQ.js";import"./trash-2-BSAHXKfW.js";import"./useNormalizedLogs-AbIXa8s-.js";import"./folder-picker-B0khMt7A.js";import"./circle-alert-ChWS5BPS.js";import"./message-square-C-22K3oa.js";import"./layers-DslPQJ3T.js";import"./chevron-up-x1n3MhC-.js";import"./select-CL78HCY0.js";import"./textarea-DOte4pMQ.js";import"./server-Cd7APx6v.js";import"./upload-e87qV_RH.js";import"./pencil-DB3VPszm.js";const v={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},A={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{v as conf,A as language};
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/x-icon" href="/favicon.ico?v=20260720" sizes="any" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
7
7
  <title>Agent Tower</title>
8
- <script type="module" crossorigin src="/assets/index-_mroLJ3-.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-BoQh7Rhc.css">
8
+ <script type="module" crossorigin src="/assets/index-DrzmyANC.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-MMCbS8_L.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-tower",
3
- "version": "0.7.1-beta.4",
3
+ "version": "0.7.1",
4
4
  "description": "AI Agent Task Management Dashboard",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- import{k as F,o as ye,n as Ce,q as D,p as ue,t as Ct,aa as St,m as at,r as a,V as Tt,W as ce,u as pe,j as e,Q as ve,l as w,ag as Je,Z as Et,E as Mt,F as It,_ as et,X as Rt,D as At,ah as _t,ai as Lt}from"./index-_mroLJ3-.js";import{S as tt,T as Pe,R as le,m as de,c as we,W as L,u as Ot,A as Pt}from"./mermaid-NOHMQCX5-K1Nm51AP.js";import{g as Dt,a as zt,l as De}from"./ExecutionPermissionSelector-Cu7Z72Yk.js";import{A as be}from"./AgentLogo-CoAT8dNB.js";import{C as me}from"./chevron-down-Dz61D9cJ.js";import{C as te}from"./check-C_RQ5zOf.js";import{d as $t,F as qt}from"./use-projects-BdSJ4zPv.js";import{M as st}from"./MemberAvatar-BQA5sE4L.js";import{u as Ft}from"./use-providers-BlqWIGOP.js";import{P as Gt}from"./trash-2-DdOhDOCv.js";import{P as Ut}from"./useNormalizedLogs-B_LoDoiT.js";const Wt=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],sn=F("arrow-down",Wt);const Bt=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Kt=F("arrow-up",Bt);const Ht=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],Qt=F("chevrons-down",Ht);const Vt=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Yt=F("chevrons-up",Vt);const Xt=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Zt=F("gauge",Xt);const Jt=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],es=F("git-branch",Jt);const ts=[["path",{d:"M5 12h14",key:"1ays0h"}]],ss=F("minus",ts);const ns=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nn=F("search",ns);const rs=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],os=F("shield-alert",rs);const as=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],is=F("shield",as);const cs=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}]],ls=F("signal-high",cs);const ds=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],rn=F("square-pen",ds);const ms=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],us=F("zap",ms);function it(t){const s=ye(),r=at({queryKey:D.sessions.runtime(t),queryFn:()=>ue.get(`/sessions/${t}/runtime`),enabled:!!t});return a.useEffect(()=>{if(!t)return;const o=Tt.connect(),c=g=>{g.sessionId===t&&s.invalidateQueries({queryKey:D.sessions.runtime(t)})},l=g=>{g.sessionId===t&&s.setQueryData(D.sessions.runtime(t),g.state)},f=()=>{s.invalidateQueries({queryKey:D.sessions.runtime(t)})};return o.on(ce.SESSION_PERMISSION_REQUESTED,c),o.on(ce.SESSION_PERMISSION_INVALIDATED,c),o.on(ce.SESSION_RUNTIME_STATE_CHANGED,l),o.on("connect",f),()=>{o.off(ce.SESSION_PERMISSION_REQUESTED,c),o.off(ce.SESSION_PERMISSION_INVALIDATED,c),o.off(ce.SESSION_RUNTIME_STATE_CHANGED,l),o.off("connect",f)}},[t,s]),r}function ps(t){return t==="RUNNING"||t==="AWAITING_PERMISSION"||t==="CANCELLING"}function fs(t){return t===tt.RUNNING||t===tt.PENDING}function on(t,s){const{data:r}=it(t);return{runtimeState:r,isActive:fs(s)||ps(r?.turnState),isCancelling:r?.turnState==="CANCELLING"}}function xs(){const t=ye();return Ce({mutationFn:({sessionId:s,requestId:r,optionId:o})=>ue.post(`/sessions/${s}/permissions/${r}/resolve`,{optionId:o}),onSettled:(s,r,o)=>{t.invalidateQueries({queryKey:D.sessions.runtime(o.sessionId)})}})}function an(){const t=ye();return Ce({mutationFn:s=>ue.post(`/sessions/${s}/start`),onSuccess:(s,r)=>{t.invalidateQueries({queryKey:D.sessions.detail(r)}),t.invalidateQueries({queryKey:D.tasks.all})}})}const hs=45e3;function cn(){const t=ye();return Ce({mutationFn:async s=>{try{return await ue.post(`/sessions/${s}/stop`,void 0,{signal:AbortSignal.timeout(hs)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error("Stop request timed out before the server answered. The session may still be stopping; refresh the status and retry."):r}},onError:s=>{Ct.error(St("Failed to stop session. Refreshing status; check it and try again."),{description:s instanceof Error?s.message:void 0})},onSettled:(s,r,o)=>{t.setQueryData(D.sessions.runtime(o),c=>c?.turnState==="CANCELLING"?{...c,turnState:"IDLE"}:c),Promise.allSettled([t.invalidateQueries({queryKey:D.sessions.detail(o)}),t.invalidateQueries({queryKey:D.sessions.runtime(o)}),t.invalidateQueries({queryKey:D.workspaces.all}),t.invalidateQueries({queryKey:D.tasks.all})])}})}function ln(){const t=ye();return Ce({mutationFn:({id:s,message:r,providerId:o})=>ue.post(`/sessions/${s}/message`,{message:r,providerId:o}),onSuccess:()=>{t.invalidateQueries({queryKey:D.workspaces.all}),t.invalidateQueries({queryKey:D.tasks.all})}})}function dn({sessionId:t,compact:s=!1}){const{t:r}=pe(),{data:o}=it(t),c=xs(),l=o?.pendingPermissions[0],f=l?.requestId,g=c.reset;return a.useEffect(()=>{g()},[f,g]),l?e.jsx("div",{className:w("mb-2 border-l-2 border-warning bg-warning/5 px-3 py-2.5",s&&"px-2.5 py-2"),children:e.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[e.jsx(os,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:r("Permission required")}),e.jsx("div",{className:"mt-0.5 break-words text-xs text-muted-foreground",children:l.toolSummary||l.toolName||r("The agent needs approval to continue.")}),l.actionDetails?e.jsx("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-all text-xs",children:l.actionDetails}):null,e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:l.options.map(p=>e.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>c.mutate({sessionId:t,requestId:l.requestId,optionId:p.optionId}),className:w("inline-flex min-h-8 items-center gap-1.5 border px-3 text-xs font-medium transition-colors disabled:opacity-50",p.kind.startsWith("reject")?"border-destructive/30 text-destructive hover:bg-destructive/10":"border-border bg-background text-foreground hover:bg-muted"),children:[c.isPending&&c.variables?.requestId===l.requestId&&c.variables.optionId===p.optionId?e.jsx(ve,{className:"h-3.5 w-3.5 animate-spin","aria-hidden":"true"}):null,r(p.name)]},p.optionId))}),c.error?e.jsx("div",{className:"mt-1.5 text-xs text-destructive",role:"alert",children:c.error.message}):null]})]})}):null}function ke(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}function gs(t){return t>=.9?"text-red-500":t>=.7?"text-amber-500":"text-neutral-400"}function mn({usage:t,tooltipSide:s="top"}){const{t:r}=pe();if(!t)return null;const o=t.modelContextWindow,c=o?t.totalTokens/o:0,l=o?Math.min(Math.round(c*100),100):null,f=o?gs(c):"text-neutral-400",g=o?e.jsx("span",{children:r("上下文: {used} / {max} tokens",{used:ke(t.totalTokens),max:ke(o)})}):e.jsx("span",{children:r("已使用: {used} tokens",{used:ke(t.totalTokens)})});return e.jsx(Pe,{content:g,side:s,children:e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-xs rounded-lg hover:bg-neutral-100 transition-colors cursor-default select-none",children:[e.jsx(Zt,{size:14,className:f}),e.jsxs("span",{className:`tabular-nums ${f}`,children:[ke(t.totalTokens),l!==null&&e.jsxs("span",{className:"text-neutral-300 ml-0.5",children:["/ ",l,"%"]})]})]})})}const bs={damping:.7,stiffness:.05,mass:1.25},vs=70,ys=1e3/60,Ns=350;let Se=!1;globalThis.document?.addEventListener("mousedown",()=>{Se=!0});globalThis.document?.addEventListener("mouseup",()=>{Se=!1});globalThis.document?.addEventListener("click",()=>{Se=!1});const un=(t={})=>{const[s,r]=a.useState(!1),[o,c]=a.useState(t.initial!==!1),[l,f]=a.useState(!1),g=a.useRef(null);g.current=t;const p=a.useCallback(()=>{if(!Se)return!1;const h=window.getSelection();if(!h||!h.rangeCount)return!1;const v=h.getRangeAt(0);return v.commonAncestorContainer.contains(x.current)||x.current?.contains(v.commonAncestorContainer)},[]),b=a.useCallback(h=>{n.isAtBottom=h,c(h)},[]),N=a.useCallback(h=>{n.escapedFromLock=h,r(h)},[]),n=a.useMemo(()=>{let h;return{escapedFromLock:s,isAtBottom:o,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(v){x.current&&(x.current.scrollTop=v,n.ignoreScrollToTop=x.current.scrollTop)},get targetScrollTop(){return!x.current||!R.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!R.current)return 0;const{targetScrollTop:v}=this;if(!t.targetScrollTop)return v;if(h?.targetScrollTop===v)return h.calculatedScrollTop;const y=Math.max(Math.min(t.targetScrollTop(v,{scrollElement:x.current,contentElement:R.current}),v),0);return h={targetScrollTop:v,calculatedScrollTop:y},requestAnimationFrame(()=>{h=void 0}),y},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=vs}}},[]),j=a.useCallback((h={})=>{typeof h=="string"&&(h={animation:h}),h.preserveScrollPosition||b(!0);const v=Date.now()+(Number(h.wait)||0),y=Oe(g.current,h.animation),{ignoreEscapes:I=!1}=h;let S,z=n.calculatedTargetScrollTop;h.duration instanceof Promise?h.duration.finally(()=>{S=Date.now()}):S=v+(h.duration??0);const T=async()=>{const G=new Promise(requestAnimationFrame).then(()=>{if(!n.isAtBottom)return n.animation=void 0,!1;const{scrollTop:$}=n,B=performance.now(),se=(B-(n.lastTick??B))/ys;if(n.animation||(n.animation={behavior:y,promise:G,ignoreEscapes:I}),n.animation.behavior===y&&(n.lastTick=B),p()||v>Date.now())return T();if($<Math.min(z,n.calculatedTargetScrollTop)){if(n.animation?.behavior===y){if(y==="instant")return n.scrollTop=n.calculatedTargetScrollTop,T();n.velocity=(y.damping*n.velocity+y.stiffness*n.scrollDifference)/y.mass,n.accumulated+=n.velocity*se,n.scrollTop+=n.accumulated,n.scrollTop!==$&&(n.accumulated=0)}return T()}return S>Date.now()?(z=n.calculatedTargetScrollTop,T()):(n.animation=void 0,n.scrollTop<n.calculatedTargetScrollTop?j({animation:Oe(g.current,g.current.resize),ignoreEscapes:I,duration:Math.max(0,S-Date.now())||void 0}):n.isAtBottom)});return G.then($=>(requestAnimationFrame(()=>{n.animation||(n.lastTick=void 0,n.velocity=0)}),$))};return h.wait!==!0&&(n.animation=void 0),n.animation?.behavior===y?n.animation.promise:T()},[b,p,n]),d=a.useCallback(()=>{N(!0),b(!1)},[N,b]),u=a.useCallback(({target:h})=>{if(h!==x.current)return;const{scrollTop:v,ignoreScrollToTop:y}=n;let{lastScrollTop:I=v}=n;n.lastScrollTop=v,n.ignoreScrollToTop=void 0,y&&y>v&&(I=y),f(n.isNearBottom),setTimeout(()=>{if(n.resizeDifference||v===y)return;if(p()){N(!0),b(!1);return}const S=v>I,z=v<I;if(n.animation?.ignoreEscapes){n.scrollTop=I;return}z&&(N(!0),b(!1)),S&&N(!1),!n.escapedFromLock&&n.isNearBottom&&b(!0)},1)},[N,b,p,n]),C=a.useCallback(({target:h,deltaY:v})=>{let y=h;for(;!["scroll","auto"].includes(getComputedStyle(y).overflow);){if(!y.parentElement)return;y=y.parentElement}y===x.current&&v<0&&x.current.scrollHeight>x.current.clientHeight&&!n.animation?.ignoreEscapes&&(N(!0),b(!1))},[N,b,n]),x=nt(h=>{x.current?.removeEventListener("scroll",u),x.current?.removeEventListener("wheel",C),h?.addEventListener("scroll",u,{passive:!0}),h?.addEventListener("wheel",C,{passive:!0})},[]),R=nt(h=>{if(n.resizeObserver?.disconnect(),!h)return;let v;n.resizeObserver=new ResizeObserver(([y])=>{const{height:I}=y.contentRect,S=I-(v??I);if(n.resizeDifference=S,n.scrollTop>n.targetScrollTop&&(n.scrollTop=n.targetScrollTop),f(n.isNearBottom),S>=0){const z=Oe(g.current,v?g.current.resize:g.current.initial);j({animation:z,wait:!0,preserveScrollPosition:!0,duration:z==="instant"?void 0:Ns})}else n.isNearBottom&&(N(!1),b(!0));v=I,requestAnimationFrame(()=>{setTimeout(()=>{n.resizeDifference===S&&(n.resizeDifference=0)},1)})}),n.resizeObserver?.observe(h)},[]);return{contentRef:R,scrollRef:x,scrollToBottom:j,stopScroll:d,isAtBottom:o||l,isNearBottom:l,escapedFromLock:s,state:n}};function nt(t,s){const r=a.useCallback(o=>(r.current=o,t(o)),s);return r}const Le=new Map;function Oe(...t){const s={...bs};let r=!1;for(const c of t){if(c==="instant"){r=!0;continue}typeof c=="object"&&(r=!1,s.damping=c.damping??s.damping,s.stiffness=c.stiffness??s.stiffness,s.mass=c.mass??s.mass)}const o=JSON.stringify(s);return Le.has(o)||Le.set(o,Object.freeze(s)),r?"instant":Le.get(o)}function pn({providers:t,currentProviderId:s,agentType:r,runtimeType:o,onSelect:c}){const{t:l}=pe(),[f,g]=a.useState(!1),p=a.useRef(null),b=o===le.ACP?le.ACP:le.CLI,N=t.filter(u=>String(u.provider.agentType)===r&&(u.provider.runtimeType===le.ACP?le.ACP:le.CLI)===b),n=t.find(u=>u.provider.id===s),j=Dt(t,s),d=j?e.jsx("span",{role:"alert",className:"block break-words text-[11px] leading-snug text-destructive",children:l(j)}):null;return a.useEffect(()=>{function u(C){p.current&&!p.current.contains(C.target)&&g(!1)}if(f)return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[f]),N.length===0||N.length===1&&N[0].provider.id===s?e.jsxs("div",{className:"min-w-[112px] max-w-[min(46vw,240px)] px-2 py-1.5 text-xs text-neutral-400 select-none cursor-default",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(be,{agentType:n?.provider.agentType??r,className:"size-3.5 shrink-0"}),e.jsx("span",{className:"min-w-0 truncate",children:n?.provider.name?Je(n.provider.name,12):r})]}),d]}):e.jsxs("div",{className:"relative min-w-[112px] max-w-[min(46vw,240px)]",ref:p,children:[e.jsxs("button",{type:"button",onClick:()=>g(!f),className:"flex max-w-full items-center gap-1 text-xs px-2 py-1.5 rounded-lg transition-colors cursor-pointer hover:bg-neutral-100 text-neutral-400 hover:text-neutral-600",title:`Provider: ${n?.provider.name??r} (click to change)`,children:[e.jsx(be,{agentType:n?.provider.agentType??r,className:"size-3.5"}),e.jsx("span",{className:"min-w-0 truncate",children:n?.provider.name?Je(n.provider.name,12):r}),e.jsx(me,{size:12,className:`shrink-0 transition-transform ${f?"rotate-180":""}`})]}),d?e.jsx("div",{className:"px-2",children:d}):null,f&&e.jsxs("div",{className:"absolute bottom-full right-0 z-50 mb-1 max-h-[min(60vh,320px)] min-w-[160px] max-w-[min(80vw,320px)] overflow-y-auto rounded-lg border border-neutral-200 bg-white py-1 shadow-lg",children:[e.jsx("div",{className:"px-2 py-1 text-xs text-neutral-400 border-b border-neutral-100",children:l("切换渠道")}),N.map(u=>{const C=zt(u),x=u.provider.executionPermission?l("Required permission: {mode}",{mode:l(De[u.provider.executionPermission])}):void 0;return e.jsx("div",{tabIndex:C?0:void 0,role:C?"group":void 0,"aria-label":C?[u.provider.name,x,l(C)].filter(Boolean).join(": "):void 0,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:e.jsxs("button",{type:"button",disabled:!!C,onClick:()=>{c(u.provider.id),g(!1)},className:`disabled:cursor-not-allowed w-full flex items-center justify-between px-3 py-2 text-sm text-left hover:bg-neutral-50 transition-colors ${u.provider.id===s?"bg-blue-50 text-blue-600":"text-neutral-700"}`,children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(be,{agentType:u.provider.agentType,className:"size-4"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate max-w-[200px]",children:u.provider.name}),u.provider.executionPermission?e.jsx("span",{className:"block text-xs",children:l(De[u.provider.executionPermission])}):null,C?e.jsx("span",{className:"block max-w-[240px] break-words text-xs",children:l(C)}):null]}),u.provider.isDefault&&e.jsx("span",{className:"text-xs text-neutral-400",children:l("(默认)")})]}),u.provider.id===s&&e.jsx(te,{size:14,className:"shrink-0"})]})},u.provider.id)})]})]})}function fn(t,s){return a.useMemo(()=>{for(let r=t.length-1;r>=0;r--){const o=t[r];if(o.tokenUsage&&typeof o.tokenUsage.totalTokens=="number"&&o.tokenUsage.totalTokens>0)return{totalTokens:o.tokenUsage.totalTokens,modelContextWindow:o.tokenUsage.modelContextWindow}}return s??null},[t,s])}const ze=[{value:de.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive",iconName:"chevrons-up"},{value:de.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning",iconName:"signal-high"},{value:de.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:de.LOW,code:"P3",label:"低",className:"bg-info/10 text-info",iconName:"chevrons-down"}];function ct(t){return ze.find(s=>s.value===t)??ze[2]}function rt({iconName:t,className:s}){switch(t){case"chevrons-up":return e.jsx(Yt,{className:s,"aria-hidden":"true"});case"signal-high":return e.jsx(ls,{className:s,"aria-hidden":"true"});case"chevrons-down":return e.jsx(Qt,{className:s,"aria-hidden":"true"});default:return e.jsx(ss,{className:s,"aria-hidden":"true"})}}function xn({priority:t,className:s}){const r=ct(t);return e.jsx("span",{className:w("inline-flex shrink-0 items-center rounded px-1.5 py-0.5 text-[10px] font-semibold leading-none",r.className,s),title:`${r.code} · ${r.label}`,children:r.code})}function ws({value:t,onChange:s,disabled:r=!1,compact:o=!1}){const{t:c}=pe(),[l,f]=a.useState(!1),g=a.useRef(null),p=ct(t);return a.useEffect(()=>{if(!l)return;const b=N=>{g.current&&!g.current.contains(N.target)&&f(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[l]),e.jsxs("div",{className:"relative",ref:g,children:[e.jsxs("button",{type:"button",disabled:r||!s,onClick:()=>f(b=>!b),"aria-haspopup":"listbox","aria-expanded":l,"aria-label":c("Task priority"),className:w("inline-flex items-center gap-1.5 rounded-md text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-50",o?"px-1.5 py-1":"px-2 py-1.5",p.className),children:[e.jsx(rt,{iconName:p.iconName,className:"size-3.5"}),e.jsx("span",{children:c(p.label)}),s?e.jsx(me,{className:w("size-3 transition-transform",l&&"rotate-180"),"aria-hidden":"true"}):null]}),l&&e.jsx("div",{className:"absolute right-0 top-full z-50 mt-1.5 w-36 rounded-lg border border-border bg-popover p-1 shadow-lg",role:"listbox","aria-label":c("Task priority"),children:ze.map(b=>{const N=b.value===p.value;return e.jsxs("button",{type:"button",role:"option","aria-selected":N,onClick:()=>{s?.(b.value),f(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-xs text-foreground/80 transition-colors hover:bg-accent",children:[e.jsx("span",{className:w("inline-flex size-5 items-center justify-center rounded",b.className),children:e.jsx(rt,{iconName:b.iconName,className:"size-3.5"})}),e.jsxs("span",{className:"flex-1",children:[b.code," · ",c(b.label)]}),N?e.jsx(te,{className:"size-3.5 text-foreground","aria-hidden":"true"}):null]},b.value)})})]})}function ot(t,s,r,o){if(r.filter(f=>f===o).length<=1)return t;const l=r.slice(0,s+1).filter(f=>f===o).length;return`${t} #${l}`}function ks(t){return Object.values(t).filter(Boolean).length}function js({mode:t,setMode:s,selectedTemplateId:r,setSelectedTemplateId:o,selectedMemberPresetIds:c,setSelectedMemberPresetIds:l,disabled:f=!1,compact:g=!1}){const{t:p}=pe(),{preserveDesktopSearch:b}=Et(),[N,n]=a.useState(!1),{data:j}=Ft(),{data:d,isError:u,isFetching:C,isLoading:x,refetch:R}=Mt(),{data:h,isError:v,isFetching:y,isLoading:I,refetch:S}=It(),z=a.useMemo(()=>new Map((j??[]).map(({provider:m,availability:k})=>[m.id,m.name+(k.type==="NOT_FOUND"?p(" (不可用)"):"")])),[j,p]),T=a.useMemo(()=>new Map((d??[]).map(m=>[m.id,m])),[d]),G=a.useMemo(()=>new Map((h??[]).map(m=>[m.id,m])),[h]),$=a.useMemo(()=>c.map(m=>T.get(m)).filter(m=>!!m),[T,c]);a.useEffect(()=>{d!==void 0&&l(m=>{const k=m.filter(O=>T.has(O));return k.length===m.length&&k.every((O,W)=>O===m[W])?m:k})},[d,T,l]),a.useEffect(()=>{h!==void 0&&o(m=>!m||G.has(m)?m:null)},[o,G,h]);const B=m=>{f||o(k=>k===m?null:m)},se=m=>{f||l(k=>[...k,m])},V=m=>{f||l(k=>k.filter((O,W)=>W!==m))},ne=e.jsxs("section",{className:"min-w-0",children:[e.jsx("div",{className:"text-[11px] font-medium text-muted-foreground mb-1.5",children:p("团队模板")}),v?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:p("团队模板加载失败")}),e.jsx("button",{type:"button",onClick:()=>{S()},disabled:f||y,className:"ml-2 underline hover:no-underline",children:p("重试")})]}):I?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(ve,{size:12,className:"animate-spin"}),p("加载中...")]}):(h??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[p("当前没有团队模板"),e.jsx(et,{to:b("/settings/team"),className:"ml-1.5 text-info hover:underline",children:p("去创建")})]}):e.jsx("div",{className:w("space-y-1.5",g&&"sm:grid sm:grid-cols-2 sm:gap-1.5 sm:space-y-0"),children:(h??[]).map(m=>{const k=m.id===r,O=m.members?.length??0,W=m.members?.map(X=>X.memberPresetId)??[],Y=m.members?.slice(0,3).map((X,ae)=>ot(X.memberPreset?.name??X.memberPresetId,ae,W,X.memberPresetId)).join(", ");return e.jsx("button",{type:"button",onClick:()=>B(m.id),disabled:f,className:w("w-full rounded-lg px-3 py-2 text-left border transition-all disabled:cursor-not-allowed disabled:opacity-60",k?"bg-background border-foreground/20 shadow-sm":"bg-background border-border/60 hover:border-border hover:bg-accent"),children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:w("text-xs truncate",k?"font-medium text-foreground":"text-foreground"),children:m.name}),e.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[O,p("人")]})]}),Y&&e.jsx("div",{className:"mt-0.5 text-[10px] text-muted-foreground truncate",children:Y})]}),k&&e.jsx(te,{size:13,className:"shrink-0 text-foreground"})]})},m.id)})})]}),K=$.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:$.map((m,k)=>{const O=ot(m.name,k,c,m.id);return e.jsxs("div",{className:"inline-flex items-center gap-1 pl-1 pr-0.5 py-0.5 rounded-md border border-border/60 bg-background text-[10px] text-foreground",children:[e.jsx(st,{name:m.name,avatar:m.avatar,className:"h-3.5 w-3.5 text-[7px]"}),e.jsx("span",{className:"max-w-[80px] truncate",children:O}),e.jsx("button",{type:"button",onClick:()=>V(k),disabled:f,className:"p-0.5 text-muted-foreground hover:text-destructive disabled:opacity-30 rounded transition-colors",children:e.jsx(Rt,{size:9})})]},`${m.id}-${k}`)})}),oe=u?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:p("成员预设加载失败")}),e.jsx("button",{type:"button",onClick:()=>{R()},disabled:f||C,className:"ml-2 underline hover:no-underline",children:p("重试")})]}):x?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(ve,{size:12,className:"animate-spin"}),p("加载中...")]}):(d??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[p("当前没有成员预设"),e.jsx(et,{to:b("/settings/team"),className:"ml-1.5 text-info hover:underline",children:p("去创建")})]}):e.jsx("div",{className:"space-y-1 max-h-[180px] overflow-y-auto pr-1",children:(d??[]).map(m=>{const k=c.filter(Y=>Y===m.id).length,O=z.get(m.providerId)??m.providerId,W=ks(m.capabilities);return e.jsxs("button",{type:"button",onClick:()=>se(m.id),disabled:f,className:w("flex items-center gap-2 w-full px-2 py-1.5 rounded-lg text-left border border-transparent transition-all",f&&"cursor-not-allowed opacity-60","bg-background hover:bg-accent hover:border-border/60"),children:[e.jsx(st,{name:m.name,avatar:m.avatar,className:"h-6 w-6 text-[9px] shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs text-foreground truncate",children:m.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground truncate",children:[O," · ",W,"/10"]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[k>0&&e.jsxs("span",{className:"text-[10px] text-foreground font-semibold",children:["×",k]}),e.jsx(Gt,{size:12,className:"text-muted-foreground"})]})]},m.id)})}),H=$.length>0&&e.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 rounded-full bg-primary text-[10px] font-semibold text-primary-foreground px-1.5",children:$.length}),fe=e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground shrink-0",children:p("执行模式")}),e.jsxs("div",{className:"inline-flex items-center h-7 rounded-md border border-border/70 bg-background p-0.5",children:[e.jsxs("button",{type:"button",onClick:()=>!f&&s("AUTO"),disabled:f,className:w("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="AUTO"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(us,{size:11}),p("自动模式")]}),e.jsxs("button",{type:"button",onClick:()=>!f&&s("CONFIRM"),disabled:f,className:w("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="CONFIRM"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(is,{size:11}),p("确认模式")]})]})]});return g?e.jsxs("div",{className:"space-y-3",children:[fe,ne,e.jsxs("div",{className:"border-t border-border/50 pt-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>!f&&n(m=>!m),disabled:f,"aria-expanded":N,className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(me,{size:12,className:w("transition-transform",N?"":"-rotate-90")}),p("追加独立成员"),H]}),N&&e.jsxs("div",{className:"mt-2",children:[K,oe]})]})]}):e.jsxs("div",{className:"space-y-3.5",children:[fe,e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[ne,e.jsxs("section",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:p("追加成员")}),H]}),K,oe]})]})]})}function Cs({commands:t,selectedIndex:s,query:r,hasCatalog:o,title:c="Slash Commands",queryPrefix:l="/",emptyCatalogMessage:f="No slash commands catalog for this agent yet.",emptyQueryMessage:g,insertionHint:p="Enter / Tab to insert",compact:b=!1,onSelect:N}){const n=b?"px-1.5 pb-1.5":"px-2 pb-2",j=b?"px-2 py-1.5":"px-2.5 py-2",d=b?"max-h-36":"max-h-48";return e.jsxs("div",{className:b?"pt-1.5":"pt-2",children:[e.jsxs("div",{className:`mb-1 flex items-center justify-between ${b?"px-2 pt-0.5":"px-3 pt-1"}`,children:[e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-[0.14em] text-neutral-400",children:c}),e.jsx("span",{className:"text-[10px] text-neutral-400",children:p})]}),t.length===0?e.jsx("div",{className:`${b?"px-2 pb-2 pt-1.5 text-[11px]":"px-3 pb-3 pt-2 text-xs"} text-neutral-400`,children:o?g??`No matches for ${l}${r}`:f}):e.jsx("div",{className:`${n} ${d} overflow-y-auto`,children:t.map((u,C)=>e.jsxs("button",{type:"button",onMouseDown:x=>x.preventDefault(),onClick:()=>N(u),className:`w-full rounded-lg border text-left transition-colors ${C===s?"border-neutral-300 bg-neutral-50":"border-transparent hover:border-neutral-200 hover:bg-neutral-50/80"} ${j}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"font-mono text-[13px] text-neutral-900",children:u.command}),u.kind&&u.kind!=="builtin"?e.jsx("span",{className:"rounded-full border border-neutral-200 px-1.5 py-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-500",children:u.scope?`${u.scope} ${u.kind}`:u.kind}):null]}),e.jsx("div",{className:`${b?"mt-0.5 text-[11px]":"mt-1 text-xs"} text-neutral-500`,children:u.description})]},u.command))})]})}const ee=12,je=8;function Ss({open:t,anchorRef:s,commands:r,selectedIndex:o,query:c,hasCatalog:l,title:f,queryPrefix:g,emptyCatalogMessage:p,emptyQueryMessage:b,insertionHint:N,compact:n=!1,onSelect:j}){const d=a.useRef(null),[u,C]=a.useState(null);return a.useLayoutEffect(()=>{if(!t){C(null);return}const x=s.current;if(!x)return;let R=0;const h=()=>{const I=s.current;if(!I)return;const S=I.getBoundingClientRect(),z=window.innerWidth,T=window.innerHeight,G=n?260:320,$=n?z-ee*2:560,B=Math.min(Math.max(S.width,G),Math.max(G,$)),se=Math.min(Math.max(ee,S.left),Math.max(ee,z-ee-B)),V=T-S.bottom-je-ee,ne=S.top-je-ee,K=d.current?.offsetHeight??(n?220:280),oe=n?240:320,H=V<180&&ne>V,m=Math.max(120,Math.min(oe,H?ne:V)),k=H?Math.max(ee,S.top-je-Math.min(K,m)):Math.min(T-ee-Math.min(K,m),S.bottom+je);C({top:k,left:se,width:B,maxHeight:m})},v=()=>{cancelAnimationFrame(R),R=requestAnimationFrame(h)};v();const y=new ResizeObserver(v);return y.observe(x),d.current&&y.observe(d.current),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),window.visualViewport?.addEventListener("resize",v),window.visualViewport?.addEventListener("scroll",v),()=>{cancelAnimationFrame(R),y.disconnect(),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),window.visualViewport?.removeEventListener("resize",v),window.visualViewport?.removeEventListener("scroll",v)}},[s,r.length,n,t,c,o]),!t||!u||typeof document>"u"?null:At.createPortal(e.jsx("div",{className:"pointer-events-none fixed inset-0 z-[120]",children:e.jsx("div",{ref:d,className:"pointer-events-auto fixed overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg shadow-neutral-200/70",style:{top:u.top,left:u.left,width:u.width,maxHeight:u.maxHeight},children:e.jsx(Cs,{commands:r,selectedIndex:o,query:c,hasCatalog:l,title:f,queryPrefix:g,emptyCatalogMessage:p,emptyQueryMessage:b,insertionHint:N,compact:n,onSelect:j})})}),document.body)}function Ts({agentType:t,workingDir:s}){return at({queryKey:D.system.slashCommandCatalog(t,s),queryFn:async()=>(await ue.get("/system/slash-command-catalog",{params:{agentType:String(t),...s?{workingDir:s}:{}}})).commands,enabled:!!t,staleTime:3e4})}function Es(t,s){const r=new Set,o=[];for(const c of[...t,...s]){const l=c.command.trim().toLowerCase();!l||r.has(l)||(r.add(l),o.push(c.kind?c:{...c,kind:"builtin"}))}return o}function Te(t){return t.trim().toLowerCase().replace(/^[/$]/,"")}function Ms(t){return Te(t.command)}function Is(t,s){if(!s)return 1e3;const r=Ms(t),o=t.aliases?.map(Te)??[],c=[r,...o];let l=0;for(const g of c)g===s?l=Math.max(l,500):g.startsWith(s)?l=Math.max(l,400-(g.length-s.length)):g.includes(s)&&(l=Math.max(l,250-g.indexOf(s)));return l>0?l:`${r} ${o.join(" ")} ${t.description}`.toLowerCase().includes(s)?100:0}function hn(t){const s=/(^|[\s])\$([^\s]*)$/.exec(t);if(!s||s.index===void 0)return null;const r=s.index+s[1].length;return{query:Te(s[2]),replaceStart:r}}function Rs(t,s){const r=Te(s);return r?t.map((o,c)=>({command:o,index:c,score:Is(o,r)})).filter(o=>o.score>0).sort((o,c)=>c.score-o.score||o.index-c.index||o.command.command.localeCompare(c.command.command)).map(o=>o.command):t.slice()}const As=[{command:"/permissions",description:"Manage what Codex can do without approval"},{command:"/sandbox-add-read-dir",description:"Grant read access to another directory"},{command:"/agent",description:"Switch between built-in agent personas"},{command:"/apps",description:"Manage connected apps"},{command:"/clear",description:"Start a fresh conversation"},{command:"/compact",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last assistant message to your clipboard"},{command:"/diff",description:"Show the current git diff"},{command:"/experimental",description:"Toggle experimental features"},{command:"/feedback",description:"Share feedback on Codex CLI"},{command:"/init",description:"Create or update AGENTS.md for the repo"},{command:"/logout",description:"Sign out of Codex"},{command:"/mcp",description:"Manage MCP servers"},{command:"/mention",description:"Add files or directories to the conversation context"},{command:"/model",description:"Change the active model"},{command:"/fast",description:"Toggle low reasoning mode"},{command:"/plan",description:"Toggle plan mode for code changes"},{command:"/personality",description:"Select how Codex communicates"},{command:"/ps",description:"List running background tasks"},{command:"/fork",description:"Fork the current conversation state"},{command:"/resume",description:"Resume a previous conversation"},{command:"/new",description:"Open a conversation picker to start or resume"},{command:"/quit",description:"Exit Codex CLI",aliases:["exit"]},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show session and configuration status"},{command:"/debug-config",description:"Inspect the effective configuration"},{command:"/statusline",description:"Configure the custom status line"},{command:"/skills",description:"Browse available skills and insert a $skill mention"}],_s=[{command:"/clear",description:"Clear the conversation history"},{command:"/compact",description:"Compact the conversation context",aliases:["compact focus"]},{command:"/config",description:"Open the configuration panel"},{command:"/cost",description:"Show token usage and cost"},{command:"/doctor",description:"Check Claude Code installation health"},{command:"/help",description:"Show help and available commands"},{command:"/init",description:"Initialize project instructions"},{command:"/login",description:"Sign in to Claude Code"},{command:"/logout",description:"Sign out of Claude Code"},{command:"/mcp",description:"Manage MCP servers"},{command:"/memory",description:"Edit project memory files"},{command:"/model",description:"Change the active model"},{command:"/permissions",description:"Review or update tool permissions"},{command:"/pr_comments",description:"Read pull request review comments"},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show account and system status"},{command:"/terminal-setup",description:"Configure terminal newline shortcuts"},{command:"/vim",description:"Toggle vim mode"}],Ls=[{command:"/bug",description:"File an issue about Gemini CLI"},{command:"/chat",description:"Manage chat checkpoints and exports"},{command:"/clear",description:"Clear the terminal display"},{command:"/compress",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last Gemini CLI output"},{command:"/directory",description:"Manage additional workspace directories",aliases:["dir"]},{command:"/editor",description:"Choose the preferred editor"},{command:"/extensions",description:"List active Gemini CLI extensions"},{command:"/help",description:"Show help and command usage",aliases:["?"]},{command:"/mcp",description:"Show MCP servers and tools"},{command:"/memory",description:"Manage loaded GEMINI.md memory"},{command:"/restore",description:"Restore files from a tool checkpoint"},{command:"/settings",description:"Open the Gemini CLI settings editor"},{command:"/stats",description:"Show session statistics and token usage"},{command:"/theme",description:"Change the Gemini CLI theme"},{command:"/auth",description:"Change the authentication method"},{command:"/about",description:"Show version information"},{command:"/tools",description:"List currently available tools"},{command:"/privacy",description:"Review privacy and data collection settings"},{command:"/quit",description:"Exit Gemini CLI",aliases:["exit"]},{command:"/vim",description:"Toggle vim mode"},{command:"/init",description:"Generate a tailored GEMINI.md file"}],Os=[{command:"/model",description:"Change the active model"},{command:"/plan",description:"Create or reopen a plan"},{command:"/ask",description:"Toggle ask mode (read-only Q&A)"},{command:"/debug",description:"Toggle debug mode"},{command:"/clear",description:"Start a new chat session",aliases:["new","new-chat","newchat"]},{command:"/compress",description:"Summarize the conversation to reduce context"},{command:"/vim",description:"Toggle vim mode"},{command:"/shell",description:"Enter shell mode"},{command:"/about",description:"Show CLI, system, and account information"},{command:"/setup-terminal",description:"Configure terminal newline shortcuts"},{command:"/feedback",description:"Share feedback with the Cursor team"},{command:"/open",description:"Open the repository git root in Cursor"},{command:"/cursor",description:"Alias for /open",aliases:["open"]},{command:"/resume-chat",description:"Resume a previous chat by folder name",aliases:["resume"]},{command:"/copy-request-id",description:"Copy the last request ID"},{command:"/copy-conversation-id",description:"Copy the current conversation ID"},{command:"/logout",description:"Sign out from Cursor"},{command:"/quit",description:"Exit Cursor Agent",aliases:["exit"]},{command:"/mcp",description:"Manage MCP servers"}],Ps={[we.CODEX]:As,[we.CLAUDE_CODE]:_s,[we.GEMINI_CLI]:Ls,[we.CURSOR_AGENT]:Os};function lt(t){return t.trim().toLowerCase().replace(/^\//,"")}function Ds(t){return t?(Ps[t]??[]).map(s=>({...s,kind:s.kind??"builtin"})):[]}function zs(t){const s=t.match(/^\s*\/([^\s]*)$/);return s?lt(s[1]):null}function $s(t,s){return Rs(t,lt(s))}function qs(t){const s=t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229,r=t.key==="Tab"&&!t.shiftKey;return s||r}function Fs({agentType:t,workingDir:s,input:r,setInput:o,textareaRef:c,minHeight:l,maxHeight:f}){const[g,p]=a.useState(0),{data:b=[]}=Ts({agentType:t,workingDir:s}),N=a.useMemo(()=>Es(Ds(t),b),[t,b]),n=a.useMemo(()=>zs(r),[r]),j=a.useMemo(()=>n===null?[]:$s(N,n),[N,n]),d=a.useCallback(()=>{const x=c.current;x&&(x.style.height="auto",x.style.height=`${Math.max(l,Math.min(x.scrollHeight,f))}px`)},[f,l,c]);a.useEffect(()=>{p(0)},[t,n]),a.useEffect(()=>{g<j.length||p(0)},[j.length,g]);const u=a.useCallback(x=>{const h=`${r.match(/^(\s*)\/[^\s]*$/)?.[1]??""}${x.command} `;o(h),requestAnimationFrame(()=>{const v=c.current;v&&(d(),v.focus(),v.setSelectionRange(h.length,h.length))})},[r,d,o,c]),C=a.useCallback(x=>n===null||j.length===0?!1:x.key==="ArrowDown"?(x.preventDefault(),p(R=>(R+1)%j.length),!0):x.key==="ArrowUp"?(x.preventDefault(),p(R=>(R-1+j.length)%j.length),!0):qs(x)?(x.preventDefault(),u(j[g]??j[0]),!0):!1,[u,j,n,g]);return{allCommands:N,query:n,filteredCommands:j,selectedIndex:g,setSelectedIndex:p,applyCommand:u,handleKeyDown:C}}const Gs="/assets/agent-tower-lockup-DPAcheCt.png";function gn({className:t="h-6 w-auto max-[359px]:h-[22px]"}){return e.jsx("img",{src:Gs,alt:"Agent Tower",className:`block shrink-0 select-none object-contain ${t}`})}const Us={idle:"","creating-task":"Creating Task...","creating-teamrun":"Creating TeamRun...","creating-workspace":"Creating Workspace...","creating-session":"Creating Session...","starting-session":"Starting Agent..."};function bn({variant:t="task",projects:s,providers:r,isProvidersLoading:o,onSubmit:c,defaultProjectId:l="",defaultProviderId:f="",onProjectChange:g,createStep:p,placeholder:b,submitLabel:N,pendingLabel:n,submitTitle:j}){const{t:d}=pe(),[u,C]=a.useState(""),[x,R]=a.useState(l),[h,v]=a.useState(f),y=h||f,[I,S]=a.useState("SOLO"),[z,T]=a.useState(L.WORKTREE),[G,$]=a.useState(de.NORMAL),[B,se]=a.useState({}),[V,ne]=a.useState("AUTO"),[K,oe]=a.useState(null),[H,fe]=a.useState([]),[m,k]=a.useState(!1),[O,W]=a.useState(!1),[Y,X]=a.useState(!1),[ae,re]=a.useState(!1),Ee=a.useRef(null),Me=a.useRef(null),Ie=a.useRef(null),$e=a.useRef(null),qe=a.useRef(null),Fe=a.useRef(null),{files:Ge,addFiles:ie,removeFile:dt,clear:Ue,buildMarkdownLinks:We,getDoneAttachments:Be,isUploading:Ne}=Ot(),xe=$t(),E=t==="conversation",M=t==="task"||t==="conversation",mt=N??d(E?"开始":"创建");a.useEffect(()=>{R(l),g?.(l)},[l,g]),a.useEffect(()=>{if(!O)return;const i=A=>{Ee.current&&!Ee.current.contains(A.target)&&W(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[O]),a.useEffect(()=>{if(!Y)return;const i=A=>{Me.current&&!Me.current.contains(A.target)&&X(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[Y]),a.useEffect(()=>{if(!ae)return;const i=A=>{Ie.current&&!Ie.current.contains(A.target)&&re(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[ae]);const U=a.useMemo(()=>s.find(i=>i.id===x),[s,x]),Q=a.useMemo(()=>r.find(i=>i.id===y),[r,y]),Re=x?B[x]:void 0,ut=(Re?.isGitRepo??U?.isGitRepo)!==!1,pt=(Re?.worktreeReady??U?.worktreeReady)!==!1,q=!E&&!(ut&&pt),P=q?"SOLO":I,Z=q?L.MAIN_DIRECTORY:z,ft=Z===L.MAIN_DIRECTORY?d("本地模式"):d("工作树模式"),Ke=d("工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。"),xt=d("本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。"),ht=Re?.reason??U?.reason,He=d(ht==="NO_HEAD"?"已检测到 Git,但需要先提交一次才能使用工作树模式。":"初始化 Git 后可使用工作树模式。"),Qe=E||P==="SOLO"?Q?.agentType:null,J=Fs({agentType:Qe,workingDir:E?void 0:U?.repoPath,input:u,setInput:C,textareaRef:qe,minHeight:76,maxHeight:220}),_=p!=="idle",Ve=!!K||H.length>0,he=!_&&!Ne&&u.trim().length>0&&(E?Q?.available===!0:!!x&&(P==="SOLO"?Q?.available===!0:Ve));a.useEffect(()=>{q&&(S("SOLO"),T(L.MAIN_DIRECTORY),k(!1),re(!1))},[q]),a.useEffect(()=>{q||E||T(L.WORKTREE)},[E,q,U?.id]);const gt=a.useCallback(async()=>{if(!U||xe.isPending)return;const i=await xe.mutateAsync({id:U.id});se(A=>({...A,[U.id]:i})),i.worktreeReady&&(S("SOLO"),T(L.WORKTREE),re(!1))},[xe,U]),Ae=a.useCallback(async()=>{if(!he)return;const i=M?We():"",A=M?Be().map(ge=>ge.id):[];try{await c({title:u.trim(),description:"",projectId:E?"":x,providerId:y,mode:E?"SOLO":P,workspaceMode:!E&&P==="SOLO"?Z:L.WORKTREE,teamRunMode:E?"AUTO":V,teamTemplateId:E||q?null:K,memberPresetIds:E||q?[]:H,attachmentLinks:i,attachmentIds:A,priority:G}),C(""),$(de.NORMAL),M&&Ue()}catch{}},[he,M,We,Be,c,u,E,x,y,P,Z,V,q,K,H,Ue,G]),bt=a.useCallback(i=>{J.handleKeyDown(i)||i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&i.nativeEvent.keyCode!==229&&(i.preventDefault(),Ae())},[Ae,J]),vt=a.useCallback(i=>{const A=i.target.files;A&&A.length>0&&ie(Array.from(A)),i.target.value=""},[ie]),yt=a.useCallback(i=>{R(i),g?.(i),W(!1)},[g]),Nt=a.useCallback(i=>{if(!M)return;const A=i.clipboardData.items,ge=[];for(const Xe of A)if(Xe.kind==="file"){const Ze=Xe.getAsFile();Ze&&ge.push(Ze)}ge.length>0&&(i.preventDefault(),ie(ge))},[ie,M]),[Ye,_e]=a.useState(!1),wt=a.useCallback(i=>{M&&(i.preventDefault(),_e(!0))},[M]),kt=a.useCallback(i=>{M&&(i.preventDefault(),_e(!1))},[M]),jt=a.useCallback(i=>{if(!M)return;i.preventDefault(),_e(!1);const A=i.dataTransfer.files;A.length>0&&ie(Array.from(A))},[ie,M]);return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{ref:$e,className:w("relative bg-background rounded-xl border transition-colors duration-200","shadow-[0_1px_2px_rgba(0,0,0,0.05)]","hover:border-ring/40 focus-within:border-ring/60",Ye?"border-info bg-info/5":"border-border",_&&"opacity-80"),onDragOver:M?wt:void 0,onDragLeave:M?kt:void 0,onDrop:M?jt:void 0,children:[M&&Ge.length>0&&e.jsx("div",{className:"px-4 pt-3",children:e.jsx(Pt,{files:Ge,onRemove:dt})}),e.jsx("textarea",{ref:qe,value:u,onChange:i=>C(i.target.value),onKeyDown:bt,onPaste:M?Nt:void 0,placeholder:d(b||"Describe your task..."),disabled:_,autoFocus:!0,rows:1,className:"w-full px-4 pt-4 pb-2 bg-transparent border-none focus:outline-none resize-none text-[15px] text-foreground placeholder:text-muted-foreground/80 leading-relaxed",style:{minHeight:"76px",maxHeight:"220px",fieldSizing:"content"}}),M&&Ye&&e.jsx("div",{className:"px-4 pb-2",children:e.jsx("div",{className:"flex items-center justify-center py-3 border border-dashed border-info/40 rounded-lg text-xs font-medium text-info",children:d("Drop files here")})}),e.jsxs("div",{className:"flex items-center justify-between px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex items-center gap-1",children:M?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>Fe.current?.click(),disabled:_||Ne,className:"p-2 text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:d("Attach files"),children:e.jsx(Ut,{size:18})}),e.jsx("input",{ref:Fe,type:"file",multiple:!0,onChange:vt,className:"hidden"})]}):null}),e.jsxs("div",{className:"flex items-center gap-2",children:[M&&Ne&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(ve,{size:14,className:"animate-spin"}),d("Uploading...")]}),_&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(ve,{size:14,className:"animate-spin"}),d(n??Us[p])]}),!E&&!_&&!Ne&&P==="TEAM"&&!Ve&&u.trim().length>0&&e.jsx("span",{className:"text-[11px] text-warning",children:d("请选择团队模板或追加成员")}),he&&e.jsxs("span",{className:"hidden sm:inline-flex items-center gap-1 text-[11px] text-muted-foreground/80 select-none",children:[e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded border border-border bg-muted/60 text-[10px] font-medium text-muted-foreground leading-none",children:"⏎"}),mt]}),e.jsx("button",{type:"button",onClick:Ae,disabled:!he,className:w("flex items-center justify-center size-8 rounded-lg transition-all duration-200",he?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm":"bg-muted text-muted-foreground/40 cursor-not-allowed"),title:d(j||"Create & Start"),children:e.jsx(Kt,{size:16,strokeWidth:2.5})})]})]})]}),e.jsx(Ss,{open:!!Qe&&J.query!==null,anchorRef:$e,commands:J.filteredCommands,selectedIndex:J.selectedIndex,query:J.query??"",hasCatalog:J.allCommands.length>0,compact:!0,onSelect:J.applyCommand}),e.jsxs("div",{className:"flex items-center flex-wrap gap-1.5 mt-2.5 px-0.5",children:[!E&&e.jsxs("div",{className:"relative",ref:Ee,children:[e.jsxs("button",{type:"button",onClick:()=>{_||W(i=>!i)},disabled:_,className:w("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",U?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(qt,{size:14,className:"shrink-0",style:{color:U?.color??"var(--muted-foreground)"}}),e.jsx("span",{className:"max-w-[120px] truncate",children:U?.name??d("Project")}),e.jsx(me,{size:12,className:w("text-muted-foreground transition-transform",O&&"rotate-180")})]}),O&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 max-h-[240px] overflow-y-auto z-50",children:s.map(i=>e.jsxs("button",{type:"button",onClick:()=>yt(i.id),className:"flex items-center w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx("span",{className:"size-2 rounded-full shrink-0 mr-2",style:{backgroundColor:i.color??"var(--muted-foreground)"}}),e.jsx("span",{className:w("truncate flex-1",i.id===x?"text-foreground font-medium":"text-muted-foreground"),children:i.name}),e.jsx(te,{size:14,className:w("ml-2 shrink-0 text-foreground",i.id===x?"opacity-100":"opacity-0")})]},i.id))})]}),(E||P==="SOLO")&&e.jsxs("div",{className:"relative",ref:Me,children:[e.jsxs("button",{type:"button",onClick:()=>{_||X(i=>!i)},disabled:_,className:w("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",Q?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(be,{agentType:Q?.agentType,className:"size-3.5"}),e.jsx("span",{className:"max-w-[120px] truncate",children:Q?.name??d(o?"Loading...":"Agent")}),e.jsx(me,{size:12,className:w("text-muted-foreground transition-transform",Y&&"rotate-180")})]}),Y&&e.jsx("div",{className:"absolute top-full left-0 z-50 mt-1.5 max-h-[min(60vh,320px)] w-72 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-lg border border-border bg-popover py-1 shadow-[0_4px_12px_rgba(0,0,0,0.06)] sm:w-80",children:r.map(i=>e.jsx("div",{tabIndex:i.available?void 0:0,role:i.available?void 0:"group","aria-label":i.available?void 0:`${i.name}: ${d(i.reason||"Agent executable is unavailable.")}`,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:e.jsxs("button",{type:"button",disabled:!i.available,onClick:()=>{v(i.id),X(!1)},className:w("flex w-full items-start px-3 py-2 text-left text-xs transition-colors hover:bg-accent",!i.available&&"cursor-not-allowed"),children:[e.jsx(te,{size:14,className:w("mr-2 mt-0.5 shrink-0 text-foreground",i.id===y?"opacity-100":"opacity-0")}),e.jsx(be,{agentType:i.agentType,className:"mr-2 mt-0.5 size-3.5 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:w("block break-words",i.id===y?"font-medium text-foreground":"text-muted-foreground"),children:[i.name,i.available?"":d(" (unavailable)")]}),i.permissionMode?e.jsx("span",{className:"mt-0.5 block text-[11px] text-muted-foreground",children:d("Required permission: {mode}",{mode:d(De[i.permissionMode])})}):null,i.reason?e.jsx("span",{className:"mt-0.5 block break-words text-[11px] leading-snug text-destructive",children:d(i.reason)}):null]})]})},i.id))})]}),!E&&P==="SOLO"&&e.jsxs("div",{className:"relative",ref:Ie,children:[e.jsxs("button",{type:"button",onClick:()=>{_||re(i=>!i)},disabled:_,className:w("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed text-foreground/80"),children:[e.jsx(es,{size:14,className:"text-muted-foreground"}),e.jsx("span",{className:"max-w-[96px] truncate",children:ft}),e.jsx(me,{size:12,className:w("text-muted-foreground transition-transform",ae&&"rotate-180")})]}),ae&&e.jsxs("div",{className:"absolute top-full left-0 mt-1.5 w-72 max-w-[calc(100vw-2rem)] bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 z-50",children:[q?e.jsx(Pe,{side:"bottom",className:"block w-full",content:He,children:e.jsxs("div",{tabIndex:0,"aria-label":He,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[e.jsxs("button",{type:"button",disabled:!0,className:"flex w-full cursor-not-allowed items-center px-3 py-2 text-left text-xs opacity-40 transition-colors",children:[e.jsx(te,{size:14,className:"mr-2 mt-0.5 shrink-0 text-foreground opacity-0"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate text-muted-foreground",children:d("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Ke})]})]}),e.jsx("button",{type:"button",onClick:gt,disabled:xe.isPending,className:"flex w-full items-center px-3 py-2 text-left text-xs text-muted-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",children:xe.isPending?d("检测中..."):d("重新检测 Git 状态")})]})}):e.jsxs("button",{type:"button",onClick:()=>{T(L.WORKTREE),re(!1)},className:"flex w-full items-center px-3 py-2 text-left text-xs transition-colors hover:bg-accent",children:[e.jsx(te,{size:14,className:w("mr-2 mt-0.5 shrink-0 text-foreground",Z===L.WORKTREE?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:w("block truncate",Z===L.WORKTREE?"text-foreground font-medium":"text-muted-foreground"),children:d("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Ke})]})]}),e.jsxs("button",{type:"button",onClick:()=>{T(L.MAIN_DIRECTORY),re(!1)},className:"flex items-start w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx(te,{size:14,className:w("mr-2 mt-0.5 shrink-0 text-foreground",Z===L.MAIN_DIRECTORY?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:w("block truncate",Z===L.MAIN_DIRECTORY?"text-foreground font-medium":"text-muted-foreground"),children:d("本地模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:xt})]})]})]})]}),!E&&e.jsx(ws,{value:G,compact:!0,disabled:_,onChange:$}),!E&&e.jsx(Pe,{side:"bottom",className:"ml-auto",content:q?d("Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun."):Z===L.MAIN_DIRECTORY?d("TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。"):d("启用 TeamRun 后可选择团队模板或成员。"),children:e.jsxs("button",{type:"button",role:"switch","aria-checked":P==="TEAM",onClick:()=>{_||q||(I==="TEAM"?(S("SOLO"),k(!1)):(S("TEAM"),re(!1),T(L.WORKTREE),k(!0)))},disabled:_||q,className:w("flex items-center gap-2 h-7 pl-2 pr-2 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",P==="TEAM"?"text-foreground/80":"text-muted-foreground"),"aria-label":d("启用团队模式"),children:[e.jsx(_t,{size:14,className:P==="TEAM"?"text-foreground/80":"text-muted-foreground"}),e.jsx("span",{children:d("团队模式")}),(q||Z===L.MAIN_DIRECTORY)&&P!=="TEAM"?e.jsx(Lt,{size:12,className:"text-muted-foreground/70","aria-hidden":"true"}):null,e.jsx("span",{className:w("relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors",P==="TEAM"?"bg-primary":"bg-border"),children:e.jsx("span",{className:w("inline-block size-3 rounded-full bg-background shadow-sm transition-transform",P==="TEAM"?"translate-x-3.5":"translate-x-0.5")})})]})})]}),Q&&!Q.available?e.jsx("p",{role:"alert",className:"mt-2 break-words px-2 text-xs leading-snug text-destructive",children:Q.reason?d(Q.reason):d("Agent executable is unavailable.")}):null,!E&&P==="TEAM"&&m&&e.jsx("div",{className:"mt-2.5 rounded-xl border border-border/60 bg-muted/40 p-3 animate-[fadeInUp_0.25s_cubic-bezier(0.16,1,0.3,1)]",children:e.jsx(js,{mode:V,setMode:ne,selectedTemplateId:K,setSelectedTemplateId:oe,selectedMemberPresetIds:H,setSelectedMemberPresetIds:fe,disabled:_,compact:!0})})]})}export{sn as A,gn as B,bn as C,es as G,pn as P,dn as R,rn as S,mn as T,us as Z,fn as a,on as b,Kt as c,nn as d,xn as e,ze as f,an as g,js as h,ln as i,hn as j,Rs as k,Fs as l,cn as m,ws as n,Ss as o,is as p,un as u};