mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-31 00:23:52 +00:00
upgraded ui to 7.0 beta
This commit is contained in:
parent
bb5794d475
commit
2dcdf8e8e6
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI - Welcome</title>
|
<title>LoLLMS WebUI - Welcome</title>
|
||||||
<script type="module" crossorigin src="/assets/index-24ca9f97.js"></script>
|
<script type="module" crossorigin src="/assets/index-bf53144a.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-875a93ad.css">
|
<link rel="stylesheet" href="/assets/index-b6c2ceff.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="w-fit group relative" v-if="!loading" >
|
<div class="w-fit group relative" >
|
||||||
<!-- :onShowPersList="onShowPersListFun" -->
|
<!-- :onShowPersList="onShowPersListFun" -->
|
||||||
<div 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">
|
<div 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">
|
||||||
<div class="w-full"
|
<div class="w-full"
|
||||||
@ -173,8 +173,6 @@
|
|||||||
:class="this.$store.state.active_personality_id == this.$store.state.personalities.indexOf(item.full_path) ? 'border-secondary' : 'border-transparent z-0'"
|
:class="this.$store.state.active_personality_id == this.$store.state.personalities.indexOf(item.full_path) ? 'border-secondary' : 'border-transparent z-0'"
|
||||||
:title="item.name">
|
:title="item.name">
|
||||||
</button>
|
</button>
|
||||||
<!--
|
|
||||||
|
|
||||||
<button @click.prevent="unmountPersonality (item)">
|
<button @click.prevent="unmountPersonality (item)">
|
||||||
<span
|
<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"
|
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"
|
||||||
@ -189,8 +187,6 @@
|
|||||||
|
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -199,7 +195,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-fit" v-if="!loading" >
|
<div class="w-fit">
|
||||||
<PersonalitiesCommands
|
<PersonalitiesCommands
|
||||||
v-if="personalities_ready && this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=''"
|
v-if="personalities_ready && this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=''"
|
||||||
:commandsList="this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands"
|
:commandsList="this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands"
|
||||||
@ -209,7 +205,7 @@
|
|||||||
></PersonalitiesCommands>
|
></PersonalitiesCommands>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative grow" v-if="!loading" >
|
<div class="relative grow">
|
||||||
<textarea id="chat" rows="1" v-model="message" title="Hold SHIFT + ENTER to add new line"
|
<textarea id="chat" rows="1" v-model="message" 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"
|
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..." @keydown.enter.exact="submitOnEnter($event)">
|
placeholder="Send message..." @keydown.enter.exact="submitOnEnter($event)">
|
||||||
@ -279,6 +275,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<Toast ref="toast"/>
|
<Toast ref="toast"/>
|
||||||
|
<UniversalForm ref="universalForm" class="z-20" />
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* THESE ARE FOR TransitionGroup components */
|
/* THESE ARE FOR TransitionGroup components */
|
||||||
@ -321,6 +318,7 @@ import { useStore } from 'vuex'; // Import the useStore function
|
|||||||
import { inject } from 'vue';
|
import { inject } from 'vue';
|
||||||
import socket from '@/services/websocket.js'
|
import socket from '@/services/websocket.js'
|
||||||
import Toast from '../components/Toast.vue'
|
import Toast from '../components/Toast.vue'
|
||||||
|
import UniversalForm from '../components/UniversalForm.vue';
|
||||||
import modelImgPlaceholder from "../assets/default_model.png"
|
import modelImgPlaceholder from "../assets/default_model.png"
|
||||||
console.log("modelImgPlaceholder:",modelImgPlaceholder)
|
console.log("modelImgPlaceholder:",modelImgPlaceholder)
|
||||||
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
||||||
@ -336,6 +334,7 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Toast,
|
Toast,
|
||||||
|
UniversalForm,
|
||||||
MountedPersonalities,
|
MountedPersonalities,
|
||||||
MountedPersonalitiesList,
|
MountedPersonalitiesList,
|
||||||
PersonalitiesCommands,
|
PersonalitiesCommands,
|
||||||
@ -389,7 +388,55 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showModelConfig(){
|
showModelConfig(){
|
||||||
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
axios.get('/get_active_binding_settings').then(res => {
|
||||||
|
this.isLoading = false
|
||||||
|
if (res) {
|
||||||
|
|
||||||
|
console.log('binding sett', res)
|
||||||
|
|
||||||
|
if (res.data && Object.keys(res.data).length > 0) {
|
||||||
|
|
||||||
|
// open form
|
||||||
|
|
||||||
|
this.$refs.universalForm.showForm(res.data, "Binding settings ", "Save changes", "Cancel").then(res => {
|
||||||
|
// send new data
|
||||||
|
try {
|
||||||
|
axios.post('/set_active_binding_settings',
|
||||||
|
res).then(response => {
|
||||||
|
|
||||||
|
if (response && response.data) {
|
||||||
|
console.log('binding set with new settings', response.data)
|
||||||
|
this.$refs.toast.showToast("Binding settings updated successfully!", 4, true)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$refs.toast.showToast("Did not get binding settings responses.\n" + response, 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
this.$refs.toast.showToast("Did not get binding settings responses.\n Endpoint error: " + error.message, 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.toast.showToast("Binding has no settings", 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
this.isLoading = false
|
||||||
|
this.$refs.toast.showToast("Could not open binding settings. Endpoint error: " + error.message, 4, false)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async unmountPersonality(pers) {
|
async unmountPersonality(pers) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@ -559,43 +606,6 @@ export default {
|
|||||||
this.filesList = []
|
this.filesList = []
|
||||||
this.isFileSentList = []
|
this.isFileSentList = []
|
||||||
},
|
},
|
||||||
// send_file(file, next){
|
|
||||||
// const formData = new FormData();
|
|
||||||
// formData.append('file', file);
|
|
||||||
// console.log("Uploading file")
|
|
||||||
// // Read the file as a data URL and emit it to the server
|
|
||||||
// const reader = new FileReader();
|
|
||||||
// reader.onload = () => {
|
|
||||||
// const data = {
|
|
||||||
// filename: file.name,
|
|
||||||
// fileData: reader.result,
|
|
||||||
// };
|
|
||||||
// socket.on('file_received',(resp)=>{
|
|
||||||
// if(resp.status){
|
|
||||||
// console.log(resp.filename)
|
|
||||||
// this.isFileSentList[this.filesList.length-1]=true;
|
|
||||||
// console.log(this.isFileSentList)
|
|
||||||
// this.onShowToastMessage("File uploaded successfully",4,true);
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// this.onShowToastMessage("Couldn't upload file\n"+resp.error,4,false);
|
|
||||||
// try{
|
|
||||||
// this.filesList.removeItem(file)
|
|
||||||
// }
|
|
||||||
// catch{
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
// socket.off('file_received')
|
|
||||||
// next()
|
|
||||||
|
|
||||||
// })
|
|
||||||
// console.log("Sending file")
|
|
||||||
// socket.emit('send_file', data);
|
|
||||||
// };
|
|
||||||
// reader.readAsDataURL(file);
|
|
||||||
// },
|
|
||||||
send_file(file, next) {
|
send_file(file, next) {
|
||||||
const fileReader = new FileReader();
|
const fileReader = new FileReader();
|
||||||
const chunkSize = 24 * 1024; // Chunk size in bytes (e.g., 1MB)
|
const chunkSize = 24 * 1024; // Chunk size in bytes (e.g., 1MB)
|
||||||
@ -730,15 +740,17 @@ export default {
|
|||||||
this.$emit('sendCMDEvent', cmd)
|
this.$emit('sendCMDEvent', cmd)
|
||||||
},
|
},
|
||||||
submitOnEnter(event) {
|
submitOnEnter(event) {
|
||||||
if (event.which === 13) {
|
if(!this.loading){
|
||||||
event.preventDefault(); // Prevents the addition of a new line in the text field
|
if (event.which === 13) {
|
||||||
|
event.preventDefault(); // Prevents the addition of a new line in the text field
|
||||||
|
|
||||||
if (!event.repeat) {
|
if (!event.repeat) {
|
||||||
|
|
||||||
|
this.sendMessageEvent(this.message)
|
||||||
|
this.message = "" // Clear input field
|
||||||
|
}
|
||||||
|
|
||||||
this.sendMessageEvent(this.message)
|
|
||||||
this.message = "" // Clear input field
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
@ -36,11 +36,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<UniversalForm ref="universalForm" class="z-20" />
|
<UniversalForm ref="universalForm" class="z-20" />
|
||||||
</template>
|
</template>
|
||||||
|
<Toast ref="toast">
|
||||||
|
</Toast>
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import defaultPersonalityImgPlaceholder from "../assets/logo.svg"
|
import defaultPersonalityImgPlaceholder from "../assets/logo.svg"
|
||||||
import UniversalForm from '@/components/UniversalForm.vue';
|
import UniversalForm from '@/components/UniversalForm.vue';
|
||||||
|
import Toast from '../components/Toast.vue'
|
||||||
|
|
||||||
import { nextTick } from "vue";
|
import { nextTick } from "vue";
|
||||||
import { useStore } from 'vuex'; // Import the useStore function
|
import { useStore } from 'vuex'; // Import the useStore function
|
||||||
@ -60,6 +62,7 @@ export default {
|
|||||||
onReady:Function,
|
onReady:Function,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Toast,
|
||||||
UniversalForm
|
UniversalForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -254,15 +254,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class=" bottom-0 container flex flex-row items-center justify-center " v-if="currentDiscussion.id">
|
<div class=" bottom-0 container flex flex-row items-center justify-center " v-if="currentDiscussion.id">
|
||||||
<ChatBox ref="chatBox"
|
<ChatBox ref="chatBox"
|
||||||
|
:loading="isGenerating"
|
||||||
|
:discussionList="discussionArr"
|
||||||
|
:on-show-toast-message="showToastMessage"
|
||||||
|
:on-talk="talk"
|
||||||
@messageSentEvent="sendMsg"
|
@messageSentEvent="sendMsg"
|
||||||
@sendCMDEvent="sendCmd"
|
@sendCMDEvent="sendCmd"
|
||||||
@createEmptyUserMessage="createEmptyUserMessage"
|
@createEmptyUserMessage="createEmptyUserMessage"
|
||||||
@createEmptyAIMessage="createEmptyAIMessage"
|
@createEmptyAIMessage="createEmptyAIMessage"
|
||||||
:loading="isGenerating"
|
|
||||||
:discussionList="discussionArr"
|
|
||||||
@stopGenerating="stopGenerating"
|
@stopGenerating="stopGenerating"
|
||||||
:on-show-toast-message="showToastMessage"
|
|
||||||
:on-talk="talk"
|
|
||||||
@loaded="recoverFiles"
|
@loaded="recoverFiles"
|
||||||
>
|
>
|
||||||
</ChatBox>
|
</ChatBox>
|
||||||
@ -431,6 +431,57 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onSettingsBinding() {
|
||||||
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
axios.get('/get_active_binding_settings').then(res => {
|
||||||
|
this.isLoading = false
|
||||||
|
if (res) {
|
||||||
|
|
||||||
|
console.log('binding sett', res)
|
||||||
|
|
||||||
|
if (res.data && Object.keys(res.data).length > 0) {
|
||||||
|
|
||||||
|
// open form
|
||||||
|
|
||||||
|
this.$refs.universalForm.showForm(res.data, "Binding settings - " + bindingEntry.binding.name, "Save changes", "Cancel").then(res => {
|
||||||
|
// send new data
|
||||||
|
try {
|
||||||
|
axios.post('/set_active_binding_settings',
|
||||||
|
res).then(response => {
|
||||||
|
|
||||||
|
if (response && response.data) {
|
||||||
|
console.log('binding set with new settings', response.data)
|
||||||
|
this.$refs.toast.showToast("Binding settings updated successfully!", 4, true)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$refs.toast.showToast("Did not get binding settings responses.\n" + response, 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
this.$refs.toast.showToast("Did not get binding settings responses.\n Endpoint error: " + error.message, 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.toast.showToast("Binding has no settings", 4, false)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
this.isLoading = false
|
||||||
|
this.$refs.toast.showToast("Could not open binding settings. Endpoint error: " + error.message, 4, false)
|
||||||
|
}
|
||||||
|
},
|
||||||
showDatabaseSelector() {
|
showDatabaseSelector() {
|
||||||
this.database_selectorDialogVisible = true;
|
this.database_selectorDialogVisible = true;
|
||||||
},
|
},
|
||||||
|
@ -1878,7 +1878,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async modelsZooToggleCollapse(){
|
async modelsZooToggleCollapse(){
|
||||||
this.mzc_collapsed = !this.mzc_collapsed
|
this.mzc_collapsed = !this.mzc_collapsed
|
||||||
if (!this.mzc_collapsed){
|
if (!this.mzc_collapsed && this.modelsZoo==[]){
|
||||||
this.refreshModelsZoo();
|
this.refreshModelsZoo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2836,11 +2836,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//this.fetchMainConfig();
|
|
||||||
//this.fetchBindings();
|
|
||||||
//this.fetchModels();
|
|
||||||
//this.fetchPersonalities();
|
|
||||||
//this.fetchHardwareInfos();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// Accordeon stuff
|
// Accordeon stuff
|
||||||
|
Loading…
x
Reference in New Issue
Block a user