mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac
This commit is contained in:
@@ -41,6 +41,7 @@
|
|||||||
{save}
|
{save}
|
||||||
on:save={(e) => {
|
on:save={(e) => {
|
||||||
dispatch('update', {
|
dispatch('update', {
|
||||||
|
raw: token.raw,
|
||||||
oldContent: token.text,
|
oldContent: token.text,
|
||||||
newContent: e.detail
|
newContent: e.detail
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -481,11 +481,11 @@
|
|||||||
save={true}
|
save={true}
|
||||||
{model}
|
{model}
|
||||||
on:update={(e) => {
|
on:update={(e) => {
|
||||||
const { oldContent, newContent } = e.detail;
|
const { raw, oldContent, newContent } = e.detail;
|
||||||
|
|
||||||
history.messages[message.id].content = history.messages[
|
history.messages[message.id].content = history.messages[
|
||||||
message.id
|
message.id
|
||||||
].content.replace(oldContent, newContent);
|
].content.replace(raw, raw.replace(oldContent, newContent));
|
||||||
|
|
||||||
dispatch('update');
|
dispatch('update');
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user