This commit is contained in:
Saifeddine ALOUI 2024-03-19 22:52:35 +01:00
parent 59bc51c56a
commit a58678fae8
5 changed files with 216 additions and 214 deletions

@ -1 +1 @@
Subproject commit cef553c0096d54cdffbd613338cc3a2f0bebb333
Subproject commit 7e37be141db8b479161af61ae2dec44bd45a6d81

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-e09b2851.js"></script>
<link rel="stylesheet" href="/assets/index-2c1333b9.css">
<script type="module" crossorigin src="/assets/index-a602ce2c.js"></script>
<link rel="stylesheet" href="/assets/index-c09c0bda.css">
</head>
<body>
<div id="app"></div>

View File

@ -1,44 +1,46 @@
<template>
<div>
<span v-for="(token, index) in namedTokens" :key="index">
<span :style="{ backgroundColor: colors[index % colors.length] }">{{ token[0] }}</span>
</span>
<div class="w-full">
<div class="break-words">
<span v-for="(token, index) in namedTokens" :key="index">
<span class="inline-block whitespace-pre-wrap" :style="{ backgroundColor: colors[index % colors.length] }">{{ token[0] }}</span>
</span>
</div>
<div>
<span v-for="(token, index) in namedTokens" :key="index">
<span :style="{ backgroundColor: colors[index % colors.length] }">{{ token[1] }}</span>
</span>
<div class="break-words mt-2">
<span v-for="(token, index) in namedTokens" :key="index">
<span class="inline-block px-1 whitespace-pre-wrap" :style="{ backgroundColor: colors[index % colors.length] }">{{ token[1] }}</span>
</span>
</div>
<div class="mt-4">
<strong>Total Tokens: {{ namedTokens.length }}</strong>
</div>
</div>
</template>
<script>
export default {
name: "TokensHilighter",
name: "TokensHighlighter",
props: {
namedTokens: {
type: Object,
required: true
}
},
data() {
return {
colors: [
'#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
'#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D',
'#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A',
'#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC',
'#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC',
'#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399',
'#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680',
'#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933',
'#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3',
'#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF'
]
}
},
props: {
namedTokens: {
type: Object,
required: true
}
},
data() {
return {
colors: [
'#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
'#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D',
'#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A',
'#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC',
'#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC',
'#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399',
'#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680',
'#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933',
'#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3',
'#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF'
]
}
},
}
</script>