From f62b94639da368ef3fb8f82d32c7cb8f93b93b9a Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 26 Feb 2024 22:59:03 +0100 Subject: [PATCH] Upgraded ui --- configs/config.yaml | 6 ++++-- lollms_core | 2 +- lollms_webui.py | 2 +- web/dist/assets/index-fb00cba7.js | 6 +++--- web/src/views/DiscussionsView.vue | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/configs/config.yaml b/configs/config.yaml index dbf5513b..94790e19 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -1,5 +1,5 @@ # =================== Lord Of Large Language Multimodal Systems Configuration file =========================== -version: 72 +version: 73 binding_name: null model_name: null model_variant: null @@ -122,8 +122,10 @@ audio_auto_send_input: true audio_silenceTimer: 5000 # Data vectorization -activate_ltm: false # Activate vectorizing previous conversations +activate_skills_lib: false # Activate vectorizing previous conversations +skills_lib_database_name: "default" # Default skills database summerize_discussion: false # activate discussion summary (better but adds computation time) + max_summary_size: 512 # in tokens data_vectorization_visualize_on_vectorization: false use_files: true # Activate using files diff --git a/lollms_core b/lollms_core index 895f54b4..65a5b08e 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 895f54b422476aaf62e72b8bb0439db94ae15437 +Subproject commit 65a5b08e4bb0255605336b056da87d6bf71f744b diff --git a/lollms_webui.py b/lollms_webui.py index 9bd15480..1d3a7cdd 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -195,7 +195,7 @@ class LOLLMSWebUI(LOLLMSElfServer): ASCIIColors.success("ok") # prepare vectorization - if self.config.data_vectorization_activate and self.config.activate_ltm: + if self.config.data_vectorization_activate and self.config.activate_skills_lib: try: ASCIIColors.yellow("Loading long term memory") folder = self.lollms_paths.personal_discussions_path/"vectorized_dbs" diff --git a/web/dist/assets/index-fb00cba7.js b/web/dist/assets/index-fb00cba7.js index f31a4eda..0d78b060 100644 --- a/web/dist/assets/index-fb00cba7.js +++ b/web/dist/assets/index-fb00cba7.js @@ -165,7 +165,7 @@ Response: Error: `+e.error,4,!1);this.isLoading=!1},async remountExtension(n){await this.unmountExtension(n),await this.mountExtension(n)},onExtensionReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,console.log(n),Le.post("/reinstall_extension",{name:n.extension.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_extension",e),e.data.status?this.$store.state.toast.showToast("Extension reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall extension",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,Le.post("/reinstall_personality",{name:n.personality.path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(n){n.target.src=ga},extensionImgPlacehodler(n){n.target.src=Ist},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices()},activated(){},computed:{rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(n=>n.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(n=>n.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Li;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Li}}},imgModel:{get(){try{let n=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return n>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[n].avatar}`),this.$store.state.modelsZoo[n].avatar):Li}catch{console.log("error")}if(!this.isMounted)return Li;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Li}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(n){this.$store.state.config.audio_out_voice=n}},whisperModels(){return["base","base.en","base.fr","base.es","small","small.en","small.fr","small.es","medium","medium.en","medium.fr","medium.es","large","large.en","large.fr","large.es"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},userName:{get(){return this.$store.state.config.user_name},set(n){this.$store.state.config.user_name=n}},user_avatar:{get(){return"/user_infos/"+this.$store.state.config.user_avatar},set(n){this.$store.state.config.user_avatar=n}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(n){this.$store.state.config.hardware_mode=n}},auto_update:{get(){return this.$store.state.config.auto_update},set(n){this.$store.state.config.auto_update=n}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(n){this.$store.state.config.auto_speak=n}},auto_read:{get(){return this.$store.state.config.auto_read},set(n){this.$store.state.config.auto_read=n}},enable_voice_service:{get(){return this.$store.state.config.enable_voice_service},set(n){this.$store.state.config.enable_voice_service=n}},current_language:{get(){return this.$store.state.config.current_language},set(n){console.log("Current voice set to ",n),this.$store.state.config.current_language=n}},current_voice:{get(){return this.$store.state.config.current_voice===null||this.$store.state.config.current_voice===void 0?(console.log("current voice",this.$store.state.config.current_voice),"main_voice"):this.$store.state.config.current_voice},set(n){n=="main_voice"||n===void 0?(console.log("Current voice set to None"),this.$store.state.config.current_voice=null):(console.log("Current voice set to ",n),this.$store.state.config.current_voice=n)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(n){this.$store.state.config.audio_pitch=n}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(n){this.$store.state.config.audio_in_language=n}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(n){this.$store.state.config.use_user_name_in_discussions=n}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(n){this.$store.state.config.discussion_db_name=n}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}},mountedExtensions:{get(){return console.log("this.$store.state.mountedExtensions:",this.$store.state.mountedExtensions),this.$store.state.mountedExtensions},set(n){this.$store.commit("setActiveExtensions",n)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(n){this.$store.commit("setbindingsZoo",n)}},modelsArr:{get(){return this.$store.state.modelsArr},set(n){this.$store.commit("setModelsArr",n)}},models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},installed_models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},diskUsage:{get(){return this.$store.state.diskUsage},set(n){this.$store.commit("setDiskUsage",n)}},ramUsage:{get(){return this.$store.state.ramUsage},set(n){this.$store.commit("setRamUsage",n)}},vramUsage:{get(){return this.$store.state.vramUsage},set(n){this.$store.commit("setVramUsage",n)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const n=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);if(n>-1)return this.bindingsZoo[n].name},active_pesonality(){if(!this.isMounted)return;const n=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);if(n>-1)return this.personalities[n].name},speed_computed(){return ss(this.addModel.speed)},total_size_computed(){return ss(this.addModel.total_size)},downloaded_size_computed(){return ss(this.addModel.downloaded_size)}},watch:{enable_voice_service(n){n||(this.configFile.auto_read=!1)},bec_collapsed(){Ve(()=>{qe.replace()})},pc_collapsed(){Ve(()=>{qe.replace()})},mc_collapsed(){Ve(()=>{qe.replace()})},sc_collapsed(){Ve(()=>{qe.replace()})},showConfirmation(){Ve(()=>{qe.replace()})},mzl_collapsed(){Ve(()=>{qe.replace()})},pzl_collapsed(){Ve(()=>{qe.replace()})},ezl_collapsed(){Ve(()=>{qe.replace()})},bzl_collapsed(){Ve(()=>{qe.replace()})},all_collapsed(n){this.collapseAll(n),Ve(()=>{qe.replace()})},settingsChanged(n){this.$store.state.settingsChanged=n,Ve(()=>{qe.replace()})},isLoading(){Ve(()=>{qe.replace()})},searchPersonality(n){n==""&&this.filterPersonalities()},mzdc_collapsed(){Ve(()=>{qe.replace()})}},async beforeRouteLeave(n){if(await this.$router.isReady(),this.settingsChanged)return await this.$store.state.yesNoDialog.askQuestion(`Did You forget to apply changes? -You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},pe=n=>(vo("data-v-c5d36a6c"),n=n(),So(),n),Krt={class:"container overflow-y-scroll flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},jrt={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},Qrt={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Xrt=pe(()=>u("i",{"data-feather":"x"},null,-1)),Zrt=[Xrt],Jrt=pe(()=>u("i",{"data-feather":"check"},null,-1)),eot=[Jrt],tot={key:1,class:"flex gap-3 flex-1 items-center"},not=pe(()=>u("i",{"data-feather":"save"},null,-1)),iot=[not],sot=pe(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),rot=[sot],oot=pe(()=>u("i",{"data-feather":"list"},null,-1)),aot=[oot],lot={class:"flex gap-3 flex-1 items-center justify-end"},cot=pe(()=>u("i",{"data-feather":"trash-2"},null,-1)),dot=[cot],uot=pe(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),pot=[uot],_ot=pe(()=>u("i",{"data-feather":"arrow-up-circle"},null,-1)),hot={key:0},fot=pe(()=>u("i",{"data-feather":"alert-circle"},null,-1)),mot=[fot],got={class:"flex gap-3 items-center"},bot={key:0,class:"flex gap-3 items-center"},Eot=pe(()=>u("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),vot=pe(()=>u("i",{"data-feather":"check"},null,-1)),Sot=[vot],yot={key:1,role:"status"},Tot=pe(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),xot=pe(()=>u("span",{class:"sr-only"},"Loading...",-1)),Cot={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Rot={class:"flex flex-row p-3"},Aot=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),wot=[Aot],Not=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Oot=[Not],Iot=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Mot=pe(()=>u("div",{class:"mr-2"},"|",-1)),Dot={class:"text-base font-semibold cursor-pointer select-none items-center"},kot={class:"flex gap-2 items-center"},Lot={key:0},Pot={class:"flex gap-2 items-center"},Uot=["src"],Fot={class:"font-bold font-large text-lg"},Bot={key:1},Got={class:"flex gap-2 items-center"},zot=["src"],Vot={class:"font-bold font-large text-lg"},Hot=pe(()=>u("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),qot={class:"font-bold font-large text-lg"},Yot=pe(()=>u("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),$ot={class:"font-bold font-large text-lg"},Wot={class:"mb-2"},Kot=pe(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[u("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),Ze(" CPU Ram usage: ")],-1)),jot={class:"flex flex-col mx-2"},Qot=pe(()=>u("b",null,"Avaliable ram: ",-1)),Xot=pe(()=>u("b",null,"Ram usage: ",-1)),Zot={class:"p-2"},Jot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},eat={class:"mb-2"},tat=pe(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Ze(" Disk usage: ")],-1)),nat={class:"flex flex-col mx-2"},iat=pe(()=>u("b",null,"Avaliable disk space: ",-1)),sat=pe(()=>u("b",null,"Disk usage: ",-1)),rat={class:"p-2"},oat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},aat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},lat=["src"],cat={class:"flex flex-col mx-2"},dat=pe(()=>u("b",null,"Model: ",-1)),uat=pe(()=>u("b",null,"Avaliable vram: ",-1)),pat=pe(()=>u("b",null,"GPU usage: ",-1)),_at={class:"p-2"},hat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},fat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},mat={class:"flex flex-row p-3"},gat=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),bat=[gat],Eat=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),vat=[Eat],Sat=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),yat={class:"flex flex-col mb-2 px-3 pb-2"},Tat={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},xat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),Cat={class:"text-center items-center"},Rat={class:"flex flex-row"},Aat=pe(()=>u("option",{value:"cpu"},"CPU",-1)),wat=pe(()=>u("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),Nat=pe(()=>u("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),Oat=pe(()=>u("option",{value:"nvidia"},"NVIDIA",-1)),Iat=pe(()=>u("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),Mat=pe(()=>u("option",{value:"amd"},"AMD",-1)),Dat=pe(()=>u("option",{value:"apple-intel"},"Apple Intel",-1)),kat=pe(()=>u("option",{value:"apple-silicon"},"Apple Silicon",-1)),Lat=[Aat,wat,Nat,Oat,Iat,Mat,Dat,kat],Pat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),Uat={style:{width:"100%"}},Fat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),Bat={class:"flex flex-row"},Gat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),zat={class:"flex flex-row"},Vat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),Hat={class:"flex flex-row"},qat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Yat={class:"flex flex-row"},$at=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Wat={class:"flex flex-row"},Kat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),jat={class:"flex flex-row"},Qat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Xat={class:"flex flex-row"},Zat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Jat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),elt={style:{width:"100%"}},tlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),nlt={style:{width:"100%"}},ilt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),slt={style:{width:"100%"}},rlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),olt={style:{width:"100%"}},alt={for:"avatar-upload"},llt=["src"],clt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),dlt={class:"flex flex-row"},ult=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"min_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),plt={style:{width:"100%"}},_lt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),flt={style:{width:"100%"}},mlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation:")],-1)),glt={style:{width:"100%"}},blt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Elt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),vlt={class:"flex flex-row"},Slt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_ltm",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Long term memory:")],-1)),ylt={class:"flex flex-row"},Tlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"summerize_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Continuous Learning from discussions:")],-1)),xlt={class:"flex flex-row"},Clt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),Rlt={class:"flex flex-row"},Alt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate data Vectorization:")],-1)),wlt={class:"flex flex-row"},Nlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),Olt={class:"flex flex-row"},Ilt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Mlt=pe(()=>u("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Dlt=pe(()=>u("option",{value:"model_embedding"},"Model Embedding",-1)),klt=[Mlt,Dlt],Llt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Plt=pe(()=>u("option",{value:"PCA"},"PCA",-1)),Ult=pe(()=>u("option",{value:"TSNE"},"TSNE",-1)),Flt=[Plt,Ult],Blt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Glt={class:"flex flex-row"},zlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Vlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Hlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),qlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ylt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),$lt={class:"flex flex-row"},Wlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),Klt={class:"flex flex-row"},jlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Qlt={class:"flex flex-row"},Xlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),Zlt={class:"flex flex-col"},Jlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),ect={class:"flex flex-col"},tct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),nct={class:"flex flex-col"},ict=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),sct={class:"flex flex-col"},rct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},oct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),act={class:"flex flex-row"},lct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},cct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),dct={class:"flex flex-row"},uct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),pct={class:"flex flex-row"},_ct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"force_output_language_to_be",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force AI to answer in this language:")],-1)),hct={class:"flex flex-row"},fct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),mct={class:"flex flex-row"},gct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},bct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Ect={class:"flex flex-row"},vct=["value"],Sct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},yct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),Tct={class:"flex flex-row"},xct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),Cct={class:"flex flex-row"},Rct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Act={class:"flex flex-row"},wct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Nct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),Oct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),Ict=["value"],Mct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Dct=["value"],kct={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Lct={class:"flex flex-row p-3"},Pct=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Uct=[Pct],Fct=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Bct=[Fct],Gct=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Servers configurations",-1)),zct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Hct={style:{width:"100%"}},qct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Yct={style:{width:"100%"}},$ct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),Wct={style:{width:"100%"}},Kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),Qct={class:"flex flex-row"},Xct=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Zct=[Xct],Jct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),edt={class:"flex flex-row"},tdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),ndt={class:"flex flex-row"},idt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},sdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),rdt={class:"flex flex-row"},odt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),adt=[odt],ldt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),cdt={class:"flex flex-row"},ddt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),udt={class:"flex flex-row"},pdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},_dt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),hdt={class:"flex flex-row"},fdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),mdt=[fdt],gdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),bdt={class:"flex flex-row"},Edt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),vdt={class:"flex flex-row"},Sdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ydt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),Tdt={class:"flex flex-row"},xdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Cdt=[xdt],Rdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Adt={class:"flex flex-row"},wdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),Ndt={class:"flex flex-row"},Odt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),Idt={class:"flex flex-col align-bottom"},Mdt={class:"relative"},Ddt=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),kdt={class:"absolute right-0"},Ldt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),Pdt={class:"flex flex-row"},Udt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),Fdt={class:"flex flex-row"},Bdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),Gdt={class:"flex flex-row"},zdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),Hdt={class:"flex flex-row"},qdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Ydt=[qdt],$dt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Wdt={class:"flex flex-row"},Kdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),jdt={class:"flex flex-row"},Qdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Xdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Zdt={class:"flex flex-row"},Jdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),eut={class:"flex flex-row"},tut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),nut={class:"flex flex-row"},iut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},sut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),rut={class:"flex flex-row"},out=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall xTTS service:")],-1)),aut={class:"flex flex-row"},lut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),cut={class:"flex flex-row"},dut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),uut={class:"flex flex-row"},put=["disabled"],_ut=["value"],hut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),fut={class:"flex flex-row"},mut=["disabled"],gut=["value"],but=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Eut={class:"flex flex-row"},vut=["disabled"],Sut={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},yut={class:"flex flex-row p-3"},Tut=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),xut=[Tut],Cut=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Rut=[Cut],Aut=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),wut={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Nut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Out={key:1,class:"mr-2"},Iut={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Mut={class:"flex gap-1 items-center"},Dut=["src"],kut={class:"font-bold font-large text-lg line-clamp-1"},Lut={key:0,class:"mb-2"},Put={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Uut=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),Fut=[Uut],But=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Gut=[But],zut={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vut={class:"flex flex-row p-3"},Hut=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),qut=[Hut],Yut=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),$ut=[Yut],Wut=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Kut={class:"flex flex-row items-center"},jut={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Qut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Xut={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Zut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Jut={key:2,class:"mr-2"},ept={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},tpt={class:"flex gap-1 items-center"},npt=["src"],ipt={class:"font-bold font-large text-lg line-clamp-1"},spt={class:"mx-2 mb-4"},rpt={class:"relative"},opt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},apt={key:0},lpt=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),cpt=[lpt],dpt={key:1},upt=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),ppt=[upt],_pt=pe(()=>u("label",{for:"only_installed"},"Show only installed models",-1)),hpt=pe(()=>u("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),fpt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},mpt=pe(()=>u("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),gpt=pe(()=>u("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),bpt=[mpt,gpt],Ept={key:1,class:"mb-2"},vpt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Spt=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),ypt=[Spt],Tpt=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),xpt=[Tpt],Cpt={class:"mb-2"},Rpt={class:"p-2"},Apt={class:"mb-3"},wpt=pe(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),Npt={key:0},Opt={class:"mb-3"},Ipt=pe(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),Mpt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Dpt=pe(()=>u("div",{role:"status",class:"justify-center"},null,-1)),kpt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Lpt={class:"w-full p-2"},Ppt={class:"flex justify-between mb-1"},Upt=zu(' Downloading Loading...',1),Fpt={class:"text-sm font-medium text-blue-700 dark:text-white"},Bpt=["title"],Gpt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},zpt={class:"flex justify-between mb-1"},Vpt={class:"text-base font-medium text-blue-700 dark:text-white"},Hpt={class:"text-sm font-medium text-blue-700 dark:text-white"},qpt={class:"flex flex-grow"},Ypt={class:"flex flex-row flex-grow gap-3"},$pt={class:"p-2 text-center grow"},Wpt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Kpt={class:"flex flex-row p-3 items-center"},jpt=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Qpt=[jpt],Xpt=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Zpt=[Xpt],Jpt=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),e_t={key:0,class:"mr-2"},t_t={class:"mr-2 font-bold font-large text-lg line-clamp-1"},n_t={key:1,class:"mr-2"},i_t={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},s_t={key:0,class:"flex -space-x-4 items-center"},r_t={class:"group items-center flex flex-row"},o_t=["onClick"],a_t=["src","title"],l_t=["onClick"],c_t=pe(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),d_t=[c_t],u_t=pe(()=>u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),p_t=[u_t],__t={class:"mx-2 mb-4"},h_t=pe(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),f_t={class:"relative"},m_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},g_t={key:0},b_t=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),E_t=[b_t],v_t={key:1},S_t=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),y_t=[S_t],T_t={key:0,class:"mx-2 mb-4"},x_t={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},C_t=["selected"],R_t={key:0,class:"mb-2"},A_t={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},w_t=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),N_t=[w_t],O_t=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),I_t=[O_t],M_t={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},D_t={class:"flex flex-row p-3 items-center"},k_t=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),L_t=[k_t],P_t=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),U_t=[P_t],F_t=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),B_t={key:0,class:"mr-2"},G_t={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},z_t={key:0,class:"flex -space-x-4 items-center"},V_t={class:"group items-center flex flex-row"},H_t=["src","title"],q_t=["onClick"],Y_t=pe(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),$_t=[Y_t],W_t={class:"mx-2 mb-4"},K_t=pe(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),j_t={class:"relative"},Q_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},X_t={key:0},Z_t=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),J_t=[Z_t],eht={key:1},tht=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),nht=[tht],iht={key:0,class:"mx-2 mb-4"},sht={for:"extCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},rht=["selected"],oht={key:0,class:"mb-2"},aht={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},lht=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),cht=[lht],dht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),uht=[dht],pht={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},_ht={class:"flex flex-row p-3 items-center"},hht=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),fht=[hht],mht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),ght=[mht],bht=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),Eht={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},vht={class:"flex flex-row"},Sht=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),yht=[Sht],Tht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),xht=[Tht],Cht=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Rht={class:"m-2"},Aht={class:"flex flex-row gap-2 items-center"},wht=pe(()=>u("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),Nht={class:"m-2"},Oht=pe(()=>u("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Iht={class:"m-2"},Mht={class:"flex flex-col align-bottom"},Dht={class:"relative"},kht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Lht={class:"absolute right-0"},Pht={class:"m-2"},Uht={class:"flex flex-col align-bottom"},Fht={class:"relative"},Bht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Ght={class:"absolute right-0"},zht={class:"m-2"},Vht={class:"flex flex-col align-bottom"},Hht={class:"relative"},qht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Yht={class:"absolute right-0"},$ht={class:"m-2"},Wht={class:"flex flex-col align-bottom"},Kht={class:"relative"},jht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Qht={class:"absolute right-0"},Xht={class:"m-2"},Zht={class:"flex flex-col align-bottom"},Jht={class:"relative"},eft=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),tft={class:"absolute right-0"},nft={class:"m-2"},ift={class:"flex flex-col align-bottom"},sft={class:"relative"},rft=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),oft={class:"absolute right-0"};function aft(n,e,t,i,s,r){const o=gt("Card"),a=gt("BindingEntry"),l=gt("RadioOptions"),c=gt("model-entry"),d=gt("personality-entry"),_=gt("ExtensionEntry"),f=gt("AddModelDialog"),m=gt("ChoiceDialog");return O(),D(Ke,null,[u("div",Krt,[u("div",jrt,[s.showConfirmation?(O(),D("div",Qrt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=xe(h=>s.showConfirmation=!1,["stop"]))},Zrt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=xe(h=>r.save_configuration(),["stop"]))},eot)])):W("",!0),s.showConfirmation?W("",!0):(O(),D("div",tot,[u("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=h=>s.showConfirmation=!0)},iot),u("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=h=>r.reset_configuration())},rot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=xe(h=>s.all_collapsed=!s.all_collapsed,["stop"]))},aot)])),u("div",lot,[u("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=h=>r.api_get_req("clear_uploads").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},dot),u("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=h=>r.api_get_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},pot),u("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=h=>r.api_get_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[_ot,s.has_updates?(O(),D("div",hot,mot)):W("",!0)]),u("div",got,[s.settingsChanged?(O(),D("div",bot,[Eot,s.isLoading?W("",!0):(O(),D("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=xe(h=>r.applyConfiguration(),["stop"]))},Sot))])):W("",!0),s.isLoading?(O(),D("div",yot,[u("p",null,ge(s.loading_text),1),Tot,xot])):W("",!0)])])]),u("div",{class:We(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[u("div",Cot,[u("div",Rot,[u("button",{onClick:e[9]||(e[9]=xe(h=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,wot,512),[[Dt,s.sc_collapsed]]),de(u("div",null,Oot,512),[[Dt,!s.sc_collapsed]]),Iot,Mot,u("div",Dot,[u("div",kot,[u("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(O(),D("div",Lot,[(O(!0),D(Ke,null,pt(r.vramUsage.gpus,h=>(O(),D("div",Pot,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Uot),u("h3",Fot,[u("div",null,ge(r.computedFileSize(h.used_vram))+" / "+ge(r.computedFileSize(h.total_vram))+" ("+ge(h.percentage)+"%) ",1)])]))),256))])):W("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(O(),D("div",Bot,[u("div",Got,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,zot),u("h3",Vot,[u("div",null,ge(r.vramUsage.gpus.length)+"x ",1)])])])):W("",!0)]),Hot,u("h3",qot,[u("div",null,ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+"%)",1)]),Yot,u("h3",$ot,[u("div",null,ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])])])])]),u("div",{class:We([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",Wot,[Kot,u("div",jot,[u("div",null,[Qot,Ze(ge(r.ram_available_space),1)]),u("div",null,[Xot,Ze(" "+ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+")% ",1)])]),u("div",Zot,[u("div",Jot,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+r.ram_percent_usage+"%;")},null,4)])])]),u("div",eat,[tat,u("div",nat,[u("div",null,[iat,Ze(ge(r.disk_available_space),1)]),u("div",null,[sat,Ze(" "+ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])]),u("div",rat,[u("div",oat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(O(!0),D(Ke,null,pt(r.vramUsage.gpus,h=>(O(),D("div",{class:"mb-2",key:h},[u("label",aat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,lat),Ze(" GPU usage: ")]),u("div",cat,[u("div",null,[dat,Ze(ge(h.gpu_model),1)]),u("div",null,[uat,Ze(ge(this.computedFileSize(h.available_space)),1)]),u("div",null,[pat,Ze(" "+ge(this.computedFileSize(h.used_vram))+" / "+ge(this.computedFileSize(h.total_vram))+" ("+ge(h.percentage)+"%)",1)])]),u("div",_at,[u("div",hat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+h.percentage+"%;")},null,4)])])]))),128))],2)]),u("div",fat,[u("div",mat,[u("button",{onClick:e[10]||(e[10]=xe(h=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,bat,512),[[Dt,s.minconf_collapsed]]),de(u("div",null,vat,512),[[Dt,!s.minconf_collapsed]]),Sat])]),u("div",{class:We([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",yat,[Ie(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Tat,[u("tr",null,[xat,u("td",Cat,[u("div",Rat,[de(u("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[11]||(e[11]=h=>r.configFile.hardware_mode=h),onChange:e[12]||(e[12]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},Lat,544),[[zn,r.configFile.hardware_mode]])])])]),u("tr",null,[Pat,u("td",Uat,[de(u("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[13]||(e[13]=h=>r.configFile.discussion_db_name=h),onChange:e[14]||(e[14]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.discussion_db_name]])])]),u("tr",null,[Fat,u("td",null,[u("div",Bat,[de(u("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[15]||(e[15]=h=>r.configFile.copy_to_clipboard_add_all_details=h),onChange:e[16]||(e[16]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.copy_to_clipboard_add_all_details]])])])]),u("tr",null,[Gat,u("td",null,[u("div",zat,[de(u("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=h=>r.configFile.auto_show_browser=h),onChange:e[18]||(e[18]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_show_browser]])])])]),u("tr",null,[Vat,u("td",null,[u("div",Hat,[de(u("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[19]||(e[19]=h=>r.configFile.debug=h),onChange:e[20]||(e[20]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.debug]])])])]),u("tr",null,[qat,u("td",null,[u("div",Yat,[de(u("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[21]||(e[21]=h=>r.configFile.debug_log_file_path=h),onChange:e[22]||(e[22]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.debug_log_file_path]])])])]),u("tr",null,[$at,u("td",null,[u("div",Wat,[de(u("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[23]||(e[23]=h=>r.configFile.auto_save=h),onChange:e[24]||(e[24]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_save]])])])]),u("tr",null,[Kat,u("td",null,[u("div",jat,[de(u("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[25]||(e[25]=h=>r.configFile.auto_update=h),onChange:e[26]||(e[26]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_update]])])])]),u("tr",null,[Qat,u("td",null,[u("div",Xat,[de(u("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[27]||(e[27]=h=>r.configFile.auto_title=h),onChange:e[28]||(e[28]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_title]])])])])])]),_:1}),Ie(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Zat,[u("tr",null,[Jat,u("td",elt,[de(u("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[29]||(e[29]=h=>r.configFile.user_name=h),onChange:e[30]||(e[30]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.user_name]])])]),u("tr",null,[tlt,u("td",nlt,[de(u("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[31]||(e[31]=h=>r.configFile.user_description=h),onChange:e[32]||(e[32]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.user_description]])])]),u("tr",null,[ilt,u("td",slt,[de(u("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[33]||(e[33]=h=>r.configFile.override_personality_model_parameters=h),onChange:e[34]||(e[34]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.override_personality_model_parameters]])])]),u("tr",null,[rlt,u("td",olt,[u("label",alt,[u("img",{src:"/user_infos/"+r.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,llt)]),u("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[35]||(e[35]=(...h)=>r.uploadAvatar&&r.uploadAvatar(...h))},null,32)])]),u("tr",null,[clt,u("td",null,[u("div",dlt,[de(u("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[36]||(e[36]=h=>r.configFile.use_user_name_in_discussions=h),onChange:e[37]||(e[37]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.use_user_name_in_discussions]])])])]),u("tr",null,[ult,u("td",plt,[de(u("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[38]||(e[38]=h=>r.configFile.min_n_predict=h),onChange:e[39]||(e[39]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.min_n_predict]])])])])]),_:1}),Ie(o,{title:"Code execution",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",_lt,[u("tr",null,[hlt,u("td",flt,[de(u("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[40]||(e[40]=h=>r.configFile.turn_on_code_execution=h),onChange:e[41]||(e[41]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.turn_on_code_execution]])])]),u("tr",null,[mlt,u("td",glt,[de(u("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[42]||(e[42]=h=>r.configFile.turn_on_code_validation=h),onChange:e[43]||(e[43]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.turn_on_code_validation]])])])])]),_:1}),Ie(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",blt,[u("tr",null,[Elt,u("td",null,[u("div",vlt,[de(u("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[44]||(e[44]=h=>r.configFile.use_files=h),onChange:e[45]||(e[45]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.use_files]])])])]),u("tr",null,[Slt,u("td",null,[u("div",ylt,[de(u("input",{type:"checkbox",id:"activate_ltm",required:"","onUpdate:modelValue":e[46]||(e[46]=h=>r.configFile.activate_ltm=h),onChange:e[47]||(e[47]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_ltm]])])])]),u("tr",null,[Tlt,u("td",null,[u("div",xlt,[de(u("input",{type:"checkbox",id:"summerize_discussion",required:"","onUpdate:modelValue":e[48]||(e[48]=h=>r.configFile.summerize_discussion=h),onChange:e[49]||(e[49]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.summerize_discussion]])])])]),u("tr",null,[Clt,u("td",null,[u("div",Rlt,[de(u("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[50]||(e[50]=h=>r.configFile.data_vectorization_visualize_on_vectorization=h),onChange:e[51]||(e[51]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),u("tr",null,[Alt,u("td",null,[u("div",wlt,[de(u("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[52]||(e[52]=h=>r.configFile.data_vectorization_activate=h),onChange:e[53]||(e[53]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_activate]])])])]),u("tr",null,[Nlt,u("td",null,[u("div",Olt,[de(u("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[54]||(e[54]=h=>r.configFile.data_vectorization_build_keys_words=h),onChange:e[55]||(e[55]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_build_keys_words]])])])]),u("tr",null,[Ilt,u("td",null,[de(u("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[56]||(e[56]=h=>r.configFile.data_vectorization_method=h),onChange:e[57]||(e[57]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},klt,544),[[zn,r.configFile.data_vectorization_method]])])]),u("tr",null,[Llt,u("td",null,[de(u("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[58]||(e[58]=h=>r.configFile.data_visualization_method=h),onChange:e[59]||(e[59]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Flt,544),[[zn,r.configFile.data_visualization_method]])])]),u("tr",null,[Blt,u("td",null,[u("div",Glt,[de(u("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[60]||(e[60]=h=>r.configFile.data_vectorization_save_db=h),onChange:e[61]||(e[61]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_save_db]])])])]),u("tr",null,[zlt,u("td",null,[de(u("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[62]||(e[62]=h=>r.configFile.data_vectorization_chunk_size=h),onChange:e[63]||(e[63]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_chunk_size]]),de(u("input",{"onUpdate:modelValue":e[64]||(e[64]=h=>r.configFile.data_vectorization_chunk_size=h),type:"number",onChange:e[65]||(e[65]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_chunk_size]])])]),u("tr",null,[Vlt,u("td",null,[de(u("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[66]||(e[66]=h=>r.configFile.data_vectorization_overlap_size=h),onChange:e[67]||(e[67]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_overlap_size]]),de(u("input",{"onUpdate:modelValue":e[68]||(e[68]=h=>r.configFile.data_vectorization_overlap_size=h),type:"number",onChange:e[69]||(e[69]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_overlap_size]])])]),u("tr",null,[Hlt,u("td",null,[de(u("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[70]||(e[70]=h=>r.configFile.data_vectorization_nb_chunks=h),onChange:e[71]||(e[71]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_nb_chunks]]),de(u("input",{"onUpdate:modelValue":e[72]||(e[72]=h=>r.configFile.data_vectorization_nb_chunks=h),type:"number",onChange:e[73]||(e[73]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),Ie(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",qlt,[u("tr",null,[Ylt,u("td",null,[u("div",$lt,[de(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[74]||(e[74]=h=>r.configFile.activate_internet_search=h),onChange:e[75]||(e[75]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_internet_search]])])])]),u("tr",null,[Wlt,u("td",null,[u("div",Klt,[de(u("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[76]||(e[76]=h=>r.configFile.internet_quick_search=h),onChange:e[77]||(e[77]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.internet_quick_search]])])])]),u("tr",null,[jlt,u("td",null,[u("div",Qlt,[de(u("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[78]||(e[78]=h=>r.configFile.internet_activate_search_decision=h),onChange:e[79]||(e[79]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.internet_activate_search_decision]])])])]),u("tr",null,[Xlt,u("td",null,[u("div",Zlt,[de(u("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[80]||(e[80]=h=>r.configFile.internet_vectorization_chunk_size=h),onChange:e[81]||(e[81]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_chunk_size]]),de(u("input",{"onUpdate:modelValue":e[82]||(e[82]=h=>r.configFile.internet_vectorization_chunk_size=h),type:"number",onChange:e[83]||(e[83]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_chunk_size]])])])]),u("tr",null,[Jlt,u("td",null,[u("div",ect,[de(u("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[84]||(e[84]=h=>r.configFile.internet_vectorization_overlap_size=h),onChange:e[85]||(e[85]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_overlap_size]]),de(u("input",{"onUpdate:modelValue":e[86]||(e[86]=h=>r.configFile.internet_vectorization_overlap_size=h),type:"number",onChange:e[87]||(e[87]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_overlap_size]])])])]),u("tr",null,[tct,u("td",null,[u("div",nct,[de(u("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[88]||(e[88]=h=>r.configFile.internet_vectorization_nb_chunks=h),onChange:e[89]||(e[89]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_nb_chunks]]),de(u("input",{"onUpdate:modelValue":e[90]||(e[90]=h=>r.configFile.internet_vectorization_nb_chunks=h),type:"number",onChange:e[91]||(e[91]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_nb_chunks]])])])]),u("tr",null,[ict,u("td",null,[u("div",sct,[de(u("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[92]||(e[92]=h=>r.configFile.internet_nb_search_pages=h),onChange:e[93]||(e[93]=h=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_nb_search_pages]]),de(u("input",{"onUpdate:modelValue":e[94]||(e[94]=h=>r.configFile.internet_nb_search_pages=h),type:"number",onChange:e[95]||(e[95]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1}),Ie(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",rct,[u("tr",null,[oct,u("td",null,[u("div",act,[de(u("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[96]||(e[96]=h=>r.configFile.pdf_latex_path=h),onChange:e[97]||(e[97]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),Ie(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",lct,[u("tr",null,[cct,u("td",null,[u("div",dct,[de(u("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[98]||(e[98]=h=>r.configFile.positive_boost=h),onChange:e[99]||(e[99]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.positive_boost]])])])]),u("tr",null,[uct,u("td",null,[u("div",pct,[de(u("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[100]||(e[100]=h=>r.configFile.negative_boost=h),onChange:e[101]||(e[101]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.negative_boost]])])])]),u("tr",null,[_ct,u("td",null,[u("div",hct,[de(u("input",{type:"text",id:"force_output_language_to_be",required:"","onUpdate:modelValue":e[102]||(e[102]=h=>r.configFile.force_output_language_to_be=h),onChange:e[103]||(e[103]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.force_output_language_to_be]])])])]),u("tr",null,[fct,u("td",null,[u("div",mct,[de(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[104]||(e[104]=h=>r.configFile.fun_mode=h),onChange:e[105]||(e[105]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.fun_mode]])])])])])]),_:1}),Ie(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",gct,[u("tr",null,[bct,u("td",null,[u("div",Ect,[de(u("select",{id:"whisper_model","onUpdate:modelValue":e[106]||(e[106]=h=>r.configFile.whisper_model=h),onChange:e[107]||(e[107]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(r.whisperModels,h=>(O(),D("option",{key:h,value:h},ge(h),9,vct))),128))],544),[[zn,r.configFile.whisper_model]])])])])])]),_:1}),Ie(o,{title:"Browser Audio",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Sct,[u("tr",null,[yct,u("td",null,[u("div",Tct,[de(u("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[108]||(e[108]=h=>r.configFile.activate_audio_infos=h),onChange:e[109]||(e[109]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_audio_infos]])])])]),u("tr",null,[xct,u("td",null,[u("div",Cct,[de(u("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[110]||(e[110]=h=>r.configFile.audio_auto_send_input=h),onChange:e[111]||(e[111]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.audio_auto_send_input]])])])]),u("tr",null,[Rct,u("td",null,[u("div",Act,[de(u("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[112]||(e[112]=h=>r.configFile.auto_speak=h),onChange:e[113]||(e[113]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_speak]])])])]),u("tr",null,[wct,u("td",null,[de(u("input",{id:"audio_pitch","onUpdate:modelValue":e[114]||(e[114]=h=>r.configFile.audio_pitch=h),onChange:e[115]||(e[115]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.audio_pitch]]),de(u("input",{"onUpdate:modelValue":e[116]||(e[116]=h=>r.configFile.audio_pitch=h),onChange:e[117]||(e[117]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.audio_pitch]])])]),u("tr",null,[Nct,u("td",null,[de(u("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[118]||(e[118]=h=>r.configFile.audio_silenceTimer=h),onChange:e[119]||(e[119]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.audio_silenceTimer]]),de(u("input",{"onUpdate:modelValue":e[120]||(e[120]=h=>r.configFile.audio_silenceTimer=h),onChange:e[121]||(e[121]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.audio_silenceTimer]])])]),u("tr",null,[Oct,u("td",null,[de(u("select",{id:"audio_in_language","onUpdate:modelValue":e[122]||(e[122]=h=>r.configFile.audio_in_language=h),onChange:e[123]||(e[123]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(r.audioLanguages,h=>(O(),D("option",{key:h.code,value:h.code},ge(h.name),9,Ict))),128))],544),[[zn,r.configFile.audio_in_language]])])]),u("tr",null,[Mct,u("td",null,[de(u("select",{id:"audio_out_voice","onUpdate:modelValue":e[124]||(e[124]=h=>r.configFile.audio_out_voice=h),onChange:e[125]||(e[125]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(s.audioVoices,h=>(O(),D("option",{key:h.name,value:h.name},ge(h.name),9,Dct))),128))],544),[[zn,r.configFile.audio_out_voice]])])])])]),_:1})])],2)]),u("div",kct,[u("div",Lct,[u("button",{onClick:e[126]||(e[126]=xe(h=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,Uct,512),[[Dt,s.servers_conf_collapsed]]),de(u("div",null,Bct,512),[[Dt,!s.servers_conf_collapsed]]),Gct])]),u("div",{class:We([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Ie(o,{title:"Lollms service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",zct,[u("tr",null,[Vct,u("td",Hct,[de(u("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[127]||(e[127]=h=>r.configFile.host=h),onChange:e[128]||(e[128]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.host]])])]),u("tr",null,[qct,u("td",Yct,[de(u("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[129]||(e[129]=h=>r.configFile.port=h),onChange:e[130]||(e[130]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.port]])])]),u("tr",null,[$ct,u("td",Wct,[de(u("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[131]||(e[131]=h=>r.configFile.headless_server_mode=h),onChange:e[132]||(e[132]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[mt,r.configFile.headless_server_mode]])])])])]),_:1}),Ie(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Kct,[u("tr",null,[jct,u("td",null,[u("div",Qct,[de(u("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[133]||(e[133]=h=>r.configFile.enable_sd_service=h),onChange:e[134]||(e[134]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_sd_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[135]||(e[135]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Zct)])]),u("tr",null,[Jct,u("td",null,[u("div",edt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[136]||(e[136]=(...h)=>r.reinstallSDService&&r.reinstallSDService(...h))},"install sd service")])])]),u("tr",null,[tdt,u("td",null,[u("div",ndt,[de(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[137]||(e[137]=h=>r.configFile.sd_base_url=h),onChange:e[138]||(e[138]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.sd_base_url]])])])])])]),_:1}),Ie(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",idt,[u("tr",null,[sdt,u("td",null,[u("div",rdt,[de(u("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[139]||(e[139]=h=>r.configFile.enable_motion_ctrl_service=h),onChange:e[140]||(e[140]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_motion_ctrl_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[141]||(e[141]=h=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},adt)])]),u("tr",null,[ldt,u("td",null,[u("div",cdt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[142]||(e[142]=(...h)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(...h))},"install Motion Ctrl service")])])]),u("tr",null,[ddt,u("td",null,[u("div",udt,[de(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[143]||(e[143]=h=>r.configFile.sd_base_url=h),onChange:e[144]||(e[144]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.sd_base_url]])])])])])]),_:1}),Ie(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",pdt,[u("tr",null,[_dt,u("td",null,[u("div",hdt,[de(u("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[145]||(e[145]=h=>r.configFile.enable_ollama_service=h),onChange:e[146]||(e[146]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_ollama_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[147]||(e[147]=h=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},pe=n=>(vo("data-v-c5d36a6c"),n=n(),So(),n),Krt={class:"container overflow-y-scroll flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},jrt={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},Qrt={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Xrt=pe(()=>u("i",{"data-feather":"x"},null,-1)),Zrt=[Xrt],Jrt=pe(()=>u("i",{"data-feather":"check"},null,-1)),eot=[Jrt],tot={key:1,class:"flex gap-3 flex-1 items-center"},not=pe(()=>u("i",{"data-feather":"save"},null,-1)),iot=[not],sot=pe(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),rot=[sot],oot=pe(()=>u("i",{"data-feather":"list"},null,-1)),aot=[oot],lot={class:"flex gap-3 flex-1 items-center justify-end"},cot=pe(()=>u("i",{"data-feather":"trash-2"},null,-1)),dot=[cot],uot=pe(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),pot=[uot],_ot=pe(()=>u("i",{"data-feather":"arrow-up-circle"},null,-1)),hot={key:0},fot=pe(()=>u("i",{"data-feather":"alert-circle"},null,-1)),mot=[fot],got={class:"flex gap-3 items-center"},bot={key:0,class:"flex gap-3 items-center"},Eot=pe(()=>u("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),vot=pe(()=>u("i",{"data-feather":"check"},null,-1)),Sot=[vot],yot={key:1,role:"status"},Tot=pe(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),xot=pe(()=>u("span",{class:"sr-only"},"Loading...",-1)),Cot={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Rot={class:"flex flex-row p-3"},Aot=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),wot=[Aot],Not=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Oot=[Not],Iot=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Mot=pe(()=>u("div",{class:"mr-2"},"|",-1)),Dot={class:"text-base font-semibold cursor-pointer select-none items-center"},kot={class:"flex gap-2 items-center"},Lot={key:0},Pot={class:"flex gap-2 items-center"},Uot=["src"],Fot={class:"font-bold font-large text-lg"},Bot={key:1},Got={class:"flex gap-2 items-center"},zot=["src"],Vot={class:"font-bold font-large text-lg"},Hot=pe(()=>u("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),qot={class:"font-bold font-large text-lg"},Yot=pe(()=>u("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),$ot={class:"font-bold font-large text-lg"},Wot={class:"mb-2"},Kot=pe(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[u("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),Ze(" CPU Ram usage: ")],-1)),jot={class:"flex flex-col mx-2"},Qot=pe(()=>u("b",null,"Avaliable ram: ",-1)),Xot=pe(()=>u("b",null,"Ram usage: ",-1)),Zot={class:"p-2"},Jot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},eat={class:"mb-2"},tat=pe(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Ze(" Disk usage: ")],-1)),nat={class:"flex flex-col mx-2"},iat=pe(()=>u("b",null,"Avaliable disk space: ",-1)),sat=pe(()=>u("b",null,"Disk usage: ",-1)),rat={class:"p-2"},oat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},aat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},lat=["src"],cat={class:"flex flex-col mx-2"},dat=pe(()=>u("b",null,"Model: ",-1)),uat=pe(()=>u("b",null,"Avaliable vram: ",-1)),pat=pe(()=>u("b",null,"GPU usage: ",-1)),_at={class:"p-2"},hat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},fat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},mat={class:"flex flex-row p-3"},gat=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),bat=[gat],Eat=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),vat=[Eat],Sat=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),yat={class:"flex flex-col mb-2 px-3 pb-2"},Tat={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},xat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),Cat={class:"text-center items-center"},Rat={class:"flex flex-row"},Aat=pe(()=>u("option",{value:"cpu"},"CPU",-1)),wat=pe(()=>u("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),Nat=pe(()=>u("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),Oat=pe(()=>u("option",{value:"nvidia"},"NVIDIA",-1)),Iat=pe(()=>u("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),Mat=pe(()=>u("option",{value:"amd"},"AMD",-1)),Dat=pe(()=>u("option",{value:"apple-intel"},"Apple Intel",-1)),kat=pe(()=>u("option",{value:"apple-silicon"},"Apple Silicon",-1)),Lat=[Aat,wat,Nat,Oat,Iat,Mat,Dat,kat],Pat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),Uat={style:{width:"100%"}},Fat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),Bat={class:"flex flex-row"},Gat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),zat={class:"flex flex-row"},Vat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),Hat={class:"flex flex-row"},qat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Yat={class:"flex flex-row"},$at=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Wat={class:"flex flex-row"},Kat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),jat={class:"flex flex-row"},Qat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Xat={class:"flex flex-row"},Zat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Jat=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),elt={style:{width:"100%"}},tlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),nlt={style:{width:"100%"}},ilt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),slt={style:{width:"100%"}},rlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),olt={style:{width:"100%"}},alt={for:"avatar-upload"},llt=["src"],clt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),dlt={class:"flex flex-row"},ult=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"min_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),plt={style:{width:"100%"}},_lt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),flt={style:{width:"100%"}},mlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation:")],-1)),glt={style:{width:"100%"}},blt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Elt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),vlt={class:"flex flex-row"},Slt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Long term memory:")],-1)),ylt={class:"flex flex-row"},Tlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"summerize_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Continuous Learning from discussions:")],-1)),xlt={class:"flex flex-row"},Clt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),Rlt={class:"flex flex-row"},Alt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate data Vectorization:")],-1)),wlt={class:"flex flex-row"},Nlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),Olt={class:"flex flex-row"},Ilt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Mlt=pe(()=>u("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Dlt=pe(()=>u("option",{value:"model_embedding"},"Model Embedding",-1)),klt=[Mlt,Dlt],Llt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Plt=pe(()=>u("option",{value:"PCA"},"PCA",-1)),Ult=pe(()=>u("option",{value:"TSNE"},"TSNE",-1)),Flt=[Plt,Ult],Blt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Glt={class:"flex flex-row"},zlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Vlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Hlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),qlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ylt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),$lt={class:"flex flex-row"},Wlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),Klt={class:"flex flex-row"},jlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Qlt={class:"flex flex-row"},Xlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),Zlt={class:"flex flex-col"},Jlt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),ect={class:"flex flex-col"},tct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),nct={class:"flex flex-col"},ict=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),sct={class:"flex flex-col"},rct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},oct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),act={class:"flex flex-row"},lct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},cct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),dct={class:"flex flex-row"},uct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),pct={class:"flex flex-row"},_ct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"force_output_language_to_be",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force AI to answer in this language:")],-1)),hct={class:"flex flex-row"},fct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),mct={class:"flex flex-row"},gct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},bct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Ect={class:"flex flex-row"},vct=["value"],Sct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},yct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),Tct={class:"flex flex-row"},xct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),Cct={class:"flex flex-row"},Rct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Act={class:"flex flex-row"},wct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Nct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),Oct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),Ict=["value"],Mct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Dct=["value"],kct={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Lct={class:"flex flex-row p-3"},Pct=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Uct=[Pct],Fct=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Bct=[Fct],Gct=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Servers configurations",-1)),zct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Hct={style:{width:"100%"}},qct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Yct={style:{width:"100%"}},$ct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),Wct={style:{width:"100%"}},Kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),Qct={class:"flex flex-row"},Xct=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Zct=[Xct],Jct=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),edt={class:"flex flex-row"},tdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),ndt={class:"flex flex-row"},idt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},sdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),rdt={class:"flex flex-row"},odt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),adt=[odt],ldt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),cdt={class:"flex flex-row"},ddt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),udt={class:"flex flex-row"},pdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},_dt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),hdt={class:"flex flex-row"},fdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),mdt=[fdt],gdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),bdt={class:"flex flex-row"},Edt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),vdt={class:"flex flex-row"},Sdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ydt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),Tdt={class:"flex flex-row"},xdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Cdt=[xdt],Rdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Adt={class:"flex flex-row"},wdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),Ndt={class:"flex flex-row"},Odt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),Idt={class:"flex flex-col align-bottom"},Mdt={class:"relative"},Ddt=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),kdt={class:"absolute right-0"},Ldt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),Pdt={class:"flex flex-row"},Udt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),Fdt={class:"flex flex-row"},Bdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),Gdt={class:"flex flex-row"},zdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),Hdt={class:"flex flex-row"},qdt=pe(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Ydt=[qdt],$dt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Wdt={class:"flex flex-row"},Kdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),jdt={class:"flex flex-row"},Qdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Xdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Zdt={class:"flex flex-row"},Jdt=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),eut={class:"flex flex-row"},tut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),nut={class:"flex flex-row"},iut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},sut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),rut={class:"flex flex-row"},out=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall xTTS service:")],-1)),aut={class:"flex flex-row"},lut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),cut={class:"flex flex-row"},dut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),uut={class:"flex flex-row"},put=["disabled"],_ut=["value"],hut=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),fut={class:"flex flex-row"},mut=["disabled"],gut=["value"],but=pe(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Eut={class:"flex flex-row"},vut=["disabled"],Sut={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},yut={class:"flex flex-row p-3"},Tut=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),xut=[Tut],Cut=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Rut=[Cut],Aut=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),wut={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Nut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Out={key:1,class:"mr-2"},Iut={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Mut={class:"flex gap-1 items-center"},Dut=["src"],kut={class:"font-bold font-large text-lg line-clamp-1"},Lut={key:0,class:"mb-2"},Put={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Uut=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),Fut=[Uut],But=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Gut=[But],zut={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vut={class:"flex flex-row p-3"},Hut=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),qut=[Hut],Yut=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),$ut=[Yut],Wut=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Kut={class:"flex flex-row items-center"},jut={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Qut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Xut={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Zut=pe(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Jut={key:2,class:"mr-2"},ept={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},tpt={class:"flex gap-1 items-center"},npt=["src"],ipt={class:"font-bold font-large text-lg line-clamp-1"},spt={class:"mx-2 mb-4"},rpt={class:"relative"},opt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},apt={key:0},lpt=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),cpt=[lpt],dpt={key:1},upt=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),ppt=[upt],_pt=pe(()=>u("label",{for:"only_installed"},"Show only installed models",-1)),hpt=pe(()=>u("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),fpt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},mpt=pe(()=>u("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),gpt=pe(()=>u("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),bpt=[mpt,gpt],Ept={key:1,class:"mb-2"},vpt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Spt=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),ypt=[Spt],Tpt=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),xpt=[Tpt],Cpt={class:"mb-2"},Rpt={class:"p-2"},Apt={class:"mb-3"},wpt=pe(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),Npt={key:0},Opt={class:"mb-3"},Ipt=pe(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),Mpt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Dpt=pe(()=>u("div",{role:"status",class:"justify-center"},null,-1)),kpt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Lpt={class:"w-full p-2"},Ppt={class:"flex justify-between mb-1"},Upt=zu(' Downloading Loading...',1),Fpt={class:"text-sm font-medium text-blue-700 dark:text-white"},Bpt=["title"],Gpt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},zpt={class:"flex justify-between mb-1"},Vpt={class:"text-base font-medium text-blue-700 dark:text-white"},Hpt={class:"text-sm font-medium text-blue-700 dark:text-white"},qpt={class:"flex flex-grow"},Ypt={class:"flex flex-row flex-grow gap-3"},$pt={class:"p-2 text-center grow"},Wpt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Kpt={class:"flex flex-row p-3 items-center"},jpt=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Qpt=[jpt],Xpt=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Zpt=[Xpt],Jpt=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),e_t={key:0,class:"mr-2"},t_t={class:"mr-2 font-bold font-large text-lg line-clamp-1"},n_t={key:1,class:"mr-2"},i_t={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},s_t={key:0,class:"flex -space-x-4 items-center"},r_t={class:"group items-center flex flex-row"},o_t=["onClick"],a_t=["src","title"],l_t=["onClick"],c_t=pe(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),d_t=[c_t],u_t=pe(()=>u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),p_t=[u_t],__t={class:"mx-2 mb-4"},h_t=pe(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),f_t={class:"relative"},m_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},g_t={key:0},b_t=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),E_t=[b_t],v_t={key:1},S_t=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),y_t=[S_t],T_t={key:0,class:"mx-2 mb-4"},x_t={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},C_t=["selected"],R_t={key:0,class:"mb-2"},A_t={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},w_t=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),N_t=[w_t],O_t=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),I_t=[O_t],M_t={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},D_t={class:"flex flex-row p-3 items-center"},k_t=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),L_t=[k_t],P_t=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),U_t=[P_t],F_t=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),B_t={key:0,class:"mr-2"},G_t={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},z_t={key:0,class:"flex -space-x-4 items-center"},V_t={class:"group items-center flex flex-row"},H_t=["src","title"],q_t=["onClick"],Y_t=pe(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),$_t=[Y_t],W_t={class:"mx-2 mb-4"},K_t=pe(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),j_t={class:"relative"},Q_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},X_t={key:0},Z_t=pe(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),J_t=[Z_t],eht={key:1},tht=pe(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),nht=[tht],iht={key:0,class:"mx-2 mb-4"},sht={for:"extCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},rht=["selected"],oht={key:0,class:"mb-2"},aht={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},lht=pe(()=>u("i",{"data-feather":"chevron-up"},null,-1)),cht=[lht],dht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),uht=[dht],pht={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},_ht={class:"flex flex-row p-3 items-center"},hht=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),fht=[hht],mht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),ght=[mht],bht=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),Eht={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},vht={class:"flex flex-row"},Sht=pe(()=>u("i",{"data-feather":"chevron-right"},null,-1)),yht=[Sht],Tht=pe(()=>u("i",{"data-feather":"chevron-down"},null,-1)),xht=[Tht],Cht=pe(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Rht={class:"m-2"},Aht={class:"flex flex-row gap-2 items-center"},wht=pe(()=>u("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),Nht={class:"m-2"},Oht=pe(()=>u("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Iht={class:"m-2"},Mht={class:"flex flex-col align-bottom"},Dht={class:"relative"},kht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Lht={class:"absolute right-0"},Pht={class:"m-2"},Uht={class:"flex flex-col align-bottom"},Fht={class:"relative"},Bht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Ght={class:"absolute right-0"},zht={class:"m-2"},Vht={class:"flex flex-col align-bottom"},Hht={class:"relative"},qht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Yht={class:"absolute right-0"},$ht={class:"m-2"},Wht={class:"flex flex-col align-bottom"},Kht={class:"relative"},jht=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Qht={class:"absolute right-0"},Xht={class:"m-2"},Zht={class:"flex flex-col align-bottom"},Jht={class:"relative"},eft=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),tft={class:"absolute right-0"},nft={class:"m-2"},ift={class:"flex flex-col align-bottom"},sft={class:"relative"},rft=pe(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),oft={class:"absolute right-0"};function aft(n,e,t,i,s,r){const o=gt("Card"),a=gt("BindingEntry"),l=gt("RadioOptions"),c=gt("model-entry"),d=gt("personality-entry"),_=gt("ExtensionEntry"),f=gt("AddModelDialog"),m=gt("ChoiceDialog");return O(),D(Ke,null,[u("div",Krt,[u("div",jrt,[s.showConfirmation?(O(),D("div",Qrt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=xe(h=>s.showConfirmation=!1,["stop"]))},Zrt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=xe(h=>r.save_configuration(),["stop"]))},eot)])):W("",!0),s.showConfirmation?W("",!0):(O(),D("div",tot,[u("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=h=>s.showConfirmation=!0)},iot),u("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=h=>r.reset_configuration())},rot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=xe(h=>s.all_collapsed=!s.all_collapsed,["stop"]))},aot)])),u("div",lot,[u("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=h=>r.api_get_req("clear_uploads").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},dot),u("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=h=>r.api_get_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},pot),u("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=h=>r.api_get_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[_ot,s.has_updates?(O(),D("div",hot,mot)):W("",!0)]),u("div",got,[s.settingsChanged?(O(),D("div",bot,[Eot,s.isLoading?W("",!0):(O(),D("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=xe(h=>r.applyConfiguration(),["stop"]))},Sot))])):W("",!0),s.isLoading?(O(),D("div",yot,[u("p",null,ge(s.loading_text),1),Tot,xot])):W("",!0)])])]),u("div",{class:We(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[u("div",Cot,[u("div",Rot,[u("button",{onClick:e[9]||(e[9]=xe(h=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,wot,512),[[Dt,s.sc_collapsed]]),de(u("div",null,Oot,512),[[Dt,!s.sc_collapsed]]),Iot,Mot,u("div",Dot,[u("div",kot,[u("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(O(),D("div",Lot,[(O(!0),D(Ke,null,pt(r.vramUsage.gpus,h=>(O(),D("div",Pot,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Uot),u("h3",Fot,[u("div",null,ge(r.computedFileSize(h.used_vram))+" / "+ge(r.computedFileSize(h.total_vram))+" ("+ge(h.percentage)+"%) ",1)])]))),256))])):W("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(O(),D("div",Bot,[u("div",Got,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,zot),u("h3",Vot,[u("div",null,ge(r.vramUsage.gpus.length)+"x ",1)])])])):W("",!0)]),Hot,u("h3",qot,[u("div",null,ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+"%)",1)]),Yot,u("h3",$ot,[u("div",null,ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])])])])]),u("div",{class:We([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",Wot,[Kot,u("div",jot,[u("div",null,[Qot,Ze(ge(r.ram_available_space),1)]),u("div",null,[Xot,Ze(" "+ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+")% ",1)])]),u("div",Zot,[u("div",Jot,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+r.ram_percent_usage+"%;")},null,4)])])]),u("div",eat,[tat,u("div",nat,[u("div",null,[iat,Ze(ge(r.disk_available_space),1)]),u("div",null,[sat,Ze(" "+ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])]),u("div",rat,[u("div",oat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(O(!0),D(Ke,null,pt(r.vramUsage.gpus,h=>(O(),D("div",{class:"mb-2",key:h},[u("label",aat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,lat),Ze(" GPU usage: ")]),u("div",cat,[u("div",null,[dat,Ze(ge(h.gpu_model),1)]),u("div",null,[uat,Ze(ge(this.computedFileSize(h.available_space)),1)]),u("div",null,[pat,Ze(" "+ge(this.computedFileSize(h.used_vram))+" / "+ge(this.computedFileSize(h.total_vram))+" ("+ge(h.percentage)+"%)",1)])]),u("div",_at,[u("div",hat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:nn("width: "+h.percentage+"%;")},null,4)])])]))),128))],2)]),u("div",fat,[u("div",mat,[u("button",{onClick:e[10]||(e[10]=xe(h=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,bat,512),[[Dt,s.minconf_collapsed]]),de(u("div",null,vat,512),[[Dt,!s.minconf_collapsed]]),Sat])]),u("div",{class:We([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",yat,[Ie(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Tat,[u("tr",null,[xat,u("td",Cat,[u("div",Rat,[de(u("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[11]||(e[11]=h=>r.configFile.hardware_mode=h),onChange:e[12]||(e[12]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},Lat,544),[[zn,r.configFile.hardware_mode]])])])]),u("tr",null,[Pat,u("td",Uat,[de(u("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[13]||(e[13]=h=>r.configFile.discussion_db_name=h),onChange:e[14]||(e[14]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.discussion_db_name]])])]),u("tr",null,[Fat,u("td",null,[u("div",Bat,[de(u("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[15]||(e[15]=h=>r.configFile.copy_to_clipboard_add_all_details=h),onChange:e[16]||(e[16]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.copy_to_clipboard_add_all_details]])])])]),u("tr",null,[Gat,u("td",null,[u("div",zat,[de(u("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=h=>r.configFile.auto_show_browser=h),onChange:e[18]||(e[18]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_show_browser]])])])]),u("tr",null,[Vat,u("td",null,[u("div",Hat,[de(u("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[19]||(e[19]=h=>r.configFile.debug=h),onChange:e[20]||(e[20]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.debug]])])])]),u("tr",null,[qat,u("td",null,[u("div",Yat,[de(u("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[21]||(e[21]=h=>r.configFile.debug_log_file_path=h),onChange:e[22]||(e[22]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.debug_log_file_path]])])])]),u("tr",null,[$at,u("td",null,[u("div",Wat,[de(u("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[23]||(e[23]=h=>r.configFile.auto_save=h),onChange:e[24]||(e[24]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_save]])])])]),u("tr",null,[Kat,u("td",null,[u("div",jat,[de(u("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[25]||(e[25]=h=>r.configFile.auto_update=h),onChange:e[26]||(e[26]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_update]])])])]),u("tr",null,[Qat,u("td",null,[u("div",Xat,[de(u("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[27]||(e[27]=h=>r.configFile.auto_title=h),onChange:e[28]||(e[28]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_title]])])])])])]),_:1}),Ie(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Zat,[u("tr",null,[Jat,u("td",elt,[de(u("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[29]||(e[29]=h=>r.configFile.user_name=h),onChange:e[30]||(e[30]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.user_name]])])]),u("tr",null,[tlt,u("td",nlt,[de(u("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[31]||(e[31]=h=>r.configFile.user_description=h),onChange:e[32]||(e[32]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.user_description]])])]),u("tr",null,[ilt,u("td",slt,[de(u("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[33]||(e[33]=h=>r.configFile.override_personality_model_parameters=h),onChange:e[34]||(e[34]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.override_personality_model_parameters]])])]),u("tr",null,[rlt,u("td",olt,[u("label",alt,[u("img",{src:"/user_infos/"+r.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,llt)]),u("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[35]||(e[35]=(...h)=>r.uploadAvatar&&r.uploadAvatar(...h))},null,32)])]),u("tr",null,[clt,u("td",null,[u("div",dlt,[de(u("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[36]||(e[36]=h=>r.configFile.use_user_name_in_discussions=h),onChange:e[37]||(e[37]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.use_user_name_in_discussions]])])])]),u("tr",null,[ult,u("td",plt,[de(u("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[38]||(e[38]=h=>r.configFile.min_n_predict=h),onChange:e[39]||(e[39]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.min_n_predict]])])])])]),_:1}),Ie(o,{title:"Code execution",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",_lt,[u("tr",null,[hlt,u("td",flt,[de(u("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[40]||(e[40]=h=>r.configFile.turn_on_code_execution=h),onChange:e[41]||(e[41]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.turn_on_code_execution]])])]),u("tr",null,[mlt,u("td",glt,[de(u("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[42]||(e[42]=h=>r.configFile.turn_on_code_validation=h),onChange:e[43]||(e[43]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.turn_on_code_validation]])])])])]),_:1}),Ie(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",blt,[u("tr",null,[Elt,u("td",null,[u("div",vlt,[de(u("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[44]||(e[44]=h=>r.configFile.use_files=h),onChange:e[45]||(e[45]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.use_files]])])])]),u("tr",null,[Slt,u("td",null,[u("div",ylt,[de(u("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[46]||(e[46]=h=>r.configFile.activate_skills_lib=h),onChange:e[47]||(e[47]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_skills_lib]])])])]),u("tr",null,[Tlt,u("td",null,[u("div",xlt,[de(u("input",{type:"checkbox",id:"summerize_discussion",required:"","onUpdate:modelValue":e[48]||(e[48]=h=>r.configFile.summerize_discussion=h),onChange:e[49]||(e[49]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.summerize_discussion]])])])]),u("tr",null,[Clt,u("td",null,[u("div",Rlt,[de(u("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[50]||(e[50]=h=>r.configFile.data_vectorization_visualize_on_vectorization=h),onChange:e[51]||(e[51]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),u("tr",null,[Alt,u("td",null,[u("div",wlt,[de(u("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[52]||(e[52]=h=>r.configFile.data_vectorization_activate=h),onChange:e[53]||(e[53]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_activate]])])])]),u("tr",null,[Nlt,u("td",null,[u("div",Olt,[de(u("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[54]||(e[54]=h=>r.configFile.data_vectorization_build_keys_words=h),onChange:e[55]||(e[55]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_build_keys_words]])])])]),u("tr",null,[Ilt,u("td",null,[de(u("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[56]||(e[56]=h=>r.configFile.data_vectorization_method=h),onChange:e[57]||(e[57]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},klt,544),[[zn,r.configFile.data_vectorization_method]])])]),u("tr",null,[Llt,u("td",null,[de(u("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[58]||(e[58]=h=>r.configFile.data_visualization_method=h),onChange:e[59]||(e[59]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Flt,544),[[zn,r.configFile.data_visualization_method]])])]),u("tr",null,[Blt,u("td",null,[u("div",Glt,[de(u("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[60]||(e[60]=h=>r.configFile.data_vectorization_save_db=h),onChange:e[61]||(e[61]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.data_vectorization_save_db]])])])]),u("tr",null,[zlt,u("td",null,[de(u("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[62]||(e[62]=h=>r.configFile.data_vectorization_chunk_size=h),onChange:e[63]||(e[63]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_chunk_size]]),de(u("input",{"onUpdate:modelValue":e[64]||(e[64]=h=>r.configFile.data_vectorization_chunk_size=h),type:"number",onChange:e[65]||(e[65]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_chunk_size]])])]),u("tr",null,[Vlt,u("td",null,[de(u("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[66]||(e[66]=h=>r.configFile.data_vectorization_overlap_size=h),onChange:e[67]||(e[67]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_overlap_size]]),de(u("input",{"onUpdate:modelValue":e[68]||(e[68]=h=>r.configFile.data_vectorization_overlap_size=h),type:"number",onChange:e[69]||(e[69]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_overlap_size]])])]),u("tr",null,[Hlt,u("td",null,[de(u("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[70]||(e[70]=h=>r.configFile.data_vectorization_nb_chunks=h),onChange:e[71]||(e[71]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.data_vectorization_nb_chunks]]),de(u("input",{"onUpdate:modelValue":e[72]||(e[72]=h=>r.configFile.data_vectorization_nb_chunks=h),type:"number",onChange:e[73]||(e[73]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),Ie(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",qlt,[u("tr",null,[Ylt,u("td",null,[u("div",$lt,[de(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[74]||(e[74]=h=>r.configFile.activate_internet_search=h),onChange:e[75]||(e[75]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_internet_search]])])])]),u("tr",null,[Wlt,u("td",null,[u("div",Klt,[de(u("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[76]||(e[76]=h=>r.configFile.internet_quick_search=h),onChange:e[77]||(e[77]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.internet_quick_search]])])])]),u("tr",null,[jlt,u("td",null,[u("div",Qlt,[de(u("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[78]||(e[78]=h=>r.configFile.internet_activate_search_decision=h),onChange:e[79]||(e[79]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.internet_activate_search_decision]])])])]),u("tr",null,[Xlt,u("td",null,[u("div",Zlt,[de(u("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[80]||(e[80]=h=>r.configFile.internet_vectorization_chunk_size=h),onChange:e[81]||(e[81]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_chunk_size]]),de(u("input",{"onUpdate:modelValue":e[82]||(e[82]=h=>r.configFile.internet_vectorization_chunk_size=h),type:"number",onChange:e[83]||(e[83]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_chunk_size]])])])]),u("tr",null,[Jlt,u("td",null,[u("div",ect,[de(u("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[84]||(e[84]=h=>r.configFile.internet_vectorization_overlap_size=h),onChange:e[85]||(e[85]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_overlap_size]]),de(u("input",{"onUpdate:modelValue":e[86]||(e[86]=h=>r.configFile.internet_vectorization_overlap_size=h),type:"number",onChange:e[87]||(e[87]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_overlap_size]])])])]),u("tr",null,[tct,u("td",null,[u("div",nct,[de(u("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[88]||(e[88]=h=>r.configFile.internet_vectorization_nb_chunks=h),onChange:e[89]||(e[89]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_vectorization_nb_chunks]]),de(u("input",{"onUpdate:modelValue":e[90]||(e[90]=h=>r.configFile.internet_vectorization_nb_chunks=h),type:"number",onChange:e[91]||(e[91]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_vectorization_nb_chunks]])])])]),u("tr",null,[ict,u("td",null,[u("div",sct,[de(u("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[92]||(e[92]=h=>r.configFile.internet_nb_search_pages=h),onChange:e[93]||(e[93]=h=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.internet_nb_search_pages]]),de(u("input",{"onUpdate:modelValue":e[94]||(e[94]=h=>r.configFile.internet_nb_search_pages=h),type:"number",onChange:e[95]||(e[95]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1}),Ie(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",rct,[u("tr",null,[oct,u("td",null,[u("div",act,[de(u("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[96]||(e[96]=h=>r.configFile.pdf_latex_path=h),onChange:e[97]||(e[97]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),Ie(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",lct,[u("tr",null,[cct,u("td",null,[u("div",dct,[de(u("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[98]||(e[98]=h=>r.configFile.positive_boost=h),onChange:e[99]||(e[99]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.positive_boost]])])])]),u("tr",null,[uct,u("td",null,[u("div",pct,[de(u("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[100]||(e[100]=h=>r.configFile.negative_boost=h),onChange:e[101]||(e[101]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.negative_boost]])])])]),u("tr",null,[_ct,u("td",null,[u("div",hct,[de(u("input",{type:"text",id:"force_output_language_to_be",required:"","onUpdate:modelValue":e[102]||(e[102]=h=>r.configFile.force_output_language_to_be=h),onChange:e[103]||(e[103]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.force_output_language_to_be]])])])]),u("tr",null,[fct,u("td",null,[u("div",mct,[de(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[104]||(e[104]=h=>r.configFile.fun_mode=h),onChange:e[105]||(e[105]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.fun_mode]])])])])])]),_:1}),Ie(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",gct,[u("tr",null,[bct,u("td",null,[u("div",Ect,[de(u("select",{id:"whisper_model","onUpdate:modelValue":e[106]||(e[106]=h=>r.configFile.whisper_model=h),onChange:e[107]||(e[107]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(r.whisperModels,h=>(O(),D("option",{key:h,value:h},ge(h),9,vct))),128))],544),[[zn,r.configFile.whisper_model]])])])])])]),_:1}),Ie(o,{title:"Browser Audio",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Sct,[u("tr",null,[yct,u("td",null,[u("div",Tct,[de(u("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[108]||(e[108]=h=>r.configFile.activate_audio_infos=h),onChange:e[109]||(e[109]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.activate_audio_infos]])])])]),u("tr",null,[xct,u("td",null,[u("div",Cct,[de(u("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[110]||(e[110]=h=>r.configFile.audio_auto_send_input=h),onChange:e[111]||(e[111]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.audio_auto_send_input]])])])]),u("tr",null,[Rct,u("td",null,[u("div",Act,[de(u("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[112]||(e[112]=h=>r.configFile.auto_speak=h),onChange:e[113]||(e[113]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.auto_speak]])])])]),u("tr",null,[wct,u("td",null,[de(u("input",{id:"audio_pitch","onUpdate:modelValue":e[114]||(e[114]=h=>r.configFile.audio_pitch=h),onChange:e[115]||(e[115]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.audio_pitch]]),de(u("input",{"onUpdate:modelValue":e[116]||(e[116]=h=>r.configFile.audio_pitch=h),onChange:e[117]||(e[117]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.audio_pitch]])])]),u("tr",null,[Nct,u("td",null,[de(u("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[118]||(e[118]=h=>r.configFile.audio_silenceTimer=h),onChange:e[119]||(e[119]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ue,r.configFile.audio_silenceTimer]]),de(u("input",{"onUpdate:modelValue":e[120]||(e[120]=h=>r.configFile.audio_silenceTimer=h),onChange:e[121]||(e[121]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.audio_silenceTimer]])])]),u("tr",null,[Oct,u("td",null,[de(u("select",{id:"audio_in_language","onUpdate:modelValue":e[122]||(e[122]=h=>r.configFile.audio_in_language=h),onChange:e[123]||(e[123]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(r.audioLanguages,h=>(O(),D("option",{key:h.code,value:h.code},ge(h.name),9,Ict))),128))],544),[[zn,r.configFile.audio_in_language]])])]),u("tr",null,[Mct,u("td",null,[de(u("select",{id:"audio_out_voice","onUpdate:modelValue":e[124]||(e[124]=h=>r.configFile.audio_out_voice=h),onChange:e[125]||(e[125]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(O(!0),D(Ke,null,pt(s.audioVoices,h=>(O(),D("option",{key:h.name,value:h.name},ge(h.name),9,Dct))),128))],544),[[zn,r.configFile.audio_out_voice]])])])])]),_:1})])],2)]),u("div",kct,[u("div",Lct,[u("button",{onClick:e[126]||(e[126]=xe(h=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[de(u("div",null,Uct,512),[[Dt,s.servers_conf_collapsed]]),de(u("div",null,Bct,512),[[Dt,!s.servers_conf_collapsed]]),Gct])]),u("div",{class:We([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Ie(o,{title:"Lollms service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",zct,[u("tr",null,[Vct,u("td",Hct,[de(u("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[127]||(e[127]=h=>r.configFile.host=h),onChange:e[128]||(e[128]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.host]])])]),u("tr",null,[qct,u("td",Yct,[de(u("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[129]||(e[129]=h=>r.configFile.port=h),onChange:e[130]||(e[130]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ue,r.configFile.port]])])]),u("tr",null,[$ct,u("td",Wct,[de(u("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[131]||(e[131]=h=>r.configFile.headless_server_mode=h),onChange:e[132]||(e[132]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[mt,r.configFile.headless_server_mode]])])])])]),_:1}),Ie(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Kct,[u("tr",null,[jct,u("td",null,[u("div",Qct,[de(u("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[133]||(e[133]=h=>r.configFile.enable_sd_service=h),onChange:e[134]||(e[134]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_sd_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[135]||(e[135]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Zct)])]),u("tr",null,[Jct,u("td",null,[u("div",edt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[136]||(e[136]=(...h)=>r.reinstallSDService&&r.reinstallSDService(...h))},"install sd service")])])]),u("tr",null,[tdt,u("td",null,[u("div",ndt,[de(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[137]||(e[137]=h=>r.configFile.sd_base_url=h),onChange:e[138]||(e[138]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.sd_base_url]])])])])])]),_:1}),Ie(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",idt,[u("tr",null,[sdt,u("td",null,[u("div",rdt,[de(u("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[139]||(e[139]=h=>r.configFile.enable_motion_ctrl_service=h),onChange:e[140]||(e[140]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_motion_ctrl_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[141]||(e[141]=h=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},adt)])]),u("tr",null,[ldt,u("td",null,[u("div",cdt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[142]||(e[142]=(...h)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(...h))},"install Motion Ctrl service")])])]),u("tr",null,[ddt,u("td",null,[u("div",udt,[de(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[143]||(e[143]=h=>r.configFile.sd_base_url=h),onChange:e[144]||(e[144]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.sd_base_url]])])])])])]),_:1}),Ie(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",pdt,[u("tr",null,[_dt,u("td",null,[u("div",hdt,[de(u("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[145]||(e[145]=h=>r.configFile.enable_ollama_service=h),onChange:e[146]||(e[146]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_ollama_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[147]||(e[147]=h=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. Here is how you can do that`))},mdt)])]),u("tr",null,[gdt,u("td",null,[u("div",bdt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[148]||(e[148]=(...h)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(...h))},"install ollama service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[149]||(e[149]=(...h)=>r.startollamaService&&r.startollamaService(...h))},"start ollama service")])])]),u("tr",null,[Edt,u("td",null,[u("div",vdt,[de(u("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[150]||(e[150]=h=>r.configFile.ollama_base_url=h),onChange:e[151]||(e[151]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ue,r.configFile.ollama_base_url]])])])])])]),_:1}),Ie(o,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:nt(()=>[u("table",Sdt,[u("tr",null,[ydt,u("td",null,[u("div",Tdt,[de(u("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[152]||(e[152]=h=>r.configFile.enable_vllm_service=h),onChange:e[153]||(e[153]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[mt,r.configFile.enable_vllm_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[154]||(e[154]=h=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. @@ -203,7 +203,7 @@ Error: `+e.error,4,!1);this.loading=!1},async unmount_personality(n){if(!n)retur `+n.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Ve(()=>{qe.replace()})}},async select_personality(n){if(!n)return{status:!1,error:"no personality - select_personality"};const e=n.language===null?n.full_path:n.full_path+":"+n.language;console.log("Selecting personality ",e);const i={id:this.$store.state.config.personalities.findIndex(s=>s===e)};try{const s=await Le.post("/select_personality",i);if(s)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),s.data}catch(s){console.log(s.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(n){n.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const t=new MouseEvent("click");e.dispatchEvent(t)},setModel(n){console.log("Setting model to "+n.name),this.selecting_model=!0,this.selectedModel=n,Le.post("/update_setting",{setting_name:"model_name",setting_value:n.name}).then(async e=>{console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_database(){Le.get("/download_database")},remove_file(n){Le.get("/remove_file",{name:n}).then(e=>{console.log(e)})},clear_files(){Le.get("/clear_personality_files_list").then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,i=24*1024;let s=0,r=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,l=s+a.byteLength>=n.size;Xe.emit("send_file_chunk",{filename:n.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:r}),s+=a.byteLength,r++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(s,s+i);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(n){this.showPersonalities=!this.showPersonalities},handleOnTalk(n){this.showPersonalities=!1,this.onTalk(n)},onMountFun(n){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(n){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(n){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(n){return Ve(()=>{qe.replace()}),ss(n)},removeItem(n){console.log(n),Le.post("/remove_file",{file:n}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n){this.$emit("messageSentEvent",n)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){Xe.emit("take_picture"),Xe.on("picture_taken",()=>{Le.get("/get_current_personality_files_list").then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const i=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[t];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{t++,i()})};i()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){Ve(()=>{qe.replace()})},loading(n,e){Ve(()=>{qe.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let i=0;i{qe.replace()})},activated(){Ve(()=>{qe.replace()})}},zt=n=>(vo("data-v-124561ad"),n=n(),So(),n),nEt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center p-4"},iEt={key:0,class:"items-center gap-2 rounded-lg border bg-white p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900 w-fit"},sEt={class:"flex"},rEt=["title"],oEt=zt(()=>u("i",{"data-feather":"list"},null,-1)),aEt=[oEt],lEt={key:0},cEt={class:"flex flex-col max-h-64"},dEt=["title"],uEt={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},pEt={key:0,filesList:"",role:"status"},_Et=zt(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),hEt=zt(()=>u("span",{class:"sr-only"},"Loading...",-1)),fEt=[_Et,hEt],mEt=zt(()=>u("div",null,[u("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),gEt=zt(()=>u("div",{class:"grow"},null,-1)),bEt={class:"flex flex-row items-center"},EEt={class:"whitespace-nowrap"},vEt=["onClick"],SEt=zt(()=>u("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),yEt=[SEt],TEt={key:1,class:"flex mx-1 w-500"},xEt={class:"whitespace-nowrap flex flex-row gap-2"},CEt=zt(()=>u("p",{class:"font-bold"}," Total size: ",-1)),REt=zt(()=>u("div",{class:"grow"},null,-1)),AEt=zt(()=>u("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),wEt=[AEt],NEt=zt(()=>u("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),OEt=[NEt],IEt={key:2,class:"mx-1"},MEt={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},DEt={role:"status"},kEt=["src"],LEt=zt(()=>u("span",{class:"sr-only"},"Selecting model...",-1)),PEt={class:"flex w-fit pb-3 relative grow w-full"},UEt={class:"relative grow flex h-15 cursor-pointer select-none items-center gap-2 rounded-lg border bg-white p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900",tabindex:"0"},FEt={key:0,title:"Waiting for reply"},BEt=["src"],GEt=zt(()=>u("div",{role:"status"},[u("span",{class:"sr-only"},"Loading...")],-1)),zEt={key:1,class:"w-fit group relative"},VEt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},HEt={key:0,class:"group items-center flex flex-row"},qEt=["onClick"],YEt=["src","title"],$Et={class:"group items-center flex flex-row"},WEt=["src","title"],KEt={class:"w-fit group relative"},jEt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},QEt={key:0,class:"group items-center flex flex-row"},XEt=["onClick"],ZEt=["src","title"],JEt=["onClick"],evt=zt(()=>u("span",{class:"hidden hover:block top-3 left-9 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),tvt=[evt],nvt={class:"w-fit"},ivt={class:"group relative w-12"},svt={width:"100",height:"50"},rvt=["fill"],ovt=["visibility"],avt=["visibility"],lvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"When enabled, the model will try to complement its answer with information queried from the web.")],-1)),cvt={class:"relative grow"},dvt={class:"group relative w-max"},uvt=zt(()=>u("i",{"data-feather":"send"},null,-1)),pvt=[uvt],_vt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),hvt={class:"group relative w-max"},fvt=zt(()=>u("i",{"data-feather":"mic"},null,-1)),mvt=[fvt],gvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),bvt={key:3,class:"group relative w-max"},Evt=zt(()=>u("i",{"data-feather":"file-plus"},null,-1)),vvt=[Evt],Svt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),yvt={class:"group relative w-max"},Tvt=zt(()=>u("i",{"data-feather":"camera"},null,-1)),xvt=[Tvt],Cvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),Rvt={class:"group relative w-max"},Avt=zt(()=>u("i",{"data-feather":"globe"},null,-1)),wvt=[Avt],Nvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),Ovt={class:"group relative w-max"},Ivt=zt(()=>u("i",{"data-feather":"message-square"},null,-1)),Mvt=[Ivt],Dvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),kvt={class:"group relative w-max"},Lvt=zt(()=>u("i",{"data-feather":"message-square"},null,-1)),Pvt=[Lvt],Uvt=zt(()=>u("div",{class:"pointer-events-none absolute -top-10 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),Fvt=zt(()=>u("div",{class:"ml-auto gap-2"},null,-1));function Bvt(n,e,t,i,s,r){const o=gt("MountedPersonalitiesList"),a=gt("MountedPersonalities"),l=gt("PersonalitiesCommands"),c=gt("UniversalForm");return O(),D(Ke,null,[u("form",null,[u("div",nEt,[s.filesList.length>0||s.showPersonalities?(O(),D("div",iEt,[u("div",sEt,[u("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=xe(d=>s.showfilesList=!s.showfilesList,["stop"]))},aEt,8,rEt)]),s.filesList.length>0&&s.showfilesList==!0?(O(),D("div",lEt,[u("div",cEt,[Ie(ks,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:nt(()=>[(O(!0),D(Ke,null,pt(s.filesList,(d,_)=>(O(),D("div",{key:_+"-"+d.name},[u("div",{class:"m-1",title:d.name},[u("div",uEt,[s.isFileSentList[_]?W("",!0):(O(),D("div",pEt,fEt)),mEt,u("div",{class:We(["line-clamp-1 w-3/5",s.isFileSentList[_]?"text-green-500":"text-red-200"])},ge(d.name),3),gEt,u("div",bEt,[u("p",EEt,ge(r.computedFileSize(d.size)),1),u("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(d)},yEt,8,vEt)])])],8,dEt)]))),128))]),_:1})])])):W("",!0),s.filesList.length>0?(O(),D("div",TEt,[u("div",xEt,[CEt,Ze(" "+ge(s.totalSize)+" ("+ge(s.filesList.length)+") ",1)]),REt,u("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...d)=>r.clear_files&&r.clear_files(...d))},wEt),u("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...d)=>r.download_database&&r.download_database(...d))},OEt)])):W("",!0),s.showPersonalities?(O(),D("div",IEt,[Ie(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":n.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):W("",!0)])):W("",!0),s.selecting_model?(O(),D("div",MEt,[u("div",DEt,[u("img",{src:s.loader_v0,class:"w-50 h-50"},null,8,kEt),LEt])])):W("",!0),u("div",PEt,[u("div",UEt,[t.loading?(O(),D("div",FEt,[u("img",{src:s.loader_v0},null,8,BEt),GEt])):W("",!0),t.loading?W("",!0):(O(),D("div",zEt,[u("div",VEt,[(O(!0),D(Ke,null,pt(r.installedModels,(d,_)=>(O(),D("div",{class:"w-full",key:_+"-"+d.name,ref_for:!0,ref:"installedModels"},[d.name!=r.model_name?(O(),D("div",HEt,[u("button",{onClick:xe(f=>r.setModel(d),["prevent"]),class:"w-8 h-8"},[u("img",{src:d.icon?d.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:d.name},null,8,YEt)],8,qEt)])):W("",!0)]))),128))]),u("div",$Et,[u("button",{onClick:e[3]||(e[3]=xe(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[u("img",{src:r.currentModel.icon?r.currentModel.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentModel?r.currentModel.name:"unknown"},null,8,WEt)])])])),u("div",KEt,[u("div",jEt,[(O(!0),D(Ke,null,pt(this.$store.state.mountedPersArr,(d,_)=>(O(),D("div",{class:"w-full",key:_+"-"+d.name,ref_for:!0,ref:"mountedPersonalities"},[_!=this.$store.state.config.active_personality_id?(O(),D("div",QEt,[u("button",{onClick:xe(f=>r.onPersonalitySelected(d),["prevent"]),class:"w-8 h-8"},[u("img",{src:s.bUrl+d.avatar,onError:e[4]||(e[4]=(...f)=>n.personalityImgPlacehodler&&n.personalityImgPlacehodler(...f)),class:We(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(d.full_path)?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,ZEt)],8,XEt),u("button",{onClick:xe(f=>r.unmountPersonality(d),["prevent"])},tvt,8,JEt)])):W("",!0)]))),128))]),Ie(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])]),u("div",nvt,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(O(),Mt(l,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):W("",!0)]),u("div",ivt,[u("button",{onClick:e[5]||(e[5]=xe((...d)=>r.toggleSwitch&&r.toggleSwitch(...d),["prevent"]))},[(O(),D("svg",svt,[u("rect",{x:"10",y:"15",width:"40",height:"20",rx:"12",ry:"12",fill:r.config.activate_internet_search?"green":"red"},null,8,rvt),u("circle",{cx:"20",cy:"25",r:"7",visibility:r.config.activate_internet_search?"hidden":"visible"},null,8,ovt),u("circle",{cx:"38",cy:"25",r:"7",visibility:r.config.activate_internet_search?"visible":"hidden"},null,8,avt)]))]),lvt]),u("div",cvt,[de(u("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[6]||(e[6]=d=>s.message=d),title:"Hold SHIFT + ENTER to add new line",class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[7]||(e[7]=Ar(xe(d=>r.submitOnEnter(d),["exact"]),["enter"]))},`\r `,544),[[Ue,s.message]])]),t.loading?(O(),D("button",{key:2,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[8]||(e[8]=xe((...d)=>r.stopGenerating&&r.stopGenerating(...d),["stop"]))}," Stop generating ")):W("",!0),u("div",dvt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[9]||(e[9]=(...d)=>r.submit&&r.submit(...d)),title:"Send",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},pvt)),_vt]),u("div",hvt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[10]||(e[10]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:We([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},mvt,2)),gvt]),t.loading?W("",!0):(O(),D("div",bvt,[u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[11]||(e[11]=(...d)=>r.addFiles&&r.addFiles(...d)),multiple:""},null,544),u("button",{type:"button",onClick:e[12]||(e[12]=xe((...d)=>r.add_file&&r.add_file(...d),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},vvt),Svt])),u("div",yvt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[13]||(e[13]=xe((...d)=>r.takePicture&&r.takePicture(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},xvt)),Cvt]),u("div",Rvt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[14]||(e[14]=xe((...d)=>r.addWebLink&&r.addWebLink(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},wvt)),Nvt]),u("div",Ovt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[15]||(e[15]=xe((...d)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...d),["stop"])),class:"w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90"},Mvt)),Dvt]),u("div",kvt,[t.loading?W("",!0):(O(),D("button",{key:0,type:"button",onClick:e[16]||(e[16]=xe((...d)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...d),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90"},Pvt)),Uvt])]),Fvt])])]),Ie(c,{ref:"universalForm",class:"z-20"},null,512)],64)}const EO=vt(tEt,[["render",Bvt],["__scopeId","data-v-124561ad"]]),Gvt={name:"WelcomeComponent",setup(){return{}}},zvt={class:"flex flex-col text-center"},Vvt=zu('
Logo

