mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-20 17:22:47 +00:00
new stuff
This commit is contained in:
parent
2468ae29ec
commit
b60d834723
@ -91,6 +91,12 @@ async def execute_code(request: CodeRequest):
|
||||
message_id = request.message_id
|
||||
language = request.language
|
||||
|
||||
if language=="function":
|
||||
ASCIIColors.info("Executing function call:")
|
||||
ASCIIColors.yellow(code)
|
||||
lollmsElfServer.personality.execute_function()
|
||||
return execute_python(code, client, message_id)
|
||||
|
||||
if language=="python":
|
||||
ASCIIColors.info("Executing python code:")
|
||||
ASCIIColors.yellow(code)
|
||||
|
@ -120,14 +120,14 @@ def add_events(sio:socketio):
|
||||
cv2.imwrite(str(save_path), frame)
|
||||
if not lollmsElfServer.personality.processor is None:
|
||||
lollmsElfServer.info("Sending file to scripted persona")
|
||||
client.discussion.add_file(save_path, client, partial(lollmsElfServer.process_chunk, client_id = sid), lollmsElfServer.tasks_library)
|
||||
client.discussion.add_file(save_path, client, lollmsElfServer.tasks_library, partial(lollmsElfServer.process_chunk, client_id = sid))
|
||||
# lollmsElfServer.personality.processor.add_file(save_path, client, partial(lollmsElfServer.process_chunk, client_id = sid))
|
||||
# File saved successfully
|
||||
run_async(partial(sio.emit,'picture_taken', {'status':True, 'progress': 100}))
|
||||
lollmsElfServer.info("File sent to scripted persona")
|
||||
else:
|
||||
lollmsElfServer.info("Sending file to persona")
|
||||
client.discussion.add_file(save_path, client, partial(lollmsElfServer.process_chunk, client_id = sid), lollmsElfServer.tasks_library)
|
||||
client.discussion.add_file(save_path, client, lollmsElfServer.tasks_library, partial(lollmsElfServer.process_chunk, client_id = sid))
|
||||
#lollmsElfServer.personality.add_file(save_path, client, partial(lollmsElfServer.process_chunk, client_id = sid))
|
||||
# File saved successfully
|
||||
run_async(partial(sio.emit,'picture_taken', {'status':True, 'progress': 100}))
|
||||
|
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">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-135719ee.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-ee73ff6c.css">
|
||||
<script type="module" crossorigin src="/assets/index-24a66b56.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-7d5e8764.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
class="px-2 py-1 ml-2 text-left p-2 text-sm font-medium rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200">
|
||||
<i data-feather="copy"></i>
|
||||
</button>
|
||||
<button v-if="['python', 'sh', 'shell', 'bash', 'cmd', 'powershell', 'latex', 'mermaid', 'graphviz', 'dot', 'javascript', 'html', 'html5', 'svg'].includes(language)" ref="btn_code_exec" @click="executeCode" title="execute"
|
||||
<button v-if="['function', 'python', 'sh', 'shell', 'bash', 'cmd', 'powershell', 'latex', 'mermaid', 'graphviz', 'dot', 'javascript', 'html', 'html5', 'svg'].includes(language)" ref="btn_code_exec" @click="executeCode" title="execute"
|
||||
class="px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"
|
||||
:class="isExecuting?'bg-green-500':''">
|
||||
<i data-feather="play-circle"></i>
|
||||
|
@ -7,18 +7,23 @@
|
||||
|
||||
<div :class="!personality.installed ? 'border-red-500' : ''">
|
||||
|
||||
<div class="flex flex-row items-center flex-shrink-0 gap-3">
|
||||
<div class="flex flex-row items-center flex-shrink-0 gap-3">
|
||||
<img @click="toggleSelected" ref="imgElement" :src="getImgUrl()" @error="defaultImg($event)"
|
||||
class="w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer">
|
||||
<!-- :class="personality.installed ? 'grayscale-0':'grayscale'" -->
|
||||
<h3 @click="toggleSelected" class="font-bold font-large text-lg line-clamp-3 cursor-pointer">
|
||||
class="w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"
|
||||
@mouseover="showThumbnail" @mousemove="updateThumbnailPosition" @mouseleave="hideThumbnail">
|
||||
<h3 @click="toggleSelected" class="font-bold font-large text-lg line-clamp-3 cursor-pointer"
|
||||
@mouseover="showThumbnail" @mousemove="updateThumbnailPosition" @mouseleave="hideThumbnail">
|
||||
{{ personality.name }}
|
||||
</h3>
|
||||
<button
|
||||
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
|
||||
title="Copy link to clipboard" @click.stop="toggleCopyLink()">
|
||||
<i data-feather="clipboard" class="w-5"></i>
|
||||
</button>
|
||||
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"
|
||||
title="Copy link to clipboard" @click.stop="toggleCopyLink()">
|
||||
<i data-feather="clipboard" class="w-5"></i>
|
||||
</button>
|
||||
<div v-if="thumbnailVisible" :style="{ top: thumbnailPosition.y + 'px', left: thumbnailPosition.x + 'px' }"
|
||||
class="fixed z-50 w-20 h-20 rounded-full overflow-hidden">
|
||||
<img :src="getImgUrl()" class="w-full h-full object-fill">
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
@ -136,6 +141,8 @@ export default {
|
||||
return {
|
||||
isMounted: false,
|
||||
name: this.personality.name,
|
||||
thumbnailVisible: false,
|
||||
thumbnailPosition: { x: 0, y: 0 }
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -174,6 +181,18 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
showThumbnail() {
|
||||
this.thumbnailVisible = true;
|
||||
},
|
||||
hideThumbnail() {
|
||||
this.thumbnailVisible = false;
|
||||
},
|
||||
updateThumbnailPosition(event) {
|
||||
this.thumbnailPosition = {
|
||||
x: event.clientX + 10, // 10px offset to avoid cursor overlap
|
||||
y: event.clientY + 10
|
||||
};
|
||||
},
|
||||
getImgUrl() {
|
||||
return bUrl + this.personality.avatar
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e44b4539a114e2aee0ac15edc46f0cafc95a178d
|
||||
Subproject commit 6dbd8987d22c5745b1b0d5980f5d87d4dd97452c
|
Loading…
x
Reference in New Issue
Block a user