@camera.ui/server 2.2.5-beta.3 → 2.2.5
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/interface/assets/{404-YZOLos9r.js → 404-CiOxoqnT.js} +1 -1
- package/dist/interface/assets/{About-HtxMc8JZ.js → About-DWOlfWEm.js} +1 -1
- package/dist/interface/assets/Assistant-B1xdMAkA.js +1 -0
- package/dist/interface/assets/{Assistant-BMscGKnc.css → Assistant-CXx7EY1W.css} +1 -1
- package/dist/interface/assets/{Automation-D3DcUyui.js → Automation-BJgwUkUB.js} +3 -3
- package/dist/interface/assets/{AutomationImport-Dp_hT6hQ.js → AutomationImport-9GRAndAt.js} +2 -2
- package/dist/interface/assets/{AutomationStore-BKR7GXMk.js → AutomationStore-D_HR2Xby.js} +2 -2
- package/dist/interface/assets/{AutomationStoreDetail-B9yh51WQ.js → AutomationStoreDetail-B9MxV2py.js} +2 -2
- package/dist/interface/assets/Automations-Bpw8olkc.js +2 -0
- package/dist/interface/assets/Camera-BpFfZDaS.js +2 -0
- package/dist/interface/assets/{CameraConsole-BI93OaRt.js → CameraConsole-BKPTLSTO.js} +1 -1
- package/dist/interface/assets/{Cameras-Ctub8sVt.js → Cameras-DcrVCgLy.js} +2 -2
- package/dist/interface/assets/Camview-C16pyCZk.js +1 -0
- package/dist/interface/assets/{Camview-CZct5cnP.css → Camview-DasO326h.css} +1 -1
- package/dist/interface/assets/{CertificateUpload-xW55NA1Q.js → CertificateUpload-BYFKZCP9.js} +1 -1
- package/dist/interface/assets/Config-BmEL5EaW.js +2 -0
- package/dist/interface/assets/{ConfigActionAssistant-B488rOp5.js → ConfigActionAssistant-DM4tIhoa.js} +1 -1
- package/dist/interface/assets/{ConfigActionCameraControl-ZMUuBxOs.js → ConfigActionCameraControl-Deo0eDPS.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-BJ11xvOW.js → ConfigActionDelay-_EqbfWgo.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-DOUo69OR.js → ConfigActionHttp-BxJmoshF.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-BMzuVZW9.js → ConfigActionImageInput-KrzXFQDm.js} +1 -1
- package/dist/interface/assets/{ConfigActionMqtt-Co_uksca.js → ConfigActionMqtt-BoYBomRC.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-CcZkstYx.js → ConfigActionNotification-CSAOijDt.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotificationControl--VeucoTw.js → ConfigActionNotificationControl-BOdyKiOs.js} +1 -1
- package/dist/interface/assets/{ConfigActionOutput-CyDa1LGA.js → ConfigActionOutput-CwsPcnd_.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-Kfg3ZEQF.js → ConfigActionPlugin-D3wyULpp.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-DhAF0HPw.js → ConfigActionSensor-BmeaIxYY.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-zMe3SPvW.js → ConfigActionSnapshot-DbyFKcYr.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-BE5q3NwY.js → ConfigActionVariable-cThGJ1Pc.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-BNIRtSVD.js → ConfigConditionIfElse-BugkJeXR.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-DTNd-SzI.js → ConfigConditionSensorState-Bf-mMf4E.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-BU5wWMU1.js → ConfigConditionSwitch-DcpFoYET.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-KXTCIVIV.js → ConfigConditionTime-CM4bSMyU.js} +1 -1
- package/dist/interface/assets/{ConfigSensorValueInput-BC1FpMm-.js → ConfigSensorValueInput-CgAI34__.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-hIN1hi53.js → ConfigTriggerDetection-BWK6gfwM.js} +1 -1
- package/dist/interface/assets/ConfigTriggerGeofence-Cm3CU7Tl.js +1 -0
- package/dist/interface/assets/{ConfigTriggerManual-C5vwxS-e.js → ConfigTriggerManual-DgkR-GWy.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerMqtt-B4PtWC3E.js → ConfigTriggerMqtt-BMFjTAso.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-BZzUdGBa.js → ConfigTriggerSchedule-E_QWfNKy.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-D18nwMsj.js → ConfigTriggerSensor-DOdJkZRo.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-BhygWLB4.js → ConfigTriggerSystem-BFDIbZsE.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-yyuBuhLD.js → ConfigTriggerWebhook-DDoUEVHb.js} +1 -1
- package/dist/interface/assets/Console-BIj7cIqO.js +1 -0
- package/dist/interface/assets/CuiAssistantConversation-CRNCKRHz.js +5 -0
- package/dist/interface/assets/{CuiAssistantConversation-lkpZg3ML.css → CuiAssistantConversation-DQ0wOJvV.css} +1 -1
- package/dist/interface/assets/CuiAutomationRunsDialog-DMUfNcsf.js +1 -0
- package/dist/interface/assets/CuiBottomSheet-CYi5c3fP.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-DWefGWK2.js → CuiBottomSheet-FwsPnJ3n.js} +1 -1
- package/dist/interface/assets/{CuiCameraPipCard-C2qaGJlH.js → CuiCameraPipCard-Cb_Qbly6.js} +1 -1
- package/dist/interface/assets/CuiCameraRecordings-BeciatDY.js +1 -0
- package/dist/interface/assets/{CuiCameraShares-DcqOcePX.js → CuiCameraShares-CSFwIYsg.js} +1 -1
- package/dist/interface/assets/CuiCameraTable-BgL5FZso.js +1 -0
- package/dist/interface/assets/{CuiCameraTable-BOkfp_5M.js → CuiCameraTable-DBRfGX3I.js} +2 -2
- package/dist/interface/assets/{CuiChartTable-DP38uBwK.js → CuiChartTable-CtasoxMM.js} +1 -1
- package/dist/interface/assets/{CuiConsole-C7xE_nQg.js → CuiConsole-DQbAafiz.js} +2 -2
- package/dist/interface/assets/CuiDataTable-JlD7Agky.js +1 -0
- package/dist/interface/assets/{CuiLightControl-ChGYpQAK.js → CuiLightControl-CLYl5pfN.js} +1 -1
- package/dist/interface/assets/{CuiList-DJp0__mV.js → CuiList-Dsu5m0TA.js} +1 -1
- package/dist/interface/assets/{CuiMarkdownContent-BUYtK_wD.js → CuiMarkdownContent-BYBQX_aF.js} +1 -1
- package/dist/interface/assets/CuiMarkdownContent-DTAm-EDR.js +1 -0
- package/dist/interface/assets/{CuiPluginCard-CWImTZ6l.js → CuiPluginCard-CC1oXY16.js} +2 -2
- package/dist/interface/assets/{CuiPluginCategoryChip-Ch_upS6Y.js → CuiPluginCategoryChip-B2bR5LQa.js} +1 -1
- package/dist/interface/assets/{CuiPluginOAuthButton-DEQ9xILN.js → CuiPluginOAuthButton-DfEjfcY-.js} +2 -2
- package/dist/interface/assets/{CuiPluginTrustBadge-sVWdvHcM.js → CuiPluginTrustBadge-C6CW6Soh.js} +1 -1
- package/dist/interface/assets/{CuiQRCode-DqSF4SkD.js → CuiQRCode-DGKBhDib.js} +1 -1
- package/dist/interface/assets/CuiSchema-pAAVh28m.js +1 -0
- package/dist/interface/assets/{CuiTopNavbarItem-B_KWykgq.js → CuiTopNavbarItem-ve-3Dsc3.js} +1 -1
- package/dist/interface/assets/Faces-1xd5yGuO.js +1 -0
- package/dist/interface/assets/{FirstSteps-QNYTkEJo.js → FirstSteps-E9cMqa0a.js} +1 -1
- package/dist/interface/assets/Floorplan-BovV_ATh.js +1 -0
- package/dist/interface/assets/Instances-BbxyB7vR.js +1 -0
- package/dist/interface/assets/{Logs-BSPT80vP.js → Logs-BhRactvQ.js} +2 -2
- package/dist/interface/assets/{Menu-HHtuhIS2.js → Menu-DMCmUVDs.js} +1 -1
- package/dist/interface/assets/Metrics-BgXrNl38.js +12 -0
- package/dist/interface/assets/Metrics-ChVnC6f6.css +1 -0
- package/dist/interface/assets/{OAuthDeviceFlow-Bn1nlWNa.js → OAuthDeviceFlow-BMEwVkIa.js} +1 -1
- package/dist/interface/assets/Plugin-CDNywaVE.js +1 -0
- package/dist/interface/assets/Plugin-Qr_Q_Qfi.css +1 -0
- package/dist/interface/assets/{PluginConsole-Cv-uhnPY.js → PluginConsole-C4Ba_U_1.js} +1 -1
- package/dist/interface/assets/{PluginDetail-cpOz7FkA.js → PluginDetail-13OWIzdd.js} +2 -2
- package/dist/interface/assets/{PluginSchema-DW3TGeTM.js → PluginSchema-DN0cSU8s.js} +1 -1
- package/dist/interface/assets/PluginSearch-sPkO8aH3.js +2 -0
- package/dist/interface/assets/PluginSearch-xNIlfXk4.js +1 -0
- package/dist/interface/assets/{PluginUpdateProgress-n6q6vzyd.js → PluginUpdateProgress-CeWuRp3Z.js} +1 -1
- package/dist/interface/assets/Plugins-C8yjhxnQ.js +1 -0
- package/dist/interface/assets/{RecentEventsFilter-CTR5JK_P.js → RecentEventsFilter-Kp_lTOuG.js} +1 -1
- package/dist/interface/assets/Recordings-BHT8Vvv_.js +1 -0
- package/dist/interface/assets/Recordings-DwuojaAw.css +1 -0
- package/dist/interface/assets/SensorEdit-C-yJdJuP.js +1 -0
- package/dist/interface/assets/{SensorHistory-9CdOpCPs.js → SensorHistory-ClAcOgHj.js} +1 -1
- package/dist/interface/assets/Sensors-Cza4Et2c.js +2 -0
- package/dist/interface/assets/Settings-Cj0leoGd.js +1 -0
- package/dist/interface/assets/SettingsAccount-COkcBBSz.js +1 -0
- package/dist/interface/assets/SettingsAccount-DjrJdssy.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-BY1xQMx4.js → SettingsAppearance-CJt4xJEW.js} +1 -1
- package/dist/interface/assets/SettingsAppearance-D20YW7Vq.js +1 -0
- package/dist/interface/assets/SettingsAssistant-CDdbbG-c.css +1 -0
- package/dist/interface/assets/SettingsAssistant-DKWDp1AI.js +1 -0
- package/dist/interface/assets/{SettingsBackup-D_weokqu.js → SettingsBackup-DIJmci05.js} +1 -1
- package/dist/interface/assets/{SettingsList-Bq24WTDU.js → SettingsList-Cb_dLy5T.js} +1 -1
- package/dist/interface/assets/SettingsMqtt-LIuCRPT5.js +1 -0
- package/dist/interface/assets/{SettingsNotifications-8TZOUxg2.js → SettingsNotifications-CZxqqH_8.js} +1 -1
- package/dist/interface/assets/{SettingsPermissions-M8u_jrN0.js → SettingsPermissions-CJiz0Z7B.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-C1Kp5xW_.js → SettingsRecordings-BEpwMh-y.js} +1 -1
- package/dist/interface/assets/SettingsRemote-DRt-N_yA.js +2 -0
- package/dist/interface/assets/{SettingsSystem-Cetu2faJ.js → SettingsSystem-Cncdpx8T.js} +2 -2
- package/dist/interface/assets/{SettingsUsers-CDwtQLdV.js → SettingsUsers-DZkz8WlI.js} +1 -1
- package/dist/interface/assets/Terminal-U4yfJN3O.js +4 -0
- package/dist/interface/assets/Training-Bkn52mPJ.css +1 -0
- package/dist/interface/assets/Training-DfgE_dA8.js +1 -0
- package/dist/interface/assets/Updates-cCvbFq3w.js +2 -0
- package/dist/interface/assets/{VariableInput-BxPj5wo6.js → VariableInput-PVsqGYW0.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-CbizvAkz.js → VariableSuggestions-DwLtlzVz.js} +1 -1
- package/dist/interface/assets/{VersionsHandler-CePyEUVO.js → VersionsHandler-Df7dhddp.js} +2 -2
- package/dist/interface/assets/{VirtualSensorCreate-D_GVoeL7.js → VirtualSensorCreate-FTKANjd-.js} +1 -1
- package/dist/interface/assets/Workers-Ba37_3cY.js +2 -0
- package/dist/interface/assets/{account-Bu30He0P.js → account-DwW7pBOb.js} +1 -1
- package/dist/interface/assets/{alert-circle-D2fAQwTX.js → alert-circle-BdUVAt1B.js} +1 -1
- package/dist/interface/assets/{alert-outline-D7zaSJH_.js → alert-outline-IRxYbw0j.js} +1 -1
- package/dist/interface/assets/api-C1mraOYr.js +4 -0
- package/dist/interface/assets/{api-DW2niHRN.js → api-DpqXhwcx.js} +1 -1
- package/dist/interface/assets/api-z8ZVnoOl.css +2 -0
- package/dist/interface/assets/{arrow-left-BGLyEqqa.js → arrow-left-Bk-ZrOVr.js} +1 -1
- package/dist/interface/assets/assistant-Lz3mFLDo.js +1 -0
- package/dist/interface/assets/{assistantModels-D0soYqq7.js → assistantModels-BsSgRsws.js} +1 -1
- package/dist/interface/assets/{auth-Dc8bUpc-.js → auth-L7_5vsJs.js} +1 -1
- package/dist/interface/assets/{automations-DXrjbArj.js → automations-D1XFFSrm.js} +1 -1
- package/dist/interface/assets/{back-filled-BPBVnQjx.js → back-filled-D-X19YMO.js} +1 -1
- package/dist/interface/assets/{bell-ring-CyCFPUL_.js → bell-ring-DreEHgoT.js} +1 -1
- package/dist/interface/assets/{brain-CIJB1ree.js → brain-DuDAg544.js} +1 -1
- package/dist/interface/assets/{cameraSources-QJfUDOQJ.js → cameraSources-DEGJDtmK.js} +1 -1
- package/dist/interface/assets/{cctv-D6kxZ-lp.js → cctv-DM-C_8_6.js} +1 -1
- package/dist/interface/assets/{check-circle-DHAAn6A6.js → check-circle-Bevuw8-0.js} +1 -1
- package/dist/interface/assets/{check-circle-outline-BbqeKfIK.js → check-circle-outline-aMxkvksr.js} +1 -1
- package/dist/interface/assets/{chevron-down-ZYTrU871.js → chevron-down-CCFn9Z56.js} +1 -1
- package/dist/interface/assets/{chevron-up-LQXNz9CE.js → chevron-up-CSImUM3_.js} +1 -1
- package/dist/interface/assets/{clock-outline-CKTiLKoR.js → clock-outline-DH3WIEJt.js} +1 -1
- package/dist/interface/assets/{close-BbEPZQqa.js → close-CMxyM4v9.js} +1 -1
- package/dist/interface/assets/{close-circle-BSUSUs4K.js → close-circle-CfgJCZ9A.js} +1 -1
- package/dist/interface/assets/{cloud-check-BTGbrAQ_.js → cloud-check-CbdFLIdR.js} +1 -1
- package/dist/interface/assets/cloudHandoff-DkUx4m3P.js +1 -0
- package/dist/interface/assets/{config-CiQDwB4t.js → config-CVqy37fG.js} +1 -1
- package/dist/interface/assets/{content-copy-V0DW9ZbH.js → content-copy-Bz49QPOI.js} +1 -1
- package/dist/interface/assets/{copy-DsmMEtSH.js → copy-DA6QQHRt.js} +1 -1
- package/dist/interface/assets/{cube-scan-DGhUFV1x.js → cube-scan-IiH8zwm2.js} +1 -1
- package/dist/interface/assets/database-refresh-outline-CIUDpcuq.js +1 -0
- package/dist/interface/assets/{delete-CY8fsIW6.js → delete-Btu-UVx9.js} +1 -1
- package/dist/interface/assets/{dist-DNyx_J8o.js → dist-D_qWDAKp.js} +1 -1
- package/dist/interface/assets/{dots-vertical-pP1vP0Qa.js → dots-vertical-D496SIss.js} +1 -1
- package/dist/interface/assets/{download-CyjJ7yJW.js → download-BSC7lwq_.js} +1 -1
- package/dist/interface/assets/esm-0kxqa_1s.js +1 -0
- package/dist/interface/assets/esm-4p_M5mFV.js +1 -0
- package/dist/interface/assets/esm-8G-vO1KQ.js +1 -0
- package/dist/interface/assets/esm-8cB56ICb.js +1 -0
- package/dist/interface/assets/esm-B92csSEb.js +1 -0
- package/dist/interface/assets/esm-BHiNTIiN.js +1 -0
- package/dist/interface/assets/esm-Bu9PMLmw.js +1 -0
- package/dist/interface/assets/esm-CS6Ra46d.js +1 -0
- package/dist/interface/assets/esm-CWvQWALL.js +1 -0
- package/dist/interface/assets/esm-D2UDrwmt.js +1 -0
- package/dist/interface/assets/esm-D8OHF2X1.js +1 -0
- package/dist/interface/assets/esm-DrXkS8eG.js +1 -0
- package/dist/interface/assets/esm-pfoHiO1a.js +1 -0
- package/dist/interface/assets/esm-tJSCF7Vh.js +1 -0
- package/dist/interface/assets/{eventIcons-cdzqQc0W.js → eventIcons-UQutPG3p.js} +1 -1
- package/dist/interface/assets/{eye-off-JCu1iUer.js → eye-off-CSU0U8g7.js} +1 -1
- package/dist/interface/assets/{eye-off-outline-GErp76H2.js → eye-off-outline-DCxLRGo_.js} +1 -1
- package/dist/interface/assets/{flowSchema-BRTZHQ1w.js → flowSchema-CppNBDy1.js} +1 -1
- package/dist/interface/assets/{help-circle-outline-G43EJuch.js → help-circle-outline-Cr_yNhPi.js} +1 -1
- package/dist/interface/assets/{history-CNJREqJG.js → history-anuCbp1T.js} +1 -1
- package/dist/interface/assets/{home-B-_OQpZ6.js → home-N3bDR1vX.js} +1 -1
- package/dist/interface/assets/{information-outline-Blt4EtWJ.js → information-outline-CMWIvLNB.js} +1 -1
- package/dist/interface/assets/{intercomService-BnA-FQ0Q.js → intercomService-CjoJaOZ7.js} +1 -1
- package/dist/interface/assets/{lan-C3jliANx.js → lan-CYXjdk7L.js} +1 -1
- package/dist/interface/assets/main-BK3kmiG2.js +3 -0
- package/dist/interface/assets/{main-BoGhBedC.css → main-Bo0Lb1y2.css} +1 -1
- package/dist/interface/assets/{microphone-B6xc9JQ2.js → microphone-BB2pATI_.js} +1 -1
- package/dist/interface/assets/{minus-BI5qXFwJ.js → minus-BCp3ZNKO.js} +1 -1
- package/dist/interface/assets/{mqtt-iD9XHYO_.js → mqtt-BENV9Fx4.js} +1 -1
- package/dist/interface/assets/native-BEkWOGyD.js +1 -0
- package/dist/interface/assets/native-ugMg173F.js +1 -0
- package/dist/interface/assets/{nodeDefinitions-Dop49tx8.js → nodeDefinitions-ByrqsENY.js} +1 -1
- package/dist/interface/assets/{notifications-CbAJX7RF.js → notifications-By40oPng.js} +1 -1
- package/dist/interface/assets/{pause-DKzvPG2b.js → pause-BQlxwAW2.js} +1 -1
- package/dist/interface/assets/{pencil-DKbi9SsG.js → pencil-CDsNnEXi.js} +1 -1
- package/dist/interface/assets/{pencil-outline-CD3Xv98d.js → pencil-outline-CIQL5Kui.js} +1 -1
- package/dist/interface/assets/plugin-eafNQWg2.js +1 -0
- package/dist/interface/assets/{plugins-eIUrXNeM.js → plugins-09rEDbMz.js} +1 -1
- package/dist/interface/assets/{plus-CHPYoMO_.js → plus-Bp4q9G7S.js} +1 -1
- package/dist/interface/assets/{plus--kDl8ben.js → plus-CySoovdr.js} +1 -1
- package/dist/interface/assets/{power-C9wmNlFS.js → power-WmBLDR0-.js} +1 -1
- package/dist/interface/assets/{radar-B3ra28GD.js → radar-CyYAmume.js} +1 -1
- package/dist/interface/assets/{refresh-DfqyhMOh.js → refresh-CHTA3jVN.js} +1 -1
- package/dist/interface/assets/{restore-FMacmqd_.js → restore-C8RNM5yX.js} +1 -1
- package/dist/interface/assets/{rooms-BqPyo8jc.js → rooms-LBxn-Uuu.js} +1 -1
- package/dist/interface/assets/{round-alt-arrow-left-bold-56eF9Bol.js → round-alt-arrow-left-bold-Gh5mi_yR.js} +1 -1
- package/dist/interface/assets/{search-BXbDWhLk.js → search-BajCVmOI.js} +1 -1
- package/dist/interface/assets/sensorIcons-Csu5s0uk.js +1 -0
- package/dist/interface/assets/{sensorSlots-BZCXtnb6.js → sensorSlots-CtbKmsGG.js} +1 -1
- package/dist/interface/assets/{sensors-DttBNEEt.js → sensors-CbzNs18A.js} +1 -1
- package/dist/interface/assets/{server-DUFhf2c_.js → server-Btp5KILd.js} +1 -1
- package/dist/interface/assets/{settings-Cw63SIJl.js → settings-DnksaK7m.js} +1 -1
- package/dist/interface/assets/{source-branch-oyzrlfCD.js → source-branch-CzqIPffP.js} +1 -1
- package/dist/interface/assets/{theme-BMmjtQ4w.js → theme-GhzGwpqd.js} +1 -1
- package/dist/interface/assets/{trash-2-BQc04l9M.js → trash-2-DJeEhHf4.js} +1 -1
- package/dist/interface/assets/{trash-can-outline-Bk5eENNM.js → trash-can-outline-DrT6iw7I.js} +1 -1
- package/dist/interface/assets/{trash-fill-CXk8BmtF.js → trash-fill-Bb_-UicM.js} +1 -1
- package/dist/interface/assets/{trash2-2rUvghml.js → trash2-Dsl8gfxq.js} +1 -1
- package/dist/interface/assets/types-BAwhu9iv.js +1 -0
- package/dist/interface/assets/{types-DWTSNJ79.js → types-CklFkUXk.js} +1 -1
- package/dist/interface/assets/{types-CXw7CEzu.js → types-D8QWPhe-.js} +1 -1
- package/dist/interface/assets/{undo-Dcf7vcsv.js → undo-DoqJW-k7.js} +1 -1
- package/dist/interface/assets/ungrouped-BMk56E3L.js +1 -0
- package/dist/interface/assets/{ungrouped-DHMJ9Rg1.css → ungrouped-BnQIcSQd.css} +1 -1
- package/dist/interface/assets/{updates-TIPWXKzL.js → updates-CGo0T4sn.js} +1 -1
- package/dist/interface/assets/{upload-nnbfDypK.js → upload-C3w1XH-o.js} +1 -1
- package/dist/interface/assets/{upload-B-ZYPekV.js → upload-DtIcwiNC.js} +1 -1
- package/dist/interface/assets/{useAppVersion-BIz44Bg4.js → useAppVersion-CJlexqyz.js} +1 -1
- package/dist/interface/assets/{useAssistantActions-CLkkw9kB.js → useAssistantActions-Cc_O6M9_.js} +1 -1
- package/dist/interface/assets/useBackupRestore-_s8vS5WF.js +1 -0
- package/dist/interface/assets/{useCameraOptions-A97teAIr.js → useCameraOptions-CFISVNgk.js} +1 -1
- package/dist/interface/assets/{useKeyboardInset-DXVi1dLG.js → useKeyboardInset-DkUn62i7.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-BlFxVXjF.js → useLogsSocket-D-ndWAg0.js} +1 -1
- package/dist/interface/assets/{useNavLayout-C5obaCNv.js → useNavLayout-CG0X_3kt.js} +1 -1
- package/dist/interface/assets/{usePermissions-C8hB_pG1.js → usePermissions-BXTw4tII.js} +1 -1
- package/dist/interface/assets/{usePluginUpdates-DO0-Gk4Q.js → usePluginUpdates-nW_dt66E.js} +1 -1
- package/dist/interface/assets/{usePushRegistration-BUttCraQ.js → usePushRegistration-DCqOAxR4.js} +2 -2
- package/dist/interface/assets/{useServerRestart-Cz9eVHUE.js → useServerRestart-CxJGxAcU.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-BhS_MCCB.js → useStreamStatus-CXb1HbAq.js} +1 -1
- package/dist/interface/assets/{useTabSwipe-D4k8lm1M.js → useTabSwipe-DHb8__wU.js} +1 -1
- package/dist/interface/assets/{useUpdateChannel-D9lhfW0y.js → useUpdateChannel-BR4PMh1R.js} +1 -1
- package/dist/interface/assets/{useUpdatesSocket-DnH9sON5.js → useUpdatesSocket-DKDRZhvc.js} +1 -1
- package/dist/interface/assets/useUserOptions-lyc4WJ4L.js +1 -0
- package/dist/interface/assets/{variable-CcE0ZwTr.js → variable-ywTlRfo5.js} +1 -1
- package/dist/interface/assets/{vendor-cameraui-QXD8jkcj.js → vendor-cameraui-CK4yHsJi.js} +45 -45
- package/dist/interface/assets/{vendor-capacitor-COL6Kz75.js → vendor-capacitor-f9ShAzys.js} +2 -2
- package/dist/interface/assets/{vendor-chart-80wrH3md.js → vendor-chart-DBK083Hu.js} +1 -1
- package/dist/interface/assets/{vendor-core-CnhnyKDl.js → vendor-core-B-Q4es-f.js} +1 -1
- package/dist/interface/assets/{vendor-dnd-CEJS9JKU.js → vendor-dnd-DGQLvX6Y.js} +1 -1
- package/dist/interface/assets/{vendor-draggabilly-BY7O1F_Z.js → vendor-draggabilly-D8CK6M-y.js} +1 -1
- package/dist/interface/assets/{vendor-DGke_6M4.js → vendor-gFkr2qsZ.js} +1 -1
- package/dist/interface/assets/vendor-gridstack-DtDG3os6.js +3 -0
- package/dist/interface/assets/{vendor-markdown-DD4teg2u.js → vendor-markdown-qHIinIUE.js} +1 -1
- package/dist/interface/assets/{vendor-primevue-CCUqY55W.js → vendor-primevue-Cmp3VjIC.js} +72 -72
- package/dist/interface/assets/{vendor-vueflow-Bmwd2les.js → vendor-vueflow-bSwRZ9X8.js} +1 -1
- package/dist/interface/assets/web-3OOGlctS.js +1 -0
- package/dist/interface/assets/web-5NFVd9gs.js +1 -0
- package/dist/interface/assets/web-A4yovlXr.js +1 -0
- package/dist/interface/assets/web-BBC3YoWX.js +1 -0
- package/dist/interface/assets/web-B_9Qyt8E.js +1 -0
- package/dist/interface/assets/web-BjKL51lK-DUIsII0n.js +1 -0
- package/dist/interface/assets/web-C2-YAfsx.js +1 -0
- package/dist/interface/assets/web-CUL_MhvM.js +1 -0
- package/dist/interface/assets/web-CZVCXYLV.js +1 -0
- package/dist/interface/assets/web-DJ-LUxlV.js +1 -0
- package/dist/interface/assets/web-DNsEGLGS.js +1 -0
- package/dist/interface/assets/web-DZsU0QT_.js +1 -0
- package/dist/interface/assets/web-MoyOTbiU.js +1 -0
- package/dist/interface/assets/web-avRH_3t7.js +1 -0
- package/dist/interface/assets/{webhook-oVbP79Yk.js → webhook-CWKf2Qxu.js} +1 -1
- package/dist/interface/assets/workbox-window.prod.es5-BEYAF-e-.js +1 -0
- package/dist/interface/assets/{zoom-in-GKNy8xA7.js → zoom-in-CHkXAWHy.js} +1 -1
- package/dist/interface/ha/{404-DLhJqxRl.js → 404-B2T8Gktj.js} +1 -1
- package/dist/interface/ha/{About-DC0i1iE4.js → About-CrTKzU9_.js} +6 -6
- package/dist/interface/ha/{Assistant-BmazMPIg.js → Assistant-BDHJmYx_.js} +823 -820
- package/dist/interface/ha/{Automation-gabF9YzQ.js → Automation-Czo5EsAg.js} +337 -337
- package/dist/interface/ha/{AutomationImport-DaqZNs9s.js → AutomationImport-CuFAQbiX.js} +6 -6
- package/dist/interface/ha/{AutomationStore-DzM4huo5.js → AutomationStore-D-6x0JIt.js} +16 -16
- package/dist/interface/ha/{AutomationStoreDetail-CpzQMt_D.js → AutomationStoreDetail-Dad4q1MN.js} +19 -19
- package/dist/interface/ha/{Automations-Dcm4Us50.js → Automations-C-oGM5SR.js} +71 -71
- package/dist/interface/ha/{Camera-CNK3QR7l.js → Camera-CerkQGbZ.js} +214 -214
- package/dist/interface/ha/{CameraConsole-CpcF0411.js → CameraConsole-hRGwbjsD.js} +3 -3
- package/dist/interface/ha/{Cameras-Cf9rwRyf.js → Cameras-Bk5TFXA8.js} +92 -92
- package/dist/interface/ha/{Camview-BFKR2t6C.js → Camview-CsKKqxxY.js} +382 -382
- package/dist/interface/ha/{Config-1XH3zfr2.js → Config-Vl4-K3A_.js} +11 -11
- package/dist/interface/ha/{ConfigActionAssistant-C0-NFoTB.js → ConfigActionAssistant-OWUX8glZ.js} +4 -4
- package/dist/interface/ha/{ConfigActionCameraControl-DNSKZPSZ.js → ConfigActionCameraControl-DEaOot8w.js} +3 -3
- package/dist/interface/ha/{ConfigActionHttp-DVJAcGkl.js → ConfigActionHttp-CSr2BpKL.js} +2 -2
- package/dist/interface/ha/{ConfigActionImageInput-VVbHHHZs.js → ConfigActionImageInput--O8Tyca-.js} +1 -1
- package/dist/interface/ha/{ConfigActionMqtt-N5OUJDzM.js → ConfigActionMqtt-DQJ4-gs2.js} +4 -4
- package/dist/interface/ha/{ConfigActionNotification-s142tQoU.js → ConfigActionNotification-wR8CCA_T.js} +3 -3
- package/dist/interface/ha/{ConfigActionNotificationControl-Dh7kaKVP.js → ConfigActionNotificationControl-DNMrHwPz.js} +2 -2
- package/dist/interface/ha/{ConfigActionOutput-B4HHTg5C.js → ConfigActionOutput-C-LVFxFP.js} +1 -1
- package/dist/interface/ha/{ConfigActionPlugin-D20G2Dqf.js → ConfigActionPlugin-BCREAkNo.js} +5 -5
- package/dist/interface/ha/{ConfigActionSensor-BS3jrFaG.js → ConfigActionSensor-D48CQ6qR.js} +5 -5
- package/dist/interface/ha/{ConfigActionSnapshot-CInLAcwK.js → ConfigActionSnapshot-DpDy88Mg.js} +2 -2
- package/dist/interface/ha/{ConfigActionVariable-C5vADGNF.js → ConfigActionVariable-D9BxmwvB.js} +1 -1
- package/dist/interface/ha/{ConfigConditionIfElse-CPeWDD31.js → ConfigConditionIfElse-CW42tQFY.js} +3 -3
- package/dist/interface/ha/{ConfigConditionSensorState-BM5GmpN6.js → ConfigConditionSensorState-BZpij7kB.js} +4 -4
- package/dist/interface/ha/{ConfigConditionSwitch-Dmz9FduJ.js → ConfigConditionSwitch-DlTuJ9Sf.js} +5 -5
- package/dist/interface/ha/{ConfigSensorValueInput-Ch5njvtv.js → ConfigSensorValueInput-2QLHESlE.js} +5 -5
- package/dist/interface/ha/{ConfigTriggerDetection-BR2QWNyO.js → ConfigTriggerDetection-DPmUkmUJ.js} +3 -3
- package/dist/interface/ha/{ConfigTriggerGeofence-CaImOjyW.js → ConfigTriggerGeofence--T9OXhGl.js} +2 -2
- package/dist/interface/ha/{ConfigTriggerMqtt-DWz1XwZQ.js → ConfigTriggerMqtt-fZn_X6yY.js} +1 -1
- package/dist/interface/ha/{ConfigTriggerSensor-lfnhz0im.js → ConfigTriggerSensor-_3O6iBFX.js} +1 -1
- package/dist/interface/ha/{ConfigTriggerSystem-CwUhyFAj.js → ConfigTriggerSystem-CC9lqi8Q.js} +2 -2
- package/dist/interface/ha/{ConfigTriggerWebhook-J6Xts7GQ.js → ConfigTriggerWebhook-BuBcgXqf.js} +1 -1
- package/dist/interface/ha/{Console-BSdKFm6Y.js → Console-DNc49UEt.js} +13 -13
- package/dist/interface/ha/{CuiAutomationRunsDialog-BU8sympp.js → CuiAutomationRunsDialog-Dj_iiZht.js} +2 -2
- package/dist/interface/ha/{CuiBottomSheet-Bnp7ta7V.js → CuiBottomSheet-DG7wOV7m.js} +1 -1
- package/dist/interface/ha/{CuiCameraRecordings-E-mMqKSs.js → CuiCameraRecordings-BlOZTfQ4.js} +12 -12
- package/dist/interface/ha/{CuiCameraShares-DcNwd2OC.js → CuiCameraShares-BOn-mobi.js} +2 -2
- package/dist/interface/ha/{CuiCameraTable-DNW9Vm_A.js → CuiCameraTable-D50FLiK8.js} +9 -9
- package/dist/interface/ha/{CuiChartTable-muC7jL2H.js → CuiChartTable-CfcVRvdZ.js} +42 -42
- package/dist/interface/ha/{CuiConsole-ND8bcuTg.js → CuiConsole-UpN0Wihm.js} +6 -6
- package/dist/interface/ha/{CuiDataTable-CN4T8DgP.js → CuiDataTable-CpADXKNF.js} +6 -6
- package/dist/interface/ha/{CuiPluginCard-nIQiyQvH.js → CuiPluginCard-CT6ZfL9o.js} +52 -52
- package/dist/interface/ha/{CuiPluginOAuthButton-FJ49NfUh.js → CuiPluginOAuthButton-BJVKd6Ac.js} +6 -6
- package/dist/interface/ha/{CuiPluginTrustBadge-D6eanMyI.js → CuiPluginTrustBadge-gb9GI24w.js} +3 -3
- package/dist/interface/ha/{CuiQRCode-BdJzeeoE.js → CuiQRCode-DqKDx9zR.js} +7 -7
- package/dist/interface/ha/{CuiSchema-DY0V-8xP.js → CuiSchema-CHeJkx0k.js} +129 -129
- package/dist/interface/ha/{CuiTopNavbarItem-DT5pAKHp.js → CuiTopNavbarItem-CFeI6ZYU.js} +5 -5
- package/dist/interface/ha/Faces-CTfvhhCj.js +1441 -0
- package/dist/interface/ha/{FirstSteps-yS2M2cor.js → FirstSteps-C-WXJ8IL.js} +80 -80
- package/dist/interface/ha/{Floorplan-DSOeScjI.js → Floorplan-CDKTYN7B.js} +307 -307
- package/dist/interface/ha/{Instances-B4h5EKpF.js → Instances-n23yvN3L.js} +62 -62
- package/dist/interface/ha/{Logs-BH0Lxvs6.js → Logs-Dfm0BWOQ.js} +10 -10
- package/dist/interface/ha/{Menu-COH7QXuE.js → Menu-76kvdAEF.js} +15 -15
- package/dist/interface/ha/{Metrics-BtnRqL_I.js → Metrics-lnivlTWm.js} +101 -100
- package/dist/interface/ha/{OAuthDeviceFlow-D2QJ9MnP.js → OAuthDeviceFlow-4ChaymHu.js} +7 -7
- package/dist/interface/ha/{Plugin-EfUSqwyh.js → Plugin-BV8YA8aN.js} +486 -347
- package/dist/interface/ha/{PluginConsole-hh_o15f7.js → PluginConsole-csf1Km7f.js} +4 -4
- package/dist/interface/ha/{PluginDetail-DFiXGkrY.js → PluginDetail-DTff6cbA.js} +185 -185
- package/dist/interface/ha/{PluginSearch-Cdrfubrj.js → PluginSearch-CdjxmFPN.js} +116 -116
- package/dist/interface/ha/{PluginUpdateProgress-BD2g2kVj.js → PluginUpdateProgress-ClyF4pbA.js} +3 -3
- package/dist/interface/ha/{Plugins-qFiHW-Nk.js → Plugins-_xOrqP36.js} +34 -34
- package/dist/interface/ha/{RecentEventsFilter-UWrXnvfq.js → RecentEventsFilter-9ZkDHD1g.js} +1 -1
- package/dist/interface/ha/{Recordings-BzeC6tOz.js → Recordings-dTZv0pkp.js} +483 -458
- package/dist/interface/ha/{SensorEdit-BSgy7lkZ.js → SensorEdit-DDRkZjmm.js} +40 -40
- package/dist/interface/ha/{SensorHistory-IDvP8LKH.js → SensorHistory-DSGlRITr.js} +2 -2
- package/dist/interface/ha/{Sensors-Diqp4oZ0.js → Sensors-DjhGRUzM.js} +477 -462
- package/dist/interface/ha/{Settings-BgDsxAlx.js → Settings-DYuvz4de.js} +17 -17
- package/dist/interface/ha/{SettingsAccount-DBXMQPYk.js → SettingsAccount-DQAo8SnK.js} +146 -146
- package/dist/interface/ha/{SettingsAppearance-VmbjnT3o.js → SettingsAppearance-_tbhpUA0.js} +8 -8
- package/dist/interface/ha/{SettingsAssistant-C2R4ZetE.js → SettingsAssistant-DSf-dYuD.js} +656 -533
- package/dist/interface/ha/{SettingsBackup-BqY9TwYn.js → SettingsBackup-wLOa7xtw.js} +40 -40
- package/dist/interface/ha/{SettingsList-CzHcfo2N.js → SettingsList-CYujivw5.js} +4 -4
- package/dist/interface/ha/{SettingsMqtt-DqV3h3Ow.js → SettingsMqtt-DbxJ-h3J.js} +115 -115
- package/dist/interface/ha/{SettingsNotifications-yn5fIR_7.js → SettingsNotifications-DO2-KJvq.js} +118 -118
- package/dist/interface/ha/{SettingsRecordings-DDs1lyfY.js → SettingsRecordings-C47i1UhI.js} +9 -9
- package/dist/interface/ha/{SettingsRemote-jBw3l5E0.js → SettingsRemote-BPvb-KLI.js} +335 -335
- package/dist/interface/ha/{SettingsSystem-BOv9hNlk.js → SettingsSystem-BJPrv9JE.js} +9 -9
- package/dist/interface/ha/{SettingsUsers-Biv-2F4C.js → SettingsUsers-CcpCz6Y1.js} +89 -89
- package/dist/interface/ha/{Terminal-CmcrGEV0.js → Terminal-DT7-WNH1.js} +16 -16
- package/dist/interface/ha/Training-CqGBf8k1.js +1694 -0
- package/dist/interface/ha/{Updates-DJAcmDQJ.js → Updates-CgdrqX6R.js} +13 -13
- package/dist/interface/ha/{VariableInput-DlYg7t0m.js → VariableInput-DOzSFgxT.js} +1 -1
- package/dist/interface/ha/{VersionsHandler-UnrAWn-b.js → VersionsHandler-ItklhE2t.js} +10 -10
- package/dist/interface/ha/{VirtualSensorCreate-CssxeaCC.js → VirtualSensorCreate-DbS3VqHC.js} +2 -2
- package/dist/interface/ha/{Workers-CLpqLugC.js → Workers-6PU7yUv1.js} +36 -36
- package/dist/interface/ha/{api-BP7mlzjP.js → api-Dv3Lk_g5.js} +8832 -8608
- package/dist/interface/ha/{api-B_tDa73J.js → api-anWolhVj.js} +3 -3
- package/dist/interface/ha/{assistant-Cb6ACguQ.js → assistant-B3m0Kgev.js} +101 -97
- package/dist/interface/ha/{auth-DOYDRgFm.js → auth-CAkpM_7A.js} +33 -33
- package/dist/interface/ha/{automationBlueprint-CbbG_ku4.js → automationBlueprint-DwVvbKbw.js} +4 -4
- package/dist/interface/ha/cameraui-cards.js +1 -1
- package/dist/interface/ha/{cards-BpBP1zVW.js → cards-B0qagpBw.js} +743 -667
- package/dist/interface/ha/{config-DroY1HBs.js → config-C20itAPE.js} +14 -14
- package/dist/interface/ha/database-refresh-outline-PiqlCkA7.js +19 -0
- package/dist/interface/ha/{dist-BTp4AyuI.js → dist-BIngHzHx.js} +5 -5
- package/dist/interface/ha/{dist-C6MBHJhs.js → dist-oFWkn6pD.js} +5 -8
- package/dist/interface/ha/{mqtt-NJTVdd53.js → mqtt-C6JvkA5E.js} +14 -14
- package/dist/interface/ha/{notifications-BPTvvgvv.js → notifications-gLmNZxwZ.js} +19 -19
- package/dist/interface/ha/{pinia-C6gt7A_Q.js → pinia-Du8AM917.js} +639 -625
- package/dist/interface/ha/{plugins-B29K3nQP.js → plugins-6x0kBuQb.js} +53 -53
- package/dist/interface/ha/{rooms-DLw0WUy_.js → rooms-C-mLT6mX.js} +11 -11
- package/dist/interface/ha/{server-B4b5_Ecu.js → server-DuikIt69.js} +28 -28
- package/dist/interface/ha/{types-DJHHL7nn.js → types-C0NcQ4Cz.js} +49 -38
- package/dist/interface/ha/{types-XqA3YJPD.js → types-wLECk3Ml.js} +3 -1
- package/dist/interface/ha/{ungrouped-xyK1QrsM.js → ungrouped-ooCH0Izh.js} +120 -120
- package/dist/interface/ha/{updates-XFSu9Tfm.js → updates-H8MlOQLC.js} +36 -36
- package/dist/interface/ha/{useAppVersion-BH3rU1zz.js → useAppVersion-DAUCV_cn.js} +1 -1
- package/dist/interface/ha/{useLogsSocket-CaTRzvgU.js → useLogsSocket-BOLAXPuD.js} +1 -1
- package/dist/interface/ha/{useNavLayout-DV0_OQx0.js → useNavLayout-B7VoHzM1.js} +2 -2
- package/dist/interface/ha/{useServerRestart-C8tynLUf.js → useServerRestart-qSH0bqwY.js} +1 -1
- package/dist/interface/ha/{useTabSwipe-CFoLDp3j.js → useTabSwipe-DYzG_gVG.js} +1 -1
- package/dist/interface/ha/{useUpdateChannel-DSG2RTPe.js → useUpdateChannel-CK7JiWbG.js} +2 -2
- package/dist/interface/ha/{useUpdatesSocket-CSQ0g7-6.js → useUpdatesSocket-DrqkGMuR.js} +1 -1
- package/dist/interface/ha/{useUserOptions-CFaCy6L1.js → useUserOptions-BteVUdaT.js} +1 -1
- package/dist/interface/index.html +70 -70
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +28 -28
- package/dist/server/requirements.txt +2 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +44 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/detection.py +7 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/__init__.py +42 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/assistant_models.py +300 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/contract.py +9 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/helper.py +21 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/interfaces.py +80 -4
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +6 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/face.py +3 -7
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/face_embedder.py +69 -0
- package/dist/server/src/api/controllers/assistant.controller.js +1 -1
- package/dist/server/src/api/controllers/assistant.controller.js.map +1 -1
- package/dist/server/src/api/database/index.d.ts +1 -1
- package/dist/server/src/api/database/index.js +1 -1
- package/dist/server/src/api/database/migrations/v2-2-5.d.ts +3 -0
- package/dist/server/src/api/database/migrations/v2-2-5.js +19 -0
- package/dist/server/src/api/database/migrations/v2-2-5.js.map +1 -0
- package/dist/server/src/api/database/record-schemas.d.ts +4 -2
- package/dist/server/src/api/database/record-schemas.js +4 -1
- package/dist/server/src/api/database/record-schemas.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +5 -1
- package/dist/server/src/api/schemas/assistant.schema.d.ts +21 -7
- package/dist/server/src/api/schemas/assistant.schema.js +4 -1
- package/dist/server/src/api/schemas/assistant.schema.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +56 -8
- package/dist/server/src/api/schemas/cameras.schema.js +4 -3
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/services/assistant.service.d.ts +1 -1
- package/dist/server/src/api/services/assistant.service.js +4 -1
- package/dist/server/src/api/services/assistant.service.js.map +1 -1
- package/dist/server/src/api/services/cameras.service.js +2 -2
- package/dist/server/src/api/services/cameras.service.js.map +1 -1
- package/dist/server/src/api/websocket/nsp/logs.js +3 -3
- package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
- package/dist/server/src/api/websocket/nsp/worker-perf.js +13 -0
- package/dist/server/src/api/websocket/nsp/worker-perf.js.map +1 -1
- package/dist/server/src/api/websocket/types.d.ts +12 -0
- package/dist/server/src/assistant/budget.d.ts +27 -0
- package/dist/server/src/assistant/budget.js +118 -0
- package/dist/server/src/assistant/budget.js.map +1 -0
- package/dist/server/src/assistant/compaction.d.ts +10 -0
- package/dist/server/src/assistant/compaction.js +83 -0
- package/dist/server/src/assistant/compaction.js.map +1 -0
- package/dist/server/src/assistant/docs.js +4 -3
- package/dist/server/src/assistant/docs.js.map +1 -1
- package/dist/server/src/assistant/history.d.ts +1 -0
- package/dist/server/src/assistant/history.js +28 -0
- package/dist/server/src/assistant/history.js.map +1 -1
- package/dist/server/src/assistant/manager.d.ts +10 -0
- package/dist/server/src/assistant/manager.js +261 -62
- package/dist/server/src/assistant/manager.js.map +1 -1
- package/dist/server/src/assistant/plugin-models.d.ts +34 -0
- package/dist/server/src/assistant/plugin-models.js +266 -0
- package/dist/server/src/assistant/plugin-models.js.map +1 -0
- package/dist/server/src/assistant/prompt.d.ts +7 -1
- package/dist/server/src/assistant/prompt.js +75 -11
- package/dist/server/src/assistant/prompt.js.map +1 -1
- package/dist/server/src/assistant/providers.js +7 -3
- package/dist/server/src/assistant/providers.js.map +1 -1
- package/dist/server/src/assistant/recap.d.ts +3 -0
- package/dist/server/src/assistant/recap.js +65 -0
- package/dist/server/src/assistant/recap.js.map +1 -0
- package/dist/server/src/assistant/registry.d.ts +16 -1
- package/dist/server/src/assistant/registry.js +49 -1
- package/dist/server/src/assistant/registry.js.map +1 -1
- package/dist/server/src/assistant/retry.js +38 -24
- package/dist/server/src/assistant/retry.js.map +1 -1
- package/dist/server/src/assistant/router.d.ts +7 -0
- package/dist/server/src/assistant/router.js +67 -0
- package/dist/server/src/assistant/router.js.map +1 -0
- package/dist/server/src/assistant/skills.d.ts +8 -0
- package/dist/server/src/assistant/skills.js +59 -1
- package/dist/server/src/assistant/skills.js.map +1 -1
- package/dist/server/src/assistant/threads.d.ts +1 -0
- package/dist/server/src/assistant/threads.js +7 -1
- package/dist/server/src/assistant/threads.js.map +1 -1
- package/dist/server/src/assistant/tool-names.js +9 -1
- package/dist/server/src/assistant/tool-names.js.map +1 -1
- package/dist/server/src/assistant/tool-rank.d.ts +2 -0
- package/dist/server/src/assistant/tool-rank.js +48 -0
- package/dist/server/src/assistant/tool-rank.js.map +1 -0
- package/dist/server/src/assistant/tool-schema.d.ts +3 -0
- package/dist/server/src/assistant/tool-schema.js +65 -0
- package/dist/server/src/assistant/tool-schema.js.map +1 -0
- package/dist/server/src/assistant/tools/api.js +7 -9
- package/dist/server/src/assistant/tools/api.js.map +1 -1
- package/dist/server/src/assistant/tools/ask.js +1 -2
- package/dist/server/src/assistant/tools/ask.js.map +1 -1
- package/dist/server/src/assistant/tools/automations.js +3 -5
- package/dist/server/src/assistant/tools/automations.js.map +1 -1
- package/dist/server/src/assistant/tools/cameras.js +3 -4
- package/dist/server/src/assistant/tools/cameras.js.map +1 -1
- package/dist/server/src/assistant/tools/docs.js +5 -6
- package/dist/server/src/assistant/tools/docs.js.map +1 -1
- package/dist/server/src/assistant/tools/instance.js +19 -19
- package/dist/server/src/assistant/tools/instance.js.map +1 -1
- package/dist/server/src/assistant/tools/memory.js +3 -4
- package/dist/server/src/assistant/tools/memory.js.map +1 -1
- package/dist/server/src/assistant/tools/metrics.js +1 -2
- package/dist/server/src/assistant/tools/metrics.js.map +1 -1
- package/dist/server/src/assistant/tools/notifications.js +4 -11
- package/dist/server/src/assistant/tools/notifications.js.map +1 -1
- package/dist/server/src/assistant/tools/plugins.js +12 -14
- package/dist/server/src/assistant/tools/plugins.js.map +1 -1
- package/dist/server/src/assistant/tools/report.js +17 -12
- package/dist/server/src/assistant/tools/report.js.map +1 -1
- package/dist/server/src/assistant/tools/schedules.js +6 -11
- package/dist/server/src/assistant/tools/schedules.js.map +1 -1
- package/dist/server/src/assistant/tools/sensors.js +63 -4
- package/dist/server/src/assistant/tools/sensors.js.map +1 -1
- package/dist/server/src/assistant/tools/settings.js +2 -3
- package/dist/server/src/assistant/tools/settings.js.map +1 -1
- package/dist/server/src/assistant/tools/system.js +3 -5
- package/dist/server/src/assistant/tools/system.js.map +1 -1
- package/dist/server/src/assistant/tools/terminal.js +4 -5
- package/dist/server/src/assistant/tools/terminal.js.map +1 -1
- package/dist/server/src/assistant/types.d.ts +10 -1
- package/dist/server/src/assistant/uploads.d.ts +2 -1
- package/dist/server/src/assistant/uploads.js +25 -3
- package/dist/server/src/assistant/uploads.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +5 -0
- package/dist/server/src/camera/decoder/detection-coordinator.js +45 -14
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-pipeline.js +2 -1
- package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
- package/dist/server/src/camera/decoder/event-manager.d.ts +27 -4
- package/dist/server/src/camera/decoder/event-manager.js +175 -48
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/nvr-sink.d.ts +4 -1
- package/dist/server/src/camera/decoder/nvr-sink.js +1 -1
- package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
- package/dist/server/src/camera/decoder/perf-tracker.d.ts +10 -0
- package/dist/server/src/camera/decoder/perf-tracker.js +20 -0
- package/dist/server/src/camera/decoder/perf-tracker.js.map +1 -1
- package/dist/server/src/camera/decoder/secondary-stage.d.ts +21 -1
- package/dist/server/src/camera/decoder/secondary-stage.js +301 -59
- package/dist/server/src/camera/decoder/secondary-stage.js.map +1 -1
- package/dist/server/src/camera/decoder/side-queue.d.ts +13 -0
- package/dist/server/src/camera/decoder/side-queue.js +53 -0
- package/dist/server/src/camera/decoder/side-queue.js.map +1 -0
- package/dist/server/src/camera/decoder/sources/buffered-source.d.ts +2 -0
- package/dist/server/src/camera/decoder/sources/buffered-source.js +7 -1
- package/dist/server/src/camera/decoder/sources/buffered-source.js.map +1 -1
- package/dist/server/src/camera/decoder/types.d.ts +11 -1
- package/dist/server/src/camera/decoder/types.js +9 -1
- package/dist/server/src/camera/decoder/types.js.map +1 -1
- package/dist/server/src/camera/sensors/controller.d.ts +1 -0
- package/dist/server/src/camera/sensors/controller.js +28 -4
- package/dist/server/src/camera/sensors/controller.js.map +1 -1
- package/dist/server/src/main.js +11 -2
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +1 -14
- package/dist/server/src/plugins/runtime/python/proxy/sensor.py +14 -1
- package/dist/server/src/plugins/runtime/python/proxy/sensor_manager.py +1 -13
- package/dist/server/src/rpc/interfaces/detection.d.ts +14 -2
- package/dist/server/src/rpc/server.js +1 -0
- package/dist/server/src/rpc/server.js.map +1 -1
- package/dist/server/src/services/config/index.d.ts +1 -0
- package/dist/server/src/services/config/index.js +6 -11
- package/dist/server/src/services/config/index.js.map +1 -1
- package/dist/server/src/utils/camera.js +8 -5
- package/dist/server/src/utils/camera.js.map +1 -1
- package/dist/server/src/utils/instance-lock.d.ts +1 -0
- package/dist/server/src/utils/instance-lock.js +57 -0
- package/dist/server/src/utils/instance-lock.js.map +1 -0
- package/dist/server/src/workers/agent.d.ts +2 -0
- package/dist/server/src/workers/agent.js +11 -1
- package/dist/server/src/workers/agent.js.map +1 -1
- package/dist/server/src/workers/manager.js +9 -2
- package/dist/server/src/workers/manager.js.map +1 -1
- package/dist/server/src/workers/types.d.ts +1 -0
- package/npm-shrinkwrap.json +209 -209
- package/package.json +28 -28
- package/dist/interface/assets/Assistant-bB8RBo-m.js +0 -1
- package/dist/interface/assets/Automations-BdZZW2eN.js +0 -2
- package/dist/interface/assets/Camera-Ct7ndOxr.js +0 -2
- package/dist/interface/assets/Camview-BjQdTHNh.js +0 -1
- package/dist/interface/assets/Config-CBTbYd5v.js +0 -2
- package/dist/interface/assets/ConfigTriggerGeofence-Bl2ZacbY.js +0 -1
- package/dist/interface/assets/Console-Cfk9MA9m.js +0 -1
- package/dist/interface/assets/CuiAssistantConversation-BHK_i56I.js +0 -5
- package/dist/interface/assets/CuiAutomationRunsDialog-B0ohEHw0.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-NgX7VFao.js +0 -1
- package/dist/interface/assets/CuiCameraRecordings-BTD-CQAg.js +0 -1
- package/dist/interface/assets/CuiCameraTable-KPk46Xcl.js +0 -1
- package/dist/interface/assets/CuiDataTable-CsqH-RB1.js +0 -1
- package/dist/interface/assets/CuiMarkdownContent-DSArmS0V.js +0 -1
- package/dist/interface/assets/CuiSchema-ytExUVhI.js +0 -1
- package/dist/interface/assets/Faces-Cb6XMxDC.js +0 -1
- package/dist/interface/assets/Floorplan-DbqADtN1.js +0 -1
- package/dist/interface/assets/Instances-DrMzPD65.js +0 -1
- package/dist/interface/assets/Metrics-BUP_-7o7.css +0 -1
- package/dist/interface/assets/Metrics-CqhUnVRA.js +0 -12
- package/dist/interface/assets/Plugin-BDqNeTCT.css +0 -1
- package/dist/interface/assets/Plugin-DyOg_fbg.js +0 -1
- package/dist/interface/assets/PluginSearch-BgecD9Ob.js +0 -2
- package/dist/interface/assets/PluginSearch-C8xHKikH.js +0 -1
- package/dist/interface/assets/Plugins-CuujWEtM.js +0 -1
- package/dist/interface/assets/Recordings-9FJqCfdM.css +0 -1
- package/dist/interface/assets/Recordings-ths9khZr.js +0 -1
- package/dist/interface/assets/SensorEdit-BzoIH7QC.js +0 -1
- package/dist/interface/assets/Sensors-CK5uExfU.js +0 -2
- package/dist/interface/assets/Settings-DN5hFtw_.js +0 -1
- package/dist/interface/assets/SettingsAccount-BCrmon5O.js +0 -1
- package/dist/interface/assets/SettingsAccount-CSy1BAIH.js +0 -1
- package/dist/interface/assets/SettingsAppearance-h_XPZfQl.js +0 -1
- package/dist/interface/assets/SettingsAssistant-BESab92C.css +0 -1
- package/dist/interface/assets/SettingsAssistant-D8FmVbUL.js +0 -1
- package/dist/interface/assets/SettingsMqtt-DCkLIYpF.js +0 -1
- package/dist/interface/assets/SettingsRemote-DXlQKwlT.js +0 -2
- package/dist/interface/assets/Terminal-Dl-aAZME.js +0 -4
- package/dist/interface/assets/Training-B1oQjAr8.css +0 -1
- package/dist/interface/assets/Training-DdZjXgt1.js +0 -1
- package/dist/interface/assets/Updates-CkB1lXuo.js +0 -2
- package/dist/interface/assets/Workers-7yiebNkl.js +0 -2
- package/dist/interface/assets/api-DK2Bav9D.js +0 -4
- package/dist/interface/assets/api-DTCqDA-h.css +0 -2
- package/dist/interface/assets/assistant-BJ6xKcw_.js +0 -1
- package/dist/interface/assets/cloudHandoff-DtlquYGZ.js +0 -1
- package/dist/interface/assets/esm-4Hzzm93H.js +0 -1
- package/dist/interface/assets/esm-BrFPi5_4.js +0 -1
- package/dist/interface/assets/esm-C7pcdfXf.js +0 -1
- package/dist/interface/assets/esm-C8bsO829.js +0 -1
- package/dist/interface/assets/esm-CXzdnAMk.js +0 -1
- package/dist/interface/assets/esm-CZNGZkPu.js +0 -1
- package/dist/interface/assets/esm-D0iI7OVb.js +0 -1
- package/dist/interface/assets/esm-DKolm6KU.js +0 -1
- package/dist/interface/assets/esm-DTywI9gs.js +0 -1
- package/dist/interface/assets/esm-DifXcK9i.js +0 -1
- package/dist/interface/assets/esm-Dq5o-Xb4.js +0 -1
- package/dist/interface/assets/esm-IbQuUZ5l.js +0 -1
- package/dist/interface/assets/esm-Xre_AP5i.js +0 -1
- package/dist/interface/assets/esm-zYnXHhpH.js +0 -1
- package/dist/interface/assets/main-D74mRIxc.js +0 -3
- package/dist/interface/assets/native-CAujTO6L.js +0 -1
- package/dist/interface/assets/native-sQ88qazf.js +0 -1
- package/dist/interface/assets/plugin-D7K50k_y.js +0 -1
- package/dist/interface/assets/sensorIcons-DQVgryYP.js +0 -1
- package/dist/interface/assets/types-5rE8Tz0_.js +0 -1
- package/dist/interface/assets/ungrouped-D56FGIrg.js +0 -1
- package/dist/interface/assets/useBackupRestore-Crfd592q.js +0 -1
- package/dist/interface/assets/useUserOptions-BTRBUuE2.js +0 -1
- package/dist/interface/assets/vendor-gridstack-anPyIu9V.js +0 -3
- package/dist/interface/assets/web-3M-ddn4G.js +0 -1
- package/dist/interface/assets/web-BY80VGyU.js +0 -1
- package/dist/interface/assets/web-B_tUYyM0.js +0 -1
- package/dist/interface/assets/web-BjKL51lK-Bb5NYhpJ.js +0 -1
- package/dist/interface/assets/web-Bv-4PJGI.js +0 -1
- package/dist/interface/assets/web-C3Pk8qeB.js +0 -1
- package/dist/interface/assets/web-CLcvGPH6.js +0 -1
- package/dist/interface/assets/web-DO8gTOVJ.js +0 -1
- package/dist/interface/assets/web-DR5q_DmI.js +0 -1
- package/dist/interface/assets/web-DRHbG4Te.js +0 -1
- package/dist/interface/assets/web-DaQ8d8yk.js +0 -1
- package/dist/interface/assets/web-EVRW5whF.js +0 -1
- package/dist/interface/assets/web-S6Dk3UWN.js +0 -1
- package/dist/interface/assets/web-pWIp0wf0.js +0 -1
- package/dist/interface/assets/workbox-window.prod.es5-Dz5rcO1z.js +0 -1
- package/dist/interface/ha/Faces-C_svyTrr.js +0 -1282
- package/dist/interface/ha/Training-BEzPiXZg.js +0 -1512
|
@@ -6,61 +6,61 @@ import { t as N } from "./message-D6dIy_hz.js";
|
|
|
6
6
|
import { t as ne } from "./chevron-down-BNj8w2js.js";
|
|
7
7
|
import { t as P } from "./tag-mchuCAPR.js";
|
|
8
8
|
import { t as F } from "./history-XMyO_cLc.js";
|
|
9
|
-
import {
|
|
10
|
-
import { A as
|
|
11
|
-
import { G as
|
|
12
|
-
import { n as
|
|
13
|
-
import { i as
|
|
14
|
-
import { p as
|
|
15
|
-
import { t as
|
|
16
|
-
import { n as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { a as
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
27
|
-
import { t as
|
|
28
|
-
import { t as
|
|
29
|
-
import { u as
|
|
30
|
-
import { c as
|
|
31
|
-
import { t as
|
|
32
|
-
import { t as
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
35
|
-
import { t as
|
|
36
|
-
import { t as
|
|
37
|
-
import { t as
|
|
38
|
-
import { t as
|
|
9
|
+
import { Ar as I, Dt as L, Er as R, Hr as z, J as B, Ot as re, Q as V, Qt as ie, Si as H, Sr as U, V as ae, Vr as oe, Yn as se, _t as W, cr as ce, dr as G, fi as le, g as K, jn as ue, jr as q, kt as de, ot as fe, p as J, r as pe, ta as me, wr as he, xr as ge } from "./api-Dv3Lk_g5.js";
|
|
10
|
+
import { A as _e, b as ve, u as ye } from "./intercomService-B7HkLs6z.js";
|
|
11
|
+
import { G as be, U as xe, W as Se, r as Ce } from "./pinia-Du8AM917.js";
|
|
12
|
+
import { n as we } from "./vue-i18n-D5EAy78K.js";
|
|
13
|
+
import { i as Te } from "./alert-outline-FcLLjoOK.js";
|
|
14
|
+
import { p as Ee, s as De } from "./eventIcons-BFNUgeGr.js";
|
|
15
|
+
import { t as Oe } from "./button-BouAFgf5.js";
|
|
16
|
+
import { n as ke, t as Ae } from "./inputicon-1w06U-Jl.js";
|
|
17
|
+
import { t as je } from "./inputtext-C_ygnPrC.js";
|
|
18
|
+
import { t as Me } from "./close-CxFbonhd.js";
|
|
19
|
+
import { t as Ne } from "./select-DV7p2EDj.js";
|
|
20
|
+
import { t as Pe } from "./multiselect-BOb4ScAZ.js";
|
|
21
|
+
import { t as Fe } from "./textarea-ByXnzJzx.js";
|
|
22
|
+
import { t as Ie } from "./clock-outline-DNStdM39.js";
|
|
23
|
+
import { t as Le } from "./source-branch-C2kcmBcO.js";
|
|
24
|
+
import { a as Re, i as ze, n as Be, o as Ve, r as He, t as Y } from "./assistant-B3m0Kgev.js";
|
|
25
|
+
import { t as Ue } from "./search-BViwEHdF.js";
|
|
26
|
+
import { t as We } from "./content-copy-CHPYjxRC.js";
|
|
27
|
+
import { t as Ge } from "./CuiMarkdownContent-CrkZwv5j.js";
|
|
28
|
+
import { t as Ke } from "./brain-BiKXGva0.js";
|
|
29
|
+
import { u as qe } from "./cards-B0qagpBw.js";
|
|
30
|
+
import { c as Je, d as Ye, i as Xe, l as Ze, n as Qe, r as $e, t as et, u as tt } from "./types-wLECk3Ml.js";
|
|
31
|
+
import { t as nt } from "./pencil-outline-SN9ingm5.js";
|
|
32
|
+
import { t as rt } from "./back-filled-CaxrZv0Q.js";
|
|
33
|
+
import { t as it } from "./help-circle-outline-BniRuJRv.js";
|
|
34
|
+
import { t as at } from "./refresh-CpjKkasY.js";
|
|
35
|
+
import { t as ot } from "./check-circle-outline-DS7eEinv.js";
|
|
36
|
+
import { t as st } from "./chevron-up-DDKj43BW.js";
|
|
37
|
+
import { t as ct } from "./microphone-C4oQPpzp.js";
|
|
38
|
+
import { t as lt } from "./useAssistantActions-S1FrNe9b.js";
|
|
39
39
|
//#region ~icons/mdi/content-save-outline
|
|
40
|
-
var
|
|
40
|
+
var ut = {
|
|
41
41
|
viewBox: "0 0 24 24",
|
|
42
42
|
width: "1.2em",
|
|
43
43
|
height: "1.2em"
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
return i(), x("svg",
|
|
45
|
+
function dt(e, t) {
|
|
46
|
+
return i(), x("svg", ut, [...t[0] ||= [T("path", {
|
|
47
47
|
fill: "currentColor",
|
|
48
48
|
d: "M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3M6 6h9v4H6z"
|
|
49
49
|
}, null, -1)]]);
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var ft = d({
|
|
52
52
|
name: "mdi-content-save-outline",
|
|
53
|
-
render:
|
|
54
|
-
}),
|
|
53
|
+
render: dt
|
|
54
|
+
}), pt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, mt = { class: "flex items-start gap-2" }, ht = { class: "min-w-0 flex-1 font-medium text-color" }, gt = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "flex flex-wrap gap-2"
|
|
57
|
-
},
|
|
57
|
+
}, _t = {
|
|
58
58
|
key: 1,
|
|
59
59
|
class: "flex flex-col sm:flex-row gap-2"
|
|
60
|
-
},
|
|
60
|
+
}, vt = { class: "flex flex-1 flex-col gap-1" }, yt = ["for"], bt = { class: "flex flex-1 flex-col gap-1" }, xt = ["for"], St = { class: "flex items-center gap-2" }, Ct = {
|
|
61
61
|
key: 1,
|
|
62
62
|
class: "flex-1"
|
|
63
|
-
},
|
|
63
|
+
}, wt = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
64
64
|
__name: "CuiAssistantQuestion",
|
|
65
65
|
props: {
|
|
66
66
|
question: {},
|
|
@@ -78,10 +78,10 @@ var pt = d({
|
|
|
78
78
|
v.value && c("answer", v.value);
|
|
79
79
|
}
|
|
80
80
|
return (a, s) => {
|
|
81
|
-
let _ =
|
|
82
|
-
return i(), x("div",
|
|
83
|
-
T("div",
|
|
84
|
-
g(f).length ? (i(), x("div",
|
|
81
|
+
let _ = it, y = Oe, S = je;
|
|
82
|
+
return i(), x("div", pt, [
|
|
83
|
+
T("div", mt, [M(_, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), T("div", ht, o(e.question.question), 1)]),
|
|
84
|
+
g(f).length ? (i(), x("div", gt, [(i(!0), x(C, null, r(g(f), (t) => (i(), p(y, {
|
|
85
85
|
key: t,
|
|
86
86
|
type: "button",
|
|
87
87
|
severity: "secondary",
|
|
@@ -95,20 +95,20 @@ var pt = d({
|
|
|
95
95
|
"label",
|
|
96
96
|
"onClick"
|
|
97
97
|
]))), 128))])) : m("", !0),
|
|
98
|
-
e.question.kind === "time_range" ? (i(), x("div",
|
|
98
|
+
e.question.kind === "time_range" ? (i(), x("div", _t, [T("div", vt, [T("label", {
|
|
99
99
|
for: `question-from-${e.question.toolCallId}`,
|
|
100
100
|
class: "text-xs text-muted"
|
|
101
|
-
}, o(a.$t("views.assistant.question_from")), 9,
|
|
101
|
+
}, o(a.$t("views.assistant.question_from")), 9, yt), M(S, {
|
|
102
102
|
id: `question-from-${e.question.toolCallId}`,
|
|
103
103
|
modelValue: g(u),
|
|
104
104
|
"onUpdate:modelValue": s[0] ||= (e) => h(u) ? u.value = e : null,
|
|
105
105
|
type: "datetime-local",
|
|
106
106
|
fluid: "",
|
|
107
107
|
size: "small"
|
|
108
|
-
}, null, 8, ["id", "modelValue"])]), T("div",
|
|
108
|
+
}, null, 8, ["id", "modelValue"])]), T("div", bt, [T("label", {
|
|
109
109
|
for: `question-to-${e.question.toolCallId}`,
|
|
110
110
|
class: "text-xs text-muted"
|
|
111
|
-
}, o(a.$t("views.assistant.question_to")), 9,
|
|
111
|
+
}, o(a.$t("views.assistant.question_to")), 9, xt), M(S, {
|
|
112
112
|
id: `question-to-${e.question.toolCallId}`,
|
|
113
113
|
modelValue: g(d),
|
|
114
114
|
"onUpdate:modelValue": s[1] ||= (e) => h(d) ? d.value = e : null,
|
|
@@ -116,8 +116,8 @@ var pt = d({
|
|
|
116
116
|
fluid: "",
|
|
117
117
|
size: "small"
|
|
118
118
|
}, null, 8, ["id", "modelValue"])])])) : m("", !0),
|
|
119
|
-
T("div",
|
|
120
|
-
e.question.kind === "time_range" ? (i(), x("span",
|
|
119
|
+
T("div", St, [
|
|
120
|
+
e.question.kind === "time_range" ? (i(), x("span", Ct)) : (i(), p(S, {
|
|
121
121
|
key: 0,
|
|
122
122
|
modelValue: g(l),
|
|
123
123
|
"onUpdate:modelValue": s[2] ||= (e) => h(l) ? l.value = e : null,
|
|
@@ -155,13 +155,13 @@ var pt = d({
|
|
|
155
155
|
]);
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
}), [["__scopeId", "data-v-49502a42"]]),
|
|
158
|
+
}), [["__scopeId", "data-v-49502a42"]]), Tt = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, Et = { class: "flex items-start gap-2" }, Dt = { class: "min-w-0 flex-1" }, Ot = { class: "font-medium text-color" }, kt = { class: "text-muted" }, At = {
|
|
159
159
|
key: 0,
|
|
160
160
|
class: "cui-assistant-pre mt-2 max-h-40 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono"
|
|
161
|
-
},
|
|
161
|
+
}, jt = {
|
|
162
162
|
key: 1,
|
|
163
163
|
class: "mt-2 flex flex-col gap-1"
|
|
164
|
-
},
|
|
164
|
+
}, Mt = { class: "flex justify-end gap-2" }, Nt = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
165
165
|
__name: "CuiAssistantApproval",
|
|
166
166
|
props: {
|
|
167
167
|
toolName: {},
|
|
@@ -171,7 +171,7 @@ var pt = d({
|
|
|
171
171
|
},
|
|
172
172
|
emits: ["approve", "reject"],
|
|
173
173
|
setup(e, { emit: t }) {
|
|
174
|
-
let n = e, r = t, a = j(!1), s = j(""), c = _(() =>
|
|
174
|
+
let n = e, r = t, a = j(!1), s = j(""), c = _(() => Xe(n.toolName)), l = _(() => {
|
|
175
175
|
if (n.args === void 0 || n.args === null || typeof n.args == "object" && Object.keys(n.args).length === 0) return "";
|
|
176
176
|
try {
|
|
177
177
|
return JSON.stringify(n.args, null, 2);
|
|
@@ -200,12 +200,12 @@ var pt = d({
|
|
|
200
200
|
r("approve", l.value === s.value ? void 0 : e);
|
|
201
201
|
}
|
|
202
202
|
return (t, n) => {
|
|
203
|
-
let _ =
|
|
204
|
-
return i(), x("div",
|
|
205
|
-
T("div",
|
|
206
|
-
T("div",
|
|
207
|
-
g(l) && !g(a) ? (i(), x("pre",
|
|
208
|
-
g(a) ? (i(), x("div",
|
|
203
|
+
let _ = De, y = Fe, b = N, S = Oe;
|
|
204
|
+
return i(), x("div", Tt, [T("div", Et, [M(_, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), T("div", Dt, [
|
|
205
|
+
T("div", Ot, o(t.$t("views.assistant.approval_title", { tool: g(c) })), 1),
|
|
206
|
+
T("div", kt, o(t.$t("views.assistant.approval_hint")), 1),
|
|
207
|
+
g(l) && !g(a) ? (i(), x("pre", At, o(g(l)), 1)) : m("", !0),
|
|
208
|
+
g(a) ? (i(), x("div", jt, [M(y, {
|
|
209
209
|
modelValue: g(s),
|
|
210
210
|
"onUpdate:modelValue": n[0] ||= (e) => h(s) ? s.value = e : null,
|
|
211
211
|
"auto-resize": "",
|
|
@@ -228,7 +228,7 @@ var pt = d({
|
|
|
228
228
|
default: v(() => [D(o(t.$t("views.assistant.approval_edit_hint")), 1)]),
|
|
229
229
|
_: 1
|
|
230
230
|
}))])) : m("", !0)
|
|
231
|
-
])]), T("div",
|
|
231
|
+
])]), T("div", Mt, [
|
|
232
232
|
g(l) ? (i(), p(S, {
|
|
233
233
|
key: 0,
|
|
234
234
|
type: "button",
|
|
@@ -263,55 +263,55 @@ var pt = d({
|
|
|
263
263
|
])]);
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
}), [["__scopeId", "data-v-f3109818"]]),
|
|
266
|
+
}), [["__scopeId", "data-v-f3109818"]]), Pt = {
|
|
267
267
|
viewBox: "0 0 24 24",
|
|
268
268
|
width: "1.2em",
|
|
269
269
|
height: "1.2em"
|
|
270
270
|
};
|
|
271
|
-
function
|
|
272
|
-
return i(), x("svg",
|
|
271
|
+
function Ft(e, t) {
|
|
272
|
+
return i(), x("svg", Pt, [...t[0] ||= [T("path", {
|
|
273
273
|
fill: "currentColor",
|
|
274
274
|
d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m-2 14.5l6-4.5l-6-4.5z"
|
|
275
275
|
}, null, -1)]]);
|
|
276
276
|
}
|
|
277
|
-
var
|
|
277
|
+
var It = d({
|
|
278
278
|
name: "mdi-play-circle-outline",
|
|
279
|
-
render:
|
|
280
|
-
}),
|
|
279
|
+
render: Ft
|
|
280
|
+
}), Lt = {
|
|
281
281
|
viewBox: "0 0 24 24",
|
|
282
282
|
width: "1.2em",
|
|
283
283
|
height: "1.2em"
|
|
284
284
|
};
|
|
285
|
-
function
|
|
286
|
-
return i(), x("svg",
|
|
285
|
+
function Rt(e, t) {
|
|
286
|
+
return i(), x("svg", Lt, [...t[0] ||= [T("path", {
|
|
287
287
|
fill: "currentColor",
|
|
288
288
|
d: "M13 5v6h1.17L12 13.17L9.83 11H11V5zm2-2H9v6H5l7 7l7-7h-4zm4 15H5v2h14z"
|
|
289
289
|
}, null, -1)]]);
|
|
290
290
|
}
|
|
291
|
-
var
|
|
291
|
+
var zt = d({
|
|
292
292
|
name: "mdi-download-outline",
|
|
293
|
-
render:
|
|
294
|
-
}),
|
|
293
|
+
render: Rt
|
|
294
|
+
}), Bt = {
|
|
295
295
|
viewBox: "0 0 24 24",
|
|
296
296
|
width: "1.2em",
|
|
297
297
|
height: "1.2em"
|
|
298
298
|
};
|
|
299
|
-
function
|
|
300
|
-
return i(), x("svg",
|
|
299
|
+
function Vt(e, t) {
|
|
300
|
+
return i(), x("svg", Bt, [...t[0] ||= [T("path", {
|
|
301
301
|
fill: "currentColor",
|
|
302
302
|
d: "M15 8v8H5V8zm1-2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4V7a1 1 0 0 0-1-1"
|
|
303
303
|
}, null, -1)]]);
|
|
304
304
|
}
|
|
305
|
-
var
|
|
305
|
+
var Ht = d({
|
|
306
306
|
name: "mdi-video-outline",
|
|
307
|
-
render:
|
|
307
|
+
render: Vt
|
|
308
308
|
});
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/composables/useAssistantReferences.ts
|
|
311
|
-
function
|
|
312
|
-
let e =
|
|
311
|
+
function Ut() {
|
|
312
|
+
let e = z(), { t } = we(), n = H(), r = W(), { openEpisodePlayer: i } = V(), a = se("@camera.ui/camera-ui-nvr"), { download: o } = ge(), s = j(null);
|
|
313
313
|
async function c() {
|
|
314
|
-
let e = await
|
|
314
|
+
let e = await ie({
|
|
315
315
|
parameter: {
|
|
316
316
|
page: 1,
|
|
317
317
|
pageSize: -1
|
|
@@ -321,7 +321,7 @@ function Wt() {
|
|
|
321
321
|
return new Map(e.result.map((e) => [e._id, e]));
|
|
322
322
|
}
|
|
323
323
|
function l(e, t) {
|
|
324
|
-
r.openComponentDialog(
|
|
324
|
+
r.openComponentDialog(fe, {
|
|
325
325
|
data: {
|
|
326
326
|
title: e.name,
|
|
327
327
|
dedupeKey: `camera-event:${e._id}:${t}`,
|
|
@@ -390,17 +390,17 @@ function Wt() {
|
|
|
390
390
|
}
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region src/components/CuiAssistantReferences/CuiAssistantReferences.vue?vue&type=script&setup=true&lang.ts
|
|
393
|
-
var
|
|
393
|
+
var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt = { class: "truncate max-w-[16rem]" }, qt = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
394
394
|
__name: "CuiAssistantReferences",
|
|
395
395
|
props: { references: {} },
|
|
396
396
|
setup(e) {
|
|
397
|
-
let { t } =
|
|
397
|
+
let { t } = we(), { busy: n, open: a } = Ut();
|
|
398
398
|
function s(e) {
|
|
399
399
|
return e.kind === "camera" ? t("views.assistant.open_camera") : e.kind === "episode" ? t("views.assistant.open_episode") : e.kind === "download" ? t("views.assistant.download_clip") : t("views.assistant.open_recording");
|
|
400
400
|
}
|
|
401
401
|
return (t, c) => {
|
|
402
|
-
let l =
|
|
403
|
-
return i(), x("div",
|
|
402
|
+
let l = Ht, u = zt, d = It;
|
|
403
|
+
return i(), x("div", Wt, [(i(!0), x(C, null, r(e.references, (e, t) => (i(), x("button", {
|
|
404
404
|
key: `${e.kind}:${e.id}:${t}`,
|
|
405
405
|
type: "button",
|
|
406
406
|
class: "cui-assistant-ref flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs",
|
|
@@ -415,10 +415,10 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
|
|
|
415
415
|
})) : (i(), p(d, {
|
|
416
416
|
key: 2,
|
|
417
417
|
class: "w-3.5 h-3.5 shrink-0"
|
|
418
|
-
})), T("span",
|
|
418
|
+
})), T("span", Kt, o(e.label || s(e)), 1)], 8, Gt))), 128))]);
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
}), [["__scopeId", "data-v-aae1a6dd"]]),
|
|
421
|
+
}), [["__scopeId", "data-v-aae1a6dd"]]), Jt = { class: "flex items-center gap-3" }, Yt = { class: "flex min-w-0 flex-1 flex-col" }, Xt = { class: "text-sm font-medium" }, Zt = { class: "text-xs" }, Qt = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
422
422
|
__name: "CuiAssistantNotice",
|
|
423
423
|
props: {
|
|
424
424
|
title: {},
|
|
@@ -433,19 +433,19 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
|
|
|
433
433
|
size: "small",
|
|
434
434
|
class: "cui-assistant-notice"
|
|
435
435
|
}, {
|
|
436
|
-
default: v(() => [T("div",
|
|
436
|
+
default: v(() => [T("div", Jt, [T("div", Yt, [T("span", Xt, o(e.title), 1), T("span", Zt, o(e.text), 1)]), s(t.$slots, "default", {}, void 0, !0)])]),
|
|
437
437
|
_: 3
|
|
438
438
|
}, 8, ["severity"]);
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
}), [["__scopeId", "data-v-1dc28011"]]),
|
|
441
|
+
}), [["__scopeId", "data-v-1dc28011"]]), $t = /* @__PURE__ */ A({
|
|
442
442
|
__name: "CuiAssistantSetting",
|
|
443
443
|
props: {
|
|
444
444
|
setting: {},
|
|
445
445
|
modelId: {}
|
|
446
446
|
},
|
|
447
447
|
setup(e) {
|
|
448
|
-
let t = new
|
|
448
|
+
let t = new Y(), n = e, r = K(), { user: a } = Ce(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = _(() => a.value?.role === "admin" || a.value?.role === "master"), l = _(() => o.value?.settings.models ?? []), u = _(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? Ze(o.value.settings) : void 0)), d = _(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
|
|
449
449
|
async function f(e) {
|
|
450
450
|
if (n.setting !== "sendImages") {
|
|
451
451
|
await s.mutateAsync({ [n.setting]: e });
|
|
@@ -453,12 +453,12 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
|
|
|
453
453
|
}
|
|
454
454
|
let t = u.value;
|
|
455
455
|
t && await s.mutateAsync({ models: l.value.map((n) => ({
|
|
456
|
-
...
|
|
456
|
+
...tt(n),
|
|
457
457
|
...n._id === t._id ? { sendImages: e } : {}
|
|
458
458
|
})) });
|
|
459
459
|
}
|
|
460
460
|
return (t, n) => {
|
|
461
|
-
let r =
|
|
461
|
+
let r = ue, a = Qt;
|
|
462
462
|
return i(), p(a, {
|
|
463
463
|
severity: g(d) ? "success" : "warn",
|
|
464
464
|
title: t.$t(`views.assistant.setting_${e.setting}_title`),
|
|
@@ -479,71 +479,71 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
|
|
|
479
479
|
]);
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
}),
|
|
482
|
+
}), en = {
|
|
483
483
|
viewBox: "0 0 24 24",
|
|
484
484
|
width: "1.2em",
|
|
485
485
|
height: "1.2em"
|
|
486
486
|
};
|
|
487
|
-
function
|
|
488
|
-
return i(), x("svg",
|
|
487
|
+
function tn(e, t) {
|
|
488
|
+
return i(), x("svg", en, [...t[0] ||= [T("path", {
|
|
489
489
|
fill: "currentColor",
|
|
490
490
|
d: "M7 5h14v2H7zm0 8v-2h14v2zM4 4.5A1.5 1.5 0 0 1 5.5 6A1.5 1.5 0 0 1 4 7.5A1.5 1.5 0 0 1 2.5 6A1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12A1.5 1.5 0 0 1 4 13.5A1.5 1.5 0 0 1 2.5 12A1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2zm-3-2.5A1.5 1.5 0 0 1 5.5 18A1.5 1.5 0 0 1 4 19.5A1.5 1.5 0 0 1 2.5 18A1.5 1.5 0 0 1 4 16.5"
|
|
491
491
|
}, null, -1)]]);
|
|
492
492
|
}
|
|
493
|
-
var
|
|
493
|
+
var nn = d({
|
|
494
494
|
name: "mdi-format-list-bulleted",
|
|
495
|
-
render:
|
|
496
|
-
}),
|
|
495
|
+
render: tn
|
|
496
|
+
}), rn = {
|
|
497
497
|
viewBox: "0 0 24 24",
|
|
498
498
|
width: "1.2em",
|
|
499
499
|
height: "1.2em"
|
|
500
500
|
};
|
|
501
|
-
function
|
|
502
|
-
return i(), x("svg",
|
|
501
|
+
function an(e, t) {
|
|
502
|
+
return i(), x("svg", rn, [...t[0] ||= [T("path", {
|
|
503
503
|
fill: "currentColor",
|
|
504
504
|
d: "M7 10h5v5H7m12 4H5V8h14m0-5h-1V1h-2v2H8V1H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"
|
|
505
505
|
}, null, -1)]]);
|
|
506
506
|
}
|
|
507
|
-
var
|
|
507
|
+
var on = d({
|
|
508
508
|
name: "mdi-calendar-today",
|
|
509
|
-
render:
|
|
510
|
-
}),
|
|
509
|
+
render: an
|
|
510
|
+
}), sn = {
|
|
511
511
|
viewBox: "0 0 24 24",
|
|
512
512
|
width: "1.2em",
|
|
513
513
|
height: "1.2em"
|
|
514
514
|
};
|
|
515
|
-
function
|
|
516
|
-
return i(), x("svg",
|
|
515
|
+
function cn(e, t) {
|
|
516
|
+
return i(), x("svg", sn, [...t[0] ||= [T("path", {
|
|
517
517
|
fill: "currentColor",
|
|
518
518
|
d: "M7.5 4A5.5 5.5 0 0 0 2 9.5c0 .5.09 1 .22 1.5H6.3l1.27-3.37c.3-.8 1.48-.88 1.86 0L11.5 13l.59-1.42c.13-.33.48-.58.91-.58h8.78c.13-.5.22-1 .22-1.5A5.5 5.5 0 0 0 16.5 4c-1.86 0-3.5.93-4.5 2.34C11 4.93 9.36 4 7.5 4M3 12.5a1 1 0 0 0-1 1a1 1 0 0 0 1 1h2.44L11 20c1 .9 1 .9 2 0l5.56-5.5H21a1 1 0 0 0 1-1a1 1 0 0 0-1-1h-7.6l-.93 2.3c-.4 1.01-1.55.87-1.92.03L8.5 9.5l-.96 2.33c-.15.38-.49.67-.94.67z"
|
|
519
519
|
}, null, -1)]]);
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var ln = d({
|
|
522
522
|
name: "mdi-heart-pulse",
|
|
523
|
-
render:
|
|
524
|
-
}),
|
|
523
|
+
render: cn
|
|
524
|
+
}), un = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, dn = { class: "flex items-start gap-2" }, fn = { class: "min-w-0 flex-1" }, pn = { class: "font-medium text-color" }, mn = {
|
|
525
525
|
key: 0,
|
|
526
526
|
class: "text-xs text-muted"
|
|
527
|
-
},
|
|
527
|
+
}, hn = { class: "mt-3 flex flex-col gap-2" }, gn = { class: "min-w-0 flex-1 truncate text-color" }, _n = {
|
|
528
528
|
key: 0,
|
|
529
529
|
class: "shrink-0 font-medium tabular-nums text-color"
|
|
530
|
-
},
|
|
530
|
+
}, vn = {
|
|
531
531
|
key: 0,
|
|
532
532
|
class: "cui-assistant-card-bar ml-4 h-1 overflow-hidden rounded-full"
|
|
533
|
-
},
|
|
533
|
+
}, yn = {
|
|
534
534
|
key: 1,
|
|
535
535
|
class: "ml-4 text-xs text-muted"
|
|
536
|
-
},
|
|
536
|
+
}, bn = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "mt-3 text-xs text-muted"
|
|
539
|
-
},
|
|
539
|
+
}, xn = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
540
540
|
__name: "CuiAssistantCard",
|
|
541
541
|
props: {
|
|
542
542
|
card: {},
|
|
543
543
|
references: {}
|
|
544
544
|
},
|
|
545
545
|
setup(e) {
|
|
546
|
-
let t = e, { busy: n, open: a } =
|
|
546
|
+
let t = e, { busy: n, open: a } = Ut();
|
|
547
547
|
function s(e) {
|
|
548
548
|
if (e.episodeId) return t.references?.find((t) => t.kind === "episode" && t.id === e.episodeId) ?? {
|
|
549
549
|
kind: "episode",
|
|
@@ -555,9 +555,9 @@ var un = d({
|
|
|
555
555
|
return e === "ok" ? "bg-success" : e === "warn" ? "bg-warning" : e === "error" ? "bg-danger" : "cui-assistant-card-dot-plain";
|
|
556
556
|
}
|
|
557
557
|
return (t, d) => {
|
|
558
|
-
let f =
|
|
559
|
-
return i(), x("div",
|
|
560
|
-
T("div",
|
|
558
|
+
let f = ln, h = on, _ = nn, y = G;
|
|
559
|
+
return i(), x("div", un, [
|
|
560
|
+
T("div", dn, [e.card.kind === "system_health" ? (i(), p(f, {
|
|
561
561
|
key: 0,
|
|
562
562
|
class: "w-5 h-5 shrink-0 text-muted mt-0.5"
|
|
563
563
|
})) : e.card.kind === "day_recap" ? (i(), p(h, {
|
|
@@ -566,8 +566,8 @@ var un = d({
|
|
|
566
566
|
})) : (i(), p(_, {
|
|
567
567
|
key: 2,
|
|
568
568
|
class: "w-5 h-5 shrink-0 text-muted mt-0.5"
|
|
569
|
-
})), T("div",
|
|
570
|
-
T("div",
|
|
569
|
+
})), T("div", fn, [T("div", pn, o(e.card.title), 1), e.card.subtitle ? (i(), x("div", mn, o(e.card.subtitle), 1)) : m("", !0)])]),
|
|
570
|
+
T("div", hn, [(i(!0), x(C, null, r(e.card.items, (e, t) => (i(), x("div", {
|
|
571
571
|
key: t,
|
|
572
572
|
class: "flex flex-col gap-1"
|
|
573
573
|
}, [
|
|
@@ -579,8 +579,8 @@ var un = d({
|
|
|
579
579
|
}, {
|
|
580
580
|
default: v(() => [
|
|
581
581
|
T("span", { class: l(["cui-assistant-card-dot h-2 w-2 shrink-0 self-center rounded-full", c(e.severity)]) }, null, 2),
|
|
582
|
-
T("span",
|
|
583
|
-
e.value ? (i(), x("span",
|
|
582
|
+
T("span", gn, o(e.label), 1),
|
|
583
|
+
e.value ? (i(), x("span", _n, o(e.value), 1)) : m("", !0),
|
|
584
584
|
s(e) ? (i(), p(y, {
|
|
585
585
|
key: 1,
|
|
586
586
|
class: "h-4 w-4 shrink-0 self-center text-muted"
|
|
@@ -593,46 +593,46 @@ var un = d({
|
|
|
593
593
|
"disabled",
|
|
594
594
|
"onClick"
|
|
595
595
|
])),
|
|
596
|
-
e.share === void 0 ? m("", !0) : (i(), x("div",
|
|
596
|
+
e.share === void 0 ? m("", !0) : (i(), x("div", vn, [T("div", {
|
|
597
597
|
class: "cui-assistant-card-fill h-full rounded-full",
|
|
598
598
|
style: S({ width: `${Math.round(Math.min(1, Math.max(0, e.share)) * 100)}%` })
|
|
599
599
|
}, null, 4)])),
|
|
600
|
-
e.note ? (i(), x("div",
|
|
600
|
+
e.note ? (i(), x("div", yn, o(e.note), 1)) : m("", !0)
|
|
601
601
|
]))), 128))]),
|
|
602
|
-
e.card.footer ? (i(), x("div",
|
|
602
|
+
e.card.footer ? (i(), x("div", bn, o(e.card.footer), 1)) : m("", !0)
|
|
603
603
|
]);
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
|
-
}), [["__scopeId", "data-v-02b66e4e"]]),
|
|
606
|
+
}), [["__scopeId", "data-v-02b66e4e"]]), Sn = {
|
|
607
607
|
viewBox: "0 0 24 24",
|
|
608
608
|
width: "1.2em",
|
|
609
609
|
height: "1.2em"
|
|
610
610
|
};
|
|
611
|
-
function
|
|
612
|
-
return i(), x("svg",
|
|
611
|
+
function Cn(e, t) {
|
|
612
|
+
return i(), x("svg", Sn, [...t[0] ||= [T("path", {
|
|
613
613
|
fill: "currentColor",
|
|
614
614
|
d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2m2.59 6L12 10.59L9.41 8L8 9.41L10.59 12L8 14.59L9.41 16L12 13.41L14.59 16L16 14.59L13.41 12L16 9.41z"
|
|
615
615
|
}, null, -1)]]);
|
|
616
616
|
}
|
|
617
|
-
var
|
|
617
|
+
var wn = d({
|
|
618
618
|
name: "mdi-close-circle-outline",
|
|
619
|
-
render:
|
|
620
|
-
}),
|
|
619
|
+
render: Cn
|
|
620
|
+
}), Tn = { class: "cui-assistant-tool rounded-xl text-sm" }, En = { class: "font-medium truncate text-color" }, Dn = { class: "text-muted truncate" }, On = { class: "ml-auto shrink-0 text-muted" }, kn = {
|
|
621
621
|
key: 0,
|
|
622
622
|
class: "flex flex-wrap gap-2 px-3 pb-2"
|
|
623
|
-
},
|
|
623
|
+
}, An = ["onClick"], jn = ["src", "alt"], Mn = {
|
|
624
624
|
key: 1,
|
|
625
625
|
class: "flex flex-col gap-2 px-3 pb-2"
|
|
626
|
-
},
|
|
626
|
+
}, Nn = {
|
|
627
627
|
key: 2,
|
|
628
628
|
class: "flex flex-col gap-2 px-3 pb-2"
|
|
629
|
-
},
|
|
629
|
+
}, Pn = {
|
|
630
630
|
key: 3,
|
|
631
631
|
class: "px-3 pb-2"
|
|
632
|
-
},
|
|
632
|
+
}, Fn = {
|
|
633
633
|
key: 4,
|
|
634
634
|
class: "cui-assistant-tool-details px-3 py-2 flex flex-col gap-2"
|
|
635
|
-
},
|
|
635
|
+
}, In = { key: 0 }, Ln = { class: "text-xs uppercase tracking-wide text-muted" }, Rn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, zn = { key: 1 }, Bn = { class: "text-xs uppercase tracking-wide text-muted" }, Vn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Hn = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
636
636
|
__name: "CuiAssistantToolCall",
|
|
637
637
|
props: {
|
|
638
638
|
part: {},
|
|
@@ -653,19 +653,19 @@ var Tn = d({
|
|
|
653
653
|
}
|
|
654
654
|
},
|
|
655
655
|
setup(e) {
|
|
656
|
-
let t = e, { t: n } =
|
|
656
|
+
let t = e, { t: n } = we(), { openImageDialog: a } = W(), s = j(!1), c = _(() => Xe(t.part.name)), l = _(() => [
|
|
657
657
|
"awaiting-input",
|
|
658
658
|
"input-streaming",
|
|
659
659
|
"input-complete",
|
|
660
660
|
"approval-responded"
|
|
661
661
|
].includes(t.part.state) && !t.result), u = _(() => l.value && t.busy), d = _(() => l.value && !t.busy), f = _(() => t.part.state === "approval-requested"), h = _(() => t.part.approval?.needsApproval === !0 && t.part.approval.approved === !1), v = _(() => t.part.state === "error" || t.result?.state === "error" || !!t.result?.error), y = _(() => u.value ? n("views.assistant.tool_running") : d.value ? n("views.assistant.tool_unfinished") : f.value ? n("views.assistant.tool_waiting_approval") : h.value ? n("views.assistant.tool_rejected") : v.value ? n("views.assistant.tool_failed") : ""), b = _(() => {
|
|
662
|
-
let e = t.part.input ??
|
|
662
|
+
let e = t.part.input ?? $e(t.part.arguments);
|
|
663
663
|
return e == null || typeof e == "object" && Object.keys(e).length === 0 ? "" : D(e);
|
|
664
|
-
}), S = _(() =>
|
|
664
|
+
}), S = _(() => et(t.result)), w = _(() => {
|
|
665
665
|
if (t.result?.error) return t.result.error;
|
|
666
666
|
let e = t.result?.content;
|
|
667
|
-
return e === void 0 ? "" : typeof e == "string" && !S.value ? D(
|
|
668
|
-
}), E = _(() => [...t.extraImages ?? [],
|
|
667
|
+
return e === void 0 ? "" : typeof e == "string" && !S.value ? D($e(e) ?? e) : (S.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
|
|
668
|
+
}), E = _(() => [...t.extraImages ?? [], ...Qe(S.value, c.value)]);
|
|
669
669
|
function D(e) {
|
|
670
670
|
if (typeof e == "string") return e;
|
|
671
671
|
try {
|
|
@@ -681,8 +681,8 @@ var Tn = d({
|
|
|
681
681
|
} });
|
|
682
682
|
}
|
|
683
683
|
return (t, n) => {
|
|
684
|
-
let a =
|
|
685
|
-
return i(), x("div",
|
|
684
|
+
let a = he, l = Ee, _ = De, S = wn, D = ot, k = st, A = ne, j = xn, ee = $t, te = Qt, N = qt;
|
|
685
|
+
return i(), x("div", Tn, [
|
|
686
686
|
T("button", {
|
|
687
687
|
type: "button",
|
|
688
688
|
class: "flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-left",
|
|
@@ -705,9 +705,9 @@ var Tn = d({
|
|
|
705
705
|
key: 4,
|
|
706
706
|
class: "w-4 h-4 shrink-0 text-success"
|
|
707
707
|
})),
|
|
708
|
-
T("span",
|
|
709
|
-
T("span",
|
|
710
|
-
T("span",
|
|
708
|
+
T("span", En, o(g(c)), 1),
|
|
709
|
+
T("span", Dn, o(g(y)), 1),
|
|
710
|
+
T("span", On, [g(s) ? (i(), p(k, {
|
|
711
711
|
key: 0,
|
|
712
712
|
class: "w-4 h-4"
|
|
713
713
|
})) : (i(), p(A, {
|
|
@@ -715,7 +715,7 @@ var Tn = d({
|
|
|
715
715
|
class: "w-4 h-4"
|
|
716
716
|
}))])
|
|
717
717
|
]),
|
|
718
|
-
e.inlineAttachments && g(E).length ? (i(), x("div",
|
|
718
|
+
e.inlineAttachments && g(E).length ? (i(), x("div", kn, [(i(!0), x(C, null, r(g(E), (e) => (i(), x("button", {
|
|
719
719
|
key: e.src,
|
|
720
720
|
type: "button",
|
|
721
721
|
class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
|
|
@@ -725,13 +725,13 @@ var Tn = d({
|
|
|
725
725
|
alt: e.alt,
|
|
726
726
|
class: "h-24 w-auto object-cover",
|
|
727
727
|
loading: "lazy"
|
|
728
|
-
}, null, 8,
|
|
729
|
-
e.inlineAttachments && e.cards?.length ? (i(), x("div",
|
|
728
|
+
}, null, 8, jn)], 8, An))), 128))])) : m("", !0),
|
|
729
|
+
e.inlineAttachments && e.cards?.length ? (i(), x("div", Mn, [(i(!0), x(C, null, r(e.cards, (t, n) => (i(), p(j, {
|
|
730
730
|
key: n,
|
|
731
731
|
card: t,
|
|
732
732
|
references: e.references
|
|
733
733
|
}, null, 8, ["card", "references"]))), 128))])) : m("", !0),
|
|
734
|
-
e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div",
|
|
734
|
+
e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div", Nn, [(i(!0), x(C, null, r(e.settings, (t) => (i(), p(ee, {
|
|
735
735
|
key: t,
|
|
736
736
|
setting: t,
|
|
737
737
|
"model-id": e.modelId
|
|
@@ -740,86 +740,86 @@ var Tn = d({
|
|
|
740
740
|
title: t.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
|
|
741
741
|
text: t.$t(`views.assistant.notice_${e.capability}_text`)
|
|
742
742
|
}, null, 8, ["title", "text"]))), 128))])) : m("", !0),
|
|
743
|
-
e.inlineAttachments && e.references?.length ? (i(), x("div",
|
|
744
|
-
g(s) ? (i(), x("div",
|
|
743
|
+
e.inlineAttachments && e.references?.length ? (i(), x("div", Pn, [M(N, { references: e.references }, null, 8, ["references"])])) : m("", !0),
|
|
744
|
+
g(s) ? (i(), x("div", Fn, [g(b) ? (i(), x("div", In, [T("span", Ln, o(t.$t("views.assistant.tool_arguments")), 1), T("pre", Rn, o(g(b)), 1)])) : m("", !0), g(w) ? (i(), x("div", zn, [T("span", Bn, o(t.$t("views.assistant.tool_result")), 1), T("pre", Vn, o(g(w)), 1)])) : m("", !0)])) : m("", !0)
|
|
745
745
|
]);
|
|
746
746
|
};
|
|
747
747
|
}
|
|
748
|
-
}), [["__scopeId", "data-v-661dfb47"]]),
|
|
748
|
+
}), [["__scopeId", "data-v-661dfb47"]]), Un = {
|
|
749
749
|
viewBox: "0 0 24 24",
|
|
750
750
|
width: "1.2em",
|
|
751
751
|
height: "1.2em"
|
|
752
752
|
};
|
|
753
|
-
function
|
|
754
|
-
return i(), x("svg",
|
|
753
|
+
function Wn(e, t) {
|
|
754
|
+
return i(), x("svg", Un, [...t[0] ||= [T("path", {
|
|
755
755
|
fill: "currentColor",
|
|
756
756
|
d: "M12 3v10.55c-.59-.34-1.27-.55-2-.55c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4V7h4V3z"
|
|
757
757
|
}, null, -1)]]);
|
|
758
758
|
}
|
|
759
|
-
var
|
|
759
|
+
var Gn = d({
|
|
760
760
|
name: "mdi-music-note",
|
|
761
|
-
render:
|
|
762
|
-
}),
|
|
763
|
-
function
|
|
761
|
+
render: Wn
|
|
762
|
+
}), Kn = "[continue]";
|
|
763
|
+
function qn(e) {
|
|
764
764
|
return e.parts.filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n").trim();
|
|
765
765
|
}
|
|
766
|
-
function
|
|
767
|
-
return e?.role === "user" &&
|
|
766
|
+
function Jn(e) {
|
|
767
|
+
return e?.role === "user" && qn(e) === "[continue]";
|
|
768
768
|
}
|
|
769
769
|
//#endregion
|
|
770
770
|
//#region src/components/CuiAssistantMessage/CuiAssistantMessage.vue?vue&type=script&setup=true&lang.ts
|
|
771
|
-
var
|
|
771
|
+
var Yn = {
|
|
772
772
|
key: 0,
|
|
773
773
|
class: "group flex flex-col items-end"
|
|
774
|
-
},
|
|
774
|
+
}, Xn = {
|
|
775
775
|
key: 0,
|
|
776
776
|
class: "w-full max-w-[min(82%,54ch)]"
|
|
777
|
-
},
|
|
777
|
+
}, Zn = { class: "mt-1.5 flex justify-end gap-1" }, Qn = {
|
|
778
778
|
key: 1,
|
|
779
779
|
class: "cui-assistant-bubble max-w-[min(82%,54ch)] rounded-2xl rounded-br-[4px] px-3.5 py-2.5 text-[15px] leading-relaxed whitespace-pre-wrap break-words text-color"
|
|
780
|
-
},
|
|
780
|
+
}, $n = {
|
|
781
781
|
key: 0,
|
|
782
782
|
class: "mt-2 flex flex-wrap gap-2"
|
|
783
|
-
},
|
|
783
|
+
}, er = ["src"], tr = {
|
|
784
784
|
key: 1,
|
|
785
785
|
class: "mt-2 flex flex-wrap gap-2"
|
|
786
|
-
},
|
|
786
|
+
}, nr = {
|
|
787
787
|
key: 2,
|
|
788
788
|
class: "message-actions mt-1 flex gap-0.5"
|
|
789
|
-
},
|
|
789
|
+
}, rr = {
|
|
790
790
|
key: 1,
|
|
791
791
|
class: "cui-assistant-answer group flex flex-col"
|
|
792
|
-
},
|
|
792
|
+
}, ir = {
|
|
793
793
|
key: 0,
|
|
794
794
|
class: "mb-1.5 flex items-center gap-2 text-[12.5px] text-muted"
|
|
795
|
-
},
|
|
795
|
+
}, ar = { class: "flex min-w-0 flex-col gap-2.5" }, or = {
|
|
796
796
|
key: 0,
|
|
797
797
|
class: "text-[15px] leading-relaxed text-color break-words"
|
|
798
|
-
},
|
|
798
|
+
}, sr = {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "cui-assistant-caret"
|
|
801
|
-
},
|
|
801
|
+
}, cr = ["open"], lr = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, ur = { class: "shrink-0 font-medium text-color" }, dr = { class: "truncate text-muted" }, fr = { class: "flex flex-col gap-2 px-2 pb-2" }, pr = {
|
|
802
802
|
key: 3,
|
|
803
803
|
class: "text-xs text-muted"
|
|
804
|
-
},
|
|
804
|
+
}, mr = { class: "cursor-pointer select-none" }, hr = { class: "mt-1 whitespace-pre-wrap break-words" }, gr = {
|
|
805
805
|
key: 0,
|
|
806
806
|
class: "flex items-center gap-2 text-[13.5px] text-muted"
|
|
807
|
-
},
|
|
807
|
+
}, _r = {
|
|
808
808
|
class: "cui-assistant-pulse flex items-center gap-1",
|
|
809
809
|
"aria-hidden": "true"
|
|
810
|
-
},
|
|
810
|
+
}, vr = {
|
|
811
811
|
key: 0,
|
|
812
812
|
class: "flex flex-wrap gap-2"
|
|
813
|
-
},
|
|
813
|
+
}, yr = ["onClick"], br = ["src", "alt"], xr = {
|
|
814
814
|
key: 1,
|
|
815
815
|
class: "mt-2 flex items-center gap-2 text-[12.5px] text-muted"
|
|
816
|
-
},
|
|
816
|
+
}, Sr = {
|
|
817
817
|
key: 2,
|
|
818
818
|
class: "answer-footer mt-2 flex items-center gap-2"
|
|
819
|
-
},
|
|
819
|
+
}, Cr = {
|
|
820
820
|
key: 0,
|
|
821
821
|
class: "cui-assistant-usage text-[11px] tabular-nums text-muted"
|
|
822
|
-
},
|
|
822
|
+
}, wr = { class: "message-actions flex gap-0.5" }, Tr = 6, Er = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
823
823
|
__name: "CuiAssistantMessage",
|
|
824
824
|
props: {
|
|
825
825
|
message: {},
|
|
@@ -844,12 +844,12 @@ var Xn = {
|
|
|
844
844
|
"continue"
|
|
845
845
|
],
|
|
846
846
|
setup(e, { emit: a }) {
|
|
847
|
-
let s = e, u = a, { t: d } =
|
|
847
|
+
let s = e, u = a, { t: d } = we(), { openImageDialog: f } = W(), y = [
|
|
848
848
|
"awaiting-input",
|
|
849
849
|
"input-streaming",
|
|
850
850
|
"input-complete",
|
|
851
851
|
"approval-responded"
|
|
852
|
-
], b = w("editRef"), S = j(!1), O = j(""), k = _(() =>
|
|
852
|
+
], b = w("editRef"), S = j(!1), O = j(""), k = _(() => qn(s.message)), A = _(() => s.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? s.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), ee = _(() => s.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), N = _(() => {
|
|
853
853
|
let e = /* @__PURE__ */ new Map();
|
|
854
854
|
for (let t of s.message.parts) t.type === "tool-result" && e.set(t.toolCallId, t);
|
|
855
855
|
let t = [];
|
|
@@ -883,7 +883,7 @@ var Xn = {
|
|
|
883
883
|
let e = [], t = [], n = [], r = [], i = [], a = /* @__PURE__ */ new Set();
|
|
884
884
|
for (let o of N.value) {
|
|
885
885
|
if (o.kind !== "tool") continue;
|
|
886
|
-
let c = [...s.toolImages?.[o.part.id] ?? [],
|
|
886
|
+
let c = [...s.toolImages?.[o.part.id] ?? [], ...Qe(et(o.result), Xe(o.part.name))];
|
|
887
887
|
for (let t of c) !a.has(t.src) && a.add(t.src) && e.push(t);
|
|
888
888
|
t.push(...s.toolCards?.[o.part.id] ?? []);
|
|
889
889
|
for (let e of s.toolSettings?.[o.part.id] ?? []) r.includes(e) || r.push(e);
|
|
@@ -893,7 +893,7 @@ var Xn = {
|
|
|
893
893
|
!a.has(t) && a.add(t) && n.push(e);
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = [...n.filter((e) => e.kind === "download"), ...n.filter((e) => e.kind !== "download" && !o.has(e.id)).slice(0,
|
|
896
|
+
let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = [...n.filter((e) => e.kind === "download"), ...n.filter((e) => e.kind !== "download" && !o.has(e.id)).slice(0, Tr)];
|
|
897
897
|
return e.length || t.length || c.length || r.length || i.length ? {
|
|
898
898
|
images: e,
|
|
899
899
|
cards: t,
|
|
@@ -905,52 +905,52 @@ var Xn = {
|
|
|
905
905
|
}), I = _(() => {
|
|
906
906
|
let e = ne.value.at(-1);
|
|
907
907
|
return e?.kind === "tool" || e?.kind === "steps" ? d("views.assistant.working") : d("views.assistant.thinking");
|
|
908
|
-
}),
|
|
908
|
+
}), R = _(() => {
|
|
909
909
|
let e = s.usage;
|
|
910
910
|
if (!e) return "";
|
|
911
911
|
let t = e.durationMs / 1e3, n = [d("views.assistant.usage_tokens", {
|
|
912
|
-
input:
|
|
913
|
-
output:
|
|
912
|
+
input: B(e.promptTokens),
|
|
913
|
+
output: B(e.completionTokens)
|
|
914
914
|
}), `${t.toFixed(1)} s`];
|
|
915
|
-
return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost:
|
|
916
|
-
}),
|
|
915
|
+
return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost: re(e.costUsd) })), n.join(" · ");
|
|
916
|
+
}), z = _(() => {
|
|
917
917
|
let e = s.usage;
|
|
918
918
|
return e ? d("views.assistant.usage_details", {
|
|
919
919
|
model: e.model,
|
|
920
920
|
turns: e.iterations,
|
|
921
921
|
tools: e.toolCalls,
|
|
922
|
-
cached:
|
|
923
|
-
reasoning:
|
|
922
|
+
cached: B(e.cachedTokens),
|
|
923
|
+
reasoning: B(e.reasoningTokens)
|
|
924
924
|
}) : "";
|
|
925
925
|
});
|
|
926
|
-
function
|
|
926
|
+
function B(e) {
|
|
927
927
|
return e < 1e3 ? String(e) : `${(e / 1e3).toFixed(+(e < 1e4))}k`;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function re(e) {
|
|
930
930
|
return `$${e.toFixed(e < .01 ? 4 : 3)}`;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function V(e) {
|
|
933
933
|
return !!s.busy && e.items.some((e) => !e.result && y.includes(e.part.state));
|
|
934
934
|
}
|
|
935
|
-
async function
|
|
935
|
+
async function ie() {
|
|
936
936
|
O.value = k.value, S.value = !0, await c(), b.value?.$el.focus();
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function H() {
|
|
939
939
|
let e = O.value.trim();
|
|
940
940
|
e && (S.value = !1, e !== k.value && u("edit", e));
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function U(e) {
|
|
943
943
|
f({ data: {
|
|
944
944
|
title: e.alt,
|
|
945
945
|
src: e.src
|
|
946
946
|
} });
|
|
947
947
|
}
|
|
948
|
-
async function
|
|
949
|
-
await
|
|
948
|
+
async function oe() {
|
|
949
|
+
await pe(P.value);
|
|
950
950
|
}
|
|
951
951
|
return (a, s) => {
|
|
952
|
-
let c =
|
|
953
|
-
return e.message.role === "user" ? (i(), x("div",
|
|
952
|
+
let c = Fe, d = Oe, f = Gn, _ = Ht, y = nt, w = Le, j = ae, N = Ge, B = Hn, re = he, se = ot, W = xn, ce = $t, G = Qt, le = qt, K = Ye, ue = L, q = at, de = te;
|
|
953
|
+
return e.message.role === "user" ? (i(), x("div", Yn, [g(S) ? (i(), x("div", Xn, [M(c, {
|
|
954
954
|
ref_key: "editRef",
|
|
955
955
|
ref: b,
|
|
956
956
|
modelValue: g(O),
|
|
@@ -958,8 +958,8 @@ var Xn = {
|
|
|
958
958
|
"auto-resize": "",
|
|
959
959
|
rows: "2",
|
|
960
960
|
class: "w-full text-[15px] leading-relaxed",
|
|
961
|
-
onKeydown: [n(t(
|
|
962
|
-
}, null, 8, ["modelValue", "onKeydown"]), T("div",
|
|
961
|
+
onKeydown: [n(t(H, ["exact", "prevent"]), ["enter"]), s[1] ||= n(t((e) => S.value = !1, ["prevent"]), ["esc"])]
|
|
962
|
+
}, null, 8, ["modelValue", "onKeydown"]), T("div", Zn, [M(d, {
|
|
963
963
|
type: "button",
|
|
964
964
|
size: "small",
|
|
965
965
|
severity: "secondary",
|
|
@@ -971,16 +971,16 @@ var Xn = {
|
|
|
971
971
|
size: "small",
|
|
972
972
|
label: a.$t("views.assistant.edit_send"),
|
|
973
973
|
disabled: !g(O).trim(),
|
|
974
|
-
onClick:
|
|
975
|
-
}, null, 8, ["label", "disabled"])])])) : (i(), x("div",
|
|
974
|
+
onClick: H
|
|
975
|
+
}, null, 8, ["label", "disabled"])])])) : (i(), x("div", Qn, [
|
|
976
976
|
D(o(g(k)) + " ", 1),
|
|
977
|
-
g(A).length ? (i(), x("div",
|
|
977
|
+
g(A).length ? (i(), x("div", $n, [(i(!0), x(C, null, r(g(A), (e) => (i(), x("img", {
|
|
978
978
|
key: e,
|
|
979
979
|
src: e,
|
|
980
980
|
class: "h-24 rounded-lg",
|
|
981
981
|
alt: ""
|
|
982
|
-
}, null, 8,
|
|
983
|
-
g(ee).length ? (i(), x("div",
|
|
982
|
+
}, null, 8, er))), 128))])) : m("", !0),
|
|
983
|
+
g(ee).length ? (i(), x("div", tr, [(i(!0), x(C, null, r(g(ee), (e, t) => (i(), x("span", {
|
|
984
984
|
key: t,
|
|
985
985
|
class: "cui-assistant-media inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted"
|
|
986
986
|
}, [e.kind === "audio" ? (i(), p(f, {
|
|
@@ -990,19 +990,19 @@ var Xn = {
|
|
|
990
990
|
key: 1,
|
|
991
991
|
class: "w-3.5 h-3.5"
|
|
992
992
|
})), D(" " + o(e.kind === "audio" ? a.$t("views.assistant.attachment_audio") : a.$t("views.assistant.attachment_video")), 1)]))), 128))])) : m("", !0)
|
|
993
|
-
])), !g(S) && !e.busy ? (i(), x("div",
|
|
993
|
+
])), !g(S) && !e.busy ? (i(), x("div", nr, [
|
|
994
994
|
E((i(), p(d, {
|
|
995
995
|
type: "button",
|
|
996
996
|
severity: "secondary",
|
|
997
997
|
text: "",
|
|
998
998
|
rounded: "",
|
|
999
999
|
class: "cui-icon-md text-muted",
|
|
1000
|
-
onClick:
|
|
1000
|
+
onClick: ie
|
|
1001
1001
|
}, {
|
|
1002
1002
|
icon: v(() => [M(y, { class: "w-3.5 h-3.5" })]),
|
|
1003
1003
|
_: 1
|
|
1004
1004
|
})), [[
|
|
1005
|
-
|
|
1005
|
+
de,
|
|
1006
1006
|
{ value: a.$t("views.assistant.edit_message") },
|
|
1007
1007
|
void 0,
|
|
1008
1008
|
{ top: !0 }
|
|
@@ -1018,7 +1018,7 @@ var Xn = {
|
|
|
1018
1018
|
icon: v(() => [M(w, { class: "w-3.5 h-3.5" })]),
|
|
1019
1019
|
_: 1
|
|
1020
1020
|
})), [[
|
|
1021
|
-
|
|
1021
|
+
de,
|
|
1022
1022
|
{ value: a.$t("views.assistant.branch_here") },
|
|
1023
1023
|
void 0,
|
|
1024
1024
|
{ top: !0 }
|
|
@@ -1034,18 +1034,18 @@ var Xn = {
|
|
|
1034
1034
|
icon: v(() => [M(j, { class: "w-3.5 h-3.5" })]),
|
|
1035
1035
|
_: 1
|
|
1036
1036
|
})), [[
|
|
1037
|
-
|
|
1037
|
+
de,
|
|
1038
1038
|
{ value: a.$t("views.assistant.delete_exchange") },
|
|
1039
1039
|
void 0,
|
|
1040
1040
|
{ top: !0 }
|
|
1041
1041
|
]])
|
|
1042
|
-
])) : m("", !0)])) : (i(), x("div",
|
|
1043
|
-
e.continuation ? m("", !0) : (i(), x("div",
|
|
1044
|
-
T("div",
|
|
1045
|
-
(i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div",
|
|
1042
|
+
])) : m("", !0)])) : (i(), x("div", rr, [
|
|
1043
|
+
e.continuation ? m("", !0) : (i(), x("div", ir, [T("span", { class: l(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), T("span", null, o(a.$t("views.assistant.title")), 1)])),
|
|
1044
|
+
T("div", ar, [
|
|
1045
|
+
(i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div", or, [M(N, {
|
|
1046
1046
|
content: t.text,
|
|
1047
1047
|
class: "cui-assistant-markdown"
|
|
1048
|
-
}, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span",
|
|
1048
|
+
}, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span", sr)) : m("", !0)])) : t.kind === "tool" ? (i(), p(B, {
|
|
1049
1049
|
key: 1,
|
|
1050
1050
|
part: t.part,
|
|
1051
1051
|
result: t.result,
|
|
@@ -1072,18 +1072,18 @@ var Xn = {
|
|
|
1072
1072
|
key: 2,
|
|
1073
1073
|
class: "cui-assistant-steps rounded-xl text-sm",
|
|
1074
1074
|
open: e.streaming
|
|
1075
|
-
}, [T("summary",
|
|
1076
|
-
|
|
1075
|
+
}, [T("summary", lr, [
|
|
1076
|
+
V(t) ? (i(), p(re, {
|
|
1077
1077
|
key: 0,
|
|
1078
1078
|
class: "w-4 h-4 m-0 shrink-0",
|
|
1079
1079
|
"stroke-width": "6"
|
|
1080
|
-
})) : (i(), p(
|
|
1080
|
+
})) : (i(), p(se, {
|
|
1081
1081
|
key: 1,
|
|
1082
1082
|
class: "w-4 h-4 shrink-0 text-success"
|
|
1083
1083
|
})),
|
|
1084
|
-
T("span",
|
|
1085
|
-
T("span",
|
|
1086
|
-
]), T("div",
|
|
1084
|
+
T("span", ur, o(a.$t("views.assistant.steps", { n: t.items.length })), 1),
|
|
1085
|
+
T("span", dr, o(t.items.map((e) => g(Xe)(e.part.name)).join(", ")), 1)
|
|
1086
|
+
]), T("div", fr, [(i(!0), x(C, null, r(t.items, (t) => (i(), p(B, {
|
|
1087
1087
|
key: t.part.id,
|
|
1088
1088
|
part: t.part,
|
|
1089
1089
|
result: t.result,
|
|
@@ -1106,45 +1106,45 @@ var Xn = {
|
|
|
1106
1106
|
"model-id",
|
|
1107
1107
|
"inline-attachments",
|
|
1108
1108
|
"busy"
|
|
1109
|
-
]))), 128))])], 8,
|
|
1110
|
-
e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span",
|
|
1109
|
+
]))), 128))])], 8, cr)) : t.kind === "thinking" ? (i(), x("details", pr, [T("summary", mr, o(a.$t("views.assistant.thinking")), 1), T("pre", hr, o(t.text), 1)])) : m("", !0)], 64))), 128)),
|
|
1110
|
+
e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span", gr, [T("span", _r, [(i(), x(C, null, r(3, (e) => T("span", {
|
|
1111
1111
|
key: e,
|
|
1112
1112
|
class: "h-1.5 w-1.5 rounded-full"
|
|
1113
1113
|
})), 64))]), D(" " + o(g(I)), 1)])) : m("", !0),
|
|
1114
1114
|
g(F) ? (i(), x(C, { key: 1 }, [
|
|
1115
|
-
g(F).images.length ? (i(), x("div",
|
|
1115
|
+
g(F).images.length ? (i(), x("div", vr, [(i(!0), x(C, null, r(g(F).images, (e) => (i(), x("button", {
|
|
1116
1116
|
key: e.src,
|
|
1117
1117
|
type: "button",
|
|
1118
1118
|
class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
|
|
1119
|
-
onClick: (t) =>
|
|
1119
|
+
onClick: (t) => U(e)
|
|
1120
1120
|
}, [T("img", {
|
|
1121
1121
|
src: e.src,
|
|
1122
1122
|
alt: e.alt,
|
|
1123
1123
|
class: "h-32 w-auto object-cover",
|
|
1124
1124
|
loading: "lazy"
|
|
1125
|
-
}, null, 8,
|
|
1126
|
-
(i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(
|
|
1125
|
+
}, null, 8, br)], 8, yr))), 128))])) : m("", !0),
|
|
1126
|
+
(i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(W, {
|
|
1127
1127
|
key: t,
|
|
1128
1128
|
card: e,
|
|
1129
1129
|
references: g(F).all
|
|
1130
1130
|
}, null, 8, ["card", "references"]))), 128)),
|
|
1131
|
-
(i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(
|
|
1131
|
+
(i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(ce, {
|
|
1132
1132
|
key: t,
|
|
1133
1133
|
setting: t,
|
|
1134
1134
|
"model-id": e.modelId
|
|
1135
1135
|
}, null, 8, ["setting", "model-id"]))), 128)),
|
|
1136
|
-
(i(!0), x(C, null, r(g(F).notices, (e) => (i(), p(
|
|
1136
|
+
(i(!0), x(C, null, r(g(F).notices, (e) => (i(), p(G, {
|
|
1137
1137
|
key: `${e.capability}:${e.model}`,
|
|
1138
1138
|
title: a.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
|
|
1139
1139
|
text: a.$t(`views.assistant.notice_${e.capability}_text`)
|
|
1140
1140
|
}, null, 8, ["title", "text"]))), 128)),
|
|
1141
|
-
g(F).references.length ? (i(), p(
|
|
1141
|
+
g(F).references.length ? (i(), p(le, {
|
|
1142
1142
|
key: 1,
|
|
1143
1143
|
references: g(F).references
|
|
1144
1144
|
}, null, 8, ["references"])) : m("", !0)
|
|
1145
1145
|
], 64)) : m("", !0)
|
|
1146
1146
|
]),
|
|
1147
|
-
e.stopped && !e.streaming ? (i(), x("div",
|
|
1147
|
+
e.stopped && !e.streaming ? (i(), x("div", xr, [T("span", null, o(a.$t("views.assistant.answer_stopped")), 1), M(d, {
|
|
1148
1148
|
type: "button",
|
|
1149
1149
|
size: "small",
|
|
1150
1150
|
severity: "secondary",
|
|
@@ -1153,19 +1153,19 @@ var Xn = {
|
|
|
1153
1153
|
disabled: e.busy,
|
|
1154
1154
|
onClick: s[5] ||= (e) => u("continue")
|
|
1155
1155
|
}, {
|
|
1156
|
-
icon: v(() => [M(
|
|
1156
|
+
icon: v(() => [M(K, { class: "w-3.5 h-3.5" })]),
|
|
1157
1157
|
_: 1
|
|
1158
1158
|
}, 8, ["label", "disabled"])])) : m("", !0),
|
|
1159
|
-
!e.streaming && (g(P) || e.stopped) ? (i(), x("div",
|
|
1160
|
-
|
|
1161
|
-
{ value: g(
|
|
1159
|
+
!e.streaming && (g(P) || e.stopped) ? (i(), x("div", Sr, [g(R) ? E((i(), x("span", Cr, [D(o(g(R)), 1)])), [[
|
|
1160
|
+
de,
|
|
1161
|
+
{ value: g(z) },
|
|
1162
1162
|
void 0,
|
|
1163
1163
|
{ top: !0 }
|
|
1164
|
-
]]) : m("", !0), T("div",
|
|
1165
|
-
g(P) ? E((i(), p(
|
|
1164
|
+
]]) : m("", !0), T("div", wr, [
|
|
1165
|
+
g(P) ? E((i(), p(ue, {
|
|
1166
1166
|
key: 0,
|
|
1167
1167
|
"action-text": a.$t("views.assistant.copied"),
|
|
1168
|
-
icon: g(
|
|
1168
|
+
icon: g(We),
|
|
1169
1169
|
"icon-class": "w-3.5 h-3.5",
|
|
1170
1170
|
"button-props": {
|
|
1171
1171
|
severity: "secondary",
|
|
@@ -1173,9 +1173,9 @@ var Xn = {
|
|
|
1173
1173
|
rounded: !0,
|
|
1174
1174
|
class: "cui-icon-md text-muted"
|
|
1175
1175
|
},
|
|
1176
|
-
onAction:
|
|
1176
|
+
onAction: oe
|
|
1177
1177
|
}, null, 8, ["action-text", "icon"])), [[
|
|
1178
|
-
|
|
1178
|
+
de,
|
|
1179
1179
|
{ value: a.$t("views.assistant.copy_answer") },
|
|
1180
1180
|
void 0,
|
|
1181
1181
|
{ top: !0 }
|
|
@@ -1189,10 +1189,10 @@ var Xn = {
|
|
|
1189
1189
|
disabled: e.busy,
|
|
1190
1190
|
onClick: s[6] ||= (e) => u("regenerate")
|
|
1191
1191
|
}, {
|
|
1192
|
-
icon: v(() => [M(
|
|
1192
|
+
icon: v(() => [M(q, { class: "w-3.5 h-3.5" })]),
|
|
1193
1193
|
_: 1
|
|
1194
1194
|
}, 8, ["disabled"])), [[
|
|
1195
|
-
|
|
1195
|
+
de,
|
|
1196
1196
|
{ value: a.$t("views.assistant.regenerate") },
|
|
1197
1197
|
void 0,
|
|
1198
1198
|
{ top: !0 }
|
|
@@ -1209,7 +1209,7 @@ var Xn = {
|
|
|
1209
1209
|
icon: v(() => [M(w, { class: "w-3.5 h-3.5" })]),
|
|
1210
1210
|
_: 1
|
|
1211
1211
|
}, 8, ["disabled"])), [[
|
|
1212
|
-
|
|
1212
|
+
de,
|
|
1213
1213
|
{ value: a.$t("views.assistant.branch_here") },
|
|
1214
1214
|
void 0,
|
|
1215
1215
|
{ top: !0 }
|
|
@@ -1226,7 +1226,7 @@ var Xn = {
|
|
|
1226
1226
|
icon: v(() => [M(j, { class: "w-3.5 h-3.5" })]),
|
|
1227
1227
|
_: 1
|
|
1228
1228
|
}, 8, ["disabled"])), [[
|
|
1229
|
-
|
|
1229
|
+
de,
|
|
1230
1230
|
{ value: a.$t("views.assistant.delete_exchange") },
|
|
1231
1231
|
void 0,
|
|
1232
1232
|
{ top: !0 }
|
|
@@ -1235,53 +1235,53 @@ var Xn = {
|
|
|
1235
1235
|
]));
|
|
1236
1236
|
};
|
|
1237
1237
|
}
|
|
1238
|
-
}), [["__scopeId", "data-v-88ef583b"]]),
|
|
1238
|
+
}), [["__scopeId", "data-v-88ef583b"]]), Dr = {
|
|
1239
1239
|
viewBox: "0 0 24 24",
|
|
1240
1240
|
width: "1.2em",
|
|
1241
1241
|
height: "1.2em"
|
|
1242
1242
|
};
|
|
1243
|
-
function
|
|
1244
|
-
return i(), x("svg",
|
|
1243
|
+
function Or(e, t) {
|
|
1244
|
+
return i(), x("svg", Dr, [...t[0] ||= [T("path", {
|
|
1245
1245
|
fill: "currentColor",
|
|
1246
1246
|
d: "M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z"
|
|
1247
1247
|
}, null, -1)]]);
|
|
1248
1248
|
}
|
|
1249
|
-
var
|
|
1249
|
+
var kr = d({
|
|
1250
1250
|
name: "mdi-arrow-up",
|
|
1251
|
-
render:
|
|
1252
|
-
}),
|
|
1251
|
+
render: Or
|
|
1252
|
+
}), Ar = {
|
|
1253
1253
|
viewBox: "0 0 24 24",
|
|
1254
1254
|
width: "1.2em",
|
|
1255
1255
|
height: "1.2em"
|
|
1256
1256
|
};
|
|
1257
|
-
function
|
|
1258
|
-
return i(), x("svg",
|
|
1257
|
+
function jr(e, t) {
|
|
1258
|
+
return i(), x("svg", Ar, [...t[0] ||= [T("path", {
|
|
1259
1259
|
fill: "currentColor",
|
|
1260
1260
|
d: "M18 18H6V6h12z"
|
|
1261
1261
|
}, null, -1)]]);
|
|
1262
1262
|
}
|
|
1263
|
-
var
|
|
1263
|
+
var Mr = d({
|
|
1264
1264
|
name: "mdi-stop",
|
|
1265
|
-
render:
|
|
1266
|
-
}),
|
|
1265
|
+
render: jr
|
|
1266
|
+
}), Nr = {
|
|
1267
1267
|
viewBox: "0 0 24 24",
|
|
1268
1268
|
width: "1.2em",
|
|
1269
1269
|
height: "1.2em"
|
|
1270
1270
|
};
|
|
1271
|
-
function
|
|
1272
|
-
return i(), x("svg",
|
|
1271
|
+
function Pr(e, t) {
|
|
1272
|
+
return i(), x("svg", Nr, [...t[0] ||= [T("path", {
|
|
1273
1273
|
fill: "currentColor",
|
|
1274
1274
|
d: "M16.5 6v11.5a4 4 0 0 1-4 4a4 4 0 0 1-4-4V5A2.5 2.5 0 0 1 11 2.5A2.5 2.5 0 0 1 13.5 5v10.5a1 1 0 0 1-1 1a1 1 0 0 1-1-1V6H10v9.5a2.5 2.5 0 0 0 2.5 2.5a2.5 2.5 0 0 0 2.5-2.5V5a4 4 0 0 0-4-4a4 4 0 0 0-4 4v12.5a5.5 5.5 0 0 0 5.5 5.5a5.5 5.5 0 0 0 5.5-5.5V6z"
|
|
1275
1275
|
}, null, -1)]]);
|
|
1276
1276
|
}
|
|
1277
|
-
var
|
|
1277
|
+
var Fr = d({
|
|
1278
1278
|
name: "mdi-paperclip",
|
|
1279
|
-
render:
|
|
1280
|
-
}),
|
|
1279
|
+
render: Pr
|
|
1280
|
+
}), Ir = {
|
|
1281
1281
|
image: 12582912,
|
|
1282
1282
|
audio: 26214400,
|
|
1283
1283
|
video: 62914560
|
|
1284
|
-
},
|
|
1284
|
+
}, Lr = "image/*,audio/*,video/*", Rr = {
|
|
1285
1285
|
de: "de-DE",
|
|
1286
1286
|
en: "en-US",
|
|
1287
1287
|
fr: "fr-FR",
|
|
@@ -1294,22 +1294,22 @@ var Ir = d({
|
|
|
1294
1294
|
ru: "ru-RU",
|
|
1295
1295
|
zh: "zh-CN",
|
|
1296
1296
|
ja: "ja-JP"
|
|
1297
|
-
},
|
|
1297
|
+
}, zr = { class: "cui-assistant-composer rounded-2xl" }, Br = {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
class: "px-3 pb-2"
|
|
1300
|
-
},
|
|
1300
|
+
}, Vr = {
|
|
1301
1301
|
key: 1,
|
|
1302
1302
|
class: "flex flex-wrap gap-2 px-3 pb-1"
|
|
1303
|
-
},
|
|
1303
|
+
}, Hr = ["src"], Ur = {
|
|
1304
1304
|
key: 1,
|
|
1305
1305
|
class: "flex items-center gap-1.5 px-2.5 py-2"
|
|
1306
|
-
},
|
|
1306
|
+
}, Wr = { class: "max-w-40 truncate" }, Gr = { class: "text-muted" }, Kr = ["accept"], qr = {
|
|
1307
1307
|
key: 1,
|
|
1308
1308
|
class: "ml-auto flex items-center gap-1.5 text-[11.5px] text-muted"
|
|
1309
|
-
},
|
|
1309
|
+
}, Jr = {
|
|
1310
1310
|
key: 2,
|
|
1311
1311
|
class: "ml-auto"
|
|
1312
|
-
},
|
|
1312
|
+
}, Yr = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
1313
1313
|
__name: "CuiAssistantComposer",
|
|
1314
1314
|
props: {
|
|
1315
1315
|
busy: {
|
|
@@ -1329,59 +1329,59 @@ var Ir = d({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
emits: ["send", "stop"],
|
|
1331
1331
|
setup(e, { expose: u, emit: d }) {
|
|
1332
|
-
let f = e, _ = d, { smBreakpoint: y } =
|
|
1333
|
-
function
|
|
1332
|
+
let f = e, _ = d, { smBreakpoint: y } = I(), { t: S, locale: O } = we(), k = window.SpeechRecognition ?? window.webkitSpeechRecognition, A = !!k && window.isSecureContext, ee = w("inputRef"), ne = w("fileInput"), P = j(""), F = j(!1), L = j([]), R = j(""), z = null, B;
|
|
1333
|
+
function re() {
|
|
1334
1334
|
let e = ee.value?.$el;
|
|
1335
1335
|
return e?.tagName === "TEXTAREA" ? e : e?.querySelector("textarea");
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1337
|
+
function V() {
|
|
1338
|
+
re()?.focus();
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1341
|
-
let e =
|
|
1340
|
+
function ie() {
|
|
1341
|
+
let e = re();
|
|
1342
1342
|
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function H() {
|
|
1345
1345
|
let e = P.value.trim();
|
|
1346
|
-
!e && !
|
|
1346
|
+
!e && !L.value.length || f.disabled || (_("send", {
|
|
1347
1347
|
text: e,
|
|
1348
|
-
attachments:
|
|
1349
|
-
}), P.value = "",
|
|
1348
|
+
attachments: L.value
|
|
1349
|
+
}), P.value = "", L.value = []);
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1352
|
-
|
|
1351
|
+
function U(e) {
|
|
1352
|
+
R.value = e, clearTimeout(B), B = setTimeout(() => R.value = "", 4e3);
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function ae(e) {
|
|
1355
1355
|
let t = e.type.split("/")[0];
|
|
1356
1356
|
return t === "image" || t === "audio" || t === "video" ? t : void 0;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function oe(e) {
|
|
1359
1359
|
return e >= 1048576 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(e / 1024))} KB`;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function se(e) {
|
|
1362
1362
|
return new Promise((t, n) => {
|
|
1363
1363
|
let r = new FileReader();
|
|
1364
1364
|
r.onload = () => t(String(r.result)), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
1365
1365
|
});
|
|
1366
1366
|
}
|
|
1367
|
-
async function
|
|
1367
|
+
async function W(e) {
|
|
1368
1368
|
for (let t of e) {
|
|
1369
|
-
let e =
|
|
1369
|
+
let e = ae(t);
|
|
1370
1370
|
if (!e) {
|
|
1371
|
-
|
|
1371
|
+
U(S("views.assistant.attach_unsupported"));
|
|
1372
1372
|
continue;
|
|
1373
1373
|
}
|
|
1374
|
-
if (t.size >
|
|
1375
|
-
|
|
1374
|
+
if (t.size > Ir[e]) {
|
|
1375
|
+
U(S("views.assistant.attach_too_large", { max: Math.round(Ir[e] / 1024 / 1024) }));
|
|
1376
1376
|
continue;
|
|
1377
1377
|
}
|
|
1378
|
-
if (
|
|
1379
|
-
|
|
1378
|
+
if (L.value.length >= 8) {
|
|
1379
|
+
U(S("views.assistant.attach_too_many", { max: 8 }));
|
|
1380
1380
|
break;
|
|
1381
1381
|
}
|
|
1382
|
-
let n = await
|
|
1383
|
-
|
|
1384
|
-
id:
|
|
1382
|
+
let n = await se(t);
|
|
1383
|
+
L.value.push({
|
|
1384
|
+
id: J(),
|
|
1385
1385
|
name: t.name || e,
|
|
1386
1386
|
kind: e,
|
|
1387
1387
|
mimeType: t.type,
|
|
@@ -1391,39 +1391,39 @@ var Ir = d({
|
|
|
1391
1391
|
});
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
async function
|
|
1394
|
+
async function ce(e) {
|
|
1395
1395
|
let t = e.target;
|
|
1396
|
-
t.files?.length && await
|
|
1396
|
+
t.files?.length && await W(Array.from(t.files)), t.value = "";
|
|
1397
1397
|
}
|
|
1398
|
-
async function
|
|
1398
|
+
async function G(e) {
|
|
1399
1399
|
let t = Array.from(e.clipboardData?.files ?? []);
|
|
1400
|
-
t.length && (e.preventDefault(), await
|
|
1400
|
+
t.length && (e.preventDefault(), await W(t));
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
|
|
1402
|
+
function le(e) {
|
|
1403
|
+
L.value = L.value.filter((t) => t.id !== e);
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function K() {
|
|
1406
1406
|
if (F.value) {
|
|
1407
|
-
|
|
1407
|
+
z?.stop();
|
|
1408
1408
|
return;
|
|
1409
1409
|
}
|
|
1410
1410
|
if (!k) return;
|
|
1411
1411
|
let e = P.value.trim(), t = new k();
|
|
1412
|
-
t.lang =
|
|
1412
|
+
t.lang = Rr[O.value] ?? O.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
|
|
1413
1413
|
let n = "";
|
|
1414
1414
|
for (let e = 0; e < t.results.length; e += 1) n += t.results[e][0]?.transcript ?? "";
|
|
1415
1415
|
P.value = e ? `${e} ${n.trim()}` : n.trim();
|
|
1416
1416
|
}, t.onend = () => {
|
|
1417
|
-
F.value = !1,
|
|
1417
|
+
F.value = !1, z = null, V();
|
|
1418
1418
|
}, t.onerror = (e) => {
|
|
1419
|
-
F.value = !1,
|
|
1420
|
-
},
|
|
1421
|
-
}
|
|
1422
|
-
return b(P, () => c(
|
|
1423
|
-
|
|
1424
|
-
}), u({ focus:
|
|
1425
|
-
let u =
|
|
1426
|
-
return i(), x("div",
|
|
1419
|
+
F.value = !1, z = null, e.error !== "no-speech" && e.error !== "aborted" && U(e.error === "not-allowed" || e.error === "service-not-allowed" ? S("views.assistant.voice_denied") : S("views.assistant.voice_failed", { error: e.error }));
|
|
1420
|
+
}, z = t, F.value = !0, t.start();
|
|
1421
|
+
}
|
|
1422
|
+
return b(P, () => c(ie)), a(() => {
|
|
1423
|
+
z?.abort(), clearTimeout(B);
|
|
1424
|
+
}), u({ focus: V }), (a, c) => {
|
|
1425
|
+
let u = Fe, d = Qt, f = Gn, b = Ht, S = Me, w = Oe, O = N, k = Fr, j = ct, I = Mr, z = kr, B = te;
|
|
1426
|
+
return i(), x("div", zr, [
|
|
1427
1427
|
M(u, {
|
|
1428
1428
|
ref_key: "inputRef",
|
|
1429
1429
|
ref: ee,
|
|
@@ -1434,19 +1434,19 @@ var Ir = d({
|
|
|
1434
1434
|
"auto-resize": "",
|
|
1435
1435
|
rows: "1",
|
|
1436
1436
|
class: "cui-assistant-input block w-full max-h-52 resize-none px-4 pt-3.5 pb-1 text-[15px] leading-relaxed",
|
|
1437
|
-
onKeydown: n(t(
|
|
1438
|
-
onPaste:
|
|
1437
|
+
onKeydown: n(t(H, ["exact", "prevent"]), ["enter"]),
|
|
1438
|
+
onPaste: G
|
|
1439
1439
|
}, null, 8, [
|
|
1440
1440
|
"modelValue",
|
|
1441
1441
|
"placeholder",
|
|
1442
1442
|
"disabled",
|
|
1443
1443
|
"onKeydown"
|
|
1444
1444
|
]),
|
|
1445
|
-
e.visionMissing && g(
|
|
1445
|
+
e.visionMissing && g(L).some((e) => e.kind === "image") ? (i(), x("div", Br, [M(d, {
|
|
1446
1446
|
title: a.$t("views.assistant.notice_vision_title", { model: e.visionMissing }),
|
|
1447
1447
|
text: a.$t("views.assistant.notice_vision_attach")
|
|
1448
1448
|
}, null, 8, ["title", "text"])])) : m("", !0),
|
|
1449
|
-
g(
|
|
1449
|
+
g(L).length ? (i(), x("div", Vr, [(i(!0), x(C, null, r(g(L), (e) => (i(), x("div", {
|
|
1450
1450
|
key: e.id,
|
|
1451
1451
|
class: "cui-assistant-attachment relative flex items-center rounded-lg text-xs text-color"
|
|
1452
1452
|
}, [e.kind === "image" ? (i(), x("img", {
|
|
@@ -1454,7 +1454,7 @@ var Ir = d({
|
|
|
1454
1454
|
src: e.preview,
|
|
1455
1455
|
class: "h-14 w-14 rounded-lg object-cover",
|
|
1456
1456
|
alt: ""
|
|
1457
|
-
}, null, 8,
|
|
1457
|
+
}, null, 8, Hr)) : (i(), x("span", Ur, [
|
|
1458
1458
|
e.kind === "audio" ? (i(), p(f, {
|
|
1459
1459
|
key: 0,
|
|
1460
1460
|
class: "w-4 h-4 text-muted"
|
|
@@ -1462,31 +1462,31 @@ var Ir = d({
|
|
|
1462
1462
|
key: 1,
|
|
1463
1463
|
class: "w-4 h-4 text-muted"
|
|
1464
1464
|
})),
|
|
1465
|
-
T("span",
|
|
1466
|
-
T("span",
|
|
1465
|
+
T("span", Wr, o(e.name), 1),
|
|
1466
|
+
T("span", Gr, o(oe(e.size)), 1)
|
|
1467
1467
|
])), E((i(), p(w, {
|
|
1468
1468
|
type: "button",
|
|
1469
1469
|
severity: "secondary",
|
|
1470
1470
|
rounded: "",
|
|
1471
1471
|
class: "cui-assistant-attachment-remove cui-icon-sm absolute -top-1.5 -right-1.5",
|
|
1472
|
-
onClick: (t) =>
|
|
1472
|
+
onClick: (t) => le(e.id)
|
|
1473
1473
|
}, {
|
|
1474
1474
|
icon: v(() => [M(S, { class: "w-3 h-3" })]),
|
|
1475
1475
|
_: 1
|
|
1476
1476
|
}, 8, ["onClick"])), [[
|
|
1477
|
-
|
|
1477
|
+
B,
|
|
1478
1478
|
{ value: a.$t("views.assistant.attach_remove") },
|
|
1479
1479
|
void 0,
|
|
1480
1480
|
{ top: !0 }
|
|
1481
1481
|
]])]))), 128))])) : m("", !0),
|
|
1482
|
-
g(
|
|
1482
|
+
g(R) ? (i(), p(O, {
|
|
1483
1483
|
key: 2,
|
|
1484
1484
|
severity: "warn",
|
|
1485
1485
|
variant: "simple",
|
|
1486
1486
|
size: "small",
|
|
1487
1487
|
class: "px-3 pb-1"
|
|
1488
1488
|
}, {
|
|
1489
|
-
default: v(() => [D(o(g(
|
|
1489
|
+
default: v(() => [D(o(g(R)), 1)]),
|
|
1490
1490
|
_: 1
|
|
1491
1491
|
})) : m("", !0),
|
|
1492
1492
|
T("div", { class: l(["flex items-center px-2 pb-2 pl-3", e.compact ? "gap-0.5" : "gap-2"]) }, [
|
|
@@ -1503,7 +1503,7 @@ var Ir = d({
|
|
|
1503
1503
|
icon: v(() => [M(k, { class: "w-4 h-4" })]),
|
|
1504
1504
|
_: 1
|
|
1505
1505
|
}, 8, ["disabled"])), [[
|
|
1506
|
-
|
|
1506
|
+
B,
|
|
1507
1507
|
{ value: a.$t("views.assistant.attach") },
|
|
1508
1508
|
void 0,
|
|
1509
1509
|
{ top: !0 }
|
|
@@ -1514,9 +1514,9 @@ var Ir = d({
|
|
|
1514
1514
|
type: "file",
|
|
1515
1515
|
class: "hidden",
|
|
1516
1516
|
multiple: "",
|
|
1517
|
-
accept: g(
|
|
1518
|
-
onChange:
|
|
1519
|
-
}, null, 40,
|
|
1517
|
+
accept: g(Lr),
|
|
1518
|
+
onChange: ce
|
|
1519
|
+
}, null, 40, Kr),
|
|
1520
1520
|
g(A) ? E((i(), p(w, {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
type: "button",
|
|
@@ -1525,22 +1525,22 @@ var Ir = d({
|
|
|
1525
1525
|
rounded: "",
|
|
1526
1526
|
class: l(["cui-assistant-voice shrink-0", { "cui-assistant-voice-active": g(F) }]),
|
|
1527
1527
|
disabled: e.disabled || e.busy,
|
|
1528
|
-
onClick:
|
|
1528
|
+
onClick: K
|
|
1529
1529
|
}, {
|
|
1530
1530
|
icon: v(() => [M(j, { class: "w-4 h-4" })]),
|
|
1531
1531
|
_: 1
|
|
1532
1532
|
}, 8, ["class", "disabled"])), [[
|
|
1533
|
-
|
|
1533
|
+
B,
|
|
1534
1534
|
{ value: g(F) ? a.$t("views.assistant.voice_stop") : a.$t("views.assistant.voice_start") },
|
|
1535
1535
|
void 0,
|
|
1536
1536
|
{ top: !0 }
|
|
1537
1537
|
]]) : m("", !0),
|
|
1538
|
-
!g(y) && !e.compact ? (i(), x("span",
|
|
1538
|
+
!g(y) && !e.compact ? (i(), x("span", qr, [
|
|
1539
1539
|
c[3] ||= T("kbd", { class: "cui-assistant-kbd" }, "↵", -1),
|
|
1540
1540
|
D(" " + o(a.$t("views.assistant.hint_send")) + " · ", 1),
|
|
1541
1541
|
c[4] ||= T("kbd", { class: "cui-assistant-kbd" }, "⇧↵", -1),
|
|
1542
1542
|
D(" " + o(a.$t("views.assistant.hint_newline")), 1)
|
|
1543
|
-
])) : (i(), x("span",
|
|
1543
|
+
])) : (i(), x("span", Jr)),
|
|
1544
1544
|
e.busy ? E((i(), p(w, {
|
|
1545
1545
|
key: 3,
|
|
1546
1546
|
type: "button",
|
|
@@ -1549,10 +1549,10 @@ var Ir = d({
|
|
|
1549
1549
|
class: "cui-assistant-send shrink-0",
|
|
1550
1550
|
onClick: c[2] ||= (e) => _("stop")
|
|
1551
1551
|
}, {
|
|
1552
|
-
icon: v(() => [M(
|
|
1552
|
+
icon: v(() => [M(I, { class: "w-4 h-4" })]),
|
|
1553
1553
|
_: 1
|
|
1554
1554
|
})), [[
|
|
1555
|
-
|
|
1555
|
+
B,
|
|
1556
1556
|
{ value: a.$t("views.assistant.stop") },
|
|
1557
1557
|
void 0,
|
|
1558
1558
|
{ top: !0 }
|
|
@@ -1560,55 +1560,55 @@ var Ir = d({
|
|
|
1560
1560
|
M(w, {
|
|
1561
1561
|
type: "button",
|
|
1562
1562
|
class: "cui-assistant-send shrink-0",
|
|
1563
|
-
disabled: e.disabled || !g(P).trim() && !g(
|
|
1564
|
-
onClick:
|
|
1563
|
+
disabled: e.disabled || !g(P).trim() && !g(L).length,
|
|
1564
|
+
onClick: H
|
|
1565
1565
|
}, {
|
|
1566
|
-
icon: v(() => [M(
|
|
1566
|
+
icon: v(() => [M(z, { class: "w-4 h-4" })]),
|
|
1567
1567
|
_: 1
|
|
1568
1568
|
}, 8, ["disabled"])
|
|
1569
1569
|
], 2)
|
|
1570
1570
|
]);
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
|
-
}), [["__scopeId", "data-v-1b2f48d6"]]),
|
|
1573
|
+
}), [["__scopeId", "data-v-1b2f48d6"]]), Xr = {
|
|
1574
1574
|
viewBox: "0 0 24 24",
|
|
1575
1575
|
width: "1.2em",
|
|
1576
1576
|
height: "1.2em"
|
|
1577
1577
|
};
|
|
1578
|
-
function
|
|
1579
|
-
return i(), x("svg",
|
|
1578
|
+
function Zr(e, t) {
|
|
1579
|
+
return i(), x("svg", Xr, [...t[0] ||= [T("path", {
|
|
1580
1580
|
fill: "currentColor",
|
|
1581
1581
|
d: "M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"
|
|
1582
1582
|
}, null, -1)]]);
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var Qr = d({
|
|
1585
1585
|
name: "mdi-tune",
|
|
1586
|
-
render:
|
|
1587
|
-
}),
|
|
1586
|
+
render: Zr
|
|
1587
|
+
}), $r = {
|
|
1588
1588
|
id: "pending-answer",
|
|
1589
1589
|
role: "assistant",
|
|
1590
1590
|
parts: []
|
|
1591
|
-
},
|
|
1591
|
+
}, ei = /* @__PURE__ */ function(e) {
|
|
1592
1592
|
return e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK", e.TOOL_CALL_START = "TOOL_CALL_START", e.TOOL_CALL_ARGS = "TOOL_CALL_ARGS", e.TOOL_CALL_END = "TOOL_CALL_END", e.TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK", e.TOOL_CALL_RESULT = "TOOL_CALL_RESULT", e.THINKING_START = "THINKING_START", e.THINKING_END = "THINKING_END", e.THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START", e.THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT", e.THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.STATE_DELTA = "STATE_DELTA", e.MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT", e.ACTIVITY_SNAPSHOT = "ACTIVITY_SNAPSHOT", e.ACTIVITY_DELTA = "ACTIVITY_DELTA", e.RAW = "RAW", e.CUSTOM = "CUSTOM", e.RUN_STARTED = "RUN_STARTED", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e.STEP_STARTED = "STEP_STARTED", e.STEP_FINISHED = "STEP_FINISHED", e.REASONING_START = "REASONING_START", e.REASONING_MESSAGE_START = "REASONING_MESSAGE_START", e.REASONING_MESSAGE_CONTENT = "REASONING_MESSAGE_CONTENT", e.REASONING_MESSAGE_END = "REASONING_MESSAGE_END", e.REASONING_MESSAGE_CHUNK = "REASONING_MESSAGE_CHUNK", e.REASONING_END = "REASONING_END", e.REASONING_ENCRYPTED_VALUE = "REASONING_ENCRYPTED_VALUE", e;
|
|
1593
1593
|
}({});
|
|
1594
1594
|
//#endregion
|
|
1595
1595
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.js
|
|
1596
|
-
function
|
|
1596
|
+
function ti(e) {
|
|
1597
1597
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function ni(e) {
|
|
1600
1600
|
return typeof e == "object" && !!e && !Array.isArray(e) && "promptTokens" in e;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return
|
|
1602
|
+
function ri(e, t) {
|
|
1603
|
+
return ni(e) ? e : ii(Array.isArray(e) ? e : void 0, t);
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function ii(e, t) {
|
|
1606
1606
|
let n = e?.[0];
|
|
1607
1607
|
if (n == null && t == null) return;
|
|
1608
|
-
let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o =
|
|
1608
|
+
let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = ti({
|
|
1609
1609
|
...n?.cachedInputTokens === void 0 ? {} : { cachedTokens: n.cachedInputTokens },
|
|
1610
1610
|
...r
|
|
1611
|
-
}), s =
|
|
1611
|
+
}), s = ti({
|
|
1612
1612
|
...n?.reasoningTokens === void 0 ? {} : { reasoningTokens: n.reasoningTokens },
|
|
1613
1613
|
...i
|
|
1614
1614
|
});
|
|
@@ -1623,28 +1623,28 @@ function ai(e, t) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
//#endregion
|
|
1625
1625
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/merge-metadata.js
|
|
1626
|
-
function
|
|
1626
|
+
function ai(e) {
|
|
1627
1627
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function oi(e, t) {
|
|
1630
1630
|
if (t == null) return e;
|
|
1631
1631
|
if (e == null) return { ...t };
|
|
1632
1632
|
let n = {
|
|
1633
1633
|
...e,
|
|
1634
1634
|
...t
|
|
1635
1635
|
};
|
|
1636
|
-
return
|
|
1636
|
+
return ai(e.tanstack) && ai(t.tanstack) && (n.tanstack = {
|
|
1637
1637
|
...e.tanstack,
|
|
1638
1638
|
...t.tanstack
|
|
1639
1639
|
}), n;
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function X(e) {
|
|
1642
1642
|
if (e == null) return;
|
|
1643
1643
|
let t = "metadata" in e ? e.metadata : void 0, n = (typeof t == "object" && t && !Array.isArray(t) ? t : e).tanstack;
|
|
1644
1644
|
if (typeof n == "object" && n && !Array.isArray(n)) return n;
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1647
|
-
let n = e.metadata, r =
|
|
1646
|
+
function si(e, t) {
|
|
1647
|
+
let n = e.metadata, r = X(e) ?? {};
|
|
1648
1648
|
return {
|
|
1649
1649
|
...e,
|
|
1650
1650
|
metadata: {
|
|
@@ -1658,13 +1658,13 @@ function ci(e, t) {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
//#endregion
|
|
1660
1660
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/errors.js
|
|
1661
|
-
function
|
|
1661
|
+
function ci(e) {
|
|
1662
1662
|
let t = Error(e.message || e.error?.message || "An error occurred"), n = e.code ?? e.error?.code;
|
|
1663
1663
|
return n !== void 0 && Object.assign(t, { code: n }), e.rawEvent !== void 0 && Object.assign(t, { rawEvent: e.rawEvent }), t;
|
|
1664
1664
|
}
|
|
1665
1665
|
//#endregion
|
|
1666
1666
|
//#region node_modules/@tanstack/ai/dist/esm/interrupt-serialization.js
|
|
1667
|
-
var
|
|
1667
|
+
var li = new Uint32Array([
|
|
1668
1668
|
1116352408,
|
|
1669
1669
|
1899447441,
|
|
1670
1670
|
3049323471,
|
|
@@ -1730,10 +1730,10 @@ var ui = new Uint32Array([
|
|
|
1730
1730
|
3204031479,
|
|
1731
1731
|
3329325298
|
|
1732
1732
|
]);
|
|
1733
|
-
function
|
|
1733
|
+
function ui(e, t) {
|
|
1734
1734
|
return e >>> t | e << 32 - t;
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function di(e) {
|
|
1737
1737
|
let t = new TextEncoder().encode(e), n = t.length * 8, r = t.length + 1, i = r + (56 - r % 64 + 64) % 64 + 8, a = new Uint8Array(i);
|
|
1738
1738
|
a.set(t), a[t.length] = 128;
|
|
1739
1739
|
let o = new DataView(a.buffer);
|
|
@@ -1742,12 +1742,12 @@ function fi(e) {
|
|
|
1742
1742
|
for (let e = 0; e < i; e += 64) {
|
|
1743
1743
|
for (let t = 0; t < 16; t++) h[t] = o.getUint32(e + t * 4);
|
|
1744
1744
|
for (let e = 16; e < 64; e++) {
|
|
1745
|
-
let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r =
|
|
1745
|
+
let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = ui(t, 7) ^ ui(t, 18) ^ t >>> 3, i = ui(n, 17) ^ ui(n, 19) ^ n >>> 10;
|
|
1746
1746
|
h[e] = (h[e - 16] ?? 0) + r + (h[e - 7] ?? 0) + i >>> 0;
|
|
1747
1747
|
}
|
|
1748
1748
|
let t = s, n = c, r = l, i = u, a = d, g = f, _ = p, v = m;
|
|
1749
1749
|
for (let e = 0; e < 64; e++) {
|
|
1750
|
-
let o =
|
|
1750
|
+
let o = ui(a, 6) ^ ui(a, 11) ^ ui(a, 25), s = a & g ^ ~a & _, c = v + o + s + (li[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (ui(t, 2) ^ ui(t, 13) ^ ui(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
|
|
1751
1751
|
v = _, _ = g, g = a, a = i + c >>> 0, i = r, r = n, n = t, t = c + l >>> 0;
|
|
1752
1752
|
}
|
|
1753
1753
|
s = s + t >>> 0, c = c + n >>> 0, l = l + r >>> 0, u = u + i >>> 0, d = d + a >>> 0, f = f + g >>> 0, p = p + _ >>> 0, m = m + v >>> 0;
|
|
@@ -1755,10 +1755,10 @@ function fi(e) {
|
|
|
1755
1755
|
let g = (e) => (e >>> 0).toString(16).padStart(8, "0");
|
|
1756
1756
|
return g(s) + g(c) + g(l) + g(u) + g(d) + g(f) + g(p) + g(m);
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return `sha256:${
|
|
1758
|
+
function fi(e) {
|
|
1759
|
+
return `sha256:${di(e)}`;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function pi(e, t) {
|
|
1762
1762
|
if (e === null) return "null";
|
|
1763
1763
|
if (typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return JSON.stringify(e);
|
|
1764
1764
|
if (typeof e != "object") throw TypeError("Interrupt values must be JSON-compatible.");
|
|
@@ -1768,74 +1768,74 @@ function mi(e, t) {
|
|
|
1768
1768
|
let n;
|
|
1769
1769
|
if (Array.isArray(e)) {
|
|
1770
1770
|
let r = [];
|
|
1771
|
-
for (let n = 0; n < e.length; n++) r.push(
|
|
1771
|
+
for (let n = 0; n < e.length; n++) r.push(pi(e[n], t));
|
|
1772
1772
|
n = `[${r.join(",")}]`;
|
|
1773
1773
|
} else {
|
|
1774
1774
|
let r = e;
|
|
1775
|
-
n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${
|
|
1775
|
+
n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${pi(r[e], t)}`).join(",")}}`;
|
|
1776
1776
|
}
|
|
1777
1777
|
return t.delete(e), n;
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return
|
|
1779
|
+
function mi(e) {
|
|
1780
|
+
return pi(e, /* @__PURE__ */ new WeakSet());
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function hi(e, t = fi) {
|
|
1783
1783
|
if (typeof e != "string") throw TypeError("Interrupt digests require canonical JSON text.");
|
|
1784
1784
|
return t(e);
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1787
|
-
typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(
|
|
1786
|
+
function gi(e) {
|
|
1787
|
+
typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(gi), Object.freeze(e));
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1790
|
-
let t = JSON.parse(
|
|
1791
|
-
return
|
|
1789
|
+
function Z(e) {
|
|
1790
|
+
let t = JSON.parse(mi(e));
|
|
1791
|
+
return gi(t), t;
|
|
1792
1792
|
}
|
|
1793
1793
|
//#endregion
|
|
1794
1794
|
//#region node_modules/@tanstack/ai/dist/esm/interrupts.js
|
|
1795
|
-
function
|
|
1796
|
-
let t =
|
|
1795
|
+
function _i(e) {
|
|
1796
|
+
let t = Z([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = mi(t);
|
|
1797
1797
|
return Object.freeze({
|
|
1798
1798
|
resolutions: t,
|
|
1799
1799
|
canonicalResolutions: n,
|
|
1800
|
-
fingerprint:
|
|
1800
|
+
fingerprint: hi(n)
|
|
1801
1801
|
});
|
|
1802
1802
|
}
|
|
1803
1803
|
//#endregion
|
|
1804
1804
|
//#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/schema-converter.js
|
|
1805
|
-
function
|
|
1805
|
+
function vi(e) {
|
|
1806
1806
|
let t = {};
|
|
1807
1807
|
for (let [n, r] of Object.entries(e)) n !== "$schema" && (t[n] = r);
|
|
1808
1808
|
return t;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function yi(e) {
|
|
1811
1811
|
return (typeof e == "object" || typeof e == "function") && e !== null;
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1814
|
-
if (!
|
|
1813
|
+
function bi(e) {
|
|
1814
|
+
if (!yi(e) || !("~standard" in e)) return !1;
|
|
1815
1815
|
let t = e["~standard"];
|
|
1816
1816
|
return typeof t != "object" || !t || !("version" in t) || t.version !== 1 || !("jsonSchema" in t) || typeof t.jsonSchema != "object" || t.jsonSchema === null || !("input" in t.jsonSchema) ? !1 : typeof t.jsonSchema.input == "function";
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1818
|
+
function xi(e) {
|
|
1819
|
+
return yi(e) && "~standard" in e && typeof e["~standard"] == "object" && e["~standard"] !== null && "version" in e["~standard"] && e["~standard"].version === 1 && "validate" in e["~standard"] && typeof e["~standard"].validate == "function";
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function Si(e) {
|
|
1822
1822
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function Ci(e) {
|
|
1825
1825
|
if (Array.isArray(e)) {
|
|
1826
|
-
let t = e.map((e) =>
|
|
1826
|
+
let t = e.map((e) => wi(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
|
|
1827
1827
|
return {
|
|
1828
1828
|
schema: t.map((e) => e.schema),
|
|
1829
1829
|
itemMap: n.some((e) => Object.keys(e).length > 0) ? n : void 0
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
let t =
|
|
1832
|
+
let t = wi(e, e.required || []);
|
|
1833
1833
|
return {
|
|
1834
1834
|
schema: t.schema,
|
|
1835
1835
|
itemMap: t.nullWidening
|
|
1836
1836
|
};
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function wi(e, t = []) {
|
|
1839
1839
|
let n = { ...e }, r = {};
|
|
1840
1840
|
if (n.type === "object" && n.properties) {
|
|
1841
1841
|
let e = { ...n.properties }, i = Object.keys(e), a = {};
|
|
@@ -1844,13 +1844,13 @@ function Ti(e, t = []) {
|
|
|
1844
1844
|
if (!r) continue;
|
|
1845
1845
|
let i = !t.includes(n), o = !1, s;
|
|
1846
1846
|
if (r.type === "object" && r.properties) {
|
|
1847
|
-
let t =
|
|
1847
|
+
let t = wi(r, r.required || []);
|
|
1848
1848
|
e[n] = i ? {
|
|
1849
1849
|
...t.schema,
|
|
1850
1850
|
type: ["object", "null"]
|
|
1851
1851
|
} : t.schema, o = i, s = t.nullWidening;
|
|
1852
1852
|
} else if (r.type === "array" && r.items) {
|
|
1853
|
-
let t =
|
|
1853
|
+
let t = Ci(r.items);
|
|
1854
1854
|
e[n] = {
|
|
1855
1855
|
...r,
|
|
1856
1856
|
items: t.schema,
|
|
@@ -1871,46 +1871,46 @@ function Ti(e, t = []) {
|
|
|
1871
1871
|
n.properties = e, n.required = i, n.additionalProperties = !1, Object.keys(a).length > 0 && (r.properties = a);
|
|
1872
1872
|
}
|
|
1873
1873
|
if (n.type === "array" && n.items) {
|
|
1874
|
-
let e =
|
|
1874
|
+
let e = Ci(n.items);
|
|
1875
1875
|
n.items = e.schema, e.itemMap && (r.items = e.itemMap);
|
|
1876
1876
|
}
|
|
1877
1877
|
return {
|
|
1878
1878
|
schema: n,
|
|
1879
|
-
nullWidening:
|
|
1879
|
+
nullWidening: Si(r)
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
if (
|
|
1884
|
-
let t =
|
|
1882
|
+
function Ti(e) {
|
|
1883
|
+
if (bi(e)) {
|
|
1884
|
+
let t = vi(e["~standard"].jsonSchema.input({ target: "draft-07" }));
|
|
1885
1885
|
return "properties" in t && !t.type && (t.type = "object"), t.type === "object" && !("properties" in t) && (t.properties = {}), t.type === "object" && !("required" in t) && (t.required = []), t;
|
|
1886
1886
|
}
|
|
1887
|
-
if (
|
|
1888
|
-
return typeof e == "object" ?
|
|
1887
|
+
if (xi(e)) throw Error("Schema is a Standard Schema validator but does not expose a JSON Schema converter on `~standard.jsonSchema`. Use Zod v4.2+, ArkType v2.1.28+, or wrap a Valibot schema with `toStandardJsonSchema()` from `@valibot/to-json-schema` before passing it as `outputSchema`.");
|
|
1888
|
+
return typeof e == "object" ? vi(e) : e;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1890
|
+
function Ei(e, t = {}) {
|
|
1891
1891
|
if (!e) return;
|
|
1892
1892
|
let { forStructuredOutput: n = !1 } = t;
|
|
1893
|
-
if (!n && !
|
|
1894
|
-
let r =
|
|
1895
|
-
return !r || typeof r != "object" || !n ? r :
|
|
1893
|
+
if (!n && !bi(e) && !xi(e)) return e;
|
|
1894
|
+
let r = Ti(e);
|
|
1895
|
+
return !r || typeof r != "object" || !n ? r : wi(r, r.required || []).schema;
|
|
1896
1896
|
}
|
|
1897
|
-
var
|
|
1897
|
+
var Di = class extends Error {
|
|
1898
1898
|
name = "StandardSchemaValidationError";
|
|
1899
1899
|
issues;
|
|
1900
1900
|
constructor(e) {
|
|
1901
1901
|
super(`Validation failed: ${e.map((e) => e.message || "Validation failed").join(", ")}`), this.issues = e;
|
|
1902
1902
|
}
|
|
1903
1903
|
};
|
|
1904
|
-
function
|
|
1905
|
-
if (!
|
|
1904
|
+
function Oi(e, t) {
|
|
1905
|
+
if (!xi(e)) return t;
|
|
1906
1906
|
let n = e["~standard"].validate(t);
|
|
1907
1907
|
if (n instanceof Promise) throw Error("Schema validation returned a Promise. Use validateWithStandardSchema for async validation.");
|
|
1908
1908
|
if (!n.issues) return n.value;
|
|
1909
|
-
throw new
|
|
1909
|
+
throw new Di(n.issues);
|
|
1910
1910
|
}
|
|
1911
1911
|
//#endregion
|
|
1912
1912
|
//#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/approval-schema.js
|
|
1913
|
-
var
|
|
1913
|
+
var ki = /* @__PURE__ */ new Set([
|
|
1914
1914
|
"$schema",
|
|
1915
1915
|
"$id",
|
|
1916
1916
|
"$ref",
|
|
@@ -1932,41 +1932,41 @@ var Ai = /* @__PURE__ */ new Set([
|
|
|
1932
1932
|
"maxLength",
|
|
1933
1933
|
"pattern"
|
|
1934
1934
|
]);
|
|
1935
|
-
function
|
|
1935
|
+
function Ai(e) {
|
|
1936
1936
|
return typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
|
|
1937
1937
|
}
|
|
1938
|
+
function ji(e) {
|
|
1939
|
+
return Ai(e) && Object.keys(e).some((e) => ki.has(e));
|
|
1940
|
+
}
|
|
1938
1941
|
function Mi(e) {
|
|
1939
|
-
return
|
|
1942
|
+
return xi(e) || bi(e) || ji(e);
|
|
1940
1943
|
}
|
|
1941
1944
|
function Ni(e) {
|
|
1942
|
-
|
|
1943
|
-
}
|
|
1944
|
-
function Pi(e) {
|
|
1945
|
-
if (!ji(e)) return !1;
|
|
1945
|
+
if (!Ai(e)) return !1;
|
|
1946
1946
|
let t = Object.keys(e);
|
|
1947
|
-
return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) =>
|
|
1947
|
+
return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => Mi(e[t]));
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function Pi(e) {
|
|
1950
1950
|
let t = {};
|
|
1951
1951
|
for (let [n, r] of Object.entries(e)) t[n] = r;
|
|
1952
1952
|
return t;
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1955
|
-
if (
|
|
1956
|
-
let t =
|
|
1954
|
+
function Fi(e) {
|
|
1955
|
+
if (xi(e)) {
|
|
1956
|
+
let t = bi(e) ? Pi(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
|
|
1957
1957
|
return {
|
|
1958
1958
|
source: e,
|
|
1959
1959
|
validator: e,
|
|
1960
1960
|
...t !== void 0 && { jsonSchema: t }
|
|
1961
1961
|
};
|
|
1962
1962
|
}
|
|
1963
|
-
if (
|
|
1963
|
+
if (ji(e)) return {
|
|
1964
1964
|
source: e,
|
|
1965
1965
|
jsonSchema: e
|
|
1966
1966
|
};
|
|
1967
1967
|
throw TypeError("Expected a supported SchemaInput.");
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1969
|
+
function Ii(e) {
|
|
1970
1970
|
let t = { approved: { const: e.approved } }, n = ["approved"];
|
|
1971
1971
|
return e.approved && e.inputSchema && (t.editedArgs = e.inputSchema.jsonSchema ?? {}), e.payload && (t.payload = e.payload.jsonSchema ?? {}, n.push("payload")), {
|
|
1972
1972
|
type: "object",
|
|
@@ -1975,22 +1975,22 @@ function Li(e) {
|
|
|
1975
1975
|
additionalProperties: !1
|
|
1976
1976
|
};
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1979
|
-
let n = t === void 0 ? null :
|
|
1978
|
+
function Li(e, t) {
|
|
1979
|
+
let n = t === void 0 ? null : Fi(t), r = null, i = null;
|
|
1980
1980
|
if (e !== void 0) {
|
|
1981
|
-
if (
|
|
1982
|
-
else if (
|
|
1981
|
+
if (xi(e) || ji(e)) r = Fi(e), i = r;
|
|
1982
|
+
else if (Ni(e)) r = e.approve === void 0 ? null : Fi(e.approve), i = e.reject === void 0 ? null : Fi(e.reject);
|
|
1983
1983
|
else throw TypeError("approvalSchema must be a SchemaInput or a nonempty map containing approve or reject.");
|
|
1984
1984
|
}
|
|
1985
|
-
let a = { oneOf: [
|
|
1985
|
+
let a = { oneOf: [Ii({
|
|
1986
1986
|
approved: !0,
|
|
1987
1987
|
payload: r,
|
|
1988
1988
|
inputSchema: n
|
|
1989
|
-
}),
|
|
1989
|
+
}), Ii({
|
|
1990
1990
|
approved: !1,
|
|
1991
1991
|
payload: i,
|
|
1992
1992
|
inputSchema: null
|
|
1993
|
-
})] }, o =
|
|
1993
|
+
})] }, o = mi(a), s = mi({
|
|
1994
1994
|
approve: r?.jsonSchema ?? null,
|
|
1995
1995
|
reject: i?.jsonSchema ?? null
|
|
1996
1996
|
});
|
|
@@ -2000,33 +2000,33 @@ function Ri(e, t) {
|
|
|
2000
2000
|
reject: i
|
|
2001
2001
|
},
|
|
2002
2002
|
responseSchema: a,
|
|
2003
|
-
responseSchemaHash:
|
|
2004
|
-
approvalSchemaHash:
|
|
2003
|
+
responseSchemaHash: hi(o),
|
|
2004
|
+
approvalSchemaHash: hi(s)
|
|
2005
2005
|
};
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return
|
|
2007
|
+
function Ri(e) {
|
|
2008
|
+
return hi(e === void 0 ? "undefined" : mi(Fi(e).jsonSchema ?? { standardValidator: "unserialized" }));
|
|
2009
2009
|
}
|
|
2010
2010
|
//#endregion
|
|
2011
2011
|
//#region node_modules/@tanstack/ai/dist/esm/interrupt-resume.js
|
|
2012
|
-
var
|
|
2013
|
-
function
|
|
2012
|
+
var zi = "tanstack:interruptBinding", Bi = zi;
|
|
2013
|
+
function Vi(e) {
|
|
2014
2014
|
return e && typeof e == "object" ? e : null;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Q(e, t) {
|
|
2017
2017
|
return typeof e[t] == "string" ? e[t] : void 0;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function Hi(e) {
|
|
2020
2020
|
let t = e.v;
|
|
2021
2021
|
return t === void 0 || t === 1;
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2024
|
-
let t =
|
|
2025
|
-
if (!n ||
|
|
2026
|
-
let r =
|
|
2023
|
+
function Ui(e) {
|
|
2024
|
+
let t = Vi(e.metadata), n = t ? Vi(t[Bi]) : null;
|
|
2025
|
+
if (!n || Q(n, "interruptId") !== e.id || !Hi(n)) return;
|
|
2026
|
+
let r = Q(n, "kind"), i = Q(n, "interruptId"), a = Q(n, "responseSchemaHash"), o = Q(n, "expiresAt");
|
|
2027
2027
|
if (!i || a === "" || o !== void 0 && !Number.isFinite(Date.parse(o))) return;
|
|
2028
2028
|
if (r === "generic") {
|
|
2029
|
-
let e =
|
|
2029
|
+
let e = Q(n, "definitionId"), t = Q(n, "key"), s = n.batchIndex, c = Q(n, "payloadSchemaHash");
|
|
2030
2030
|
return (e !== void 0 || t !== void 0 || s !== void 0 || c !== void 0) && (!e || !t || typeof s != "number" || !Number.isInteger(s) || s < 0) ? void 0 : {
|
|
2031
2031
|
v: 1,
|
|
2032
2032
|
kind: r,
|
|
@@ -2040,10 +2040,10 @@ function Wi(e) {
|
|
|
2040
2040
|
};
|
|
2041
2041
|
}
|
|
2042
2042
|
if (!a) return;
|
|
2043
|
-
let s =
|
|
2043
|
+
let s = Q(n, "toolName"), c = Q(n, "toolCallId");
|
|
2044
2044
|
if (s && c) {
|
|
2045
2045
|
if (r === "client-tool-execution") {
|
|
2046
|
-
let e =
|
|
2046
|
+
let e = Q(n, "outputSchemaHash");
|
|
2047
2047
|
return e ? {
|
|
2048
2048
|
v: 1,
|
|
2049
2049
|
kind: r,
|
|
@@ -2056,7 +2056,7 @@ function Wi(e) {
|
|
|
2056
2056
|
} : void 0;
|
|
2057
2057
|
}
|
|
2058
2058
|
if (r === "tool-approval") {
|
|
2059
|
-
let e =
|
|
2059
|
+
let e = Q(n, "inputSchemaHash"), t = Q(n, "approvalSchemaHash");
|
|
2060
2060
|
return !e || !t ? void 0 : {
|
|
2061
2061
|
v: 1,
|
|
2062
2062
|
kind: r,
|
|
@@ -2072,12 +2072,12 @@ function Wi(e) {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2076
|
-
let t =
|
|
2075
|
+
function Wi(e) {
|
|
2076
|
+
let t = Ui(e);
|
|
2077
2077
|
if (!t) return;
|
|
2078
|
-
let n =
|
|
2078
|
+
let n = Vi(e.metadata), r = n ? Vi(n[Bi]) : null;
|
|
2079
2079
|
if (!r) return;
|
|
2080
|
-
let i =
|
|
2080
|
+
let i = Q(r, "interruptedRunId"), a = r.generation;
|
|
2081
2081
|
if (!(!i || typeof a != "number" || !Number.isInteger(a) || a < 0)) return {
|
|
2082
2082
|
...t,
|
|
2083
2083
|
interruptedRunId: i,
|
|
@@ -2086,9 +2086,9 @@ function Gi(e) {
|
|
|
2086
2086
|
}
|
|
2087
2087
|
//#endregion
|
|
2088
2088
|
//#region node_modules/@tanstack/ai/dist/esm/interrupt-definition.js
|
|
2089
|
-
var
|
|
2090
|
-
function
|
|
2091
|
-
if (!
|
|
2089
|
+
var Gi = "tanstack:interruptPayload";
|
|
2090
|
+
function Ki(e, t) {
|
|
2091
|
+
if (!bi(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
|
|
2092
2092
|
try {
|
|
2093
2093
|
let t = e["~standard"].jsonSchema.input({ target: "draft-07" });
|
|
2094
2094
|
if (t === void 0) throw TypeError("The exported schema is undefined.");
|
|
@@ -2098,28 +2098,28 @@ function qi(e, t) {
|
|
|
2098
2098
|
for (let [e, r] of Object.entries(t)) e !== "$schema" && (n[e] = r);
|
|
2099
2099
|
return {
|
|
2100
2100
|
json: n,
|
|
2101
|
-
canonicalJson:
|
|
2101
|
+
canonicalJson: mi(n)
|
|
2102
2102
|
};
|
|
2103
2103
|
} catch (e) {
|
|
2104
2104
|
throw TypeError(`${t} could not export compatible JSON Schema: ${e instanceof Error ? e.message : String(e)}`);
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2108
|
-
return
|
|
2107
|
+
function qi(e) {
|
|
2108
|
+
return hi(Ki(e, "Interrupt schema").canonicalJson);
|
|
2109
2109
|
}
|
|
2110
2110
|
//#endregion
|
|
2111
2111
|
//#region node_modules/@tanstack/ai/dist/esm/generic-interrupt-continuation.js
|
|
2112
|
-
var
|
|
2113
|
-
function
|
|
2112
|
+
var Ji = "tanstack:interruptContinuation";
|
|
2113
|
+
function Yi(e) {
|
|
2114
2114
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2117
|
-
return { [
|
|
2116
|
+
function Xi(e) {
|
|
2117
|
+
return { [Ji]: e };
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2120
|
-
let t =
|
|
2119
|
+
function Zi(e) {
|
|
2120
|
+
let t = Ui(e);
|
|
2121
2121
|
if (t?.kind !== "generic" || t.definitionId === void 0 || t.key === void 0 || t.batchIndex === void 0) return;
|
|
2122
|
-
let n =
|
|
2122
|
+
let n = Yi(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
|
|
2123
2123
|
return {
|
|
2124
2124
|
v: 1,
|
|
2125
2125
|
definitionId: t.definitionId,
|
|
@@ -2130,98 +2130,98 @@ function Qi(e) {
|
|
|
2130
2130
|
...e.expiresAt === void 0 ? {} : { expiresAt: e.expiresAt },
|
|
2131
2131
|
...t.responseSchemaHash === void 0 ? {} : { responseSchemaHash: t.responseSchemaHash },
|
|
2132
2132
|
...t.payloadSchemaHash === void 0 ? {} : { payloadSchemaHash: t.payloadSchemaHash },
|
|
2133
|
-
...r ? { payload: n[
|
|
2133
|
+
...r ? { payload: n[Gi] } : {}
|
|
2134
2134
|
};
|
|
2135
2135
|
}
|
|
2136
2136
|
//#endregion
|
|
2137
2137
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/tool-result.js
|
|
2138
|
-
var
|
|
2138
|
+
var Qi = /* @__PURE__ */ new Set([
|
|
2139
2139
|
"text",
|
|
2140
2140
|
"image",
|
|
2141
2141
|
"audio",
|
|
2142
2142
|
"video",
|
|
2143
2143
|
"document"
|
|
2144
2144
|
]);
|
|
2145
|
-
function
|
|
2145
|
+
function $i(e) {
|
|
2146
2146
|
if (typeof e != "object" || !e) return !1;
|
|
2147
2147
|
let t = e;
|
|
2148
|
-
if (typeof t.type != "string" ||
|
|
2148
|
+
if (typeof t.type != "string" || !Qi.has(t.type)) return !1;
|
|
2149
2149
|
if (t.type === "text") return typeof t.content == "string";
|
|
2150
2150
|
let n = t.source;
|
|
2151
2151
|
if (typeof n != "object" || !n) return !1;
|
|
2152
2152
|
let r = n;
|
|
2153
2153
|
return typeof r.value == "string" ? r.type === "data" ? typeof r.mimeType == "string" : r.type === "url" : !1;
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2156
|
-
return Array.isArray(e) && e.length > 0 && e.every(
|
|
2155
|
+
function ea(e) {
|
|
2156
|
+
return Array.isArray(e) && e.length > 0 && e.every($i);
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2159
|
-
return typeof e == "string" ||
|
|
2158
|
+
function ta(e) {
|
|
2159
|
+
return typeof e == "string" || ea(e) ? e : JSON.stringify(e);
|
|
2160
2160
|
}
|
|
2161
2161
|
//#endregion
|
|
2162
2162
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/provider-executed.js
|
|
2163
|
-
function
|
|
2163
|
+
function na(e) {
|
|
2164
2164
|
let t = e?.metadata;
|
|
2165
2165
|
return typeof t == "object" && t && t.providerExecuted === !0 ? t : null;
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2168
|
-
return
|
|
2167
|
+
function ra(e) {
|
|
2168
|
+
return na(e) !== null;
|
|
2169
2169
|
}
|
|
2170
2170
|
//#endregion
|
|
2171
2171
|
//#region node_modules/@tanstack/ai/dist/esm/activities/chat/messages.js
|
|
2172
|
-
function
|
|
2172
|
+
function ia(e) {
|
|
2173
2173
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2175
|
+
function aa(e) {
|
|
2176
2176
|
return e.type === "text" || e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document";
|
|
2177
2177
|
}
|
|
2178
|
-
function
|
|
2178
|
+
function oa(e) {
|
|
2179
2179
|
try {
|
|
2180
2180
|
return JSON.stringify(e) ?? "";
|
|
2181
2181
|
} catch {
|
|
2182
2182
|
return "";
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function sa(e) {
|
|
2186
2186
|
return typeof e == "string" && e !== "" ? e : void 0;
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function ca(e) {
|
|
2189
2189
|
if ("encryptedValue" in e) {
|
|
2190
|
-
let t =
|
|
2190
|
+
let t = sa(e.encryptedValue);
|
|
2191
2191
|
if (t !== void 0) return t;
|
|
2192
2192
|
}
|
|
2193
|
-
return
|
|
2193
|
+
return sa(X(e)?.signature);
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2195
|
+
function la(e) {
|
|
2196
2196
|
return e.length === 0 ? null : e.every((e) => e.type === "text") ? e.map((e) => e.content).join("") || null : e;
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2198
|
+
function ua(e) {
|
|
2199
2199
|
return e == null ? "" : typeof e == "string" ? e : e.filter((e) => e.type === "text").map((e) => e.content).join("");
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
return Array.isArray(e) ? e :
|
|
2201
|
+
function da(e) {
|
|
2202
|
+
return Array.isArray(e) ? e : ua(e);
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function fa(e) {
|
|
2205
2205
|
if (!("role" in e) || e.role !== "tool") return e;
|
|
2206
|
-
let t = e, n =
|
|
2207
|
-
if (!
|
|
2206
|
+
let t = e, n = X(t)?.toolResult;
|
|
2207
|
+
if (!ia(n) || "content" in n && !ea(n.content)) return e;
|
|
2208
2208
|
let r = { ...e };
|
|
2209
2209
|
if ("id" in n || Reflect.deleteProperty(r, "id"), "createdAt" in n || Reflect.deleteProperty(r, "createdAt"), typeof n.id == "string" && Reflect.set(r, "id", n.id), typeof n.createdAt == "string") {
|
|
2210
|
-
let e =
|
|
2210
|
+
let e = pa(n.createdAt);
|
|
2211
2211
|
e && Reflect.set(r, "createdAt", e);
|
|
2212
2212
|
}
|
|
2213
|
-
|
|
2213
|
+
ea(n.content) && Reflect.set(r, "content", n.content);
|
|
2214
2214
|
let i = Reflect.get(t, "metadata");
|
|
2215
|
-
if (
|
|
2215
|
+
if (ia(i)) {
|
|
2216
2216
|
let e = i.tanstack;
|
|
2217
|
-
if (
|
|
2217
|
+
if (ia(e)) {
|
|
2218
2218
|
let { toolResult: t, ...n } = e, a = { ...i };
|
|
2219
2219
|
Object.keys(n).length ? a.tanstack = n : delete a.tanstack, Object.keys(a).length ? Reflect.set(r, "metadata", a) : Reflect.deleteProperty(r, "metadata");
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
2222
|
return r;
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2224
|
+
function pa(e) {
|
|
2225
2225
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
2226
2226
|
if (typeof e != "string") return;
|
|
2227
2227
|
let t = new Date(e);
|
|
@@ -2229,17 +2229,17 @@ function Q(e) {
|
|
|
2229
2229
|
}
|
|
2230
2230
|
function ma(e) {
|
|
2231
2231
|
if (e.type !== "tool-result") return e;
|
|
2232
|
-
let t =
|
|
2232
|
+
let t = pa(e.createdAt), { createdAt: n, ...r } = e;
|
|
2233
2233
|
return t === void 0 ? r : {
|
|
2234
2234
|
...r,
|
|
2235
2235
|
createdAt: t
|
|
2236
2236
|
};
|
|
2237
2237
|
}
|
|
2238
2238
|
function ha(e) {
|
|
2239
|
-
return
|
|
2239
|
+
return pa(X(e)?.createdAt);
|
|
2240
2240
|
}
|
|
2241
2241
|
function ga(e) {
|
|
2242
|
-
let t =
|
|
2242
|
+
let t = pa(e.createdAt);
|
|
2243
2243
|
return t === void 0 ? {} : { createdAt: t };
|
|
2244
2244
|
}
|
|
2245
2245
|
function _a(e) {
|
|
@@ -2262,7 +2262,7 @@ function ba(e, t) {
|
|
|
2262
2262
|
};
|
|
2263
2263
|
}
|
|
2264
2264
|
function xa(e) {
|
|
2265
|
-
let t = e.parts.filter(va), n = e.metadata ?? {}, r =
|
|
2265
|
+
let t = e.parts.filter(va), n = e.metadata ?? {}, r = X(e), i = {};
|
|
2266
2266
|
r?.model !== void 0 && (i.model = r.model), r?.signature !== void 0 && (i.signature = r.signature), t.length > 0 && (i.uiResources = t);
|
|
2267
2267
|
let a = { ...n };
|
|
2268
2268
|
return Object.keys(i).length > 0 ? a.tanstack = i : delete a.tanstack, Object.keys(a).length > 0 ? a : void 0;
|
|
@@ -2272,11 +2272,11 @@ function Sa(e) {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
function Ca(e) {
|
|
2274
2274
|
let t = [];
|
|
2275
|
-
for (let n of e.parts)
|
|
2275
|
+
for (let n of e.parts) aa(n) && t.push(n);
|
|
2276
2276
|
return {
|
|
2277
2277
|
id: e.id,
|
|
2278
2278
|
role: e.role,
|
|
2279
|
-
content:
|
|
2279
|
+
content: la(t),
|
|
2280
2280
|
..._a(e),
|
|
2281
2281
|
...ga(e),
|
|
2282
2282
|
...e.metadata !== void 0 && { metadata: e.metadata }
|
|
@@ -2301,7 +2301,7 @@ function Ea(e) {
|
|
|
2301
2301
|
...o !== void 0 && { metadata: o }
|
|
2302
2302
|
};
|
|
2303
2303
|
function c(e = !1) {
|
|
2304
|
-
let i =
|
|
2304
|
+
let i = la(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
|
|
2305
2305
|
(e || a || o || c) && (t.push({
|
|
2306
2306
|
...s,
|
|
2307
2307
|
role: "assistant",
|
|
@@ -2343,13 +2343,13 @@ function Ea(e) {
|
|
|
2343
2343
|
}), i.add(a.toolCallId));
|
|
2344
2344
|
break;
|
|
2345
2345
|
case "thinking":
|
|
2346
|
-
(a.content || a.signature) && (n.toolCalls.some(
|
|
2346
|
+
(a.content || a.signature) && (n.toolCalls.some(ra) && c(), r.push({
|
|
2347
2347
|
content: a.content,
|
|
2348
2348
|
...a.signature && { signature: a.signature }
|
|
2349
2349
|
}));
|
|
2350
2350
|
break;
|
|
2351
2351
|
case "structured-output": if (a.status === "complete") {
|
|
2352
|
-
let e = a.raw === "" ? a.data === void 0 ? "" :
|
|
2352
|
+
let e = a.raw === "" ? a.data === void 0 ? "" : oa(a.data) : a.raw;
|
|
2353
2353
|
e !== "" && (n.contentParts.push({
|
|
2354
2354
|
type: "text",
|
|
2355
2355
|
content: e
|
|
@@ -2359,7 +2359,7 @@ function Ea(e) {
|
|
|
2359
2359
|
c();
|
|
2360
2360
|
for (let n of e.parts) if (n.type === "tool-call" && (n.output !== void 0 && !i.has(n.id) && (t.push({
|
|
2361
2361
|
role: "tool",
|
|
2362
|
-
content:
|
|
2362
|
+
content: ta(n.output),
|
|
2363
2363
|
toolCallId: n.id
|
|
2364
2364
|
}), i.add(n.id)), n.output === void 0 && n.state === "approval-responded" && n.approval?.approved !== void 0 && !i.has(n.id))) {
|
|
2365
2365
|
let e = n.approval.approved;
|
|
@@ -2380,13 +2380,13 @@ function Ea(e) {
|
|
|
2380
2380
|
}), t;
|
|
2381
2381
|
}
|
|
2382
2382
|
function Da(e, t) {
|
|
2383
|
-
let n = [], r =
|
|
2383
|
+
let n = [], r = pa(e.createdAt);
|
|
2384
2384
|
if (e.role === "assistant" && e.thinking?.length) for (let t of e.thinking) (t.content || t.signature) && n.push({
|
|
2385
2385
|
type: "thinking",
|
|
2386
2386
|
content: t.content,
|
|
2387
2387
|
...t.signature && { signature: t.signature }
|
|
2388
2388
|
});
|
|
2389
|
-
let i = e.structuredOutput ?? Aa(
|
|
2389
|
+
let i = e.structuredOutput ?? Aa(X(e)?.structuredOutput);
|
|
2390
2390
|
if (e.role === "assistant" && i) {
|
|
2391
2391
|
if (typeof e.content == "string" && e.content && e.content !== i.raw) {
|
|
2392
2392
|
let t = i.raw, r = t !== "" && e.content.endsWith(t) ? e.content.slice(0, -t.length) : e.content;
|
|
@@ -2399,7 +2399,7 @@ function Da(e, t) {
|
|
|
2399
2399
|
} else if (e.role === "tool" && e.toolCallId) n.push({
|
|
2400
2400
|
type: "tool-result",
|
|
2401
2401
|
toolCallId: e.toolCallId,
|
|
2402
|
-
content:
|
|
2402
|
+
content: da(e.content),
|
|
2403
2403
|
state: e.error === void 0 ? "complete" : "error",
|
|
2404
2404
|
...e.id !== void 0 && { id: e.id },
|
|
2405
2405
|
...e.name !== void 0 && { name: e.name },
|
|
@@ -2409,7 +2409,7 @@ function Da(e, t) {
|
|
|
2409
2409
|
});
|
|
2410
2410
|
else if (Array.isArray(e.content)) for (let t of e.content) n.push(t);
|
|
2411
2411
|
else {
|
|
2412
|
-
let t =
|
|
2412
|
+
let t = ua(e.content);
|
|
2413
2413
|
t && n.push({
|
|
2414
2414
|
type: "text",
|
|
2415
2415
|
content: t
|
|
@@ -2439,7 +2439,7 @@ function Da(e, t) {
|
|
|
2439
2439
|
..._a(e),
|
|
2440
2440
|
...r !== void 0 && { createdAt: r },
|
|
2441
2441
|
...e.metadata !== void 0 && { metadata: e.metadata }
|
|
2442
|
-
}, o =
|
|
2442
|
+
}, o = X(e)?.uiResources;
|
|
2443
2443
|
return ba(a, Array.isArray(o) ? o.filter(va) : []);
|
|
2444
2444
|
}
|
|
2445
2445
|
function Oa(e) {
|
|
@@ -2455,7 +2455,7 @@ function Oa(e) {
|
|
|
2455
2455
|
parts: ja(e.content)
|
|
2456
2456
|
});
|
|
2457
2457
|
case "assistant": {
|
|
2458
|
-
let n =
|
|
2458
|
+
let n = X(e), r = n?.toolCallMetadata, i = Aa(n?.structuredOutput), a = e.toolCalls?.map((e) => {
|
|
2459
2459
|
let t = typeof r == "object" && r ? r[e.id] : void 0;
|
|
2460
2460
|
return t === void 0 ? e : {
|
|
2461
2461
|
...e,
|
|
@@ -2471,8 +2471,8 @@ function Oa(e) {
|
|
|
2471
2471
|
}, t));
|
|
2472
2472
|
}
|
|
2473
2473
|
case "tool": {
|
|
2474
|
-
e =
|
|
2475
|
-
let n =
|
|
2474
|
+
e = fa(e);
|
|
2475
|
+
let n = pa("createdAt" in e ? e.createdAt : void 0) ?? ha(e);
|
|
2476
2476
|
return ka(e, Da({
|
|
2477
2477
|
role: "tool",
|
|
2478
2478
|
content: e.content,
|
|
@@ -2494,7 +2494,7 @@ function Oa(e) {
|
|
|
2494
2494
|
}] : []
|
|
2495
2495
|
});
|
|
2496
2496
|
case "reasoning": {
|
|
2497
|
-
let n =
|
|
2497
|
+
let n = ca(e), r = typeof e.content == "string" ? e.content : "";
|
|
2498
2498
|
return ka(e, {
|
|
2499
2499
|
id: t,
|
|
2500
2500
|
role: "assistant",
|
|
@@ -2529,7 +2529,7 @@ function ka(e, t) {
|
|
|
2529
2529
|
metadata: a
|
|
2530
2530
|
});
|
|
2531
2531
|
}
|
|
2532
|
-
let o =
|
|
2532
|
+
let o = pa(i.createdAt) ?? (a === void 0 ? void 0 : ha(a));
|
|
2533
2533
|
if (o !== void 0 && !Object.is(o, i.createdAt)) i = {
|
|
2534
2534
|
...i,
|
|
2535
2535
|
createdAt: o
|
|
@@ -2538,7 +2538,7 @@ function ka(e, t) {
|
|
|
2538
2538
|
let { createdAt: e, ...t } = i;
|
|
2539
2539
|
i = t;
|
|
2540
2540
|
}
|
|
2541
|
-
let s =
|
|
2541
|
+
let s = X(a)?.uiResources, c = Array.isArray(s) ? s.filter(va) : [];
|
|
2542
2542
|
return ba(i, c);
|
|
2543
2543
|
}
|
|
2544
2544
|
function Aa(e) {
|
|
@@ -2571,12 +2571,12 @@ function Ma(e, t) {
|
|
|
2571
2571
|
...e,
|
|
2572
2572
|
parts: n,
|
|
2573
2573
|
id: e.id || t(),
|
|
2574
|
-
createdAt:
|
|
2574
|
+
createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
|
|
2575
2575
|
};
|
|
2576
2576
|
}
|
|
2577
2577
|
return {
|
|
2578
2578
|
...Da(e, t()),
|
|
2579
|
-
createdAt:
|
|
2579
|
+
createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
|
|
2580
2580
|
};
|
|
2581
2581
|
}
|
|
2582
2582
|
function Na() {
|
|
@@ -2590,7 +2590,7 @@ function Pa(e) {
|
|
|
2590
2590
|
function Fa(e, t, n, r, i = !1) {
|
|
2591
2591
|
let a = Pa(e) ? e : {}, o = Pa(a.tanstack) ? { ...a.tanstack } : {};
|
|
2592
2592
|
i && delete o.uiResources;
|
|
2593
|
-
let s =
|
|
2593
|
+
let s = pa(t), c = {
|
|
2594
2594
|
...n === void 0 ? {} : { id: n },
|
|
2595
2595
|
...s && { createdAt: s.toISOString() },
|
|
2596
2596
|
...Array.isArray(r) && { content: r }
|
|
@@ -2661,7 +2661,7 @@ function Ia(e, t) {
|
|
|
2661
2661
|
approved: t,
|
|
2662
2662
|
...t && { pendingExecution: !0 },
|
|
2663
2663
|
message: t ? "User approved this action" : "User denied this action"
|
|
2664
|
-
}) :
|
|
2664
|
+
}) : ta(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
|
|
2665
2665
|
n.push({
|
|
2666
2666
|
role: "tool",
|
|
2667
2667
|
id: qa(Ka(e.id), r),
|
|
@@ -2695,9 +2695,9 @@ function La(e, t, n, r, i) {
|
|
|
2695
2695
|
};
|
|
2696
2696
|
}
|
|
2697
2697
|
function Ra(e, t, n) {
|
|
2698
|
-
let r = { ...e.metadata ?? {} }, i =
|
|
2698
|
+
let r = { ...e.metadata ?? {} }, i = X(e), a = {};
|
|
2699
2699
|
i?.model !== void 0 && (a.model = i.model), i?.signature !== void 0 && (a.signature = i.signature);
|
|
2700
|
-
let o =
|
|
2700
|
+
let o = pa(e.createdAt);
|
|
2701
2701
|
o !== void 0 && (a.createdAt = o.toISOString());
|
|
2702
2702
|
let s = za(t, n);
|
|
2703
2703
|
s && (a.structuredOutput = s);
|
|
@@ -2783,19 +2783,19 @@ function Xa(e) {
|
|
|
2783
2783
|
//#endregion
|
|
2784
2784
|
//#region node_modules/@tanstack/ai/dist/esm/utilities/restore-inbound-chunk.js
|
|
2785
2785
|
function Za(e) {
|
|
2786
|
-
if ((e.type ===
|
|
2787
|
-
let t =
|
|
2786
|
+
if ((e.type === ei.RUN_FINISHED || e.type === ei.RUN_ERROR) && (Array.isArray(e.usage) || ni(e.usage))) {
|
|
2787
|
+
let t = ri(e.usage, X(e)?.usage);
|
|
2788
2788
|
t !== void 0 && (e.usage = t);
|
|
2789
2789
|
}
|
|
2790
|
-
if (e.type ===
|
|
2791
|
-
let t =
|
|
2790
|
+
if (e.type === ei.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === ei.TOOL_CALL_END && e.input === void 0) {
|
|
2791
|
+
let t = X(e)?.input;
|
|
2792
2792
|
t !== void 0 && (e.input = t);
|
|
2793
2793
|
}
|
|
2794
2794
|
return e;
|
|
2795
2795
|
}
|
|
2796
2796
|
function Qa(e) {
|
|
2797
2797
|
Za(e);
|
|
2798
|
-
let t =
|
|
2798
|
+
let t = X(e), n = e;
|
|
2799
2799
|
if (t == null) return n;
|
|
2800
2800
|
for (let [e, r] of Object.entries(t)) e !== "usage" && e !== "interruptErrors" && n[e] === void 0 && r !== void 0 && (n[e] = r);
|
|
2801
2801
|
return t.interruptErrors !== void 0 && (n["tanstack:interruptErrors"] = t.interruptErrors), n;
|
|
@@ -3021,7 +3021,7 @@ function po(e) {
|
|
|
3021
3021
|
let t = fo(e.runId);
|
|
3022
3022
|
if (t !== void 0) return t;
|
|
3023
3023
|
}
|
|
3024
|
-
return fo(
|
|
3024
|
+
return fo(X(e)?.runId);
|
|
3025
3025
|
}
|
|
3026
3026
|
//#endregion
|
|
3027
3027
|
//#region node_modules/partial-json/dist/options.js
|
|
@@ -3370,7 +3370,7 @@ function Ao(e) {
|
|
|
3370
3370
|
return e.some((e) => {
|
|
3371
3371
|
let t = e.metadata;
|
|
3372
3372
|
if (!t || typeof t != "object" || Array.isArray(t)) return !1;
|
|
3373
|
-
let n = t[
|
|
3373
|
+
let n = t[zi];
|
|
3374
3374
|
return typeof n == "object" && !!n && !Array.isArray(n) && n.kind === "generic";
|
|
3375
3375
|
});
|
|
3376
3376
|
}
|
|
@@ -3437,7 +3437,7 @@ var jo = class e {
|
|
|
3437
3437
|
console.warn(`[StreamProcessor] Could not find message with tool call ${e}`);
|
|
3438
3438
|
return;
|
|
3439
3439
|
}
|
|
3440
|
-
let i = Co(this.messages, e, t, n ? "error" : void 0, n), a =
|
|
3440
|
+
let i = Co(this.messages, e, t, n ? "error" : void 0, n), a = ta(t), o = n ? "error" : "complete";
|
|
3441
3441
|
i = xo(i, r.id, e, a, o, n), this.messages = i, this.emitMessagesChange();
|
|
3442
3442
|
}
|
|
3443
3443
|
addToolApprovalResponse(e, t) {
|
|
@@ -3457,7 +3457,7 @@ var jo = class e {
|
|
|
3457
3457
|
let t = e.parts.filter((e) => e.type === "tool-call");
|
|
3458
3458
|
if (t.length === 0) return !0;
|
|
3459
3459
|
let n = new Set(e.parts.filter((e) => e.type === "tool-result").map((e) => e.toolCallId));
|
|
3460
|
-
return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) ||
|
|
3460
|
+
return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || ra(e));
|
|
3461
3461
|
}
|
|
3462
3462
|
removeMessagesAfter(e) {
|
|
3463
3463
|
let t = new Set(this.messages.slice(0, e + 1).map((e) => e.id));
|
|
@@ -3618,10 +3618,10 @@ var jo = class e {
|
|
|
3618
3618
|
if (typeof t != "object" || !t || Array.isArray(t)) return;
|
|
3619
3619
|
let n = this.messages.find((t) => t.id === e);
|
|
3620
3620
|
if (!n) return;
|
|
3621
|
-
let r = t, i =
|
|
3621
|
+
let r = t, i = X(r), a = i != null && ("content" in i || "args" in i) ? {
|
|
3622
3622
|
...r,
|
|
3623
3623
|
tanstack: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "content" && e !== "args"))
|
|
3624
|
-
} : r, o =
|
|
3624
|
+
} : r, o = oi(n.metadata, a), s = pa(X(r)?.createdAt), c = s !== void 0;
|
|
3625
3625
|
this.messages = this.messages.map((t) => t.id === e ? {
|
|
3626
3626
|
...t,
|
|
3627
3627
|
...o === void 0 ? {} : { metadata: o },
|
|
@@ -3816,7 +3816,7 @@ var jo = class e {
|
|
|
3816
3816
|
if (!t) return;
|
|
3817
3817
|
let n = this.getMessageState(t);
|
|
3818
3818
|
if (!n) return;
|
|
3819
|
-
let r = e.input === void 0 ?
|
|
3819
|
+
let r = e.input === void 0 ? X(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
|
|
3820
3820
|
if (i && i.state !== "input-complete") {
|
|
3821
3821
|
if (r !== void 0 && !i.arguments) try {
|
|
3822
3822
|
i.arguments = JSON.stringify(r);
|
|
@@ -3838,7 +3838,7 @@ var jo = class e {
|
|
|
3838
3838
|
handleToolCallResultEvent(e) {
|
|
3839
3839
|
let t = this.toolCallToMessage.get(e.toolCallId) ?? this.messages.find((t) => t.parts.some((t) => t.type === "tool-call" && t.id === e.toolCallId))?.id;
|
|
3840
3840
|
if (!t) return;
|
|
3841
|
-
let n = e.state === "output-error" ||
|
|
3841
|
+
let n = e.state === "output-error" || X(e)?.state === "output-error", r;
|
|
3842
3842
|
try {
|
|
3843
3843
|
r = JSON.parse(e.content);
|
|
3844
3844
|
} catch {
|
|
@@ -3853,7 +3853,7 @@ var jo = class e {
|
|
|
3853
3853
|
}
|
|
3854
3854
|
handleRunFinishedEvent(e) {
|
|
3855
3855
|
let t = e;
|
|
3856
|
-
if (this.finishReason = t.finishReason === void 0 ?
|
|
3856
|
+
if (this.finishReason = t.finishReason === void 0 ? X(e)?.finishReason ?? null : t.finishReason, this.activeRuns.delete(e.runId), e.outcome?.type === "interrupt" && this.handleInterrupts(e.outcome.interrupts), this.activeRuns.size === 0) {
|
|
3857
3857
|
if (this.completeAllToolCalls(), this.finishReason === "tool_calls" && e.outcome?.type !== "interrupt") return;
|
|
3858
3858
|
this.isDone = !0, this.finalizeStream();
|
|
3859
3859
|
}
|
|
@@ -3896,7 +3896,7 @@ var jo = class e {
|
|
|
3896
3896
|
let t = po(e);
|
|
3897
3897
|
t ? this.activeRuns.delete(t) : this.activeRuns.clear();
|
|
3898
3898
|
let { messageId: n } = this.ensureAssistantMessage(), r = e.message || "An error occurred";
|
|
3899
|
-
e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Do(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(
|
|
3899
|
+
e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Do(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(ci(e));
|
|
3900
3900
|
}
|
|
3901
3901
|
handleStepStartedEvent(e) {
|
|
3902
3902
|
let t = e.stepName || Na(), n = this.getActiveAssistantMessageId();
|
|
@@ -4379,7 +4379,7 @@ function us(e) {
|
|
|
4379
4379
|
return Qa(e);
|
|
4380
4380
|
}
|
|
4381
4381
|
function ds(e) {
|
|
4382
|
-
let t =
|
|
4382
|
+
let t = X(e)?.model;
|
|
4383
4383
|
if (typeof t == "string") return t;
|
|
4384
4384
|
let n = "usage" in e ? e.usage : void 0;
|
|
4385
4385
|
if (Array.isArray(n)) {
|
|
@@ -4398,7 +4398,7 @@ async function* fs(e, t) {
|
|
|
4398
4398
|
if (o.startsWith(":") || o.startsWith("event:") || o.startsWith("retry:")) continue;
|
|
4399
4399
|
let e = Ro(o);
|
|
4400
4400
|
if (e === "[DONE]") {
|
|
4401
|
-
yield { chunk:
|
|
4401
|
+
yield { chunk: si({
|
|
4402
4402
|
type: No.RUN_FINISHED,
|
|
4403
4403
|
threadId: n ?? t?.threadId ?? "",
|
|
4404
4404
|
runId: r ?? t?.runId ?? "",
|
|
@@ -4588,7 +4588,7 @@ function Ss(e) {
|
|
|
4588
4588
|
try {
|
|
4589
4589
|
let c = e.connect(t, n, r, i);
|
|
4590
4590
|
for await (let e of c) "threadId" in e && typeof e.threadId == "string" && (o = e.threadId), "runId" in e && typeof e.runId == "string" && (l = e.runId), (e.type === "RUN_FINISHED" || e.type === "RUN_ERROR") && (a = !0), s(e, i?.runId);
|
|
4591
|
-
!r?.aborted && !a && s(
|
|
4591
|
+
!r?.aborted && !a && s(si({
|
|
4592
4592
|
type: No.RUN_FINISHED,
|
|
4593
4593
|
threadId: is(o ?? i?.threadId, "threadId"),
|
|
4594
4594
|
runId: is(l ?? i?.runId, "runId"),
|
|
@@ -4720,10 +4720,10 @@ function Ds(e) {
|
|
|
4720
4720
|
return e.resumable;
|
|
4721
4721
|
}
|
|
4722
4722
|
function Os(e, t) {
|
|
4723
|
-
let n =
|
|
4723
|
+
let n = Zi(e.descriptor);
|
|
4724
4724
|
return n ? {
|
|
4725
4725
|
...t,
|
|
4726
|
-
metadata:
|
|
4726
|
+
metadata: Xi(n)
|
|
4727
4727
|
} : t;
|
|
4728
4728
|
}
|
|
4729
4729
|
function ks(e) {
|
|
@@ -4768,16 +4768,16 @@ function Fs(e) {
|
|
|
4768
4768
|
return Ns(e.metadata) || Ps(e.metadata);
|
|
4769
4769
|
}
|
|
4770
4770
|
function Is(e) {
|
|
4771
|
-
return
|
|
4771
|
+
return Wi(e);
|
|
4772
4772
|
}
|
|
4773
4773
|
function Ls(e) {
|
|
4774
4774
|
if (!Ms(e.metadata)) return !1;
|
|
4775
|
-
let t = e.metadata[
|
|
4775
|
+
let t = e.metadata[zi];
|
|
4776
4776
|
return !Ms(t) || t.v !== void 0 && t.v !== 1 ? !1 : t.kind === "generic" || t.kind === "tool-approval" || t.kind === "client-tool-execution" || "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
|
|
4777
4777
|
}
|
|
4778
4778
|
function Rs(e) {
|
|
4779
4779
|
if (!Ms(e.metadata)) return !1;
|
|
4780
|
-
let t = e.metadata[
|
|
4780
|
+
let t = e.metadata[zi];
|
|
4781
4781
|
return !Ms(t) || t.kind !== "generic" ? !1 : "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
|
|
4782
4782
|
}
|
|
4783
4783
|
function zs(e) {
|
|
@@ -4788,14 +4788,14 @@ function Bs(e) {
|
|
|
4788
4788
|
}
|
|
4789
4789
|
function Vs(e) {
|
|
4790
4790
|
if (e.responseSchema !== void 0) try {
|
|
4791
|
-
return
|
|
4791
|
+
return hi(mi(e.responseSchema));
|
|
4792
4792
|
} catch {
|
|
4793
4793
|
return;
|
|
4794
4794
|
}
|
|
4795
4795
|
}
|
|
4796
4796
|
function Hs(e) {
|
|
4797
4797
|
if (e !== void 0) try {
|
|
4798
|
-
return
|
|
4798
|
+
return qi(e);
|
|
4799
4799
|
} catch {
|
|
4800
4800
|
return;
|
|
4801
4801
|
}
|
|
@@ -4808,7 +4808,7 @@ function Ws(e, t, n) {
|
|
|
4808
4808
|
valid: !0,
|
|
4809
4809
|
payload: t
|
|
4810
4810
|
};
|
|
4811
|
-
if (
|
|
4811
|
+
if (xi(e)) {
|
|
4812
4812
|
let r = e["~standard"].validate(t), i = (e) => e.issues ? {
|
|
4813
4813
|
code: n,
|
|
4814
4814
|
message: e.issues[0]?.message ?? "Schema validation failed."
|
|
@@ -4861,7 +4861,7 @@ function Qs(e, t) {
|
|
|
4861
4861
|
}
|
|
4862
4862
|
function $s(e, t, n) {
|
|
4863
4863
|
let r = Vs(e) ?? n?.responseSchemaHash;
|
|
4864
|
-
return
|
|
4864
|
+
return Z({
|
|
4865
4865
|
v: 1,
|
|
4866
4866
|
kind: "generic",
|
|
4867
4867
|
interruptId: e.id,
|
|
@@ -4872,7 +4872,7 @@ function $s(e, t, n) {
|
|
|
4872
4872
|
});
|
|
4873
4873
|
}
|
|
4874
4874
|
function ec(e, t) {
|
|
4875
|
-
let n =
|
|
4875
|
+
let n = Z(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([Z(e.error)]), i = r[0];
|
|
4876
4876
|
return {
|
|
4877
4877
|
id: n.id,
|
|
4878
4878
|
interruptId: n.id,
|
|
@@ -4926,7 +4926,7 @@ var tc = class {
|
|
|
4926
4926
|
threadId: e.threadId,
|
|
4927
4927
|
interruptedRunId: e.interruptedRunId,
|
|
4928
4928
|
generation: e.generation,
|
|
4929
|
-
interrupts:
|
|
4929
|
+
interrupts: Z(e.interrupts)
|
|
4930
4930
|
};
|
|
4931
4931
|
let n = /* @__PURE__ */ new Map();
|
|
4932
4932
|
for (let t of e.interrupts) {
|
|
@@ -4994,7 +4994,7 @@ var tc = class {
|
|
|
4994
4994
|
return n ? (this.resolveItem(n.descriptor.id, { approved: t }), !0) : !1;
|
|
4995
4995
|
}
|
|
4996
4996
|
hydrateInterrupt(e, t, n) {
|
|
4997
|
-
let r =
|
|
4997
|
+
let r = Z(e), i = Is(r), a = i === void 0 && Fs(r);
|
|
4998
4998
|
if (i === void 0 && !a) return Ls(r) ? {
|
|
4999
4999
|
descriptor: r,
|
|
5000
5000
|
binding: $s(r, t, void 0),
|
|
@@ -5027,10 +5027,10 @@ var tc = class {
|
|
|
5027
5027
|
if (s && i.kind === "tool-approval") {
|
|
5028
5028
|
let e = this.tools?.find((e) => e.name === i.toolName);
|
|
5029
5029
|
if (e?.needsApproval === !0 && r.toolCallId === i.toolCallId) try {
|
|
5030
|
-
let t =
|
|
5031
|
-
if (
|
|
5030
|
+
let t = Li(e.approvalSchema, e.inputSchema);
|
|
5031
|
+
if (Ri(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
|
|
5032
5032
|
descriptor: r,
|
|
5033
|
-
binding:
|
|
5033
|
+
binding: Z(i),
|
|
5034
5034
|
kind: "tool-approval",
|
|
5035
5035
|
status: "pending",
|
|
5036
5036
|
canResolve: !0,
|
|
@@ -5042,9 +5042,9 @@ var tc = class {
|
|
|
5042
5042
|
}
|
|
5043
5043
|
if (s && i.kind === "client-tool-execution") {
|
|
5044
5044
|
let e = this.tools?.find((e) => e.name === i.toolName);
|
|
5045
|
-
if (e !== void 0 && r.toolCallId === i.toolCallId &&
|
|
5045
|
+
if (e !== void 0 && r.toolCallId === i.toolCallId && Ri(e.outputSchema) === i.outputSchemaHash) return {
|
|
5046
5046
|
descriptor: r,
|
|
5047
|
-
binding:
|
|
5047
|
+
binding: Z(i),
|
|
5048
5048
|
kind: "client-tool-execution",
|
|
5049
5049
|
status: "pending",
|
|
5050
5050
|
canResolve: !0,
|
|
@@ -5055,7 +5055,7 @@ var tc = class {
|
|
|
5055
5055
|
}
|
|
5056
5056
|
if (i !== void 0 && i.kind === "generic" && i.definitionId !== void 0 && i.key !== void 0 && i.batchIndex !== void 0 && i.key.length > 0 && n.get(i.batchIndex) !== 1) return {
|
|
5057
5057
|
descriptor: r,
|
|
5058
|
-
binding:
|
|
5058
|
+
binding: Z(i),
|
|
5059
5059
|
kind: "generic",
|
|
5060
5060
|
status: "error",
|
|
5061
5061
|
canResolve: !1,
|
|
@@ -5069,13 +5069,13 @@ var tc = class {
|
|
|
5069
5069
|
let t = zs(r);
|
|
5070
5070
|
return {
|
|
5071
5071
|
descriptor: r,
|
|
5072
|
-
binding:
|
|
5072
|
+
binding: Z(i),
|
|
5073
5073
|
definition: e,
|
|
5074
5074
|
kind: "generic",
|
|
5075
5075
|
status: "pending",
|
|
5076
5076
|
canResolve: !0,
|
|
5077
5077
|
resumable: !0,
|
|
5078
|
-
...t === void 0 ? {} : { payload:
|
|
5078
|
+
...t === void 0 ? {} : { payload: Z(t) },
|
|
5079
5079
|
validationGeneration: 0
|
|
5080
5080
|
};
|
|
5081
5081
|
}
|
|
@@ -5103,13 +5103,13 @@ var tc = class {
|
|
|
5103
5103
|
return Object.freeze(e);
|
|
5104
5104
|
}
|
|
5105
5105
|
if (n.kind === "tool-approval" && n.binding.kind === "tool-approval") {
|
|
5106
|
-
let t =
|
|
5106
|
+
let t = Z(n.binding), i = {
|
|
5107
5107
|
...r,
|
|
5108
5108
|
kind: "tool-approval",
|
|
5109
5109
|
binding: t,
|
|
5110
5110
|
toolName: n.binding.toolName,
|
|
5111
5111
|
toolCallId: n.binding.toolCallId,
|
|
5112
|
-
originalArgs:
|
|
5112
|
+
originalArgs: Z(n.binding.originalArgs),
|
|
5113
5113
|
cancel: () => this.cancelItem(n.descriptor.id, e),
|
|
5114
5114
|
clearResolution: () => this.clearItem(n.descriptor.id, e),
|
|
5115
5115
|
resolveInterrupt: (t, r) => {
|
|
@@ -5123,7 +5123,7 @@ var tc = class {
|
|
|
5123
5123
|
};
|
|
5124
5124
|
return Object.freeze(i);
|
|
5125
5125
|
}
|
|
5126
|
-
let i = n.binding.kind === "generic" ?
|
|
5126
|
+
let i = n.binding.kind === "generic" ? Z(n.binding) : Z({
|
|
5127
5127
|
v: 1,
|
|
5128
5128
|
kind: "generic",
|
|
5129
5129
|
interruptId: n.descriptor.id,
|
|
@@ -5211,7 +5211,7 @@ var tc = class {
|
|
|
5211
5211
|
maybeSubmit() {
|
|
5212
5212
|
let e = this.items.some((e) => e.kind === "generic"), t = this.items.filter((t) => Ds(t) && !(e && t.kind === "client-tool-execution"));
|
|
5213
5213
|
if (t.length === 0 || t.some((e) => e.resolution === void 0 || e.status !== "staged")) return;
|
|
5214
|
-
let n = this.requireHydration(), r =
|
|
5214
|
+
let n = this.requireHydration(), r = _i(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
|
|
5215
5215
|
threadId: n.threadId,
|
|
5216
5216
|
interruptedRunId: n.interruptedRunId,
|
|
5217
5217
|
generation: n.generation,
|
|
@@ -5238,7 +5238,7 @@ var tc = class {
|
|
|
5238
5238
|
})])), n || this.publish();
|
|
5239
5239
|
return;
|
|
5240
5240
|
}
|
|
5241
|
-
e.resolution =
|
|
5241
|
+
e.resolution = Z(Os(e, {
|
|
5242
5242
|
interruptId: e.descriptor.id,
|
|
5243
5243
|
status: "resolved",
|
|
5244
5244
|
payload: t.payload
|
|
@@ -5306,7 +5306,7 @@ var tc = class {
|
|
|
5306
5306
|
return;
|
|
5307
5307
|
}
|
|
5308
5308
|
this.invalidateRetry();
|
|
5309
|
-
for (let n of t) n.validationGeneration++, n.resolution =
|
|
5309
|
+
for (let n of t) n.validationGeneration++, n.resolution = Z({
|
|
5310
5310
|
interruptId: n.descriptor.id,
|
|
5311
5311
|
status: "resolved",
|
|
5312
5312
|
payload: { approved: e }
|
|
@@ -5397,8 +5397,8 @@ var tc = class {
|
|
|
5397
5397
|
let i = !1, a = !1, o = [];
|
|
5398
5398
|
for (let e of r) if ((e.code === "stale" || e.code === "expired" || e.code === "conflict") && (i = !0), a ||= e.retryable, e.scope === "item") {
|
|
5399
5399
|
let t = this.items.find((t) => Ds(t) && t.descriptor.id === e.interruptId);
|
|
5400
|
-
t && (t.status = "error", t.error =
|
|
5401
|
-
} else o.push(
|
|
5400
|
+
t && (t.status = "error", t.error = Z(e));
|
|
5401
|
+
} else o.push(Z(e));
|
|
5402
5402
|
let s = Zs(this.rootErrors, this.submissionRootErrors, o);
|
|
5403
5403
|
this.rootErrors = s.rootErrors, this.submissionRootErrors = s.submissionRootErrors;
|
|
5404
5404
|
for (let e of this.items) Ds(e) && e.status === "submitting" && (e.status = "error");
|
|
@@ -5885,7 +5885,7 @@ function Sc(e) {
|
|
|
5885
5885
|
function Cc(e) {
|
|
5886
5886
|
if (e.type !== "RUN_FINISHED" || e.outcome?.type === "interrupt") return !1;
|
|
5887
5887
|
let t = e;
|
|
5888
|
-
return t.finishReason === void 0 ?
|
|
5888
|
+
return t.finishReason === void 0 ? X(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
|
|
5889
5889
|
}
|
|
5890
5890
|
function wc(e) {
|
|
5891
5891
|
let t = {
|
|
@@ -5933,7 +5933,7 @@ function Tc(e) {
|
|
|
5933
5933
|
typeof t.content.content == "string" ? r.push({
|
|
5934
5934
|
type: "text",
|
|
5935
5935
|
content: t.content.content
|
|
5936
|
-
}) : r.push(...t.content.content), i =
|
|
5936
|
+
}) : r.push(...t.content.content), i = oi(i, t.content.metadata);
|
|
5937
5937
|
}
|
|
5938
5938
|
return {
|
|
5939
5939
|
content: {
|
|
@@ -6514,7 +6514,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
|
|
|
6514
6514
|
}
|
|
6515
6515
|
async processIncomingChunk(e, t) {
|
|
6516
6516
|
if (e = Qa(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
|
|
6517
|
-
let t =
|
|
6517
|
+
let t = X(e)?.interruptErrors;
|
|
6518
6518
|
this.interruptSubmissionFailure = { errors: Array.isArray(t) ? t : [] };
|
|
6519
6519
|
}
|
|
6520
6520
|
if (this.connectionStatus === "connecting" && this.setConnectionStatus("connected"), this.clearedStreamTracker.shouldIgnoreChunk(e)) {
|
|
@@ -6524,7 +6524,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
|
|
|
6524
6524
|
this.callbacksRef.current.onChunk(e), this.devtoolsBridge.observeChunk(e), this.processor.processChunk(e), this.updateRunLifecycle(e), this.observeInterruptState(e), t?.defer !== !1 && (typeof document > "u" || !document.hidden) && await new Promise((e) => setTimeout(e, 0)), this.resolveJoinedRun(e);
|
|
6525
6525
|
}
|
|
6526
6526
|
isActiveInterruptSubmissionFailure(e) {
|
|
6527
|
-
let t = this.activeInterruptSubmission, n =
|
|
6527
|
+
let t = this.activeInterruptSubmission, n = X(e)?.interruptErrors;
|
|
6528
6528
|
if (!t || !Array.isArray(n) || n.length === 0) return !1;
|
|
6529
6529
|
let r = Yo(e);
|
|
6530
6530
|
return r !== void 0 && r !== this.currentRunId || typeof e.threadId == "string" && e.threadId !== t.threadId ? !1 : n.every((e) => typeof e != "object" || !e || typeof e.threadId != "string" || typeof e.interruptedRunId != "string" || typeof e.generation != "number" ? !1 : e.threadId === t.threadId && e.interruptedRunId === t.interruptedRunId && e.generation === t.generation);
|
|
@@ -6685,7 +6685,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
|
|
|
6685
6685
|
clientTools: Array.from(u.values()).map((e) => ({
|
|
6686
6686
|
name: e.name,
|
|
6687
6687
|
description: e.description,
|
|
6688
|
-
parameters: e.inputSchema ?
|
|
6688
|
+
parameters: e.inputSchema ? Ei(e.inputSchema) : { type: "object" }
|
|
6689
6689
|
})),
|
|
6690
6690
|
forwardedProps: { ...f },
|
|
6691
6691
|
...r ? { resume: r } : {},
|
|
@@ -6759,7 +6759,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
|
|
|
6759
6759
|
}
|
|
6760
6760
|
}
|
|
6761
6761
|
validateClientToolOutput(e, t) {
|
|
6762
|
-
return e.outputSchema &&
|
|
6762
|
+
return e.outputSchema && xi(e.outputSchema) ? Oi(e.outputSchema, t) : t;
|
|
6763
6763
|
}
|
|
6764
6764
|
async addToolApprovalResponse(e) {
|
|
6765
6765
|
if (this.processor.addToolApprovalResponse(e.id, e.approved), this.devtoolsBridge.emitSnapshot(), this.interruptManager.resolveToolApprovalDecision(e.id, e.approved)) return;
|
|
@@ -7056,8 +7056,8 @@ var Rc = class {
|
|
|
7056
7056
|
let e = this.options.getTools ? Array.from(this.options.getTools()).map((e) => ({
|
|
7057
7057
|
name: e.name,
|
|
7058
7058
|
description: e.description,
|
|
7059
|
-
inputSchema: e.inputSchema ?
|
|
7060
|
-
outputSchema: e.outputSchema ?
|
|
7059
|
+
inputSchema: e.inputSchema ? Ei(e.inputSchema) : { type: "object" },
|
|
7060
|
+
outputSchema: e.outputSchema ? Ei(e.outputSchema) : void 0,
|
|
7061
7061
|
needsApproval: e.needsApproval,
|
|
7062
7062
|
metadata: e.metadata
|
|
7063
7063
|
})) : [];
|
|
@@ -7792,14 +7792,14 @@ function $c(e) {
|
|
|
7792
7792
|
}
|
|
7793
7793
|
async function el(e, t) {
|
|
7794
7794
|
let n = new Headers(t?.headers ?? {});
|
|
7795
|
-
for (let [e, t] of Object.entries(await
|
|
7795
|
+
for (let [e, t] of Object.entries(await U())) n.set(e, t);
|
|
7796
7796
|
return n.set("X-Cui-Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone), fetch(e, {
|
|
7797
7797
|
...t,
|
|
7798
7798
|
headers: n
|
|
7799
7799
|
});
|
|
7800
7800
|
}
|
|
7801
7801
|
function tl() {
|
|
7802
|
-
return `${(
|
|
7802
|
+
return `${(me().target.value?.endpoint.url ?? window.location.origin).replace(/\/+$/, "")}/api/assistant/chat`;
|
|
7803
7803
|
}
|
|
7804
7804
|
function nl(e, t) {
|
|
7805
7805
|
try {
|
|
@@ -7836,7 +7836,7 @@ async function rl(e, t, n, r) {
|
|
|
7836
7836
|
}
|
|
7837
7837
|
case "open_camview": return nl(e, "/camview");
|
|
7838
7838
|
case "open_page": {
|
|
7839
|
-
let t =
|
|
7839
|
+
let t = be[String(r.page ?? "")];
|
|
7840
7840
|
return t ? nl(e, t.path) : {
|
|
7841
7841
|
ok: !1,
|
|
7842
7842
|
message: "unknown page"
|
|
@@ -7878,12 +7878,12 @@ async function rl(e, t, n, r) {
|
|
|
7878
7878
|
}
|
|
7879
7879
|
}
|
|
7880
7880
|
function il(e) {
|
|
7881
|
-
let t =
|
|
7881
|
+
let t = z(), n = lt(), r = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => uo({
|
|
7882
7882
|
name: e.name,
|
|
7883
7883
|
description: e.description,
|
|
7884
7884
|
inputSchema: e.inputSchema,
|
|
7885
7885
|
needsApproval: !0
|
|
7886
|
-
})), ...
|
|
7886
|
+
})), ...Se.map((e) => uo({
|
|
7887
7887
|
name: e.name,
|
|
7888
7888
|
description: e.description,
|
|
7889
7889
|
inputSchema: e.inputSchema
|
|
@@ -7906,13 +7906,13 @@ function il(e) {
|
|
|
7906
7906
|
connection: {
|
|
7907
7907
|
...ws(tl, { fetchClient: el }),
|
|
7908
7908
|
hydrate: async (e) => {
|
|
7909
|
-
let t = await
|
|
7909
|
+
let t = await Re(e);
|
|
7910
7910
|
return p(t.attachments), t;
|
|
7911
7911
|
}
|
|
7912
7912
|
},
|
|
7913
7913
|
persistence: !0,
|
|
7914
7914
|
tools: r,
|
|
7915
|
-
interrupts: [
|
|
7915
|
+
interrupts: [xe],
|
|
7916
7916
|
queue: {
|
|
7917
7917
|
whenBusy: "queue",
|
|
7918
7918
|
maxSize: 5
|
|
@@ -7985,12 +7985,12 @@ function il(e) {
|
|
|
7985
7985
|
}
|
|
7986
7986
|
function S() {
|
|
7987
7987
|
let e = m.runId.value;
|
|
7988
|
-
e &&
|
|
7988
|
+
e && He(e).catch(() => void 0), m.stop();
|
|
7989
7989
|
let t = m.messages.value.at(-1);
|
|
7990
7990
|
d.value = t?.role === "assistant" ? t.id : null;
|
|
7991
7991
|
}
|
|
7992
7992
|
async function C() {
|
|
7993
|
-
await b(
|
|
7993
|
+
await b(Kn);
|
|
7994
7994
|
}
|
|
7995
7995
|
function w(e, t) {
|
|
7996
7996
|
p(t), m.setMessages(e);
|
|
@@ -8074,12 +8074,13 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8074
8074
|
}, eu = {
|
|
8075
8075
|
key: 1,
|
|
8076
8076
|
class: "flex max-h-64 flex-col overflow-y-auto"
|
|
8077
|
-
}, tu = { class: "min-w-0 flex-1 leading-snug" }, nu = /*#__PURE__*/
|
|
8077
|
+
}, tu = { class: "min-w-0 flex-1 leading-snug" }, nu = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
8078
8078
|
__name: "CuiAssistantConversation",
|
|
8079
8079
|
props: {
|
|
8080
8080
|
threadId: {},
|
|
8081
8081
|
initialMessages: {},
|
|
8082
8082
|
initialAttachments: {},
|
|
8083
|
+
initialModelId: {},
|
|
8083
8084
|
initialPrompt: { default: void 0 },
|
|
8084
8085
|
suggestions: { default: () => [] },
|
|
8085
8086
|
approvalTools: { default: () => [] },
|
|
@@ -8095,22 +8096,22 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8095
8096
|
"emptied"
|
|
8096
8097
|
],
|
|
8097
8098
|
setup(e, { expose: a, emit: s }) {
|
|
8098
|
-
let u = new
|
|
8099
|
+
let u = new Y(), d = e, f = s, { t: y, locale: S } = we(), O = H(), { data: k } = u.listProfilesQuery(), A = u.createProfileMutation(), N = u.patchProfileMutation(), F = u.deleteProfileMutation(), { data: I, refetch: L } = u.memoryQuery(), R = u.deleteMemoryFactMutation(), z = u.deleteMemoryMutation(), { data: B } = u.getAssistantInfoQuery(), V = w("scrollRef"), ie = w("contentRef"), U = w("composerRef"), oe = w("toolsPopover"), se = w("memoryPopover"), W = j(!0), G = j([]), le = j(""), K = j(null), ue = j(!1), q = j(""), fe = j(d.initialModelId ?? null), J = il({
|
|
8099
8100
|
threadId: _(() => d.threadId),
|
|
8100
8101
|
initialMessages: d.initialMessages,
|
|
8101
8102
|
initialAttachments: d.initialAttachments,
|
|
8102
8103
|
language: S,
|
|
8103
|
-
disabledGroups:
|
|
8104
|
-
instructions:
|
|
8105
|
-
modelId:
|
|
8104
|
+
disabledGroups: G,
|
|
8105
|
+
instructions: le,
|
|
8106
|
+
modelId: fe,
|
|
8106
8107
|
approvalTools: d.approvalTools,
|
|
8107
8108
|
onFinish: () => f("finished"),
|
|
8108
|
-
onError:
|
|
8109
|
-
}),
|
|
8110
|
-
let e =
|
|
8109
|
+
onError: ot
|
|
8110
|
+
}), pe = _(() => J.messages.value.length === 0), me = _(() => B.value?.settings.models ?? []), he = _(() => B.value ? Ze(B.value.settings) : void 0), ge = _(() => me.value.find((e) => e._id === fe.value) ?? he.value), ye = _(() => ge.value?.capabilities?.vision === !1 ? ge.value.name : void 0), be = _(() => J.busy.value && !J.approvals.value.length && !J.questions.value.length && !J.pausedElsewhere.value), xe = _(() => be.value && J.messages.value.at(-1)?.role !== "assistant"), Se = _(() => {
|
|
8111
|
+
let e = J.messages.value, t = [];
|
|
8111
8112
|
return e.forEach((n, r) => {
|
|
8112
|
-
if (
|
|
8113
|
-
let i = n.role === "assistant" &&
|
|
8113
|
+
if (Jn(n)) return;
|
|
8114
|
+
let i = n.role === "assistant" && Jn(e[r - 1]), a = t[t.length - 1];
|
|
8114
8115
|
if (n.role === "assistant" && !i && a?.message.role === "assistant" && !a.continuation && a.lastIndex === r - 1) {
|
|
8115
8116
|
a.message = {
|
|
8116
8117
|
...a.message,
|
|
@@ -8126,7 +8127,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8126
8127
|
continuation: i
|
|
8127
8128
|
});
|
|
8128
8129
|
}), t;
|
|
8129
|
-
}),
|
|
8130
|
+
}), Ce = _(() => {
|
|
8130
8131
|
let e = /* @__PURE__ */ new Map();
|
|
8131
8132
|
for (let t of d.tools) {
|
|
8132
8133
|
let n = t.group === "core" ? y("views.assistant.tool_group_core") : t.group === "docs" ? y("views.assistant.tool_group_docs") : t.group === "terminal" ? y("views.assistant.tool_group_terminal") : t.source.kind === "plugin" ? t.source.pluginName : t.source.kind === "external" ? t.source.serverName : t.group, r = e.get(t.group) ?? {
|
|
@@ -8138,98 +8139,98 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8138
8139
|
}
|
|
8139
8140
|
let t = (e) => e === "core" ? 0 : e === "docs" ? 1 : e.startsWith("plugin:") ? 2 : 3;
|
|
8140
8141
|
return Array.from(e.values()).sort((e, n) => t(e.id) - t(n.id) || e.label.localeCompare(n.label));
|
|
8141
|
-
}),
|
|
8142
|
-
get: () =>
|
|
8142
|
+
}), Ee = _({
|
|
8143
|
+
get: () => Ce.value.filter((e) => !G.value.includes(e.id)).map((e) => e.id),
|
|
8143
8144
|
set: (e) => {
|
|
8144
|
-
|
|
8145
|
+
G.value = Ce.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
|
|
8145
8146
|
}
|
|
8146
|
-
}),
|
|
8147
|
+
}), De = _(() => {
|
|
8147
8148
|
let e = (/* @__PURE__ */ new Date()).getHours();
|
|
8148
8149
|
return y(e < 5 ? "views.assistant.greeting_night" : e < 11 ? "views.assistant.greeting_morning" : e < 18 ? "views.assistant.greeting_day" : "views.assistant.greeting_evening");
|
|
8149
8150
|
});
|
|
8150
|
-
function
|
|
8151
|
-
for (let t of e.ids) if (
|
|
8151
|
+
function ke(e) {
|
|
8152
|
+
for (let t of e.ids) if (J.usage.value[t]) return J.usage.value[t];
|
|
8152
8153
|
}
|
|
8153
|
-
function
|
|
8154
|
-
let e =
|
|
8155
|
-
e && (
|
|
8154
|
+
function Ae() {
|
|
8155
|
+
let e = V.value;
|
|
8156
|
+
e && (W.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120);
|
|
8156
8157
|
}
|
|
8157
|
-
function
|
|
8158
|
-
|
|
8158
|
+
function Le() {
|
|
8159
|
+
W.value = !0, Re();
|
|
8159
8160
|
}
|
|
8160
|
-
function
|
|
8161
|
-
let e =
|
|
8161
|
+
function Re() {
|
|
8162
|
+
let e = V.value;
|
|
8162
8163
|
e && (e.scrollTop = e.scrollHeight);
|
|
8163
8164
|
}
|
|
8165
|
+
function He(e) {
|
|
8166
|
+
se.value?.toggle(e), L();
|
|
8167
|
+
}
|
|
8164
8168
|
function Ue(e) {
|
|
8165
|
-
|
|
8169
|
+
let t = k.value?.find((t) => t._id === e);
|
|
8170
|
+
t && (G.value = [...t.disabledGroups], le.value = t.instructions, fe.value = me.value.some((e) => e._id === t.modelId) ? t.modelId : null);
|
|
8166
8171
|
}
|
|
8167
8172
|
function We(e) {
|
|
8168
|
-
|
|
8169
|
-
t && (H.value = [...t.disabledGroups], U.value = t.instructions, G.value = q.value.some((e) => e._id === t.modelId) ? t.modelId : null);
|
|
8173
|
+
return me.value.find((t) => t._id === e.modelId) ?? he.value;
|
|
8170
8174
|
}
|
|
8171
8175
|
function Ge(e) {
|
|
8172
|
-
return
|
|
8173
|
-
}
|
|
8174
|
-
function Ke(e) {
|
|
8175
|
-
return e ? Ye(e).filter((e) => e.severity !== "success") : [];
|
|
8176
|
+
return e ? Je(e).filter((e) => e.severity !== "success") : [];
|
|
8176
8177
|
}
|
|
8177
|
-
async function
|
|
8178
|
-
let e =
|
|
8178
|
+
async function qe() {
|
|
8179
|
+
let e = q.value.trim();
|
|
8179
8180
|
if (!e) return;
|
|
8180
8181
|
let t = await A.mutateAsync({
|
|
8181
8182
|
name: e,
|
|
8182
|
-
modelId:
|
|
8183
|
-
disabledGroups: [...
|
|
8184
|
-
instructions:
|
|
8183
|
+
modelId: ge.value?._id ?? "",
|
|
8184
|
+
disabledGroups: [...G.value],
|
|
8185
|
+
instructions: le.value.trim()
|
|
8185
8186
|
});
|
|
8186
|
-
|
|
8187
|
+
K.value = t._id, ue.value = !1, q.value = "";
|
|
8187
8188
|
}
|
|
8188
|
-
async function
|
|
8189
|
-
|
|
8190
|
-
profileId:
|
|
8189
|
+
async function Ye() {
|
|
8190
|
+
K.value && await N.mutateAsync({
|
|
8191
|
+
profileId: K.value,
|
|
8191
8192
|
patch: {
|
|
8192
|
-
modelId:
|
|
8193
|
-
disabledGroups: [...
|
|
8194
|
-
instructions:
|
|
8193
|
+
modelId: ge.value?._id ?? "",
|
|
8194
|
+
disabledGroups: [...G.value],
|
|
8195
|
+
instructions: le.value.trim()
|
|
8195
8196
|
}
|
|
8196
8197
|
});
|
|
8197
8198
|
}
|
|
8198
|
-
async function
|
|
8199
|
-
|
|
8199
|
+
async function Xe() {
|
|
8200
|
+
K.value &&= (await F.mutateAsync(K.value), null);
|
|
8200
8201
|
}
|
|
8201
|
-
function
|
|
8202
|
-
for (let e of [
|
|
8202
|
+
function Qe() {
|
|
8203
|
+
for (let e of [oe.value, se.value]) e?.visible && e.alignOverlay();
|
|
8203
8204
|
}
|
|
8204
|
-
function
|
|
8205
|
-
let t =
|
|
8206
|
-
for (; n < t.length && (t[n].role !== "user" ||
|
|
8205
|
+
function $e(e) {
|
|
8206
|
+
let t = J.messages.value, n = e + 1;
|
|
8207
|
+
for (; n < t.length && (t[n].role !== "user" || Jn(t[n]));) n++;
|
|
8207
8208
|
return n;
|
|
8208
8209
|
}
|
|
8209
|
-
function
|
|
8210
|
-
let t =
|
|
8211
|
-
for (; n > 0 && (t[n].role !== "user" ||
|
|
8210
|
+
function et(e) {
|
|
8211
|
+
let t = J.messages.value, n = e;
|
|
8212
|
+
for (; n > 0 && (t[n].role !== "user" || Jn(t[n]));) n--;
|
|
8212
8213
|
return n;
|
|
8213
8214
|
}
|
|
8214
|
-
async function
|
|
8215
|
-
|
|
8215
|
+
async function tt(e) {
|
|
8216
|
+
W.value = !0, J.setMessages(J.messages.value.slice(0, e)), await J.reload();
|
|
8216
8217
|
}
|
|
8217
|
-
async function
|
|
8218
|
-
|
|
8219
|
-
let n =
|
|
8220
|
-
|
|
8218
|
+
async function nt(e, t) {
|
|
8219
|
+
W.value = !0;
|
|
8220
|
+
let n = J.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
|
|
8221
|
+
J.setMessages(J.messages.value.slice(0, e)), n.length ? await J.sendMessage({ content: [{
|
|
8221
8222
|
type: "text",
|
|
8222
8223
|
content: t
|
|
8223
|
-
}, ...n] }) : await
|
|
8224
|
+
}, ...n] }) : await J.sendMessage(t);
|
|
8224
8225
|
}
|
|
8225
|
-
async function
|
|
8226
|
-
let t =
|
|
8227
|
-
if (
|
|
8226
|
+
async function rt(e) {
|
|
8227
|
+
let t = J.messages.value, n = [...t.slice(0, et(e)), ...t.slice($e(e))];
|
|
8228
|
+
if (J.setMessages(n), !n.length) {
|
|
8228
8229
|
f("emptied");
|
|
8229
8230
|
return;
|
|
8230
8231
|
}
|
|
8231
8232
|
try {
|
|
8232
|
-
await
|
|
8233
|
+
await Ve(d.threadId, n);
|
|
8233
8234
|
} catch (e) {
|
|
8234
8235
|
e?.response?.status !== 404 && O.add({
|
|
8235
8236
|
severity: "error",
|
|
@@ -8238,9 +8239,9 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8238
8239
|
});
|
|
8239
8240
|
}
|
|
8240
8241
|
}
|
|
8241
|
-
async function
|
|
8242
|
+
async function it(e) {
|
|
8242
8243
|
try {
|
|
8243
|
-
let t = await
|
|
8244
|
+
let t = await Be(d.threadId, $e(e) - 1);
|
|
8244
8245
|
f("branched", t);
|
|
8245
8246
|
} catch (e) {
|
|
8246
8247
|
O.add({
|
|
@@ -8250,9 +8251,9 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8250
8251
|
});
|
|
8251
8252
|
}
|
|
8252
8253
|
}
|
|
8253
|
-
async function
|
|
8254
|
-
if (
|
|
8255
|
-
await
|
|
8254
|
+
async function at(e) {
|
|
8255
|
+
if (W.value = !0, !e.attachments.length) {
|
|
8256
|
+
await J.sendMessage(e.text);
|
|
8256
8257
|
return;
|
|
8257
8258
|
}
|
|
8258
8259
|
let t = e.text ? [{
|
|
@@ -8267,11 +8268,11 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8267
8268
|
mimeType: n.mimeType
|
|
8268
8269
|
}
|
|
8269
8270
|
});
|
|
8270
|
-
await
|
|
8271
|
+
await J.sendMessage({ content: t });
|
|
8271
8272
|
}
|
|
8272
|
-
function
|
|
8273
|
+
function ot(e) {
|
|
8273
8274
|
if (e.message.includes("status: 409")) {
|
|
8274
|
-
|
|
8275
|
+
st();
|
|
8275
8276
|
return;
|
|
8276
8277
|
}
|
|
8277
8278
|
O.add({
|
|
@@ -8280,85 +8281,85 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8280
8281
|
life: 5e3
|
|
8281
8282
|
});
|
|
8282
8283
|
}
|
|
8283
|
-
async function
|
|
8284
|
-
let e = await
|
|
8285
|
-
e && (
|
|
8284
|
+
async function st() {
|
|
8285
|
+
let e = await ze(d.threadId).catch(() => void 0);
|
|
8286
|
+
e && (J.replaceFromStore(e.messages, e.attachments), O.add({
|
|
8286
8287
|
severity: "info",
|
|
8287
8288
|
detail: y("views.assistant.thread_reloaded"),
|
|
8288
8289
|
life: 5e3
|
|
8289
8290
|
}));
|
|
8290
8291
|
}
|
|
8291
|
-
function
|
|
8292
|
-
return !
|
|
8292
|
+
function ct(e) {
|
|
8293
|
+
return !J.busy.value && (J.replaceFromStore(e.messages, e.attachments), !0);
|
|
8293
8294
|
}
|
|
8294
|
-
return b(() =>
|
|
8295
|
-
|
|
8296
|
-
}, { deep: !0 }), b(() =>
|
|
8297
|
-
e <= t || (
|
|
8298
|
-
}), b(
|
|
8299
|
-
await c(),
|
|
8300
|
-
}),
|
|
8295
|
+
return b(() => J.messages.value, async () => {
|
|
8296
|
+
W.value && (await c(), Re());
|
|
8297
|
+
}, { deep: !0 }), b(() => J.approvals.value.length + J.questions.value.length, async (e, t) => {
|
|
8298
|
+
e <= t || (W.value = !0, await c(), Re());
|
|
8299
|
+
}), b(pe, async () => {
|
|
8300
|
+
await c(), U.value?.focus();
|
|
8301
|
+
}), ve(window, "scroll", Qe, {
|
|
8301
8302
|
capture: !0,
|
|
8302
8303
|
passive: !0
|
|
8303
|
-
}),
|
|
8304
|
-
|
|
8304
|
+
}), _e([V, ie], () => {
|
|
8305
|
+
W.value && Re();
|
|
8305
8306
|
}), ee(async () => {
|
|
8306
|
-
await c(),
|
|
8307
|
+
await c(), Re(), U.value?.focus(), d.initialPrompt && await at({
|
|
8307
8308
|
text: d.initialPrompt,
|
|
8308
8309
|
attachments: []
|
|
8309
8310
|
});
|
|
8310
|
-
}), a({ refreshFromStore:
|
|
8311
|
-
let c =
|
|
8311
|
+
}), a({ refreshFromStore: ct }), (a, s) => {
|
|
8312
|
+
let c = Te, u = Qt, d = Qr, f = Oe, _ = Ke, y = Yr, b = Er, S = Nt, w = wt, O = ne, j = Ie, ee = Me, L = Fe, B = Pe, H = P, _e = Ne, ve = ft, we = re, Re = ae, ze = de, Be = je, Ve = ce, Y = te;
|
|
8312
8313
|
return i(), x("div", al, [
|
|
8313
8314
|
T("div", {
|
|
8314
8315
|
ref_key: "scrollRef",
|
|
8315
|
-
ref:
|
|
8316
|
-
class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(
|
|
8317
|
-
onScrollPassive:
|
|
8318
|
-
}, [g(
|
|
8319
|
-
T("div", sl, [T("div", cl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", ll, [D(o(g(
|
|
8320
|
-
g(
|
|
8316
|
+
ref: V,
|
|
8317
|
+
class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(pe) }]),
|
|
8318
|
+
onScrollPassive: Ae
|
|
8319
|
+
}, [g(pe) ? (i(), x("div", ol, [
|
|
8320
|
+
T("div", sl, [T("div", cl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", ll, [D(o(g(De)) + " ", 1), T("span", ul, o(a.$t("views.assistant.greeting_sub")), 1)])]),
|
|
8321
|
+
g(ge)?.capabilities?.toolCalling === !1 ? (i(), p(u, {
|
|
8321
8322
|
key: 0,
|
|
8322
8323
|
class: "mb-4",
|
|
8323
|
-
title: a.$t("views.assistant.notice_tools_title", { model: g(
|
|
8324
|
+
title: a.$t("views.assistant.notice_tools_title", { model: g(ge).name }),
|
|
8324
8325
|
text: a.$t("views.assistant.notice_tools_text")
|
|
8325
8326
|
}, null, 8, ["title", "text"])) : m("", !0),
|
|
8326
8327
|
M(y, {
|
|
8327
8328
|
ref_key: "composerRef",
|
|
8328
|
-
ref:
|
|
8329
|
-
busy: g(
|
|
8330
|
-
"vision-missing": g(
|
|
8329
|
+
ref: U,
|
|
8330
|
+
busy: g(J).busy.value,
|
|
8331
|
+
"vision-missing": g(ye),
|
|
8331
8332
|
compact: e.compact,
|
|
8332
8333
|
placeholder: a.$t("views.assistant.composer_placeholder"),
|
|
8333
|
-
onSend:
|
|
8334
|
-
onStop: s[2] ||= (e) => g(
|
|
8334
|
+
onSend: at,
|
|
8335
|
+
onStop: s[2] ||= (e) => g(J).stop()
|
|
8335
8336
|
}, {
|
|
8336
8337
|
tools: v(() => [T("span", dl, [E((i(), p(f, {
|
|
8337
8338
|
type: "button",
|
|
8338
8339
|
severity: "secondary",
|
|
8339
8340
|
text: "",
|
|
8340
8341
|
rounded: "",
|
|
8341
|
-
disabled: g(
|
|
8342
|
-
onClick: s[0] ||= (e) => g(
|
|
8342
|
+
disabled: g(J).busy.value,
|
|
8343
|
+
onClick: s[0] ||= (e) => g(oe)?.toggle(e)
|
|
8343
8344
|
}, {
|
|
8344
8345
|
icon: v(() => [M(d, { class: "w-4 h-4" })]),
|
|
8345
8346
|
_: 1
|
|
8346
8347
|
}, 8, ["disabled"])), [[
|
|
8347
|
-
|
|
8348
|
+
Y,
|
|
8348
8349
|
{ value: a.$t("views.assistant.tools_title") },
|
|
8349
8350
|
void 0,
|
|
8350
8351
|
{ top: !0 }
|
|
8351
|
-
]]), g(
|
|
8352
|
+
]]), g(G).length ? (i(), x("span", fl, o(g(Ee).length), 1)) : m("", !0)]), T("span", pl, [E((i(), p(f, {
|
|
8352
8353
|
type: "button",
|
|
8353
8354
|
severity: "secondary",
|
|
8354
8355
|
text: "",
|
|
8355
8356
|
rounded: "",
|
|
8356
|
-
onClick: s[1] ||= (e) =>
|
|
8357
|
+
onClick: s[1] ||= (e) => He(e)
|
|
8357
8358
|
}, {
|
|
8358
8359
|
icon: v(() => [M(_, { class: "w-4 h-4" })]),
|
|
8359
8360
|
_: 1
|
|
8360
8361
|
})), [[
|
|
8361
|
-
|
|
8362
|
+
Y,
|
|
8362
8363
|
{ value: a.$t("views.assistant.memory_title") },
|
|
8363
8364
|
void 0,
|
|
8364
8365
|
{ top: !0 }
|
|
@@ -8374,7 +8375,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8374
8375
|
key: e,
|
|
8375
8376
|
type: "button",
|
|
8376
8377
|
class: "cui-assistant-chip cursor-pointer rounded-full px-3.5 py-1.5 text-[13px]",
|
|
8377
|
-
onClick: (t) =>
|
|
8378
|
+
onClick: (t) => at({
|
|
8378
8379
|
text: e,
|
|
8379
8380
|
attachments: []
|
|
8380
8381
|
})
|
|
@@ -8382,30 +8383,30 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8382
8383
|
])) : (i(), x("div", {
|
|
8383
8384
|
key: 1,
|
|
8384
8385
|
ref_key: "contentRef",
|
|
8385
|
-
ref:
|
|
8386
|
+
ref: ie,
|
|
8386
8387
|
class: "mx-auto flex w-full max-w-[720px] flex-col gap-7 pt-6 pb-4"
|
|
8387
8388
|
}, [
|
|
8388
|
-
(i(!0), x(C, null, r(g(
|
|
8389
|
+
(i(!0), x(C, null, r(g(Se), (e) => (i(), p(b, {
|
|
8389
8390
|
key: e.message.id,
|
|
8390
8391
|
message: e.message,
|
|
8391
|
-
streaming: g(
|
|
8392
|
-
working: g(
|
|
8393
|
-
busy: g(
|
|
8392
|
+
streaming: g(J).isLoading.value && e.lastIndex === g(J).messages.value.length - 1 && e.message.role === "assistant",
|
|
8393
|
+
working: g(be) && e.lastIndex === g(J).messages.value.length - 1 && e.message.role === "assistant",
|
|
8394
|
+
busy: g(J).busy.value,
|
|
8394
8395
|
continuation: e.continuation,
|
|
8395
|
-
stopped: e.ids.includes(g(
|
|
8396
|
-
"tool-images": g(
|
|
8397
|
-
"tool-references": g(
|
|
8398
|
-
"tool-cards": g(
|
|
8399
|
-
"tool-settings": g(
|
|
8400
|
-
"tool-notices": g(
|
|
8401
|
-
"model-id": g(
|
|
8402
|
-
usage:
|
|
8396
|
+
stopped: e.ids.includes(g(J).stoppedId.value ?? ""),
|
|
8397
|
+
"tool-images": g(J).toolImages.value,
|
|
8398
|
+
"tool-references": g(J).toolReferences.value,
|
|
8399
|
+
"tool-cards": g(J).toolCards.value,
|
|
8400
|
+
"tool-settings": g(J).toolSettings.value,
|
|
8401
|
+
"tool-notices": g(J).toolNotices.value,
|
|
8402
|
+
"model-id": g(ge)?._id,
|
|
8403
|
+
usage: ke(e),
|
|
8403
8404
|
class: l({ "-mt-5": e.continuation }),
|
|
8404
|
-
onRegenerate: (t) =>
|
|
8405
|
-
onEdit: (t) =>
|
|
8406
|
-
onDelete: (t) =>
|
|
8407
|
-
onBranch: (t) =>
|
|
8408
|
-
onContinue: s[3] ||= (e) => g(
|
|
8405
|
+
onRegenerate: (t) => tt(e.index),
|
|
8406
|
+
onEdit: (t) => nt(e.index, t),
|
|
8407
|
+
onDelete: (t) => rt(e.index),
|
|
8408
|
+
onBranch: (t) => it(e.index),
|
|
8409
|
+
onContinue: s[3] ||= (e) => g(J).continueAnswer()
|
|
8409
8410
|
}, null, 8, [
|
|
8410
8411
|
"message",
|
|
8411
8412
|
"streaming",
|
|
@@ -8426,24 +8427,24 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8426
8427
|
"onDelete",
|
|
8427
8428
|
"onBranch"
|
|
8428
8429
|
]))), 128)),
|
|
8429
|
-
g(
|
|
8430
|
+
g(xe) ? (i(), p(b, {
|
|
8430
8431
|
key: 0,
|
|
8431
|
-
message: g(
|
|
8432
|
+
message: g($r),
|
|
8432
8433
|
working: "",
|
|
8433
8434
|
busy: "",
|
|
8434
|
-
continuation: g(
|
|
8435
|
-
class: l({ "-mt-5": g(
|
|
8435
|
+
continuation: g(Jn)(g(J).messages.value.at(-1)),
|
|
8436
|
+
class: l({ "-mt-5": g(Jn)(g(J).messages.value.at(-1)) })
|
|
8436
8437
|
}, null, 8, [
|
|
8437
8438
|
"message",
|
|
8438
8439
|
"continuation",
|
|
8439
8440
|
"class"
|
|
8440
8441
|
])) : m("", !0),
|
|
8441
|
-
(i(!0), x(C, null, r(g(
|
|
8442
|
+
(i(!0), x(C, null, r(g(J).approvals.value, (e) => (i(), p(S, {
|
|
8442
8443
|
key: e.id,
|
|
8443
8444
|
"tool-name": e.toolName,
|
|
8444
8445
|
args: e.originalArgs,
|
|
8445
8446
|
"can-resolve": e.canResolve,
|
|
8446
|
-
busy: g(
|
|
8447
|
+
busy: g(J).resuming.value,
|
|
8447
8448
|
onApprove: (t) => t ? e.resolveInterrupt(!0, { editedArgs: t }) : e.resolveInterrupt(!0),
|
|
8448
8449
|
onReject: (t) => e.resolveInterrupt(!1)
|
|
8449
8450
|
}, null, 8, [
|
|
@@ -8454,7 +8455,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8454
8455
|
"onApprove",
|
|
8455
8456
|
"onReject"
|
|
8456
8457
|
]))), 128)),
|
|
8457
|
-
(i(!0), x(C, null, r(g(
|
|
8458
|
+
(i(!0), x(C, null, r(g(J).questions.value, (e) => (i(), p(w, {
|
|
8458
8459
|
key: e.id,
|
|
8459
8460
|
question: e.payload ?? {
|
|
8460
8461
|
toolCallId: e.id,
|
|
@@ -8462,7 +8463,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8462
8463
|
kind: "text"
|
|
8463
8464
|
},
|
|
8464
8465
|
"can-resolve": e.canResolve,
|
|
8465
|
-
busy: g(
|
|
8466
|
+
busy: g(J).resuming.value,
|
|
8466
8467
|
onAnswer: (t) => e.resolveInterrupt({ answer: t }),
|
|
8467
8468
|
onSkip: (t) => e.cancel()
|
|
8468
8469
|
}, null, 8, [
|
|
@@ -8472,26 +8473,26 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8472
8473
|
"onAnswer",
|
|
8473
8474
|
"onSkip"
|
|
8474
8475
|
]))), 128)),
|
|
8475
|
-
g(
|
|
8476
|
-
g(
|
|
8476
|
+
g(J).pausedElsewhere.value ? (i(), x("div", _l, o(a.$t("views.assistant.paused_elsewhere")), 1)) : m("", !0),
|
|
8477
|
+
g(J).error.value ? (i(), x("div", vl, [T("strong", yl, o(g(J).error.value.message), 1)])) : m("", !0)
|
|
8477
8478
|
], 512))], 34),
|
|
8478
|
-
g(
|
|
8479
|
+
g(pe) ? m("", !0) : (i(), x("div", bl, [g(W) ? m("", !0) : E((i(), p(f, {
|
|
8479
8480
|
key: 0,
|
|
8480
8481
|
type: "button",
|
|
8481
8482
|
rounded: "",
|
|
8482
8483
|
severity: "secondary",
|
|
8483
8484
|
class: "cui-assistant-jump absolute left-1/2 top-0 z-[2] -translate-x-1/2 -translate-y-1/2",
|
|
8484
|
-
onClick:
|
|
8485
|
+
onClick: Le
|
|
8485
8486
|
}, {
|
|
8486
8487
|
icon: v(() => [M(O, { class: "w-4 h-4" })]),
|
|
8487
8488
|
_: 1
|
|
8488
8489
|
})), [[
|
|
8489
|
-
|
|
8490
|
+
Y,
|
|
8490
8491
|
{ value: a.$t("views.assistant.scroll_to_latest") },
|
|
8491
8492
|
void 0,
|
|
8492
8493
|
{ top: !0 }
|
|
8493
8494
|
]]), T("div", xl, [
|
|
8494
|
-
g(
|
|
8495
|
+
g(J).queue.value.length ? (i(), x("div", Sl, [(i(!0), x(C, null, r(g(J).queue.value, (e) => (i(), x("div", {
|
|
8495
8496
|
key: e.id,
|
|
8496
8497
|
class: "cui-assistant-queued flex items-center gap-2 rounded-lg px-3 py-1.5 text-[13px] text-muted"
|
|
8497
8498
|
}, [
|
|
@@ -8503,12 +8504,12 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8503
8504
|
text: "",
|
|
8504
8505
|
rounded: "",
|
|
8505
8506
|
class: "cui-icon-md shrink-0",
|
|
8506
|
-
onClick: (t) => g(
|
|
8507
|
+
onClick: (t) => g(J).cancelQueued(e.id)
|
|
8507
8508
|
}, {
|
|
8508
8509
|
icon: v(() => [M(ee, { class: "w-3.5 h-3.5" })]),
|
|
8509
8510
|
_: 1
|
|
8510
8511
|
}, 8, ["onClick"])), [[
|
|
8511
|
-
|
|
8512
|
+
Y,
|
|
8512
8513
|
{ value: a.$t("views.assistant.queue_cancel") },
|
|
8513
8514
|
void 0,
|
|
8514
8515
|
{ top: !0 }
|
|
@@ -8516,40 +8517,40 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8516
8517
|
]))), 128))])) : m("", !0),
|
|
8517
8518
|
M(y, {
|
|
8518
8519
|
ref_key: "composerRef",
|
|
8519
|
-
ref:
|
|
8520
|
-
busy: g(
|
|
8521
|
-
"vision-missing": g(
|
|
8520
|
+
ref: U,
|
|
8521
|
+
busy: g(J).busy.value,
|
|
8522
|
+
"vision-missing": g(ye),
|
|
8522
8523
|
compact: e.compact,
|
|
8523
8524
|
placeholder: a.$t("views.assistant.composer_placeholder"),
|
|
8524
|
-
onSend:
|
|
8525
|
-
onStop: s[6] ||= (e) => g(
|
|
8525
|
+
onSend: at,
|
|
8526
|
+
onStop: s[6] ||= (e) => g(J).stop()
|
|
8526
8527
|
}, {
|
|
8527
8528
|
tools: v(() => [T("span", wl, [E((i(), p(f, {
|
|
8528
8529
|
type: "button",
|
|
8529
8530
|
severity: "secondary",
|
|
8530
8531
|
text: "",
|
|
8531
8532
|
rounded: "",
|
|
8532
|
-
disabled: g(
|
|
8533
|
-
onClick: s[4] ||= (e) => g(
|
|
8533
|
+
disabled: g(J).busy.value,
|
|
8534
|
+
onClick: s[4] ||= (e) => g(oe)?.toggle(e)
|
|
8534
8535
|
}, {
|
|
8535
8536
|
icon: v(() => [M(d, { class: "w-4 h-4" })]),
|
|
8536
8537
|
_: 1
|
|
8537
8538
|
}, 8, ["disabled"])), [[
|
|
8538
|
-
|
|
8539
|
+
Y,
|
|
8539
8540
|
{ value: a.$t("views.assistant.tools_title") },
|
|
8540
8541
|
void 0,
|
|
8541
8542
|
{ top: !0 }
|
|
8542
|
-
]]), g(
|
|
8543
|
+
]]), g(G).length ? (i(), x("span", Tl, o(g(Ee).length), 1)) : m("", !0)]), T("span", El, [E((i(), p(f, {
|
|
8543
8544
|
type: "button",
|
|
8544
8545
|
severity: "secondary",
|
|
8545
8546
|
text: "",
|
|
8546
8547
|
rounded: "",
|
|
8547
|
-
onClick: s[5] ||= (e) =>
|
|
8548
|
+
onClick: s[5] ||= (e) => He(e)
|
|
8548
8549
|
}, {
|
|
8549
8550
|
icon: v(() => [M(_, { class: "w-4 h-4" })]),
|
|
8550
8551
|
_: 1
|
|
8551
8552
|
})), [[
|
|
8552
|
-
|
|
8553
|
+
Y,
|
|
8553
8554
|
{ value: a.$t("views.assistant.memory_title") },
|
|
8554
8555
|
void 0,
|
|
8555
8556
|
{ top: !0 }
|
|
@@ -8563,30 +8564,30 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8563
8564
|
]),
|
|
8564
8565
|
T("div", Ol, o(a.$t("views.assistant.disclaimer")), 1)
|
|
8565
8566
|
])])),
|
|
8566
|
-
M(
|
|
8567
|
+
M(Ve, {
|
|
8567
8568
|
ref_key: "toolsPopover",
|
|
8568
|
-
ref:
|
|
8569
|
+
ref: oe
|
|
8569
8570
|
}, {
|
|
8570
8571
|
default: v(() => [T("div", kl, [
|
|
8571
8572
|
T("span", Al, o(a.$t("views.assistant.tools_title")), 1),
|
|
8572
8573
|
T("div", jl, [T("label", Ml, o(a.$t("views.assistant.instructions_label")), 1), M(L, {
|
|
8573
8574
|
id: "assistantInstructions",
|
|
8574
|
-
modelValue: g(
|
|
8575
|
-
"onUpdate:modelValue": s[7] ||= (e) => h(
|
|
8575
|
+
modelValue: g(le),
|
|
8576
|
+
"onUpdate:modelValue": s[7] ||= (e) => h(le) ? le.value = e : null,
|
|
8576
8577
|
rows: "2",
|
|
8577
8578
|
"auto-resize": "",
|
|
8578
8579
|
class: "text-sm",
|
|
8579
8580
|
placeholder: a.$t("views.assistant.instructions_placeholder")
|
|
8580
8581
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
8581
|
-
T("div", Nl, [T("label", Pl, o(a.$t("views.assistant.tools_label")), 1), M(
|
|
8582
|
-
modelValue: g(
|
|
8583
|
-
"onUpdate:modelValue": s[8] ||= (e) => h(
|
|
8582
|
+
T("div", Nl, [T("label", Pl, o(a.$t("views.assistant.tools_label")), 1), M(B, {
|
|
8583
|
+
modelValue: g(Ee),
|
|
8584
|
+
"onUpdate:modelValue": s[8] ||= (e) => h(Ee) ? Ee.value = e : null,
|
|
8584
8585
|
"input-id": "assistantTools",
|
|
8585
|
-
options: g(
|
|
8586
|
+
options: g(Ce),
|
|
8586
8587
|
"option-label": "label",
|
|
8587
8588
|
"option-value": "id",
|
|
8588
8589
|
"max-selected-labels": 2,
|
|
8589
|
-
"selected-items-label": a.$t("views.assistant.tools_selected", { n: g(
|
|
8590
|
+
"selected-items-label": a.$t("views.assistant.tools_selected", { n: g(Ee).length }),
|
|
8590
8591
|
placeholder: a.$t("views.assistant.tools_none"),
|
|
8591
8592
|
class: "min-w-0"
|
|
8592
8593
|
}, {
|
|
@@ -8598,17 +8599,17 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8598
8599
|
"selected-items-label",
|
|
8599
8600
|
"placeholder"
|
|
8600
8601
|
])]),
|
|
8601
|
-
g(
|
|
8602
|
-
modelValue: g(
|
|
8603
|
-
"onUpdate:modelValue": s[9] ||= (e) => h(
|
|
8602
|
+
g(me).length > 1 ? (i(), x("div", Rl, [T("label", zl, o(a.$t("views.assistant.model_label")), 1), M(_e, {
|
|
8603
|
+
modelValue: g(fe),
|
|
8604
|
+
"onUpdate:modelValue": s[9] ||= (e) => h(fe) ? fe.value = e : null,
|
|
8604
8605
|
"input-id": "assistantModel",
|
|
8605
|
-
options: g(
|
|
8606
|
+
options: g(me),
|
|
8606
8607
|
"option-label": "name",
|
|
8607
8608
|
"option-value": "_id",
|
|
8608
8609
|
class: "min-w-0",
|
|
8609
|
-
placeholder: g(
|
|
8610
|
+
placeholder: g(he)?.name
|
|
8610
8611
|
}, {
|
|
8611
|
-
option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(
|
|
8612
|
+
option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(Ge(e), (e) => (i(), p(H, {
|
|
8612
8613
|
key: e.key,
|
|
8613
8614
|
severity: e.severity,
|
|
8614
8615
|
value: a.$t(`views.settings.assistant_capability_${e.key}`),
|
|
@@ -8622,11 +8623,11 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8622
8623
|
])])) : m("", !0),
|
|
8623
8624
|
T("div", Ul, [
|
|
8624
8625
|
T("label", Wl, o(a.$t("views.assistant.profiles_label")), 1),
|
|
8625
|
-
M(
|
|
8626
|
+
M(ze, null, {
|
|
8626
8627
|
default: v(() => [
|
|
8627
|
-
M(
|
|
8628
|
-
modelValue: g(
|
|
8629
|
-
"onUpdate:modelValue": [s[10] ||= (e) => h(
|
|
8628
|
+
M(_e, {
|
|
8629
|
+
modelValue: g(K),
|
|
8630
|
+
"onUpdate:modelValue": [s[10] ||= (e) => h(K) ? K.value = e : null, Ue],
|
|
8630
8631
|
"input-id": "assistantProfile",
|
|
8631
8632
|
options: g(k) ?? [],
|
|
8632
8633
|
"option-label": "name",
|
|
@@ -8635,7 +8636,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8635
8636
|
class: "min-w-0",
|
|
8636
8637
|
placeholder: a.$t("views.assistant.profile_none")
|
|
8637
8638
|
}, {
|
|
8638
|
-
option: v(({ option: e }) => [T("div", Gl, [T("span", Kl, o(e.name), 1), T("span", ql, [(i(!0), x(C, null, r(
|
|
8639
|
+
option: v(({ option: e }) => [T("div", Gl, [T("span", Kl, o(e.name), 1), T("span", ql, [(i(!0), x(C, null, r(Ge(We(e)), (e) => (i(), p(H, {
|
|
8639
8640
|
key: e.key,
|
|
8640
8641
|
severity: e.severity,
|
|
8641
8642
|
value: a.$t(`views.settings.assistant_capability_${e.key}`),
|
|
@@ -8647,26 +8648,26 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8647
8648
|
"options",
|
|
8648
8649
|
"placeholder"
|
|
8649
8650
|
]),
|
|
8650
|
-
M(
|
|
8651
|
+
M(we, { class: "!p-0" }, {
|
|
8651
8652
|
default: v(() => [E((i(), p(f, {
|
|
8652
8653
|
type: "button",
|
|
8653
8654
|
severity: "secondary",
|
|
8654
8655
|
text: "",
|
|
8655
8656
|
class: "h-full rounded-none",
|
|
8656
8657
|
loading: g(A).isPending.value || g(N).isPending.value,
|
|
8657
|
-
onClick: s[11] ||= (e) => g(
|
|
8658
|
+
onClick: s[11] ||= (e) => g(K) ? Ye() : ue.value = !0
|
|
8658
8659
|
}, {
|
|
8659
|
-
icon: v(() => [M(
|
|
8660
|
+
icon: v(() => [M(ve, { class: "w-4 h-4" })]),
|
|
8660
8661
|
_: 1
|
|
8661
8662
|
}, 8, ["loading"])), [[
|
|
8662
|
-
|
|
8663
|
-
{ value: g(
|
|
8663
|
+
Y,
|
|
8664
|
+
{ value: g(K) ? a.$t("views.assistant.profile_update") : a.$t("views.assistant.profile_save") },
|
|
8664
8665
|
void 0,
|
|
8665
8666
|
{ top: !0 }
|
|
8666
8667
|
]])]),
|
|
8667
8668
|
_: 1
|
|
8668
8669
|
}),
|
|
8669
|
-
g(
|
|
8670
|
+
g(K) ? (i(), p(we, {
|
|
8670
8671
|
key: 0,
|
|
8671
8672
|
class: "!p-0"
|
|
8672
8673
|
}, {
|
|
@@ -8676,12 +8677,12 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8676
8677
|
text: "",
|
|
8677
8678
|
class: "h-full rounded-none",
|
|
8678
8679
|
loading: g(F).isPending.value,
|
|
8679
|
-
onClick:
|
|
8680
|
+
onClick: Xe
|
|
8680
8681
|
}, {
|
|
8681
|
-
icon: v(() => [M(
|
|
8682
|
+
icon: v(() => [M(Re, { class: "w-4 h-4" })]),
|
|
8682
8683
|
_: 1
|
|
8683
8684
|
}, 8, ["loading"])), [[
|
|
8684
|
-
|
|
8685
|
+
Y,
|
|
8685
8686
|
{ value: a.$t("views.assistant.profile_delete") },
|
|
8686
8687
|
void 0,
|
|
8687
8688
|
{ top: !0 }
|
|
@@ -8691,13 +8692,13 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8691
8692
|
]),
|
|
8692
8693
|
_: 1
|
|
8693
8694
|
}),
|
|
8694
|
-
g(
|
|
8695
|
-
modelValue: g(
|
|
8696
|
-
"onUpdate:modelValue": s[12] ||= (e) => h(
|
|
8695
|
+
g(ue) ? (i(), x("div", Jl, [M(Be, {
|
|
8696
|
+
modelValue: g(q),
|
|
8697
|
+
"onUpdate:modelValue": s[12] ||= (e) => h(q) ? q.value = e : null,
|
|
8697
8698
|
class: "flex-1 min-w-0",
|
|
8698
8699
|
size: "small",
|
|
8699
8700
|
placeholder: a.$t("views.assistant.profile_name_placeholder"),
|
|
8700
|
-
onKeydown: [n(t(
|
|
8701
|
+
onKeydown: [n(t(qe, ["prevent"]), ["enter"]), s[13] ||= n((e) => ue.value = !1, ["esc"])]
|
|
8701
8702
|
}, null, 8, [
|
|
8702
8703
|
"modelValue",
|
|
8703
8704
|
"placeholder",
|
|
@@ -8706,16 +8707,16 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8706
8707
|
type: "button",
|
|
8707
8708
|
size: "small",
|
|
8708
8709
|
label: a.$t("components.form.button.save"),
|
|
8709
|
-
disabled: !g(
|
|
8710
|
-
onClick:
|
|
8710
|
+
disabled: !g(q).trim(),
|
|
8711
|
+
onClick: qe
|
|
8711
8712
|
}, null, 8, ["label", "disabled"])])) : m("", !0)
|
|
8712
8713
|
])
|
|
8713
8714
|
])]),
|
|
8714
8715
|
_: 1
|
|
8715
8716
|
}, 512),
|
|
8716
|
-
M(
|
|
8717
|
+
M(Ve, {
|
|
8717
8718
|
ref_key: "memoryPopover",
|
|
8718
|
-
ref:
|
|
8719
|
+
ref: se
|
|
8719
8720
|
}, {
|
|
8720
8721
|
default: v(() => [T("div", Yl, [
|
|
8721
8722
|
T("div", Xl, [T("span", Zl, o(a.$t("views.assistant.memory_title")), 1), g(I)?.length ? (i(), x("span", Ql, o(g(I).length), 1)) : m("", !0)]),
|
|
@@ -8734,7 +8735,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8734
8735
|
icon: v(() => [M(ee, { class: "w-3 h-3" })]),
|
|
8735
8736
|
_: 1
|
|
8736
8737
|
}, 8, ["loading", "onClick"])), [[
|
|
8737
|
-
|
|
8738
|
+
Y,
|
|
8738
8739
|
{ value: a.$t("views.assistant.memory_forget") },
|
|
8739
8740
|
void 0,
|
|
8740
8741
|
{ top: !0 }
|
|
@@ -8747,8 +8748,8 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8747
8748
|
outlined: "",
|
|
8748
8749
|
class: "w-full",
|
|
8749
8750
|
label: a.$t("views.assistant.memory_forget_all"),
|
|
8750
|
-
loading: g(
|
|
8751
|
-
onClick: s[14] ||= (e) => g(
|
|
8751
|
+
loading: g(z).isPending.value,
|
|
8752
|
+
onClick: s[14] ||= (e) => g(z).mutate()
|
|
8752
8753
|
}, null, 8, ["label", "loading"])) : m("", !0)
|
|
8753
8754
|
])]),
|
|
8754
8755
|
_: 1
|
|
@@ -8756,7 +8757,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
|
|
|
8756
8757
|
]);
|
|
8757
8758
|
};
|
|
8758
8759
|
}
|
|
8759
|
-
}), [["__scopeId", "data-v-
|
|
8760
|
+
}), [["__scopeId", "data-v-f2ce1f74"]]), ru = {
|
|
8760
8761
|
viewBox: "0 0 24 24",
|
|
8761
8762
|
width: "1.2em",
|
|
8762
8763
|
height: "1.2em"
|
|
@@ -8782,7 +8783,7 @@ var au = d({
|
|
|
8782
8783
|
}, du = { class: "cui-assistant-group px-2 pt-3.5 pb-1 text-[11.5px] font-medium text-muted" }, fu = ["onClick"], pu = { class: "min-w-0 flex-1 truncate" }, mu = {
|
|
8783
8784
|
key: 3,
|
|
8784
8785
|
class: "cui-assistant-sidebar-foot px-3 py-2"
|
|
8785
|
-
}, hu = /*#__PURE__*/
|
|
8786
|
+
}, hu = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
8786
8787
|
__name: "CuiAssistantSidebar",
|
|
8787
8788
|
props: {
|
|
8788
8789
|
threads: {},
|
|
@@ -8806,7 +8807,7 @@ var au = d({
|
|
|
8806
8807
|
"close"
|
|
8807
8808
|
],
|
|
8808
8809
|
setup(e, { emit: n }) {
|
|
8809
|
-
let a = e, s = n, { topbarOffset: c, bottombarHeight: u } =
|
|
8810
|
+
let a = e, s = n, { topbarOffset: c, bottombarHeight: u } = q(), d = w("sidebarRef"), f = j(""), y = _(() => a.isOpen ? 288 : 0), b = _(() => {
|
|
8810
8811
|
let e = f.value.trim().toLowerCase(), t = a.threads.filter((t) => !e || t.title.toLowerCase().includes(e)).sort((e, t) => t.updatedAt - e.updatedAt), n = [
|
|
8811
8812
|
"today",
|
|
8812
8813
|
"yesterday",
|
|
@@ -8827,10 +8828,10 @@ var au = d({
|
|
|
8827
8828
|
let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = Math.round((t(/* @__PURE__ */ new Date()) - t(new Date(e))) / 864e5);
|
|
8828
8829
|
return n <= 0 ? "today" : n === 1 ? "yesterday" : n <= 7 ? "week" : n <= 30 ? "month" : "older";
|
|
8829
8830
|
}
|
|
8830
|
-
return
|
|
8831
|
+
return ye(d, (e) => {
|
|
8831
8832
|
a.isOpen && a.isOverlay && (e.target.closest("#assistant-sidebar-toggle") || s("close"));
|
|
8832
8833
|
}), (n, a) => {
|
|
8833
|
-
let _ = au, w =
|
|
8834
|
+
let _ = au, w = Oe, O = qe, k = Ue, A = Ae, j = je, ee = ke, N = he, ne = ae, P = te;
|
|
8834
8835
|
return i(), x("nav", {
|
|
8835
8836
|
ref_key: "sidebarRef",
|
|
8836
8837
|
ref: d,
|
|
@@ -8933,36 +8934,36 @@ var au = d({
|
|
|
8933
8934
|
}, Cu = {
|
|
8934
8935
|
key: 1,
|
|
8935
8936
|
class: "flex flex-1 flex-col items-center justify-center gap-5 px-6 text-center"
|
|
8936
|
-
}, wu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, Tu = { class: "max-w-md" }, Eu = { class: "text-lg font-semibold text-color" }, Du = { class: "mt-1 text-sm text-muted" }, Ou = /*#__PURE__*/
|
|
8937
|
+
}, wu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, Tu = { class: "max-w-md" }, Eu = { class: "text-lg font-semibold text-color" }, Du = { class: "mt-1 text-sm text-muted" }, Ou = /*#__PURE__*/ R(/* @__PURE__ */ A({
|
|
8937
8938
|
__name: "Assistant",
|
|
8938
8939
|
setup(e) {
|
|
8939
|
-
let t = new
|
|
8940
|
+
let t = new Y(), n = oe(), r = z(), { t: a } = we(), { smBreakpoint: s, mdBreakpoint: u, xlBreakpoint: d } = I(), { openTextDialog: f } = W(), h = le("/notifications"), C = K(), { user: D } = Ce(C), { data: O, isLoading: k } = t.getAssistantInfoQuery(), { data: A, isLoading: N } = t.listThreadsQuery(), ne = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), L = w("conversationRef"), R = j(ge()), re = j([]), V = j({}), ie = j(null), H = j(typeof n.query.prompt == "string" ? n.query.prompt : void 0), U = j(!1), ae = j(d.value ? "opened" : "closed"), se = j(!1), ce = _(() => O.value?.status.state ?? "disabled"), G = _(() => D.value?.role === "admin" || D.value?.role === "master"), ue = _(() => (O.value?.tools ?? []).filter((e) => e.approval)), q = _(() => ae.value === "opened"), de = _(() => A.value?.find((e) => e.id === R.value)?.title ?? ""), fe = _(() => u.value), pe = _(() => u.value || ce.value !== "ready" ? "0px" : q.value ? "288px" : "0px"), me = _(() => [
|
|
8940
8941
|
a("views.assistant.suggestion_today"),
|
|
8941
8942
|
a("views.assistant.suggestion_week"),
|
|
8942
8943
|
a("views.assistant.suggestion_offline"),
|
|
8943
8944
|
a("views.assistant.suggestion_sensors"),
|
|
8944
8945
|
a("views.assistant.suggestion_tools")
|
|
8945
8946
|
]);
|
|
8946
|
-
function q() {
|
|
8947
|
-
return fe();
|
|
8948
|
-
}
|
|
8949
8947
|
function ge() {
|
|
8950
|
-
|
|
8948
|
+
return J();
|
|
8949
|
+
}
|
|
8950
|
+
function _e() {
|
|
8951
|
+
ae.value = ae.value === "opened" ? "closed" : "opened";
|
|
8951
8952
|
}
|
|
8952
8953
|
function ve() {
|
|
8953
|
-
|
|
8954
|
+
ae.value = "closed";
|
|
8954
8955
|
}
|
|
8955
8956
|
function ye() {
|
|
8956
|
-
|
|
8957
|
+
re.value = [], V.value = {}, ie.value = null, H.value = void 0, R.value = ge(), fe.value && ve();
|
|
8957
8958
|
}
|
|
8958
8959
|
async function be(e) {
|
|
8959
|
-
if (
|
|
8960
|
-
|
|
8960
|
+
if (fe.value && ve(), e !== R.value) {
|
|
8961
|
+
U.value = !0;
|
|
8961
8962
|
try {
|
|
8962
|
-
let t = await
|
|
8963
|
-
|
|
8963
|
+
let t = await ze(e);
|
|
8964
|
+
re.value = t.messages, V.value = t.attachments, ie.value = t.modelId ?? null, H.value = void 0, R.value = e;
|
|
8964
8965
|
} finally {
|
|
8965
|
-
|
|
8966
|
+
U.value = !1;
|
|
8966
8967
|
}
|
|
8967
8968
|
}
|
|
8968
8969
|
}
|
|
@@ -8970,12 +8971,12 @@ var au = d({
|
|
|
8970
8971
|
await ne.mutateAsync(e).catch(() => void 0), e === R.value && ye();
|
|
8971
8972
|
}
|
|
8972
8973
|
async function Se(e) {
|
|
8973
|
-
|
|
8974
|
+
re.value = e.messages, V.value = e.attachments, ie.value = e.modelId ?? null, H.value = void 0, R.value = e._id, await t.queryClient.refetchQueries({
|
|
8974
8975
|
queryKey: ["assistant", "threads"],
|
|
8975
8976
|
exact: !0
|
|
8976
8977
|
});
|
|
8977
8978
|
}
|
|
8978
|
-
function
|
|
8979
|
+
function Ee() {
|
|
8979
8980
|
f({
|
|
8980
8981
|
data: {
|
|
8981
8982
|
title: a("views.assistant.delete_all_conversations"),
|
|
@@ -8995,7 +8996,7 @@ var au = d({
|
|
|
8995
8996
|
R.value = e;
|
|
8996
8997
|
}
|
|
8997
8998
|
}
|
|
8998
|
-
async function
|
|
8999
|
+
async function ke() {
|
|
8999
9000
|
await t.queryClient.refetchQueries({
|
|
9000
9001
|
queryKey: ["assistant", "threads"],
|
|
9001
9002
|
exact: !0
|
|
@@ -9006,8 +9007,8 @@ var au = d({
|
|
|
9006
9007
|
queryKey: ["assistant", "threads"],
|
|
9007
9008
|
exact: !0
|
|
9008
9009
|
}), e.threadId !== R.value) return;
|
|
9009
|
-
let n = await
|
|
9010
|
-
n &&
|
|
9010
|
+
let n = await ze(e.threadId).catch(() => void 0);
|
|
9011
|
+
n && L.value?.refreshFromStore(n);
|
|
9011
9012
|
}
|
|
9012
9013
|
function je() {
|
|
9013
9014
|
let e = A.value?.some((e) => e.id === R.value), t = {
|
|
@@ -9022,9 +9023,9 @@ var au = d({
|
|
|
9022
9023
|
n.query.prompt !== void 0 && r.replace({ query: {
|
|
9023
9024
|
...n.query,
|
|
9024
9025
|
prompt: void 0
|
|
9025
|
-
} }), e && !
|
|
9026
|
+
} }), e && !H.value && await De(e), await c(), se.value = !0;
|
|
9026
9027
|
}), (e, t) => {
|
|
9027
|
-
let n =
|
|
9028
|
+
let n = B, r = rt, a = Oe, c = F, u = qe, d = hu, f = au, h = he, _ = Te, b = nu, C = te;
|
|
9028
9029
|
return i(), x("div", null, [
|
|
9029
9030
|
M(n, { position: "center" }, {
|
|
9030
9031
|
default: v(() => [T("span", gu, o(e.$t("views.assistant.title")), 1)]),
|
|
@@ -9045,7 +9046,7 @@ var au = d({
|
|
|
9045
9046
|
class: "cui-button p-2 text-color",
|
|
9046
9047
|
text: "",
|
|
9047
9048
|
rounded: "",
|
|
9048
|
-
onClick:
|
|
9049
|
+
onClick: _e
|
|
9049
9050
|
}, {
|
|
9050
9051
|
icon: v(() => [M(c, {
|
|
9051
9052
|
width: "100%",
|
|
@@ -9061,7 +9062,7 @@ var au = d({
|
|
|
9061
9062
|
class: "cui-button p-2 text-color",
|
|
9062
9063
|
text: "",
|
|
9063
9064
|
rounded: "",
|
|
9064
|
-
disabled: g(
|
|
9065
|
+
disabled: g(ce) !== "ready",
|
|
9065
9066
|
onClick: ye
|
|
9066
9067
|
}, {
|
|
9067
9068
|
icon: v(() => [M(u, {
|
|
@@ -9072,17 +9073,17 @@ var au = d({
|
|
|
9072
9073
|
}, 8, ["disabled"])]),
|
|
9073
9074
|
_: 1
|
|
9074
9075
|
}),
|
|
9075
|
-
g(
|
|
9076
|
+
g(ce) === "ready" ? (i(), p(d, {
|
|
9076
9077
|
key: 0,
|
|
9077
9078
|
threads: g(A) ?? [],
|
|
9078
9079
|
"active-id": g(R),
|
|
9079
9080
|
loading: g(N),
|
|
9080
|
-
"is-open": g(
|
|
9081
|
-
"is-overlay": g(
|
|
9081
|
+
"is-open": g(q),
|
|
9082
|
+
"is-overlay": g(fe),
|
|
9082
9083
|
onSelect: be,
|
|
9083
9084
|
onCreate: ye,
|
|
9084
9085
|
onDelete: xe,
|
|
9085
|
-
onDeleteAll:
|
|
9086
|
+
onDeleteAll: Ee,
|
|
9086
9087
|
onClose: ve
|
|
9087
9088
|
}, null, 8, [
|
|
9088
9089
|
"threads",
|
|
@@ -9094,7 +9095,7 @@ var au = d({
|
|
|
9094
9095
|
(i(), p(y, {
|
|
9095
9096
|
to: "#container",
|
|
9096
9097
|
defer: ""
|
|
9097
|
-
}, [g(
|
|
9098
|
+
}, [g(q) && g(fe) ? (i(), x("div", {
|
|
9098
9099
|
key: 0,
|
|
9099
9100
|
class: "fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1",
|
|
9100
9101
|
onClick: ve
|
|
@@ -9102,20 +9103,20 @@ var au = d({
|
|
|
9102
9103
|
T("main", {
|
|
9103
9104
|
class: "relative w-full h-full",
|
|
9104
9105
|
style: S({
|
|
9105
|
-
paddingLeft: g(
|
|
9106
|
-
transition: g(
|
|
9106
|
+
paddingLeft: g(pe),
|
|
9107
|
+
transition: g(se) ? "padding-left 200ms" : void 0
|
|
9107
9108
|
})
|
|
9108
9109
|
}, [T("div", _u, [
|
|
9109
9110
|
g(s) ? m("", !0) : (i(), x("div", vu, [
|
|
9110
9111
|
t[3] ||= T("div", { class: "ml-2" }, null, -1),
|
|
9111
|
-
!g(
|
|
9112
|
+
!g(q) && g(ce) === "ready" ? E((i(), p(a, {
|
|
9112
9113
|
key: 0,
|
|
9113
9114
|
id: "assistant-sidebar-toggle",
|
|
9114
9115
|
severity: "secondary",
|
|
9115
9116
|
class: "mr-2 cui-icon-lg relative z-2",
|
|
9116
9117
|
text: "",
|
|
9117
9118
|
rounded: "",
|
|
9118
|
-
onClick:
|
|
9119
|
+
onClick: _e
|
|
9119
9120
|
}, {
|
|
9120
9121
|
icon: v(() => [M(f, {
|
|
9121
9122
|
width: "100%",
|
|
@@ -9129,7 +9130,7 @@ var au = d({
|
|
|
9129
9130
|
{ bottom: !0 }
|
|
9130
9131
|
]]) : m("", !0),
|
|
9131
9132
|
T("h1", yu, o(e.$t("views.assistant.title")), 1),
|
|
9132
|
-
g(
|
|
9133
|
+
g(de) ? (i(), x("span", bu, o(g(de)), 1)) : m("", !0),
|
|
9133
9134
|
t[4] ||= T("div", { class: "gradient-blur rotate-180 !h-[70px]" }, [
|
|
9134
9135
|
T("div"),
|
|
9135
9136
|
T("div"),
|
|
@@ -9139,7 +9140,7 @@ var au = d({
|
|
|
9139
9140
|
T("div")
|
|
9140
9141
|
], -1)
|
|
9141
9142
|
])),
|
|
9142
|
-
!g(s) && g(
|
|
9143
|
+
!g(s) && g(ce) === "ready" ? (i(), x("div", xu, [E((i(), p(a, {
|
|
9143
9144
|
severity: "secondary",
|
|
9144
9145
|
text: "",
|
|
9145
9146
|
rounded: "",
|
|
@@ -9160,36 +9161,38 @@ var au = d({
|
|
|
9160
9161
|
T("div", { class: l(["h-full w-full flex flex-col", {
|
|
9161
9162
|
"pt-2": g(s),
|
|
9162
9163
|
"pt-[calc(40px+2rem)]": !g(s)
|
|
9163
|
-
}]) }, [g(k) || g(
|
|
9164
|
+
}]) }, [g(k) || g(U) ? (i(), x("div", Su, [M(h, {
|
|
9164
9165
|
class: "w-[30px] h-[30px] m-0",
|
|
9165
9166
|
"stroke-width": "5"
|
|
9166
|
-
})])) : g(
|
|
9167
|
+
})])) : g(ce) === "ready" ? (i(), p(b, {
|
|
9167
9168
|
ref_key: "conversationRef",
|
|
9168
|
-
ref:
|
|
9169
|
+
ref: L,
|
|
9169
9170
|
key: g(R),
|
|
9170
9171
|
"thread-id": g(R),
|
|
9171
|
-
"initial-messages": g(
|
|
9172
|
-
"initial-attachments": g(
|
|
9173
|
-
"initial-
|
|
9174
|
-
|
|
9175
|
-
|
|
9172
|
+
"initial-messages": g(re),
|
|
9173
|
+
"initial-attachments": g(V),
|
|
9174
|
+
"initial-model-id": g(ie),
|
|
9175
|
+
"initial-prompt": g(H),
|
|
9176
|
+
suggestions: g(me),
|
|
9177
|
+
"approval-tools": g(ue),
|
|
9176
9178
|
tools: g(O)?.tools ?? [],
|
|
9177
9179
|
class: "flex-1 min-h-0",
|
|
9178
|
-
onFinished:
|
|
9180
|
+
onFinished: ke,
|
|
9179
9181
|
onBranched: Se,
|
|
9180
9182
|
onEmptied: t[2] ||= (e) => xe(g(R))
|
|
9181
9183
|
}, null, 8, [
|
|
9182
9184
|
"thread-id",
|
|
9183
9185
|
"initial-messages",
|
|
9184
9186
|
"initial-attachments",
|
|
9187
|
+
"initial-model-id",
|
|
9185
9188
|
"initial-prompt",
|
|
9186
9189
|
"suggestions",
|
|
9187
9190
|
"approval-tools",
|
|
9188
9191
|
"tools"
|
|
9189
9192
|
])) : (i(), x("div", Cu, [
|
|
9190
9193
|
T("div", wu, [M(_, { class: "w-8 h-8 text-muted" })]),
|
|
9191
|
-
T("div", Tu, [T("div", Eu, o(e.$t(g(
|
|
9192
|
-
g(
|
|
9194
|
+
T("div", Tu, [T("div", Eu, o(e.$t(g(ce) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), T("div", Du, o(e.$t(g(G) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
|
|
9195
|
+
g(G) ? (i(), p(a, {
|
|
9193
9196
|
key: 0,
|
|
9194
9197
|
class: "cui-button-medium",
|
|
9195
9198
|
label: e.$t("views.assistant.open_settings"),
|
|
@@ -9200,6 +9203,6 @@ var au = d({
|
|
|
9200
9203
|
]);
|
|
9201
9204
|
};
|
|
9202
9205
|
}
|
|
9203
|
-
}), [["__scopeId", "data-v-
|
|
9206
|
+
}), [["__scopeId", "data-v-43e853bc"]]);
|
|
9204
9207
|
//#endregion
|
|
9205
9208
|
export { Ou as default };
|