This commit is contained in:
Timothy Jaeryang Baek 2025-07-09 13:47:10 +04:00
parent 3b9f4a6f5e
commit 49e57b6d13
3 changed files with 13 additions and 4 deletions

View file

@ -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 = [];

View file

@ -499,7 +499,9 @@
TaskItem.configure({
nested: true
}),
CharacterCount,
CharacterCount.configure({
mode: 'nodeSize'
}),
...(autocomplete
? [
AIAutocompletion.configure({

View file

@ -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>