mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 05:08:14 +00:00
refac
This commit is contained in:
parent
55d0ecc879
commit
e184a65dea
@ -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');
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user