mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 04:47:55 +00:00
sync
This commit is contained in:
parent
81e70148d9
commit
a826f32f4f
@ -1 +1 @@
|
||||
Subproject commit 5fc9e91eb4dd3c742ac048c0e2b23009e582b6d4
|
||||
Subproject commit 328b960a0de2097e13654ac752253e9541521ddd
|
@ -72,7 +72,7 @@ def terminate_thread(thread):
|
||||
else:
|
||||
ASCIIColors.yellow("Canceled successfully")# The current version of the webui
|
||||
|
||||
lollms_webui_version="9.9 (💎)"
|
||||
lollms_webui_version="9.9 (🤖)"
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
8
web/dist/assets/index-28075c11.css
vendored
8
web/dist/assets/index-28075c11.css
vendored
File diff suppressed because one or more lines are too long
8
web/dist/assets/index-ae7f4ed4.css
vendored
Normal file
8
web/dist/assets/index-ae7f4ed4.css
vendored
Normal file
File diff suppressed because one or more lines are too long
57
web/dist/assets/robot-5e627a0e.svg
vendored
Normal file
57
web/dist/assets/robot-5e627a0e.svg
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 463 463" width="800px" height="800px" version="1.1">
|
||||
<defs>
|
||||
<filter id="glow">
|
||||
<feGaussianBlur stdDeviation="5" result="coloredBlur"/>
|
||||
<feMerge>
|
||||
<feMergeNode in="coloredBlur"/>
|
||||
<feMergeNode in="SourceGraphic"/>
|
||||
</feMerge>
|
||||
</filter>
|
||||
<linearGradient id="robotGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#00ffff;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#0080ff;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<g filter="url(#glow)">
|
||||
<path fill="url(#robotGradient)" d="M207.5,127c4.143,0,7.5-3.358,7.5-7.5v-8c0-4.142-3.357-7.5-7.5-7.5s-7.5,3.358-7.5,7.5v8
|
||||
C200,123.642,203.357,127,207.5,127z"/>
|
||||
<path fill="url(#robotGradient)" d="M255.5,127c4.143,0,7.5-3.358,7.5-7.5v-8c0-4.142-3.357-7.5-7.5-7.5s-7.5,3.358-7.5,7.5v8
|
||||
C248,123.642,251.357,127,255.5,127z"/>
|
||||
<path fill="url(#robotGradient)" d="M386.854,312.792L375,306.865v-69.099c9.29-3.138,16-11.93,16-22.266c0-12.958-10.542-23.5-23.5-23.5H335v-8.5
|
||||
c0-4.142-3.357-7.5-7.5-7.5H311v-40.5c0-26.05-12.595-49.213-32.014-63.721C278.989,71.686,279,71.594,279,71.5V45.766
|
||||
c9.29-3.138,16-11.93,16-22.266C295,10.542,284.458,0,271.5,0S248,10.542,248,23.5c0,10.336,6.71,19.128,16,22.266v17.209
|
||||
C254.07,58.507,243.076,56,231.5,56s-22.57,2.507-32.5,6.975V45.766c9.29-3.138,16-11.93,16-22.266C215,10.542,204.458,0,191.5,0
|
||||
S168,10.542,168,23.5c0,10.336,6.71,19.128,16,22.266V71.5c0,0.094,0.011,0.186,0.014,0.279C164.595,86.287,152,109.45,152,135.5
|
||||
V176h-16.5c-4.143,0-7.5,3.358-7.5,7.5v8.5H95.5C82.542,192,72,202.542,72,215.5c0,10.336,6.71,19.128,16,22.266v69.099
|
||||
l-11.854,5.927c-2.54,1.27-4.146,3.867-4.146,6.708v24c0,2.841,1.605,5.438,4.146,6.708l16,8c1.077,0.539,2.222,0.793,3.349,0.793
|
||||
c2.751,0,5.4-1.52,6.714-4.147c1.853-3.705,0.351-8.21-3.354-10.062L87,338.865v-14.729l8.5-4.25l8.5,4.25V335.5
|
||||
c0,4.142,3.357,7.5,7.5,7.5s7.5-3.358,7.5-7.5v-16c0-2.841-1.605-5.438-4.146-6.708L103,306.865V239h25v32.5
|
||||
c0,26.05,12.595,49.213,32.014,63.721c-0.003,0.093-0.014,0.185-0.014,0.279v48c0,10.336,6.71,19.128,16,22.266V416h-16.5
|
||||
c-2.807,0-5.378,1.566-6.665,4.06L138.415,448H135.5c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5,7.5,7.5h72c4.143,0,7.5-3.358,7.5-7.5
|
||||
v-32c0-4.142-3.357-7.5-7.5-7.5H191v-10.234c9.29-3.138,16-11.93,16-22.266v-32.513c0.167,0.001,0.332,0.013,0.5,0.013h48
|
||||
c0.168,0,0.333-0.012,0.5-0.013V383.5c0,10.336,6.71,19.128,16,22.266V416h-16.5c-4.143,0-7.5,3.358-7.5,7.5v32
|
||||
c0,4.142,3.357,7.5,7.5,7.5h72c4.143,0,7.5-3.358,7.5-7.5s-3.357-7.5-7.5-7.5h-2.915l-14.42-27.94
|
||||
c-1.287-2.494-3.858-4.06-6.665-4.06H287v-10.234c9.29-3.138,16-11.93,16-22.266v-48c0-0.094-0.011-0.186-0.014-0.279
|
||||
C322.405,320.713,335,297.55,335,271.5V239h25v67.865l-11.854,5.927c-2.54,1.27-4.146,3.867-4.146,6.708v16
|
||||
c0,4.142,3.357,7.5,7.5,7.5s7.5-3.358,7.5-7.5v-11.365l8.5-4.25l8.5,4.25v14.729l-11.854,5.927
|
||||
c-3.704,1.852-5.206,6.357-3.354,10.062c1.313,2.628,3.963,4.148,6.714,4.147c1.127,0,2.271-0.255,3.349-0.793l16-8
|
||||
c2.54-1.27,4.146-3.867,4.146-6.708v-24C391,316.659,389.395,314.062,386.854,312.792z M271.5,15c4.687,0,8.5,3.813,8.5,8.5
|
||||
s-3.813,8.5-8.5,8.5s-8.5-3.813-8.5-8.5S266.813,15,271.5,15z M191.5,15c4.687,0,8.5,3.813,8.5,8.5s-3.813,8.5-8.5,8.5
|
||||
s-8.5-3.813-8.5-8.5S186.813,15,191.5,15z M200,448h-44.705l8.774-17H200V448z M307.705,448H263v-17h35.931L307.705,448z
|
||||
M367.5,224c-4.687,0-8.5-3.813-8.5-8.5s3.813-8.5,8.5-8.5s8.5,3.813,8.5,8.5S372.187,224,367.5,224z M231.5,71
|
||||
c35.565,0,64.5,28.935,64.5,64.5v8.5H167v-8.5C167,99.935,195.935,71,231.5,71z M167,159h129v17H167V159z M95.5,207
|
||||
c4.687,0,8.5,3.813,8.5,8.5s-3.813,8.5-8.5,8.5s-8.5-3.813-8.5-8.5S90.813,207,95.5,207z M117.403,224
|
||||
c1.027-2.638,1.597-5.503,1.597-8.5s-0.57-5.862-1.597-8.5H128v17H117.403z M183.5,392c-4.687,0-8.5-3.813-8.5-8.5
|
||||
s3.813-8.5,8.5-8.5s8.5,3.813,8.5,8.5S188.187,392,183.5,392z M192,361.597c-2.638-1.027-5.503-1.597-8.5-1.597
|
||||
s-5.862,0.57-8.5,1.597v-17.572c5.38,2.421,11.069,4.27,17,5.447V361.597z M143,271.5V191h81v25h-24.5
|
||||
c-17.369,0-31.5,14.131-31.5,31.5s14.131,31.5,31.5,31.5H224v57h-16.5C171.935,336,143,307.065,143,271.5z M199.5,264
|
||||
c-9.098,0-16.5-7.402-16.5-16.5s7.402-16.5,16.5-16.5h64c9.098,0,16.5,7.402,16.5,16.5s-7.402,16.5-16.5,16.5H199.5z M279.5,392
|
||||
c-4.687,0-8.5-3.813-8.5-8.5s3.813-8.5,8.5-8.5s8.5,3.813,8.5,8.5S284.187,392,279.5,392z M288,361.597
|
||||
c-2.638-1.027-5.503-1.597-8.5-1.597s-5.862,0.57-8.5,1.597v-12.125c5.931-1.177,11.62-3.026,17-5.447V361.597z M320,271.5
|
||||
c0,35.565-28.935,64.5-64.5,64.5H239v-57h24.5c17.369,0,31.5-14.131,31.5-31.5S280.869,216,263.5,216H239v-25h81V271.5z M335,207
|
||||
h10.597c-1.027,2.638-1.597,5.503-1.597,8.5s0.57,5.862,1.597,8.5H335V207z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
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">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-51627d22.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-28075c11.css">
|
||||
<script type="module" crossorigin src="/assets/index-26abbdaa.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-ae7f4ed4.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -387,8 +387,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<UniversalForm ref="universalForm" class="z-20" />
|
||||
@ -1273,6 +1271,7 @@ export default {
|
||||
});
|
||||
this.$store.dispatch('fetchisRTOn');
|
||||
},
|
||||
|
||||
activated() {
|
||||
nextTick(() => {
|
||||
feather.replace()
|
||||
|
@ -89,6 +89,8 @@
|
||||
>
|
||||
Help
|
||||
</RouterLink>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,12 +30,23 @@
|
||||
|
||||
|
||||
</transition>
|
||||
<button v-if="isReady" @click="togglePanel" 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">
|
||||
<div v-show="panelCollapsed" ><i data-feather='chevron-right'></i></div>
|
||||
<div v-show="!panelCollapsed" ><i data-feather='chevron-left'></i></div>
|
||||
<button v-if="isReady" @click="togglePanel" class="absolute top-2 left-2 p-3 bg-white bg-opacity-10 rounded-full cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 animate-pulse shadow-lg hover:shadow-xl group">
|
||||
<div v-show="leftPanelCollapsed" ><i data-feather='chevron-right'></i></div>
|
||||
<div v-show="!leftPanelCollapsed" ><i data-feather='chevron-left'></i></div>
|
||||
</button>
|
||||
<!-- Robot SVG -->
|
||||
<button v-if="isReady" @click.stop="triggerRobotAction()" class="absolute top-2 right-2 p-3 bg-white bg-opacity-10 rounded-full cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 animate-pulse shadow-lg hover:shadow-xl group">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-10 h-10 text-blue-500 transition-colors duration-300 group-hover:text-yellow-400">
|
||||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
|
||||
<circle cx="12" cy="5" r="2"></circle>
|
||||
<path d="M12 7v4"></path>
|
||||
<line x1="8" y1="16" x2="8" y2="16"></line>
|
||||
<line x1="16" y1="16" x2="16" y2="16"></line>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<transition name="slide-right">
|
||||
<div v-if="showPanel"
|
||||
<div v-if="showLeftPanel"
|
||||
class="relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"
|
||||
>
|
||||
<!-- LEFT SIDE PANEL -->
|
||||
@ -287,6 +298,15 @@
|
||||
</ChatBox>
|
||||
</div>
|
||||
</div>
|
||||
<transition name="slide-left">
|
||||
<div v-if="showRightPanel"
|
||||
class="relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"
|
||||
>
|
||||
<!-- RIGHT SIDE PANEL -->
|
||||
<!-- <div v-html="lastMessageHtml"></div> -->
|
||||
<div ref="isolatedContent" class="h-full"></div>
|
||||
</div>
|
||||
</transition>
|
||||
<ChoiceDialog reference="database_selector" class="z-20"
|
||||
:show="database_selectorDialogVisible"
|
||||
:choices="databases"
|
||||
@ -305,7 +325,13 @@
|
||||
|
||||
<style scoped>
|
||||
|
||||
|
||||
@keyframes custom-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
|
||||
50% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
|
||||
}
|
||||
.animate-pulse {
|
||||
animation: custom-pulse 2s infinite;
|
||||
}
|
||||
|
||||
.slide-right-enter-active {
|
||||
transition: transform 0.3s ease;
|
||||
@ -320,6 +346,19 @@
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.slide-left-enter-active {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.slide-left-leave-active {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.slide-left-enter,
|
||||
.slide-left-leave-to {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.fade-and-fly-enter-active {
|
||||
animation: fade-and-fly-enter 0.5s ease;
|
||||
}
|
||||
@ -381,6 +420,7 @@ import memory_icon from "../assets/memory_icon.svg"
|
||||
import active_skills from "../assets/active.svg"
|
||||
import inactive_skills from "../assets/inactive.svg"
|
||||
import skillsRegistry from "../assets/registry.svg"
|
||||
import robot from "../assets/robot.svg"
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -389,10 +429,12 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
lastMessageHtml: "",
|
||||
memory_icon: memory_icon,
|
||||
active_skills:active_skills,
|
||||
inactive_skills:inactive_skills,
|
||||
skillsRegistry:skillsRegistry,
|
||||
robot:robot,
|
||||
posts_headers : {
|
||||
'accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
@ -458,15 +500,69 @@ export default {
|
||||
database_selectorDialogVisible:false,
|
||||
isDragOverDiscussion: false,
|
||||
isDragOverChat: false,
|
||||
panelCollapsed: false, // left panel collapse
|
||||
leftPanelCollapsed: false, // left panel collapse
|
||||
rightPanelCollapsed: true, // right panel
|
||||
isOpen: false,
|
||||
discussion_id: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
extractHtml() {
|
||||
console.log("Extracting html")
|
||||
if (this.discussionArr.length > 0) {
|
||||
const lastMessage = this.discussionArr[this.discussionArr.length - 1].content;
|
||||
const startTag = '```html';
|
||||
const endTag = '```';
|
||||
console.log("lastMessage")
|
||||
console.log(lastMessage)
|
||||
let startIndex = lastMessage.indexOf(startTag);
|
||||
console.log(startIndex)
|
||||
if (startIndex === -1) return "";
|
||||
|
||||
startIndex += startTag.length;
|
||||
let endIndex = lastMessage.indexOf(endTag, startIndex);
|
||||
console.log(endIndex)
|
||||
|
||||
if (endIndex === -1) {
|
||||
this.lastMessageHtml = lastMessage.slice(startIndex).trim();
|
||||
} else {
|
||||
this.lastMessageHtml = lastMessage.slice(startIndex, endIndex).trim();
|
||||
}
|
||||
} else {
|
||||
this.lastMessageHtml = '';
|
||||
}
|
||||
console.log("this.lastMessageHtml")
|
||||
console.log(this.lastMessageHtml)
|
||||
this.renderIsolatedContent()
|
||||
},
|
||||
renderIsolatedContent() {
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.style.border = 'none';
|
||||
iframe.style.width = '100%';
|
||||
iframe.style.height = '100px'; // Adjust as needed
|
||||
if (this.$refs.isolatedContent){
|
||||
this.$refs.isolatedContent.innerHTML = '';
|
||||
this.$refs.isolatedContent.appendChild(iframe);
|
||||
|
||||
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
iframeDoc.open();
|
||||
iframeDoc.write(`
|
||||
${this.lastMessageHtml}
|
||||
`);
|
||||
iframeDoc.close();
|
||||
}
|
||||
|
||||
},
|
||||
async triggerRobotAction(){
|
||||
this.rightPanelCollapsed = !this.rightPanelCollapsed;
|
||||
if(!this.rightPanelCollapsed){
|
||||
this.leftPanelCollapsed=true;
|
||||
}
|
||||
console.log(this.rightPanelCollapsed)
|
||||
},
|
||||
add_webpage(){
|
||||
console.log("addWebLink received")
|
||||
this.$refs.web_url_input_box.showPanel();
|
||||
this.$refs.web_url_input_box.showLeftPanel();
|
||||
},
|
||||
addWebpage(){
|
||||
|
||||
@ -616,7 +712,10 @@ export default {
|
||||
this.$store.state.toast.showToast(text, duration, isok)
|
||||
},
|
||||
togglePanel() {
|
||||
this.panelCollapsed = !this.panelCollapsed;
|
||||
this.leftPanelCollapsed = !this.leftPanelCollapsed;
|
||||
if (!this.leftPanelCollapsed){
|
||||
this.rightPanelCollapsed = true;
|
||||
}
|
||||
},
|
||||
toggleDropdown() {
|
||||
this.isOpen = !this.isOpen;
|
||||
@ -682,10 +781,10 @@ export default {
|
||||
}
|
||||
|
||||
socket.off('discussion')
|
||||
this.extractHtml()
|
||||
})
|
||||
|
||||
socket.emit('load_discussion',{"id":id});
|
||||
console.log("here")
|
||||
|
||||
}
|
||||
},
|
||||
@ -1337,6 +1436,7 @@ export default {
|
||||
messageItem.started_generating_at = msgObj.started_generating_at
|
||||
messageItem.nb_tokens = msgObj.nb_tokens
|
||||
messageItem.finished_generating_at = msgObj.finished_generating_at
|
||||
this.extractHtml()
|
||||
}
|
||||
else if(messageItem && msgObj.message_type==this.msgTypes.MSG_TYPE_CHUNK){
|
||||
this.isGenerating = true;
|
||||
@ -1345,6 +1445,7 @@ export default {
|
||||
messageItem.started_generating_at = msgObj.started_generating_at
|
||||
messageItem.nb_tokens = msgObj.nb_tokens
|
||||
messageItem.finished_generating_at = msgObj.finished_generating_at
|
||||
this.extractHtml()
|
||||
} else if (msgObj.message_type == this.msgTypes.MSG_TYPE_STEP){
|
||||
messageItem.status_message = msgObj.content
|
||||
messageItem.steps.push({"message":msgObj.content,"done":true, "status":true, "type": "instantanious" })
|
||||
@ -2113,8 +2214,12 @@ export default {
|
||||
SkillsLibraryViewer
|
||||
},
|
||||
watch: {
|
||||
messages: {
|
||||
handler: 'extractHtml',
|
||||
deep: true
|
||||
},
|
||||
progress_visibility_val(newVal) {
|
||||
console.log("progress_visibility changed")
|
||||
console.log("progress_visibility changed to "+ newVal)
|
||||
},
|
||||
filterTitle(newVal) {
|
||||
if (newVal == '') {
|
||||
@ -2202,11 +2307,8 @@ export default {
|
||||
UseDiscussionHistory() {
|
||||
return this.$store.state.config.activate_skills_lib;
|
||||
},
|
||||
isReady:{
|
||||
|
||||
get() {
|
||||
isReady() {
|
||||
return this.$store.state.ready;
|
||||
},
|
||||
},
|
||||
databases(){
|
||||
return this.$store.state.databases;
|
||||
@ -2214,12 +2316,11 @@ export default {
|
||||
client_id() {
|
||||
return socket.id
|
||||
},
|
||||
isReady(){
|
||||
console.log("verify ready", this.isCreated)
|
||||
return this.isCreated
|
||||
showLeftPanel() {
|
||||
return this.$store.state.ready && !this.leftPanelCollapsed;
|
||||
},
|
||||
showPanel() {
|
||||
return this.$store.state.ready && !this.panelCollapsed;
|
||||
showRightPanel() {
|
||||
return this.$store.state.ready && !this.rightPanelCollapsed;
|
||||
},
|
||||
socketConnected() {
|
||||
console.log(" --- > Websocket connected")
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7d1ff76edd35e8d2188fcdba3c9caa406ff84521
|
||||
Subproject commit abe41c00c348fc7ba8a5c3eab55dedccb38b3c3c
|
Loading…
Reference in New Issue
Block a user