LoLLMS

One tool to rule them all


Welcome

Please create a new discussion or select existing one to start

',1),Hvt=[Vvt];function qvt(n,e,t,i,s,r){return O(),D("div",zvt,Hvt)}const vO=vt(Gvt,[["render",qvt]]);var Yvt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),ou=globalThis&&globalThis.__assign||function(){return ou=Object.assign||function(n){for(var e,t=1,i=arguments.length;t"u")return!1;var e=ai(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function sSt(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!xi(r)||!ls(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function rSt(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!xi(s)||!ls(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const oSt={name:"applyStyles",enabled:!0,phase:"write",fn:sSt,effect:rSt,requires:["computeStyles"]};function rs(n){return n.split("-")[0]}var ro=Math.max,du=Math.min,Sa=Math.round;function nb(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function AO(){return!/^((?!chrome|android).)*safari/i.test(nb())}function ya(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),s=1,r=1;e&&xi(n)&&(s=n.offsetWidth>0&&Sa(i.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Sa(i.height)/n.offsetHeight||1);var o=ho(n)?ai(n):window,a=o.visualViewport,l=!AO()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/s,d=(i.top+(l&&a?a.offsetTop:0))/r,_=i.width/s,f=i.height/r;return{width:_,height:f,top:d,right:c+_,bottom:d+f,left:c,x:c,y:d}}function LE(n){var e=ya(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function wO(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&kE(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function zs(n){return ai(n).getComputedStyle(n)}function aSt(n){return["table","td","th"].indexOf(ls(n))>=0}function Nr(n){return((ho(n)?n.ownerDocument:n.document)||window.document).documentElement}function cp(n){return ls(n)==="html"?n:n.assignedSlot||n.parentNode||(kE(n)?n.host:null)||Nr(n)}function kC(n){return!xi(n)||zs(n).position==="fixed"?null:n.offsetParent}function lSt(n){var e=/firefox/i.test(nb()),t=/Trident/i.test(nb());if(t&&xi(n)){var i=zs(n);if(i.position==="fixed")return null}var s=cp(n);for(kE(s)&&(s=s.host);xi(s)&&["html","body"].indexOf(ls(s))<0;){var r=zs(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Tc(n){for(var e=ai(n),t=kC(n);t&&aSt(t)&&zs(t).position==="static";)t=kC(t);return t&&(ls(t)==="html"||ls(t)==="body"&&zs(t).position==="static")?e:t||lSt(n)||e}function PE(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Ll(n,e,t){return ro(n,du(e,t))}function cSt(n,e,t){var i=Ll(n,e,t);return i>t?t:i}function NO(){return{top:0,right:0,bottom:0,left:0}}function OO(n){return Object.assign({},NO(),n)}function IO(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var dSt=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,OO(typeof e!="number"?e:IO(e,yc))};function uSt(n){var e,t=n.state,i=n.name,s=n.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=rs(t.placement),l=PE(a),c=[Xn,wi].indexOf(a)>=0,d=c?"height":"width";if(!(!r||!o)){var _=dSt(s.padding,t),f=LE(r),m=l==="y"?Qn:Xn,h=l==="y"?Ai:wi,E=t.rects.reference[d]+t.rects.reference[l]-o[l]-t.rects.popper[d],b=o[l]-t.rects.reference[l],g=Tc(r),v=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,S=E/2-b/2,T=_[m],C=v-f[d]-_[h],x=v/2-f[d]/2+S,N=Ll(T,x,C),R=l;t.modifiersData[i]=(e={},e[R]=N,e.centerOffset=N-x,e)}}function pSt(n){var e=n.state,t=n.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||wO(e.elements.popper,s)&&(e.elements.arrow=s))}const _St={name:"arrow",enabled:!0,phase:"main",fn:uSt,effect:pSt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ta(n){return n.split("-")[1]}var hSt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fSt(n,e){var t=n.x,i=n.y,s=e.devicePixelRatio||1;return{x:Sa(t*s)/s||0,y:Sa(i*s)/s||0}}function LC(n){var e,t=n.popper,i=n.popperRect,s=n.placement,r=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,d=n.roundOffsets,_=n.isFixed,f=o.x,m=f===void 0?0:f,h=o.y,E=h===void 0?0:h,b=typeof d=="function"?d({x:m,y:E}):{x:m,y:E};m=b.x,E=b.y;var g=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),S=Xn,T=Qn,C=window;if(c){var x=Tc(t),N="clientHeight",R="clientWidth";if(x===ai(t)&&(x=Nr(t),zs(x).position!=="static"&&a==="absolute"&&(N="scrollHeight",R="scrollWidth")),x=x,s===Qn||(s===Xn||s===wi)&&r===sc){T=Ai;var y=_&&x===C&&C.visualViewport?C.visualViewport.height:x[N];E-=y-i.height,E*=l?1:-1}if(s===Xn||(s===Qn||s===Ai)&&r===sc){S=wi;var A=_&&x===C&&C.visualViewport?C.visualViewport.width:x[R];m-=A-i.width,m*=l?1:-1}}var U=Object.assign({position:a},c&&hSt),F=d===!0?fSt({x:m,y:E},ai(t)):{x:m,y:E};if(m=F.x,E=F.y,l){var K;return Object.assign({},U,(K={},K[T]=v?"0":"",K[S]=g?"0":"",K.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",K))}return Object.assign({},U,(e={},e[T]=v?E+"px":"",e[S]=g?m+"px":"",e.transform="",e))}function mSt(n){var e=n.state,t=n.options,i=t.gpuAcceleration,s=i===void 0?!0:i,r=t.adaptive,o=r===void 0?!0:r,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:rs(e.placement),variation:Ta(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LC(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LC(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const gSt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mSt,data:{}};var Wc={passive:!0};function bSt(n){var e=n.state,t=n.instance,i=n.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=ai(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",t.update,Wc)}),a&&l.addEventListener("resize",t.update,Wc),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Wc)}),a&&l.removeEventListener("resize",t.update,Wc)}}const ESt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bSt,data:{}};var vSt={left:"right",right:"left",bottom:"top",top:"bottom"};function zd(n){return n.replace(/left|right|bottom|top/g,function(e){return vSt[e]})}var SSt={start:"end",end:"start"};function PC(n){return n.replace(/start|end/g,function(e){return SSt[e]})}function UE(n){var e=ai(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function FE(n){return ya(Nr(n)).left+UE(n).scrollLeft}function ySt(n,e){var t=ai(n),i=Nr(n),s=t.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=AO();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+FE(n),y:l}}function TSt(n){var e,t=Nr(n),i=UE(n),s=(e=n.ownerDocument)==null?void 0:e.body,r=ro(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=ro(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+FE(n),l=-i.scrollTop;return zs(s||t).direction==="rtl"&&(a+=ro(t.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function BE(n){var e=zs(n),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function MO(n){return["html","body","#document"].indexOf(ls(n))>=0?n.ownerDocument.body:xi(n)&&BE(n)?n:MO(cp(n))}function Pl(n,e){var t;e===void 0&&(e=[]);var i=MO(n),s=i===((t=n.ownerDocument)==null?void 0:t.body),r=ai(i),o=s?[r].concat(r.visualViewport||[],BE(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Pl(cp(o)))}function ib(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function xSt(n,e){var t=ya(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function UC(n,e,t){return e===CO?ib(ySt(n,t)):ho(e)?xSt(e,t):ib(TSt(Nr(n)))}function CSt(n){var e=Pl(cp(n)),t=["absolute","fixed"].indexOf(zs(n).position)>=0,i=t&&xi(n)?Tc(n):n;return ho(i)?e.filter(function(s){return ho(s)&&wO(s,i)&&ls(s)!=="body"}):[]}function RSt(n,e,t,i){var s=e==="clippingParents"?CSt(n):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,c){var d=UC(n,c,i);return l.top=ro(d.top,l.top),l.right=du(d.right,l.right),l.bottom=du(d.bottom,l.bottom),l.left=ro(d.left,l.left),l},UC(n,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function DO(n){var e=n.reference,t=n.element,i=n.placement,s=i?rs(i):null,r=i?Ta(i):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case Qn:l={x:o,y:e.y-t.height};break;case Ai:l={x:o,y:e.y+e.height};break;case wi:l={x:e.x+e.width,y:a};break;case Xn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?PE(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case va:l[c]=l[c]-(e[d]/2-t[d]/2);break;case sc:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function rc(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?n.placement:i,r=t.strategy,o=r===void 0?n.strategy:r,a=t.boundary,l=a===void 0?$vt:a,c=t.rootBoundary,d=c===void 0?CO:c,_=t.elementContext,f=_===void 0?fl:_,m=t.altBoundary,h=m===void 0?!1:m,E=t.padding,b=E===void 0?0:E,g=OO(typeof b!="number"?b:IO(b,yc)),v=f===fl?Wvt:fl,S=n.rects.popper,T=n.elements[h?v:f],C=RSt(ho(T)?T:T.contextElement||Nr(n.elements.popper),l,d,o),x=ya(n.elements.reference),N=DO({reference:x,element:S,strategy:"absolute",placement:s}),R=ib(Object.assign({},S,N)),y=f===fl?R:x,A={top:C.top-y.top+g.top,bottom:y.bottom-C.bottom+g.bottom,left:C.left-y.left+g.left,right:y.right-C.right+g.right},U=n.modifiersData.offset;if(f===fl&&U){var F=U[s];Object.keys(A).forEach(function(K){var L=[wi,Ai].indexOf(K)>=0?1:-1,H=[Qn,Ai].indexOf(K)>=0?"y":"x";A[K]+=F[H]*L})}return A}function ASt(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,r=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?RO:l,d=Ta(i),_=d?a?DC:DC.filter(function(h){return Ta(h)===d}):yc,f=_.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=_);var m=f.reduce(function(h,E){return h[E]=rc(n,{placement:E,boundary:s,rootBoundary:r,padding:o})[rs(E)],h},{});return Object.keys(m).sort(function(h,E){return m[h]-m[E]})}function wSt(n){if(rs(n)===DE)return[];var e=zd(n);return[PC(n),e,PC(e)]}function NSt(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,d=t.boundary,_=t.rootBoundary,f=t.altBoundary,m=t.flipVariations,h=m===void 0?!0:m,E=t.allowedAutoPlacements,b=e.options.placement,g=rs(b),v=g===b,S=l||(v||!h?[zd(b)]:wSt(b)),T=[b].concat(S).reduce(function(fe,ve){return fe.concat(rs(ve)===DE?ASt(e,{placement:ve,boundary:d,rootBoundary:_,padding:c,flipVariations:h,allowedAutoPlacements:E}):ve)},[]),C=e.rects.reference,x=e.rects.popper,N=new Map,R=!0,y=T[0],A=0;A=0,H=L?"width":"height",G=rc(e,{placement:U,boundary:d,rootBoundary:_,altBoundary:f,padding:c}),P=L?K?wi:Xn:K?Ai:Qn;C[H]>x[H]&&(P=zd(P));var j=zd(P),q=[];if(r&&q.push(G[F]<=0),a&&q.push(G[P]<=0,G[j]<=0),q.every(function(fe){return fe})){y=U,R=!1;break}N.set(U,q)}if(R)for(var Q=h?3:1,re=function(ve){var Ae=T.find(function(J){var me=N.get(J);if(me)return me.slice(0,ve).every(function(ee){return ee})});if(Ae)return y=Ae,"break"},te=Q;te>0;te--){var Z=re(te);if(Z==="break")break}e.placement!==y&&(e.modifiersData[i]._skip=!0,e.placement=y,e.reset=!0)}}const OSt={name:"flip",enabled:!0,phase:"main",fn:NSt,requiresIfExists:["offset"],data:{_skip:!1}};function FC(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function BC(n){return[Qn,wi,Ai,Xn].some(function(e){return n[e]>=0})}function ISt(n){var e=n.state,t=n.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=rc(e,{elementContext:"reference"}),a=rc(e,{altBoundary:!0}),l=FC(o,i),c=FC(a,s,r),d=BC(l),_=BC(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:_},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":_})}const MSt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ISt};function DSt(n,e,t){var i=rs(n),s=[Xn,Qn].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[Xn,wi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function kSt(n){var e=n.state,t=n.options,i=n.name,s=t.offset,r=s===void 0?[0,0]:s,o=RO.reduce(function(d,_){return d[_]=DSt(_,e.rects,r),d},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}const LSt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kSt};function PSt(n){var e=n.state,t=n.name;e.modifiersData[t]=DO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const USt={name:"popperOffsets",enabled:!0,phase:"read",fn:PSt,data:{}};function FSt(n){return n==="x"?"y":"x"}function BSt(n){var e=n.state,t=n.options,i=n.name,s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,_=t.padding,f=t.tether,m=f===void 0?!0:f,h=t.tetherOffset,E=h===void 0?0:h,b=rc(e,{boundary:l,rootBoundary:c,padding:_,altBoundary:d}),g=rs(e.placement),v=Ta(e.placement),S=!v,T=PE(g),C=FSt(T),x=e.modifiersData.popperOffsets,N=e.rects.reference,R=e.rects.popper,y=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,A=typeof y=="number"?{mainAxis:y,altAxis:y}:Object.assign({mainAxis:0,altAxis:0},y),U=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(x){if(r){var K,L=T==="y"?Qn:Xn,H=T==="y"?Ai:wi,G=T==="y"?"height":"width",P=x[T],j=P+b[L],q=P-b[H],Q=m?-R[G]/2:0,re=v===va?N[G]:R[G],te=v===va?-R[G]:-N[G],Z=e.elements.arrow,fe=m&&Z?LE(Z):{width:0,height:0},ve=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:NO(),Ae=ve[L],J=ve[H],me=Ll(0,N[G],fe[G]),ee=S?N[G]/2-Q-me-Ae-A.mainAxis:re-me-Ae-A.mainAxis,ye=S?-N[G]/2+Q+me+J+A.mainAxis:te+me+J+A.mainAxis,Oe=e.elements.arrow&&Tc(e.elements.arrow),k=Oe?T==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,B=(K=U==null?void 0:U[T])!=null?K:0,Y=P+ee-B-k,le=P+ye-B,ne=Ll(m?du(j,Y):j,P,m?ro(q,le):q);x[T]=ne,F[T]=ne-P}if(a){var Ce,we=T==="x"?Qn:Xn,V=T==="x"?Ai:wi,_e=x[C],ie=C==="y"?"height":"width",ae=_e+b[we],M=_e-b[V],I=[Qn,Xn].indexOf(g)!==-1,z=(Ce=U==null?void 0:U[C])!=null?Ce:0,he=I?ae:_e-N[ie]-R[ie]-z+A.altAxis,X=I?_e+N[ie]+R[ie]-z-A.altAxis:M,se=m&&I?cSt(he,_e,X):Ll(m?he:ae,_e,m?X:M);x[C]=se,F[C]=se-_e}e.modifiersData[i]=F}}const GSt={name:"preventOverflow",enabled:!0,phase:"main",fn:BSt,requiresIfExists:["offset"]};function zSt(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function VSt(n){return n===ai(n)||!xi(n)?UE(n):zSt(n)}function HSt(n){var e=n.getBoundingClientRect(),t=Sa(e.width)/n.offsetWidth||1,i=Sa(e.height)/n.offsetHeight||1;return t!==1||i!==1}function qSt(n,e,t){t===void 0&&(t=!1);var i=xi(e),s=xi(e)&&HSt(e),r=Nr(e),o=ya(n,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((ls(e)!=="body"||BE(r))&&(a=VSt(e)),xi(e)?(l=ya(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=FE(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function YSt(n){var e=new Map,t=new Set,i=[];n.forEach(function(r){e.set(r.name,r)});function s(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return n.forEach(function(r){t.has(r.name)||s(r)}),i}function $St(n){var e=YSt(n);return iSt.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function WSt(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function KSt(n){var e=n.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var GC={placement:"bottom",modifiers:[],strategy:"absolute"};function zC(){for(var n=arguments.length,e=new Array(n),t=0;t(vo("data-v-1421a879"),n=n(),So(),n),ZSt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},JSt={class:"flex flex-col text-center"},eyt={class:"flex flex-col text-center items-center"},tyt={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},nyt=Vt(()=>u("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:ga,alt:"Logo"},null,-1)),iyt={class:"flex flex-col items-start"},syt={class:"text-2xl"},ryt=Vt(()=>u("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),oyt=Vt(()=>u("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),ayt=Vt(()=>u("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),lyt=Vt(()=>u("p",{class:"text-2xl mb-10"},"Welcome",-1)),cyt={role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},dyt={class:"text-2xl animate-pulse mt-2"},uyt=Vt(()=>u("i",{"data-feather":"chevron-right"},null,-1)),pyt=[uyt],_yt=Vt(()=>u("i",{"data-feather":"chevron-left"},null,-1)),hyt=[_yt],fyt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},myt={class:"sticky z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md"},gyt={class:"flex-row p-4 flex items-center gap-3 flex-0"},byt=Vt(()=>u("i",{"data-feather":"plus"},null,-1)),Eyt=[byt],vyt=Vt(()=>u("i",{"data-feather":"check-square"},null,-1)),Syt=[vyt],yyt=Vt(()=>u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},[u("i",{"data-feather":"refresh-ccw"})],-1)),Tyt=Vt(()=>u("i",{"data-feather":"database"},null,-1)),xyt=[Tyt],Cyt=Vt(()=>u("i",{"data-feather":"log-in"},null,-1)),Ryt=[Cyt],Ayt={key:0,class:"dropdown"},wyt=Vt(()=>u("i",{"data-feather":"search"},null,-1)),Nyt=[wyt],Oyt=Vt(()=>u("i",{"data-feather":"save"},null,-1)),Iyt=[Oyt],Myt={key:2,class:"flex gap-3 flex-1 items-center duration-75"},Dyt=Vt(()=>u("i",{"data-feather":"x"},null,-1)),kyt=[Dyt],Lyt=Vt(()=>u("i",{"data-feather":"check"},null,-1)),Pyt=[Lyt],Uyt=["src"],Fyt={key:4,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Byt=Vt(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Gyt=[Byt],zyt={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},Vyt={class:"p-4 pt-2"},Hyt={class:"relative"},qyt=Vt(()=>u("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[u("div",{class:"scale-75"},[u("i",{"data-feather":"search"})])],-1)),Yyt={class:"absolute inset-y-0 right-0 flex items-center pr-3"},$yt=Vt(()=>u("i",{"data-feather":"x"},null,-1)),Wyt=[$yt],Kyt={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},jyt={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},Qyt={class:"flex flex-row flex-grow"},Xyt={key:0},Zyt={class:"flex flex-row"},Jyt={key:0,class:"flex gap-3"},e0t=Vt(()=>u("i",{"data-feather":"trash"},null,-1)),t0t=[e0t],n0t={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},i0t=Vt(()=>u("i",{"data-feather":"check"},null,-1)),s0t=[i0t],r0t=Vt(()=>u("i",{"data-feather":"x"},null,-1)),o0t=[r0t],a0t={class:"flex gap-3"},l0t=Vt(()=>u("i",{"data-feather":"log-out"},null,-1)),c0t=[l0t],d0t=Vt(()=>u("i",{"data-feather":"bookmark"},null,-1)),u0t=[d0t],p0t=Vt(()=>u("i",{"data-feather":"list"},null,-1)),_0t=[p0t],h0t={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},f0t={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},m0t=Vt(()=>u("p",{class:"px-3"},"No discussions are found",-1)),g0t=[m0t],b0t=Vt(()=>u("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),E0t={class:"ml-2"},v0t={key:1,class:"relative flex flex-col flex-grow w-full"},S0t={class:"container pt-4 pb-50 mb-50 w-full"},y0t=Vt(()=>u("div",null,[u("br"),u("br"),u("br"),u("br"),u("br"),u("br"),u("br")],-1)),T0t=Vt(()=>u("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),x0t={key:0,class:"bottom-0 flex flex-row items-center justify-center"},C0t={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},R0t={class:"text-2xl animate-pulse mt-2 text-white"},A0t={setup(){},data(){return{memory_icon:zO,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{addToMemory(){this.$store.state.messageBox.showMessage("This functionality is being developed. Please be patient")},add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},handleOk(){console.log("OK"),Xe.on("web_page_added",()=>{Le.get("/get_current_personality_files_list").then(n=>{this.filesList=n.data.files,console.log("this.filesList",this.filesList),this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})}),Xe.emit("add_webpage",{url:this.$refs.web_url_input_box.inputText})},show_progress(n){this.progress_visibility_val=!0},hide_progress(n){this.progress_visibility_val=!1},update_progress(n){console.log("Progress update"),this.progress_value=n.value},onSettingsBinding(){try{this.isLoading=!0,Le.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(n.data&&Object.keys(n.data).length>0?this.$store.state.universalForm.showForm(n.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Le.post("/set_active_binding_settings",e).then(t=>{t&&t.data?(console.log("binding set with new settings",t.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+t,4,!1),this.isLoading=!1)})}catch(t){this.$store.state.toast.showToast(`Did not get binding settings responses. - Endpoint error: `+t.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(n){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+n.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogSelected(n){console.log("Selected:",n)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(n){if(this.database_selectorDialogVisible=!1,(await Le.post("/select_database",{name:n},{headers:this.posts_headers})).status){console.log("Selected database"),this.$store.state.config=await Le.get("/get_config"),console.log("new config loaded :",this.$store.state.config);let t=await Le.get("/list_databases").data;console.log("New list of database: ",t),this.$store.state.databases=t,console.log("New list of database: ",this.$store.state.databases),location.reload()}},async toggleLTM(){this.$store.state.config.activate_ltm=!this.$store.state.config.activate_ltm,await this.applyConfiguration(),Xe.emit("upgrade_vectorization")},async applyConfiguration(){this.loading=!0;const n=await Le.post("/apply_settings",{config:this.$store.state.config});this.loading=!1,n.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ve(()=>{qe.replace()})},save_configuration(){this.showConfirmation=!1,Le.post("/save_settings",{}).then(n=>{if(n)return n.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),n.data}).catch(n=>(console.log(n.message,"save_configuration"),this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(n,e,t){console.log("sending",n),this.$store.state.toast.showToast(n,e,t)},togglePanel(){this.panelCollapsed=!this.panelCollapsed},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(n){try{const e=await Le.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const n=await Le.get("/list_discussions");if(n)return this.createDiscussionList(n.data),n.data}catch(n){return console.log("Error: Could not list discussions",n.message),[]}},load_discussion(n,e){n&&(console.log("Loading discussion",n),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(n,this.loading),Xe.on("discussion",t=>{console.log("Discussion recovered"),this.loading=!1,this.setDiscussionLoading(n,this.loading),t&&(this.discussionArr=t.filter(i=>i.message_type==this.msgTypes.MSG_TYPE_CHUNK||i.message_type==this.msgTypes.MSG_TYPE_FULL||i.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI||i.message_type==this.msgTypes.MSG_TYPE_CODE||i.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS||i.message_type==this.msgTypes.MSG_TYPE_UI),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),Xe.off("discussion")}),Xe.emit("load_discussion",{id:n}),console.log("here"))},recoverFiles(){console.log("Recovering files"),Le.get("/get_current_personality_files_list").then(n=>{this.$refs.chatBox.filesList=n.data.files,this.$refs.chatBox.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(n){try{this.loading=!0,Xe.on("discussion_created",e=>{Xe.off("discussion_created"),this.list_discussions().then(()=>{const t=this.list.findIndex(s=>s.id==e.id),i=this.list[t];this.selectDiscussion(i),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),Ve(()=>{const s=document.getElementById("dis-"+e.id);this.scrollToElement(s),console.log("Scrolling tp "+s)})})})}),console.log("new_discussion ",n),Xe.emit("new_discussion",{title:n})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(n){try{n&&(this.loading=!0,this.setDiscussionLoading(n,this.loading),await Le.post("/delete_discussion",{client_id:this.client_id,id:n},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(n,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async edit_title(n,e){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const t=await Le.post("/edit_title",{client_id:this.client_id,id:n,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(n,this.loading),t.status==200){const i=this.list.findIndex(r=>r.id==n),s=this.list[i];s.title=e,this.tempList=this.list}}}catch(t){console.log("Error: Could not edit title",t.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async make_title(n){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const e=await Le.post("/make_title",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(n,this.loading),e.status==200){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async delete_message(n){try{console.log(typeof n),console.log(typeof this.client_id),console.log(n),console.log(this.client_id);const e=await Le.post("/delete_message",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const n=this.discussionArr[this.discussionArr.length-1];n.status_message="Generation canceled"}if(Xe.emit("cancel_generation"),res)return res.data}catch(n){return console.log("Error: Could not stop generating",n.message),{}}},async message_rank_up(n){try{const e=await Le.post("/message_rank_up",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(n){try{const e=await Le.post("/message_rank_down",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(n,e,t){try{console.log(typeof this.client_id),console.log(typeof n),console.log(typeof e),console.log(typeof{audio_url:t});const i=await Le.post("/edit_message",{client_id:this.client_id,id:n,message:e,metadata:[{audio_url:t}]},{headers:this.posts_headers});if(i)return i.data}catch(i){return console.log("Error: Could not update message",i.message),{}}},async export_multiple_discussions(n,e){try{if(n.length>0){const t=await Le.post("/export_multiple_discussions",{discussion_ids:n,export_format:e},{headers:this.posts_headers});if(t)return t.data}}catch(t){return console.log("Error: Could not export multiple discussions",t.message),{}}},async import_multiple_discussions(n){try{if(n.length>0){console.log("sending import",n);const e=await Le.post("/import_multiple_discussions",{jArray:n},{headers:this.posts_headers});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(n=>n.title&&n.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(n){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}n&&(this.currentDiscussion===void 0?(this.currentDiscussion=n,this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})):this.currentDiscussion.id!=n.id&&(console.log("item",n),console.log("this.currentDiscussion",this.currentDiscussion),this.currentDiscussion=n,console.log("this.currentDiscussion",this.currentDiscussion),this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})),Ve(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const t=document.getElementById("messages-list");this.scrollBottom(t)}))},scrollToElement(n){n?n.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(n,e){try{const t=n.offsetTop;document.getElementById(e).scrollTo({top:t,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(n){n?n.scrollTo({top:n.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(n){n?n.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(n){let e={content:n.message,id:n.id,rank:0,sender:n.user,created_at:n.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),Ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},updateLastUserMsg(n){const e=this.discussionArr.indexOf(i=>i.id=n.user_id),t={binding:n.binding,content:n.message,created_at:n.created_at,type:n.type,finished_generating_at:n.finished_generating_at,id:n.user_id,model:n.model,personality:n.personality,sender:n.user,steps:[]};e!==-1&&(this.discussionArr[e]=t)},socketIOConnected(){return console.log("socketIOConnected"),this.$store.state.isConnected=!0,!0},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(n){n.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0),console.log("Making a new message"),console.log("New message",n);let e={sender:n.sender,message_type:n.message_type,sender_type:n.sender_type,content:n.content,id:n.id,discussion_id:n.discussion_id,parent_id:n.parent_id,binding:n.binding,model:n.model,personality:n.personality,created_at:n.created_at,finished_generating_at:n.finished_generating_at,rank:0,ui:n.ui,steps:[],parameters:n.parameters,metadata:n.metadata,open:n.open};e.status_message="Warming up",console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,n.message),console.log("infos",n)},talk(n){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(e=>{e&&(e.data.status?console.log("Already generating"):(console.log("Generating message from ",e.data.status),Xe.emit("generate_msg_from",{id:-1}),this.discussionArr.length>0&&Number(this.discussionArr[this.discussionArr.length-1].id)+1))}).catch(e=>{console.log("Error: Could not get generation status",e)})},createEmptyUserMessage(n){Xe.emit("create_empty_message",{type:0,message:n})},createEmptyAIMessage(){Xe.emit("create_empty_message",{type:1})},sendMsg(n){if(!n){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(e=>{if(e)if(e.data.status)console.log("Already generating");else{Xe.emit("generate_msg",{prompt:n});let t=0;this.discussionArr.length>0&&(t=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let i={message:n,id:t,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.msgTypes.MSG_TYPE_FULL,sender_type:this.senderTypes.SENDER_TYPES_USER,content:n,id:t,discussion_id:this.discussion_id,parent_id:t,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(i)}}).catch(e=>{console.log("Error: Could not get generation status",e)})},sendCmd(n){this.isGenerating=!0,Xe.emit("execute_command",{command:n,parameters:[]})},notify(n){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ve(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),n.display_type==0?this.$store.state.toast.showToast(n.content,n.duration,n.notification_type):n.display_type==1?this.$store.state.messageBox.showMessage(n.content):n.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(n.content,"Yes","No").then(e=>{Xe.emit("yesNoRes",{yesRes:e})})):n.display_type==3?this.$store.state.messageBox.showBlockingMessage(n.content):n.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},streamMessageContent(n){if(this.discussion_id=n.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];if(t&&(n.message_type==this.msgTypes.MSG_TYPE_FULL||n.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI))t.content=n.content,t.finished_generating_at=n.finished_generating_at;else if(t&&n.message_type==this.msgTypes.MSG_TYPE_CHUNK)this.isGenerating=!0,t.content+=n.content;else if(n.message_type==this.msgTypes.MSG_TYPE_STEP)t.status_message=n.content,t.steps.push({message:n.content,done:!0,status:!0,type:"instantanious"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_START)t.status_message=n.content,t.steps.push({message:n.content,done:!1,status:!0,type:"start_end"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_END){console.log("received step end",n);try{const i=t.steps.find(s=>s.message===n.content);if(i){i.done=!0;try{console.log(n.parameters);const s=n.parameters;s!=null&&(i.status=s.status,console.log(s))}catch(s){console.error("Error parsing JSON:",s.message)}}}catch{console.log("error")}}else n.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS?(console.log("JSON message"),console.log(n.metadata),t.metadata=n.metadata):n.message_type==this.msgTypes.MSG_TYPE_UI?(console.log("UI message"),t.ui=n.ui,console.log(t.ui)):n.message_type==this.msgTypes.MSG_TYPE_EXCEPTION&&this.$store.state.toast.showToast(n.content,5,!1)}this.$nextTick(()=>{qe.replace()})},async changeTitleUsingUserMSG(n,e){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];e&&(i.title=e,this.tempList=this.list,await this.edit_title(n,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const n=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",n),n){const e=this.list.findIndex(i=>i.id==n),t=this.list[e];t&&this.selectDiscussion(t)}},onCopyPersonalityName(n){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(n.name)},async deleteDiscussion(n){await this.delete_discussion(n),this.currentDiscussion.id==n&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==n),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const n=this.selectedDiscussions;for(let e=0;ei.id==t.id),1)}this.tempList=this.list,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+n.length+") items",4,!0),this.showConfirmation=!1,console.log("Multi delete done")},async deleteMessage(n){await this.delete_message(n).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==n),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async editTitle(n){const e=this.list.findIndex(i=>i.id==n.id),t=this.list[e];t.title=n.title,t.loading=!0,await this.edit_title(n.id,n.title),t.loading=!1},async makeTitle(n){this.list.findIndex(e=>e.id==n.id),await this.make_title(n.id)},checkUncheckDiscussion(n,e){const t=this.list.findIndex(s=>s.id==e),i=this.list[t];i.checkBoxValue=n.target.checked,this.tempList=this.list},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(n=>n.checkBoxValue==!1).length>0;for(let n=0;n({id:t.id,title:t.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(t,i){return i.id-t.id});this.list=e,this.tempList=e}},setDiscussionLoading(n,e){try{const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(n){if(n)if(n.id){const e=n.title?n.title==="untitled"?"New discussion":n.title:"New discussion";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}},async rankUpMessage(n){await this.message_rank_up(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(n){await this.message_rank_down(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(n,e,t){await this.edit_message(n,e,t).then(()=>{const i=this.discussionArr[this.discussionArr.findIndex(s=>s.id==n)];i.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(n,e,t){Ve(()=>{qe.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(i=>{i&&(i.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Xe.emit("generate_msg_from",{prompt:e,id:n,msg_type:t}))}).catch(i=>{console.log("Error: Could not get generation status",i)})},continueMessage(n,e){Ve(()=>{qe.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(t=>{t&&(t.data.status?console.log("Already generating"):Xe.emit("continue_generate_msg_from",{prompt:e,id:n}))}).catch(t=>{console.log("Error: Could not get generation status",t)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),console.log("Stopped generating"),Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},finalMsgEvent(n){if(console.log("final",n),this.discussion_id=n.discussion_id,this.currentDiscussion.id==this.discussion_id){const i=this.discussionArr.findIndex(s=>s.id==n.id);this.discussionArr[i].content=n.content,this.discussionArr[i].finished_generating_at=n.finished_generating_at}Ve(()=>{const i=document.getElementById("messages-list");this.scrollBottom(i)}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play();const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];t.status_message="Done"},copyToClipBoard(n){let e="";if(n.message.content&&(e=n.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let t="";n.message.binding&&(t=`Binding: ${n.message.binding}`);let i="";n.message.personality&&(i=` + Endpoint error: `+t.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(n){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+n.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogSelected(n){console.log("Selected:",n)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(n){if(this.database_selectorDialogVisible=!1,(await Le.post("/select_database",{name:n},{headers:this.posts_headers})).status){console.log("Selected database"),this.$store.state.config=await Le.get("/get_config"),console.log("new config loaded :",this.$store.state.config);let t=await Le.get("/list_databases").data;console.log("New list of database: ",t),this.$store.state.databases=t,console.log("New list of database: ",this.$store.state.databases),location.reload()}},async toggleLTM(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration(),Xe.emit("upgrade_vectorization")},async applyConfiguration(){this.loading=!0;const n=await Le.post("/apply_settings",{config:this.$store.state.config});this.loading=!1,n.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ve(()=>{qe.replace()})},save_configuration(){this.showConfirmation=!1,Le.post("/save_settings",{}).then(n=>{if(n)return n.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),n.data}).catch(n=>(console.log(n.message,"save_configuration"),this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(n,e,t){console.log("sending",n),this.$store.state.toast.showToast(n,e,t)},togglePanel(){this.panelCollapsed=!this.panelCollapsed},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(n){try{const e=await Le.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const n=await Le.get("/list_discussions");if(n)return this.createDiscussionList(n.data),n.data}catch(n){return console.log("Error: Could not list discussions",n.message),[]}},load_discussion(n,e){n&&(console.log("Loading discussion",n),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(n,this.loading),Xe.on("discussion",t=>{console.log("Discussion recovered"),this.loading=!1,this.setDiscussionLoading(n,this.loading),t&&(this.discussionArr=t.filter(i=>i.message_type==this.msgTypes.MSG_TYPE_CHUNK||i.message_type==this.msgTypes.MSG_TYPE_FULL||i.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI||i.message_type==this.msgTypes.MSG_TYPE_CODE||i.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS||i.message_type==this.msgTypes.MSG_TYPE_UI),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),Xe.off("discussion")}),Xe.emit("load_discussion",{id:n}),console.log("here"))},recoverFiles(){console.log("Recovering files"),Le.get("/get_current_personality_files_list").then(n=>{this.$refs.chatBox.filesList=n.data.files,this.$refs.chatBox.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(n){try{this.loading=!0,Xe.on("discussion_created",e=>{Xe.off("discussion_created"),this.list_discussions().then(()=>{const t=this.list.findIndex(s=>s.id==e.id),i=this.list[t];this.selectDiscussion(i),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),Ve(()=>{const s=document.getElementById("dis-"+e.id);this.scrollToElement(s),console.log("Scrolling tp "+s)})})})}),console.log("new_discussion ",n),Xe.emit("new_discussion",{title:n})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(n){try{n&&(this.loading=!0,this.setDiscussionLoading(n,this.loading),await Le.post("/delete_discussion",{client_id:this.client_id,id:n},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(n,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async edit_title(n,e){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const t=await Le.post("/edit_title",{client_id:this.client_id,id:n,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(n,this.loading),t.status==200){const i=this.list.findIndex(r=>r.id==n),s=this.list[i];s.title=e,this.tempList=this.list}}}catch(t){console.log("Error: Could not edit title",t.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async make_title(n){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const e=await Le.post("/make_title",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(n,this.loading),e.status==200){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async delete_message(n){try{console.log(typeof n),console.log(typeof this.client_id),console.log(n),console.log(this.client_id);const e=await Le.post("/delete_message",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const n=this.discussionArr[this.discussionArr.length-1];n.status_message="Generation canceled"}if(Xe.emit("cancel_generation"),res)return res.data}catch(n){return console.log("Error: Could not stop generating",n.message),{}}},async message_rank_up(n){try{const e=await Le.post("/message_rank_up",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(n){try{const e=await Le.post("/message_rank_down",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(n,e,t){try{console.log(typeof this.client_id),console.log(typeof n),console.log(typeof e),console.log(typeof{audio_url:t});const i=await Le.post("/edit_message",{client_id:this.client_id,id:n,message:e,metadata:[{audio_url:t}]},{headers:this.posts_headers});if(i)return i.data}catch(i){return console.log("Error: Could not update message",i.message),{}}},async export_multiple_discussions(n,e){try{if(n.length>0){const t=await Le.post("/export_multiple_discussions",{discussion_ids:n,export_format:e},{headers:this.posts_headers});if(t)return t.data}}catch(t){return console.log("Error: Could not export multiple discussions",t.message),{}}},async import_multiple_discussions(n){try{if(n.length>0){console.log("sending import",n);const e=await Le.post("/import_multiple_discussions",{jArray:n},{headers:this.posts_headers});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(n=>n.title&&n.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(n){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}n&&(this.currentDiscussion===void 0?(this.currentDiscussion=n,this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})):this.currentDiscussion.id!=n.id&&(console.log("item",n),console.log("this.currentDiscussion",this.currentDiscussion),this.currentDiscussion=n,console.log("this.currentDiscussion",this.currentDiscussion),this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})),Ve(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const t=document.getElementById("messages-list");this.scrollBottom(t)}))},scrollToElement(n){n?n.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(n,e){try{const t=n.offsetTop;document.getElementById(e).scrollTo({top:t,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(n){n?n.scrollTo({top:n.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(n){n?n.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(n){let e={content:n.message,id:n.id,rank:0,sender:n.user,created_at:n.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),Ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},updateLastUserMsg(n){const e=this.discussionArr.indexOf(i=>i.id=n.user_id),t={binding:n.binding,content:n.message,created_at:n.created_at,type:n.type,finished_generating_at:n.finished_generating_at,id:n.user_id,model:n.model,personality:n.personality,sender:n.user,steps:[]};e!==-1&&(this.discussionArr[e]=t)},socketIOConnected(){return console.log("socketIOConnected"),this.$store.state.isConnected=!0,!0},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(n){n.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0),console.log("Making a new message"),console.log("New message",n);let e={sender:n.sender,message_type:n.message_type,sender_type:n.sender_type,content:n.content,id:n.id,discussion_id:n.discussion_id,parent_id:n.parent_id,binding:n.binding,model:n.model,personality:n.personality,created_at:n.created_at,finished_generating_at:n.finished_generating_at,rank:0,ui:n.ui,steps:[],parameters:n.parameters,metadata:n.metadata,open:n.open};e.status_message="Warming up",console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,n.message),console.log("infos",n)},talk(n){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(e=>{e&&(e.data.status?console.log("Already generating"):(console.log("Generating message from ",e.data.status),Xe.emit("generate_msg_from",{id:-1}),this.discussionArr.length>0&&Number(this.discussionArr[this.discussionArr.length-1].id)+1))}).catch(e=>{console.log("Error: Could not get generation status",e)})},createEmptyUserMessage(n){Xe.emit("create_empty_message",{type:0,message:n})},createEmptyAIMessage(){Xe.emit("create_empty_message",{type:1})},sendMsg(n){if(!n){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(e=>{if(e)if(e.data.status)console.log("Already generating");else{Xe.emit("generate_msg",{prompt:n});let t=0;this.discussionArr.length>0&&(t=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let i={message:n,id:t,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.msgTypes.MSG_TYPE_FULL,sender_type:this.senderTypes.SENDER_TYPES_USER,content:n,id:t,discussion_id:this.discussion_id,parent_id:t,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(i)}}).catch(e=>{console.log("Error: Could not get generation status",e)})},sendCmd(n){this.isGenerating=!0,Xe.emit("execute_command",{command:n,parameters:[]})},notify(n){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ve(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),n.display_type==0?this.$store.state.toast.showToast(n.content,n.duration,n.notification_type):n.display_type==1?this.$store.state.messageBox.showMessage(n.content):n.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(n.content,"Yes","No").then(e=>{Xe.emit("yesNoRes",{yesRes:e})})):n.display_type==3?this.$store.state.messageBox.showBlockingMessage(n.content):n.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},streamMessageContent(n){if(this.discussion_id=n.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];if(t&&(n.message_type==this.msgTypes.MSG_TYPE_FULL||n.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI))t.content=n.content,t.finished_generating_at=n.finished_generating_at;else if(t&&n.message_type==this.msgTypes.MSG_TYPE_CHUNK)this.isGenerating=!0,t.content+=n.content;else if(n.message_type==this.msgTypes.MSG_TYPE_STEP)t.status_message=n.content,t.steps.push({message:n.content,done:!0,status:!0,type:"instantanious"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_START)t.status_message=n.content,t.steps.push({message:n.content,done:!1,status:!0,type:"start_end"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_END){console.log("received step end",n);try{const i=t.steps.find(s=>s.message===n.content);if(i){i.done=!0;try{console.log(n.parameters);const s=n.parameters;s!=null&&(i.status=s.status,console.log(s))}catch(s){console.error("Error parsing JSON:",s.message)}}}catch{console.log("error")}}else n.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS?(console.log("JSON message"),console.log(n.metadata),t.metadata=n.metadata):n.message_type==this.msgTypes.MSG_TYPE_UI?(console.log("UI message"),t.ui=n.ui,console.log(t.ui)):n.message_type==this.msgTypes.MSG_TYPE_EXCEPTION&&this.$store.state.toast.showToast(n.content,5,!1)}this.$nextTick(()=>{qe.replace()})},async changeTitleUsingUserMSG(n,e){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];e&&(i.title=e,this.tempList=this.list,await this.edit_title(n,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const n=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",n),n){const e=this.list.findIndex(i=>i.id==n),t=this.list[e];t&&this.selectDiscussion(t)}},onCopyPersonalityName(n){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(n.name)},async deleteDiscussion(n){await this.delete_discussion(n),this.currentDiscussion.id==n&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==n),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const n=this.selectedDiscussions;for(let e=0;ei.id==t.id),1)}this.tempList=this.list,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+n.length+") items",4,!0),this.showConfirmation=!1,console.log("Multi delete done")},async deleteMessage(n){await this.delete_message(n).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==n),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async editTitle(n){const e=this.list.findIndex(i=>i.id==n.id),t=this.list[e];t.title=n.title,t.loading=!0,await this.edit_title(n.id,n.title),t.loading=!1},async makeTitle(n){this.list.findIndex(e=>e.id==n.id),await this.make_title(n.id)},checkUncheckDiscussion(n,e){const t=this.list.findIndex(s=>s.id==e),i=this.list[t];i.checkBoxValue=n.target.checked,this.tempList=this.list},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(n=>n.checkBoxValue==!1).length>0;for(let n=0;n({id:t.id,title:t.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(t,i){return i.id-t.id});this.list=e,this.tempList=e}},setDiscussionLoading(n,e){try{const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(n){if(n)if(n.id){const e=n.title?n.title==="untitled"?"New discussion":n.title:"New discussion";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}},async rankUpMessage(n){await this.message_rank_up(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(n){await this.message_rank_down(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(n,e,t){await this.edit_message(n,e,t).then(()=>{const i=this.discussionArr[this.discussionArr.findIndex(s=>s.id==n)];i.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(n,e,t){Ve(()=>{qe.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(i=>{i&&(i.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Xe.emit("generate_msg_from",{prompt:e,id:n,msg_type:t}))}).catch(i=>{console.log("Error: Could not get generation status",i)})},continueMessage(n,e){Ve(()=>{qe.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le.get("/get_generation_status",{}).then(t=>{t&&(t.data.status?console.log("Already generating"):Xe.emit("continue_generate_msg_from",{prompt:e,id:n}))}).catch(t=>{console.log("Error: Could not get generation status",t)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),console.log("Stopped generating"),Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},finalMsgEvent(n){if(console.log("final",n),this.discussion_id=n.discussion_id,this.currentDiscussion.id==this.discussion_id){const i=this.discussionArr.findIndex(s=>s.id==n.id);this.discussionArr[i].content=n.content,this.discussionArr[i].finished_generating_at=n.finished_generating_at}Ve(()=>{const i=document.getElementById("messages-list");this.scrollBottom(i)}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play();const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];t.status_message="Done"},copyToClipBoard(n){let e="";if(n.message.content&&(e=n.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let t="";n.message.binding&&(t=`Binding: ${n.message.binding}`);let i="";n.message.personality&&(i=` Personality: ${n.message.personality}`);let s="";n.created_at_parsed&&(s=` Created: ${n.created_at_parsed}`);let r="";n.message.model&&(r=`Model: ${n.message.model}`);let o="";n.message.seed&&(o=`Seed: ${n.message.seed}`);let a="";n.time_spent&&(a=` Time spent: ${n.time_spent}`);let l="";l=`${t} ${r} ${o} ${a}`.trim();const c=`${n.message.sender}${i}${s} @@ -212,7 +212,7 @@ ${e} ${l}`;navigator.clipboard.writeText(c)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),Ve(()=>{qe.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(n,e){e=e||"data.json";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([JSON.stringify(n,null,2)],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},saveMarkdowntoFile(n,e){e=e||"data.md";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([n],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},parseJsonObj(n){try{return JSON.parse(n)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=s=>e(this.parseJsonObj(s.target.result)),i.onerror=s=>t(s),i.readAsText(n)})},async exportDiscussionsAsMarkdown(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){console.log("export",n);let e=new Date;const t=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(t+"."+i+"."+s+"."+r+o+a)+".md";this.loading=!0;const d=await this.export_multiple_discussions(n,"markdown");d?(this.saveMarkdowntoFile(d,c),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussionsAsJson(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){console.log("export",n);let e=new Date;const t=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(t+"."+i+"."+s+"."+r+o+a)+".json";this.loading=!0;const d=await this.export_multiple_discussions(n,"json");d?(this.saveJSONtoFile(d,c),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussions(n){const e=await this.parseJsonFile(n.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let n=this.$store.state.personalities;this.personalityAvatars=n.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(n){if(n.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(i=>i.name===n),t=this.personalityAvatars[e];if(t)return console.log("Avatar",t.avatar),t.avatar},setFileListChat(n){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(n)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){for(this.$nextTick(()=>{qe.replace()}),Xe.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const e=this.list.findIndex(i=>i.id==n.discussion_id),t=this.list[e];t.title=n.title}),Xe.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},Xe.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),Xe.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),Xe.disconnect()},Xe.on("connected",this.socketIOConnected),Xe.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Xe.on("show_progress",this.show_progress),Xe.on("hide_progress",this.hide_progress),Xe.on("update_progress",this.update_progress),Xe.on("notification",this.notify),Xe.on("new_message",this.new_message),Xe.on("update_message",this.streamMessageContent),Xe.on("close_message",this.finalMsgEvent),Xe.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){this.$nextTick(()=>{qe.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},components:{Discussion:mO,Message:bO,ChatBox:EO,WelcomeComponent:vO,ChoiceDialog:AE,ProgressBar:ic,InputBox:gO},watch:{progress_visibility_val(n){console.log("progress_visibility changed")},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ve(()=>{qe.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ve(()=>{qe.replace()})},isSearch(){Ve(()=>{qe.replace()})}},computed:{progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_ltm},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Xe.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ve(()=>{qe.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},w0t=Object.assign(A0t,{__name:"DiscussionsView",setup(n){return qs(()=>{GO()}),Le.defaults.baseURL="/",(e,t)=>(O(),D(Ke,null,[Ie(Gs,{name:"fade-and-fly"},{default:nt(()=>[e.isReady?W("",!0):(O(),D("div",ZSt,[u("div",JSt,[u("div",eyt,[u("div",tyt,[nyt,u("div",iyt,[u("p",syt,"LoLLMS "+ge(e.version_info),1),ryt,oyt])]),ayt,lyt,u("div",cyt,[Ie(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),u("p",dyt,ge(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(O(),D("button",{key:0,onClick:t[0]||(t[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[de(u("div",null,pyt,512),[[Dt,e.panelCollapsed]]),de(u("div",null,hyt,512),[[Dt,!e.panelCollapsed]])])):W("",!0),Ie(Gs,{name:"slide-right"},{default:nt(()=>[e.showPanel?(O(),D("div",fyt,[u("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:t[22]||(t[22]=xe(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[u("div",myt,[u("div",gyt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:t[1]||(t[1]=i=>e.createNewDiscussion())},Eyt),u("button",{class:We(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:t[2]||(t[2]=i=>e.isCheckbox=!e.isCheckbox)},Syt,2),yyt,u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:t[3]||(t[3]=xe(i=>e.database_selectorDialogVisible=!0,["stop"]))},xyt),u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:t[4]||(t[4]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:t[5]||(t[5]=xe(i=>e.$refs.fileDialog.click(),["stop"]))},Ryt),e.isOpen?(O(),D("div",Ayt,[u("button",{onClick:t[6]||(t[6]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),u("button",{onClick:t[7]||(t[7]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):W("",!0),u("button",{class:We(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:t[8]||(t[8]=i=>e.isSearch=!e.isSearch)},Nyt,2),e.showSaveConfirmation?W("",!0):(O(),D("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:t[9]||(t[9]=i=>e.showSaveConfirmation=!0)},Iyt)),e.showSaveConfirmation?(O(),D("div",Myt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:t[10]||(t[10]=xe(i=>e.showSaveConfirmation=!1,["stop"]))},kyt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:t[11]||(t[11]=xe(i=>e.save_configuration(),["stop"]))},Pyt)])):W("",!0),e.loading?W("",!0):(O(),D("button",{key:3,type:"button",onClick:t[12]||(t[12]=xe((...i)=>e.addToMemory&&e.addToMemory(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90"},[u("img",{src:wt(zO)},null,8,Uyt)])),e.loading?(O(),D("div",Fyt,Gyt)):W("",!0)]),e.isSearch?(O(),D("div",zyt,[u("div",Vyt,[u("div",Hyt,[qyt,u("div",Yyt,[u("div",{class:We(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:t[13]||(t[13]=i=>e.filterTitle="")},Wyt,2)]),de(u("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":t[14]||(t[14]=i=>e.filterTitle=i),onInput:t[15]||(t[15]=i=>e.filterDiscussions())},null,544),[[Ue,e.filterTitle]])])])])):W("",!0),e.isCheckbox?(O(),D("hr",Kyt)):W("",!0),e.isCheckbox?(O(),D("div",jyt,[u("div",Qyt,[e.selectedDiscussions.length>0?(O(),D("p",Xyt,"Selected: "+ge(e.selectedDiscussions.length),1)):W("",!0)]),u("div",Zyt,[e.selectedDiscussions.length>0?(O(),D("div",Jyt,[e.showConfirmation?W("",!0):(O(),D("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[16]||(t[16]=xe(i=>e.showConfirmation=!0,["stop"]))},t0t)),e.showConfirmation?(O(),D("div",n0t,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[17]||(t[17]=xe((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},s0t),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[18]||(t[18]=xe(i=>e.showConfirmation=!1,["stop"]))},o0t)])):W("",!0)])):W("",!0),u("div",a0t,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[19]||(t[19]=xe((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},c0t),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:t[20]||(t[20]=xe((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},u0t),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[21]||(t[21]=xe((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},_0t)])])])):W("",!0)]),u("div",h0t,[u("div",{class:We(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[u("div",{id:"dis-list",class:We([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(O(),Mt(ks,{key:0,name:"list"},{default:nt(()=>[(O(!0),D(Ke,null,pt(e.list,(i,s)=>(O(),Mt(mO,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):W("",!0),e.list.length<1?(O(),D("div",f0t,g0t)):W("",!0),b0t],2)],2)])],32),u("div",{class:"absolute bottom-0 left-0 w-full bg-blue-200 dark:bg-blue-800 text-white py-2 cursor-pointer hover:text-green-500",onClick:t[23]||(t[23]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[u("p",E0t,"Current database: "+ge(e.formatted_database_name),1)])])):W("",!0)]),_:1}),e.isReady?(O(),D("div",v0t,[u("div",{id:"messages-list",class:We(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[u("div",S0t,[e.discussionArr.length>0?(O(),Mt(ks,{key:0,name:"list"},{default:nt(()=>[(O(!0),D(Ke,null,pt(e.discussionArr,(i,s)=>(O(),Mt(bO,{key:i.id,message:i,id:"msg-"+i.id,host:e.host,ref_for:!0,ref:"messages",onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):W("",!0),e.currentDiscussion.id?W("",!0):(O(),Mt(vO,{key:1})),y0t]),T0t,e.currentDiscussion.id?(O(),D("div",x0t,[Ie(EO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):W("",!0)],2)])):W("",!0),Ie(AE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),de(u("div",C0t,[Ie(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),u("p",R0t,ge(e.loading_infos)+" ...",1)],512),[[Dt,e.progress_visibility]]),Ie(gO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.handleOk,ref:"web_url_input_box"},null,8,["onOk"])],64))}}),N0t=vt(w0t,[["__scopeId","data-v-1421a879"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){for(this.$nextTick(()=>{qe.replace()}),Xe.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const e=this.list.findIndex(i=>i.id==n.discussion_id),t=this.list[e];t.title=n.title}),Xe.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},Xe.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),Xe.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),Xe.disconnect()},Xe.on("connected",this.socketIOConnected),Xe.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Xe.on("show_progress",this.show_progress),Xe.on("hide_progress",this.hide_progress),Xe.on("update_progress",this.update_progress),Xe.on("notification",this.notify),Xe.on("new_message",this.new_message),Xe.on("update_message",this.streamMessageContent),Xe.on("close_message",this.finalMsgEvent),Xe.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){this.$nextTick(()=>{qe.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},components:{Discussion:mO,Message:bO,ChatBox:EO,WelcomeComponent:vO,ChoiceDialog:AE,ProgressBar:ic,InputBox:gO},watch:{progress_visibility_val(n){console.log("progress_visibility changed")},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ve(()=>{qe.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ve(()=>{qe.replace()})},isSearch(){Ve(()=>{qe.replace()})}},computed:{progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Xe.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ve(()=>{qe.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},w0t=Object.assign(A0t,{__name:"DiscussionsView",setup(n){return qs(()=>{GO()}),Le.defaults.baseURL="/",(e,t)=>(O(),D(Ke,null,[Ie(Gs,{name:"fade-and-fly"},{default:nt(()=>[e.isReady?W("",!0):(O(),D("div",ZSt,[u("div",JSt,[u("div",eyt,[u("div",tyt,[nyt,u("div",iyt,[u("p",syt,"LoLLMS "+ge(e.version_info),1),ryt,oyt])]),ayt,lyt,u("div",cyt,[Ie(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),u("p",dyt,ge(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(O(),D("button",{key:0,onClick:t[0]||(t[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[de(u("div",null,pyt,512),[[Dt,e.panelCollapsed]]),de(u("div",null,hyt,512),[[Dt,!e.panelCollapsed]])])):W("",!0),Ie(Gs,{name:"slide-right"},{default:nt(()=>[e.showPanel?(O(),D("div",fyt,[u("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:t[22]||(t[22]=xe(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[u("div",myt,[u("div",gyt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:t[1]||(t[1]=i=>e.createNewDiscussion())},Eyt),u("button",{class:We(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:t[2]||(t[2]=i=>e.isCheckbox=!e.isCheckbox)},Syt,2),yyt,u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:t[3]||(t[3]=xe(i=>e.database_selectorDialogVisible=!0,["stop"]))},xyt),u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:t[4]||(t[4]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:t[5]||(t[5]=xe(i=>e.$refs.fileDialog.click(),["stop"]))},Ryt),e.isOpen?(O(),D("div",Ayt,[u("button",{onClick:t[6]||(t[6]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),u("button",{onClick:t[7]||(t[7]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):W("",!0),u("button",{class:We(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:t[8]||(t[8]=i=>e.isSearch=!e.isSearch)},Nyt,2),e.showSaveConfirmation?W("",!0):(O(),D("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:t[9]||(t[9]=i=>e.showSaveConfirmation=!0)},Iyt)),e.showSaveConfirmation?(O(),D("div",Myt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:t[10]||(t[10]=xe(i=>e.showSaveConfirmation=!1,["stop"]))},kyt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:t[11]||(t[11]=xe(i=>e.save_configuration(),["stop"]))},Pyt)])):W("",!0),e.loading?W("",!0):(O(),D("button",{key:3,type:"button",onClick:t[12]||(t[12]=xe((...i)=>e.addToMemory&&e.addToMemory(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90"},[u("img",{src:wt(zO)},null,8,Uyt)])),e.loading?(O(),D("div",Fyt,Gyt)):W("",!0)]),e.isSearch?(O(),D("div",zyt,[u("div",Vyt,[u("div",Hyt,[qyt,u("div",Yyt,[u("div",{class:We(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:t[13]||(t[13]=i=>e.filterTitle="")},Wyt,2)]),de(u("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":t[14]||(t[14]=i=>e.filterTitle=i),onInput:t[15]||(t[15]=i=>e.filterDiscussions())},null,544),[[Ue,e.filterTitle]])])])])):W("",!0),e.isCheckbox?(O(),D("hr",Kyt)):W("",!0),e.isCheckbox?(O(),D("div",jyt,[u("div",Qyt,[e.selectedDiscussions.length>0?(O(),D("p",Xyt,"Selected: "+ge(e.selectedDiscussions.length),1)):W("",!0)]),u("div",Zyt,[e.selectedDiscussions.length>0?(O(),D("div",Jyt,[e.showConfirmation?W("",!0):(O(),D("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[16]||(t[16]=xe(i=>e.showConfirmation=!0,["stop"]))},t0t)),e.showConfirmation?(O(),D("div",n0t,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[17]||(t[17]=xe((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},s0t),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[18]||(t[18]=xe(i=>e.showConfirmation=!1,["stop"]))},o0t)])):W("",!0)])):W("",!0),u("div",a0t,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[19]||(t[19]=xe((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},c0t),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:t[20]||(t[20]=xe((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},u0t),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[21]||(t[21]=xe((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},_0t)])])])):W("",!0)]),u("div",h0t,[u("div",{class:We(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[u("div",{id:"dis-list",class:We([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(O(),Mt(ks,{key:0,name:"list"},{default:nt(()=>[(O(!0),D(Ke,null,pt(e.list,(i,s)=>(O(),Mt(mO,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):W("",!0),e.list.length<1?(O(),D("div",f0t,g0t)):W("",!0),b0t],2)],2)])],32),u("div",{class:"absolute bottom-0 left-0 w-full bg-blue-200 dark:bg-blue-800 text-white py-2 cursor-pointer hover:text-green-500",onClick:t[23]||(t[23]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[u("p",E0t,"Current database: "+ge(e.formatted_database_name),1)])])):W("",!0)]),_:1}),e.isReady?(O(),D("div",v0t,[u("div",{id:"messages-list",class:We(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[u("div",S0t,[e.discussionArr.length>0?(O(),Mt(ks,{key:0,name:"list"},{default:nt(()=>[(O(!0),D(Ke,null,pt(e.discussionArr,(i,s)=>(O(),Mt(bO,{key:i.id,message:i,id:"msg-"+i.id,host:e.host,ref_for:!0,ref:"messages",onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):W("",!0),e.currentDiscussion.id?W("",!0):(O(),Mt(vO,{key:1})),y0t]),T0t,e.currentDiscussion.id?(O(),D("div",x0t,[Ie(EO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):W("",!0)],2)])):W("",!0),Ie(AE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),de(u("div",C0t,[Ie(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),u("p",R0t,ge(e.loading_infos)+" ...",1)],512),[[Dt,e.progress_visibility]]),Ie(gO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.handleOk,ref:"web_url_input_box"},null,8,["onOk"])],64))}}),N0t=vt(w0t,[["__scopeId","data-v-1421a879"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT diff --git a/web/src/views/DiscussionsView.vue b/web/src/views/DiscussionsView.vue index d2c09a34..c790dd37 100644 --- a/web/src/views/DiscussionsView.vue +++ b/web/src/views/DiscussionsView.vue @@ -550,7 +550,7 @@ export default { }, async toggleLTM(){ - this.$store.state.config.activate_ltm =! this.$store.state.config.activate_ltm; + this.$store.state.config.activate_skills_lib =! this.$store.state.config.activate_skills_lib; await this.applyConfiguration(); socket.emit('upgrade_vectorization'); }, @@ -2106,7 +2106,7 @@ export default { return trimmed_name; }, UseDiscussionHistory() { - return this.$store.state.config.activate_ltm; + return this.$store.state.config.activate_skills_lib; }, isReady:{