mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
refac
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
import Overview from './Overview.svelte';
|
||||
import EllipsisVertical from '../icons/EllipsisVertical.svelte';
|
||||
import Artifacts from './Artifacts.svelte';
|
||||
import { min } from '@floating-ui/utils';
|
||||
|
||||
export let history;
|
||||
export let models = [];
|
||||
|
||||
@@ -499,7 +499,9 @@
|
||||
TaskItem.configure({
|
||||
nested: true
|
||||
}),
|
||||
CharacterCount,
|
||||
CharacterCount.configure({
|
||||
mode: 'nodeSize'
|
||||
}),
|
||||
...(autocomplete
|
||||
? [
|
||||
AIAutocompletion.configure({
|
||||
|
||||
@@ -104,6 +104,9 @@
|
||||
let files = [];
|
||||
let messages = [];
|
||||
|
||||
let wordCount = 0;
|
||||
let charCount = 0;
|
||||
|
||||
let versionIdx = 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>
|
||||
{$i18n.t('{{count}} words', {
|
||||
count: editor.storage.characterCount.words()
|
||||
count: wordCount
|
||||
})}
|
||||
</div>
|
||||
<div>
|
||||
{$i18n.t('{{count}} characters', {
|
||||
count: editor.storage.characterCount.characters()
|
||||
count: charCount
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
@@ -949,6 +952,11 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||
onChange={(content) => {
|
||||
note.data.content.html = content.html;
|
||||
note.data.content.md = content.md;
|
||||
|
||||
if (editor) {
|
||||
wordCount = editor.storage.characterCount.words();
|
||||
charCount = editor.storage.characterCount.characters();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user