editable code

This commit is contained in:
Saifeddine ALOUI 2024-06-19 00:41:31 +02:00
parent 806bcb595c
commit 350bad1ca9
10 changed files with 193 additions and 175 deletions

View File

@ -240,6 +240,9 @@ audio_silenceTimer: 5000
# Data vectorization
rag_databases: [] # This is the list of paths to database sources. Each database is a folder containing data
rag_vectorizer: bert # possible values bert, tfidf, word2vec
rag_chunk_size: 512 # number of tokens per chunk
activate_skills_lib: false # Activate vectorizing previous conversations
skills_lib_database_name: "default" # Default skills database

@ -1 +1 @@
Subproject commit fa66706061b4e68ec769efaa2473dd07dc9b8994
Subproject commit ec7cabfb4c7bbca6491a4d2d7334928eef042da7

File diff suppressed because one or more lines are too long

8
web/dist/assets/index-ca6ae81a.css vendored Normal file

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
View File

@ -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-553929ee.js"></script>
<link rel="stylesheet" href="/assets/index-31a9a387.css">
<script type="module" crossorigin src="/assets/index-fd9facd7.js"></script>
<link rel="stylesheet" href="/assets/index-ca6ae81a.css">
</head>
<body>
<div id="app"></div>

View File

@ -483,10 +483,16 @@ export default {
console.log("entry", dataSource);
const parts = dataSource.split('::');
console.log("extracted", parts[0]);
const isMounted = dataSource.endsWith('mounted');
const icon = isMounted ? 'feather:check' : '';
console.log("icon decision", icon);
return {
name: parts[0],
value: parts[0] || 'default_value',
icon: 'feather:file',
icon: icon,
help: 'mounts the database'
};
});
@ -1053,7 +1059,7 @@ export default {
},
removeItem(file) {
console.log("Réemoving ",file.name)
console.log("Removing ",file.name)
axios.post('/remove_discussion_file',{
client_id:this.$store.state.client_id,
name:file.name
@ -1073,7 +1079,10 @@ export default {
this.$emit('sendCMDEvent', cmd)
},
async mountDB(cmd){
await axios.post('/mount_rag_database', {"client_id":this.$store.state.client_id,"database_name":cmd})
await axios.post('/toggle_mount_rag_database', {"client_id":this.$store.state.client_id,"database_name":cmd})
await this.$store.dispatch('refreshConfig');
console.log("Refreshed")
},
addWebLink(){
console.log("Emitting addWebLink")

View File

@ -32,8 +32,13 @@
</div>
<pre class="hljs p-1 rounded-md break-all grid grid-cols-1">
<div class="code-container">
<code class="code-content overflow-x-auto break-all 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" v-html="highlightedCode"></code>
</div>
<div
class="code-content overflow-x-auto break-all 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"
v-html="highlightedCode"
contenteditable="true"
@input="updateCode"
></div>
</div>
</pre>
<span v-if="executionOutput" class="text-2xl">Execution output</span>
@ -294,6 +299,7 @@ export default {
.code-content {
flex-grow: 1;
margin: 0; /* Remove the default margin */
outline: none; /* Remove the default focus outline */
}

@ -1 +1 @@
Subproject commit a40a36d568b073ec859ff73741697dff4a6f4b9b
Subproject commit 05542e74a87daa356e0dd6bd187e5e804b5f56c5

@ -1 +1 @@
Subproject commit 6c149b8d1a600436e262b0b65e625267773d7243
Subproject commit a89d235678381ab63cf723edc34892c803d8b440