mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac
This commit is contained in:
parent
3b9f4a6f5e
commit
49e57b6d13
3 changed files with 13 additions and 4 deletions
|
|
@ -13,7 +13,6 @@
|
||||||
import Overview from './Overview.svelte';
|
import Overview from './Overview.svelte';
|
||||||
import EllipsisVertical from '../icons/EllipsisVertical.svelte';
|
import EllipsisVertical from '../icons/EllipsisVertical.svelte';
|
||||||
import Artifacts from './Artifacts.svelte';
|
import Artifacts from './Artifacts.svelte';
|
||||||
import { min } from '@floating-ui/utils';
|
|
||||||
|
|
||||||
export let history;
|
export let history;
|
||||||
export let models = [];
|
export let models = [];
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,9 @@
|
||||||
TaskItem.configure({
|
TaskItem.configure({
|
||||||
nested: true
|
nested: true
|
||||||
}),
|
}),
|
||||||
CharacterCount,
|
CharacterCount.configure({
|
||||||
|
mode: 'nodeSize'
|
||||||
|
}),
|
||||||
...(autocomplete
|
...(autocomplete
|
||||||
? [
|
? [
|
||||||
AIAutocompletion.configure({
|
AIAutocompletion.configure({
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,9 @@
|
||||||
let files = [];
|
let files = [];
|
||||||
let messages = [];
|
let messages = [];
|
||||||
|
|
||||||
|
let wordCount = 0;
|
||||||
|
let charCount = 0;
|
||||||
|
|
||||||
let versionIdx = null;
|
let versionIdx = null;
|
||||||
let selectedModelId = null;
|
let selectedModelId = null;
|
||||||
|
|
||||||
|
|
@ -878,12 +881,12 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||||
<div class="flex items-center gap-1 px-1">
|
<div class="flex items-center gap-1 px-1">
|
||||||
<div>
|
<div>
|
||||||
{$i18n.t('{{count}} words', {
|
{$i18n.t('{{count}} words', {
|
||||||
count: editor.storage.characterCount.words()
|
count: wordCount
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{$i18n.t('{{count}} characters', {
|
{$i18n.t('{{count}} characters', {
|
||||||
count: editor.storage.characterCount.characters()
|
count: charCount
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -949,6 +952,11 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||||
onChange={(content) => {
|
onChange={(content) => {
|
||||||
note.data.content.html = content.html;
|
note.data.content.html = content.html;
|
||||||
note.data.content.md = content.md;
|
note.data.content.md = content.md;
|
||||||
|
|
||||||
|
if (editor) {
|
||||||
|
wordCount = editor.storage.characterCount.words();
|
||||||
|
charCount = editor.storage.characterCount.characters();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue