@truefoundry/trueforge 0.183.1 → 0.184.0-rc.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 (240) hide show
  1. package/dist/_frontend/assets/{AgentCodeSnippets-36MVPNIZ-DO0Y_xWq.js → AgentCodeSnippets-KAYJRSGM-But9AsMO.js} +1 -1
  2. package/dist/_frontend/assets/AgentCodeSnippets-KAYJRSGM-But9AsMO.js.br +0 -0
  3. package/dist/_frontend/assets/AgentCodeSnippets-KAYJRSGM-But9AsMO.js.gz +0 -0
  4. package/dist/_frontend/assets/{AgentMetricChart-2R23OEEA-D7SBsc7p.js → AgentMetricChart-QKWQDPNE-D0hYTBFa.js} +1 -1
  5. package/dist/_frontend/assets/AgentMetricChart-QKWQDPNE-D0hYTBFa.js.br +0 -0
  6. package/dist/_frontend/assets/AgentMetricChart-QKWQDPNE-D0hYTBFa.js.gz +0 -0
  7. package/dist/_frontend/assets/{AgentOverview-YSUEPAVB-CSMGELBr.js → AgentOverview-QML2L4VB-DpQkpVIW.js} +1 -1
  8. package/dist/_frontend/assets/AgentOverview-QML2L4VB-DpQkpVIW.js.br +0 -0
  9. package/dist/_frontend/assets/AgentOverview-QML2L4VB-DpQkpVIW.js.gz +0 -0
  10. package/dist/_frontend/assets/{AgentSessionEventTimeline-H7JP34RB-TYYeaElm.js → AgentSessionEventTimeline-LXZ4FOEP-2P_GB5VT.js} +1 -1
  11. package/dist/_frontend/assets/AgentSessionEventTimeline-LXZ4FOEP-2P_GB5VT.js.br +0 -0
  12. package/dist/_frontend/assets/AgentSessionEventTimeline-LXZ4FOEP-2P_GB5VT.js.gz +0 -0
  13. package/dist/_frontend/assets/{AgentSessionEventTimelineChart-2O3LQZ6M-CPZPCe24.js → AgentSessionEventTimelineChart-UGDY3DXV-8IplxKw_.js} +1 -1
  14. package/dist/_frontend/assets/AgentSessionEventTimelineChart-UGDY3DXV-8IplxKw_.js.br +0 -0
  15. package/dist/_frontend/assets/AgentSessionEventTimelineChart-UGDY3DXV-8IplxKw_.js.gz +0 -0
  16. package/dist/_frontend/assets/{AgentSessions-4LXWAOQM-D5zQOhcY.js → AgentSessions-RNQJNNUN-GniVjPuh.js} +1 -1
  17. package/dist/_frontend/assets/AgentSessions-RNQJNNUN-GniVjPuh.js.br +0 -0
  18. package/dist/_frontend/assets/AgentSessions-RNQJNNUN-GniVjPuh.js.gz +0 -0
  19. package/dist/_frontend/assets/{ConnectorSettings-PYELU62E-DMbJA7AI.js → ConnectorSettings-FZ6PADBD-BINfbElb.js} +1 -1
  20. package/dist/_frontend/assets/ConnectorSettings-FZ6PADBD-BINfbElb.js.br +0 -0
  21. package/dist/_frontend/assets/ConnectorSettings-FZ6PADBD-BINfbElb.js.gz +0 -0
  22. package/dist/_frontend/assets/{DockLayout-BLRDAQKF-Bd8XL5hR.js → DockLayout-ZR7QXDF5-bLser575.js} +1 -1
  23. package/dist/_frontend/assets/{DrawerLayout-K2ZKOBJB-CVsZvHIE.js → DrawerLayout-G6IFSHR2-D9lDyZGO.js} +2 -2
  24. package/dist/_frontend/assets/DrawerLayout-G6IFSHR2-D9lDyZGO.js.br +0 -0
  25. package/dist/_frontend/assets/DrawerLayout-G6IFSHR2-D9lDyZGO.js.gz +0 -0
  26. package/dist/_frontend/assets/EnvironmentsPage-YG7ABMNR-M8zUxZyU.js +3 -0
  27. package/dist/_frontend/assets/EnvironmentsPage-YG7ABMNR-M8zUxZyU.js.br +0 -0
  28. package/dist/_frontend/assets/EnvironmentsPage-YG7ABMNR-M8zUxZyU.js.gz +0 -0
  29. package/dist/_frontend/assets/{ModelSettings-JQ57P7UZ--AqoNP6X.js → ModelSettings-VVLPTON7-92yuvlC0.js} +1 -1
  30. package/dist/_frontend/assets/ModelSettings-VVLPTON7-92yuvlC0.js.br +0 -0
  31. package/dist/_frontend/assets/ModelSettings-VVLPTON7-92yuvlC0.js.gz +0 -0
  32. package/dist/_frontend/assets/{SandboxSettings-6DIQUD2C-Dq81qn8k.js → SandboxSettings-FR5GBIEJ-CEwXWjlm.js} +1 -1
  33. package/dist/_frontend/assets/SandboxSettings-FR5GBIEJ-CEwXWjlm.js.br +0 -0
  34. package/dist/_frontend/assets/SandboxSettings-FR5GBIEJ-CEwXWjlm.js.gz +0 -0
  35. package/dist/_frontend/assets/{SchedulesPage-25JKAP5G-DRHxlR8X.js → SchedulesPage-VJNU6YI5-OWT2uCNM.js} +1 -1
  36. package/dist/_frontend/assets/SchedulesPage-VJNU6YI5-OWT2uCNM.js.br +0 -0
  37. package/dist/_frontend/assets/SchedulesPage-VJNU6YI5-OWT2uCNM.js.gz +0 -0
  38. package/dist/_frontend/assets/{SettingsBuilder-QM224JED-Bp00qPG0.js → SettingsBuilder-OZXAOONL-CyzTTdG8.js} +2 -2
  39. package/dist/_frontend/assets/SettingsBuilder-OZXAOONL-CyzTTdG8.js.br +0 -0
  40. package/dist/_frontend/assets/SettingsBuilder-OZXAOONL-CyzTTdG8.js.gz +0 -0
  41. package/dist/_frontend/assets/{ShellRouteSync-QAVCYLHL-CDlB0WM-.js → ShellRouteSync-UUGKAWDN-K2L7PMyF.js} +1 -1
  42. package/dist/_frontend/assets/ShellRouteSync-UUGKAWDN-K2L7PMyF.js.br +0 -0
  43. package/dist/_frontend/assets/ShellRouteSync-UUGKAWDN-K2L7PMyF.js.gz +0 -0
  44. package/dist/_frontend/assets/{SidebarLayout-3CSKXO4Z-DHrtYD50.js → SidebarLayout-H7DIHXYF-DDffrG__.js} +2 -2
  45. package/dist/_frontend/assets/SidebarLayout-H7DIHXYF-DDffrG__.js.br +0 -0
  46. package/dist/_frontend/assets/SidebarLayout-H7DIHXYF-DDffrG__.js.gz +0 -0
  47. package/dist/_frontend/assets/{SkillSettings-EDNAAMP6-D5QMdCsj.js → SkillSettings-4BFXYN43-DOXvpPxw.js} +1 -1
  48. package/dist/_frontend/assets/SkillSettings-4BFXYN43-DOXvpPxw.js.br +0 -0
  49. package/dist/_frontend/assets/SkillSettings-4BFXYN43-DOXvpPxw.js.gz +0 -0
  50. package/dist/_frontend/assets/{TrueForgeUIWithRouter-HUUOU77K-DnWfMFqB.js → TrueForgeUIWithRouter-7XLLWRDQ-BiMLUzrb.js} +1 -1
  51. package/dist/_frontend/assets/{WebSearchSettings-5SXM5JCV-ls7UX68H.js → WebSearchSettings-F4GST24B-B2nprNpE.js} +1 -1
  52. package/dist/_frontend/assets/WebSearchSettings-F4GST24B-B2nprNpE.js.br +0 -0
  53. package/dist/_frontend/assets/WebSearchSettings-F4GST24B-B2nprNpE.js.gz +0 -0
  54. package/dist/_frontend/assets/{WidgetLayout-7S2WT37T-C1dWBcJh.js → WidgetLayout-7HIMRVUF-XEgDolWi.js} +1 -1
  55. package/dist/_frontend/assets/WidgetLayout-7HIMRVUF-XEgDolWi.js.br +0 -0
  56. package/dist/_frontend/assets/WidgetLayout-7HIMRVUF-XEgDolWi.js.gz +0 -0
  57. package/dist/_frontend/assets/{chunk-HDD5IS3M-C0hVH4Fk.js → chunk-F2MZYGMM-BfR2olRW.js} +1 -1
  58. package/dist/_frontend/assets/chunk-F2MZYGMM-BfR2olRW.js.br +0 -0
  59. package/dist/_frontend/assets/chunk-F2MZYGMM-BfR2olRW.js.gz +0 -0
  60. package/dist/_frontend/assets/{chunk-P2W5VLGK-B6YzGXAg.js → chunk-MIQXDKJG-BtWJhfOl.js} +1 -1
  61. package/dist/_frontend/assets/chunk-MIQXDKJG-BtWJhfOl.js.br +0 -0
  62. package/dist/_frontend/assets/chunk-MIQXDKJG-BtWJhfOl.js.gz +0 -0
  63. package/dist/_frontend/assets/{chunk-OB3PAWPO-DN1Qz_zd.js → chunk-OB3PAWPO-B_v7Vt4j.js} +1 -1
  64. package/dist/_frontend/assets/chunk-OB3PAWPO-B_v7Vt4j.js.br +0 -0
  65. package/dist/_frontend/assets/chunk-OB3PAWPO-B_v7Vt4j.js.gz +0 -0
  66. package/dist/_frontend/assets/{chunk-2L7W3OHQ-KYs3TW6o.js → chunk-WW6L37U3-uDdjWjRT.js} +1 -1
  67. package/dist/_frontend/assets/{chunk-5XPPTYZ7-C3ltUDTq.js → chunk-YDJ4YR2V-DDs14r5E.js} +2 -2
  68. package/dist/_frontend/assets/chunk-YDJ4YR2V-DDs14r5E.js.br +0 -0
  69. package/dist/_frontend/assets/chunk-YDJ4YR2V-DDs14r5E.js.gz +0 -0
  70. package/dist/_frontend/assets/{cssMode-C9oytjDO.js → cssMode-B19kw3k5.js} +1 -1
  71. package/dist/_frontend/assets/cssMode-B19kw3k5.js.br +0 -0
  72. package/dist/_frontend/assets/cssMode-B19kw3k5.js.gz +0 -0
  73. package/dist/_frontend/assets/{freemarker2-DLOOWR4R.js → freemarker2-ByIiRnCA.js} +1 -1
  74. package/dist/_frontend/assets/freemarker2-ByIiRnCA.js.br +0 -0
  75. package/dist/_frontend/assets/freemarker2-ByIiRnCA.js.gz +0 -0
  76. package/dist/_frontend/assets/{handlebars-4dJAQcpZ.js → handlebars-GGurX7QQ.js} +1 -1
  77. package/dist/_frontend/assets/handlebars-GGurX7QQ.js.br +0 -0
  78. package/dist/_frontend/assets/handlebars-GGurX7QQ.js.gz +0 -0
  79. package/dist/_frontend/assets/{html-5KQYV_zA.js → html-Bea-TFio.js} +1 -1
  80. package/dist/_frontend/assets/html-Bea-TFio.js.br +0 -0
  81. package/dist/_frontend/assets/html-Bea-TFio.js.gz +0 -0
  82. package/dist/_frontend/assets/{htmlMode-CVtmab4S.js → htmlMode-UpcfQkOO.js} +1 -1
  83. package/dist/_frontend/assets/htmlMode-UpcfQkOO.js.br +0 -0
  84. package/dist/_frontend/assets/htmlMode-UpcfQkOO.js.gz +0 -0
  85. package/dist/_frontend/assets/{index-DdpoXKyE.js → index-DXPcBx6s.js} +3 -3
  86. package/dist/_frontend/assets/index-DXPcBx6s.js.br +0 -0
  87. package/dist/_frontend/assets/index-DXPcBx6s.js.gz +0 -0
  88. package/dist/_frontend/assets/{index-o2o-gWoN.js → index-XxdJGcmf.js} +263 -263
  89. package/dist/_frontend/assets/index-XxdJGcmf.js.br +0 -0
  90. package/dist/_frontend/assets/index-XxdJGcmf.js.gz +0 -0
  91. package/dist/_frontend/assets/{javascript-I_0YW_KY.js → javascript-DY5b95eC.js} +1 -1
  92. package/dist/_frontend/assets/{jsonMode-BkAzv-WD.js → jsonMode-DQ6wv9sP.js} +1 -1
  93. package/dist/_frontend/assets/jsonMode-DQ6wv9sP.js.br +0 -0
  94. package/dist/_frontend/assets/jsonMode-DQ6wv9sP.js.gz +0 -0
  95. package/dist/_frontend/assets/{liquid-CPxyHsAI.js → liquid-DIY9cwDq.js} +1 -1
  96. package/dist/_frontend/assets/liquid-DIY9cwDq.js.br +0 -0
  97. package/dist/_frontend/assets/liquid-DIY9cwDq.js.gz +0 -0
  98. package/dist/_frontend/assets/{lspLanguageFeatures-C5NNjmui.js → lspLanguageFeatures-DxPkeHqy.js} +1 -1
  99. package/dist/_frontend/assets/lspLanguageFeatures-DxPkeHqy.js.br +0 -0
  100. package/dist/_frontend/assets/lspLanguageFeatures-DxPkeHqy.js.gz +0 -0
  101. package/dist/_frontend/assets/{mdx-iFgTB6MB.js → mdx-DBv3GlUn.js} +1 -1
  102. package/dist/_frontend/assets/mdx-DBv3GlUn.js.br +0 -0
  103. package/dist/_frontend/assets/mdx-DBv3GlUn.js.gz +0 -0
  104. package/dist/_frontend/assets/{python-CbF5qB9O.js → python-CG1U7cfo.js} +1 -1
  105. package/dist/_frontend/assets/python-CG1U7cfo.js.br +0 -0
  106. package/dist/_frontend/assets/python-CG1U7cfo.js.gz +0 -0
  107. package/dist/_frontend/assets/{razor-BzBNiQv5.js → razor-BocDvFSS.js} +1 -1
  108. package/dist/_frontend/assets/razor-BocDvFSS.js.br +0 -0
  109. package/dist/_frontend/assets/razor-BocDvFSS.js.gz +0 -0
  110. package/dist/_frontend/assets/{tsMode-CDZ69pt0.js → tsMode-DIrD-lZz.js} +1 -1
  111. package/dist/_frontend/assets/tsMode-DIrD-lZz.js.br +0 -0
  112. package/dist/_frontend/assets/tsMode-DIrD-lZz.js.gz +0 -0
  113. package/dist/_frontend/assets/{typescript-0zTFlQSu.js → typescript-DnMp4KvL.js} +1 -1
  114. package/dist/_frontend/assets/typescript-DnMp4KvL.js.br +0 -0
  115. package/dist/_frontend/assets/typescript-DnMp4KvL.js.gz +0 -0
  116. package/dist/_frontend/assets/{workers-CZgJz51Q.js → workers-BqLxuuyo.js} +1 -1
  117. package/dist/_frontend/assets/workers-BqLxuuyo.js.br +0 -0
  118. package/dist/_frontend/assets/workers-BqLxuuyo.js.gz +0 -0
  119. package/dist/_frontend/assets/{xml-CsjOr0hl.js → xml-B29JhuW8.js} +1 -1
  120. package/dist/_frontend/assets/xml-B29JhuW8.js.br +0 -0
  121. package/dist/_frontend/assets/xml-B29JhuW8.js.gz +0 -0
  122. package/dist/_frontend/assets/{yaml-9U0A0dh0.js → yaml-8D94-iTX.js} +1 -1
  123. package/dist/_frontend/assets/yaml-8D94-iTX.js.br +0 -0
  124. package/dist/_frontend/assets/yaml-8D94-iTX.js.gz +0 -0
  125. package/dist/_frontend/index.html +1 -1
  126. package/dist/cli.js +1 -0
  127. package/dist/cli.js.map +1 -1
  128. package/dist/controller-main.js +98 -9
  129. package/dist/controller-main.js.map +1 -1
  130. package/dist/main.js +736 -119
  131. package/dist/main.js.map +1 -1
  132. package/dist/postgres/migrations/20260727_000001_init.js +1 -1
  133. package/dist/postgres/migrations/20260727_000001_init.js.map +1 -1
  134. package/dist/postgres/migrations/20260831_000001_session_external_id.js.map +1 -1
  135. package/dist/postgres/migrations/20260902_000002_agent_external_id.js.map +1 -1
  136. package/dist/postgres/migrations/20260903_000002_created_by_subject.js.map +1 -1
  137. package/dist/postgres/migrations/20260904_000001_schedule_agent_id.js.map +1 -1
  138. package/dist/postgres/migrations/20260904_000002_session_source.js.map +1 -1
  139. package/dist/postgres/migrations/20260904_000003_session_metadata_gin.js.map +1 -1
  140. package/dist/postgres/migrations/20260926_000001_sandbox_environment.js.map +1 -1
  141. package/dist/postgres/migrations/20260930_000001_sandbox_environment_secret.js.map +1 -1
  142. package/dist/postgres/migrations/20261028_000002_session_tfg_source_list_idx.js.map +1 -1
  143. package/dist/postgres/migrations/20261103_000001_sandbox_environment_type_truefoundry.js +885 -0
  144. package/dist/postgres/migrations/20261103_000001_sandbox_environment_type_truefoundry.js.map +1 -0
  145. package/dist/postgres/migrations/20261103_000002_query_path_indexes.js +37 -0
  146. package/dist/postgres/migrations/20261103_000002_query_path_indexes.js.map +1 -0
  147. package/dist/sqlite/migrations/20260831_000001_session_external_id.js.map +1 -1
  148. package/dist/sqlite/migrations/20260902_000001_session_metadata.js.map +1 -1
  149. package/dist/sqlite/migrations/20260902_000002_agent_external_id.js.map +1 -1
  150. package/dist/sqlite/migrations/20260903_000001_drop_agent_metadata.js.map +1 -1
  151. package/dist/sqlite/migrations/20260903_000002_created_by_subject.js.map +1 -1
  152. package/dist/sqlite/migrations/20260904_000001_schedule_agent_id.js.map +1 -1
  153. package/dist/sqlite/migrations/20260904_000002_session_source.js.map +1 -1
  154. package/dist/sqlite/migrations/20260926_000001_sandbox_environment.js.map +1 -1
  155. package/dist/sqlite/migrations/20260930_000001_sandbox_environment_secret.js.map +1 -1
  156. package/dist/sqlite/migrations/20261028_000002_session_tfg_source_list_idx.js.map +1 -1
  157. package/dist/sqlite/migrations/20261103_000002_query_path_indexes.js +39 -0
  158. package/dist/sqlite/migrations/20261103_000002_query_path_indexes.js.map +1 -0
  159. package/package.json +3 -3
  160. package/dist/_frontend/assets/AgentCodeSnippets-36MVPNIZ-DO0Y_xWq.js.br +0 -0
  161. package/dist/_frontend/assets/AgentCodeSnippets-36MVPNIZ-DO0Y_xWq.js.gz +0 -0
  162. package/dist/_frontend/assets/AgentMetricChart-2R23OEEA-D7SBsc7p.js.br +0 -0
  163. package/dist/_frontend/assets/AgentMetricChart-2R23OEEA-D7SBsc7p.js.gz +0 -0
  164. package/dist/_frontend/assets/AgentOverview-YSUEPAVB-CSMGELBr.js.br +0 -0
  165. package/dist/_frontend/assets/AgentOverview-YSUEPAVB-CSMGELBr.js.gz +0 -0
  166. package/dist/_frontend/assets/AgentSessionEventTimeline-H7JP34RB-TYYeaElm.js.br +0 -0
  167. package/dist/_frontend/assets/AgentSessionEventTimeline-H7JP34RB-TYYeaElm.js.gz +0 -0
  168. package/dist/_frontend/assets/AgentSessionEventTimelineChart-2O3LQZ6M-CPZPCe24.js.br +0 -0
  169. package/dist/_frontend/assets/AgentSessionEventTimelineChart-2O3LQZ6M-CPZPCe24.js.gz +0 -0
  170. package/dist/_frontend/assets/AgentSessions-4LXWAOQM-D5zQOhcY.js.br +0 -0
  171. package/dist/_frontend/assets/AgentSessions-4LXWAOQM-D5zQOhcY.js.gz +0 -0
  172. package/dist/_frontend/assets/ConnectorSettings-PYELU62E-DMbJA7AI.js.br +0 -0
  173. package/dist/_frontend/assets/ConnectorSettings-PYELU62E-DMbJA7AI.js.gz +0 -0
  174. package/dist/_frontend/assets/DrawerLayout-K2ZKOBJB-CVsZvHIE.js.br +0 -0
  175. package/dist/_frontend/assets/DrawerLayout-K2ZKOBJB-CVsZvHIE.js.gz +0 -0
  176. package/dist/_frontend/assets/EnvironmentsPage-5SEQP4QD-BxOU9R1E.js +0 -3
  177. package/dist/_frontend/assets/EnvironmentsPage-5SEQP4QD-BxOU9R1E.js.br +0 -0
  178. package/dist/_frontend/assets/EnvironmentsPage-5SEQP4QD-BxOU9R1E.js.gz +0 -0
  179. package/dist/_frontend/assets/ModelSettings-JQ57P7UZ--AqoNP6X.js.br +0 -0
  180. package/dist/_frontend/assets/ModelSettings-JQ57P7UZ--AqoNP6X.js.gz +0 -0
  181. package/dist/_frontend/assets/SandboxSettings-6DIQUD2C-Dq81qn8k.js.br +0 -0
  182. package/dist/_frontend/assets/SandboxSettings-6DIQUD2C-Dq81qn8k.js.gz +0 -0
  183. package/dist/_frontend/assets/SchedulesPage-25JKAP5G-DRHxlR8X.js.br +0 -0
  184. package/dist/_frontend/assets/SchedulesPage-25JKAP5G-DRHxlR8X.js.gz +0 -0
  185. package/dist/_frontend/assets/SettingsBuilder-QM224JED-Bp00qPG0.js.br +0 -0
  186. package/dist/_frontend/assets/SettingsBuilder-QM224JED-Bp00qPG0.js.gz +0 -0
  187. package/dist/_frontend/assets/ShellRouteSync-QAVCYLHL-CDlB0WM-.js.br +0 -0
  188. package/dist/_frontend/assets/ShellRouteSync-QAVCYLHL-CDlB0WM-.js.gz +0 -0
  189. package/dist/_frontend/assets/SidebarLayout-3CSKXO4Z-DHrtYD50.js.br +0 -0
  190. package/dist/_frontend/assets/SidebarLayout-3CSKXO4Z-DHrtYD50.js.gz +0 -0
  191. package/dist/_frontend/assets/SkillSettings-EDNAAMP6-D5QMdCsj.js.br +0 -0
  192. package/dist/_frontend/assets/SkillSettings-EDNAAMP6-D5QMdCsj.js.gz +0 -0
  193. package/dist/_frontend/assets/WebSearchSettings-5SXM5JCV-ls7UX68H.js.br +0 -0
  194. package/dist/_frontend/assets/WebSearchSettings-5SXM5JCV-ls7UX68H.js.gz +0 -0
  195. package/dist/_frontend/assets/WidgetLayout-7S2WT37T-C1dWBcJh.js.br +0 -0
  196. package/dist/_frontend/assets/WidgetLayout-7S2WT37T-C1dWBcJh.js.gz +0 -0
  197. package/dist/_frontend/assets/chunk-5XPPTYZ7-C3ltUDTq.js.br +0 -0
  198. package/dist/_frontend/assets/chunk-5XPPTYZ7-C3ltUDTq.js.gz +0 -0
  199. package/dist/_frontend/assets/chunk-HDD5IS3M-C0hVH4Fk.js.br +0 -0
  200. package/dist/_frontend/assets/chunk-HDD5IS3M-C0hVH4Fk.js.gz +0 -0
  201. package/dist/_frontend/assets/chunk-OB3PAWPO-DN1Qz_zd.js.br +0 -0
  202. package/dist/_frontend/assets/chunk-OB3PAWPO-DN1Qz_zd.js.gz +0 -0
  203. package/dist/_frontend/assets/chunk-P2W5VLGK-B6YzGXAg.js.br +0 -0
  204. package/dist/_frontend/assets/chunk-P2W5VLGK-B6YzGXAg.js.gz +0 -0
  205. package/dist/_frontend/assets/cssMode-C9oytjDO.js.br +0 -0
  206. package/dist/_frontend/assets/cssMode-C9oytjDO.js.gz +0 -0
  207. package/dist/_frontend/assets/freemarker2-DLOOWR4R.js.br +0 -0
  208. package/dist/_frontend/assets/freemarker2-DLOOWR4R.js.gz +0 -0
  209. package/dist/_frontend/assets/handlebars-4dJAQcpZ.js.br +0 -0
  210. package/dist/_frontend/assets/handlebars-4dJAQcpZ.js.gz +0 -0
  211. package/dist/_frontend/assets/html-5KQYV_zA.js.br +0 -0
  212. package/dist/_frontend/assets/html-5KQYV_zA.js.gz +0 -0
  213. package/dist/_frontend/assets/htmlMode-CVtmab4S.js.br +0 -0
  214. package/dist/_frontend/assets/htmlMode-CVtmab4S.js.gz +0 -0
  215. package/dist/_frontend/assets/index-DdpoXKyE.js.br +0 -0
  216. package/dist/_frontend/assets/index-DdpoXKyE.js.gz +0 -0
  217. package/dist/_frontend/assets/index-o2o-gWoN.js.br +0 -0
  218. package/dist/_frontend/assets/index-o2o-gWoN.js.gz +0 -0
  219. package/dist/_frontend/assets/jsonMode-BkAzv-WD.js.br +0 -0
  220. package/dist/_frontend/assets/jsonMode-BkAzv-WD.js.gz +0 -0
  221. package/dist/_frontend/assets/liquid-CPxyHsAI.js.br +0 -0
  222. package/dist/_frontend/assets/liquid-CPxyHsAI.js.gz +0 -0
  223. package/dist/_frontend/assets/lspLanguageFeatures-C5NNjmui.js.br +0 -0
  224. package/dist/_frontend/assets/lspLanguageFeatures-C5NNjmui.js.gz +0 -0
  225. package/dist/_frontend/assets/mdx-iFgTB6MB.js.br +0 -0
  226. package/dist/_frontend/assets/mdx-iFgTB6MB.js.gz +0 -0
  227. package/dist/_frontend/assets/python-CbF5qB9O.js.br +0 -0
  228. package/dist/_frontend/assets/python-CbF5qB9O.js.gz +0 -0
  229. package/dist/_frontend/assets/razor-BzBNiQv5.js.br +0 -0
  230. package/dist/_frontend/assets/razor-BzBNiQv5.js.gz +0 -0
  231. package/dist/_frontend/assets/tsMode-CDZ69pt0.js.br +0 -0
  232. package/dist/_frontend/assets/tsMode-CDZ69pt0.js.gz +0 -0
  233. package/dist/_frontend/assets/typescript-0zTFlQSu.js.br +0 -0
  234. package/dist/_frontend/assets/typescript-0zTFlQSu.js.gz +0 -0
  235. package/dist/_frontend/assets/workers-CZgJz51Q.js.br +0 -0
  236. package/dist/_frontend/assets/workers-CZgJz51Q.js.gz +0 -0
  237. package/dist/_frontend/assets/xml-CsjOr0hl.js.br +0 -0
  238. package/dist/_frontend/assets/xml-CsjOr0hl.js.gz +0 -0
  239. package/dist/_frontend/assets/yaml-9U0A0dh0.js.br +0 -0
  240. package/dist/_frontend/assets/yaml-9U0A0dh0.js.gz +0 -0
