hermes-web-ui 0.6.40 → 0.6.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/js/{AppSidebar-CaSVcbCW.js → AppSidebar-CNkSiv3l.js} +1 -1
- package/dist/client/assets/js/{ChannelsView-hdAXa1hf.js → ChannelsView-6rEo6RBl.js} +1 -1
- package/dist/client/assets/js/{ChatPanel-C6sX6idm.js → ChatPanel-ANAZWluc.js} +3 -3
- package/dist/client/assets/js/{ChatView-B68k_-D9.js → ChatView-DFcPsmRF.js} +1 -1
- package/dist/client/assets/js/{CodingAgentsView-CsIjwbXR.js → CodingAgentsView-CpIY0SHT.js} +1 -1
- package/dist/client/assets/js/{DefaultCredentialPrompt-BRhb4DOa.js → DefaultCredentialPrompt-DmNeotSW.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserPanel-BlBfS64w.js → DesktopBrowserPanel-CWjTU-3y.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserView-JukL0QuS.js → DesktopBrowserView-D9Qb3fIV.js} +1 -1
- package/dist/client/assets/js/{DesktopPetView-DWq4EiRU.js → DesktopPetView-B7REtC57.js} +1 -1
- package/dist/client/assets/js/{DesktopTitleBar-DphP4oa6.js → DesktopTitleBar-Dej_16hB.js} +1 -1
- package/dist/client/assets/js/{DevicesView-BFtrfqJs.js → DevicesView--d4HCkch.js} +1 -1
- package/dist/client/assets/js/{DocxFilePreview-CmVJ9Jxx.js → DocxFilePreview-BQz6WC7r.js} +2 -2
- package/dist/client/assets/js/{FileEditor-CdkNYp7b.js → FileEditor-BBegs-5i.js} +2 -2
- package/dist/client/assets/js/{FilePreview-CJrVRPRs.js → FilePreview-B7WqYvZs.js} +2 -2
- package/dist/client/assets/js/{FileRenameModal-mghyEXU4.js → FileRenameModal-82RkAZkd.js} +1 -1
- package/dist/client/assets/js/{FilesPanel-B9cKB5lX.js → FilesPanel-BHcg6CpC.js} +2 -2
- package/dist/client/assets/js/{FilesView-iKZu70E9.js → FilesView-Dl15WTar.js} +2 -2
- package/dist/client/assets/js/{GlobalAgentView-JZsss0gx.js → GlobalAgentView-dxEX611f.js} +1 -1
- package/dist/client/assets/js/{GlobalPendingActions-BRQIt5vl.js → GlobalPendingActions-CeK96C3G.js} +1 -1
- package/dist/client/assets/js/{GroupChatLinkView-CNrV8lnT.js → GroupChatLinkView-CJhI9DVE.js} +1 -1
- package/dist/client/assets/js/{GroupChatPanel-WK4zBasl.js → GroupChatPanel-CLa3s08V.js} +3 -3
- package/dist/client/assets/js/{GroupChatView-BlMUD1MW.js → GroupChatView-CUwvu-6F.js} +1 -1
- package/dist/client/assets/js/{HistoryMessageList-D8zoQ1Zs.js → HistoryMessageList-BdD8GJYM.js} +1 -1
- package/dist/client/assets/js/{HistoryView-Bpr8N2lC.js → HistoryView-Ro92tP5R.js} +1 -1
- package/dist/client/assets/js/{HtmlFilePreview-Bj3_-hMo.js → HtmlFilePreview-xYn7YtmC.js} +1 -1
- package/dist/client/assets/js/{JobsView-CZK26gTw.js → JobsView-BaNA1Yaa.js} +2 -2
- package/dist/client/assets/js/{JourneyView-BPUsLj4o.js → JourneyView-Bw-05mCF.js} +1 -1
- package/dist/client/assets/js/{KanbanView-B7d-2_z9.js → KanbanView-BYC32l2Q.js} +1 -1
- package/dist/client/assets/js/{LoginView-BpYyv831.js → LoginView-KrpCkwOr.js} +1 -1
- package/dist/client/assets/js/{LogsView-CabFHk0v.js → LogsView-Dgm4v5sN.js} +1 -1
- package/dist/client/assets/js/{MarkdownRenderer-CVtmHZwc.js → MarkdownRenderer-BIPowjr-.js} +3 -3
- package/dist/client/assets/js/{McpManagerView-C-ou8vf3.js → McpManagerView-DTtkUIvq.js} +1 -1
- package/dist/client/assets/js/{MemoryView-QGFW4iZo.js → MemoryView-BnL7xzux.js} +2 -2
- package/dist/client/assets/js/{MessageList-DZR-TFjD.js → MessageList-5tytzhb0.js} +3 -3
- package/dist/client/assets/js/{ModelsView-DiWdSWOW.js → ModelsView-ComCz0Ce.js} +1 -1
- package/dist/client/assets/js/{OutlinePanel-Dlr5svMY.js → OutlinePanel-CF_XPCRn.js} +1 -1
- package/dist/client/assets/js/{PageSidebarFooter-Bic1fUmG.js → PageSidebarFooter-dvLzcTIm.js} +1 -1
- package/dist/client/assets/js/{PdfFilePreview-Dkpan1ay.js → PdfFilePreview-COOAoJ4V.js} +2 -2
- package/dist/client/assets/js/{PerformanceView-LrZaED_Z.js → PerformanceView-D6dKifJh.js} +1 -1
- package/dist/client/assets/js/{PetdexView-Bv8RioGL.js → PetdexView-CmvzDYwf.js} +1 -1
- package/dist/client/assets/js/{PluginsView-CbtdIGlq.js → PluginsView-zJV9FE9c.js} +1 -1
- package/dist/client/assets/js/{PptxFilePreview-5if_GbU6.js → PptxFilePreview-dC4JxV6j.js} +2 -2
- package/dist/client/assets/js/{ProfileAvatar-DI9ciJxS.js → ProfileAvatar-C8xoALCI.js} +1 -1
- package/dist/client/assets/js/{ProfilesView-C-FSiKMU.js → ProfilesView-CxVxJRN_.js} +1 -1
- package/dist/client/assets/js/{ProviderConfigurationPrompt-BUoWC41Y.js → ProviderConfigurationPrompt-zwk1UwoP.js} +1 -1
- package/dist/client/assets/js/{SessionSearchModal-CEKvSihp.js → SessionSearchModal-DhwGsV-i.js} +1 -1
- package/dist/client/assets/js/{SettingRow-CSfiJmxx.js → SettingRow-DHqhLX3M.js} +1 -1
- package/dist/client/assets/js/{SettingsCircuitBadge-DHIEFyTR.js → SettingsCircuitBadge-CnWSfQZd.js} +1 -1
- package/dist/client/assets/js/{SettingsView-DbNJroV3.js → SettingsView-Cbroga25.js} +1 -1
- package/dist/client/assets/js/{SharedGroupChatView-CTYjqWcO.js → SharedGroupChatView-DXfqtQ33.js} +1 -1
- package/dist/client/assets/js/{SkillsUsageView-BqZ3GtfT.js → SkillsUsageView-C34i3lOQ.js} +1 -1
- package/dist/client/assets/js/{SkillsView-Bhla7821.js → SkillsView-DRG_1esx.js} +2 -2
- package/dist/client/assets/js/{SpreadsheetFilePreview-CGK8HDAx.js → SpreadsheetFilePreview-DRw4kIx5.js} +1 -1
- package/dist/client/assets/js/{TerminalPanel-CtBTLOwq.js → TerminalPanel-Da1nL9P8.js} +1 -1
- package/dist/client/assets/js/{TerminalView-BID7fupB.js → TerminalView-B6z-VaGq.js} +1 -1
- package/dist/client/assets/js/{ThemeView-Cx3ucIus.js → ThemeView-CAaJ9MH-.js} +1 -1
- package/dist/client/assets/js/{UsageView-ByGCsw7o.js → UsageView-B_hLsp0k.js} +1 -1
- package/dist/client/assets/js/{VersionPreviewView-DiAK1ind.js → VersionPreviewView-DKXL6anl.js} +1 -1
- package/dist/client/assets/js/{WebPet-CdIqrnp1.js → WebPet-BUvrfjpq.js} +1 -1
- package/dist/client/assets/js/{WorkflowView-DmBOhSuq.js → WorkflowView-r46Ap9FY.js} +1 -1
- package/dist/client/assets/js/{WorkspaceDiffPreview-dHIGp-9F.js → WorkspaceDiffPreview-EwZAE18F.js} +2 -2
- package/dist/client/assets/js/{abap-Dj8IFKiF.js → abap-C7gkFu-A.js} +1 -1
- package/dist/client/assets/js/{aiden0z-pptx-renderer.es-6vi5-jAN.js → aiden0z-pptx-renderer.es-DOpVaH_k.js} +1 -1
- package/dist/client/assets/js/{apex-C3INPUEt.js → apex-DZOtRowu.js} +1 -1
- package/dist/client/assets/js/{ar-Gk9y3ZfO.js → ar-8iThLSJQ.js} +1 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-BrfhYGuP.js +1 -0
- package/dist/client/assets/js/{architectureDiagram-3BPJPVTR-DLZYeivB.js → architectureDiagram-3BPJPVTR-DEsTTzKd.js} +1 -1
- package/dist/client/assets/js/{auth-D1ZFqv22.js → auth-B52zm2Ir.js} +1 -1
- package/dist/client/assets/js/{azcli-UBzLhJq5.js → azcli-KxuicZQh.js} +1 -1
- package/dist/client/assets/js/{bat-P3O4jldt.js → bat-DfFP4HF-.js} +1 -1
- package/dist/client/assets/js/{bicep-DdQR9RxE.js → bicep-Co4bntVh.js} +1 -1
- package/dist/client/assets/js/{blockDiagram-GPEHLZMM-UWFo8sm5.js → blockDiagram-GPEHLZMM-NsxYeUKd.js} +1 -1
- package/dist/client/assets/js/{c4Diagram-AAUBKEIU-jgyj0wOb.js → c4Diagram-AAUBKEIU-D68asSzm.js} +1 -1
- package/dist/client/assets/js/{cameligo-Bb4ubW_C.js → cameligo-Xi0l_9Wr.js} +1 -1
- package/dist/client/assets/js/{chat-DdHii4Qz.js → chat-fUZW3YFa.js} +1 -1
- package/dist/client/assets/js/{chat-input-height-CSPwB9it.js → chat-input-height-lvFawuv9.js} +1 -1
- package/dist/client/assets/js/{chat-timestamp-DGQ8fmtT.js → chat-timestamp-4wWFcZWv.js} +1 -1
- package/dist/client/assets/js/{chunk-2J33WTMH-Br9OWF5a.js → chunk-2J33WTMH-CEU5sLIh.js} +1 -1
- package/dist/client/assets/js/{chunk-3OPIFGDE-Cb40LuI4.js → chunk-3OPIFGDE-DEhbKkCl.js} +1 -1
- package/dist/client/assets/js/{chunk-4BX2VUAB-jYtdiafd.js → chunk-4BX2VUAB-OIZUstuy.js} +1 -1
- package/dist/client/assets/js/{chunk-55IACEB6-CBtymeHY.js → chunk-55IACEB6-DQHKZCBG.js} +1 -1
- package/dist/client/assets/js/{chunk-5ZQYHXKU-yj9xqmex.js → chunk-5ZQYHXKU-BU3pQVVl.js} +1 -1
- package/dist/client/assets/js/{chunk-727SXJPM-er_5tB5X.js → chunk-727SXJPM-jj97gdnP.js} +1 -1
- package/dist/client/assets/js/{chunk-AQP2D5EJ-C4mDD6xK.js → chunk-AQP2D5EJ-jv-oWlkb.js} +1 -1
- package/dist/client/assets/js/{chunk-BSJP7CBP-QZesZe57.js → chunk-BSJP7CBP-DkKsepNF.js} +1 -1
- package/dist/client/assets/js/{chunk-CSCIHK7Q-5LH118bT.js → chunk-CSCIHK7Q-CLgoBoCF.js} +3 -3
- package/dist/client/assets/js/{chunk-FMBD7UC4-CQho6QZ5.js → chunk-FMBD7UC4-Bx1bCKUR.js} +1 -1
- package/dist/client/assets/js/{chunk-KSCS5N6A-DONM1Omv.js → chunk-KSCS5N6A-CZHZ6pBd.js} +1 -1
- package/dist/client/assets/js/{chunk-L5ZTLDWV-FN_zFWkp.js → chunk-L5ZTLDWV-dz9D3kOb.js} +1 -1
- package/dist/client/assets/js/{chunk-LZXEDZCA-CEEUVvpS.js → chunk-LZXEDZCA-CQiSQehC.js} +2 -2
- package/dist/client/assets/js/{chunk-ND2GUHAM-DWckpxQD.js → chunk-ND2GUHAM-mWODKb8v.js} +1 -1
- package/dist/client/assets/js/{chunk-NZK2D7GU-0mKZmkuV.js → chunk-NZK2D7GU-ivCkjCOR.js} +1 -1
- package/dist/client/assets/js/{chunk-O5CBEL6O-DIDAOkT_.js → chunk-O5CBEL6O-BRUisK47.js} +1 -1
- package/dist/client/assets/js/{chunk-QZHKN3VN-D3c-TMz-.js → chunk-QZHKN3VN-BHjgTrzY.js} +1 -1
- package/dist/client/assets/js/{chunk-WU5MYG2G-BZvSpwm4.js → chunk-WU5MYG2G-CNW1rcpL.js} +1 -1
- package/dist/client/assets/js/{chunk-XPW4576I-xdyJtk-s.js → chunk-XPW4576I-DP3dJbOu.js} +1 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-BVBBe3DQ.js +1 -0
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-DJUe3i9Y.js +1 -0
- package/dist/client/assets/js/{clipboard-DQ_A8ns-.js → clipboard-DHZFaAvO.js} +1 -1
- package/dist/client/assets/js/{clipboard-files-bDrcGKPe.js → clipboard-files-CBDy-02Y.js} +1 -1
- package/dist/client/assets/js/{clojure-ku7aCU1_.js → clojure-DuyGwS8X.js} +1 -1
- package/dist/client/assets/js/{coding-agents-DfHyBvky.js → coding-agents-BNTHD6kd.js} +1 -1
- package/dist/client/assets/js/{codingAgentProviders-BM18FAW9.js → codingAgentProviders-DM_ouxbL.js} +1 -1
- package/dist/client/assets/js/{coffee-DnRIdJlY.js → coffee-C5p7vzpa.js} +1 -1
- package/dist/client/assets/js/{completion-notification-XxjbntI8.js → completion-notification-CzdnhuX3.js} +1 -1
- package/dist/client/assets/js/{cose-bilkent-S5V4N54A-w891sIF1.js → cose-bilkent-S5V4N54A-De_ZdqY0.js} +1 -1
- package/dist/client/assets/js/{cpp-CN8i6ISX.js → cpp-II5hDbTe.js} +1 -1
- package/dist/client/assets/js/{csharp-B-fxig7O.js → csharp-D0POzSpv.js} +1 -1
- package/dist/client/assets/js/{csp-Bar9LGt4.js → csp-CwtuRkR3.js} +1 -1
- package/dist/client/assets/js/{css-DFtC5xZN.js → css-Dc2fJIqQ.js} +1 -1
- package/dist/client/assets/js/{cssMode-DH5XKKL2.js → cssMode-CC6jRvHF.js} +1 -1
- package/dist/client/assets/js/{cypher-BkJexWsv.js → cypher-DBcQoWDH.js} +1 -1
- package/dist/client/assets/js/{cytoscape.esm-BDsvr8Aq.js → cytoscape.esm-C9FMRqxM.js} +1 -1
- package/dist/client/assets/js/{dagre-BM42HDAG-BuT885pa.js → dagre-BM42HDAG-CvJIC410.js} +1 -1
- package/dist/client/assets/js/{dagre-BVUDh8Sh.js → dagre-BtgEsAtK.js} +1 -1
- package/dist/client/assets/js/{dart-B7W8hAtN.js → dart-Jf_Hmp2o.js} +1 -1
- package/dist/client/assets/js/{de-LDpd8WHJ.js → de-7hLSwCEx.js} +1 -1
- package/dist/client/assets/js/{defineProperty-DdPu4ZVv.js → defineProperty-DHkErCmG.js} +1 -1
- package/dist/client/assets/js/{desktop-browser-xrRFPNUg.js → desktop-browser-C6AhY0uu.js} +1 -1
- package/dist/client/assets/js/{diagram-2AECGRRQ-B1sSf-09.js → diagram-2AECGRRQ-CvPeU5Lm.js} +1 -1
- package/dist/client/assets/js/{diagram-5GNKFQAL-BffX22pf.js → diagram-5GNKFQAL-CBniYlkH.js} +1 -1
- package/dist/client/assets/js/{diagram-KO2AKTUF-D8QvpUpn.js → diagram-KO2AKTUF-C_yFaVRj.js} +1 -1
- package/dist/client/assets/js/{diagram-LMA3HP47-DkG7p3lQ.js → diagram-LMA3HP47-BzM1IxNe.js} +1 -1
- package/dist/client/assets/js/{diagram-OG6HWLK6-RjvNNvXM.js → diagram-OG6HWLK6-yvmf_3ax.js} +1 -1
- package/dist/client/assets/js/{dist-Bk0VKtV3.js → dist-BHzBn3v7.js} +1 -1
- package/dist/client/assets/js/{dockerfile-C4m7j8sy.js → dockerfile-J3d6ZPDJ.js} +1 -1
- package/dist/client/assets/js/{docx-preview-BpTW-GN7.js → docx-preview-Rqt8wMjQ.js} +1 -1
- package/dist/client/assets/js/{download-CX8EG48r.js → download-xhRMWMda.js} +1 -1
- package/dist/client/assets/js/{ecl-EHV358Ls.js → ecl-XnlT0p97.js} +1 -1
- package/dist/client/assets/js/{editor.api2-CnHBqh_d.js → editor.api2-ChO5nUQb.js} +1 -1
- package/dist/client/assets/js/{elixir-DLfp2Dwn.js → elixir-BEJbxH-B.js} +1 -1
- package/dist/client/assets/js/{en-D6VVFwFU.js → en-D2WSXgkM.js} +1 -1
- package/dist/client/assets/js/{erDiagram-TEJ5UH35-CLlLC6xx.js → erDiagram-TEJ5UH35-DZysD9r9.js} +1 -1
- package/dist/client/assets/js/{es-BIMLuyVP.js → es-B7Mq1P0U.js} +1 -1
- package/dist/client/assets/js/{esm-C8D4M0Yn.js → esm-DnZPPtmx.js} +1 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-vlE3-g2j.js +1 -0
- package/dist/client/assets/js/{file-preview-BvgwVZXh.js → file-preview-C417aixJ.js} +1 -1
- package/dist/client/assets/js/{files-CJkCqsUx.js → files-DjI-npgn.js} +1 -1
- package/dist/client/assets/js/{flow9-CtBaUnAi.js → flow9-j5XT_8TQ.js} +1 -1
- package/dist/client/assets/js/{flowDiagram-I6XJVG4X-VTRTPnqD.js → flowDiagram-I6XJVG4X-Dt5ZtyHz.js} +1 -1
- package/dist/client/assets/js/{fr-C2lf0cY2.js → fr-DvClrDOw.js} +1 -1
- package/dist/client/assets/js/{freemarker2-XLeMvhl_.js → freemarker2-BzCf_0SN.js} +1 -1
- package/dist/client/assets/js/{fsharp-Db0uaBQv.js → fsharp-ClU_Sdjr.js} +1 -1
- package/dist/client/assets/js/{ganttDiagram-6RSMTGT7-CdKcIZ8_.js → ganttDiagram-6RSMTGT7-Bca3rPWi.js} +1 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-Cyd4P6XH.js +1 -0
- package/dist/client/assets/js/{gitGraphDiagram-PVQCEYII-Bcuyw6fo.js → gitGraphDiagram-PVQCEYII-Co29qnTg.js} +1 -1
- package/dist/client/assets/js/{go-DwaTlB-B.js → go-D3iUyCM0.js} +1 -1
- package/dist/client/assets/js/{graphlib-vAI4Pw7R.js → graphlib-Bln6qd-Z.js} +1 -1
- package/dist/client/assets/js/{graphql-Cf2XhNJR.js → graphql-z8koqyyL.js} +1 -1
- package/dist/client/assets/js/{group-agent-avatar-CPehpiK0.js → group-agent-avatar-CwqtaKGw.js} +1 -1
- package/dist/client/assets/js/{group-chat-CY62vc77.js → group-chat-Buz8HP-N.js} +1 -1
- package/dist/client/assets/js/{group-chat-xkdjC2Jt.js → group-chat-CgFAwCtr.js} +1 -1
- package/dist/client/assets/js/{group-chat-agent-link-DdSNKasF.js → group-chat-agent-link-N5IFeN_j.js} +1 -1
- package/dist/client/assets/js/{handlebars-CNEKu_p8.js → handlebars-C_JvhUYs.js} +1 -1
- package/dist/client/assets/js/{hcl-6UZbq6h2.js → hcl-X7TzviIX.js} +1 -1
- package/dist/client/assets/js/{highlight-DwtBT6t1.js → highlight-C4yUBxwQ.js} +1 -1
- package/dist/client/assets/js/{html-DfSIHhKA.js → html-B-rCQB0N.js} +1 -1
- package/dist/client/assets/js/{htmlMode-iGw9-O-W.js → htmlMode-CAeEf_yf.js} +1 -1
- package/dist/client/assets/js/{index-DnjQJzX4.js → index-DN4SafrP.js} +5 -5
- package/dist/client/assets/js/info-J43DQDTF-B9tkQ2Sb.js +1 -0
- package/dist/client/assets/js/{infoDiagram-5YYISTIA-85450Zam.js → infoDiagram-5YYISTIA-BWQGayms.js} +1 -1
- package/dist/client/assets/js/{ini-8em8V_Af.js → ini-LTHHN4J-.js} +1 -1
- package/dist/client/assets/js/{ishikawaDiagram-YF4QCWOH-BZ4az7UA.js → ishikawaDiagram-YF4QCWOH-Dhuplz_z.js} +1 -1
- package/dist/client/assets/js/{ja-C1bBXgr_.js → ja-D7BeX2_D.js} +1 -1
- package/dist/client/assets/js/{java-CP1MdIkO.js → java-BRFX-ya0.js} +1 -1
- package/dist/client/assets/js/{javascript-Cr8_LHYa.js → javascript-ZXiVmjXn.js} +1 -1
- package/dist/client/assets/js/{journeyDiagram-JHISSGLW-DGMB8Tgc.js → journeyDiagram-JHISSGLW-CJeatAU9.js} +1 -1
- package/dist/client/assets/js/{jsonMode-HCZ-1lFH.js → jsonMode-C6FcMe0o.js} +1 -1
- package/dist/client/assets/js/{jszip.min-BkR6b8DY.js → jszip.min-skZCUzWf.js} +1 -1
- package/dist/client/assets/js/{julia-DMTMxa5q.js → julia-Bph8N3CL.js} +1 -1
- package/dist/client/assets/js/{kanban-definition-UN3LZRKU-F5cH_RpB.js → kanban-definition-UN3LZRKU-tvWuOdSr.js} +1 -1
- package/dist/client/assets/js/{katex-CYbEJAbZ.js → katex-hSGJNERm.js} +1 -1
- package/dist/client/assets/js/{ko-qgOeHd8L.js → ko-BsVa-If_.js} +1 -1
- package/dist/client/assets/js/{kotlin-Blzus47W.js → kotlin-_c4-tPQp.js} +1 -1
- package/dist/client/assets/js/{less-DWCHpDyf.js → less-5oVo4jfQ.js} +1 -1
- package/dist/client/assets/js/{lexon-YXdlYGbJ.js → lexon-DE4YtGwF.js} +1 -1
- package/dist/client/assets/js/{liquid-DSQgvRwe.js → liquid-BGfieGMG.js} +1 -1
- package/dist/client/assets/js/{lspLanguageFeatures-0Hx2Vnc-.js → lspLanguageFeatures-DU_1H2uW.js} +1 -1
- package/dist/client/assets/js/{lua-Cyv3mTkg.js → lua-7WJSZJqD.js} +1 -1
- package/dist/client/assets/js/{m3-CPY3Ym7_.js → m3-gZlfoR19.js} +1 -1
- package/dist/client/assets/js/{markdown-DaPQ1nuG.js → markdown-BYF71orA.js} +1 -1
- package/dist/client/assets/js/{mdx-BqA6Xr9V.js → mdx-CunEIV3g.js} +1 -1
- package/dist/client/assets/js/{mermaid-parser.core-D4HRUOce.js → mermaid-parser.core-DU_SX15F.js} +3 -3
- package/dist/client/assets/js/{mermaid.core-w6kHmgOG.js → mermaid.core-8vsbhG5J.js} +3 -3
- package/dist/client/assets/js/{message-scroll-position-C5yRCyBU.js → message-scroll-position-C9_YO3pX.js} +2 -2
- package/dist/client/assets/js/{mindmap-definition-RKZ34NQL-CnzhnJ7Z.js → mindmap-definition-RKZ34NQL-HPtlKqL1.js} +1 -1
- package/dist/client/assets/js/{mips-BfqBfLvN.js → mips-DXkvw9aZ.js} +1 -1
- package/dist/client/assets/js/{models-wrytxWnf.js → models-BILDy2sV.js} +1 -1
- package/dist/client/assets/js/{monaco.contribution-Bc-DesyO.js → monaco.contribution-DDqeHGl3.js} +2 -2
- package/dist/client/assets/js/{msdax-DgMip49g.js → msdax-BbHEBDvP.js} +1 -1
- package/dist/client/assets/js/{mysql-DPUvF1g2.js → mysql-7I1rlwh7.js} +1 -1
- package/dist/client/assets/js/{objective-c-BQ3llrPW.js → objective-c-Dk03REAv.js} +1 -1
- package/dist/client/assets/js/packet-YPE3B663-DlTFK3Wo.js +1 -0
- package/dist/client/assets/js/{pascal-bFWHV7MZ.js → pascal-BCfNkzYY.js} +1 -1
- package/dist/client/assets/js/{pascaligo-C8Qza2pK.js → pascaligo-D-DslS98.js} +1 -1
- package/dist/client/assets/js/{pdf-Cb7x495t.js → pdf-B_OYWxSy.js} +1 -1
- package/dist/client/assets/js/{pdf.worker.min-DDUKJ6cJ.js → pdf.worker.min--q2RLEHa.js} +1 -1
- package/dist/client/assets/js/{perl-x25gw0_p.js → perl-MUnuTclx.js} +1 -1
- package/dist/client/assets/js/{pets-BfRsvl7D.js → pets-D74G2jqA.js} +1 -1
- package/dist/client/assets/js/{pgsql-DAUcGeRq.js → pgsql-BxCBktNe.js} +1 -1
- package/dist/client/assets/js/{php-nri1eqb2.js → php-zp9UgH03.js} +1 -1
- package/dist/client/assets/js/pie-LRSECV5Y-BtnBGhFZ.js +1 -0
- package/dist/client/assets/js/{pieDiagram-4H26LBE5-4LODdtT_.js → pieDiagram-4H26LBE5-CG8_pcHr.js} +1 -1
- package/dist/client/assets/js/{pla-CHi5LWNL.js → pla-DGCtmYZC.js} +1 -1
- package/dist/client/assets/js/{postiats-Bk7jD0AA.js → postiats-DHSW8gnY.js} +1 -1
- package/dist/client/assets/js/{powerquery-UTqJ0Vs7.js → powerquery-BGsPEmJe.js} +1 -1
- package/dist/client/assets/js/{powershell-CuPY3Rqk.js → powershell-BItlb0hE.js} +1 -1
- package/dist/client/assets/js/{profiles-D-vlI-Ec.js → profiles-BK5JKD7h.js} +1 -1
- package/dist/client/assets/js/{protobuf-Be4AIz9j.js → protobuf-BIhm6JYx.js} +1 -1
- package/dist/client/assets/js/{pt-D7_udWb3.js → pt-BSORCDMm.js} +1 -1
- package/dist/client/assets/js/{pug-CZFx15Ey.js → pug-BtnM7KZj.js} +1 -1
- package/dist/client/assets/js/{python-BgRg6Ez6.js → python-DxzTx1Q_.js} +1 -1
- package/dist/client/assets/js/{qsharp-BiBiLhRS.js → qsharp-B_8MSfaB.js} +1 -1
- package/dist/client/assets/js/{quadrantDiagram-W4KKPZXB-g_q9-dXx.js → quadrantDiagram-W4KKPZXB-CsbkMYuV.js} +1 -1
- package/dist/client/assets/js/{r-DM7NVSbZ.js → r-kvKC59jk.js} +1 -1
- package/dist/client/assets/js/radar-GUYGQ44K-BTKMKX4G.js +1 -0
- package/dist/client/assets/js/{razor-CiWy0jCW.js → razor-BwZ0MkaL.js} +1 -1
- package/dist/client/assets/js/{redis-BR2LPmFL.js → redis-5j1U_i85.js} +1 -1
- package/dist/client/assets/js/{redshift-B0sdAV16.js → redshift-CX1dFLA1.js} +1 -1
- package/dist/client/assets/js/{requirementDiagram-4Y6WPE33-EedCclad.js → requirementDiagram-4Y6WPE33-CKC7CQCX.js} +1 -1
- package/dist/client/assets/js/{restructuredtext-kQOBLN1M.js → restructuredtext-MV0-Naya.js} +1 -1
- package/dist/client/assets/js/{rough.esm-Dyx_2DON.js → rough.esm-CV1rL6PC.js} +1 -1
- package/dist/client/assets/js/{ru-CVQQmreT.js → ru-JsH6TKyg.js} +1 -1
- package/dist/client/assets/js/{ruby-CbdJXy6J.js → ruby-Bhyejf9X.js} +1 -1
- package/dist/client/assets/js/{rust-DZanYksk.js → rust-CR8d_FC1.js} +1 -1
- package/dist/client/assets/js/{sankeyDiagram-5OEKKPKP-DFC0nzsd.js → sankeyDiagram-5OEKKPKP-CKlqlvAe.js} +1 -1
- package/dist/client/assets/js/{sb-C5-WiqDZ.js → sb-hLW2EM2L.js} +1 -1
- package/dist/client/assets/js/{scala-Bk7i9nV-.js → scala-DVUhALEZ.js} +1 -1
- package/dist/client/assets/js/{scheme-CaZSWmJ2.js → scheme-BS6yNanr.js} +1 -1
- package/dist/client/assets/js/{scss-ByOYuc7K.js → scss-BfoRsElt.js} +1 -1
- package/dist/client/assets/js/{sequenceDiagram-3UESZ5HK-hWjPfqXt.js → sequenceDiagram-3UESZ5HK-CTimhD6H.js} +1 -1
- package/dist/client/assets/js/{session-browser-prefs-Br8OYA4_.js → session-browser-prefs-BT1woDux.js} +1 -1
- package/dist/client/assets/js/{sessions-iGK9S6zk.js → sessions-IkLKgnN6.js} +1 -1
- package/dist/client/assets/js/{settings-pbanANH0.js → settings-roYY6G3W.js} +1 -1
- package/dist/client/assets/js/{shell-Di0TEySc.js → shell-BO_Lyczz.js} +1 -1
- package/dist/client/assets/js/{skills-DC-UPcXj.js → skills-a5LPwmiT.js} +1 -1
- package/dist/client/assets/js/{solidity-BNTjAuuA.js → solidity-D3T2Ki4l.js} +1 -1
- package/dist/client/assets/js/{sophia-LY__8Yob.js → sophia-iJmIEvi8.js} +1 -1
- package/dist/client/assets/js/{sparql-CWnLfgGS.js → sparql-C2HCEExr.js} +1 -1
- package/dist/client/assets/js/{sql-B0ypQ9lR.js → sql-DM6_3GBc.js} +1 -1
- package/dist/client/assets/js/{src-BihFroE7.js → src-DD_TpJde.js} +1 -1
- package/dist/client/assets/js/{st-CqVFKTbZ.js → st-DSb39Fm5.js} +1 -1
- package/dist/client/assets/js/{stateDiagram-AJRCARHV-B7wEnYVe.js → stateDiagram-AJRCARHV-DwBGmBj6.js} +1 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-5bNcwBne.js +1 -0
- package/dist/client/assets/js/{style-DDAg_jVj.js → style-B5xXhBlp.js} +1 -1
- package/dist/client/assets/js/{swift-B4ZZmDxc.js → swift-DrZYSZK3.js} +1 -1
- package/dist/client/assets/js/{systemverilog-zLt-O1mT.js → systemverilog-BAWNCaf6.js} +1 -1
- package/dist/client/assets/js/{tcl-DCSZmA-l.js → tcl-DY15ex6v.js} +1 -1
- package/dist/client/assets/js/{timeline-definition-PNZ67QCA-BN_LfleE.js → timeline-definition-PNZ67QCA-B8xuIu6g.js} +1 -1
- package/dist/client/assets/js/treeView-BLDUP644-DvZPUnGM.js +1 -0
- package/dist/client/assets/js/treemap-LRROVOQU-Bis1djYh.js +1 -0
- package/dist/client/assets/js/{tsMode-BjUcuHrq.js → tsMode-BE8JCSCE.js} +1 -1
- package/dist/client/assets/js/{ttsHelpers-BLunFYsq.js → ttsHelpers-BLNiQExI.js} +1 -1
- package/dist/client/assets/js/{twig-CuJlVpUG.js → twig-BpHF_18K.js} +1 -1
- package/dist/client/assets/js/{typescript-De40YVFt.js → typescript-FQ3z9hVG.js} +1 -1
- package/dist/client/assets/js/{typespec-8QcsIc3c.js → typespec-BKvcn6aE.js} +1 -1
- package/dist/client/assets/js/{useSttSettings-B1-KXN44.js → useSttSettings-DHX06G8A.js} +1 -1
- package/dist/client/assets/js/{vb-DEGTdhxf.js → vb-B74ucE43.js} +1 -1
- package/dist/client/assets/js/{vennDiagram-CIIHVFJN-hL8ax7wF.js → vennDiagram-CIIHVFJN-DtEu04QR.js} +1 -1
- package/dist/client/assets/js/wardley-L42UT6IY-CD4dIN63.js +1 -0
- package/dist/client/assets/js/{wardleyDiagram-YWT4CUSO-BIR-RA6Y.js → wardleyDiagram-YWT4CUSO-DdNKCPsp.js} +1 -1
- package/dist/client/assets/js/{wgsl-CmbiucmY.js → wgsl-DEf5Vdqv.js} +1 -1
- package/dist/client/assets/js/{workers-BgWBq4qY.js → workers-BbaiLVxx.js} +1 -1
- package/dist/client/assets/js/{workflow-socket-DZ9Ceffc.js → workflow-socket-DH402vxO.js} +1 -1
- package/dist/client/assets/js/{xml-SZLdwDmk.js → xml-zjE51I7v.js} +1 -1
- package/dist/client/assets/js/{xterm-D6CotCNH.js → xterm-Djy4rCx0.js} +1 -1
- package/dist/client/assets/js/{xychartDiagram-2RQKCTM6-DHa486uP.js → xychartDiagram-2RQKCTM6-CKqN7g7r.js} +1 -1
- package/dist/client/assets/js/{yaml-CgQpCgM5.js → yaml-DabeGoTc.js} +1 -1
- package/dist/client/assets/js/{zh-BDlMioZr.js → zh-CI4-L3JY.js} +1 -1
- package/dist/client/assets/js/{zh-TW-DTbLWR1A.js → zh-TW-wYlj-uOZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/openapi.json +1 -1
- package/package.json +9 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-Cl4Qi40R.js +0 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-DC0BcY8x.js +0 -1
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-BfDDH_fm.js +0 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-Bgzwnvkn.js +0 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-CwFrpI3e.js +0 -1
- package/dist/client/assets/js/info-J43DQDTF-wMwkmIWM.js +0 -1
- package/dist/client/assets/js/packet-YPE3B663-DYmKXJOE.js +0 -1
- package/dist/client/assets/js/pie-LRSECV5Y-Dx0hbcjV.js +0 -1
- package/dist/client/assets/js/radar-GUYGQ44K-D-t-QJhi.js +0 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-CoMhBVvo.js +0 -1
- package/dist/client/assets/js/treeView-BLDUP644-CMJGhbWk.js +0 -1
- package/dist/client/assets/js/treemap-LRROVOQU-_j4KoVDh.js +0 -1
- package/dist/client/assets/js/wardley-L42UT6IY-BeOvmJoM.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/MarkdownRenderer-
|
|
2
|
-
import{$i as k,$t as re,Ai as wn,Bi as it,Di as je,Dt as cs,Ei as ds,Fi as pe,Fr as vs,Hi as v,Hr as ps,Ir as fs,M as Wt,Nr as He,Pr as Ke,Qr as nr,Ri as gs,Sa as d,Ti as P,Vi as hs,Vr as ms,Wi as Ae,Zi as ie,_a as o,_i as t,_t as xt,at as _s,bi as h,bt as ys,ci as lt,ea as Nt,ei as Pt,fa as ks,fi as It,gi as _,gt as ar,hi as ws,i as bs,jt as rt,mi as De,n as We,pi as $e,pn as Ss,q as Cs,r as xs,rt as Ot,si as Pe,sn as Kt,t as Qe,tt as Ms,ua as y,ui as Ut,vi as me,wa as q,wi as ne,xa as st,ya as _e,yi as x,zt as Is}from"./index-DnjQJzX4.js";import{T as Ts,u as $s}from"./sessions-iGK9S6zk.js";import{r as Ps,t as Es}from"./profiles-D-vlI-Ec.js";import{a as Ls,c as Bs,i as or,o as rr,s as Rs}from"./chat-DdHii4Qz.js";import{n as As,t as Ds}from"./settings-pbanANH0.js";import{a as Fs,c as sr,o as Vs,s as lr}from"./chat-timestamp-DGQ8fmtT.js";import{n as zs,t as Ns}from"./clipboard-files-bDrcGKPe.js";import{l as ir,s as ur}from"./skills-DC-UPcXj.js";import{c as bn,d as Os,f as Us,h as Sn,l as qs,m as js,n as Hs,p as Ks,t as Ws,u as Qs}from"./useSttSettings-B1-KXN44.js";import{d as Ys,f as Zs}from"./ttsHelpers-BLunFYsq.js";import{n as Gs,r as Cn,t as xn}from"./chat-input-height-CSPwB9it.js";import{a as Js,c as Xs,i as el,l as tl,n as nl,r as al,s as ol,t as rl}from"./message-scroll-position-C5yRCyBU.js";async function sl(p,g,T){return(await Pt(`/api/hermes/model-context/${encodeURIComponent(p)}/${encodeURIComponent(g)}`,{method:"PUT",body:JSON.stringify({provider:p,model:g,context_limit:T})})).data}var ll=q((()=>{nr()}));function Qt(p){return p?`?profile=${encodeURIComponent(p)}`:""}function il(p){return p.trim().toLowerCase().replace(/ /g,"-").replace(/_/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ul(p){return(await Pt(`/api/hermes/bundles${Qt(p)}`)).bundles??[]}async function cl(p,g){return(await Pt(`/api/hermes/bundles${Qt(p)}`,{method:"POST",body:JSON.stringify(g)})).bundle}async function dl(p,g){await Pt(`/api/hermes/bundles/${encodeURIComponent(g)}${Qt(p)}`,{method:"DELETE"})}var cr=q((()=>{nr()})),Mn,In,Tn,$n,Pn,En,Ln,dr,Bn=q((()=>{Pe(),He(),Mn=["data-status"],In={class:"voice-transcript-overlay__status"},Tn={key:0,class:"voice-transcript-overlay__transcript"},$n={key:1,class:"voice-transcript-overlay__error",role:"alert"},Pn={key:2,class:"voice-transcript-overlay__debug"},En={class:"voice-transcript-overlay__debug-title"},Ln={class:"voice-transcript-overlay__debug-list"},dr=je({__name:"VoiceTranscriptOverlay",props:{status:{},transcript:{},error:{default:null},floating:{type:Boolean,default:!1},events:{default:()=>[]},debug:{type:Boolean,default:!1}},setup(p){const g=p,{t:T}=Ke(),a=_(()=>T(`chat.voiceInput.status.${g.status}`)),c=_(()=>T("chat.voiceInput.statusLabel",{status:a.value})),b=_(()=>T("chat.voiceInput.transcriptLabel",{text:g.transcript})),w=_(()=>T("chat.voiceInput.errorLabel",{error:g.error})),i=_(()=>g.events.slice(-5).map(M=>M.type));return(M,N)=>(v(),h("div",{class:_e(["voice-transcript-overlay",{"voice-transcript-overlay--floating":g.floating}]),"data-testid":"voice-transcript-overlay","data-status":g.status,role:"status","aria-live":"polite"},[t("p",In,d(c.value),1),g.transcript?(v(),h("p",Tn,d(b.value),1)):x("",!0),g.error?(v(),h("p",$n,d(w.value),1)):x("",!0),g.debug&&i.value.length?(v(),h("div",Pn,[t("p",En,d(o(T)("chat.voiceInput.recentEvents")),1),t("ol",Ln,[(v(!0),h(De,null,Ae(i.value,($,O)=>(v(),h("li",{key:`${O}:${$}`,class:"voice-transcript-overlay__debug-item","data-testid":"voice-event-debug-item"},d($),1))),128))])])):x("",!0)],10,Mn))}})})),vl=q((()=>{})),vr,pl=q((()=>{Bn(),Bn(),vl(),We(),vr=Qe(dr,[["__scopeId","data-v-852c4dd9"]])})),Rn,An,Dn,Fn,Vn,pr,zn=q((()=>{Pe(),He(),pl(),Rn={class:"voice-dialogue-controls__actions"},An=["aria-label","aria-pressed"],Dn={key:0,class:"voice-dialogue-controls__icon",width:"16",height:"16",viewBox:"0 0 24 24","aria-hidden":"true"},Fn={key:1,class:"voice-dialogue-controls__icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Vn=["aria-label"],pr=je({__name:"VoiceDialogueControls",props:{status:{},transcript:{},error:{default:null},events:{default:()=>[]},debug:{type:Boolean,default:!1},onStart:{},onStop:{},onCancel:{}},setup(p){const g=p,T=new Set(["capturing","transcribing","sending"]),{t:a}=Ke(),c=_(()=>T.has(g.status)),b=_(()=>c.value||!!g.transcript||!!g.error),w=_(()=>c.value?a("chat.voiceInput.stopCaptureAndInsert"):a("chat.voiceInput.startCapture"));async function i(){if(c.value){await g.onStop();return}await g.onStart()}function M(){g.onCancel()}return(N,$)=>(v(),h("div",{class:_e(["voice-dialogue-controls voice-dialogue-controls--floating-overlay",{active:c.value}])},[b.value?(v(),me(vr,{key:0,floating:"",status:g.status,transcript:g.transcript,error:g.error,events:g.events,debug:g.debug},null,8,["status","transcript","error","events","debug"])):x("",!0),t("div",Rn,[t("button",{type:"button",class:_e(["voice-dialogue-controls__toggle",{active:c.value}]),"data-testid":"voice-record-toggle","aria-label":w.value,"aria-pressed":c.value,onClick:i},[c.value?(v(),h("svg",Dn,[...$[0]||($[0]=[t("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2",fill:"currentColor"},null,-1)])])):(v(),h("svg",Fn,[...$[1]||($[1]=[t("path",{d:"M12 3a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Z"},null,-1),t("path",{d:"M5 10v1a7 7 0 0 0 14 0v-1"},null,-1),t("path",{d:"M12 18v3"},null,-1),t("path",{d:"M9 21h6"},null,-1)])]))],10,An),c.value?(v(),h("button",{key:0,type:"button",class:"voice-dialogue-controls__cancel","data-testid":"voice-record-cancel","aria-label":o(a)("chat.voiceInput.cancelCapture"),onClick:M},[...$[2]||($[2]=[t("svg",{class:"voice-dialogue-controls__icon voice-dialogue-controls__icon--small",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true"},[t("path",{d:"M18 6 6 18"}),t("path",{d:"m6 6 12 12"})],-1)])],8,Vn)):x("",!0)])],2))}})})),fl=q((()=>{})),fr,gl=q((()=>{zn(),zn(),fl(),We(),fr=Qe(pr,[["__scopeId","data-v-22dab386"]])})),Nn,On,Un,gr,qn=q((()=>{Pe(),Wt(),He(),ir(),cr(),Nn={class:"bundle-name-hint"},On={key:0,class:"bundle-command-preview"},Un={class:"bundle-create-actions"},gr=je({__name:"BundleCreateModal",props:{profile:{}},emits:["close","created"],setup(p,{emit:g}){const T=p,a=g,{t:c}=Ke(),b=ar(),w=y(""),i=y(""),M=y([]),N=y([]),$=y(!1),O=y(!1),U=_(()=>il(w.value));function ae(D){w.value=D.replace(/[^A-Za-z0-9 _-]/g,"")}async function W(){$.value=!0;try{const D=await ur(T.profile),Y=new Map;for(const m of D.categories||[])for(const I of m.skills||[])I.enabled===!1||Y.has(I.name)||Y.set(I.name,{label:I.name,value:I.name});N.value=[...Y.values()].sort((m,I)=>m.label.localeCompare(I.label))}catch(D){N.value=[],b.error(`${c("chat.bundleCreator.skillsLoadFailed")}: ${D?.message||""}`)}finally{$.value=!1}}function X(D){!D&&!O.value&&a("close")}async function Q(){if(!w.value.trim()){b.warning(c("chat.bundleCreator.nameRequired"));return}if(!U.value){b.warning(c("chat.bundleCreator.nameInvalid"));return}if(!/[A-Za-z]/.test(w.value)){b.warning(c("chat.bundleCreator.nameInvalid"));return}if(M.value.length===0){b.warning(c("chat.bundleCreator.skillsRequired"));return}O.value=!0;try{const D=await cl(T.profile,{name:w.value.trim(),description:i.value.trim(),skills:M.value});b.success(c("chat.bundleCreator.created")),a("created",D)}catch(D){b.error(`${c("chat.bundleCreator.createFailed")}: ${D?.message||""}`)}finally{O.value=!1}}return it(W),(D,Y)=>(v(),me(o(xt),{show:!0,preset:"card",title:o(c)("chat.bundleCreator.title"),"mask-closable":!O.value,style:{width:"min(560px, calc(100vw - 32px))"},"onUpdate:show":X},{default:k(()=>[P(o(_s),{"label-placement":"top",onSubmit:$e(Q,["prevent"])},{default:k(()=>[P(o(Ot),{label:o(c)("chat.bundleCreator.name"),required:""},{default:k(()=>[P(o(Kt),{value:w.value,maxlength:120,placeholder:o(c)("chat.bundleCreator.namePlaceholder"),autofocus:"","onUpdate:value":ae},null,8,["value","placeholder"])]),_:1},8,["label"]),t("div",Nn,d(o(c)("chat.bundleCreator.nameHint")),1),U.value?(v(),h("div",On," /bundles "+d(U.value),1)):x("",!0),P(o(Ot),{label:o(c)("chat.bundleCreator.description")},{default:k(()=>[P(o(Kt),{value:i.value,"onUpdate:value":Y[0]||(Y[0]=m=>i.value=m),type:"textarea",maxlength:1e3,autosize:{minRows:2,maxRows:4},placeholder:o(c)("chat.bundleCreator.descriptionPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"]),P(o(Ot),{label:o(c)("chat.bundleCreator.skills"),required:""},{default:k(()=>[P(o(Is),{value:M.value,"onUpdate:value":Y[1]||(Y[1]=m=>M.value=m),multiple:"",filterable:"",loading:$.value,options:N.value,placeholder:o(c)("chat.bundleCreator.skillsPlaceholder")},null,8,["value","loading","options","placeholder"])]),_:1},8,["label"]),t("div",Un,[P(o(re),{disabled:O.value,onClick:Y[2]||(Y[2]=m=>a("close"))},{default:k(()=>[ne(d(o(c)("common.cancel")),1)]),_:1},8,["disabled"]),P(o(re),{type:"primary",loading:O.value,onClick:Q},{default:k(()=>[ne(d(o(c)("common.create")),1)]),_:1},8,["loading"])])]),_:1})]),_:1},8,["title","mask-closable"]))}})})),hl=q((()=>{})),hr,ml=q((()=>{qn(),qn(),hl(),We(),hr=Qe(gr,[["__scopeId","data-v-01ecfe5a"]])}));function _l(p={}){const g=y({status:"idle",error:null,startedAt:null,mimeType:null}),T=_(()=>g.value.status==="recording"),a=ks(null);let c=null,b=null,w=[],i=null,M=null,N=null,$=null,O=null,U=null,ae=null,W=0;function X(){g.value={status:"idle",error:null,startedAt:null,mimeType:null}}function Q(f){const S=yl(f);return g.value={status:"error",error:S,startedAt:null,mimeType:g.value.mimeType},S}function D(){i!==null&&(clearTimeout(i),i=null)}function Y(f){if(f)for(const S of f.getTracks())S.stop()}function m({stopStream:f=!0,clearChunks:S=!0}={}){D(),f&&Y(b),c=null,b=null,a.value=null,S&&(w=[])}function I(f){const S=N;M=null,N=null,$=null,S?.(f)}function R(f){const S=$;M=null,N=null,$=null,S?.(f)}function se(){!N&&!$||I(z(g.value.mimeType??c?.mimeType??null))}function fe(f){if(f!==void 0&&f!==O)return;const S=U;O=null,U=null,ae=null,S?.()}function ke(f,S){if(S!==void 0&&S!==O)return;const Z=ae;O=null,U=null,ae=null,Z?.(f)}function he(){!U&&!ae||fe()}function z(f){return new Blob([],{type:f||Mt})}function H(){return typeof MediaRecorder>"u"?null:MediaRecorder}function ye(){const f=H();if(!f||typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error(p.messages?.unsupported||yr);return f}function E(f,S){const Z=S?.length?S:[...mr];return typeof f.isTypeSupported!="function"?Z[0]:Z.find(G=>f.isTypeSupported(G))}function C(){if(g.value.status==="recording"||g.value.status==="requesting"||g.value.status==="stopping")return Promise.resolve();try{const f=ye(),S=++W;return g.value={status:"requesting",error:null,startedAt:null,mimeType:null},new Promise((Z,G)=>{O=S,U=Z,ae=G,navigator.mediaDevices.getUserMedia(p.constraints??{audio:!0}).then(A=>{if(S!==W){Y(A),fe(S);return}const le=E(f,p.mimeTypes),ge=le?new f(A,{mimeType:le}):new f(A);b=A,a.value=A,c=ge,w=[],ge.ondataavailable=ue=>{const oe=ue.data;oe&&oe.size>0&&w.push(oe)},ge.onerror=ue=>{const oe=Q(ue.error??new Error(p.messages?.recordingFailed||"Microphone recording failed."));m(),R(oe)},ge.start(),g.value={status:"recording",error:null,startedAt:Date.now(),mimeType:ge.mimeType||le||Mt},i=setTimeout(()=>{V()},p.maxDurationMs??_r),fe(S)}).catch(A=>{if(S!==W){fe(S);return}m(),ke(Q(A),S)})})}catch(f){return m(),Promise.reject(Q(f))}}async function V(){if(g.value.status==="requesting")return W+=1,he(),m(),X(),z();const f=c;if(!f){const S=g.value.mimeType;return X(),z(S)}if(M)return M;if(f.state==="inactive"){const S=f.mimeType||g.value.mimeType;return m(),X(),z(S)}return g.value={...g.value,status:"stopping",error:null},D(),M=new Promise((S,Z)=>{N=S,$=Z;const G=f.mimeType||g.value.mimeType||Mt;f.onstop=()=>{const A=new Blob(w,{type:G});m(),X(),I(A)},f.onerror=A=>{const le=Q(A.error??new Error(p.messages?.recordingFailed||"Microphone recording failed."));m(),R(le)};try{f.stop()}catch(A){const le=Q(A);m(),R(le)}}),M}function L(){W+=1;const f=c;if(D(),f&&(f.ondataavailable=null,f.onstop=null,f.onerror=null,f.state!=="inactive"))try{f.stop()}catch{}m(),he(),se(),X()}return{state:g,isRecording:T,stream:a,start:C,stop:V,cancel:L}}function yl(p){return p instanceof Error?p:new Error(String(p))}var mr,Mt,_r,yr,kl=q((()=>{Pe(),mr=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/wav"],Mt="audio/webm",_r=12e4,yr="Microphone capture is not supported in this browser."}));function wl(p){let g=0;return function(a,c={}){return g+=1,{id:`${p}:${g}`,seq:g,sessionId:p,type:a,captureId:c.captureId,turnId:c.turnId,timestamp:c.timestamp??new Date().toISOString(),final:c.final,payload:c.payload}}}var bl=q((()=>{}));function qt(p){return`${p}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function jn(p){return p instanceof Error?p:new Error(String(p))}function Sl(p){return p.replace(/\s+/g," ").trim()}function Cl(p){const g=qt("voice-session"),T=wl(g),a=y([]),c=y("idle"),b=y(null),w=y(null),i=y(""),M=y(null),N=_(()=>c.value!=="idle");function $(m,I={}){const R=T(m,{...I,captureId:I.captureId??b.value??void 0,turnId:I.turnId??w.value??void 0});return a.value.push(R),a.value.length>50&&a.value.splice(0,a.value.length-50),R}function O(m,I={}){const R=jn(m);return M.value=R,c.value="error",$("session.error",{captureId:I.captureId,turnId:I.turnId,final:!0,payload:R}),R}function U(m={}){const I=m.captureId??b.value,R=m.turnId??w.value;R&&$("turn.cancelled",{captureId:I??void 0,turnId:R,final:!0}),I&&$("capture.cancelled",{captureId:I,turnId:R??void 0,final:!0}),b.value=null,w.value=null,i.value="",M.value=null,c.value="idle"}$("session.started",{final:!0});async function ae(){try{await Promise.resolve(p.stopOutputAudio?.())}catch(I){console.warn("[useVoiceDialogue] Failed to stop output audio before capture:",jn(I))}(b.value||w.value)&&U(),M.value=null,i.value="",c.value="capturing",w.value=null;const m=qt("capture");return b.value=m,$("capture.started",{captureId:m}),{captureId:m}}async function W(m,I){if(b.value!==m)return;const R=Sl(I);if(!R){i.value="",Q(m);return}M.value=null,i.value=R,c.value="sending",$("transcript.done",{captureId:m,final:!0,payload:{text:R}});const se=qt("turn");w.value=se,$("turn.started",{captureId:m,turnId:se,payload:{text:R}});try{await Promise.resolve(p.sendMessage(R))}catch(fe){if(b.value===m&&w.value===se)throw O(fe,{captureId:m,turnId:se}),fe;return}b.value!==m||w.value!==se||($("turn.ended",{captureId:m,turnId:se,final:!0,payload:{text:R}}),b.value=null,w.value=null,i.value="",c.value="idle")}async function X(m,I){if(b.value===m){M.value=null,c.value="transcribing";try{const R=await p.transcribe(I);if(b.value!==m)return;await W(m,R.text)}catch(R){if(b.value===m)throw M.value===null&&O(R,{captureId:m,turnId:w.value??void 0}),R;return}}}function Q(m=b.value){!m||b.value!==m||U({captureId:m,turnId:w.value})}function D(m){$("output.audio.started",{payload:m})}function Y(m){$("output.audio.done",{final:!0,payload:m})}return{sessionId:g,events:a,status:c,activeCaptureId:b,activeTurnId:w,transcript:i,error:M,isBusy:N,beginCapture:ae,transcribeAndSend:X,commitTranscript:W,cancelCapture:Q,markOutputStarted:D,markOutputDone:Y}}var xl=q((()=>{Pe(),bl()}));function jt(p){return p instanceof Error?p:new Error(String(p))}function Tt(p){return p.replace(/\s+/g," ").trim()}function $t(p){return Tt(p.filter(Boolean).join(" "))}function Ml(p){return Tt(p?.[0]?.transcript??"")}function Il(p){const g=p.results,T=typeof p.resultIndex=="number"?p.resultIndex:0,a=[],c=[];if(!g||typeof g.length!="number")return{finalText:"",interimText:""};for(let b=T;b<g.length;b+=1){const w=g[b],i=Ml(w);i&&(w?.isFinal?a.push(i):c.push(i))}return{finalText:$t(a),interimText:$t(c)}}function Hn(){if(typeof window>"u")return null;const p=window;return p.SpeechRecognition??p.webkitSpeechRecognition??null}function Tl(p={}){const g=y(!!Hn()),T=y("idle"),a=y(""),c=y(""),b=y(null),w=y(null);let i=null,M=0,N=null,$=null,O=null,U=null;function ae(){return p.messages?.unsupported||kr}function W(E){const C=E?.trim();return C&&p.messages?.failedWithReason?p.messages.failedWithReason(C):C?`Browser speech recognition failed: ${C}.`:p.messages?.failed||"Browser speech recognition failed."}function X(){U!==null&&(clearTimeout(U),U=null)}function Q(){N=null,$=null,O=null,X()}function D(E){E&&(E.onresult=null,E.onerror=null,E.onend=null)}function Y(E){const C=$;Q(),C?.(Tt(E))}function m(E){const C=O,V=jt(E);Q(),C?.(V)}function I(E={}){T.value="idle",E.clearTranscript&&(a.value=""),c.value="",E.clearError&&(b.value=null,w.value=null)}function R(){return $t([a.value,c.value])}function se(E,C,V,L){const f=new E;return i=f,f.lang=V,f.interimResults=!0,f.continuous=L,f.onresult=S=>{if(C!==M||i!==f)return;const{finalText:Z,interimText:G}=Il(S);Z&&(a.value=$t([a.value,Z])),c.value=G},f.onerror=S=>{const Z=typeof S.error=="string"?S.error:void 0;he(C,new Error(W(Z)),Z)},f.onend=()=>{if(!(C!==M||i!==f)){if(T.value==="listening"&&!N){i=null,D(f),c.value="";try{se(E,C,V,L).start()}catch(S){he(C,S)}return}ke(C)}},f}function fe(){b.value=null,w.value=null,T.value==="error"&&(T.value="idle")}function ke(E,C=R()){if(E!==M)return;const V=i;i=null,D(V),I(),Y(C)}function he(E,C,V){if(E!==M)return jt(C);const L=jt(C),f=i;return i=null,D(f),c.value="",T.value="error",b.value=L,w.value=V?.trim()||null,m(L),L}async function z(E={}){const C=Hn();if(g.value=!!C,!C){const le=new Error(ae());throw T.value="error",b.value=le,le}ye();const V=++M,L=typeof E.language=="string"?E.language.trim():"",f=typeof document<"u"?document.documentElement.lang.trim():"",S=typeof navigator<"u"?navigator.language?.trim():"",Z=L||f||S||"en-US",G=E.continuous!==!1;a.value="",c.value="",b.value=null,w.value=null,T.value="listening";const A=se(C,V,Z,G);try{A.start()}catch(le){throw he(V,le)}}function H(){const E=M,C=i;return C?N||(T.value="stopping",N=new Promise((V,L)=>{$=V,O=L,X(),U=setTimeout(()=>{ke(E)},wr);try{C.stop()}catch(f){he(E,f)}}),N):(T.value!=="error"&&I(),Promise.resolve(Tt(R())))}function ye(){M+=1;const E=i;i=null,D(E);try{E?.abort()}catch{}Y(""),I({clearTranscript:!0,clearError:!0})}return{isSupported:g,status:T,transcript:a,partialTranscript:c,error:b,errorCode:w,start:z,stop:H,cancel:ye,clearError:fe}}var kr,wr,$l=q((()=>{Pe(),kr="Browser speech recognition is not supported in this browser.",wr=1e3}));function Pl(){if(typeof navigator>"u")return!1;const p=navigator.userAgent||"";if(/Android|iPhone|iPad|iPod|Mobile/i.test(p))return!0;const g=navigator.maxTouchPoints>1,a=!!(typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse), (any-pointer: coarse)"):null)?.matches,c=typeof window<"u"&&window.screen?Math.min(window.screen.width,window.screen.height):Number.POSITIVE_INFINITY;return g&&a&&c<=1024}var El=q((()=>{})),Kn,Wn,Qn,Yn,Zn,Gn,Jn,Xn,ea,ta,na,aa,oa,ra,sa,la,ia,ua,ca,da,va,pa,fa,ga,ha,ma,_a,ya,ka,wa,ba,Sa,Ca,xa,Ma,Ia,Ta,$a,Pa,Ea,La,Ba,Ra,Aa,Da,Fa,Va,za,Na,Oa,Ua,qa,ja,Ha,Ka,Ct,Wa,br,Qa=q((()=>{Pe(),or(),xs(),Es(),Ds(),Ts(),ll(),ir(),cr(),Wt(),He(),lr(),zs(),gl(),ml(),kl(),js(),Ys(),xl(),Qs(),Ws(),$l(),Bs(),Gs(),ms(),El(),Kn={class:"chat-input-area"},Wn={key:0,class:"attachment-previews"},Qn=["src","alt"],Yn={key:1,class:"attachment-file"},Zn={class:"file-name"},Gn={class:"file-size"},Jn={key:2,class:"attachment-context"},Xn=["onClick"],ea={key:1,class:"message-reference-preview"},ta={class:"message-reference-text"},na=["aria-label","title"],aa=["title"],oa={key:0,class:"context-usage-row"},ra={class:"context-bar"},sa=["placeholder"],la={class:"input-toolbar"},ia={class:"input-top-bar"},ua={class:"reasoning-effort-label"},ca={class:"reasoning-effort-slider-heading"},da={class:"reasoning-effort-slider-range","aria-hidden":"true"},va={class:"input-settings-label"},pa={class:"input-model-label"},fa={class:"input-actions"},ga={key:0,width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},ha={key:1,width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},ma={class:"visually-hidden"},_a=["onMousedown","onMouseenter"],ya={class:"slash-command-name"},ka={key:0,class:"slash-command-args"},wa={class:"slash-command-desc"},ba={key:0,class:"skill-picker-modal"},Sa=["placeholder"],Ca={class:"skill-picker-list"},xa={key:0,class:"skill-picker-empty"},Ma=["onClick","onKeydown"],Ia={class:"skill-picker-command"},Ta={class:"skill-picker-name"},$a={class:"skill-picker-desc"},Pa={key:2,class:"skill-picker-empty"},Ea={key:0,class:"skill-picker-modal"},La={class:"bundle-picker-toolbar"},Ba=["placeholder"],Ra={class:"skill-picker-list"},Aa={key:0,class:"skill-picker-empty"},Da=["onClick"],Fa={class:"skill-picker-command"},Va={class:"skill-picker-name"},za={key:0,class:"skill-picker-desc"},Na={class:"bundle-picker-skills"},Oa=["disabled","aria-label","title","onClick"],Ua={key:2,class:"skill-picker-empty"},qa={class:"context-edit-content"},ja={style:{"margin-bottom":"16px",color:"#666"}},Ha={style:{"margin-top":"12px","font-size":"12px",color:"#999"}},Ka={style:{display:"flex","justify-content":"flex-end",gap:"8px"}},Ct="hermes_chat_input_drafts_v1",Wa=256e3,br=je({__name:"ChatInput",props:{modelLabel:{default:""}},emits:["modelClick","voiceClick"],setup(p,{expose:g,emit:T}){const a=rr(),c=bs(),b=Ps(),w=As(),{t:i}=Ke(),M=ar(),N=ys(),{toolTraceVisible:$,toggleToolTraceVisible:O}=sr(),U=p,ae=T,W=_(()=>[{label:i("chat.reasoningEffort.options.default"),value:""},{label:i("chat.reasoningEffort.options.none"),value:"none"},{label:i("chat.reasoningEffort.options.minimal"),value:"minimal"},{label:i("chat.reasoningEffort.options.low"),value:"low"},{label:i("chat.reasoningEffort.options.medium"),value:"medium"},{label:i("chat.reasoningEffort.options.high"),value:"high"},{label:i("chat.reasoningEffort.options.xhigh"),value:"xhigh"},{label:i("chat.reasoningEffort.options.max"),value:"max"}]),X=_(()=>a.activeSession?.reasoningEffort||""),Q=_(()=>{const e=W.value.findIndex(n=>n.value===X.value);return e>=0?e:0}),D=["#94a3b8","#2ac8e9","#2bd9b4","#4ed786","#b9d93a","#f9c33c","#f77734","#ef4444"],Y=_(()=>({"--reasoning-effort-accent-color":D[Q.value]||D[0]})),m=_(()=>a.activeSession?.provider==="moa"),I=_(()=>{const e=X.value;return e?W.value.find(n=>n.value===e)?.label||e:i("chat.reasoningEffort.defaultLabel")});function R(e){const n=a.activeSessionId;n&&a.setSessionReasoningEffort(n,e||"")}function se(e){return W.value[Math.round(e)]?.label||I.value}function fe(e){const n=Array.isArray(e)?e[0]:e,l=W.value[Math.round(n)];l&&R(l.value)}function ke(){ae("modelClick")}const he=_(()=>{const e=U.modelLabel||i("models.selectModel"),n=e.split("/").filter(Boolean);return n[n.length-1]||e}),z=y(""),H=y(),ye=y(),E=y(),C=y([]),V=y(!1),L=y(0),f=y(!1),S=_(()=>a.activeMessageReference),Z=_(()=>S.value?.content.replace(/\s+/g," ").trim()||""),G=y(typeof window<"u"?Cn(window.innerWidth):!1),A=y(!1),le=Zs(),ge=_l({messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),ue=Sn({voiceActivityThreshold:.02,messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),oe=Sn({continuous:!0,maxSegmentDurationMs:1e3,onChunk:hn,messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),ee=Hs(),we=Tl({messages:{unsupported:i("chat.voiceInput.browserSpeechUnsupported"),failed:i("chat.voiceInput.browserSpeechFailed"),failedWithReason:e=>i("chat.voiceInput.browserSpeechFailedWithReason",{error:e})}}),j=y(null),Se=y(""),be=y(null);let ve=null,K=0,Ee=Promise.resolve(),Ce=null;const Ye=_(()=>G.value?null:xn(w.display.chat_input_height));function ze(e){return e.replace(/\s+/g," ").trim()}function ut(){return ee.provider.value==="custom"?{provider:"custom",language:ee.customLanguage.value.trim()||void 0,prompt:ee.customPrompt.value.trim()||void 0}:ee.provider.value==="doubao"?{provider:"doubao"}:ee.provider.value!=="browser"?{provider:ee.provider.value}:{provider:"openai",language:ee.openaiLanguage.value.trim()||void 0,prompt:ee.openaiPrompt.value.trim()||void 0}}function Ze(){return ee.openaiLanguage.value.trim()||ee.customLanguage.value.trim()||""}function Et(e){const n=ze(e);if(!n)return;const l=H.value,B=z.value,J=l?.selectionStart??B.length,de=l?.selectionEnd??J,Re=B.slice(0,J),zt=B.slice(de),yn=Re&&!/\s$/.test(Re)?" ":"",us=`${Re}${yn}${n}${zt&&!/^\s/.test(zt)?" ":""}${zt}`,kn=Re.length+yn.length+n.length;z.value=us,te.value=!1,pe(()=>{const St=H.value;St&&(St.focus(),St.setSelectionRange(kn,kn),Rt(St))})}function r(){const e=a.activeSessionId;e&&a.clearMessageReference(e),H.value?.focus()}ie(()=>S.value?.id,e=>{e&&pe(()=>H.value?.focus())});const s=Cl({transcribe:async e=>{const{provider:n,language:l,prompt:B}=ut();return Ks({audio:e,provider:n,language:l,prompt:B})},sendMessage:async e=>{Et(e)},stopOutputAudio:()=>le.stop(!0)}),u=_(()=>j.value==="local"&&s.status.value==="capturing"?Se.value:j.value!=="browser"||s.status.value!=="capturing"?s.transcript.value:ze([we.transcript.value,we.partialTranscript.value].filter(Boolean).join(" "))),F=_(()=>ee.provider.value==="browser"||j.value==="browser"),ce=_(()=>s.error.value?.message??be.value?.message??(F.value?we.error.value?.message:null)??oe.error.value?.message??ue.error.value?.message??ge.state.value.error?.message??null),ct=_(()=>Rs.map(e=>({key:e.key,name:e.name,args:e.argsKey?i(e.argsKey):e.args||"",description:i(e.descriptionKey),insertText:e.insertText,opensSkillPicker:e.opensSkillPicker,opensBundlePicker:e.opensBundlePicker,opensBundleCreator:e.opensBundleCreator}))),te=y(!1),Yt=y(""),Le=y(0),dt=y([]),Ge=y(!1),Je=y(""),vt=y(!1);let pt="",Xe=null;const Te=y([]),Ne=y(!1),ft=y(!1),et=y(""),gt=y(!1),Lt=y("");let Oe="",ht=null,mt="";const xe=_(()=>{const e=a.activeSession;return e?e.source==="cli":a.runtimeMode!=="global_agent"}),Zt=_(()=>!!a.activeSession&&a.activeSession.source!=="coding_agent"),Gt=_(()=>{const e=new Map;for(const n of dt.value)for(const l of n.skills||[])l.enabled!==!1&&(e.has(l.name)||e.set(l.name,l));return[...e.values()].map(n=>{const l=Ir(n.name);return{key:`skill:${l}`,name:n.name,commandName:l,description:n.description||n.name}})}),Be=_(()=>{const e=Yt.value.trim().toLowerCase(),n=xe.value?ct.value:Zt.value?ct.value.filter(l=>l.name==="fork"):[];return e?n.filter(l=>{const B=l.name.toLowerCase(),J=l.insertText?.toLowerCase(),de=l.description.toLowerCase();return B.startsWith(e)||J?.startsWith(e)||de.includes(e)}):n}),Jt=_(()=>{const e=Je.value.trim().toLowerCase();return e?Gt.value.filter(n=>n.name.toLowerCase().includes(e)||n.commandName.includes(e)||n.description.toLowerCase().includes(e)):Gt.value}),Xt=_(()=>{const e=et.value.trim().toLowerCase();return e?Te.value.filter(n=>n.name.toLowerCase().includes(e)||n.commandName.includes(e)||n.description.toLowerCase().includes(e)||n.skills.some(l=>l.toLowerCase().includes(e))):Te.value});function Ir(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/_/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Me(){return a.activeSession?.profile||b.activeProfileName||"default"}async function Tr(){if(!xe.value)return;const e=Me();return pt===e||Xe||(Xe=(async()=>{try{const n=await ur(e);if(Me()!==e)return;dt.value=n.categories||[],pt=e}catch{if(Me()!==e)return;dt.value=[],pt=e}finally{Xe=null}})()),Xe}async function $r(){if(!xe.value)return;const e=Me();if(Oe===e)return;if(ht&&mt===e)return ht;const n=(async()=>{try{const l=await ul(e);if(Me()!==e)return;Te.value=l,Oe=e}catch{if(Me()!==e)return;Te.value=[],Oe=""}finally{mt===e&&(ht=null,mt="")}})();return ht=n,mt=e,n}const Ie=y(null),Pr=_(()=>{const e=Ie.value??Ye.value;return e===null?{}:{minHeight:`${e+71}px`}});function Bt(){typeof window>"u"||(G.value=Cn(window.innerWidth))}function Er(){A.value=!1,tt()}function Rt(e=H.value){!e||Ie.value!==null||(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,100)}px`)}function Lr(e){if(e.defaultPrevented)return;const n=e.target instanceof Element?e.target:null;n&&(n.closest(["button","input","textarea",'[role="button"]',".context-limit-editable",".input-toolbar",".resize-handle"].join(","))||H.value?.focus())}function tt(){if(A.value)return;Ie.value=Ye.value;const e=H.value;if(e){if(Ie.value===null){Rt(e);return}e.style.height=`${Ie.value}px`}}function Br(e){e.preventDefault();const n=H.value;if(!n)return;A.value=!0;const l=n.clientHeight,B=e.clientY;function J(Re){Ie.value=xn(l-(Re.clientY-B))??Ie.value}function de(){document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",de),document.body.style.cursor="",document.body.style.userSelect=""}document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",J),document.addEventListener("mouseup",de)}const Rr=_(()=>[{label:i("realtimeVoice.mode"),key:"voiceMode",icon:()=>wn("span",{class:"settings-voice-mode-icon","aria-hidden":"true"},"◉")},{label:i("chat.showToolCalls"),key:"toolTrace",icon:()=>wn("span",{class:["settings-check",{active:$.value}],"aria-hidden":"true"},$.value?"✓":"")}]);function en(){try{const e=JSON.parse(localStorage.getItem(Ct)||"{}");return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function tn(){return a.activeSessionId||a.activeSession?.id||""}function nn(){const e=tn();z.value=e&&en()[e]||""}function an(e){const n=tn();if(!n)return;const l=en();e?l[n]=e:delete l[n],Object.keys(l).length>0?localStorage.setItem(Ct,JSON.stringify(l)):localStorage.removeItem(Ct)}it(()=>{nn(),Bt(),window.addEventListener("resize",Bt),pe(()=>{tt()})});function Ar(e){if(e==="voiceMode"){a.activeSessionId&&ae("voiceClick");return}e==="toolTrace"&&O()}ie(z,e=>{an(e)}),ie(()=>a.activeSession?.id,()=>{nn(),pe(()=>{tt()})}),ie(Ye,()=>{tt()}),ie(()=>w.display.chat_input_height,()=>{A.value=!1,tt()}),ie(()=>[a.activeSession?.profile,b.activeProfileName],()=>{pt="",dt.value=[],Oe="",Te.value=[]});const on=_(()=>z.value.trim().length>0||C.value.length>0),Ue=_(()=>a.isStreaming&&!on.value);function rn(){pe(()=>{ye.value&&ye.value.querySelector(".active")?.scrollIntoView({block:"nearest",behavior:"instant"})})}function sn(){if(!xe.value&&!Zt.value){te.value=!1;return}const e=H.value;if(!e)return;const n=e.selectionStart,l=z.value.slice(0,n);if(!l.startsWith("/")||l.includes(" ")||l.includes(`
|
|
3
|
-
`)){te.value=!1;return}Yt.value=l.slice(1),Le.value=0,te.value=Be.value.length>0}function ln(e){if(e.opensSkillPicker){te.value=!1,un();return}if(e.opensBundlePicker){te.value=!1,cn();return}if(e.opensBundleCreator){te.value=!1,Dt();return}z.value=`/${e.insertText||e.name} `,te.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}async function un(){if(xe.value){te.value=!1,Je.value="",Ge.value=!0,vt.value=!0;try{await Tr()}finally{vt.value=!1}}}function At(e){z.value=`/skill ${e.commandName} `,Ge.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}async function cn(){if(xe.value){te.value=!1,et.value="",Ne.value=!0,gt.value=!0;try{await $r()}finally{gt.value=!1}}}function Dt(){xe.value&&(te.value=!1,Ne.value=!1,ft.value=!0)}function dn(e){z.value=`/bundles ${e.commandName} `,Ne.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}function Dr(e){ft.value=!1,Oe="",Te.value=[e,...Te.value.filter(n=>n.commandName!==e.commandName)],dn(e)}function Fr(e){const n=Me();N.warning({title:i("chat.bundlePicker.deleteTitle"),content:i("chat.bundlePicker.deleteConfirm",{name:e.name}),positiveText:i("common.delete"),negativeText:i("common.cancel"),onPositiveClick:async()=>{Lt.value=e.commandName;try{await dl(n,e.commandName),Me()===n?Te.value=Te.value.filter(l=>l.commandName!==e.commandName):Oe="",M.success(i("chat.bundlePicker.deleted"))}catch(l){return M.error(`${i("chat.bundlePicker.deleteFailed")}: ${l?.message||""}`),!1}finally{Lt.value=""}}})}const Fe=y(256e3);let _t="",yt="",nt=null;const at=y(!1),Ve=y(256e3),kt=y(!1);async function Vr(){Ve.value=Fe.value,at.value=!0}async function zr(){if(!Ve.value||Ve.value<=0){M.error(i("chat.contextEditInvalid"));return}kt.value=!0;try{const e=a.activeSession?.provider||c.selectedProvider||"",n=a.activeSession?.model||c.selectedModel||"";if(!e||!n){M.error(i("chat.contextEditFailed"));return}await sl(e,n,Ve.value),Fe.value=Ve.value,_t=wt(),at.value=!1,M.success(i("chat.contextEditSuccess"))}catch(e){M.error(`${i("chat.contextEditFailed")}: ${e.message||""}`)}finally{kt.value=!1}}function vn(){const e=a.activeSession;return{profile:e?.profile||b.activeProfileName||void 0,provider:e?.provider||void 0,model:e?.model||void 0}}function wt(){const e=vn();return`${e.profile||""}|${e.provider||""}|${e.model||""}`}async function pn(){const e=wt();if(e!==_t)return e===yt&&nt||(yt=e,nt=(async()=>{const n=vn();try{const l=await $s(n.profile,n.provider,n.model);if(wt()!==e)return;Fe.value=l,_t=e}catch{if(wt()!==e)return;Fe.value=Wa,_t=e}finally{yt===e&&(nt=null,yt="")}})()),nt}it(pn),ie(()=>[b.activeProfileName,c.selectedProvider,c.selectedModel,a.activeSession?.id,a.activeSession?.profile,a.activeSession?.provider,a.activeSession?.model,a.activeSession?.source],pn,{flush:"post"});const Ft=_(()=>{const e=a.activeSession?.contextTokens;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:(a.activeSession?.inputTokens??0)+(a.activeSession?.outputTokens??0)}),Nr=_(()=>!!a.activeSession),Or=_(()=>Math.max(0,Fe.value-Ft.value)),ot=_(()=>Math.min(Ft.value/Fe.value*100,100));function Vt(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function fn(e,n){if(C.value.find(J=>J.name===e.name))return;const l=Date.now().toString(36)+Math.random().toString(36).slice(2,8),B=URL.createObjectURL(e);C.value.push({id:l,name:e.name,type:e.type,size:e.size,url:B,file:e,...n?.trim()?{context:n.trim()}:{}})}function bt(e){for(const n of e)fn(n);e.length>0&&H.value?.focus()}function Ur(e,n){fn(e,n),H.value?.focus()}function qr(){E.value?.click()}function jr(e){const n=e.target;n.files&&(bt(Array.from(n.files)),n.value="")}function Hr(e){const n=Ns(e.clipboardData);n.length&&(e.preventDefault(),bt(n))}function Kr(e){e.preventDefault()}function Wr(e){e.preventDefault(),e.dataTransfer?.types.includes("Files")&&(L.value++,V.value=!0)}function Qr(){L.value--,L.value<=0&&(L.value=0,V.value=!1)}function Yr(e){e.preventDefault(),L.value=0,V.value=!1;const n=Array.from(e.dataTransfer?.files||[]);n.length&&bt(n)}g({addFiles:bt,addBrowserAttachment:Ur});function gn(){const e=z.value.trim();if(!(!e&&C.value.length===0)){if(xe.value&&e==="/skill"&&C.value.length===0){un();return}if(xe.value&&C.value.length===0&&/^\/bundles$/i.test(e)){cn();return}if(xe.value&&C.value.length===0&&/^\/bundles\s+create$/i.test(e)){Dt();return}a.sendMessage(e,C.value.length>0?C.value:void 0),z.value="",an(""),C.value=[],te.value=!1,H.value&&(H.value.style.height="auto")}}function Zr(){K+=1,Ee=Promise.resolve(),Ce=null,Se.value="",be.value=null}async function qe(){const e=ve;ve=null,e&&await bn(e).catch(()=>{})}function Gr(e,n){if(n!==K)return;Ce=e,be.value=e instanceof Error?e:new Error(String(e)),oe.cancel(),j.value=null;const l=s.activeCaptureId.value;K+=1,qe(),s.cancelCapture(l)}function hn(e){const n=K,l=ve;return!l||e.size<=44||(Ee=Ee.then(async()=>{if(n!==K)return;const B=await Os(l,e);n===K&&(Se.value=ze(B.text))}).catch(B=>Gr(B,n))),Ee}async function Jr(){we.clearError(),be.value=null;const{captureId:e}=await s.beginCapture(),n=ee.provider.value==="browser",l=ee.provider.value==="local",B=!n&&!l&&(ps()||Pl());j.value=n?"browser":l?"local":B?"pcm":"backend";try{if(n){await we.start({language:Ze()});return}if(l){Zr();const J=K,de=await Us();if(J!==K||j.value!=="local"||s.activeCaptureId.value!==e){await bn(de.sessionId).catch(()=>{});return}ve=de.sessionId,await oe.start();return}B?await ue.start():await ge.start()}catch(J){l&&(be.value=J instanceof Error?J:new Error(String(J)),K+=1,oe.cancel(),await qe()),j.value=null,s.cancelCapture(e)}}async function Xr(){const e=s.activeCaptureId.value;if(!e)return;if(j.value==="browser"){let B="";try{B=await we.stop()}catch{j.value=null,s.cancelCapture(e);return}j.value=null;try{await s.commitTranscript(e,B)}catch{}return}if(j.value==="local"){const B=K,J=ve;if(!J||oe.status.value==="requesting"){K+=1,oe.cancel(),j.value=null,await qe(),s.cancelCapture(e);return}try{const de=await oe.stop();if(de&&hn(de),await Ee,B!==K)return;if(Ce)throw Ce;ve=null;const Re=await qs(J);if(B!==K)return;Se.value=ze(Re.text)||Se.value,j.value=null,await s.commitTranscript(e,Se.value),Se.value=""}catch(de){if(B!==K)return;be.value=de instanceof Error?de:new Error(String(de)),K+=1,oe.cancel(),j.value=null,await qe(),s.cancelCapture(e)}return}const n=j.value==="pcm";if((n?ue.status.value:ge.state.value.status)==="requesting"){n?ue.cancel():ge.cancel(),j.value=null,s.cancelCapture(e);return}let l;try{l=n?await ue.stop():await ge.stop()}catch{j.value=null,s.cancelCapture(e);return}if(j.value=null,!l||l.size<=0){s.cancelCapture(e);return}try{await s.transcribeAndSend(e,l)}catch{}}function es(){j.value==="browser"?we.cancel():j.value==="local"?(K+=1,oe.cancel(),qe(),Se.value="",be.value=null):j.value==="pcm"?ue.cancel():ge.cancel(),j.value=null,s.cancelCapture()}function ts(){f.value=!0}function ns(){requestAnimationFrame(()=>{f.value=!1,sn()})}function as(e){return f.value||e.isComposing||e.keyCode===229}function os(e){if(te.value&&Be.value.length>0){if(e.key==="ArrowDown"){e.preventDefault(),Le.value=(Le.value+1)%Be.value.length,rn();return}if(e.key==="ArrowUp"){e.preventDefault(),Le.value=(Le.value-1+Be.value.length)%Be.value.length,rn();return}if(e.key==="Enter"||e.key==="Tab"){e.preventDefault(),ln(Be.value[Le.value]);return}if(e.key==="Escape"){e.preventDefault(),te.value=!1;return}}e.key!=="Enter"||e.shiftKey||as(e)||(e.preventDefault(),gn())}function rs(e){const n=e.target;f.value||sn(),Ie.value===null&&Rt(n)}function ss(e){Le.value=e}function mn(e){if(!te.value)return;const n=e.target;!n.closest(".slash-command-dropdown")&&!n.closest(".input-wrapper")&&(te.value=!1)}it(()=>{document.addEventListener("mousedown",mn)}),hs(()=>{document.removeEventListener("mousedown",mn),window.removeEventListener("resize",Bt),j.value==="local"&&(K+=1,oe.cancel(),qe())});function ls(e){const n=C.value.findIndex(l=>l.id===e);n!==-1&&(URL.revokeObjectURL(C.value[n].url),C.value.splice(n,1))}function is(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function _n(e){return e.startsWith("image/")}return(e,n)=>(v(),h("div",Kn,[C.value.length>0?(v(),h("div",Wn,[(v(!0),h(De,null,Ae(C.value,l=>(v(),h("div",{key:l.id,class:_e(["attachment-preview",{image:_n(l.type),"has-context":!!l.context}])},[_n(l.type)?(v(),h("img",{key:0,src:l.url,alt:l.name,class:"attachment-thumb"},null,8,Qn)):(v(),h("div",Yn,[n[11]||(n[11]=t("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),t("polyline",{points:"14 2 14 8 20 8"})],-1)),t("span",Zn,d(l.name),1),t("span",Gn,d(is(l.size)),1)])),l.context?(v(),h("details",Jn,[t("summary",null,d(o(i)("browser.selectionData")),1),t("pre",null,d(l.context),1)])):x("",!0),t("button",{class:"attachment-remove",onClick:B=>ls(l.id)},[...n[12]||(n[12]=[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,Xn)],2))),128))])):x("",!0),S.value?(v(),h("div",ea,[t("span",ta,d(Z.value),1),t("button",{type:"button",class:"message-reference-remove","aria-label":o(i)("chat.cancelReference"),title:o(i)("chat.cancelReference"),onClick:$e(r,["stop"])},[...n[13]||(n[13]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,na)])):x("",!0),t("div",{class:_e(["input-wrapper",{"drag-over":V.value}]),style:st(Pr.value),onDragover:Kr,onDragenter:Wr,onDragleave:Qr,onDrop:Yr,onMousedown:Lr},[t("input",{ref_key:"fileInputRef",ref:E,type:"file",multiple:"",class:"file-input-hidden",onChange:jr},null,544),t("div",{class:"resize-handle",title:o(i)("chat.inputHeightResizeHint"),onMousedown:Br,onDblclick:Er},null,40,aa),Nr.value?(v(),h("div",oa,[t("span",{class:_e(["context-info",{"context-warning":ot.value>80}])},[ne(d(Vt(Ft.value))+" / ",1),P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[t("span",{class:"context-limit-editable",onClick:Vr},d(Vt(Fe.value)),1)]),default:k(()=>[t("span",null,d(o(i)("chat.contextClickToEdit")),1)]),_:1},8,["disabled"]),ne(" · "+d(o(i)("chat.contextRemaining"))+" "+d(Vt(Or.value)),1)],2),t("div",ra,[t("div",{class:_e(["context-bar-fill",{"context-bar-warn":ot.value>60&&ot.value<=80,"context-bar-danger":ot.value>80}]),style:st({width:`${ot.value}%`})},null,6)])])):x("",!0),Nt(t("textarea",{ref_key:"textareaRef",ref:H,"onUpdate:modelValue":n[0]||(n[0]=l=>z.value=l),class:"input-textarea",dir:"auto",style:st(Ie.value?{height:Ie.value+"px"}:{}),placeholder:o(i)("chat.inputPlaceholder"),rows:"1",onKeydown:os,onCompositionstart:ts,onCompositionend:ns,onInput:rs,onPaste:Hr},null,44,sa),[[Ut,z.value]]),t("div",la,[t("div",ia,[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",onClick:qr,circle:"",class:"toolbar-icon-button"},{icon:k(()=>[...n[14]||(n[14]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},[t("path",{d:"M12 5v14"}),t("path",{d:"M5 12h14"})],-1)])]),_:1})]),default:k(()=>[ne(" "+d(o(i)("chat.attachFiles")),1)]),_:1},8,["disabled"]),m.value?x("",!0):(v(),me(o(Ss),{key:0,trigger:"click",placement:"top-start"},{trigger:k(()=>[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:_e(["reasoning-effort-button",{active:!!X.value}]),style:st(Y.value),"aria-label":`${o(i)("chat.reasoningEffort.tooltip")}: ${I.value}`},{icon:k(()=>[...n[15]||(n[15]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z"}),t("path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z"})],-1)])]),default:k(()=>[t("span",ua,d(I.value),1),n[16]||(n[16]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["class","style","aria-label"])]),default:k(()=>[ne(" "+d(o(i)("chat.reasoningEffort.tooltip"))+": "+d(I.value),1)]),_:1},8,["disabled"])]),default:k(()=>[t("div",{class:"reasoning-effort-slider-popover",style:st(Y.value)},[t("div",ca,[t("span",null,d(o(i)("chat.reasoningEffort.tooltip")),1),t("strong",null,d(I.value),1)]),P(o(Cs),{class:_e(["reasoning-effort-slider",{"reasoning-effort-slider--max":X.value==="max"}]),value:Q.value,min:0,max:W.value.length-1,step:1,"format-tooltip":se,"onUpdate:value":fe},null,8,["class","value","max"]),t("div",da,[t("span",null,d(W.value[0].label),1),t("span",null,d(W.value[W.value.length-1].label),1)])],4)]),_:1})),P(o(cs),{trigger:"click",options:Rr.value,"show-arrow":!0,onSelect:Ar},{default:k(()=>[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:"input-settings-button","aria-label":o(i)("sidebar.settings")},{icon:k(()=>[...n[17]||(n[17]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"3"}),t("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06A2 2 0 1 1 7.04 4.3l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h.08a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c.2.6.77 1 1.4 1H21a2 2 0 1 1 0 4h-.09c-.63 0-1.2.4-1.51 1Z"})],-1)])]),default:k(()=>[t("span",va,d(o(i)("sidebar.settings")),1),n[18]||(n[18]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["aria-label"])]),default:k(()=>[ne(" "+d(o(i)("sidebar.settings")),1)]),_:1},8,["disabled"])]),_:1},8,["options"]),P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:"input-model-button",title:G.value?void 0:U.modelLabel||o(i)("models.selectModel"),"aria-label":U.modelLabel||o(i)("models.selectModel"),onClick:ke},{icon:k(()=>[...n[19]||(n[19]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"3"}),t("path",{d:"M12 1v4"}),t("path",{d:"M12 19v4"}),t("path",{d:"M1 12h4"}),t("path",{d:"M19 12h4"}),t("path",{d:"M4.22 4.22l2.83 2.83"}),t("path",{d:"M16.95 16.95l2.83 2.83"}),t("path",{d:"M4.22 19.78l2.83-2.83"}),t("path",{d:"M16.95 7.05l2.83-2.83"})],-1)])]),default:k(()=>[t("span",pa,d(he.value),1),n[20]||(n[20]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["title","aria-label"])]),default:k(()=>[ne(" "+d(U.modelLabel||o(i)("models.selectModel")),1)]),_:1},8,["disabled"])]),t("div",fa,[P(fr,{status:o(s).status.value,transcript:u.value,error:ce.value,events:o(s).events.value,"on-start":Jr,"on-stop":Xr,"on-cancel":es},null,8,["status","transcript","error","events"]),P(o(re),{size:"medium",type:"primary",circle:"",class:_e(["send-button",{"send-button--stop":Ue.value}]),disabled:Ue.value?o(a).isAborting:!on.value,"aria-label":Ue.value?"Stop":"Send",onClick:n[1]||(n[1]=l=>Ue.value?o(a).stopStreaming():gn())},{icon:k(()=>[Ue.value?(v(),h("svg",ga,[...n[21]||(n[21]=[t("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2.5",fill:"currentColor"},null,-1)])])):(v(),h("svg",ha,[...n[22]||(n[22]=[t("path",{d:"M12 19V5"},null,-1),t("path",{d:"m5 12 7-7 7 7"},null,-1)])]))]),default:k(()=>[t("span",ma,d(Ue.value?o(i)("chat.stop"):o(i)("chat.send")),1)]),_:1},8,["class","disabled","aria-label"])])]),P(lt,{name:"dropdown-fade"},{default:k(()=>[te.value&&Be.value.length>0?(v(),h("div",{key:0,ref_key:"commandDropdownRef",ref:ye,class:"slash-command-dropdown"},[(v(!0),h(De,null,Ae(Be.value,(l,B)=>(v(),h("div",{key:l.key,class:_e(["slash-command-item",{active:B===Le.value}]),onMousedown:$e(J=>ln(l),["prevent"]),onMouseenter:J=>ss(B)},[t("span",ya,"/"+d(l.name),1),l.args?(v(),h("span",ka,d(l.args),1)):x("",!0),t("span",wa,d(l.description),1)],42,_a))),128))],512)):x("",!0)]),_:1})],38),P(o(xt),{show:Ge.value,"onUpdate:show":n[3]||(n[3]=l=>Ge.value=l),title:o(i)("skills.title"),"mask-closable":!0,preset:"card",style:{width:"min(620px, calc(100vw - 32px))"}},{default:k(()=>[Ge.value?(v(),h("div",ba,[Nt(t("input",{"onUpdate:modelValue":n[2]||(n[2]=l=>Je.value=l),class:"skill-picker-search",placeholder:o(i)("skills.searchPlaceholder"),type:"search"},null,8,Sa),[[Ut,Je.value]]),t("div",Ca,[vt.value?(v(),h("div",xa,d(o(i)("common.loading")),1)):(v(!0),h(De,{key:1},Ae(Jt.value,l=>(v(),h("div",{key:l.key,role:"button",tabindex:"0",class:"skill-picker-item",onClick:B=>At(l),onKeydown:[It($e(B=>At(l),["prevent"]),["enter"]),It($e(B=>At(l),["prevent"]),["space"])]},[t("div",Ia,"/skill "+d(l.commandName),1),t("div",Ta,d(l.name),1),t("div",$a,d(l.description),1)],40,Ma))),128)),!vt.value&&Jt.value.length===0?(v(),h("div",Pa,d(Je.value?o(i)("skills.noMatch"):o(i)("skills.noSkills")),1)):x("",!0)])])):x("",!0)]),_:1},8,["show","title"]),P(o(xt),{show:Ne.value,"onUpdate:show":n[6]||(n[6]=l=>Ne.value=l),title:o(i)("chat.bundlePicker.title"),"mask-closable":!0,preset:"card",style:{width:"min(620px, calc(100vw - 32px))"}},{default:k(()=>[Ne.value?(v(),h("div",Ea,[t("div",La,[Nt(t("input",{"onUpdate:modelValue":n[4]||(n[4]=l=>et.value=l),class:"skill-picker-search",placeholder:o(i)("chat.bundlePicker.searchPlaceholder"),type:"search"},null,8,Ba),[[Ut,et.value]]),P(o(re),{type:"primary",onClick:Dt},{default:k(()=>[ne(d(o(i)("chat.bundlePicker.create")),1)]),_:1})]),t("div",Ra,[gt.value?(v(),h("div",Aa,d(o(i)("common.loading")),1)):(v(!0),h(De,{key:1},Ae(Xt.value,l=>(v(),h("div",{key:l.commandName,class:"skill-picker-item bundle-picker-item"},[t("button",{type:"button",class:"bundle-picker-select",onClick:B=>dn(l)},[t("span",Fa,"/bundles "+d(l.commandName),1),t("span",Va,d(l.name),1),l.description?(v(),h("span",za,d(l.description),1)):x("",!0),t("span",Na,d(o(i)("chat.bundlePicker.skillsLabel"))+": "+d(l.skills.length>0?l.skills.join(", "):o(i)("chat.bundlePicker.noSkills")),1)],8,Da),t("button",{type:"button",class:"bundle-picker-delete",disabled:Lt.value===l.commandName,"aria-label":o(i)("chat.bundlePicker.deleteBundle",{name:l.name}),title:o(i)("chat.bundlePicker.deleteBundle",{name:l.name}),onMousedown:n[5]||(n[5]=$e(()=>{},["stop"])),onClick:$e(B=>Fr(l),["stop"])},[...n[23]||(n[23]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[t("path",{d:"M3 6h18"}),t("path",{d:"M8 6V4h8v2"}),t("path",{d:"M19 6l-1 14H6L5 6"}),t("path",{d:"M10 11v5M14 11v5"})],-1)])],40,Oa)]))),128)),!gt.value&&Xt.value.length===0?(v(),h("div",Ua,d(et.value?o(i)("chat.bundlePicker.noMatch"):o(i)("chat.bundlePicker.noBundles")),1)):x("",!0)])])):x("",!0)]),_:1},8,["show","title"]),ft.value?(v(),me(hr,{key:Me(),profile:Me(),onClose:n[7]||(n[7]=l=>ft.value=!1),onCreated:Dr},null,8,["profile"])):x("",!0),P(o(xt),{show:at.value,"onUpdate:show":n[10]||(n[10]=l=>at.value=l),title:o(i)("chat.contextEditTitle"),"mask-closable":!0,preset:"card",style:{width:"400px"}},{footer:k(()=>[t("div",Ka,[P(o(re),{onClick:n[9]||(n[9]=l=>at.value=!1),disabled:kt.value},{default:k(()=>[ne(d(o(i)("chat.contextEditCancel")),1)]),_:1},8,["disabled"]),P(o(re),{type:"primary",onClick:zr,loading:kt.value},{default:k(()=>[ne(d(o(i)("chat.contextEditSave")),1)]),_:1},8,["loading"])])]),default:k(()=>[t("div",qa,[t("p",ja,d(o(i)("chat.contextEditDesc")),1),P(o(Ms),{value:Ve.value,"onUpdate:value":n[8]||(n[8]=l=>Ve.value=l),min:1e3,max:1e7,step:1e3,"show-button":!1,placeholder:o(i)("chat.contextEditPlaceholder"),style:{width:"100%"}},{suffix:k(()=>[...n[24]||(n[24]=[t("span",{style:{color:"#999"}},"tokens",-1)])]),_:1},8,["value","placeholder"]),t("div",Ha,d(o(i)("chat.contextEditHint")),1)])]),_:1},8,["show","title"])]))}})})),Ll=q((()=>{})),Bl,fi=q((()=>{Qa(),Qa(),Ll(),We(),Bl=Qe(br,[["__scopeId","data-v-bee7f717"]])})),Sr,Rl=q((()=>{Sr="/assets/gif/thinking-DoVDAdxi.gif"})),Ya,Za,Ga,Ja,Xa,eo,to,no,ao,Cr,oo=q((()=>{Pe(),He(),Rl(),fs(),Ya={class:"live-reasoning-status"},Za={class:"thinking-status"},Ga=["src"],Ja={class:"thinking-status-copy"},Xa={class:"thinking-status-label"},eo={class:"thinking-status-time"},to=["data-reasoning-id"],no={class:"live-reasoning-label"},ao={class:"live-reasoning-body"},Cr=je({__name:"LiveReasoningStatus",props:{reasoning:{},reasoningId:{},elapsed:{}},setup(p){const g=ds(async()=>(await vs(async()=>{const{default:a}=await import("./MarkdownRenderer-CVtmHZwc.js");return{default:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).default),{t:T}=Ke();return(a,c)=>(v(),h("div",Ya,[t("div",Za,[t("img",{src:o(Sr),alt:"","aria-hidden":"true",class:"thinking-avatar"},null,8,Ga),t("div",Ja,[t("span",Xa,d(o(T)("chat.thinkingInProgress")),1),t("span",eo,d(p.elapsed),1)])]),p.reasoning?(v(),h("div",{key:p.reasoningId??p.reasoning,class:"live-reasoning-detail","data-reasoning-id":p.reasoningId},[t("div",no,[c[0]||(c[0]=t("span",{"aria-hidden":"true"},"💭",-1)),t("span",null,d(o(T)("chat.thinkingLabel")),1)]),t("div",ao,[P(o(g),{content:p.reasoning},null,8,["content"])])],8,to)):x("",!0)]))}})})),Al=q((()=>{})),xr,Dl=q((()=>{oo(),oo(),Al(),We(),xr=Qe(Cr,[["__scopeId","data-v-9b0a7071"]])})),ro,so,lo,io,uo,co,vo,po,fo,go,ho,mo,_o,yo,ko,wo,bo,So,Co,xo,Mo,Io,To,$o,Po,Eo,Lo,Bo,Ro,Ao,Do,Fo,Vo,zo,No,Oo,Uo,qo,jo,Ho,Ko,Wo,Qo,Yo,Zo,Go,Jo,Xo,er,Ht,Mr,tr=q((()=>{Pe(),He(),Wt(),Vs(),Js(),Dl(),or(),lr(),ol(),rl(),ro={class:"message-list-shell"},so={class:"empty-state"},lo=["src","alt"],io={key:0,class:"history-archive-link-wrap"},uo=["href"],co={key:1,class:"history-loader"},vo={key:0,class:"history-loader-spinner"},po={key:0,class:"fork-divider",role:"separator"},fo={class:"fork-divider-pill"},go={class:"fork-divider-text"},ho=["href"],mo={key:0,class:"streaming-indicator"},_o={key:0,class:"tool-calls-panel"},yo={key:0,class:"tool-call-item compression-item"},ko={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},wo={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},bo={class:"tool-call-name"},So={key:2,class:"tool-call-spinner"},Co={key:1,class:"tool-call-item compression-item"},xo={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},Mo={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},Io={class:"tool-call-name"},To={key:2,class:"tool-call-spinner"},$o=["role","tabindex","title","onClick","onKeydown"],Po={class:"tool-call-name"},Eo=["title"],Lo=["title"],Bo={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"tool-call-success-icon"},Ro={key:3,class:"tool-call-spinner"},Ao={key:4,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"tool-call-error-icon"},Do=["aria-label","title"],Fo={key:1,class:"message-float-stack"},Vo={class:"float-panel-header"},zo={class:"approval-float-title"},No={class:"approval-float-desc"},Oo={class:"approval-float-command"},Uo={class:"approval-float-actions"},qo={key:0,class:"approval-float-panel"},jo={class:"float-panel-header"},Ho={class:"approval-float-title"},Ko={class:"approval-float-desc"},Wo={key:0,class:"approval-float-actions"},Qo={class:"clarify-float-input-row"},Yo={key:0,class:"queue-float-panel"},Zo={class:"queue-float-header"},Go={class:"queue-float-list"},Jo={class:"queue-index"},Xo={class:"queue-text"},er=["title","onClick"],Ht=new Map,Mr=je({__name:"MessageList",props:{approvalPortalToBody:{type:Boolean,default:!1},scrollScope:{default:"chat"}},setup(p,{expose:g}){const T=p,a=rr(),{t:c}=Ke(),{toolTraceVisible:b}=sr(),w=y(null),i=y(null),M=y(!1),N=y(0),$={frames:8,keepAliveMs:1200};let O=0,U=null;function ae(r){return r>=1e6?(r/1e6).toFixed(1)+"M":r>=1e3?(r/1e3).toFixed(1)+"K":String(r)}function W(r){return r<1?`${Math.round(r*1e3)}ms`:r<60?`${Math.round(r*10)/10}s`:`${Math.floor(r/60)}m ${Math.round(r%60)}s`}function X(r){const s=String(r||"");return s.length>160?`${s.slice(0,157)}...`:s}function Q(r){return tl(r.toolCallId)!==null}function D(r){Q(r)&&Xs(a.activeSessionId,r.toolCallId)}function Y(r){const s=Math.floor(r/1e3),u=Math.floor(s/3600),F=Math.floor(s%3600/60),ce=s%60;return u>0?`${u}h${F}m${ce}s`:F>0?`${F}m${ce}s`:`${ce}s`}function m(){U&&(clearInterval(U),U=null)}const I=_(()=>a.isRunActive||!!a.abortState),R=_(()=>Y(N.value)),se=_(()=>{const r=a.messages;let s=-1;for(let u=r.length-1;u>=0;u--)if(r[u].role==="user"||r[u].role==="command"){s=u;break}return[...r.filter((u,F)=>u.role==="tool"&&F>s)].reverse()}),fe=_(()=>se.value.filter(r=>!!r.toolName)),ke=_(()=>{if(!I.value)return null;const r=a.messages;let s=-1;for(let u=r.length-1;u>=0;u--)if(r[u].role==="user"||r[u].role==="command"){s=u;break}for(let u=r.length-1;u>s;u--){const F=r[u];if(F.role==="assistant"&&F.reasoning?.trim())return{messageId:F.id,reasoning:F.reasoning.trim()}}for(let u=r.length-1;u>s;u--){const F=r[u];if(F.role==="tool"&&F.reasoning?.trim())return{messageId:F.id,reasoning:F.reasoning.trim()}}return null}),he=_(()=>{const r=a.activeSession,s=r?.codingAgentId||(r?.agent==="codex"?"codex":r?.agent==="claude"?"claude-code":r?.agent==="ekko-agent"?"ekko-agent":void 0);return s==="codex"?{logo:"/coding-agents/codex-openai.png",alt:"Codex",text:c("chat.emptyStateAgent",{agent:"Codex"})}:s==="claude-code"?{logo:"/coding-agents/claude-code.svg",alt:"Claude Code",text:c("chat.emptyStateAgent",{agent:"Claude Code"})}:s==="ekko-agent"?{logo:"/coding-agents/ekko-agent.png",alt:"Ekko Agent",text:c("chat.emptyStateAgent",{agent:"Ekko Agent"})}:{logo:"/coding-agents/hermes.png",alt:"Hermes",text:c("chat.emptyState")}}),z=_(()=>{const r=a.messages,s=new Set(se.value.map(u=>u.id));return r.filter((u,F)=>{if(u.role==="tool")return b.value&&!!u.toolName&&!(a.isRunActive&&s.has(u.id));if(u.role==="assistant"&&u.id===ke.value?.messageId&&!u.content?.trim())return!1;if(u.role==="assistant"&&!u.isStreaming&&!u.content?.trim()&&u.reasoning?.trim()){const ce=r[F+1];return!(b.value&&ce?.role==="tool"&&ce.toolName&&ce.reasoning?.trim()===u.reasoning.trim())}return!0}).map(u=>u.role==="assistant"&&u.id===ke.value?.messageId&&u.content?.trim()&&u.reasoning?.trim()?{...u,reasoning:void 0}:u)});function H(r){return`fork-divider-${r}`}const ye=_(()=>{const r=z.value,s=ue.value,u=a.activeSession;if(!s||!u?.forkPointMessageId)return r;const F=String(u.forkPointMessageId),ce=r.findIndex(te=>String(te.id)===F);if(ce<0)return r;const ct={id:H(u.id),role:"system",content:"",timestamp:u.updatedAt||Date.now(),systemType:"fork-divider"};return[...r.slice(0,ce+1),ct,...r.slice(ce+1)]}),E=_(()=>{const r=a.activeSession,s=z.value.some(u=>u.role==="user"||u.role==="assistant");return!!r&&r.source!=="coding_agent"&&!a.isStreaming&&!a.isForkPending&&s}),C=_(()=>{const r=ye.value;for(let s=r.length-1;s>=0;s--){const u=r[s];if(u.role==="user"||u.role==="assistant")return u.id}return null}),V=_(()=>{const r=a.activeSessionId;return r?a.queuedUserMessages.get(r)||[]:[]}),L=_(()=>a.activePendingApproval),f=_(()=>a.activePendingClarify),S=y(""),Z=_(()=>!!L.value||!!f.value),G=_(()=>V.value.length>0&&Z.value?"20px 20px 380px":V.value.length>0||Z.value?"20px 20px 260px":"20px"),A=_(()=>{const r=a.activeSessionId;if(!r)return null;const s=a.activeSession?.id===r?a.activeSession:a.sessions.find(u=>u.id===r);return nl(T.scrollScope,{id:r,profile:s?.profile})}),le=_(()=>{const r=a.activeSession;return!!r?.hasMoreBefore&&(r.loadedMessageCount||0)>=300}),ge=_(()=>{const r=a.activeSession;if(!r?.id)return"#/hermes/history";const s=r.profile?`?profile=${encodeURIComponent(r.profile)}`:"";return`#/hermes/history/session/${encodeURIComponent(r.id)}${s}`}),ue=_(()=>{const r=a.activeSession;return r?.parentSessionId?{parentSessionId:r.parentSessionId,parentTitle:r.parentTitle||r.parentSessionId,parentHref:`#/hermes/history/session/${encodeURIComponent(r.parentSessionId)}${r.profile?`?profile=${encodeURIComponent(r.profile)}`:""}`,canSwitchParent:a.sessions.some(s=>s.id===r.parentSessionId),lastRole:r.parentLastMessageRole||"",lastMessage:r.parentLastMessage||""}:null});async function oe(r){const s=ue.value;if(s?.parentSessionId){if(s.canSwitchParent){r?.preventDefault(),await a.switchSession(s.parentSessionId);return}window.location.hash=s.parentHref.replace(/^#/,"")}}function ee(r){a.respondApproval(r)}function we(r){const s=r!==void 0?r:S.value.trim();a.respondToClarify(s),S.value=""}function j(r){const s=a.activeSessionId;s&&a.removeQueuedMessage(s,r)}function Se(r){const s=Ls(r),u=(s?.reply||s?.content||r).replace(/\s+/g," ").trim();return u.length>48?`${u.slice(0,48)}...`:u}function be(r=100){return w.value?.shouldAutoFollowBottom(r)??!0}function ve(r){w.value?.scrollToBottom(r),M.value=!1}function K(r){w.value?.scrollToMessage(r)}function Ee(r,s){w.value?.scrollToAnchor(r,s)}function Ce(){M.value=z.value.length>0&&!(w.value?.isNearBottom(1e3)??!0)}function Ye(){Ce()}function ze(){ve({frames:4,keepAliveMs:600})}function ut(r){if(!r)return;const s=w.value?.captureViewportPosition()??null;s&&al(Ht,r,s)}function Ze(r){if(A.value!==r)return;if(a.focusMessageId){i.value=null,K(a.focusMessageId);return}const s=Ht.get(r);if(s){i.value=null,s.wasNearBottom?ve($):w.value?.restoreViewportPosition(s);return}const u=a.activeSession;if(u?.parentSessionId&&u.forkPointMessageId){const F=H(u.id);if(ye.value.some(ce=>ce.id===F)){i.value=null,K(F);return}if(a.isLoadingMessages||a.messages.length===0)return}ve($),a.messages.length>0&&!a.isLoadingMessages&&(i.value=null)}async function Et(){const r=a.activeSession;if(!r?.hasMoreBefore||r.isLoadingOlderMessages||le.value)return;const s=w.value?.captureScrollPosition()??null;await a.loadOlderMessages(r.id)&&(await pe(),w.value?.restoreScrollPosition(s),Ce())}return ie(A,async(r,s)=>{ut(s),r&&(i.value=r,await pe(),Ze(r))},{immediate:!0}),ie(()=>[A.value,a.messages.length],([r,s])=>{!r||i.value!==r||s===0||(Ze(r),pe(Ce))},{flush:"post"}),ie(()=>z.value.length,()=>{pe(Ce)},{flush:"post"}),ie(()=>a.isLoadingMessages,async(r,s)=>{if(r||!s)return;const u=A.value;if(!(!u||i.value!==u)){if(a.focusMessageId){i.value=null;return}await pe(),A.value===u&&Ze(u)}},{flush:"post"}),ie(()=>a.focusMessageId,r=>{r&&K(r)}),ie(()=>a.isRunActive,r=>{r&&ve({frames:3,keepAliveMs:400})}),ie(I,r=>{if(m(),!r){O=0,N.value=0;return}O=Date.now(),N.value=0,U=setInterval(()=>{N.value=Date.now()-O},1e3)},{immediate:!0}),ie(()=>a.messages[a.messages.length-1]?.content,()=>{if(i.value!==A.value){if(a.focusMessageId){K(a.focusMessageId);return}be()&&ve({frames:1,keepAliveMs:0})}}),ie(se,()=>{if(i.value!==A.value){if(a.focusMessageId){K(a.focusMessageId);return}be()&&ve({frames:1,keepAliveMs:0})}}),ie(()=>V.value.length,async(r,s)=>{if(i.value===A.value||a.focusMessageId||r<=s)return;const u=be(320);await pe(),!(!u&&!a.isRunActive)&&ve({frames:4,keepAliveMs:600})}),gs(()=>{m(),ut(A.value)}),it(()=>{pe(Ce)}),g({scrollToBottom:ve,scrollToMessage:K,scrollToAnchor:Ee}),(r,s)=>(v(),h("div",ro,[(v(),me(Fs,{key:A.value||"chat-empty",ref_key:"listRef",ref:w,messages:ye.value,virtualized:!1,padding:G.value,onScroll:Ye,onTopReach:Et},{empty:k(()=>[t("div",so,[t("img",{src:he.value.logo,alt:he.value.alt,class:"empty-logo"},null,8,lo),t("p",null,d(he.value.text),1)])]),before:k(()=>[le.value?(v(),h("div",io,[t("a",{class:"history-archive-link",href:ge.value},d(o(c)("chat.viewOlderInHistory")),9,uo)])):o(a).activeSession?.hasMoreBefore||o(a).activeSession?.isLoadingOlderMessages?(v(),h("div",co,[o(a).activeSession?.isLoadingOlderMessages?(v(),h("span",vo)):x("",!0)])):x("",!0)]),item:k(({message:u})=>[u.systemType==="fork-divider"&&ue.value?(v(),h("div",po,[s[9]||(s[9]=t("div",{class:"fork-divider-line","aria-hidden":"true"},null,-1)),t("div",fo,[s[8]||(s[8]=t("span",{class:"fork-divider-icon","aria-hidden":"true"},[t("svg",{viewBox:"0 0 24 24",focusable:"false"},[t("path",{d:"M6 3v6a4 4 0 0 0 4 4h4.2"}),t("path",{d:"M18 9l4 4-4 4"}),t("path",{d:"M6 21V3"}),t("circle",{cx:"6",cy:"5",r:"2"}),t("circle",{cx:"6",cy:"19",r:"2"})])],-1)),t("span",go,d(o(c)("chat.forkedFrom")),1),t("a",{class:"fork-divider-link",href:ue.value.parentHref,onClick:oe},d(ue.value.parentTitle),9,ho)]),s[10]||(s[10]=t("div",{class:"fork-divider-line","aria-hidden":"true"},null,-1))])):(v(),me(el,{key:1,message:u,highlight:o(a).focusMessageId===u.id,"show-fork-action":E.value&&u.id===C.value},null,8,["message","highlight","show-fork-action"]))]),after:k(()=>[P(lt,{name:"fade"},{default:k(()=>[I.value?(v(),h("div",mo,[P(xr,{reasoning:ke.value?.reasoning,"reasoning-id":ke.value?.messageId,elapsed:R.value},null,8,["reasoning","reasoning-id","elapsed"]),fe.value.length>0||o(a).compressionState||o(a).abortState?(v(),h("div",_o,[o(a).abortState?(v(),h("div",yo,[o(a).abortState.aborting?(v(),h("svg",ko,[...s[11]||(s[11]=[t("path",{d:"M10 9v6m4-6v6M5 5h14v14H5z"},null,-1)])])):(v(),h("svg",wo,[...s[12]||(s[12]=[t("path",{d:"M5 13l4 4L19 7"},null,-1)])])),t("span",bo,d(o(a).abortState.aborting?o(a).abortState.timedOut?o(a).abortState.message||"Still stopping... new messages will be queued":"Pausing... waiting for the run to stop and sync":o(a).abortState.synced?"Paused and synced":"Paused"),1),o(a).abortState.aborting?(v(),h("span",So)):x("",!0)])):x("",!0),o(a).compressionState?(v(),h("div",Co,[o(a).compressionState.compressing?(v(),h("svg",xo,[...s[13]||(s[13]=[t("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):o(a).compressionState.compressed?(v(),h("svg",Mo,[...s[14]||(s[14]=[t("path",{d:"M5 13l4 4L19 7"},null,-1)])])):x("",!0),t("span",Io,d(o(a).compressionState.compressing?`Compressing... (${o(a).compressionState.messageCount} msgs, ~${ae(o(a).compressionState.beforeTokens)} tokens)`:o(a).compressionState.compressed?`Compressed ${o(a).compressionState.messageCount} msgs: ~${ae(o(a).compressionState.beforeTokens)} → ~${ae(o(a).compressionState.afterTokens)} tokens`:"Compression skipped"),1),o(a).compressionState.compressing?(v(),h("span",To)):x("",!0)])):x("",!0),(v(!0),h(De,null,Ae(fe.value,u=>(v(),h("div",{key:u.id,class:_e(["tool-call-item",{"subagent-entry":Q(u)}]),role:Q(u)?"button":void 0,tabindex:Q(u)?0:void 0,title:Q(u)?o(c)("subagent.open"):void 0,onClick:F=>D(u),onKeydown:[It($e(F=>D(u),["prevent"]),["enter"]),It($e(F=>D(u),["prevent"]),["space"])]},[s[17]||(s[17]=t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},[t("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})],-1)),t("span",Po,d(u.toolName),1),u.toolPreview?(v(),h("span",{key:0,class:"tool-call-preview",title:u.toolPreview},d(X(u.toolPreview)),9,Eo)):x("",!0),u.toolDuration!==void 0&&u.toolStatus!=="running"?(v(),h("span",{key:1,class:"tool-call-duration",title:r.$t("chat.executionDuration")},d(W(u.toolDuration)),9,Lo)):x("",!0),u.toolStatus==="done"?(v(),h("svg",Bo,[...s[15]||(s[15]=[t("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor","fill-opacity":"0.15"},null,-1),t("path",{d:"M8 12L11 15L16 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)])])):x("",!0),u.toolStatus==="running"?(v(),h("span",Ro)):x("",!0),u.toolStatus==="error"?(v(),h("svg",Ao,[...s[16]||(s[16]=[t("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor","fill-opacity":"0.15"},null,-1),t("path",{d:"M15 9L9 15M9 9L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)])])):x("",!0)],42,$o))),128))])):x("",!0)])):x("",!0)]),_:1})]),_:1},8,["messages","padding"])),M.value?(v(),h("button",{key:0,type:"button",class:"scroll-bottom-button","aria-label":o(c)("chat.scrollToBottom"),title:o(c)("chat.scrollToBottom"),onClick:ze},[...s[18]||(s[18]=[t("svg",{class:"scroll-bottom-icon",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m7 10 5 5 5-5"}),t("path",{d:"M6 19h12"})],-1)])],8,Do)):x("",!0),L.value||f.value||V.value.length>0?(v(),h("div",Fo,[(v(),me(ws,{to:"body",disabled:!T.approvalPortalToBody},[P(lt,{name:"queue-float"},{default:k(()=>[L.value?(v(),h("div",{key:0,class:_e(["approval-float-panel",{"approval-float-panel--global":T.approvalPortalToBody}])},[t("div",Vo,[s[19]||(s[19]=t("span",{class:"approval-float-icon","aria-hidden":"true"},[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"}),t("path",{d:"m9 12 2 2 4-4"})])],-1)),t("span",null,d(o(c)("chat.approvalKicker")),1)]),t("div",zo,d(o(c)("chat.approvalTitle")),1),t("div",No,d(L.value.description),1),t("code",Oo,d(L.value.command),1),t("div",Uo,[L.value.isMemoryWrite?(v(),me(o(re),{key:0,size:"small",type:"primary",onClick:s[0]||(s[0]=u=>ee("once"))},{default:k(()=>[ne(d(o(c)("chat.approvalAgree")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("once")?(v(),me(o(re),{key:1,size:"small",type:"primary",onClick:s[1]||(s[1]=u=>ee("once"))},{default:k(()=>[ne(d(o(c)("chat.approvalAllowOnce")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("session")?(v(),me(o(re),{key:2,size:"small",secondary:"",onClick:s[2]||(s[2]=u=>ee("session"))},{default:k(()=>[ne(d(o(c)("chat.approvalAllowSession")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("always")?(v(),me(o(re),{key:3,size:"small",secondary:"",onClick:s[3]||(s[3]=u=>ee("always"))},{default:k(()=>[ne(d(o(c)("chat.approvalAlways")),1)]),_:1})):x("",!0),L.value.isMemoryWrite||L.value.choices.includes("deny")?(v(),me(o(re),{key:4,size:"small",type:"error",secondary:"",onClick:s[4]||(s[4]=u=>ee("deny"))},{default:k(()=>[ne(d(o(c)("chat.approvalDeny")),1)]),_:1})):x("",!0)])],2)):x("",!0)]),_:1})],8,["disabled"])),P(lt,{name:"queue-float"},{default:k(()=>[!L.value&&f.value?(v(),h("div",qo,[t("div",jo,[s[20]||(s[20]=t("span",{class:"approval-float-icon","aria-hidden":"true"},[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"10"}),t("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),t("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})])],-1)),t("span",null,d(o(c)("chat.clarifyKicker")),1)]),t("div",Ho,d(o(c)("chat.clarifyTitle")),1),t("div",Ko,d(f.value.question),1),f.value.choices&&f.value.choices.length?(v(),h("div",Wo,[(v(!0),h(De,null,Ae(f.value.choices,u=>(v(),me(o(re),{key:u,size:"small",type:"primary",onClick:F=>we(u)},{default:k(()=>[ne(d(u),1)]),_:2},1032,["onClick"]))),128)),P(o(re),{size:"small",type:"error",secondary:"",onClick:s[5]||(s[5]=u=>we(""))},{default:k(()=>[ne(d(o(c)("chat.clarifyDismiss")),1)]),_:1})])):x("",!0),t("div",Qo,[P(o(Kt),{value:S.value,"onUpdate:value":s[6]||(s[6]=u=>S.value=u),size:"small",placeholder:o(c)("chat.clarifyPlaceholder")},null,8,["value","placeholder"]),P(o(re),{size:"small",type:"primary",onClick:s[7]||(s[7]=u=>we())},{default:k(()=>[ne(d(o(c)("chat.clarifySubmit")),1)]),_:1})])])):x("",!0)]),_:1}),P(lt,{name:"queue-float"},{default:k(()=>[V.value.length>0?(v(),h("div",Yo,[t("div",Zo,[s[21]||(s[21]=t("span",{class:"queue-orbit","aria-hidden":"true"},[t("span")],-1)),t("span",null,d(o(c)("chat.messageQueue")),1),t("strong",null,d(V.value.length),1)]),t("div",Go,[(v(!0),h(De,null,Ae(V.value,(u,F)=>(v(),h("div",{key:u.id,class:"queue-float-item"},[t("span",Jo,d(F+1),1),t("span",Xo,d(Se(u.content)),1),t("button",{type:"button",class:"queue-remove",title:o(c)("chat.removeQueuedMessage"),onClick:ce=>j(u.id)},[...s[22]||(s[22]=[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,er)]))),128))])])):x("",!0)]),_:1})])):x("",!0)]))}})})),Fl=q((()=>{})),Vl,gi=q((()=>{tr(),tr(),Fl(),We(),Vl=Qe(Mr,[["__scopeId","data-v-73da6575"]])}));export{Bl as a,Pl as c,kl as d,_l as f,Dl as i,$l as l,gi as n,fi as o,xr as r,El as s,Vl as t,Tl as u};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/MarkdownRenderer-BIPowjr-.js","assets/js/index-DN4SafrP.js","assets/css/index-IP31leuw.css","assets/js/highlight-C4yUBxwQ.js","assets/js/clipboard-DHZFaAvO.js","assets/js/download-xhRMWMda.js","assets/js/desktop-browser-C6AhY0uu.js","assets/js/file-preview-C417aixJ.js","assets/css/MarkdownRenderer-CT6BAAV2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$i as k,$t as re,Ai as wn,Bi as it,Di as je,Dt as cs,Ei as ds,Fi as pe,Fr as vs,Hi as v,Hr as ps,Ir as fs,M as Wt,Nr as He,Pr as Ke,Qr as nr,Ri as gs,Sa as d,Ti as P,Vi as hs,Vr as ms,Wi as Ae,Zi as ie,_a as o,_i as t,_t as xt,at as _s,bi as h,bt as ys,ci as lt,ea as Nt,ei as Pt,fa as ks,fi as It,gi as _,gt as ar,hi as ws,i as bs,jt as rt,mi as De,n as We,pi as $e,pn as Ss,q as Cs,r as xs,rt as Ot,si as Pe,sn as Kt,t as Qe,tt as Ms,ua as y,ui as Ut,vi as me,wa as q,wi as ne,xa as st,ya as _e,yi as x,zt as Is}from"./index-DN4SafrP.js";import{T as Ts,u as $s}from"./sessions-IkLKgnN6.js";import{r as Ps,t as Es}from"./profiles-BK5JKD7h.js";import{a as Ls,c as Bs,i as or,o as rr,s as Rs}from"./chat-fUZW3YFa.js";import{n as As,t as Ds}from"./settings-roYY6G3W.js";import{a as Fs,c as sr,o as Vs,s as lr}from"./chat-timestamp-4wWFcZWv.js";import{n as zs,t as Ns}from"./clipboard-files-CBDy-02Y.js";import{l as ir,s as ur}from"./skills-a5LPwmiT.js";import{c as bn,d as Os,f as Us,h as Sn,l as qs,m as js,n as Hs,p as Ks,t as Ws,u as Qs}from"./useSttSettings-DHX06G8A.js";import{d as Ys,f as Zs}from"./ttsHelpers-BLNiQExI.js";import{n as Gs,r as Cn,t as xn}from"./chat-input-height-lvFawuv9.js";import{a as Js,c as Xs,i as el,l as tl,n as nl,r as al,s as ol,t as rl}from"./message-scroll-position-C9_YO3pX.js";async function sl(p,g,T){return(await Pt(`/api/hermes/model-context/${encodeURIComponent(p)}/${encodeURIComponent(g)}`,{method:"PUT",body:JSON.stringify({provider:p,model:g,context_limit:T})})).data}var ll=q((()=>{nr()}));function Qt(p){return p?`?profile=${encodeURIComponent(p)}`:""}function il(p){return p.trim().toLowerCase().replace(/ /g,"-").replace(/_/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ul(p){return(await Pt(`/api/hermes/bundles${Qt(p)}`)).bundles??[]}async function cl(p,g){return(await Pt(`/api/hermes/bundles${Qt(p)}`,{method:"POST",body:JSON.stringify(g)})).bundle}async function dl(p,g){await Pt(`/api/hermes/bundles/${encodeURIComponent(g)}${Qt(p)}`,{method:"DELETE"})}var cr=q((()=>{nr()})),Mn,In,Tn,$n,Pn,En,Ln,dr,Bn=q((()=>{Pe(),He(),Mn=["data-status"],In={class:"voice-transcript-overlay__status"},Tn={key:0,class:"voice-transcript-overlay__transcript"},$n={key:1,class:"voice-transcript-overlay__error",role:"alert"},Pn={key:2,class:"voice-transcript-overlay__debug"},En={class:"voice-transcript-overlay__debug-title"},Ln={class:"voice-transcript-overlay__debug-list"},dr=je({__name:"VoiceTranscriptOverlay",props:{status:{},transcript:{},error:{default:null},floating:{type:Boolean,default:!1},events:{default:()=>[]},debug:{type:Boolean,default:!1}},setup(p){const g=p,{t:T}=Ke(),a=_(()=>T(`chat.voiceInput.status.${g.status}`)),c=_(()=>T("chat.voiceInput.statusLabel",{status:a.value})),b=_(()=>T("chat.voiceInput.transcriptLabel",{text:g.transcript})),w=_(()=>T("chat.voiceInput.errorLabel",{error:g.error})),i=_(()=>g.events.slice(-5).map(M=>M.type));return(M,N)=>(v(),h("div",{class:_e(["voice-transcript-overlay",{"voice-transcript-overlay--floating":g.floating}]),"data-testid":"voice-transcript-overlay","data-status":g.status,role:"status","aria-live":"polite"},[t("p",In,d(c.value),1),g.transcript?(v(),h("p",Tn,d(b.value),1)):x("",!0),g.error?(v(),h("p",$n,d(w.value),1)):x("",!0),g.debug&&i.value.length?(v(),h("div",Pn,[t("p",En,d(o(T)("chat.voiceInput.recentEvents")),1),t("ol",Ln,[(v(!0),h(De,null,Ae(i.value,($,O)=>(v(),h("li",{key:`${O}:${$}`,class:"voice-transcript-overlay__debug-item","data-testid":"voice-event-debug-item"},d($),1))),128))])])):x("",!0)],10,Mn))}})})),vl=q((()=>{})),vr,pl=q((()=>{Bn(),Bn(),vl(),We(),vr=Qe(dr,[["__scopeId","data-v-852c4dd9"]])})),Rn,An,Dn,Fn,Vn,pr,zn=q((()=>{Pe(),He(),pl(),Rn={class:"voice-dialogue-controls__actions"},An=["aria-label","aria-pressed"],Dn={key:0,class:"voice-dialogue-controls__icon",width:"16",height:"16",viewBox:"0 0 24 24","aria-hidden":"true"},Fn={key:1,class:"voice-dialogue-controls__icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Vn=["aria-label"],pr=je({__name:"VoiceDialogueControls",props:{status:{},transcript:{},error:{default:null},events:{default:()=>[]},debug:{type:Boolean,default:!1},onStart:{},onStop:{},onCancel:{}},setup(p){const g=p,T=new Set(["capturing","transcribing","sending"]),{t:a}=Ke(),c=_(()=>T.has(g.status)),b=_(()=>c.value||!!g.transcript||!!g.error),w=_(()=>c.value?a("chat.voiceInput.stopCaptureAndInsert"):a("chat.voiceInput.startCapture"));async function i(){if(c.value){await g.onStop();return}await g.onStart()}function M(){g.onCancel()}return(N,$)=>(v(),h("div",{class:_e(["voice-dialogue-controls voice-dialogue-controls--floating-overlay",{active:c.value}])},[b.value?(v(),me(vr,{key:0,floating:"",status:g.status,transcript:g.transcript,error:g.error,events:g.events,debug:g.debug},null,8,["status","transcript","error","events","debug"])):x("",!0),t("div",Rn,[t("button",{type:"button",class:_e(["voice-dialogue-controls__toggle",{active:c.value}]),"data-testid":"voice-record-toggle","aria-label":w.value,"aria-pressed":c.value,onClick:i},[c.value?(v(),h("svg",Dn,[...$[0]||($[0]=[t("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2",fill:"currentColor"},null,-1)])])):(v(),h("svg",Fn,[...$[1]||($[1]=[t("path",{d:"M12 3a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Z"},null,-1),t("path",{d:"M5 10v1a7 7 0 0 0 14 0v-1"},null,-1),t("path",{d:"M12 18v3"},null,-1),t("path",{d:"M9 21h6"},null,-1)])]))],10,An),c.value?(v(),h("button",{key:0,type:"button",class:"voice-dialogue-controls__cancel","data-testid":"voice-record-cancel","aria-label":o(a)("chat.voiceInput.cancelCapture"),onClick:M},[...$[2]||($[2]=[t("svg",{class:"voice-dialogue-controls__icon voice-dialogue-controls__icon--small",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true"},[t("path",{d:"M18 6 6 18"}),t("path",{d:"m6 6 12 12"})],-1)])],8,Vn)):x("",!0)])],2))}})})),fl=q((()=>{})),fr,gl=q((()=>{zn(),zn(),fl(),We(),fr=Qe(pr,[["__scopeId","data-v-22dab386"]])})),Nn,On,Un,gr,qn=q((()=>{Pe(),Wt(),He(),ir(),cr(),Nn={class:"bundle-name-hint"},On={key:0,class:"bundle-command-preview"},Un={class:"bundle-create-actions"},gr=je({__name:"BundleCreateModal",props:{profile:{}},emits:["close","created"],setup(p,{emit:g}){const T=p,a=g,{t:c}=Ke(),b=ar(),w=y(""),i=y(""),M=y([]),N=y([]),$=y(!1),O=y(!1),U=_(()=>il(w.value));function ae(D){w.value=D.replace(/[^A-Za-z0-9 _-]/g,"")}async function W(){$.value=!0;try{const D=await ur(T.profile),Y=new Map;for(const m of D.categories||[])for(const I of m.skills||[])I.enabled===!1||Y.has(I.name)||Y.set(I.name,{label:I.name,value:I.name});N.value=[...Y.values()].sort((m,I)=>m.label.localeCompare(I.label))}catch(D){N.value=[],b.error(`${c("chat.bundleCreator.skillsLoadFailed")}: ${D?.message||""}`)}finally{$.value=!1}}function X(D){!D&&!O.value&&a("close")}async function Q(){if(!w.value.trim()){b.warning(c("chat.bundleCreator.nameRequired"));return}if(!U.value){b.warning(c("chat.bundleCreator.nameInvalid"));return}if(!/[A-Za-z]/.test(w.value)){b.warning(c("chat.bundleCreator.nameInvalid"));return}if(M.value.length===0){b.warning(c("chat.bundleCreator.skillsRequired"));return}O.value=!0;try{const D=await cl(T.profile,{name:w.value.trim(),description:i.value.trim(),skills:M.value});b.success(c("chat.bundleCreator.created")),a("created",D)}catch(D){b.error(`${c("chat.bundleCreator.createFailed")}: ${D?.message||""}`)}finally{O.value=!1}}return it(W),(D,Y)=>(v(),me(o(xt),{show:!0,preset:"card",title:o(c)("chat.bundleCreator.title"),"mask-closable":!O.value,style:{width:"min(560px, calc(100vw - 32px))"},"onUpdate:show":X},{default:k(()=>[P(o(_s),{"label-placement":"top",onSubmit:$e(Q,["prevent"])},{default:k(()=>[P(o(Ot),{label:o(c)("chat.bundleCreator.name"),required:""},{default:k(()=>[P(o(Kt),{value:w.value,maxlength:120,placeholder:o(c)("chat.bundleCreator.namePlaceholder"),autofocus:"","onUpdate:value":ae},null,8,["value","placeholder"])]),_:1},8,["label"]),t("div",Nn,d(o(c)("chat.bundleCreator.nameHint")),1),U.value?(v(),h("div",On," /bundles "+d(U.value),1)):x("",!0),P(o(Ot),{label:o(c)("chat.bundleCreator.description")},{default:k(()=>[P(o(Kt),{value:i.value,"onUpdate:value":Y[0]||(Y[0]=m=>i.value=m),type:"textarea",maxlength:1e3,autosize:{minRows:2,maxRows:4},placeholder:o(c)("chat.bundleCreator.descriptionPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"]),P(o(Ot),{label:o(c)("chat.bundleCreator.skills"),required:""},{default:k(()=>[P(o(Is),{value:M.value,"onUpdate:value":Y[1]||(Y[1]=m=>M.value=m),multiple:"",filterable:"",loading:$.value,options:N.value,placeholder:o(c)("chat.bundleCreator.skillsPlaceholder")},null,8,["value","loading","options","placeholder"])]),_:1},8,["label"]),t("div",Un,[P(o(re),{disabled:O.value,onClick:Y[2]||(Y[2]=m=>a("close"))},{default:k(()=>[ne(d(o(c)("common.cancel")),1)]),_:1},8,["disabled"]),P(o(re),{type:"primary",loading:O.value,onClick:Q},{default:k(()=>[ne(d(o(c)("common.create")),1)]),_:1},8,["loading"])])]),_:1})]),_:1},8,["title","mask-closable"]))}})})),hl=q((()=>{})),hr,ml=q((()=>{qn(),qn(),hl(),We(),hr=Qe(gr,[["__scopeId","data-v-01ecfe5a"]])}));function _l(p={}){const g=y({status:"idle",error:null,startedAt:null,mimeType:null}),T=_(()=>g.value.status==="recording"),a=ks(null);let c=null,b=null,w=[],i=null,M=null,N=null,$=null,O=null,U=null,ae=null,W=0;function X(){g.value={status:"idle",error:null,startedAt:null,mimeType:null}}function Q(f){const S=yl(f);return g.value={status:"error",error:S,startedAt:null,mimeType:g.value.mimeType},S}function D(){i!==null&&(clearTimeout(i),i=null)}function Y(f){if(f)for(const S of f.getTracks())S.stop()}function m({stopStream:f=!0,clearChunks:S=!0}={}){D(),f&&Y(b),c=null,b=null,a.value=null,S&&(w=[])}function I(f){const S=N;M=null,N=null,$=null,S?.(f)}function R(f){const S=$;M=null,N=null,$=null,S?.(f)}function se(){!N&&!$||I(z(g.value.mimeType??c?.mimeType??null))}function fe(f){if(f!==void 0&&f!==O)return;const S=U;O=null,U=null,ae=null,S?.()}function ke(f,S){if(S!==void 0&&S!==O)return;const Z=ae;O=null,U=null,ae=null,Z?.(f)}function he(){!U&&!ae||fe()}function z(f){return new Blob([],{type:f||Mt})}function H(){return typeof MediaRecorder>"u"?null:MediaRecorder}function ye(){const f=H();if(!f||typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error(p.messages?.unsupported||yr);return f}function E(f,S){const Z=S?.length?S:[...mr];return typeof f.isTypeSupported!="function"?Z[0]:Z.find(G=>f.isTypeSupported(G))}function C(){if(g.value.status==="recording"||g.value.status==="requesting"||g.value.status==="stopping")return Promise.resolve();try{const f=ye(),S=++W;return g.value={status:"requesting",error:null,startedAt:null,mimeType:null},new Promise((Z,G)=>{O=S,U=Z,ae=G,navigator.mediaDevices.getUserMedia(p.constraints??{audio:!0}).then(A=>{if(S!==W){Y(A),fe(S);return}const le=E(f,p.mimeTypes),ge=le?new f(A,{mimeType:le}):new f(A);b=A,a.value=A,c=ge,w=[],ge.ondataavailable=ue=>{const oe=ue.data;oe&&oe.size>0&&w.push(oe)},ge.onerror=ue=>{const oe=Q(ue.error??new Error(p.messages?.recordingFailed||"Microphone recording failed."));m(),R(oe)},ge.start(),g.value={status:"recording",error:null,startedAt:Date.now(),mimeType:ge.mimeType||le||Mt},i=setTimeout(()=>{V()},p.maxDurationMs??_r),fe(S)}).catch(A=>{if(S!==W){fe(S);return}m(),ke(Q(A),S)})})}catch(f){return m(),Promise.reject(Q(f))}}async function V(){if(g.value.status==="requesting")return W+=1,he(),m(),X(),z();const f=c;if(!f){const S=g.value.mimeType;return X(),z(S)}if(M)return M;if(f.state==="inactive"){const S=f.mimeType||g.value.mimeType;return m(),X(),z(S)}return g.value={...g.value,status:"stopping",error:null},D(),M=new Promise((S,Z)=>{N=S,$=Z;const G=f.mimeType||g.value.mimeType||Mt;f.onstop=()=>{const A=new Blob(w,{type:G});m(),X(),I(A)},f.onerror=A=>{const le=Q(A.error??new Error(p.messages?.recordingFailed||"Microphone recording failed."));m(),R(le)};try{f.stop()}catch(A){const le=Q(A);m(),R(le)}}),M}function L(){W+=1;const f=c;if(D(),f&&(f.ondataavailable=null,f.onstop=null,f.onerror=null,f.state!=="inactive"))try{f.stop()}catch{}m(),he(),se(),X()}return{state:g,isRecording:T,stream:a,start:C,stop:V,cancel:L}}function yl(p){return p instanceof Error?p:new Error(String(p))}var mr,Mt,_r,yr,kl=q((()=>{Pe(),mr=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/wav"],Mt="audio/webm",_r=12e4,yr="Microphone capture is not supported in this browser."}));function wl(p){let g=0;return function(a,c={}){return g+=1,{id:`${p}:${g}`,seq:g,sessionId:p,type:a,captureId:c.captureId,turnId:c.turnId,timestamp:c.timestamp??new Date().toISOString(),final:c.final,payload:c.payload}}}var bl=q((()=>{}));function qt(p){return`${p}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function jn(p){return p instanceof Error?p:new Error(String(p))}function Sl(p){return p.replace(/\s+/g," ").trim()}function Cl(p){const g=qt("voice-session"),T=wl(g),a=y([]),c=y("idle"),b=y(null),w=y(null),i=y(""),M=y(null),N=_(()=>c.value!=="idle");function $(m,I={}){const R=T(m,{...I,captureId:I.captureId??b.value??void 0,turnId:I.turnId??w.value??void 0});return a.value.push(R),a.value.length>50&&a.value.splice(0,a.value.length-50),R}function O(m,I={}){const R=jn(m);return M.value=R,c.value="error",$("session.error",{captureId:I.captureId,turnId:I.turnId,final:!0,payload:R}),R}function U(m={}){const I=m.captureId??b.value,R=m.turnId??w.value;R&&$("turn.cancelled",{captureId:I??void 0,turnId:R,final:!0}),I&&$("capture.cancelled",{captureId:I,turnId:R??void 0,final:!0}),b.value=null,w.value=null,i.value="",M.value=null,c.value="idle"}$("session.started",{final:!0});async function ae(){try{await Promise.resolve(p.stopOutputAudio?.())}catch(I){console.warn("[useVoiceDialogue] Failed to stop output audio before capture:",jn(I))}(b.value||w.value)&&U(),M.value=null,i.value="",c.value="capturing",w.value=null;const m=qt("capture");return b.value=m,$("capture.started",{captureId:m}),{captureId:m}}async function W(m,I){if(b.value!==m)return;const R=Sl(I);if(!R){i.value="",Q(m);return}M.value=null,i.value=R,c.value="sending",$("transcript.done",{captureId:m,final:!0,payload:{text:R}});const se=qt("turn");w.value=se,$("turn.started",{captureId:m,turnId:se,payload:{text:R}});try{await Promise.resolve(p.sendMessage(R))}catch(fe){if(b.value===m&&w.value===se)throw O(fe,{captureId:m,turnId:se}),fe;return}b.value!==m||w.value!==se||($("turn.ended",{captureId:m,turnId:se,final:!0,payload:{text:R}}),b.value=null,w.value=null,i.value="",c.value="idle")}async function X(m,I){if(b.value===m){M.value=null,c.value="transcribing";try{const R=await p.transcribe(I);if(b.value!==m)return;await W(m,R.text)}catch(R){if(b.value===m)throw M.value===null&&O(R,{captureId:m,turnId:w.value??void 0}),R;return}}}function Q(m=b.value){!m||b.value!==m||U({captureId:m,turnId:w.value})}function D(m){$("output.audio.started",{payload:m})}function Y(m){$("output.audio.done",{final:!0,payload:m})}return{sessionId:g,events:a,status:c,activeCaptureId:b,activeTurnId:w,transcript:i,error:M,isBusy:N,beginCapture:ae,transcribeAndSend:X,commitTranscript:W,cancelCapture:Q,markOutputStarted:D,markOutputDone:Y}}var xl=q((()=>{Pe(),bl()}));function jt(p){return p instanceof Error?p:new Error(String(p))}function Tt(p){return p.replace(/\s+/g," ").trim()}function $t(p){return Tt(p.filter(Boolean).join(" "))}function Ml(p){return Tt(p?.[0]?.transcript??"")}function Il(p){const g=p.results,T=typeof p.resultIndex=="number"?p.resultIndex:0,a=[],c=[];if(!g||typeof g.length!="number")return{finalText:"",interimText:""};for(let b=T;b<g.length;b+=1){const w=g[b],i=Ml(w);i&&(w?.isFinal?a.push(i):c.push(i))}return{finalText:$t(a),interimText:$t(c)}}function Hn(){if(typeof window>"u")return null;const p=window;return p.SpeechRecognition??p.webkitSpeechRecognition??null}function Tl(p={}){const g=y(!!Hn()),T=y("idle"),a=y(""),c=y(""),b=y(null),w=y(null);let i=null,M=0,N=null,$=null,O=null,U=null;function ae(){return p.messages?.unsupported||kr}function W(E){const C=E?.trim();return C&&p.messages?.failedWithReason?p.messages.failedWithReason(C):C?`Browser speech recognition failed: ${C}.`:p.messages?.failed||"Browser speech recognition failed."}function X(){U!==null&&(clearTimeout(U),U=null)}function Q(){N=null,$=null,O=null,X()}function D(E){E&&(E.onresult=null,E.onerror=null,E.onend=null)}function Y(E){const C=$;Q(),C?.(Tt(E))}function m(E){const C=O,V=jt(E);Q(),C?.(V)}function I(E={}){T.value="idle",E.clearTranscript&&(a.value=""),c.value="",E.clearError&&(b.value=null,w.value=null)}function R(){return $t([a.value,c.value])}function se(E,C,V,L){const f=new E;return i=f,f.lang=V,f.interimResults=!0,f.continuous=L,f.onresult=S=>{if(C!==M||i!==f)return;const{finalText:Z,interimText:G}=Il(S);Z&&(a.value=$t([a.value,Z])),c.value=G},f.onerror=S=>{const Z=typeof S.error=="string"?S.error:void 0;he(C,new Error(W(Z)),Z)},f.onend=()=>{if(!(C!==M||i!==f)){if(T.value==="listening"&&!N){i=null,D(f),c.value="";try{se(E,C,V,L).start()}catch(S){he(C,S)}return}ke(C)}},f}function fe(){b.value=null,w.value=null,T.value==="error"&&(T.value="idle")}function ke(E,C=R()){if(E!==M)return;const V=i;i=null,D(V),I(),Y(C)}function he(E,C,V){if(E!==M)return jt(C);const L=jt(C),f=i;return i=null,D(f),c.value="",T.value="error",b.value=L,w.value=V?.trim()||null,m(L),L}async function z(E={}){const C=Hn();if(g.value=!!C,!C){const le=new Error(ae());throw T.value="error",b.value=le,le}ye();const V=++M,L=typeof E.language=="string"?E.language.trim():"",f=typeof document<"u"?document.documentElement.lang.trim():"",S=typeof navigator<"u"?navigator.language?.trim():"",Z=L||f||S||"en-US",G=E.continuous!==!1;a.value="",c.value="",b.value=null,w.value=null,T.value="listening";const A=se(C,V,Z,G);try{A.start()}catch(le){throw he(V,le)}}function H(){const E=M,C=i;return C?N||(T.value="stopping",N=new Promise((V,L)=>{$=V,O=L,X(),U=setTimeout(()=>{ke(E)},wr);try{C.stop()}catch(f){he(E,f)}}),N):(T.value!=="error"&&I(),Promise.resolve(Tt(R())))}function ye(){M+=1;const E=i;i=null,D(E);try{E?.abort()}catch{}Y(""),I({clearTranscript:!0,clearError:!0})}return{isSupported:g,status:T,transcript:a,partialTranscript:c,error:b,errorCode:w,start:z,stop:H,cancel:ye,clearError:fe}}var kr,wr,$l=q((()=>{Pe(),kr="Browser speech recognition is not supported in this browser.",wr=1e3}));function Pl(){if(typeof navigator>"u")return!1;const p=navigator.userAgent||"";if(/Android|iPhone|iPad|iPod|Mobile/i.test(p))return!0;const g=navigator.maxTouchPoints>1,a=!!(typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse), (any-pointer: coarse)"):null)?.matches,c=typeof window<"u"&&window.screen?Math.min(window.screen.width,window.screen.height):Number.POSITIVE_INFINITY;return g&&a&&c<=1024}var El=q((()=>{})),Kn,Wn,Qn,Yn,Zn,Gn,Jn,Xn,ea,ta,na,aa,oa,ra,sa,la,ia,ua,ca,da,va,pa,fa,ga,ha,ma,_a,ya,ka,wa,ba,Sa,Ca,xa,Ma,Ia,Ta,$a,Pa,Ea,La,Ba,Ra,Aa,Da,Fa,Va,za,Na,Oa,Ua,qa,ja,Ha,Ka,Ct,Wa,br,Qa=q((()=>{Pe(),or(),xs(),Es(),Ds(),Ts(),ll(),ir(),cr(),Wt(),He(),lr(),zs(),gl(),ml(),kl(),js(),Ys(),xl(),Qs(),Ws(),$l(),Bs(),Gs(),ms(),El(),Kn={class:"chat-input-area"},Wn={key:0,class:"attachment-previews"},Qn=["src","alt"],Yn={key:1,class:"attachment-file"},Zn={class:"file-name"},Gn={class:"file-size"},Jn={key:2,class:"attachment-context"},Xn=["onClick"],ea={key:1,class:"message-reference-preview"},ta={class:"message-reference-text"},na=["aria-label","title"],aa=["title"],oa={key:0,class:"context-usage-row"},ra={class:"context-bar"},sa=["placeholder"],la={class:"input-toolbar"},ia={class:"input-top-bar"},ua={class:"reasoning-effort-label"},ca={class:"reasoning-effort-slider-heading"},da={class:"reasoning-effort-slider-range","aria-hidden":"true"},va={class:"input-settings-label"},pa={class:"input-model-label"},fa={class:"input-actions"},ga={key:0,width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},ha={key:1,width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},ma={class:"visually-hidden"},_a=["onMousedown","onMouseenter"],ya={class:"slash-command-name"},ka={key:0,class:"slash-command-args"},wa={class:"slash-command-desc"},ba={key:0,class:"skill-picker-modal"},Sa=["placeholder"],Ca={class:"skill-picker-list"},xa={key:0,class:"skill-picker-empty"},Ma=["onClick","onKeydown"],Ia={class:"skill-picker-command"},Ta={class:"skill-picker-name"},$a={class:"skill-picker-desc"},Pa={key:2,class:"skill-picker-empty"},Ea={key:0,class:"skill-picker-modal"},La={class:"bundle-picker-toolbar"},Ba=["placeholder"],Ra={class:"skill-picker-list"},Aa={key:0,class:"skill-picker-empty"},Da=["onClick"],Fa={class:"skill-picker-command"},Va={class:"skill-picker-name"},za={key:0,class:"skill-picker-desc"},Na={class:"bundle-picker-skills"},Oa=["disabled","aria-label","title","onClick"],Ua={key:2,class:"skill-picker-empty"},qa={class:"context-edit-content"},ja={style:{"margin-bottom":"16px",color:"#666"}},Ha={style:{"margin-top":"12px","font-size":"12px",color:"#999"}},Ka={style:{display:"flex","justify-content":"flex-end",gap:"8px"}},Ct="hermes_chat_input_drafts_v1",Wa=256e3,br=je({__name:"ChatInput",props:{modelLabel:{default:""}},emits:["modelClick","voiceClick"],setup(p,{expose:g,emit:T}){const a=rr(),c=bs(),b=Ps(),w=As(),{t:i}=Ke(),M=ar(),N=ys(),{toolTraceVisible:$,toggleToolTraceVisible:O}=sr(),U=p,ae=T,W=_(()=>[{label:i("chat.reasoningEffort.options.default"),value:""},{label:i("chat.reasoningEffort.options.none"),value:"none"},{label:i("chat.reasoningEffort.options.minimal"),value:"minimal"},{label:i("chat.reasoningEffort.options.low"),value:"low"},{label:i("chat.reasoningEffort.options.medium"),value:"medium"},{label:i("chat.reasoningEffort.options.high"),value:"high"},{label:i("chat.reasoningEffort.options.xhigh"),value:"xhigh"},{label:i("chat.reasoningEffort.options.max"),value:"max"}]),X=_(()=>a.activeSession?.reasoningEffort||""),Q=_(()=>{const e=W.value.findIndex(n=>n.value===X.value);return e>=0?e:0}),D=["#94a3b8","#2ac8e9","#2bd9b4","#4ed786","#b9d93a","#f9c33c","#f77734","#ef4444"],Y=_(()=>({"--reasoning-effort-accent-color":D[Q.value]||D[0]})),m=_(()=>a.activeSession?.provider==="moa"),I=_(()=>{const e=X.value;return e?W.value.find(n=>n.value===e)?.label||e:i("chat.reasoningEffort.defaultLabel")});function R(e){const n=a.activeSessionId;n&&a.setSessionReasoningEffort(n,e||"")}function se(e){return W.value[Math.round(e)]?.label||I.value}function fe(e){const n=Array.isArray(e)?e[0]:e,l=W.value[Math.round(n)];l&&R(l.value)}function ke(){ae("modelClick")}const he=_(()=>{const e=U.modelLabel||i("models.selectModel"),n=e.split("/").filter(Boolean);return n[n.length-1]||e}),z=y(""),H=y(),ye=y(),E=y(),C=y([]),V=y(!1),L=y(0),f=y(!1),S=_(()=>a.activeMessageReference),Z=_(()=>S.value?.content.replace(/\s+/g," ").trim()||""),G=y(typeof window<"u"?Cn(window.innerWidth):!1),A=y(!1),le=Zs(),ge=_l({messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),ue=Sn({voiceActivityThreshold:.02,messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),oe=Sn({continuous:!0,maxSegmentDurationMs:1e3,onChunk:hn,messages:{unsupported:i("chat.voiceInput.microphoneUnsupported"),recordingFailed:i("chat.voiceInput.microphoneRecordingFailed")}}),ee=Hs(),we=Tl({messages:{unsupported:i("chat.voiceInput.browserSpeechUnsupported"),failed:i("chat.voiceInput.browserSpeechFailed"),failedWithReason:e=>i("chat.voiceInput.browserSpeechFailedWithReason",{error:e})}}),j=y(null),Se=y(""),be=y(null);let ve=null,K=0,Ee=Promise.resolve(),Ce=null;const Ye=_(()=>G.value?null:xn(w.display.chat_input_height));function ze(e){return e.replace(/\s+/g," ").trim()}function ut(){return ee.provider.value==="custom"?{provider:"custom",language:ee.customLanguage.value.trim()||void 0,prompt:ee.customPrompt.value.trim()||void 0}:ee.provider.value==="doubao"?{provider:"doubao"}:ee.provider.value!=="browser"?{provider:ee.provider.value}:{provider:"openai",language:ee.openaiLanguage.value.trim()||void 0,prompt:ee.openaiPrompt.value.trim()||void 0}}function Ze(){return ee.openaiLanguage.value.trim()||ee.customLanguage.value.trim()||""}function Et(e){const n=ze(e);if(!n)return;const l=H.value,B=z.value,J=l?.selectionStart??B.length,de=l?.selectionEnd??J,Re=B.slice(0,J),zt=B.slice(de),yn=Re&&!/\s$/.test(Re)?" ":"",us=`${Re}${yn}${n}${zt&&!/^\s/.test(zt)?" ":""}${zt}`,kn=Re.length+yn.length+n.length;z.value=us,te.value=!1,pe(()=>{const St=H.value;St&&(St.focus(),St.setSelectionRange(kn,kn),Rt(St))})}function r(){const e=a.activeSessionId;e&&a.clearMessageReference(e),H.value?.focus()}ie(()=>S.value?.id,e=>{e&&pe(()=>H.value?.focus())});const s=Cl({transcribe:async e=>{const{provider:n,language:l,prompt:B}=ut();return Ks({audio:e,provider:n,language:l,prompt:B})},sendMessage:async e=>{Et(e)},stopOutputAudio:()=>le.stop(!0)}),u=_(()=>j.value==="local"&&s.status.value==="capturing"?Se.value:j.value!=="browser"||s.status.value!=="capturing"?s.transcript.value:ze([we.transcript.value,we.partialTranscript.value].filter(Boolean).join(" "))),F=_(()=>ee.provider.value==="browser"||j.value==="browser"),ce=_(()=>s.error.value?.message??be.value?.message??(F.value?we.error.value?.message:null)??oe.error.value?.message??ue.error.value?.message??ge.state.value.error?.message??null),ct=_(()=>Rs.map(e=>({key:e.key,name:e.name,args:e.argsKey?i(e.argsKey):e.args||"",description:i(e.descriptionKey),insertText:e.insertText,opensSkillPicker:e.opensSkillPicker,opensBundlePicker:e.opensBundlePicker,opensBundleCreator:e.opensBundleCreator}))),te=y(!1),Yt=y(""),Le=y(0),dt=y([]),Ge=y(!1),Je=y(""),vt=y(!1);let pt="",Xe=null;const Te=y([]),Ne=y(!1),ft=y(!1),et=y(""),gt=y(!1),Lt=y("");let Oe="",ht=null,mt="";const xe=_(()=>{const e=a.activeSession;return e?e.source==="cli":a.runtimeMode!=="global_agent"}),Zt=_(()=>!!a.activeSession&&a.activeSession.source!=="coding_agent"),Gt=_(()=>{const e=new Map;for(const n of dt.value)for(const l of n.skills||[])l.enabled!==!1&&(e.has(l.name)||e.set(l.name,l));return[...e.values()].map(n=>{const l=Ir(n.name);return{key:`skill:${l}`,name:n.name,commandName:l,description:n.description||n.name}})}),Be=_(()=>{const e=Yt.value.trim().toLowerCase(),n=xe.value?ct.value:Zt.value?ct.value.filter(l=>l.name==="fork"):[];return e?n.filter(l=>{const B=l.name.toLowerCase(),J=l.insertText?.toLowerCase(),de=l.description.toLowerCase();return B.startsWith(e)||J?.startsWith(e)||de.includes(e)}):n}),Jt=_(()=>{const e=Je.value.trim().toLowerCase();return e?Gt.value.filter(n=>n.name.toLowerCase().includes(e)||n.commandName.includes(e)||n.description.toLowerCase().includes(e)):Gt.value}),Xt=_(()=>{const e=et.value.trim().toLowerCase();return e?Te.value.filter(n=>n.name.toLowerCase().includes(e)||n.commandName.includes(e)||n.description.toLowerCase().includes(e)||n.skills.some(l=>l.toLowerCase().includes(e))):Te.value});function Ir(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/_/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Me(){return a.activeSession?.profile||b.activeProfileName||"default"}async function Tr(){if(!xe.value)return;const e=Me();return pt===e||Xe||(Xe=(async()=>{try{const n=await ur(e);if(Me()!==e)return;dt.value=n.categories||[],pt=e}catch{if(Me()!==e)return;dt.value=[],pt=e}finally{Xe=null}})()),Xe}async function $r(){if(!xe.value)return;const e=Me();if(Oe===e)return;if(ht&&mt===e)return ht;const n=(async()=>{try{const l=await ul(e);if(Me()!==e)return;Te.value=l,Oe=e}catch{if(Me()!==e)return;Te.value=[],Oe=""}finally{mt===e&&(ht=null,mt="")}})();return ht=n,mt=e,n}const Ie=y(null),Pr=_(()=>{const e=Ie.value??Ye.value;return e===null?{}:{minHeight:`${e+71}px`}});function Bt(){typeof window>"u"||(G.value=Cn(window.innerWidth))}function Er(){A.value=!1,tt()}function Rt(e=H.value){!e||Ie.value!==null||(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,100)}px`)}function Lr(e){if(e.defaultPrevented)return;const n=e.target instanceof Element?e.target:null;n&&(n.closest(["button","input","textarea",'[role="button"]',".context-limit-editable",".input-toolbar",".resize-handle"].join(","))||H.value?.focus())}function tt(){if(A.value)return;Ie.value=Ye.value;const e=H.value;if(e){if(Ie.value===null){Rt(e);return}e.style.height=`${Ie.value}px`}}function Br(e){e.preventDefault();const n=H.value;if(!n)return;A.value=!0;const l=n.clientHeight,B=e.clientY;function J(Re){Ie.value=xn(l-(Re.clientY-B))??Ie.value}function de(){document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",de),document.body.style.cursor="",document.body.style.userSelect=""}document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",J),document.addEventListener("mouseup",de)}const Rr=_(()=>[{label:i("realtimeVoice.mode"),key:"voiceMode",icon:()=>wn("span",{class:"settings-voice-mode-icon","aria-hidden":"true"},"◉")},{label:i("chat.showToolCalls"),key:"toolTrace",icon:()=>wn("span",{class:["settings-check",{active:$.value}],"aria-hidden":"true"},$.value?"✓":"")}]);function en(){try{const e=JSON.parse(localStorage.getItem(Ct)||"{}");return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function tn(){return a.activeSessionId||a.activeSession?.id||""}function nn(){const e=tn();z.value=e&&en()[e]||""}function an(e){const n=tn();if(!n)return;const l=en();e?l[n]=e:delete l[n],Object.keys(l).length>0?localStorage.setItem(Ct,JSON.stringify(l)):localStorage.removeItem(Ct)}it(()=>{nn(),Bt(),window.addEventListener("resize",Bt),pe(()=>{tt()})});function Ar(e){if(e==="voiceMode"){a.activeSessionId&&ae("voiceClick");return}e==="toolTrace"&&O()}ie(z,e=>{an(e)}),ie(()=>a.activeSession?.id,()=>{nn(),pe(()=>{tt()})}),ie(Ye,()=>{tt()}),ie(()=>w.display.chat_input_height,()=>{A.value=!1,tt()}),ie(()=>[a.activeSession?.profile,b.activeProfileName],()=>{pt="",dt.value=[],Oe="",Te.value=[]});const on=_(()=>z.value.trim().length>0||C.value.length>0),Ue=_(()=>a.isStreaming&&!on.value);function rn(){pe(()=>{ye.value&&ye.value.querySelector(".active")?.scrollIntoView({block:"nearest",behavior:"instant"})})}function sn(){if(!xe.value&&!Zt.value){te.value=!1;return}const e=H.value;if(!e)return;const n=e.selectionStart,l=z.value.slice(0,n);if(!l.startsWith("/")||l.includes(" ")||l.includes(`
|
|
3
|
+
`)){te.value=!1;return}Yt.value=l.slice(1),Le.value=0,te.value=Be.value.length>0}function ln(e){if(e.opensSkillPicker){te.value=!1,un();return}if(e.opensBundlePicker){te.value=!1,cn();return}if(e.opensBundleCreator){te.value=!1,Dt();return}z.value=`/${e.insertText||e.name} `,te.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}async function un(){if(xe.value){te.value=!1,Je.value="",Ge.value=!0,vt.value=!0;try{await Tr()}finally{vt.value=!1}}}function At(e){z.value=`/skill ${e.commandName} `,Ge.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}async function cn(){if(xe.value){te.value=!1,et.value="",Ne.value=!0,gt.value=!0;try{await $r()}finally{gt.value=!1}}}function Dt(){xe.value&&(te.value=!1,Ne.value=!1,ft.value=!0)}function dn(e){z.value=`/bundles ${e.commandName} `,Ne.value=!1,pe(()=>{const n=H.value;if(!n)return;const l=z.value.length;n.setSelectionRange(l,l),n.focus()})}function Dr(e){ft.value=!1,Oe="",Te.value=[e,...Te.value.filter(n=>n.commandName!==e.commandName)],dn(e)}function Fr(e){const n=Me();N.warning({title:i("chat.bundlePicker.deleteTitle"),content:i("chat.bundlePicker.deleteConfirm",{name:e.name}),positiveText:i("common.delete"),negativeText:i("common.cancel"),onPositiveClick:async()=>{Lt.value=e.commandName;try{await dl(n,e.commandName),Me()===n?Te.value=Te.value.filter(l=>l.commandName!==e.commandName):Oe="",M.success(i("chat.bundlePicker.deleted"))}catch(l){return M.error(`${i("chat.bundlePicker.deleteFailed")}: ${l?.message||""}`),!1}finally{Lt.value=""}}})}const Fe=y(256e3);let _t="",yt="",nt=null;const at=y(!1),Ve=y(256e3),kt=y(!1);async function Vr(){Ve.value=Fe.value,at.value=!0}async function zr(){if(!Ve.value||Ve.value<=0){M.error(i("chat.contextEditInvalid"));return}kt.value=!0;try{const e=a.activeSession?.provider||c.selectedProvider||"",n=a.activeSession?.model||c.selectedModel||"";if(!e||!n){M.error(i("chat.contextEditFailed"));return}await sl(e,n,Ve.value),Fe.value=Ve.value,_t=wt(),at.value=!1,M.success(i("chat.contextEditSuccess"))}catch(e){M.error(`${i("chat.contextEditFailed")}: ${e.message||""}`)}finally{kt.value=!1}}function vn(){const e=a.activeSession;return{profile:e?.profile||b.activeProfileName||void 0,provider:e?.provider||void 0,model:e?.model||void 0}}function wt(){const e=vn();return`${e.profile||""}|${e.provider||""}|${e.model||""}`}async function pn(){const e=wt();if(e!==_t)return e===yt&&nt||(yt=e,nt=(async()=>{const n=vn();try{const l=await $s(n.profile,n.provider,n.model);if(wt()!==e)return;Fe.value=l,_t=e}catch{if(wt()!==e)return;Fe.value=Wa,_t=e}finally{yt===e&&(nt=null,yt="")}})()),nt}it(pn),ie(()=>[b.activeProfileName,c.selectedProvider,c.selectedModel,a.activeSession?.id,a.activeSession?.profile,a.activeSession?.provider,a.activeSession?.model,a.activeSession?.source],pn,{flush:"post"});const Ft=_(()=>{const e=a.activeSession?.contextTokens;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:(a.activeSession?.inputTokens??0)+(a.activeSession?.outputTokens??0)}),Nr=_(()=>!!a.activeSession),Or=_(()=>Math.max(0,Fe.value-Ft.value)),ot=_(()=>Math.min(Ft.value/Fe.value*100,100));function Vt(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function fn(e,n){if(C.value.find(J=>J.name===e.name))return;const l=Date.now().toString(36)+Math.random().toString(36).slice(2,8),B=URL.createObjectURL(e);C.value.push({id:l,name:e.name,type:e.type,size:e.size,url:B,file:e,...n?.trim()?{context:n.trim()}:{}})}function bt(e){for(const n of e)fn(n);e.length>0&&H.value?.focus()}function Ur(e,n){fn(e,n),H.value?.focus()}function qr(){E.value?.click()}function jr(e){const n=e.target;n.files&&(bt(Array.from(n.files)),n.value="")}function Hr(e){const n=Ns(e.clipboardData);n.length&&(e.preventDefault(),bt(n))}function Kr(e){e.preventDefault()}function Wr(e){e.preventDefault(),e.dataTransfer?.types.includes("Files")&&(L.value++,V.value=!0)}function Qr(){L.value--,L.value<=0&&(L.value=0,V.value=!1)}function Yr(e){e.preventDefault(),L.value=0,V.value=!1;const n=Array.from(e.dataTransfer?.files||[]);n.length&&bt(n)}g({addFiles:bt,addBrowserAttachment:Ur});function gn(){const e=z.value.trim();if(!(!e&&C.value.length===0)){if(xe.value&&e==="/skill"&&C.value.length===0){un();return}if(xe.value&&C.value.length===0&&/^\/bundles$/i.test(e)){cn();return}if(xe.value&&C.value.length===0&&/^\/bundles\s+create$/i.test(e)){Dt();return}a.sendMessage(e,C.value.length>0?C.value:void 0),z.value="",an(""),C.value=[],te.value=!1,H.value&&(H.value.style.height="auto")}}function Zr(){K+=1,Ee=Promise.resolve(),Ce=null,Se.value="",be.value=null}async function qe(){const e=ve;ve=null,e&&await bn(e).catch(()=>{})}function Gr(e,n){if(n!==K)return;Ce=e,be.value=e instanceof Error?e:new Error(String(e)),oe.cancel(),j.value=null;const l=s.activeCaptureId.value;K+=1,qe(),s.cancelCapture(l)}function hn(e){const n=K,l=ve;return!l||e.size<=44||(Ee=Ee.then(async()=>{if(n!==K)return;const B=await Os(l,e);n===K&&(Se.value=ze(B.text))}).catch(B=>Gr(B,n))),Ee}async function Jr(){we.clearError(),be.value=null;const{captureId:e}=await s.beginCapture(),n=ee.provider.value==="browser",l=ee.provider.value==="local",B=!n&&!l&&(ps()||Pl());j.value=n?"browser":l?"local":B?"pcm":"backend";try{if(n){await we.start({language:Ze()});return}if(l){Zr();const J=K,de=await Us();if(J!==K||j.value!=="local"||s.activeCaptureId.value!==e){await bn(de.sessionId).catch(()=>{});return}ve=de.sessionId,await oe.start();return}B?await ue.start():await ge.start()}catch(J){l&&(be.value=J instanceof Error?J:new Error(String(J)),K+=1,oe.cancel(),await qe()),j.value=null,s.cancelCapture(e)}}async function Xr(){const e=s.activeCaptureId.value;if(!e)return;if(j.value==="browser"){let B="";try{B=await we.stop()}catch{j.value=null,s.cancelCapture(e);return}j.value=null;try{await s.commitTranscript(e,B)}catch{}return}if(j.value==="local"){const B=K,J=ve;if(!J||oe.status.value==="requesting"){K+=1,oe.cancel(),j.value=null,await qe(),s.cancelCapture(e);return}try{const de=await oe.stop();if(de&&hn(de),await Ee,B!==K)return;if(Ce)throw Ce;ve=null;const Re=await qs(J);if(B!==K)return;Se.value=ze(Re.text)||Se.value,j.value=null,await s.commitTranscript(e,Se.value),Se.value=""}catch(de){if(B!==K)return;be.value=de instanceof Error?de:new Error(String(de)),K+=1,oe.cancel(),j.value=null,await qe(),s.cancelCapture(e)}return}const n=j.value==="pcm";if((n?ue.status.value:ge.state.value.status)==="requesting"){n?ue.cancel():ge.cancel(),j.value=null,s.cancelCapture(e);return}let l;try{l=n?await ue.stop():await ge.stop()}catch{j.value=null,s.cancelCapture(e);return}if(j.value=null,!l||l.size<=0){s.cancelCapture(e);return}try{await s.transcribeAndSend(e,l)}catch{}}function es(){j.value==="browser"?we.cancel():j.value==="local"?(K+=1,oe.cancel(),qe(),Se.value="",be.value=null):j.value==="pcm"?ue.cancel():ge.cancel(),j.value=null,s.cancelCapture()}function ts(){f.value=!0}function ns(){requestAnimationFrame(()=>{f.value=!1,sn()})}function as(e){return f.value||e.isComposing||e.keyCode===229}function os(e){if(te.value&&Be.value.length>0){if(e.key==="ArrowDown"){e.preventDefault(),Le.value=(Le.value+1)%Be.value.length,rn();return}if(e.key==="ArrowUp"){e.preventDefault(),Le.value=(Le.value-1+Be.value.length)%Be.value.length,rn();return}if(e.key==="Enter"||e.key==="Tab"){e.preventDefault(),ln(Be.value[Le.value]);return}if(e.key==="Escape"){e.preventDefault(),te.value=!1;return}}e.key!=="Enter"||e.shiftKey||as(e)||(e.preventDefault(),gn())}function rs(e){const n=e.target;f.value||sn(),Ie.value===null&&Rt(n)}function ss(e){Le.value=e}function mn(e){if(!te.value)return;const n=e.target;!n.closest(".slash-command-dropdown")&&!n.closest(".input-wrapper")&&(te.value=!1)}it(()=>{document.addEventListener("mousedown",mn)}),hs(()=>{document.removeEventListener("mousedown",mn),window.removeEventListener("resize",Bt),j.value==="local"&&(K+=1,oe.cancel(),qe())});function ls(e){const n=C.value.findIndex(l=>l.id===e);n!==-1&&(URL.revokeObjectURL(C.value[n].url),C.value.splice(n,1))}function is(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function _n(e){return e.startsWith("image/")}return(e,n)=>(v(),h("div",Kn,[C.value.length>0?(v(),h("div",Wn,[(v(!0),h(De,null,Ae(C.value,l=>(v(),h("div",{key:l.id,class:_e(["attachment-preview",{image:_n(l.type),"has-context":!!l.context}])},[_n(l.type)?(v(),h("img",{key:0,src:l.url,alt:l.name,class:"attachment-thumb"},null,8,Qn)):(v(),h("div",Yn,[n[11]||(n[11]=t("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),t("polyline",{points:"14 2 14 8 20 8"})],-1)),t("span",Zn,d(l.name),1),t("span",Gn,d(is(l.size)),1)])),l.context?(v(),h("details",Jn,[t("summary",null,d(o(i)("browser.selectionData")),1),t("pre",null,d(l.context),1)])):x("",!0),t("button",{class:"attachment-remove",onClick:B=>ls(l.id)},[...n[12]||(n[12]=[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,Xn)],2))),128))])):x("",!0),S.value?(v(),h("div",ea,[t("span",ta,d(Z.value),1),t("button",{type:"button",class:"message-reference-remove","aria-label":o(i)("chat.cancelReference"),title:o(i)("chat.cancelReference"),onClick:$e(r,["stop"])},[...n[13]||(n[13]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,na)])):x("",!0),t("div",{class:_e(["input-wrapper",{"drag-over":V.value}]),style:st(Pr.value),onDragover:Kr,onDragenter:Wr,onDragleave:Qr,onDrop:Yr,onMousedown:Lr},[t("input",{ref_key:"fileInputRef",ref:E,type:"file",multiple:"",class:"file-input-hidden",onChange:jr},null,544),t("div",{class:"resize-handle",title:o(i)("chat.inputHeightResizeHint"),onMousedown:Br,onDblclick:Er},null,40,aa),Nr.value?(v(),h("div",oa,[t("span",{class:_e(["context-info",{"context-warning":ot.value>80}])},[ne(d(Vt(Ft.value))+" / ",1),P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[t("span",{class:"context-limit-editable",onClick:Vr},d(Vt(Fe.value)),1)]),default:k(()=>[t("span",null,d(o(i)("chat.contextClickToEdit")),1)]),_:1},8,["disabled"]),ne(" · "+d(o(i)("chat.contextRemaining"))+" "+d(Vt(Or.value)),1)],2),t("div",ra,[t("div",{class:_e(["context-bar-fill",{"context-bar-warn":ot.value>60&&ot.value<=80,"context-bar-danger":ot.value>80}]),style:st({width:`${ot.value}%`})},null,6)])])):x("",!0),Nt(t("textarea",{ref_key:"textareaRef",ref:H,"onUpdate:modelValue":n[0]||(n[0]=l=>z.value=l),class:"input-textarea",dir:"auto",style:st(Ie.value?{height:Ie.value+"px"}:{}),placeholder:o(i)("chat.inputPlaceholder"),rows:"1",onKeydown:os,onCompositionstart:ts,onCompositionend:ns,onInput:rs,onPaste:Hr},null,44,sa),[[Ut,z.value]]),t("div",la,[t("div",ia,[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",onClick:qr,circle:"",class:"toolbar-icon-button"},{icon:k(()=>[...n[14]||(n[14]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},[t("path",{d:"M12 5v14"}),t("path",{d:"M5 12h14"})],-1)])]),_:1})]),default:k(()=>[ne(" "+d(o(i)("chat.attachFiles")),1)]),_:1},8,["disabled"]),m.value?x("",!0):(v(),me(o(Ss),{key:0,trigger:"click",placement:"top-start"},{trigger:k(()=>[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:_e(["reasoning-effort-button",{active:!!X.value}]),style:st(Y.value),"aria-label":`${o(i)("chat.reasoningEffort.tooltip")}: ${I.value}`},{icon:k(()=>[...n[15]||(n[15]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z"}),t("path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z"})],-1)])]),default:k(()=>[t("span",ua,d(I.value),1),n[16]||(n[16]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["class","style","aria-label"])]),default:k(()=>[ne(" "+d(o(i)("chat.reasoningEffort.tooltip"))+": "+d(I.value),1)]),_:1},8,["disabled"])]),default:k(()=>[t("div",{class:"reasoning-effort-slider-popover",style:st(Y.value)},[t("div",ca,[t("span",null,d(o(i)("chat.reasoningEffort.tooltip")),1),t("strong",null,d(I.value),1)]),P(o(Cs),{class:_e(["reasoning-effort-slider",{"reasoning-effort-slider--max":X.value==="max"}]),value:Q.value,min:0,max:W.value.length-1,step:1,"format-tooltip":se,"onUpdate:value":fe},null,8,["class","value","max"]),t("div",da,[t("span",null,d(W.value[0].label),1),t("span",null,d(W.value[W.value.length-1].label),1)])],4)]),_:1})),P(o(cs),{trigger:"click",options:Rr.value,"show-arrow":!0,onSelect:Ar},{default:k(()=>[P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:"input-settings-button","aria-label":o(i)("sidebar.settings")},{icon:k(()=>[...n[17]||(n[17]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"3"}),t("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06A2 2 0 1 1 7.04 4.3l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h.08a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c.2.6.77 1 1.4 1H21a2 2 0 1 1 0 4h-.09c-.63 0-1.2.4-1.51 1Z"})],-1)])]),default:k(()=>[t("span",va,d(o(i)("sidebar.settings")),1),n[18]||(n[18]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["aria-label"])]),default:k(()=>[ne(" "+d(o(i)("sidebar.settings")),1)]),_:1},8,["disabled"])]),_:1},8,["options"]),P(o(rt),{trigger:"hover",disabled:G.value},{trigger:k(()=>[P(o(re),{quaternary:"",size:"tiny",class:"input-model-button",title:G.value?void 0:U.modelLabel||o(i)("models.selectModel"),"aria-label":U.modelLabel||o(i)("models.selectModel"),onClick:ke},{icon:k(()=>[...n[19]||(n[19]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"3"}),t("path",{d:"M12 1v4"}),t("path",{d:"M12 19v4"}),t("path",{d:"M1 12h4"}),t("path",{d:"M19 12h4"}),t("path",{d:"M4.22 4.22l2.83 2.83"}),t("path",{d:"M16.95 16.95l2.83 2.83"}),t("path",{d:"M4.22 19.78l2.83-2.83"}),t("path",{d:"M16.95 7.05l2.83-2.83"})],-1)])]),default:k(()=>[t("span",pa,d(he.value),1),n[20]||(n[20]=t("svg",{class:"toolbar-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m6 9 6 6 6-6"})],-1))]),_:1},8,["title","aria-label"])]),default:k(()=>[ne(" "+d(U.modelLabel||o(i)("models.selectModel")),1)]),_:1},8,["disabled"])]),t("div",fa,[P(fr,{status:o(s).status.value,transcript:u.value,error:ce.value,events:o(s).events.value,"on-start":Jr,"on-stop":Xr,"on-cancel":es},null,8,["status","transcript","error","events"]),P(o(re),{size:"medium",type:"primary",circle:"",class:_e(["send-button",{"send-button--stop":Ue.value}]),disabled:Ue.value?o(a).isAborting:!on.value,"aria-label":Ue.value?"Stop":"Send",onClick:n[1]||(n[1]=l=>Ue.value?o(a).stopStreaming():gn())},{icon:k(()=>[Ue.value?(v(),h("svg",ga,[...n[21]||(n[21]=[t("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2.5",fill:"currentColor"},null,-1)])])):(v(),h("svg",ha,[...n[22]||(n[22]=[t("path",{d:"M12 19V5"},null,-1),t("path",{d:"m5 12 7-7 7 7"},null,-1)])]))]),default:k(()=>[t("span",ma,d(Ue.value?o(i)("chat.stop"):o(i)("chat.send")),1)]),_:1},8,["class","disabled","aria-label"])])]),P(lt,{name:"dropdown-fade"},{default:k(()=>[te.value&&Be.value.length>0?(v(),h("div",{key:0,ref_key:"commandDropdownRef",ref:ye,class:"slash-command-dropdown"},[(v(!0),h(De,null,Ae(Be.value,(l,B)=>(v(),h("div",{key:l.key,class:_e(["slash-command-item",{active:B===Le.value}]),onMousedown:$e(J=>ln(l),["prevent"]),onMouseenter:J=>ss(B)},[t("span",ya,"/"+d(l.name),1),l.args?(v(),h("span",ka,d(l.args),1)):x("",!0),t("span",wa,d(l.description),1)],42,_a))),128))],512)):x("",!0)]),_:1})],38),P(o(xt),{show:Ge.value,"onUpdate:show":n[3]||(n[3]=l=>Ge.value=l),title:o(i)("skills.title"),"mask-closable":!0,preset:"card",style:{width:"min(620px, calc(100vw - 32px))"}},{default:k(()=>[Ge.value?(v(),h("div",ba,[Nt(t("input",{"onUpdate:modelValue":n[2]||(n[2]=l=>Je.value=l),class:"skill-picker-search",placeholder:o(i)("skills.searchPlaceholder"),type:"search"},null,8,Sa),[[Ut,Je.value]]),t("div",Ca,[vt.value?(v(),h("div",xa,d(o(i)("common.loading")),1)):(v(!0),h(De,{key:1},Ae(Jt.value,l=>(v(),h("div",{key:l.key,role:"button",tabindex:"0",class:"skill-picker-item",onClick:B=>At(l),onKeydown:[It($e(B=>At(l),["prevent"]),["enter"]),It($e(B=>At(l),["prevent"]),["space"])]},[t("div",Ia,"/skill "+d(l.commandName),1),t("div",Ta,d(l.name),1),t("div",$a,d(l.description),1)],40,Ma))),128)),!vt.value&&Jt.value.length===0?(v(),h("div",Pa,d(Je.value?o(i)("skills.noMatch"):o(i)("skills.noSkills")),1)):x("",!0)])])):x("",!0)]),_:1},8,["show","title"]),P(o(xt),{show:Ne.value,"onUpdate:show":n[6]||(n[6]=l=>Ne.value=l),title:o(i)("chat.bundlePicker.title"),"mask-closable":!0,preset:"card",style:{width:"min(620px, calc(100vw - 32px))"}},{default:k(()=>[Ne.value?(v(),h("div",Ea,[t("div",La,[Nt(t("input",{"onUpdate:modelValue":n[4]||(n[4]=l=>et.value=l),class:"skill-picker-search",placeholder:o(i)("chat.bundlePicker.searchPlaceholder"),type:"search"},null,8,Ba),[[Ut,et.value]]),P(o(re),{type:"primary",onClick:Dt},{default:k(()=>[ne(d(o(i)("chat.bundlePicker.create")),1)]),_:1})]),t("div",Ra,[gt.value?(v(),h("div",Aa,d(o(i)("common.loading")),1)):(v(!0),h(De,{key:1},Ae(Xt.value,l=>(v(),h("div",{key:l.commandName,class:"skill-picker-item bundle-picker-item"},[t("button",{type:"button",class:"bundle-picker-select",onClick:B=>dn(l)},[t("span",Fa,"/bundles "+d(l.commandName),1),t("span",Va,d(l.name),1),l.description?(v(),h("span",za,d(l.description),1)):x("",!0),t("span",Na,d(o(i)("chat.bundlePicker.skillsLabel"))+": "+d(l.skills.length>0?l.skills.join(", "):o(i)("chat.bundlePicker.noSkills")),1)],8,Da),t("button",{type:"button",class:"bundle-picker-delete",disabled:Lt.value===l.commandName,"aria-label":o(i)("chat.bundlePicker.deleteBundle",{name:l.name}),title:o(i)("chat.bundlePicker.deleteBundle",{name:l.name}),onMousedown:n[5]||(n[5]=$e(()=>{},["stop"])),onClick:$e(B=>Fr(l),["stop"])},[...n[23]||(n[23]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[t("path",{d:"M3 6h18"}),t("path",{d:"M8 6V4h8v2"}),t("path",{d:"M19 6l-1 14H6L5 6"}),t("path",{d:"M10 11v5M14 11v5"})],-1)])],40,Oa)]))),128)),!gt.value&&Xt.value.length===0?(v(),h("div",Ua,d(et.value?o(i)("chat.bundlePicker.noMatch"):o(i)("chat.bundlePicker.noBundles")),1)):x("",!0)])])):x("",!0)]),_:1},8,["show","title"]),ft.value?(v(),me(hr,{key:Me(),profile:Me(),onClose:n[7]||(n[7]=l=>ft.value=!1),onCreated:Dr},null,8,["profile"])):x("",!0),P(o(xt),{show:at.value,"onUpdate:show":n[10]||(n[10]=l=>at.value=l),title:o(i)("chat.contextEditTitle"),"mask-closable":!0,preset:"card",style:{width:"400px"}},{footer:k(()=>[t("div",Ka,[P(o(re),{onClick:n[9]||(n[9]=l=>at.value=!1),disabled:kt.value},{default:k(()=>[ne(d(o(i)("chat.contextEditCancel")),1)]),_:1},8,["disabled"]),P(o(re),{type:"primary",onClick:zr,loading:kt.value},{default:k(()=>[ne(d(o(i)("chat.contextEditSave")),1)]),_:1},8,["loading"])])]),default:k(()=>[t("div",qa,[t("p",ja,d(o(i)("chat.contextEditDesc")),1),P(o(Ms),{value:Ve.value,"onUpdate:value":n[8]||(n[8]=l=>Ve.value=l),min:1e3,max:1e7,step:1e3,"show-button":!1,placeholder:o(i)("chat.contextEditPlaceholder"),style:{width:"100%"}},{suffix:k(()=>[...n[24]||(n[24]=[t("span",{style:{color:"#999"}},"tokens",-1)])]),_:1},8,["value","placeholder"]),t("div",Ha,d(o(i)("chat.contextEditHint")),1)])]),_:1},8,["show","title"])]))}})})),Ll=q((()=>{})),Bl,fi=q((()=>{Qa(),Qa(),Ll(),We(),Bl=Qe(br,[["__scopeId","data-v-bee7f717"]])})),Sr,Rl=q((()=>{Sr="/assets/gif/thinking-DoVDAdxi.gif"})),Ya,Za,Ga,Ja,Xa,eo,to,no,ao,Cr,oo=q((()=>{Pe(),He(),Rl(),fs(),Ya={class:"live-reasoning-status"},Za={class:"thinking-status"},Ga=["src"],Ja={class:"thinking-status-copy"},Xa={class:"thinking-status-label"},eo={class:"thinking-status-time"},to=["data-reasoning-id"],no={class:"live-reasoning-label"},ao={class:"live-reasoning-body"},Cr=je({__name:"LiveReasoningStatus",props:{reasoning:{},reasoningId:{},elapsed:{}},setup(p){const g=ds(async()=>(await vs(async()=>{const{default:a}=await import("./MarkdownRenderer-BIPowjr-.js");return{default:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).default),{t:T}=Ke();return(a,c)=>(v(),h("div",Ya,[t("div",Za,[t("img",{src:o(Sr),alt:"","aria-hidden":"true",class:"thinking-avatar"},null,8,Ga),t("div",Ja,[t("span",Xa,d(o(T)("chat.thinkingInProgress")),1),t("span",eo,d(p.elapsed),1)])]),p.reasoning?(v(),h("div",{key:p.reasoningId??p.reasoning,class:"live-reasoning-detail","data-reasoning-id":p.reasoningId},[t("div",no,[c[0]||(c[0]=t("span",{"aria-hidden":"true"},"💭",-1)),t("span",null,d(o(T)("chat.thinkingLabel")),1)]),t("div",ao,[P(o(g),{content:p.reasoning},null,8,["content"])])],8,to)):x("",!0)]))}})})),Al=q((()=>{})),xr,Dl=q((()=>{oo(),oo(),Al(),We(),xr=Qe(Cr,[["__scopeId","data-v-9b0a7071"]])})),ro,so,lo,io,uo,co,vo,po,fo,go,ho,mo,_o,yo,ko,wo,bo,So,Co,xo,Mo,Io,To,$o,Po,Eo,Lo,Bo,Ro,Ao,Do,Fo,Vo,zo,No,Oo,Uo,qo,jo,Ho,Ko,Wo,Qo,Yo,Zo,Go,Jo,Xo,er,Ht,Mr,tr=q((()=>{Pe(),He(),Wt(),Vs(),Js(),Dl(),or(),lr(),ol(),rl(),ro={class:"message-list-shell"},so={class:"empty-state"},lo=["src","alt"],io={key:0,class:"history-archive-link-wrap"},uo=["href"],co={key:1,class:"history-loader"},vo={key:0,class:"history-loader-spinner"},po={key:0,class:"fork-divider",role:"separator"},fo={class:"fork-divider-pill"},go={class:"fork-divider-text"},ho=["href"],mo={key:0,class:"streaming-indicator"},_o={key:0,class:"tool-calls-panel"},yo={key:0,class:"tool-call-item compression-item"},ko={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},wo={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},bo={class:"tool-call-name"},So={key:2,class:"tool-call-spinner"},Co={key:1,class:"tool-call-item compression-item"},xo={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},Mo={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},Io={class:"tool-call-name"},To={key:2,class:"tool-call-spinner"},$o=["role","tabindex","title","onClick","onKeydown"],Po={class:"tool-call-name"},Eo=["title"],Lo=["title"],Bo={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"tool-call-success-icon"},Ro={key:3,class:"tool-call-spinner"},Ao={key:4,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"tool-call-error-icon"},Do=["aria-label","title"],Fo={key:1,class:"message-float-stack"},Vo={class:"float-panel-header"},zo={class:"approval-float-title"},No={class:"approval-float-desc"},Oo={class:"approval-float-command"},Uo={class:"approval-float-actions"},qo={key:0,class:"approval-float-panel"},jo={class:"float-panel-header"},Ho={class:"approval-float-title"},Ko={class:"approval-float-desc"},Wo={key:0,class:"approval-float-actions"},Qo={class:"clarify-float-input-row"},Yo={key:0,class:"queue-float-panel"},Zo={class:"queue-float-header"},Go={class:"queue-float-list"},Jo={class:"queue-index"},Xo={class:"queue-text"},er=["title","onClick"],Ht=new Map,Mr=je({__name:"MessageList",props:{approvalPortalToBody:{type:Boolean,default:!1},scrollScope:{default:"chat"}},setup(p,{expose:g}){const T=p,a=rr(),{t:c}=Ke(),{toolTraceVisible:b}=sr(),w=y(null),i=y(null),M=y(!1),N=y(0),$={frames:8,keepAliveMs:1200};let O=0,U=null;function ae(r){return r>=1e6?(r/1e6).toFixed(1)+"M":r>=1e3?(r/1e3).toFixed(1)+"K":String(r)}function W(r){return r<1?`${Math.round(r*1e3)}ms`:r<60?`${Math.round(r*10)/10}s`:`${Math.floor(r/60)}m ${Math.round(r%60)}s`}function X(r){const s=String(r||"");return s.length>160?`${s.slice(0,157)}...`:s}function Q(r){return tl(r.toolCallId)!==null}function D(r){Q(r)&&Xs(a.activeSessionId,r.toolCallId)}function Y(r){const s=Math.floor(r/1e3),u=Math.floor(s/3600),F=Math.floor(s%3600/60),ce=s%60;return u>0?`${u}h${F}m${ce}s`:F>0?`${F}m${ce}s`:`${ce}s`}function m(){U&&(clearInterval(U),U=null)}const I=_(()=>a.isRunActive||!!a.abortState),R=_(()=>Y(N.value)),se=_(()=>{const r=a.messages;let s=-1;for(let u=r.length-1;u>=0;u--)if(r[u].role==="user"||r[u].role==="command"){s=u;break}return[...r.filter((u,F)=>u.role==="tool"&&F>s)].reverse()}),fe=_(()=>se.value.filter(r=>!!r.toolName)),ke=_(()=>{if(!I.value)return null;const r=a.messages;let s=-1;for(let u=r.length-1;u>=0;u--)if(r[u].role==="user"||r[u].role==="command"){s=u;break}for(let u=r.length-1;u>s;u--){const F=r[u];if(F.role==="assistant"&&F.reasoning?.trim())return{messageId:F.id,reasoning:F.reasoning.trim()}}for(let u=r.length-1;u>s;u--){const F=r[u];if(F.role==="tool"&&F.reasoning?.trim())return{messageId:F.id,reasoning:F.reasoning.trim()}}return null}),he=_(()=>{const r=a.activeSession,s=r?.codingAgentId||(r?.agent==="codex"?"codex":r?.agent==="claude"?"claude-code":r?.agent==="ekko-agent"?"ekko-agent":void 0);return s==="codex"?{logo:"/coding-agents/codex-openai.png",alt:"Codex",text:c("chat.emptyStateAgent",{agent:"Codex"})}:s==="claude-code"?{logo:"/coding-agents/claude-code.svg",alt:"Claude Code",text:c("chat.emptyStateAgent",{agent:"Claude Code"})}:s==="ekko-agent"?{logo:"/coding-agents/ekko-agent.png",alt:"Ekko Agent",text:c("chat.emptyStateAgent",{agent:"Ekko Agent"})}:{logo:"/coding-agents/hermes.png",alt:"Hermes",text:c("chat.emptyState")}}),z=_(()=>{const r=a.messages,s=new Set(se.value.map(u=>u.id));return r.filter((u,F)=>{if(u.role==="tool")return b.value&&!!u.toolName&&!(a.isRunActive&&s.has(u.id));if(u.role==="assistant"&&u.id===ke.value?.messageId&&!u.content?.trim())return!1;if(u.role==="assistant"&&!u.isStreaming&&!u.content?.trim()&&u.reasoning?.trim()){const ce=r[F+1];return!(b.value&&ce?.role==="tool"&&ce.toolName&&ce.reasoning?.trim()===u.reasoning.trim())}return!0}).map(u=>u.role==="assistant"&&u.id===ke.value?.messageId&&u.content?.trim()&&u.reasoning?.trim()?{...u,reasoning:void 0}:u)});function H(r){return`fork-divider-${r}`}const ye=_(()=>{const r=z.value,s=ue.value,u=a.activeSession;if(!s||!u?.forkPointMessageId)return r;const F=String(u.forkPointMessageId),ce=r.findIndex(te=>String(te.id)===F);if(ce<0)return r;const ct={id:H(u.id),role:"system",content:"",timestamp:u.updatedAt||Date.now(),systemType:"fork-divider"};return[...r.slice(0,ce+1),ct,...r.slice(ce+1)]}),E=_(()=>{const r=a.activeSession,s=z.value.some(u=>u.role==="user"||u.role==="assistant");return!!r&&r.source!=="coding_agent"&&!a.isStreaming&&!a.isForkPending&&s}),C=_(()=>{const r=ye.value;for(let s=r.length-1;s>=0;s--){const u=r[s];if(u.role==="user"||u.role==="assistant")return u.id}return null}),V=_(()=>{const r=a.activeSessionId;return r?a.queuedUserMessages.get(r)||[]:[]}),L=_(()=>a.activePendingApproval),f=_(()=>a.activePendingClarify),S=y(""),Z=_(()=>!!L.value||!!f.value),G=_(()=>V.value.length>0&&Z.value?"20px 20px 380px":V.value.length>0||Z.value?"20px 20px 260px":"20px"),A=_(()=>{const r=a.activeSessionId;if(!r)return null;const s=a.activeSession?.id===r?a.activeSession:a.sessions.find(u=>u.id===r);return nl(T.scrollScope,{id:r,profile:s?.profile})}),le=_(()=>{const r=a.activeSession;return!!r?.hasMoreBefore&&(r.loadedMessageCount||0)>=300}),ge=_(()=>{const r=a.activeSession;if(!r?.id)return"#/hermes/history";const s=r.profile?`?profile=${encodeURIComponent(r.profile)}`:"";return`#/hermes/history/session/${encodeURIComponent(r.id)}${s}`}),ue=_(()=>{const r=a.activeSession;return r?.parentSessionId?{parentSessionId:r.parentSessionId,parentTitle:r.parentTitle||r.parentSessionId,parentHref:`#/hermes/history/session/${encodeURIComponent(r.parentSessionId)}${r.profile?`?profile=${encodeURIComponent(r.profile)}`:""}`,canSwitchParent:a.sessions.some(s=>s.id===r.parentSessionId),lastRole:r.parentLastMessageRole||"",lastMessage:r.parentLastMessage||""}:null});async function oe(r){const s=ue.value;if(s?.parentSessionId){if(s.canSwitchParent){r?.preventDefault(),await a.switchSession(s.parentSessionId);return}window.location.hash=s.parentHref.replace(/^#/,"")}}function ee(r){a.respondApproval(r)}function we(r){const s=r!==void 0?r:S.value.trim();a.respondToClarify(s),S.value=""}function j(r){const s=a.activeSessionId;s&&a.removeQueuedMessage(s,r)}function Se(r){const s=Ls(r),u=(s?.reply||s?.content||r).replace(/\s+/g," ").trim();return u.length>48?`${u.slice(0,48)}...`:u}function be(r=100){return w.value?.shouldAutoFollowBottom(r)??!0}function ve(r){w.value?.scrollToBottom(r),M.value=!1}function K(r){w.value?.scrollToMessage(r)}function Ee(r,s){w.value?.scrollToAnchor(r,s)}function Ce(){M.value=z.value.length>0&&!(w.value?.isNearBottom(1e3)??!0)}function Ye(){Ce()}function ze(){ve({frames:4,keepAliveMs:600})}function ut(r){if(!r)return;const s=w.value?.captureViewportPosition()??null;s&&al(Ht,r,s)}function Ze(r){if(A.value!==r)return;if(a.focusMessageId){i.value=null,K(a.focusMessageId);return}const s=Ht.get(r);if(s){i.value=null,s.wasNearBottom?ve($):w.value?.restoreViewportPosition(s);return}const u=a.activeSession;if(u?.parentSessionId&&u.forkPointMessageId){const F=H(u.id);if(ye.value.some(ce=>ce.id===F)){i.value=null,K(F);return}if(a.isLoadingMessages||a.messages.length===0)return}ve($),a.messages.length>0&&!a.isLoadingMessages&&(i.value=null)}async function Et(){const r=a.activeSession;if(!r?.hasMoreBefore||r.isLoadingOlderMessages||le.value)return;const s=w.value?.captureScrollPosition()??null;await a.loadOlderMessages(r.id)&&(await pe(),w.value?.restoreScrollPosition(s),Ce())}return ie(A,async(r,s)=>{ut(s),r&&(i.value=r,await pe(),Ze(r))},{immediate:!0}),ie(()=>[A.value,a.messages.length],([r,s])=>{!r||i.value!==r||s===0||(Ze(r),pe(Ce))},{flush:"post"}),ie(()=>z.value.length,()=>{pe(Ce)},{flush:"post"}),ie(()=>a.isLoadingMessages,async(r,s)=>{if(r||!s)return;const u=A.value;if(!(!u||i.value!==u)){if(a.focusMessageId){i.value=null;return}await pe(),A.value===u&&Ze(u)}},{flush:"post"}),ie(()=>a.focusMessageId,r=>{r&&K(r)}),ie(()=>a.isRunActive,r=>{r&&ve({frames:3,keepAliveMs:400})}),ie(I,r=>{if(m(),!r){O=0,N.value=0;return}O=Date.now(),N.value=0,U=setInterval(()=>{N.value=Date.now()-O},1e3)},{immediate:!0}),ie(()=>a.messages[a.messages.length-1]?.content,()=>{if(i.value!==A.value){if(a.focusMessageId){K(a.focusMessageId);return}be()&&ve({frames:1,keepAliveMs:0})}}),ie(se,()=>{if(i.value!==A.value){if(a.focusMessageId){K(a.focusMessageId);return}be()&&ve({frames:1,keepAliveMs:0})}}),ie(()=>V.value.length,async(r,s)=>{if(i.value===A.value||a.focusMessageId||r<=s)return;const u=be(320);await pe(),!(!u&&!a.isRunActive)&&ve({frames:4,keepAliveMs:600})}),gs(()=>{m(),ut(A.value)}),it(()=>{pe(Ce)}),g({scrollToBottom:ve,scrollToMessage:K,scrollToAnchor:Ee}),(r,s)=>(v(),h("div",ro,[(v(),me(Fs,{key:A.value||"chat-empty",ref_key:"listRef",ref:w,messages:ye.value,virtualized:!1,padding:G.value,onScroll:Ye,onTopReach:Et},{empty:k(()=>[t("div",so,[t("img",{src:he.value.logo,alt:he.value.alt,class:"empty-logo"},null,8,lo),t("p",null,d(he.value.text),1)])]),before:k(()=>[le.value?(v(),h("div",io,[t("a",{class:"history-archive-link",href:ge.value},d(o(c)("chat.viewOlderInHistory")),9,uo)])):o(a).activeSession?.hasMoreBefore||o(a).activeSession?.isLoadingOlderMessages?(v(),h("div",co,[o(a).activeSession?.isLoadingOlderMessages?(v(),h("span",vo)):x("",!0)])):x("",!0)]),item:k(({message:u})=>[u.systemType==="fork-divider"&&ue.value?(v(),h("div",po,[s[9]||(s[9]=t("div",{class:"fork-divider-line","aria-hidden":"true"},null,-1)),t("div",fo,[s[8]||(s[8]=t("span",{class:"fork-divider-icon","aria-hidden":"true"},[t("svg",{viewBox:"0 0 24 24",focusable:"false"},[t("path",{d:"M6 3v6a4 4 0 0 0 4 4h4.2"}),t("path",{d:"M18 9l4 4-4 4"}),t("path",{d:"M6 21V3"}),t("circle",{cx:"6",cy:"5",r:"2"}),t("circle",{cx:"6",cy:"19",r:"2"})])],-1)),t("span",go,d(o(c)("chat.forkedFrom")),1),t("a",{class:"fork-divider-link",href:ue.value.parentHref,onClick:oe},d(ue.value.parentTitle),9,ho)]),s[10]||(s[10]=t("div",{class:"fork-divider-line","aria-hidden":"true"},null,-1))])):(v(),me(el,{key:1,message:u,highlight:o(a).focusMessageId===u.id,"show-fork-action":E.value&&u.id===C.value},null,8,["message","highlight","show-fork-action"]))]),after:k(()=>[P(lt,{name:"fade"},{default:k(()=>[I.value?(v(),h("div",mo,[P(xr,{reasoning:ke.value?.reasoning,"reasoning-id":ke.value?.messageId,elapsed:R.value},null,8,["reasoning","reasoning-id","elapsed"]),fe.value.length>0||o(a).compressionState||o(a).abortState?(v(),h("div",_o,[o(a).abortState?(v(),h("div",yo,[o(a).abortState.aborting?(v(),h("svg",ko,[...s[11]||(s[11]=[t("path",{d:"M10 9v6m4-6v6M5 5h14v14H5z"},null,-1)])])):(v(),h("svg",wo,[...s[12]||(s[12]=[t("path",{d:"M5 13l4 4L19 7"},null,-1)])])),t("span",bo,d(o(a).abortState.aborting?o(a).abortState.timedOut?o(a).abortState.message||"Still stopping... new messages will be queued":"Pausing... waiting for the run to stop and sync":o(a).abortState.synced?"Paused and synced":"Paused"),1),o(a).abortState.aborting?(v(),h("span",So)):x("",!0)])):x("",!0),o(a).compressionState?(v(),h("div",Co,[o(a).compressionState.compressing?(v(),h("svg",xo,[...s[13]||(s[13]=[t("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):o(a).compressionState.compressed?(v(),h("svg",Mo,[...s[14]||(s[14]=[t("path",{d:"M5 13l4 4L19 7"},null,-1)])])):x("",!0),t("span",Io,d(o(a).compressionState.compressing?`Compressing... (${o(a).compressionState.messageCount} msgs, ~${ae(o(a).compressionState.beforeTokens)} tokens)`:o(a).compressionState.compressed?`Compressed ${o(a).compressionState.messageCount} msgs: ~${ae(o(a).compressionState.beforeTokens)} → ~${ae(o(a).compressionState.afterTokens)} tokens`:"Compression skipped"),1),o(a).compressionState.compressing?(v(),h("span",To)):x("",!0)])):x("",!0),(v(!0),h(De,null,Ae(fe.value,u=>(v(),h("div",{key:u.id,class:_e(["tool-call-item",{"subagent-entry":Q(u)}]),role:Q(u)?"button":void 0,tabindex:Q(u)?0:void 0,title:Q(u)?o(c)("subagent.open"):void 0,onClick:F=>D(u),onKeydown:[It($e(F=>D(u),["prevent"]),["enter"]),It($e(F=>D(u),["prevent"]),["space"])]},[s[17]||(s[17]=t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"tool-call-icon"},[t("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})],-1)),t("span",Po,d(u.toolName),1),u.toolPreview?(v(),h("span",{key:0,class:"tool-call-preview",title:u.toolPreview},d(X(u.toolPreview)),9,Eo)):x("",!0),u.toolDuration!==void 0&&u.toolStatus!=="running"?(v(),h("span",{key:1,class:"tool-call-duration",title:r.$t("chat.executionDuration")},d(W(u.toolDuration)),9,Lo)):x("",!0),u.toolStatus==="done"?(v(),h("svg",Bo,[...s[15]||(s[15]=[t("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor","fill-opacity":"0.15"},null,-1),t("path",{d:"M8 12L11 15L16 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)])])):x("",!0),u.toolStatus==="running"?(v(),h("span",Ro)):x("",!0),u.toolStatus==="error"?(v(),h("svg",Ao,[...s[16]||(s[16]=[t("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor","fill-opacity":"0.15"},null,-1),t("path",{d:"M15 9L9 15M9 9L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)])])):x("",!0)],42,$o))),128))])):x("",!0)])):x("",!0)]),_:1})]),_:1},8,["messages","padding"])),M.value?(v(),h("button",{key:0,type:"button",class:"scroll-bottom-button","aria-label":o(c)("chat.scrollToBottom"),title:o(c)("chat.scrollToBottom"),onClick:ze},[...s[18]||(s[18]=[t("svg",{class:"scroll-bottom-icon",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m7 10 5 5 5-5"}),t("path",{d:"M6 19h12"})],-1)])],8,Do)):x("",!0),L.value||f.value||V.value.length>0?(v(),h("div",Fo,[(v(),me(ws,{to:"body",disabled:!T.approvalPortalToBody},[P(lt,{name:"queue-float"},{default:k(()=>[L.value?(v(),h("div",{key:0,class:_e(["approval-float-panel",{"approval-float-panel--global":T.approvalPortalToBody}])},[t("div",Vo,[s[19]||(s[19]=t("span",{class:"approval-float-icon","aria-hidden":"true"},[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"}),t("path",{d:"m9 12 2 2 4-4"})])],-1)),t("span",null,d(o(c)("chat.approvalKicker")),1)]),t("div",zo,d(o(c)("chat.approvalTitle")),1),t("div",No,d(L.value.description),1),t("code",Oo,d(L.value.command),1),t("div",Uo,[L.value.isMemoryWrite?(v(),me(o(re),{key:0,size:"small",type:"primary",onClick:s[0]||(s[0]=u=>ee("once"))},{default:k(()=>[ne(d(o(c)("chat.approvalAgree")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("once")?(v(),me(o(re),{key:1,size:"small",type:"primary",onClick:s[1]||(s[1]=u=>ee("once"))},{default:k(()=>[ne(d(o(c)("chat.approvalAllowOnce")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("session")?(v(),me(o(re),{key:2,size:"small",secondary:"",onClick:s[2]||(s[2]=u=>ee("session"))},{default:k(()=>[ne(d(o(c)("chat.approvalAllowSession")),1)]),_:1})):x("",!0),!L.value.isMemoryWrite&&L.value.choices.includes("always")?(v(),me(o(re),{key:3,size:"small",secondary:"",onClick:s[3]||(s[3]=u=>ee("always"))},{default:k(()=>[ne(d(o(c)("chat.approvalAlways")),1)]),_:1})):x("",!0),L.value.isMemoryWrite||L.value.choices.includes("deny")?(v(),me(o(re),{key:4,size:"small",type:"error",secondary:"",onClick:s[4]||(s[4]=u=>ee("deny"))},{default:k(()=>[ne(d(o(c)("chat.approvalDeny")),1)]),_:1})):x("",!0)])],2)):x("",!0)]),_:1})],8,["disabled"])),P(lt,{name:"queue-float"},{default:k(()=>[!L.value&&f.value?(v(),h("div",qo,[t("div",jo,[s[20]||(s[20]=t("span",{class:"approval-float-icon","aria-hidden":"true"},[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("circle",{cx:"12",cy:"12",r:"10"}),t("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),t("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})])],-1)),t("span",null,d(o(c)("chat.clarifyKicker")),1)]),t("div",Ho,d(o(c)("chat.clarifyTitle")),1),t("div",Ko,d(f.value.question),1),f.value.choices&&f.value.choices.length?(v(),h("div",Wo,[(v(!0),h(De,null,Ae(f.value.choices,u=>(v(),me(o(re),{key:u,size:"small",type:"primary",onClick:F=>we(u)},{default:k(()=>[ne(d(u),1)]),_:2},1032,["onClick"]))),128)),P(o(re),{size:"small",type:"error",secondary:"",onClick:s[5]||(s[5]=u=>we(""))},{default:k(()=>[ne(d(o(c)("chat.clarifyDismiss")),1)]),_:1})])):x("",!0),t("div",Qo,[P(o(Kt),{value:S.value,"onUpdate:value":s[6]||(s[6]=u=>S.value=u),size:"small",placeholder:o(c)("chat.clarifyPlaceholder")},null,8,["value","placeholder"]),P(o(re),{size:"small",type:"primary",onClick:s[7]||(s[7]=u=>we())},{default:k(()=>[ne(d(o(c)("chat.clarifySubmit")),1)]),_:1})])])):x("",!0)]),_:1}),P(lt,{name:"queue-float"},{default:k(()=>[V.value.length>0?(v(),h("div",Yo,[t("div",Zo,[s[21]||(s[21]=t("span",{class:"queue-orbit","aria-hidden":"true"},[t("span")],-1)),t("span",null,d(o(c)("chat.messageQueue")),1),t("strong",null,d(V.value.length),1)]),t("div",Go,[(v(!0),h(De,null,Ae(V.value,(u,F)=>(v(),h("div",{key:u.id,class:"queue-float-item"},[t("span",Jo,d(F+1),1),t("span",Xo,d(Se(u.content)),1),t("button",{type:"button",class:"queue-remove",title:o(c)("chat.removeQueuedMessage"),onClick:ce=>j(u.id)},[...s[22]||(s[22]=[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,er)]))),128))])])):x("",!0)]),_:1})])):x("",!0)]))}})})),Fl=q((()=>{})),Vl,gi=q((()=>{tr(),tr(),Fl(),We(),Vl=Qe(Mr,[["__scopeId","data-v-73da6575"]])}));export{Bl as a,Pl as c,kl as d,_l as f,Dl as i,$l as l,gi as n,fi as o,xr as r,El as s,Vl as t,Tl as u};
|