Explorar el Código

enh: note editor prompts

Timothy Jaeryang Baek hace 3 meses
padre
commit
3be734fd84

+ 6 - 1
src/lib/components/notes/NoteEditor.svelte

@@ -164,6 +164,9 @@
 		debounceTimeout = setTimeout(async () => {
 		debounceTimeout = setTimeout(async () => {
 			const res = await updateNoteById(localStorage.token, id, {
 			const res = await updateNoteById(localStorage.token, id, {
 				title: note?.title === '' ? $i18n.t('Untitled') : note.title,
 				title: note?.title === '' ? $i18n.t('Untitled') : note.title,
+				data: {
+					files: files
+				},
 				access_control: note?.access_control
 				access_control: note?.access_control
 			}).catch((e) => {
 			}).catch((e) => {
 				toast.error(`${e}`);
 				toast.error(`${e}`);
@@ -428,6 +431,8 @@ ${content}
 		} else {
 		} else {
 			note.data.files = null;
 			note.data.files = null;
 		}
 		}
+
+		changeDebounceHandler();
 	};
 	};
 
 
 	const inputFilesHandler = async (inputFiles) => {
 	const inputFilesHandler = async (inputFiles) => {
@@ -632,7 +637,7 @@ Input will be provided within <notes> and <context> XML tags, providing a struct
 
 
 # Output Format
 # Output Format
 
 
-Provide the enhanced notes in markdown format. Use markdown syntax for headings, lists (ordered, bullet, or checklist), and emphasis to improve clarity and presentation. Ensure that all integrated content from the context is accurately reflected. Return only the markdown formatted note.
+Provide the enhanced notes in markdown format. Use markdown syntax for headings, lists, task lists ([ ]) where tasks or checklists are implied, and emphasis to improve clarity and presentation. Ensure that all integrated content from the context is accurately reflected. Return only the markdown formatted note.
 `;
 `;
 
 
 		const [res, controller] = await chatCompletion(
 		const [res, controller] = await chatCompletion(

+ 1 - 1
src/lib/components/notes/NoteEditor/Chat.svelte

@@ -95,7 +95,7 @@ Based on the user's instruction, update and enhance the existing notes by incorp
 ## Output Instructions
 ## Output Instructions
 - Deliver a single, rewritten version of the notes in markdown format.
 - Deliver a single, rewritten version of the notes in markdown format.
 - Integrate information from the context only if it directly supports the user's instruction.
 - Integrate information from the context only if it directly supports the user's instruction.
-- Use clear, organized markdown elements: headings, lists (ordered, bullet, or checklist), bold and italic text as appropriate.
+- Use clear, organized markdown elements: headings, lists, task lists ([ ]) where tasks or checklists are implied, bold and italic text as appropriate.
 - Focus on improving clarity, completeness, and usefulness of the notes.
 - Focus on improving clarity, completeness, and usefulness of the notes.
 - Return only the final, fully-edited markdown notes—do not include explanations, reasoning, or XML tags.
 - Return only the final, fully-edited markdown notes—do not include explanations, reasoning, or XML tags.
 `;
 `;