@@ -1 +1 @@
1
- import{ab as X,b as Y,bd as Z,bl as ee,p as ae,q as te,r as s,x as C,j as e,ak as se,I as F,E as B,_ as z,bs as re,aa as ne}from"./index-o2o-gWoN.js";var le=ne("h-11 shadow-sm"),ie=({open:m,onOpenChange:f,onSave:k,title:l,description:n,requireApiKey:u=!0,busy:E=!1,error:r})=>{const[i,p]=s.useState(""),v=()=>{p("")};s.useEffect(()=>{m&&p("")},[m]);const w=d=>{d||v(),f(d)},c=i.trim(),g=!u||!!c,y=async d=>{if(d.preventDefault(),!(!g||E))try{await k({apiKey:c}),v(),f(!1)}catch{}};return e.jsx(re,{open:m,onOpenChange:w,title:l,description:n,contentSized:!0,headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-6"})}),children:e.jsxs("form",{className:"flex flex-col overflow-y-auto p-5 md:p-6",onSubmit:y,children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"web-search-api-key",className:"mb-1.5 block text-sm font-medium text-text-primary",children:["API key",u?null:e.jsx("span",{className:"font-normal text-text-secondary",children:" (optional)"})]}),e.jsx("input",{id:"web-search-api-key",type:"password",required:u,value:i,onChange:d=>{p(d.target.value)},placeholder:u?"Parallel API key":"Leave blank to keep existing",autoFocus:!0,className:le})]})}),e.jsxs("div",{className:"mt-6 space-y-3",children:[r?e.jsx("p",{className:"text-failure-bg text-sm",children:r}):null,e.jsx(B.Primary,{type:"submit",size:"large",disabled:!g||E,className:"w-full shrink-0",children:"Save"})]})]})})},ce=ie,de=()=>{var D,M;const m=X(),f=(D=Y())==null?void 0:D.settings,k=Z(),l=ee(),n=ae(),u=te(),r=k&&((M=f==null?void 0:f.webSearch)==null?void 0:M.manageProviders)!==!1?m==null?void 0:m.webSearchCatalog:void 0,[i,p]=s.useState(null),[v,w]=s.useState(!1),[c,g]=s.useState([]),[y,d]=s.useState([]),[U,P]=s.useState(!0),[O,x]=s.useState(null),[L,b]=s.useState(null),[A,R]=s.useState(!1),[o,j]=s.useState(null),[h,S]=s.useState(null),W=s.useCallback(async({quiet:a=!1}={})=>{if(!r){g([]),d([]),P(!1);return}a||P(!0),x(null);try{const[t,N]=await Promise.all([r.listWebSearchProviders(),r.getWebSearchProviderCatalog()]);g(t),d(N)}catch(t){x(C(t,"Failed to load web search providers"))}finally{a||P(!1)}},[r]);s.useEffect(()=>{W()},[W]),s.useEffect(()=>{if(!l)return;let a=!1;return l.getConfiguration().then(t=>{a||p(t.webSearch.enabled)}).catch(t=>{a||x(C(t,"Failed to load the web search setting"))}),()=>{a=!0}},[l]);const V=async a=>{if(l){w(!0),x(null);try{const t=await l.updateConfiguration({webSearch:{enabled:a}});p(t.webSearch.enabled),n==null||n.showSuccess({title:t.webSearch.enabled?"Web search turned on":"Web search turned off"}),u(z.Settings.WEB_SEARCH_TENANT_TOGGLED,{enabled:t.webSearch.enabled})}catch(t){x(C(t,"Failed to save the web search setting"))}finally{w(!1)}}},_=c.length>0,I=s.useMemo(()=>{if(_)return[];const a=new Set(c.map(t=>t.catalogId));return y.filter(t=>!a.has(t.id))},[y,c,_]),$=l==null||i!==null,H=r!=null&&$&&i!==!1;if(r==null&&l==null)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Web search provider catalog is not available."});const K=async(a,t=x)=>{R(!0),x(null);try{await a(),await W({quiet:!0})}catch(N){throw t(C(N,"Request failed")),N}finally{R(!1)}},G=async a=>{!o||!r||(b(null),await K(async()=>{await r.createWebSearchProvider({catalogId:o.id,name:o.name,type:o.type,apiKey:a.apiKey})},b),j(null),setTimeout(()=>{n==null||n.showSuccess({title:`${o.name} configured`}),u(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:o.name,mode:"create"})},0))},q=async a=>{!h||!r||(b(null),await K(async()=>{await r.updateWebSearchProvider({id:h.id,...a.apiKey?{apiKey:a.apiKey}:{}})},b),S(null),setTimeout(()=>{n==null||n.showSuccess({title:`${h.name} updated`}),u(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:h.name,mode:"update"})},0))},J=o!=null||h!=null,T=h!=null,Q=h?`Update ${h.name}`:o?`Configure ${o.name}`:"Configure web search provider";return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Web search"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Choose whether agents in this tenant may search the web."}),O?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:O}):null,i!==null?e.jsxs("div",{className:"mt-4 flex items-center justify-between gap-4 rounded-xl border border-border bg-card-bg p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium text-text-primary",children:"Allow web search"}),e.jsx("p",{className:"mt-0.5 text-xs text-text-secondary",children:i?"New chats may use web search. Chats already using it keep it.":"New chats cannot use web search. Chats already using it keep it."})]}),e.jsx(se,{checked:i,disabled:v,"aria-label":"Allow web search",onCheckedChange:a=>{V(a)}})]}):null,i===!1?e.jsxs("p",{className:"mt-3 text-sm text-text-secondary",children:["Turn this back on whenever you want. Nothing is deleted while web search is off",r==null?".":", and provider setup comes back with it."]}):null,e.jsx("div",{className:"mt-4 flex-1 overflow-y-auto",children:H?U?e.jsx("p",{className:"text-sm text-text-secondary",children:"Loading web search providers…"}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-sm text-text-secondary",children:"Configure a provider so agents can search the web. Only one can be active at a time."}),c.length>0?e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Configured · ",c.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:c.map(a=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:a.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 sm:justify-end",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium text-success-bg",children:[e.jsx("span",{className:"size-2 rounded-full bg-success-bg","aria-hidden":!0}),"Connected"]}),e.jsx(B.Secondary,{size:"small",type:"button",disabled:A,onClick:()=>{b(null),j(null),S(a)},children:"Update"})]})]},a.id))})]}):null,_?null:e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Available · ",I.length]}),I.length===0?e.jsx("p",{className:"text-sm text-text-secondary",children:y.length>0?"All catalog providers are configured.":"No web search providers in the catalog."}):e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:I.map(a=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:a.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsx(B.Secondary,{type:"button",disabled:A,onClick:()=>{b(null),S(null),j(a)},children:"Configure"})]},a.id))})]})]}):null}),e.jsx(ce,{open:J,onOpenChange:a=>{a||(b(null),j(null),S(null))},onSave:T?q:G,title:Q,description:T?"Update this web search provider. Leave API key blank to keep the existing key.":"Configure this web search provider. API key is never stored in the catalog.",requireApiKey:!T,busy:A,error:L})]})},ue=de;export{ue as default};
1
+ import{ab as X,b as Y,bd as Z,bl as ee,p as ae,q as te,r as s,x as C,j as e,ak as se,I as F,E as B,_ as z,bs as re,aa as ne}from"./index-XxdJGcmf.js";var le=ne("h-11 shadow-sm"),ie=({open:m,onOpenChange:f,onSave:k,title:l,description:n,requireApiKey:u=!0,busy:E=!1,error:r})=>{const[i,p]=s.useState(""),v=()=>{p("")};s.useEffect(()=>{m&&p("")},[m]);const w=d=>{d||v(),f(d)},c=i.trim(),g=!u||!!c,y=async d=>{if(d.preventDefault(),!(!g||E))try{await k({apiKey:c}),v(),f(!1)}catch{}};return e.jsx(re,{open:m,onOpenChange:w,title:l,description:n,contentSized:!0,headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-6"})}),children:e.jsxs("form",{className:"flex flex-col overflow-y-auto p-5 md:p-6",onSubmit:y,children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"web-search-api-key",className:"mb-1.5 block text-sm font-medium text-text-primary",children:["API key",u?null:e.jsx("span",{className:"font-normal text-text-secondary",children:" (optional)"})]}),e.jsx("input",{id:"web-search-api-key",type:"password",required:u,value:i,onChange:d=>{p(d.target.value)},placeholder:u?"Parallel API key":"Leave blank to keep existing",autoFocus:!0,className:le})]})}),e.jsxs("div",{className:"mt-6 space-y-3",children:[r?e.jsx("p",{className:"text-failure-bg text-sm",children:r}):null,e.jsx(B.Primary,{type:"submit",size:"large",disabled:!g||E,className:"w-full shrink-0",children:"Save"})]})]})})},ce=ie,de=()=>{var D,M;const m=X(),f=(D=Y())==null?void 0:D.settings,k=Z(),l=ee(),n=ae(),u=te(),r=k&&((M=f==null?void 0:f.webSearch)==null?void 0:M.manageProviders)!==!1?m==null?void 0:m.webSearchCatalog:void 0,[i,p]=s.useState(null),[v,w]=s.useState(!1),[c,g]=s.useState([]),[y,d]=s.useState([]),[U,P]=s.useState(!0),[O,x]=s.useState(null),[L,b]=s.useState(null),[A,R]=s.useState(!1),[o,j]=s.useState(null),[h,S]=s.useState(null),W=s.useCallback(async({quiet:a=!1}={})=>{if(!r){g([]),d([]),P(!1);return}a||P(!0),x(null);try{const[t,N]=await Promise.all([r.listWebSearchProviders(),r.getWebSearchProviderCatalog()]);g(t),d(N)}catch(t){x(C(t,"Failed to load web search providers"))}finally{a||P(!1)}},[r]);s.useEffect(()=>{W()},[W]),s.useEffect(()=>{if(!l)return;let a=!1;return l.getConfiguration().then(t=>{a||p(t.webSearch.enabled)}).catch(t=>{a||x(C(t,"Failed to load the web search setting"))}),()=>{a=!0}},[l]);const V=async a=>{if(l){w(!0),x(null);try{const t=await l.updateConfiguration({webSearch:{enabled:a}});p(t.webSearch.enabled),n==null||n.showSuccess({title:t.webSearch.enabled?"Web search turned on":"Web search turned off"}),u(z.Settings.WEB_SEARCH_TENANT_TOGGLED,{enabled:t.webSearch.enabled})}catch(t){x(C(t,"Failed to save the web search setting"))}finally{w(!1)}}},_=c.length>0,I=s.useMemo(()=>{if(_)return[];const a=new Set(c.map(t=>t.catalogId));return y.filter(t=>!a.has(t.id))},[y,c,_]),$=l==null||i!==null,H=r!=null&&$&&i!==!1;if(r==null&&l==null)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Web search provider catalog is not available."});const K=async(a,t=x)=>{R(!0),x(null);try{await a(),await W({quiet:!0})}catch(N){throw t(C(N,"Request failed")),N}finally{R(!1)}},G=async a=>{!o||!r||(b(null),await K(async()=>{await r.createWebSearchProvider({catalogId:o.id,name:o.name,type:o.type,apiKey:a.apiKey})},b),j(null),setTimeout(()=>{n==null||n.showSuccess({title:`${o.name} configured`}),u(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:o.name,mode:"create"})},0))},q=async a=>{!h||!r||(b(null),await K(async()=>{await r.updateWebSearchProvider({id:h.id,...a.apiKey?{apiKey:a.apiKey}:{}})},b),S(null),setTimeout(()=>{n==null||n.showSuccess({title:`${h.name} updated`}),u(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:h.name,mode:"update"})},0))},J=o!=null||h!=null,T=h!=null,Q=h?`Update ${h.name}`:o?`Configure ${o.name}`:"Configure web search provider";return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Web search"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Choose whether agents in this tenant may search the web."}),O?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:O}):null,i!==null?e.jsxs("div",{className:"mt-4 flex items-center justify-between gap-4 rounded-xl border border-border bg-card-bg p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium text-text-primary",children:"Allow web search"}),e.jsx("p",{className:"mt-0.5 text-xs text-text-secondary",children:i?"New chats may use web search. Chats already using it keep it.":"New chats cannot use web search. Chats already using it keep it."})]}),e.jsx(se,{checked:i,disabled:v,"aria-label":"Allow web search",onCheckedChange:a=>{V(a)}})]}):null,i===!1?e.jsxs("p",{className:"mt-3 text-sm text-text-secondary",children:["Turn this back on whenever you want. Nothing is deleted while web search is off",r==null?".":", and provider setup comes back with it."]}):null,e.jsx("div",{className:"mt-4 flex-1 overflow-y-auto",children:H?U?e.jsx("p",{className:"text-sm text-text-secondary",children:"Loading web search providers…"}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-sm text-text-secondary",children:"Configure a provider so agents can search the web. Only one can be active at a time."}),c.length>0?e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Configured · ",c.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:c.map(a=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:a.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 sm:justify-end",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium text-success-bg",children:[e.jsx("span",{className:"size-2 rounded-full bg-success-bg","aria-hidden":!0}),"Connected"]}),e.jsx(B.Secondary,{size:"small",type:"button",disabled:A,onClick:()=>{b(null),j(null),S(a)},children:"Update"})]})]},a.id))})]}):null,_?null:e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Available · ",I.length]}),I.length===0?e.jsx("p",{className:"text-sm text-text-secondary",children:y.length>0?"All catalog providers are configured.":"No web search providers in the catalog."}):e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:I.map(a=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(F,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:a.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsx(B.Secondary,{type:"button",disabled:A,onClick:()=>{b(null),S(null),j(a)},children:"Configure"})]},a.id))})]})]}):null}),e.jsx(ce,{open:J,onOpenChange:a=>{a||(b(null),j(null),S(null))},onSave:T?q:G,title:Q,description:T?"Update this web search provider. Leave API key blank to keep the existing key.":"Configure this web search provider. API key is never stored in the catalog.",requireApiKey:!T,busy:A,error:L})]})},ue=de;export{ue as default};
@@ -1 +1 @@
1
- import{S as m}from"./chunk-5XPPTYZ7-C3ltUDTq.js";import{u as x,b8 as f,r,j as e,b7 as p,I as b,a3 as h,c as v}from"./index-o2o-gWoN.js";import"./chunk-HDD5IS3M-C0hVH4Fk.js";function j({className:u}){const d=x("BrandLogo"),{open:a,setOpen:n}=f(),l=r.useRef(null),s=r.useRef(null),i=r.useRef(!1);return r.useEffect(()=>{if(!a)return;const t=o=>{var c;o.key==="Escape"&&!((c=s.current)!=null&&c.querySelector("dialog[open]"))&&n(!1)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a,n]),r.useEffect(()=>{var t,o;if(a){i.current=!0,(t=s.current)==null||t.focus();return}i.current&&((o=l.current)==null||o.focus(),i.current=!1)},[a]),e.jsxs("div",{className:v("pointer-events-none relative h-full min-h-0 w-full",u),children:[a?e.jsx("div",{ref:s,"data-aui-compact-layout":!0,className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[calc(5.25rem+env(safe-area-inset-bottom,0px))] z-[19] flex h-[min(560px,calc(100%-6.5rem-env(safe-area-inset-bottom,0px)))] max-h-[calc(100%-6.5rem)] w-[min(380px,calc(100%-2.5rem))] flex-col overflow-hidden rounded-xl border border-border bg-primary-bg shadow-[0_16px_48px_color-mix(in_oklab,var(--shadow-color)_14%,transparent)] outline-none",role:"dialog","aria-modal":!0,"aria-label":"Chat",tabIndex:-1,children:e.jsx(p,{children:e.jsx(m,{threadHeaderEnd:e.jsx("button",{type:"button","aria-label":"Close",title:"Close",className:h({variant:"ghost",size:"icon"}),onClick:()=>n(!1),children:e.jsx(b,{name:"xmark"})})})})}):null,e.jsx("button",{ref:l,type:"button",className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[max(1.25rem,env(safe-area-inset-bottom,0px))] z-20 flex size-14 cursor-pointer items-center justify-center rounded-full text-sm font-medium shadow-[0_8px_24px_color-mix(in_oklab,var(--primary-button-bg)_45%,transparent)]",style:{backgroundColor:"var(--primary-button-bg)",color:"var(--primary-button-text)"},"aria-expanded":a,"aria-label":a?"Close chat":"Open chat",onClick:()=>n(t=>!t),children:a?e.jsx("span",{"aria-hidden":!0,className:"text-xl leading-none",children:"×"}):e.jsx(d,{variant:"icon",className:"size-6"})})]})}export{j as WidgetLayout};
1
+ import{S as m}from"./chunk-YDJ4YR2V-DDs14r5E.js";import{u as x,b8 as f,r,j as e,b7 as p,I as b,a3 as h,c as v}from"./index-XxdJGcmf.js";import"./chunk-F2MZYGMM-BfR2olRW.js";function j({className:u}){const d=x("BrandLogo"),{open:a,setOpen:n}=f(),l=r.useRef(null),s=r.useRef(null),i=r.useRef(!1);return r.useEffect(()=>{if(!a)return;const t=o=>{var c;o.key==="Escape"&&!((c=s.current)!=null&&c.querySelector("dialog[open]"))&&n(!1)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a,n]),r.useEffect(()=>{var t,o;if(a){i.current=!0,(t=s.current)==null||t.focus();return}i.current&&((o=l.current)==null||o.focus(),i.current=!1)},[a]),e.jsxs("div",{className:v("pointer-events-none relative h-full min-h-0 w-full",u),children:[a?e.jsx("div",{ref:s,"data-aui-compact-layout":!0,className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[calc(5.25rem+env(safe-area-inset-bottom,0px))] z-[19] flex h-[min(560px,calc(100%-6.5rem-env(safe-area-inset-bottom,0px)))] max-h-[calc(100%-6.5rem)] w-[min(380px,calc(100%-2.5rem))] flex-col overflow-hidden rounded-xl border border-border bg-primary-bg shadow-[0_16px_48px_color-mix(in_oklab,var(--shadow-color)_14%,transparent)] outline-none",role:"dialog","aria-modal":!0,"aria-label":"Chat",tabIndex:-1,children:e.jsx(p,{children:e.jsx(m,{threadHeaderEnd:e.jsx("button",{type:"button","aria-label":"Close",title:"Close",className:h({variant:"ghost",size:"icon"}),onClick:()=>n(!1),children:e.jsx(b,{name:"xmark"})})})})}):null,e.jsx("button",{ref:l,type:"button",className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[max(1.25rem,env(safe-area-inset-bottom,0px))] z-20 flex size-14 cursor-pointer items-center justify-center rounded-full text-sm font-medium shadow-[0_8px_24px_color-mix(in_oklab,var(--primary-button-bg)_45%,transparent)]",style:{backgroundColor:"var(--primary-button-bg)",color:"var(--primary-button-text)"},"aria-expanded":a,"aria-label":a?"Close chat":"Open chat",onClick:()=>n(t=>!t),children:a?e.jsx("span",{"aria-hidden":!0,className:"text-xl leading-none",children:"×"}):e.jsx(d,{variant:"icon",className:"size-6"})})]})}export{j as WidgetLayout};
@@ -1 +1 @@
1
- import{t as D,j as t,G as me,r as d,bF as fe,u as b,bG as A,bH as ge,bI as pe,bJ as he,bK as xe,bL as H,bM as J,d as ne,b0 as se,bN as B,bO as ve,bP as be,bQ as Ce,bR as Se,bS as je,bn as we,b1 as ye,p as oe,bT as ke,bU as X,bV as re,bW as ae,bX as Ie,ab as ie,q,bY as G,_ as T,bZ as $,a4 as Ae,b_ as Ee,b$ as Me,c0 as Ne,c1 as Re,c2 as P,E as Z,c3 as Te,c4 as Pe,c5 as De,c6 as Le,bw as Oe,a9 as le,c7 as _e,c8 as ce,c9 as Fe,ca as Be,bE as z,cb as Ue,cc as He,cd as ze,ce as Ve,b9 as We,w as qe,b as ue,b3 as Qe,cf as Ke,cg as Ge,ch as Ye,ci as Je,I as F,a3 as W,c as _,cj as Y,ck as Xe,k as $e,cl as Ze}from"./index-o2o-gWoN.js";function et(){var h;const{pending:n}=re(),e=_e(),[s,a]=d.useState({approvalId:null,index:0}),o=d.useRef(null),l=n.length,u=s.approvalId==null?-1:n.findIndex(f=>f.approvalId===s.approvalId),i=u>=0?u:l===0?0:Math.min(s.index,l-1),r=(h=n[i])==null?void 0:h.approvalId;d.useEffect(()=>{const f=r??null;s.approvalId===f&&s.index===i||a({approvalId:f,index:i})},[r,i,s.approvalId,s.index]),d.useEffect(()=>{if(r==null||e==null){r==null&&(o.current=null);return}o.current!==r&&(o.current=r,e.focus(r))},[r,e]);const c=d.useCallback(()=>{var C;const f=Math.max(0,i-1);a({approvalId:((C=n[f])==null?void 0:C.approvalId)??null,index:f})},[n,i]),m=d.useCallback(()=>{var C;const f=Math.min(Math.max(l-1,0),i+1);a({approvalId:((C=n[f])==null?void 0:C.approvalId)??null,index:f})},[l,n,i]),p=d.useCallback(()=>{r==null||e==null||e.focus(r)},[r,e]);return{count:l,index:i,canPrev:i>0,canNext:i<l-1,goPrev:c,goNext:m,focusCurrent:p}}function tt(){const n=b("ApprovalNavBanner"),{count:e,index:s,canPrev:a,canNext:o,goPrev:l,goNext:u,focusCurrent:i}=et();return e===0?null:t.jsx(n,{total:e,current:s+1,canPrev:a,canNext:o,onPrev:l,onNext:u,onFocusCurrent:i})}var O={radioValue:"",custom:""};function nt({disabled:n=!1}){const e=b("AskUserPrompt"),{pending:s,respond:a}=X(),o=q(),l=B(),u=s[0],i=d.useMemo(()=>u==null?[]:[{id:u.toolCallId,question:u.question??"Answer required",options:u.options??[]}],[u]),[r,c]=d.useState(0),[m,p]=d.useState({});d.useEffect(()=>{c(0),p({})},[u==null?void 0:u.toolCallId]);const h=Math.min(r,Math.max(i.length-1,0)),f=i[h],C=f==null?O:m[f.id]??O,S=d.useCallback(y=>{const k=m[y]??O;return k.radioValue===G?k.custom.trim():k.radioValue.trim()},[m]),x=d.useMemo(()=>i.every(y=>S(y.id)),[S,i]),j=C.radioValue===G?C.custom.trim():C.radioValue.trim(),w=l||n||f==null||j.length===0,I=w||!x,M=d.useCallback((y,k)=>{p(R=>({...R,[y]:{...R[y]??O,...k}}))},[]),E=d.useCallback(()=>{if(n||u==null||!x)return;const y=S(u.toolCallId);if(!y)return;const k=m[u.toolCallId]??O;o(T.AskUser.SUBMITTED,{tool_call_id:u.toolCallId,question_count:i.length,is_custom_option:k.radioValue===G}),a({toolCallId:u.toolCallId,content:y})},[x,m,n,S,u,i.length,a,o]);return u==null||f==null?null:t.jsx(e,{questions:i,readOnly:l||n,currentQuestion:f,currentQuestionIndex:h,currentAnswer:C,totalQuestions:i.length,isMultiQuestion:i.length>1,isLastQuestion:h===i.length-1,allQuestionsAnswered:x,isSubmitDisabled:w,isSubmitAllDisabled:I,onCurrentQuestionIndexChange:c,onCurrentAnswerChange:M,onSubmit:E})}function st(n){var a,o,l;const e=n.thread.messages,s=e[e.length-1];return(s==null?void 0:s.role)!=="assistant"||((a=s.status)==null?void 0:a.type)!=="requires-action"?!1:((l=(o=s.metadata)==null?void 0:o.custom)==null?void 0:l.pendingMcpAuth)===!0}function ot(){const n=A(st),{pending:e}=X(),{pending:s}=re(),a=ae();if(n)return{kind:"mcp"};const o=e[0];if(o!=null){const l=o.toolName;return l!=null&&(a==null?void 0:a[l])!=null?{kind:"custom",toolName:l}:{kind:"ask-user"}}return s.length>0?{kind:"approval"}:{kind:"compose"}}function rt({disabled:n=!1}){const e=ae(),{pending:s,respond:a}=X(),o=B(),l=s[0],u=d.useCallback(r=>{if(n||l==null)return;const c=r.trim();c&&a({toolCallId:l.toolCallId,content:c})},[n,l,a]);if(l==null||l.toolName==null)return null;const i=e==null?void 0:e[l.toolName];return i==null?null:t.jsx(i,{args:l.args??{},disabled:o||n,onSubmit:u})}function at({servers:n,onContinue:e,readOnly:s}){const a=b("McpAuthPrompt"),{handleAuthorize:o}=Oe(),{refreshConnectors:l}=le(),[u,i]=d.useState(()=>new Set),r=d.useRef(u),[c,m]=d.useState(!1),p=d.useRef(!1),h=d.useRef(0);d.useEffect(()=>()=>{h.current+=1},[]);const f=()=>{s||p.current||(p.current=!0,m(!0),e().catch(()=>{p.current=!1,m(!1)}))},C=S=>{const x=h.current;o(S,j=>{if(x!==h.current||!j)return;const w=new Set([...r.current,S]);r.current=w,i(w),l(),n.every(I=>w.has(I.id))&&f()})};return t.jsx(a,{servers:n,connectedServerIds:u,continueLoading:c,onConnect:C,onContinue:f,readOnly:s})}function it({disabled:n=!1}){const e=b("McpAuthPrompt"),{pending:s,resume:a}=Ie(),o=B(),l=ie();if(!s)return null;if(l){const i=JSON.stringify(s.mcpServers.map(r=>r.id));return t.jsx(at,{servers:s.mcpServers,onContinue:a,readOnly:o||n},i)}const u=i=>{const r=s.mcpServers.find(c=>c.id===i);r!=null&&r.authUrl&&window.open(r.authUrl,"_blank","noopener,noreferrer")};return t.jsx(e,{servers:s.mcpServers,onConnect:u,onContinue:()=>{n||a()},readOnly:o||n})}function lt(n){var s;const e=n.items;if(e.length>0){const a=[];let o=0;for(const l of Array.from(e)){if(l.kind!=="file")continue;const u=((s=l.webkitGetAsEntry)==null?void 0:s.call(l))??null;if((u==null?void 0:u.isDirectory)===!0){o+=1;continue}const i=l.getAsFile();i!=null&&a.push(i)}return{files:a,rejectedDirectoryCount:o}}return{files:Array.from(n.files),rejectedDirectoryCount:0}}function ct({disabled:n,hasText:e,hasAttachments:s,requiresModel:a,hasModel:o}){return!n&&(e||s)&&(!a||o)}function ee({placeholder:n,connectedToBanner:e=!1}){var L,v;const s=b("ComposerShell"),a=se(),o=D(),l=q(),u=A(g=>g.threadListItem.remoteId),i=A(g=>g.composer.text.trim().length>0),r=A(g=>g.composer.attachments.length),c=r>0,m=i||c,{agentSpec:p}=ce(),h=o==null||o.mode.status==="active"&&o.mode.isMutable,f=!!((v=(L=p==null?void 0:p.model)==null?void 0:L.name)!=null&&v.trim()),{isBusy:C,send:S,resetBusy:x}=Fe(),j=J(),w=Be(),I=oe(),M=d.useRef(null),E=!j,y=ct({disabled:E,hasText:i,hasAttachments:c,requiresModel:h,hasModel:f}),k=(o==null?void 0:o.mode.status)==="active"?{agentId:o.mode.agentId,agentName:o.mode.agentName}:{},R=()=>{var g;y&&(l(T.Message.SENT,z({has_text:i,has_attachments:c,attachment_count:r,requires_model:h,model:(g=p==null?void 0:p.model)==null?void 0:g.name},{sessionId:u,...k})),S(()=>a.composer().send()))},Q=g=>{g.key!=="Enter"||g.shiftKey||g.nativeEvent.isComposing||y&&(g.preventDefault(),R())};return t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:M,type:"file",multiple:!0,hidden:!0,onChange:g=>{const N=g.target.files;if(N){l(T.Attachment.PICKED,z({file_count:N.length},{sessionId:u,...k}));for(const U of N)a.composer().addAttachment(U).catch(K=>{I==null||I.showError(K)})}g.target.value=""}}),t.jsx(P.AttachmentDropzone,{disabled:E,"data-slot":"aui_composer-attachment-dropzone",className:"w-full rounded-[0.75rem] transition-[box-shadow] data-[dragging=true]:ring-focus-ring/20 data-[dragging=true]:ring-3",onDropCapture:g=>{if(E)return;const N=g.dataTransfer;if(N==null)return;const{files:U,rejectedDirectoryCount:K}=lt(N);K>0&&(I==null||I.showError(new Error("Folders cannot be attached. Attach individual files instead."))),U.length!==0&&l(T.Attachment.PICKED,z({file_count:U.length},{sessionId:u,...k}))},children:t.jsx(P.Root,{"data-slot":"aui_composer-root",className:"w-full",onSubmit:g=>{g.preventDefault(),R()},children:t.jsx(s,{className:e?"rounded-t-none border-t-0 focus-within:ring-0":void 0,attachments:t.jsx(Ue,{}),input:t.jsx(P.Input,{"data-slot":"aui_composer-input",placeholder:n,disabled:E,submitMode:"enter",onKeyDown:Q,"aria-label":"Message input",className:"text-text-primary placeholder:text-text-secondary/80 max-h-[10lh] min-h-10 w-full resize-none overflow-y-auto rounded-lg border-none bg-transparent px-1 py-1 text-base leading-normal shadow-none outline-none disabled:cursor-not-allowed"}),disabled:E,canSubmit:y,hasContent:m,isRunning:C,onSubmit:R,onCancel:j?()=>{l(T.Message.CANCELLED,z(void 0,{sessionId:u,...k})),x(),w()}:void 0,onAttach:j?()=>{var g;return(g=M.current)==null?void 0:g.click()}:void 0})})})]})}function V({placeholder:n,connectedToBanner:e=!1}){const s=D(),a=b("ComposerLeftSection"),o=b("ComposerRightSection"),l=$("ComposerLeftSection"),u=$("ComposerRightSection"),i=b("DraftComposerLeftSection"),r=b("DraftComposerRightSection");return(s==null?void 0:s.mode.status)==="active"&&s.mode.isMutable?t.jsx(Ae,{children:t.jsx(Ee,{overrides:{ComposerLeftSection:l?i:a,ComposerRightSection:u?r:o},children:t.jsx(ee,{placeholder:n,connectedToBanner:e})})}):t.jsx(ee,{placeholder:n,connectedToBanner:e})}function ut({placeholder:n="Ask anything... (Shift+Enter for new line)"}){const e=ot(),s=J(),a=e.kind==="mcp"?t.jsx(it,{disabled:!s}):e.kind==="custom"?t.jsx(rt,{disabled:!s}):e.kind==="ask-user"?t.jsx(nt,{disabled:!s}):e.kind==="approval"?t.jsx(tt,{}):null;return a==null?t.jsx(V,{placeholder:n}):e.kind==="approval"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx(V,{placeholder:n,connectedToBanner:!0})]}):e.kind==="mcp"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"relative flex w-full flex-col",children:[t.jsx("div",{className:"pb-2",children:a}),t.jsx("div",{className:"relative z-10 -mt-3",children:t.jsx(V,{placeholder:n})})]}):t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx("div",{className:"relative z-10 -mt-1",children:t.jsx(V,{placeholder:n})})]})}var dt=200,te='[data-slot="aui_thread-viewport"]';function mt(){const n=b("HistoryLoader"),{hasOlderHistory:e,isLoadingOlderHistory:s,loadOlderHistory:a}=ve(),[o,l]=d.useState(null),u=d.useRef(!1),i=d.useCallback(async()=>{if(u.current)return;u.current=!0;const r=(o==null?void 0:o.closest(te))??null,c=(r==null?void 0:r.scrollHeight)??0,m=(r==null?void 0:r.scrollTop)??0;try{await a(),requestAnimationFrame(()=>{if(r==null)return;const p=r.scrollHeight-c;p>0&&r.scrollTo({top:m+p,behavior:"instant"})})}catch{}finally{u.current=!1}},[o,a]);return d.useEffect(()=>{if(o==null||!e)return;const r=o.closest(te),c=new IntersectionObserver(m=>{m.some(p=>p.isIntersecting)&&i()},{root:r,rootMargin:`${dt}px 0px 0px 0px`});return c.observe(o),()=>c.disconnect()},[o,e,i]),e?t.jsx(n,{ref:l,isLoading:s}):null}function ft(){const n=b("ResumeUnavailable");return Se()?t.jsx(n,{}):null}function gt(){return A(e=>{var s;return(((s=e.message.attachments)==null?void 0:s.length)??0)>0})?t.jsx("div",{className:"pointer-events-none mb-2 opacity-90",children:t.jsx(He,{})}):null}function pt(){const n=b("UserMessageEdit"),e=b("MessageTimestamp"),s=B(),a=J(),o=A(r=>r.message.createdAt),{cancel:l,disabled:u}=Me(),{disabled:i}=Ne();return t.jsx(Re.Root,{"data-role":"user",children:t.jsx(P.Root,{"data-slot":"aui_user-edit-composer-root",className:"fade-in slide-in-from-bottom-1 animate-in flex w-full justify-end px-2 duration-150",children:t.jsx(n,{timestamp:t.jsx(e,{createdAt:o}),attachments:t.jsx(gt,{}),input:t.jsx("div",{className:"mt-1 rounded border border-border bg-secondary-bg p-2 text-text-primary",children:t.jsx(P.Input,{"data-slot":"aui_user-edit-input",disabled:s||!a,submitMode:"enter","aria-label":"Edit message",className:"max-h-32 min-h-10 w-full resize-none border-none bg-transparent p-0 text-base leading-[1.34] outline-none focus:shadow-none"})}),footer:t.jsxs("div",{className:"flex items-center justify-end gap-2",children:[t.jsx(Z.Secondary,{type:"button",disabled:u,onClick:l,children:"Cancel"}),t.jsx(P.Send,{asChild:!0,children:t.jsx(Z.Primary,{type:"submit",disabled:i||s||!a,children:"Save & Rerun"})})]})})})})}function ht(){const n=ne(),e=se(),s=A(i=>i.threadListItem.remoteId),a=A(i=>i.threadListItem.title),o=B(),l=d.useRef(!1),u=d.useRef(void 0);d.useEffect(()=>{u.current=void 0},[s]),d.useEffect(()=>{const i=l.current&&!o;if(l.current=o,!i||n==null||s==null||u.current===s)return;if(a!=null&&a.trim()!==""){u.current=s;return}let r=!1;return n.getSession({sessionId:s}).then(c=>{if(r)return;const m=typeof c.title=="string"?c.title.trim():"";if(m.length!==0)return u.current=s,e.threadListItem().rename(m)}).catch(()=>{}),()=>{r=!0}},[e,o,s,n,a])}var de="trueforge.file-preview-width";function xt(){try{const n=sessionStorage.getItem(de);if(n==null)return null;const e=Number(n);return Number.isFinite(e)?e:null}catch{return null}}function vt(n){try{sessionStorage.setItem(de,String(Math.round(n)))}catch{}}function bt(){const n=je(),e=b("FilePreviewPanel"),s=we(),a=ye(),o=oe(),[l,u]=d.useState(0),[i,r]=d.useState(!1),[c,m]=d.useState(xt),p=ke(n.target,l),h=n.target,f=n.presentation==="full"?"full":s||a?"overlay":"side";if(d.useLayoutEffect(()=>{var w;if(h==null||f!=="side")return;const x=((w=document.querySelector('[data-slot="aui_file-preview-row"]'))==null?void 0:w.getBoundingClientRect().width)??0;if(x<=0)return;const j=c==null?Te(x):Pe({requested:c,rowWidth:x});(c==null||Math.abs(j-c)>1)&&m(j)},[f,h,c]),h==null)return null;const C=p.view.status==="error",S=()=>{i||(r(!0),(async()=>{try{const x=p.blob??await h.load();De(x,Le(h.path))}catch(x){o!=null?o.showError(x):console.error("Failed to download sandbox file",x)}finally{r(!1)}})())};return t.jsx(e,{name:h.name,placement:f,view:p.view,onClose:n.close,onDownload:S,onEnterFullPage:()=>n.setPresentation("full"),onExitFullPage:()=>n.setPresentation("panel"),downloadBusy:i,...f==="side"&&c!=null?{widthPx:c}:{},...f==="side"?{onWidthChange:x=>{m(x),vt(x)}}:{},...C?{onRetry:()=>u(x=>x+1)}:{}})}function Ct({children:n}){return t.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-1 fill-mode-both duration-200",children:n})}function St({isEditing:n}){return A(s=>s.message.role)==="user"?n?t.jsx(pt,{}):t.jsx(be,{}):t.jsx(Ce,{})}function jt({composer:n}){d.useEffect(()=>{fe()},[]),ht();const e=D(),s=b("WelcomeScreen"),a=b("MessageListSkeleton"),o=b("ScrollToBottomButton"),l=b("MessageGroup"),u=b("ThreadComposerAreaShell"),i=b("ThreadRootShell"),r=b("ThreadViewportShell"),c=A(ge),m=A(h=>h.thread.isLoading),p=(e==null?void 0:e.mode.status)==="active"?e.mode.agentName!=null&&e.mode.agentName.length>0?e.mode.agentName:e.mode.isMutable&&e.mode.isCreateAgent?"Start building a new Agent":void 0:void 0;return t.jsx(pe,{children:t.jsx(he,{children:t.jsx(xe,{children:t.jsx(H.Root,{asChild:!0,children:t.jsx(i,{children:t.jsxs("div",{"data-slot":"aui_file-preview-row",className:"relative flex min-h-0 w-full min-w-0 flex-1",children:[t.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[t.jsx(H.Viewport,{asChild:!0,autoScroll:!0,children:t.jsxs(r,{isEmpty:c,children:[c&&t.jsx(s,{heading:p}),c&&!m&&n,m?t.jsx(a,{}):!c&&t.jsxs(t.Fragment,{children:[t.jsx(mt,{}),t.jsxs(l,{children:[t.jsx(H.Messages,{children:({message:h})=>t.jsx(Ct,{children:t.jsx(St,{isEditing:h.role==="user"&&h.composer.isEditing})})}),t.jsx(ft,{})]})]})]})}),!m&&!c&&t.jsxs(u,{isEmpty:c,children:[t.jsx(H.ScrollToBottom,{asChild:!0,children:t.jsx(o,{})}),n]})]}),t.jsx(bt,{})]})})})})})})}function yt(){const n=D();return(n==null?void 0:n.sessionAccessError)!=null?t.jsx(me,{title:"Unable to load session",description:n.sessionAccessError,className:"bg-primary-bg"}):t.jsx(jt,{composer:t.jsx(ut,{})})}function kt({className:n}){var r;const e=D(),s=q(),a=Xe(),o=A(c=>c.threadListItem.title);if(a===null)return null;const l=(o==null?void 0:o.trim())??"",u=a.allowThreadTitle&&l.length>0?l:a.name,i=(e==null?void 0:e.isLibraryEnabled)===!0&&((r=e.historyAgentFilter)==null?void 0:r.intent)==="try-agent";return t.jsxs("h1",{className:_("flex min-w-0 items-center gap-1.5",Ze,n),children:[i?t.jsx("button",{type:"button","aria-label":"Back to all agents",title:"Back to all agents",className:W({variant:"ghost",size:"icon",className:"text-text-secondary"}),onClick:()=>{s(T.Library.OPENED),e==null||e.setLibraryOpen(!0)},children:t.jsx(F,{name:"arrow-left"})}):null,t.jsx("span",{className:"truncate",title:u,children:u}),a.isEditing?t.jsx($e,{content:"Try changes here, then choose Update agent to save.",side:"bottom",children:t.jsxs("span",{className:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[t.jsx(F,{name:"pencil",className:"size-3"}),"Editing"]})}):null]})}function It({className:n,labeled:e=!1,onAction:s}){const a=D(),o=q(),l=ie(),u=ue(),{mode:i,setTheme:r}=Ye(),c=b("ShellActionsActionSlot"),m=i==="dark",p=m?"Light":"Dark",h=Je({catalog:l,capabilities:u}),f="hover:bg-secondary-button-hover hover:text-ghost-button-text";return t.jsxs("div",{className:_("flex shrink-0 items-center gap-1",e?"w-full flex-col items-center gap-1 text-sidebar-text":"text-text-primary",n),children:[t.jsxs("a",{href:"https://trueforge.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",title:"Documentation",className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y)}),onClick:()=>s==null?void 0:s(),children:[t.jsx(F,{name:"book-open",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Docs"}):null]}),t.jsxs("button",{type:"button","aria-label":m?"Switch to light theme":"Switch to dark theme",title:m?"Light theme":"Dark theme",className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y)}),onClick:()=>{r(m?"light":"dark"),s==null||s()},children:[t.jsx(F,{name:m?"sun":"moon",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:p}):null]}),a!=null&&h?t.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings","aria-expanded":a.settingsOpen,"aria-current":a.settingsOpen?"page":void 0,className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y,a.settingsOpen&&"bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text")}),onClick:()=>{a.settingsOpen||o(T.Settings.OPENED),a.setSettingsOpen(!0),s==null||s()},children:[t.jsx(F,{name:"settings",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Settings"}):null]}):null,t.jsx(c,{})]})}function At({showClose:n=!1}){var L;const{agentSpec:e}=ce(),s=ze(),a=Ve(),o=We(),l=o.mode.status==="active"?o.mode.agentId:void 0,{allows:u}=qe({resourceType:"agent",resourceIds:l==null?[]:[l]}),i=u(l,"MANAGE"),r=ne(),c=ue(),m=le(),p=b("AgentConfigPanel"),h=b("AgentConfigEditors"),[f,C]=d.useState(null),S=Qe(o.mode),{draft:x,flush:j}=Ke(),w=d.useCallback(()=>{j(),a(),o.setAgentConfigOpen(!1)},[a,j,o]);d.useEffect(()=>{S&&m.ensureLoaded()},[m,S]),d.useEffect(()=>{i||C(null)},[i]),d.useEffect(()=>{if(!n||!o.agentConfigOpen)return;const v=g=>{!g.defaultPrevented&&g.key==="Escape"&&f===null&&document.querySelector("dialog[open]")===null&&w()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[w,f,o.agentConfigOpen,n]);const I=d.useRef({flushAgentSpec:a,flushInstructions:j});I.current={flushAgentSpec:a,flushInstructions:j},d.useEffect(()=>()=>{const{flushAgentSpec:v,flushInstructions:g}=I.current;g();try{v()}catch{}},[]);const M=d.useCallback(({next:v,instructions:g})=>{var N;if(i){if(v.skills&&v.skills.length>0&&(c==null?void 0:c.sandbox.enabled)===!0){s==null||s({...v,instructions:g||void 0,config:{...v.config,sandbox:{...(N=v.config)==null?void 0:N.sandbox,enabled:!0}}});return}s==null||s({...v,instructions:g||void 0})}},[i,c==null?void 0:c.sandbox.enabled,s]),E=d.useCallback(v=>{M({next:v,instructions:x})},[M,x]),y=d.useCallback(v=>{e!==null&&M({next:Ge({spec:e,messages:v.messages}),instructions:v.instructions})},[e,M]),k=d.useCallback(async v=>(r==null?void 0:r.getMcpTools)===void 0?[]:r.getMcpTools({connectorId:v}),[r]),R=d.useCallback(async v=>{var g;return(g=r==null?void 0:r.getMcpConnector)==null?void 0:g.call(r,{connectorId:v})},[r]);if(!S||e===null||n&&!o.agentConfigOpen)return null;const Q=m.models.find(v=>v.name===e.model.name);return t.jsxs(t.Fragment,{children:[t.jsx(p,{spec:e,model:Q,models:m.models,modelsLoading:m.loading,modelsError:m.error,skills:m.skills,skillsAvailable:(c==null?void 0:c.skill.enabled)===!0,webSearchAvailable:((L=c==null?void 0:c.webSearch)==null?void 0:L.enabled)===!0,instructions:x,onOpenEditor:v=>{i&&C(v)},onChange:E,disabled:!i,onClose:n?w:void 0}),t.jsx(h,{editor:f,spec:e,models:m.models,connectors:m.connectors,skills:m.skills,loading:m.loading,error:m.error,skillsDisabled:(c==null?void 0:c.skill.enabled)!==!0,sandboxAvailable:(c==null?void 0:c.sandbox.enabled)===!0,instructions:x,onInstructionsSave:y,...(r==null?void 0:r.getMcpConnector)===void 0?{}:{loadMcpConnector:R},loadMcpTools:k,onRefreshConnectors:m.refreshConnectors,onChange:E,onClose:()=>C(null)})]})}export{At as A,kt as N,It as S,yt as T};
1
+ import{t as D,j as t,G as me,r as d,bF as fe,u as b,bG as A,bH as ge,bI as pe,bJ as he,bK as xe,bL as H,bM as J,d as ne,b0 as se,bN as B,bO as ve,bP as be,bQ as Ce,bR as Se,bS as je,bn as we,b1 as ye,p as oe,bT as ke,bU as X,bV as re,bW as ae,bX as Ie,ab as ie,q,bY as G,_ as T,bZ as $,a4 as Ae,b_ as Ee,b$ as Me,c0 as Ne,c1 as Re,c2 as P,E as Z,c3 as Te,c4 as Pe,c5 as De,c6 as Le,bw as Oe,a9 as le,c7 as _e,c8 as ce,c9 as Fe,ca as Be,bE as z,cb as Ue,cc as He,cd as ze,ce as Ve,b9 as We,w as qe,b as ue,b3 as Qe,cf as Ke,cg as Ge,ch as Ye,ci as Je,I as F,a3 as W,c as _,cj as Y,ck as Xe,k as $e,cl as Ze}from"./index-XxdJGcmf.js";function et(){var h;const{pending:n}=re(),e=_e(),[s,a]=d.useState({approvalId:null,index:0}),o=d.useRef(null),l=n.length,u=s.approvalId==null?-1:n.findIndex(f=>f.approvalId===s.approvalId),i=u>=0?u:l===0?0:Math.min(s.index,l-1),r=(h=n[i])==null?void 0:h.approvalId;d.useEffect(()=>{const f=r??null;s.approvalId===f&&s.index===i||a({approvalId:f,index:i})},[r,i,s.approvalId,s.index]),d.useEffect(()=>{if(r==null||e==null){r==null&&(o.current=null);return}o.current!==r&&(o.current=r,e.focus(r))},[r,e]);const c=d.useCallback(()=>{var C;const f=Math.max(0,i-1);a({approvalId:((C=n[f])==null?void 0:C.approvalId)??null,index:f})},[n,i]),m=d.useCallback(()=>{var C;const f=Math.min(Math.max(l-1,0),i+1);a({approvalId:((C=n[f])==null?void 0:C.approvalId)??null,index:f})},[l,n,i]),p=d.useCallback(()=>{r==null||e==null||e.focus(r)},[r,e]);return{count:l,index:i,canPrev:i>0,canNext:i<l-1,goPrev:c,goNext:m,focusCurrent:p}}function tt(){const n=b("ApprovalNavBanner"),{count:e,index:s,canPrev:a,canNext:o,goPrev:l,goNext:u,focusCurrent:i}=et();return e===0?null:t.jsx(n,{total:e,current:s+1,canPrev:a,canNext:o,onPrev:l,onNext:u,onFocusCurrent:i})}var O={radioValue:"",custom:""};function nt({disabled:n=!1}){const e=b("AskUserPrompt"),{pending:s,respond:a}=X(),o=q(),l=B(),u=s[0],i=d.useMemo(()=>u==null?[]:[{id:u.toolCallId,question:u.question??"Answer required",options:u.options??[]}],[u]),[r,c]=d.useState(0),[m,p]=d.useState({});d.useEffect(()=>{c(0),p({})},[u==null?void 0:u.toolCallId]);const h=Math.min(r,Math.max(i.length-1,0)),f=i[h],C=f==null?O:m[f.id]??O,S=d.useCallback(y=>{const k=m[y]??O;return k.radioValue===G?k.custom.trim():k.radioValue.trim()},[m]),x=d.useMemo(()=>i.every(y=>S(y.id)),[S,i]),j=C.radioValue===G?C.custom.trim():C.radioValue.trim(),w=l||n||f==null||j.length===0,I=w||!x,M=d.useCallback((y,k)=>{p(R=>({...R,[y]:{...R[y]??O,...k}}))},[]),E=d.useCallback(()=>{if(n||u==null||!x)return;const y=S(u.toolCallId);if(!y)return;const k=m[u.toolCallId]??O;o(T.AskUser.SUBMITTED,{tool_call_id:u.toolCallId,question_count:i.length,is_custom_option:k.radioValue===G}),a({toolCallId:u.toolCallId,content:y})},[x,m,n,S,u,i.length,a,o]);return u==null||f==null?null:t.jsx(e,{questions:i,readOnly:l||n,currentQuestion:f,currentQuestionIndex:h,currentAnswer:C,totalQuestions:i.length,isMultiQuestion:i.length>1,isLastQuestion:h===i.length-1,allQuestionsAnswered:x,isSubmitDisabled:w,isSubmitAllDisabled:I,onCurrentQuestionIndexChange:c,onCurrentAnswerChange:M,onSubmit:E})}function st(n){var a,o,l;const e=n.thread.messages,s=e[e.length-1];return(s==null?void 0:s.role)!=="assistant"||((a=s.status)==null?void 0:a.type)!=="requires-action"?!1:((l=(o=s.metadata)==null?void 0:o.custom)==null?void 0:l.pendingMcpAuth)===!0}function ot(){const n=A(st),{pending:e}=X(),{pending:s}=re(),a=ae();if(n)return{kind:"mcp"};const o=e[0];if(o!=null){const l=o.toolName;return l!=null&&(a==null?void 0:a[l])!=null?{kind:"custom",toolName:l}:{kind:"ask-user"}}return s.length>0?{kind:"approval"}:{kind:"compose"}}function rt({disabled:n=!1}){const e=ae(),{pending:s,respond:a}=X(),o=B(),l=s[0],u=d.useCallback(r=>{if(n||l==null)return;const c=r.trim();c&&a({toolCallId:l.toolCallId,content:c})},[n,l,a]);if(l==null||l.toolName==null)return null;const i=e==null?void 0:e[l.toolName];return i==null?null:t.jsx(i,{args:l.args??{},disabled:o||n,onSubmit:u})}function at({servers:n,onContinue:e,readOnly:s}){const a=b("McpAuthPrompt"),{handleAuthorize:o}=Oe(),{refreshConnectors:l}=le(),[u,i]=d.useState(()=>new Set),r=d.useRef(u),[c,m]=d.useState(!1),p=d.useRef(!1),h=d.useRef(0);d.useEffect(()=>()=>{h.current+=1},[]);const f=()=>{s||p.current||(p.current=!0,m(!0),e().catch(()=>{p.current=!1,m(!1)}))},C=S=>{const x=h.current;o(S,j=>{if(x!==h.current||!j)return;const w=new Set([...r.current,S]);r.current=w,i(w),l(),n.every(I=>w.has(I.id))&&f()})};return t.jsx(a,{servers:n,connectedServerIds:u,continueLoading:c,onConnect:C,onContinue:f,readOnly:s})}function it({disabled:n=!1}){const e=b("McpAuthPrompt"),{pending:s,resume:a}=Ie(),o=B(),l=ie();if(!s)return null;if(l){const i=JSON.stringify(s.mcpServers.map(r=>r.id));return t.jsx(at,{servers:s.mcpServers,onContinue:a,readOnly:o||n},i)}const u=i=>{const r=s.mcpServers.find(c=>c.id===i);r!=null&&r.authUrl&&window.open(r.authUrl,"_blank","noopener,noreferrer")};return t.jsx(e,{servers:s.mcpServers,onConnect:u,onContinue:()=>{n||a()},readOnly:o||n})}function lt(n){var s;const e=n.items;if(e.length>0){const a=[];let o=0;for(const l of Array.from(e)){if(l.kind!=="file")continue;const u=((s=l.webkitGetAsEntry)==null?void 0:s.call(l))??null;if((u==null?void 0:u.isDirectory)===!0){o+=1;continue}const i=l.getAsFile();i!=null&&a.push(i)}return{files:a,rejectedDirectoryCount:o}}return{files:Array.from(n.files),rejectedDirectoryCount:0}}function ct({disabled:n,hasText:e,hasAttachments:s,requiresModel:a,hasModel:o}){return!n&&(e||s)&&(!a||o)}function ee({placeholder:n,connectedToBanner:e=!1}){var L,v;const s=b("ComposerShell"),a=se(),o=D(),l=q(),u=A(g=>g.threadListItem.remoteId),i=A(g=>g.composer.text.trim().length>0),r=A(g=>g.composer.attachments.length),c=r>0,m=i||c,{agentSpec:p}=ce(),h=o==null||o.mode.status==="active"&&o.mode.isMutable,f=!!((v=(L=p==null?void 0:p.model)==null?void 0:L.name)!=null&&v.trim()),{isBusy:C,send:S,resetBusy:x}=Fe(),j=J(),w=Be(),I=oe(),M=d.useRef(null),E=!j,y=ct({disabled:E,hasText:i,hasAttachments:c,requiresModel:h,hasModel:f}),k=(o==null?void 0:o.mode.status)==="active"?{agentId:o.mode.agentId,agentName:o.mode.agentName}:{},R=()=>{var g;y&&(l(T.Message.SENT,z({has_text:i,has_attachments:c,attachment_count:r,requires_model:h,model:(g=p==null?void 0:p.model)==null?void 0:g.name},{sessionId:u,...k})),S(()=>a.composer().send()))},Q=g=>{g.key!=="Enter"||g.shiftKey||g.nativeEvent.isComposing||y&&(g.preventDefault(),R())};return t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:M,type:"file",multiple:!0,hidden:!0,onChange:g=>{const N=g.target.files;if(N){l(T.Attachment.PICKED,z({file_count:N.length},{sessionId:u,...k}));for(const U of N)a.composer().addAttachment(U).catch(K=>{I==null||I.showError(K)})}g.target.value=""}}),t.jsx(P.AttachmentDropzone,{disabled:E,"data-slot":"aui_composer-attachment-dropzone",className:"w-full rounded-[0.75rem] transition-[box-shadow] data-[dragging=true]:ring-focus-ring/20 data-[dragging=true]:ring-3",onDropCapture:g=>{if(E)return;const N=g.dataTransfer;if(N==null)return;const{files:U,rejectedDirectoryCount:K}=lt(N);K>0&&(I==null||I.showError(new Error("Folders cannot be attached. Attach individual files instead."))),U.length!==0&&l(T.Attachment.PICKED,z({file_count:U.length},{sessionId:u,...k}))},children:t.jsx(P.Root,{"data-slot":"aui_composer-root",className:"w-full",onSubmit:g=>{g.preventDefault(),R()},children:t.jsx(s,{className:e?"rounded-t-none border-t-0 focus-within:ring-0":void 0,attachments:t.jsx(Ue,{}),input:t.jsx(P.Input,{"data-slot":"aui_composer-input",placeholder:n,disabled:E,submitMode:"enter",onKeyDown:Q,"aria-label":"Message input",className:"text-text-primary placeholder:text-text-secondary/80 max-h-[10lh] min-h-10 w-full resize-none overflow-y-auto rounded-lg border-none bg-transparent px-1 py-1 text-base leading-normal shadow-none outline-none disabled:cursor-not-allowed"}),disabled:E,canSubmit:y,hasContent:m,isRunning:C,onSubmit:R,onCancel:j?()=>{l(T.Message.CANCELLED,z(void 0,{sessionId:u,...k})),x(),w()}:void 0,onAttach:j?()=>{var g;return(g=M.current)==null?void 0:g.click()}:void 0})})})]})}function V({placeholder:n,connectedToBanner:e=!1}){const s=D(),a=b("ComposerLeftSection"),o=b("ComposerRightSection"),l=$("ComposerLeftSection"),u=$("ComposerRightSection"),i=b("DraftComposerLeftSection"),r=b("DraftComposerRightSection");return(s==null?void 0:s.mode.status)==="active"&&s.mode.isMutable?t.jsx(Ae,{children:t.jsx(Ee,{overrides:{ComposerLeftSection:l?i:a,ComposerRightSection:u?r:o},children:t.jsx(ee,{placeholder:n,connectedToBanner:e})})}):t.jsx(ee,{placeholder:n,connectedToBanner:e})}function ut({placeholder:n="Ask anything... (Shift+Enter for new line)"}){const e=ot(),s=J(),a=e.kind==="mcp"?t.jsx(it,{disabled:!s}):e.kind==="custom"?t.jsx(rt,{disabled:!s}):e.kind==="ask-user"?t.jsx(nt,{disabled:!s}):e.kind==="approval"?t.jsx(tt,{}):null;return a==null?t.jsx(V,{placeholder:n}):e.kind==="approval"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx(V,{placeholder:n,connectedToBanner:!0})]}):e.kind==="mcp"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"relative flex w-full flex-col",children:[t.jsx("div",{className:"pb-2",children:a}),t.jsx("div",{className:"relative z-10 -mt-3",children:t.jsx(V,{placeholder:n})})]}):t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx("div",{className:"relative z-10 -mt-1",children:t.jsx(V,{placeholder:n})})]})}var dt=200,te='[data-slot="aui_thread-viewport"]';function mt(){const n=b("HistoryLoader"),{hasOlderHistory:e,isLoadingOlderHistory:s,loadOlderHistory:a}=ve(),[o,l]=d.useState(null),u=d.useRef(!1),i=d.useCallback(async()=>{if(u.current)return;u.current=!0;const r=(o==null?void 0:o.closest(te))??null,c=(r==null?void 0:r.scrollHeight)??0,m=(r==null?void 0:r.scrollTop)??0;try{await a(),requestAnimationFrame(()=>{if(r==null)return;const p=r.scrollHeight-c;p>0&&r.scrollTo({top:m+p,behavior:"instant"})})}catch{}finally{u.current=!1}},[o,a]);return d.useEffect(()=>{if(o==null||!e)return;const r=o.closest(te),c=new IntersectionObserver(m=>{m.some(p=>p.isIntersecting)&&i()},{root:r,rootMargin:`${dt}px 0px 0px 0px`});return c.observe(o),()=>c.disconnect()},[o,e,i]),e?t.jsx(n,{ref:l,isLoading:s}):null}function ft(){const n=b("ResumeUnavailable");return Se()?t.jsx(n,{}):null}function gt(){return A(e=>{var s;return(((s=e.message.attachments)==null?void 0:s.length)??0)>0})?t.jsx("div",{className:"pointer-events-none mb-2 opacity-90",children:t.jsx(He,{})}):null}function pt(){const n=b("UserMessageEdit"),e=b("MessageTimestamp"),s=B(),a=J(),o=A(r=>r.message.createdAt),{cancel:l,disabled:u}=Me(),{disabled:i}=Ne();return t.jsx(Re.Root,{"data-role":"user",children:t.jsx(P.Root,{"data-slot":"aui_user-edit-composer-root",className:"fade-in slide-in-from-bottom-1 animate-in flex w-full justify-end px-2 duration-150",children:t.jsx(n,{timestamp:t.jsx(e,{createdAt:o}),attachments:t.jsx(gt,{}),input:t.jsx("div",{className:"mt-1 rounded border border-border bg-secondary-bg p-2 text-text-primary",children:t.jsx(P.Input,{"data-slot":"aui_user-edit-input",disabled:s||!a,submitMode:"enter","aria-label":"Edit message",className:"max-h-32 min-h-10 w-full resize-none border-none bg-transparent p-0 text-base leading-[1.34] outline-none focus:shadow-none"})}),footer:t.jsxs("div",{className:"flex items-center justify-end gap-2",children:[t.jsx(Z.Secondary,{type:"button",disabled:u,onClick:l,children:"Cancel"}),t.jsx(P.Send,{asChild:!0,children:t.jsx(Z.Primary,{type:"submit",disabled:i||s||!a,children:"Save & Rerun"})})]})})})})}function ht(){const n=ne(),e=se(),s=A(i=>i.threadListItem.remoteId),a=A(i=>i.threadListItem.title),o=B(),l=d.useRef(!1),u=d.useRef(void 0);d.useEffect(()=>{u.current=void 0},[s]),d.useEffect(()=>{const i=l.current&&!o;if(l.current=o,!i||n==null||s==null||u.current===s)return;if(a!=null&&a.trim()!==""){u.current=s;return}let r=!1;return n.getSession({sessionId:s}).then(c=>{if(r)return;const m=typeof c.title=="string"?c.title.trim():"";if(m.length!==0)return u.current=s,e.threadListItem().rename(m)}).catch(()=>{}),()=>{r=!0}},[e,o,s,n,a])}var de="trueforge.file-preview-width";function xt(){try{const n=sessionStorage.getItem(de);if(n==null)return null;const e=Number(n);return Number.isFinite(e)?e:null}catch{return null}}function vt(n){try{sessionStorage.setItem(de,String(Math.round(n)))}catch{}}function bt(){const n=je(),e=b("FilePreviewPanel"),s=we(),a=ye(),o=oe(),[l,u]=d.useState(0),[i,r]=d.useState(!1),[c,m]=d.useState(xt),p=ke(n.target,l),h=n.target,f=n.presentation==="full"?"full":s||a?"overlay":"side";if(d.useLayoutEffect(()=>{var w;if(h==null||f!=="side")return;const x=((w=document.querySelector('[data-slot="aui_file-preview-row"]'))==null?void 0:w.getBoundingClientRect().width)??0;if(x<=0)return;const j=c==null?Te(x):Pe({requested:c,rowWidth:x});(c==null||Math.abs(j-c)>1)&&m(j)},[f,h,c]),h==null)return null;const C=p.view.status==="error",S=()=>{i||(r(!0),(async()=>{try{const x=p.blob??await h.load();De(x,Le(h.path))}catch(x){o!=null?o.showError(x):console.error("Failed to download sandbox file",x)}finally{r(!1)}})())};return t.jsx(e,{name:h.name,placement:f,view:p.view,onClose:n.close,onDownload:S,onEnterFullPage:()=>n.setPresentation("full"),onExitFullPage:()=>n.setPresentation("panel"),downloadBusy:i,...f==="side"&&c!=null?{widthPx:c}:{},...f==="side"?{onWidthChange:x=>{m(x),vt(x)}}:{},...C?{onRetry:()=>u(x=>x+1)}:{}})}function Ct({children:n}){return t.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-1 fill-mode-both duration-200",children:n})}function St({isEditing:n}){return A(s=>s.message.role)==="user"?n?t.jsx(pt,{}):t.jsx(be,{}):t.jsx(Ce,{})}function jt({composer:n}){d.useEffect(()=>{fe()},[]),ht();const e=D(),s=b("WelcomeScreen"),a=b("MessageListSkeleton"),o=b("ScrollToBottomButton"),l=b("MessageGroup"),u=b("ThreadComposerAreaShell"),i=b("ThreadRootShell"),r=b("ThreadViewportShell"),c=A(ge),m=A(h=>h.thread.isLoading),p=(e==null?void 0:e.mode.status)==="active"?e.mode.agentName!=null&&e.mode.agentName.length>0?e.mode.agentName:e.mode.isMutable&&e.mode.isCreateAgent?"Start building a new Agent":void 0:void 0;return t.jsx(pe,{children:t.jsx(he,{children:t.jsx(xe,{children:t.jsx(H.Root,{asChild:!0,children:t.jsx(i,{children:t.jsxs("div",{"data-slot":"aui_file-preview-row",className:"relative flex min-h-0 w-full min-w-0 flex-1",children:[t.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[t.jsx(H.Viewport,{asChild:!0,autoScroll:!0,children:t.jsxs(r,{isEmpty:c,children:[c&&t.jsx(s,{heading:p}),c&&!m&&n,m?t.jsx(a,{}):!c&&t.jsxs(t.Fragment,{children:[t.jsx(mt,{}),t.jsxs(l,{children:[t.jsx(H.Messages,{children:({message:h})=>t.jsx(Ct,{children:t.jsx(St,{isEditing:h.role==="user"&&h.composer.isEditing})})}),t.jsx(ft,{})]})]})]})}),!m&&!c&&t.jsxs(u,{isEmpty:c,children:[t.jsx(H.ScrollToBottom,{asChild:!0,children:t.jsx(o,{})}),n]})]}),t.jsx(bt,{})]})})})})})})}function yt(){const n=D();return(n==null?void 0:n.sessionAccessError)!=null?t.jsx(me,{title:"Unable to load session",description:n.sessionAccessError,className:"bg-primary-bg"}):t.jsx(jt,{composer:t.jsx(ut,{})})}function kt({className:n}){var r;const e=D(),s=q(),a=Xe(),o=A(c=>c.threadListItem.title);if(a===null)return null;const l=(o==null?void 0:o.trim())??"",u=a.allowThreadTitle&&l.length>0?l:a.name,i=(e==null?void 0:e.isLibraryEnabled)===!0&&((r=e.historyAgentFilter)==null?void 0:r.intent)==="try-agent";return t.jsxs("h1",{className:_("flex min-w-0 items-center gap-1.5",Ze,n),children:[i?t.jsx("button",{type:"button","aria-label":"Back to all agents",title:"Back to all agents",className:W({variant:"ghost",size:"icon",className:"text-text-secondary"}),onClick:()=>{s(T.Library.OPENED),e==null||e.setLibraryOpen(!0)},children:t.jsx(F,{name:"arrow-left"})}):null,t.jsx("span",{className:"truncate",title:u,children:u}),a.isEditing?t.jsx($e,{content:"Try changes here, then choose Update agent to save.",side:"bottom",children:t.jsxs("span",{className:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[t.jsx(F,{name:"pencil",className:"size-3"}),"Editing"]})}):null]})}function It({className:n,labeled:e=!1,onAction:s}){const a=D(),o=q(),l=ie(),u=ue(),{mode:i,setTheme:r}=Ye(),c=b("ShellActionsActionSlot"),m=i==="dark",p=m?"Light":"Dark",h=Je({catalog:l,capabilities:u}),f="hover:bg-secondary-button-hover hover:text-ghost-button-text";return t.jsxs("div",{className:_("flex shrink-0 items-center gap-1",e?"w-full flex-col items-center gap-1 text-sidebar-text":"text-text-primary",n),children:[t.jsxs("a",{href:"https://trueforge.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",title:"Documentation",className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y)}),onClick:()=>s==null?void 0:s(),children:[t.jsx(F,{name:"book-open",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Docs"}):null]}),t.jsxs("button",{type:"button","aria-label":m?"Switch to light theme":"Switch to dark theme",title:m?"Light theme":"Dark theme",className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y)}),onClick:()=>{r(m?"light":"dark"),s==null||s()},children:[t.jsx(F,{name:m?"sun":"moon",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:p}):null]}),a!=null&&h?t.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings","aria-expanded":a.settingsOpen,"aria-current":a.settingsOpen?"page":void 0,className:W({variant:"ghost",size:e?void 0:"icon",className:_(f,e&&Y,a.settingsOpen&&"bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text")}),onClick:()=>{a.settingsOpen||o(T.Settings.OPENED),a.setSettingsOpen(!0),s==null||s()},children:[t.jsx(F,{name:"settings",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Settings"}):null]}):null,t.jsx(c,{})]})}function At({showClose:n=!1}){var L;const{agentSpec:e}=ce(),s=ze(),a=Ve(),o=We(),l=o.mode.status==="active"?o.mode.agentId:void 0,{allows:u}=qe({resourceType:"agent",resourceIds:l==null?[]:[l]}),i=u(l,"MANAGE"),r=ne(),c=ue(),m=le(),p=b("AgentConfigPanel"),h=b("AgentConfigEditors"),[f,C]=d.useState(null),S=Qe(o.mode),{draft:x,flush:j}=Ke(),w=d.useCallback(()=>{j(),a(),o.setAgentConfigOpen(!1)},[a,j,o]);d.useEffect(()=>{S&&m.ensureLoaded()},[m,S]),d.useEffect(()=>{i||C(null)},[i]),d.useEffect(()=>{if(!n||!o.agentConfigOpen)return;const v=g=>{!g.defaultPrevented&&g.key==="Escape"&&f===null&&document.querySelector("dialog[open]")===null&&w()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[w,f,o.agentConfigOpen,n]);const I=d.useRef({flushAgentSpec:a,flushInstructions:j});I.current={flushAgentSpec:a,flushInstructions:j},d.useEffect(()=>()=>{const{flushAgentSpec:v,flushInstructions:g}=I.current;g();try{v()}catch{}},[]);const M=d.useCallback(({next:v,instructions:g})=>{var N;if(i){if(v.skills&&v.skills.length>0&&(c==null?void 0:c.sandbox.enabled)===!0){s==null||s({...v,instructions:g||void 0,config:{...v.config,sandbox:{...(N=v.config)==null?void 0:N.sandbox,enabled:!0}}});return}s==null||s({...v,instructions:g||void 0})}},[i,c==null?void 0:c.sandbox.enabled,s]),E=d.useCallback(v=>{M({next:v,instructions:x})},[M,x]),y=d.useCallback(v=>{e!==null&&M({next:Ge({spec:e,messages:v.messages}),instructions:v.instructions})},[e,M]),k=d.useCallback(async v=>(r==null?void 0:r.getMcpTools)===void 0?[]:r.getMcpTools({connectorId:v}),[r]),R=d.useCallback(async v=>{var g;return(g=r==null?void 0:r.getMcpConnector)==null?void 0:g.call(r,{connectorId:v})},[r]);if(!S||e===null||n&&!o.agentConfigOpen)return null;const Q=m.models.find(v=>v.name===e.model.name);return t.jsxs(t.Fragment,{children:[t.jsx(p,{spec:e,model:Q,models:m.models,modelsLoading:m.loading,modelsError:m.error,skills:m.skills,skillsAvailable:(c==null?void 0:c.skill.enabled)===!0,webSearchAvailable:((L=c==null?void 0:c.webSearch)==null?void 0:L.enabled)===!0,instructions:x,onOpenEditor:v=>{i&&C(v)},onChange:E,disabled:!i,onClose:n?w:void 0}),t.jsx(h,{editor:f,spec:e,models:m.models,connectors:m.connectors,skills:m.skills,loading:m.loading,error:m.error,skillsDisabled:(c==null?void 0:c.skill.enabled)!==!0,sandboxAvailable:(c==null?void 0:c.sandbox.enabled)===!0,instructions:x,onInstructionsSave:y,...(r==null?void 0:r.getMcpConnector)===void 0?{}:{loadMcpConnector:R},loadMcpTools:k,onRefreshConnectors:m.refreshConnectors,onChange:E,onClose:()=>C(null)})]})}export{At as A,kt as N,It as S,yt as T};
@@ -1 +1 @@
1
- import{al as o,j as t,c as s}from"./index-o2o-gWoN.js";var u={default:"border-border bg-card-bg text-text-primary",success:"border-success-bg/30 bg-success-bg/10 text-success-bg",info:"border-primary-button-bg/30 bg-primary-button-bg/10 text-primary-button-bg",warning:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg",destructive:"border-failure-bg/30 bg-failure-bg/10 text-failure-bg",outline:"border-border bg-transparent text-text-secondary"},l={default:"bg-text-secondary",success:"bg-success-bg",info:"bg-primary-button-bg",warning:"bg-warning-bg",destructive:"bg-failure-bg",outline:"bg-text-secondary"},c={rounded:"rounded-sm",pill:"rounded-full"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-xs"},m=o.forwardRef(({className:n,variant:e="default",shape:r="rounded",size:a="sm",dot:b=!1,children:d,...g},i)=>t.jsxs("span",{ref:i,"data-slot":"badge","data-variant":e,"data-shape":r,"data-size":a,className:s("inline-flex items-center gap-1.5 border font-medium leading-normal",u[e],c[r],x[a],n),...g,children:[b?t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",l[e]),"aria-hidden":!0}):null,d]}));m.displayName="Badge";export{m as B};
1
+ import{al as o,j as t,c as s}from"./index-XxdJGcmf.js";var u={default:"border-border bg-card-bg text-text-primary",success:"border-success-bg/30 bg-success-bg/10 text-success-bg",info:"border-primary-button-bg/30 bg-primary-button-bg/10 text-primary-button-bg",warning:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg",destructive:"border-failure-bg/30 bg-failure-bg/10 text-failure-bg",outline:"border-border bg-transparent text-text-secondary"},l={default:"bg-text-secondary",success:"bg-success-bg",info:"bg-primary-button-bg",warning:"bg-warning-bg",destructive:"bg-failure-bg",outline:"bg-text-secondary"},c={rounded:"rounded-sm",pill:"rounded-full"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-xs"},m=o.forwardRef(({className:n,variant:e="default",shape:r="rounded",size:a="sm",dot:b=!1,children:d,...g},i)=>t.jsxs("span",{ref:i,"data-slot":"badge","data-variant":e,"data-shape":r,"data-size":a,className:s("inline-flex items-center gap-1.5 border font-medium leading-normal",u[e],c[r],x[a],n),...g,children:[b?t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",l[e]),"aria-hidden":!0}):null,d]}));m.displayName="Badge";export{m as B};
@@ -1,4 +1,4 @@
1
- import{r as i}from"./index-o2o-gWoN.js";/**
1
+ import{r as i}from"./index-XxdJGcmf.js";/**
2
2
  * react-router v7.18.4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -1 +1 @@
1
- import{j as e,R as m,U as u,V as h,W as j,X as p,E as n}from"./index-o2o-gWoN.js";function g(a){return a.replace(/\?$/,"").replace(/^Remove /i,"Can't remove ")}var f=({title:a,description:o,confirmLabel:c="Remove",busy:i=!1,error:l=null,onCancel:t,onConfirm:d})=>{const s=l!=null&&l!=="",r=s?g(a):a;return e.jsxs(m,{open:!0,onOpenChange:x=>{x||t()},"aria-label":r,className:"max-w-md",children:[e.jsx(u,{children:e.jsxs(h,{children:[e.jsx(j,{children:r}),s?e.jsx("p",{role:"alert",className:"text-sm text-failure-bg",children:l}):e.jsx("p",{className:"text-sm text-text-secondary",children:o})]})}),e.jsx(p,{children:s?e.jsx(n.Secondary,{type:"button",onClick:t,children:"Close"}):e.jsxs(e.Fragment,{children:[e.jsx(n.Secondary,{type:"button",disabled:i,onClick:t,children:"Cancel"}),e.jsx(n.Destructive,{type:"button",disabled:i,onClick:d,children:c})]})})]})},C=f;export{C};
1
+ import{j as e,R as m,U as u,V as h,W as j,X as p,E as n}from"./index-XxdJGcmf.js";function g(a){return a.replace(/\?$/,"").replace(/^Remove /i,"Can't remove ")}var f=({title:a,description:o,confirmLabel:c="Remove",busy:i=!1,error:l=null,onCancel:t,onConfirm:d})=>{const s=l!=null&&l!=="",r=s?g(a):a;return e.jsxs(m,{open:!0,onOpenChange:x=>{x||t()},"aria-label":r,className:"max-w-md",children:[e.jsx(u,{children:e.jsxs(h,{children:[e.jsx(j,{children:r}),s?e.jsx("p",{role:"alert",className:"text-sm text-failure-bg",children:l}):e.jsx("p",{className:"text-sm text-text-secondary",children:o})]})}),e.jsx(p,{children:s?e.jsx(n.Secondary,{type:"button",onClick:t,children:"Close"}):e.jsxs(e.Fragment,{children:[e.jsx(n.Secondary,{type:"button",disabled:i,onClick:t,children:"Cancel"}),e.jsx(n.Destructive,{type:"button",disabled:i,onClick:d,children:c})]})})]})},C=f;export{C};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SettingsBuilder-QM224JED-Bp00qPG0.js","./index-o2o-gWoN.js","./index-B01pXqvC.css","./SchedulesPage-25JKAP5G-DRHxlR8X.js","./chunk-P2W5VLGK-B6YzGXAg.js","./EnvironmentsPage-5SEQP4QD-BxOU9R1E.js"])))=>i.map(i=>d[i]);
2
- import{b0 as _,t as B,u as t,b2 as L,r as a,j as s,b4 as c,P as z,I as l,a3 as d,c as I,b6 as u}from"./index-o2o-gWoN.js";import{N as T,T as k,S as D,A as R}from"./chunk-HDD5IS3M-C0hVH4Fk.js";var V=a.lazy(()=>u(()=>import("./SettingsBuilder-QM224JED-Bp00qPG0.js"),__vite__mapDeps([0,1,2]),import.meta.url)),F=a.lazy(()=>u(()=>import("./SchedulesPage-25JKAP5G-DRHxlR8X.js"),__vite__mapDeps([3,4,1,2]),import.meta.url).then(n=>({default:n.SchedulesPage}))),H=a.lazy(()=>u(()=>import("./EnvironmentsPage-5SEQP4QD-BxOU9R1E.js"),__vite__mapDeps([5,4,1,2]),import.meta.url).then(n=>({default:n.EnvironmentsPage})));function M({className:n,threadHeaderEnd:j}){const r=_(),e=B(),f=t("ClearChatButton"),g=t("ResetAgentBuilderButton"),b=t("AgentDetailsPage"),v=t("AgentsLibrary"),h=t("SessionsPage"),N=t("ShareChatButton"),y=t("SaveAgentButton"),A=t("SelectAgentEmptyState"),S=t("UserAvatar"),i=(e==null?void 0:e.mode.status)==="idle",C=(e==null?void 0:e.settingsOpen)===!0,o=(e==null?void 0:e.libraryOpen)===!0,O=(e==null?void 0:e.sessionsOpen)===!0,m=(e==null?void 0:e.schedulesOpen)===!0,x=(e==null?void 0:e.environmentsOpen)===!0,w=L(),p=(e==null?void 0:e.isNewChatEnabled)!==!1;a.useEffect(()=>{i||Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},[r,i]);const E=()=>{if(e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled){e.openDraft();return}e==null||e.setSettingsOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1),Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},P=()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled&&e.openAgentBuilder()};return s.jsxs("div",{className:I("relative flex h-full min-h-0 flex-col",n),children:[C?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(V,{})})}):O?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(h,{})}):o&&(e==null?void 0:e.libraryAgentId)!=null?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(b,{agentId:e.libraryAgentId},e.libraryAgentId)}):o?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(v,{})}):m?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(F,{})})}):x?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(H,{})})}):s.jsxs(s.Fragment,{children:[s.jsx(z,{start:s.jsxs(s.Fragment,{children:[p&&!w?s.jsx("button",{type:"button","aria-label":"New Chat",title:"New Chat",className:d({variant:"ghost",size:"icon"}),onClick:E,children:s.jsx(l,{name:"square-pen"})}):null,p&&(e!=null&&e.isComposerEnabled)?s.jsx("button",{type:"button","aria-label":"New Agent",title:"New Agent",className:d({variant:"ghost",size:"icon"}),onClick:P,children:s.jsx(l,{name:"agent-2"})}):null]}),title:s.jsx(T,{}),end:s.jsxs(s.Fragment,{children:[s.jsx(g,{}),s.jsx(N,{}),s.jsx(f,{}),s.jsx(y,{}),j]})}),s.jsx("div",{className:"min-h-0 flex-1",children:i?s.jsx(A,{}):s.jsx(k,{})})]}),s.jsxs("footer",{className:"flex shrink-0 items-center justify-between border-t border-border px-2 py-1.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[o||m||x?s.jsxs("button",{type:"button",className:d({variant:"ghost",size:"small"}),onClick:()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1)},children:[s.jsx(l,{name:"arrow-left"}),"Back to chat"]}):null,s.jsx(S,{})]}),s.jsx(D,{},"shell-actions")]}),e!=null&&e.agentConfigOpen?s.jsx("aside",{role:"dialog","aria-label":"Agent Config",className:"absolute inset-0 z-20 border-l border-border shadow-xl",children:s.jsx(R,{showClose:!0})}):null]})}export{M as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SettingsBuilder-OZXAOONL-CyzTTdG8.js","./index-XxdJGcmf.js","./index-B01pXqvC.css","./SchedulesPage-VJNU6YI5-OWT2uCNM.js","./chunk-MIQXDKJG-BtWJhfOl.js","./EnvironmentsPage-YG7ABMNR-M8zUxZyU.js"])))=>i.map(i=>d[i]);
2
+ import{b0 as _,t as B,u as t,b2 as L,r as a,j as s,b4 as c,P as z,I as l,a3 as d,c as I,b6 as u}from"./index-XxdJGcmf.js";import{N as T,T as k,S as D,A as R}from"./chunk-F2MZYGMM-BfR2olRW.js";var V=a.lazy(()=>u(()=>import("./SettingsBuilder-OZXAOONL-CyzTTdG8.js"),__vite__mapDeps([0,1,2]),import.meta.url)),F=a.lazy(()=>u(()=>import("./SchedulesPage-VJNU6YI5-OWT2uCNM.js"),__vite__mapDeps([3,4,1,2]),import.meta.url).then(n=>({default:n.SchedulesPage}))),H=a.lazy(()=>u(()=>import("./EnvironmentsPage-YG7ABMNR-M8zUxZyU.js"),__vite__mapDeps([5,4,1,2]),import.meta.url).then(n=>({default:n.EnvironmentsPage})));function M({className:n,threadHeaderEnd:j}){const r=_(),e=B(),f=t("ClearChatButton"),g=t("ResetAgentBuilderButton"),b=t("AgentDetailsPage"),v=t("AgentsLibrary"),h=t("SessionsPage"),N=t("ShareChatButton"),y=t("SaveAgentButton"),A=t("SelectAgentEmptyState"),S=t("UserAvatar"),i=(e==null?void 0:e.mode.status)==="idle",C=(e==null?void 0:e.settingsOpen)===!0,o=(e==null?void 0:e.libraryOpen)===!0,O=(e==null?void 0:e.sessionsOpen)===!0,m=(e==null?void 0:e.schedulesOpen)===!0,x=(e==null?void 0:e.environmentsOpen)===!0,w=L(),p=(e==null?void 0:e.isNewChatEnabled)!==!1;a.useEffect(()=>{i||Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},[r,i]);const E=()=>{if(e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled){e.openDraft();return}e==null||e.setSettingsOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1),Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},P=()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled&&e.openAgentBuilder()};return s.jsxs("div",{className:I("relative flex h-full min-h-0 flex-col",n),children:[C?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(V,{})})}):O?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(h,{})}):o&&(e==null?void 0:e.libraryAgentId)!=null?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(b,{agentId:e.libraryAgentId},e.libraryAgentId)}):o?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(v,{})}):m?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(F,{})})}):x?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(H,{})})}):s.jsxs(s.Fragment,{children:[s.jsx(z,{start:s.jsxs(s.Fragment,{children:[p&&!w?s.jsx("button",{type:"button","aria-label":"New Chat",title:"New Chat",className:d({variant:"ghost",size:"icon"}),onClick:E,children:s.jsx(l,{name:"square-pen"})}):null,p&&(e!=null&&e.isComposerEnabled)?s.jsx("button",{type:"button","aria-label":"New Agent",title:"New Agent",className:d({variant:"ghost",size:"icon"}),onClick:P,children:s.jsx(l,{name:"agent-2"})}):null]}),title:s.jsx(T,{}),end:s.jsxs(s.Fragment,{children:[s.jsx(g,{}),s.jsx(N,{}),s.jsx(f,{}),s.jsx(y,{}),j]})}),s.jsx("div",{className:"min-h-0 flex-1",children:i?s.jsx(A,{}):s.jsx(k,{})})]}),s.jsxs("footer",{className:"flex shrink-0 items-center justify-between border-t border-border px-2 py-1.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[o||m||x?s.jsxs("button",{type:"button",className:d({variant:"ghost",size:"small"}),onClick:()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1)},children:[s.jsx(l,{name:"arrow-left"}),"Back to chat"]}):null,s.jsx(S,{})]}),s.jsx(D,{},"shell-actions")]}),e!=null&&e.agentConfigOpen?s.jsx("aside",{role:"dialog","aria-label":"Agent Config",className:"absolute inset-0 z-20 border-l border-border shadow-xl",children:s.jsx(R,{showClose:!0})}):null]})}export{M as S};
@@ -1 +1 @@
1
- import{c as h}from"./workers-CZgJz51Q.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as C}from"./lspLanguageFeatures-C5NNjmui.js";import{h as U,i as y,j as T,t as x,k as O}from"./lspLanguageFeatures-C5NNjmui.js";import{l as s}from"./index-DdpoXKyE.js";import"./index-o2o-gWoN.js";const I=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-CH7Os8C2.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new C(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,U as DocumentLinkAdapter,C as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,y as fromPosition,T as fromRange,E as setupMode,x as toRange,O as toTextEdit};
1
+ import{c as h}from"./workers-BqLxuuyo.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as C}from"./lspLanguageFeatures-DxPkeHqy.js";import{h as U,i as y,j as T,t as x,k as O}from"./lspLanguageFeatures-DxPkeHqy.js";import{l as s}from"./index-DXPcBx6s.js";import"./index-XxdJGcmf.js";const I=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-CH7Os8C2.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new C(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,U as DocumentLinkAdapter,C as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,y as fromPosition,T as fromRange,E as setupMode,x as toRange,O as toTextEdit};
@@ -1,3 +1,3 @@
1
- import{l as c}from"./index-DdpoXKyE.js";import"./index-o2o-gWoN.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
1
+ import{l as c}from"./index-DXPcBx6s.js";import"./index-XxdJGcmf.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
2
2
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:`
3
3
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/&lt;=|&gt;=|\\lte|\\lt|&lt;|\\gte|\\gt|&gt;|&amp;&amp;|\\and|-&gt;|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","-&gt;"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,k)},E={conf:l(r),language:_(r,p)},B={conf:l(a),language:_(a,p)},D={conf:g(),language:A(k)},C={conf:g(),language:A(p)};export{E as TagAngleInterpolationBracket,x as TagAngleInterpolationDollar,C as TagAutoInterpolationBracket,D as TagAutoInterpolationDollar,B as TagBracketInterpolationBracket,$ as TagBracketInterpolationDollar};
@@ -1 +1 @@
1
- import{l as e}from"./index-DdpoXKyE.js";import"./index-o2o-gWoN.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{m as conf,r as language};
1
+ import{l as e}from"./index-DXPcBx6s.js";import"./index-XxdJGcmf.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{m as conf,r as language};
@@ -1 +1 @@
1
- import{l as e}from"./index-DdpoXKyE.js";import"./index-o2o-gWoN.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};
1
+ import{l as e}from"./index-DXPcBx6s.js";import"./index-XxdJGcmf.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};
@@ -1 +1 @@
1
- import{c as D}from"./workers-CZgJz51Q.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as f,C as R}from"./lspLanguageFeatures-C5NNjmui.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-C5NNjmui.js";import{l as t}from"./index-DdpoXKyE.js";import"./index-o2o-gWoN.js";const I=120*1e3;class _{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL(""+new URL("html.worker-DTgyLzoY.js",import.meta.url).href,import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function W(i){const n=new _(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new f(e)))}function F(i){const n=[],e=[],r=new _(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new f(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,f as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,_ as WorkerManager,x as fromPosition,M as fromRange,F as setupMode,W as setupMode1,j as toRange,O as toTextEdit};
1
+ import{c as D}from"./workers-BqLxuuyo.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as f,C as R}from"./lspLanguageFeatures-DxPkeHqy.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-DxPkeHqy.js";import{l as t}from"./index-DXPcBx6s.js";import"./index-XxdJGcmf.js";const I=120*1e3;class _{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL(""+new URL("html.worker-DTgyLzoY.js",import.meta.url).href,import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function W(i){const n=new _(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new f(e)))}function F(i){const n=[],e=[],r=new _(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new f(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,f as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,_ as WorkerManager,x as fromPosition,M as fromRange,F as setupMode,W as setupMode1,j as toRange,O as toTextEdit};