mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac: note revision history
This commit is contained in:
parent
d3ba1a0592
commit
74cafce4d2
2 changed files with 11 additions and 0 deletions
|
|
@ -665,6 +665,7 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||||
};
|
};
|
||||||
|
|
||||||
const insertHandler = (content) => {
|
const insertHandler = (content) => {
|
||||||
|
insertNoteVersion(note);
|
||||||
inputElement?.insertContent(content);
|
inputElement?.insertContent(content);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1075,6 +1076,9 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||||
{files}
|
{files}
|
||||||
onInsert={insertHandler}
|
onInsert={insertHandler}
|
||||||
onStop={stopResponseHandler}
|
onStop={stopResponseHandler}
|
||||||
|
insertNoteHandler={() => {
|
||||||
|
insertNoteVersion(note);
|
||||||
|
}}
|
||||||
scrollToBottomHandler={scrollToBottom}
|
scrollToBottomHandler={scrollToBottom}
|
||||||
/>
|
/>
|
||||||
{:else if selectedPanel === 'settings'}
|
{:else if selectedPanel === 'settings'}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@
|
||||||
|
|
||||||
export let onInsert = (content) => {};
|
export let onInsert = (content) => {};
|
||||||
export let onStop = () => {};
|
export let onStop = () => {};
|
||||||
|
|
||||||
|
export let insertNoteHandler = () => {};
|
||||||
export let scrollToBottomHandler = () => {};
|
export let scrollToBottomHandler = () => {};
|
||||||
|
|
||||||
let loaded = false;
|
let loaded = false;
|
||||||
|
|
@ -253,6 +255,11 @@ Based on the user's instruction, update and enhance the existing notes by incorp
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
|
|
||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
|
if (editorEnabled) {
|
||||||
|
insertNoteHandler();
|
||||||
|
}
|
||||||
|
|
||||||
await chatCompletionHandler();
|
await chatCompletionHandler();
|
||||||
messages = messages.map((message) => {
|
messages = messages.map((message) => {
|
||||||
message.done = true;
|
message.done = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue