mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-22 09:50:53 +00:00
some fixes
This commit is contained in:
parent
14c13ab062
commit
b50ca95e04
@ -19,7 +19,7 @@
|
|||||||
</p> -->
|
</p> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-400 font-thin" v-if="message.created_at" :title="message.created_at">
|
<div class="text-sm text-gray-400 font-thin" v-if="message.created_at" :title="parsed_date">
|
||||||
{{ created_at }}
|
{{ created_at }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -307,6 +307,10 @@ export default {
|
|||||||
created_at() {
|
created_at() {
|
||||||
return this.prettyDate(this.message.created_at)
|
return this.prettyDate(this.message.created_at)
|
||||||
|
|
||||||
|
},
|
||||||
|
parsed_date() {
|
||||||
|
return new Date(Date.parse(this.message.created_at)).toLocaleString()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,12 +560,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
createUserMsg(msgObj) {
|
createUserMsg(msgObj) {
|
||||||
|
|
||||||
let usrMessage = {
|
let usrMessage = {
|
||||||
content: msgObj.message,
|
content: msgObj.message,
|
||||||
id: msgObj.id,
|
id: msgObj.id,
|
||||||
//parent: 10,
|
//parent: 10,
|
||||||
rank: 0,
|
rank: 0,
|
||||||
sender: msgObj.user
|
sender: msgObj.user,
|
||||||
|
created_at: msgObj.created_at
|
||||||
//type: 0
|
//type: 0
|
||||||
}
|
}
|
||||||
this.discussionArr.push(usrMessage)
|
this.discussionArr.push(usrMessage)
|
||||||
@ -653,7 +655,9 @@ export default {
|
|||||||
message: msg,
|
message: msg,
|
||||||
id: 0,
|
id: 0,
|
||||||
rank: 0,
|
rank: 0,
|
||||||
user: "user"
|
user: "user",
|
||||||
|
created_at: new Date().toLocaleString(),
|
||||||
|
|
||||||
};
|
};
|
||||||
this.createUserMsg(usrMessage);
|
this.createUserMsg(usrMessage);
|
||||||
|
|
||||||
@ -887,7 +891,7 @@ export default {
|
|||||||
this.setDiscussionLoading(this.currentDiscussion.id, this.isGenerating);
|
this.setDiscussionLoading(this.currentDiscussion.id, this.isGenerating);
|
||||||
axios.get('/get_generation_status', {}).then((res) => {
|
axios.get('/get_generation_status', {}).then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
//console.log(res.data.status);
|
console.log(res);
|
||||||
if (!res.data.status) {
|
if (!res.data.status) {
|
||||||
socket.emit('generate_msg_from', { prompt: msg, id: msgId });
|
socket.emit('generate_msg_from', { prompt: msg, id: msgId });
|
||||||
|
|
||||||
|
@ -162,7 +162,8 @@
|
|||||||
<div class="flex gap-1 items-center">
|
<div class="flex gap-1 items-center">
|
||||||
<img :src="imgBinding" class="w-8 h-8 rounded-full object-fill text-blue-700">
|
<img :src="imgBinding" class="w-8 h-8 rounded-full object-fill text-blue-700">
|
||||||
<h3 class="font-bold font-large text-lg line-clamp-1">
|
<h3 class="font-bold font-large text-lg line-clamp-1">
|
||||||
{{ configFile.binding_name }}
|
<!-- {{ configFile.binding_name }} -->
|
||||||
|
{{binding_name}}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -329,6 +330,11 @@
|
|||||||
|
|
||||||
<div v-if="configFile.personalities" class="mr-2">|</div>
|
<div v-if="configFile.personalities" class="mr-2">|</div>
|
||||||
<!-- LIST OF MOUNTED PERSONALITIES -->
|
<!-- LIST OF MOUNTED PERSONALITIES -->
|
||||||
|
<div class="mr-2 font-bold font-large text-lg line-clamp-1">
|
||||||
|
{{active_pesonality }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-if="configFile.personalities" class="mr-2">|</div>
|
||||||
<div v-if="configFile.personalities"
|
<div v-if="configFile.personalities"
|
||||||
class=" text-base font-semibold cursor-pointer select-none items-center flex flex-row">
|
class=" text-base font-semibold cursor-pointer select-none items-center flex flex-row">
|
||||||
<!-- LIST -->
|
<!-- LIST -->
|
||||||
@ -1380,7 +1386,7 @@ export default {
|
|||||||
const res = await this.mount_personality(pers.personality)
|
const res = await this.mount_personality(pers.personality)
|
||||||
console.log('mount_personality res', res)
|
console.log('mount_personality res', res)
|
||||||
|
|
||||||
if (res.status) {
|
if (res && res.status) {
|
||||||
this.configFile.personalities = res.personalities
|
this.configFile.personalities = res.personalities
|
||||||
this.$refs.toast.showToast("Personality mounted", 4, true)
|
this.$refs.toast.showToast("Personality mounted", 4, true)
|
||||||
pers.isMounted = true
|
pers.isMounted = true
|
||||||
@ -1609,6 +1615,15 @@ export default {
|
|||||||
return defaultModelImgPlaceholder
|
return defaultModelImgPlaceholder
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
binding_name(){
|
||||||
|
return this.bindingsArr[this.bindingsArr.findIndex(item=>item.folder === this.configFile.binding_name)].name
|
||||||
|
|
||||||
|
},
|
||||||
|
active_pesonality(){
|
||||||
|
return this.personalities[this.personalities.findIndex(item => item.full_path ===this.configFile.personalities[this.configFile.active_personality_id])].name
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
// imgPersonality() {
|
// imgPersonality() {
|
||||||
// if (!this.isMounted) {
|
// if (!this.isMounted) {
|
||||||
// return
|
// return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user