scoping stuff

This commit is contained in:
Saifeddine ALOUI 2025-01-27 02:19:37 +01:00
parent 0119a3df53
commit dd1183eda4
7 changed files with 56 additions and 56 deletions

17
web/dist/assets/index-BIdoK8Yo.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

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script> <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<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</title> <title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-CnTRzB7A.js"></script> <script type="module" crossorigin src="/assets/index-DD1gUR26.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-llyd--IR.css"> <link rel="stylesheet" crossorigin href="/assets/index-BIdoK8Yo.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -232,7 +232,7 @@
}; };
</script> </script>
<style> <style scoped>
.math { .math {
display: inline-block; /* this should allow inline math to display inline */ display: inline-block; /* this should allow inline math to display inline */
} }

View File

@ -276,7 +276,7 @@
</div> </div>
</template> </template>
<style> <style scoped>
.expand-button { .expand-button {
margin-left: 10px; margin-left: 10px;
/* Add space between sender and expand button */ /* Add space between sender and expand button */

View File

@ -4676,42 +4676,42 @@ export default {
}, },
methods: { methods: {
triggerFileInput() { triggerFileInput() {
this.$refs.fileInput.click() this.$refs.fileInput.click()
}, },
async handleFileUpload(event) { async handleFileUpload(event) {
const files = event.target.files const files = event.target.files
if (!files.length) return if (!files.length) return
this.isUploading = true this.isUploading = true
const formData = new FormData() const formData = new FormData()
// Add database name
formData.append('database_name', this.databaseName)
// Add all files
Array.from(files).forEach(file => {
formData.append('files', file)
})
try {
const response = await axios.post('/upload_files_2_rag_db', formData, {
headers: {
'Content-Type': 'multipart/form-data'
},
onUploadProgress: (progressEvent) => {
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
this.$emit('upload-progress', percentCompleted)
}
})
this.$emit('upload-success', response.data) // Add database name
} catch (error) { formData.append('database_name', this.databaseName)
console.error('Upload failed:', error)
this.$emit('upload-error', error) // Add all files
} finally { Array.from(files).forEach(file => {
this.isUploading = false formData.append('files', file)
event.target.value = '' })
}
try {
const response = await axios.post('/upload_files_2_rag_db', formData, {
headers: {
'Content-Type': 'multipart/form-data'
},
onUploadProgress: (progressEvent) => {
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
this.$emit('upload-progress', percentCompleted)
}
})
this.$emit('upload-success', response.data)
} catch (error) {
console.error('Upload failed:', error)
this.$emit('upload-error', error)
} finally {
this.isUploading = false
event.target.value = ''
}
}, },
updateRagDatabase(index, value, field) { updateRagDatabase(index, value, field) {
if (field) { if (field) {