mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 05:45:19 +00:00
refac
This commit is contained in:
parent
b37907671e
commit
51e05988bd
2 changed files with 15 additions and 11 deletions
|
|
@ -2121,13 +2121,15 @@
|
||||||
{stopResponse}
|
{stopResponse}
|
||||||
{createMessagePair}
|
{createMessagePair}
|
||||||
onChange={(input) => {
|
onChange={(input) => {
|
||||||
if (input.prompt !== null) {
|
if (!$temporaryChatEnabled) {
|
||||||
localStorage.setItem(
|
if (input.prompt !== null) {
|
||||||
`chat-input${$chatId ? `-${$chatId}` : ''}`,
|
localStorage.setItem(
|
||||||
JSON.stringify(input)
|
`chat-input${$chatId ? `-${$chatId}` : ''}`,
|
||||||
);
|
JSON.stringify(input)
|
||||||
} else {
|
);
|
||||||
localStorage.removeItem(`chat-input${$chatId ? `-${$chatId}` : ''}`);
|
} else {
|
||||||
|
localStorage.removeItem(`chat-input${$chatId ? `-${$chatId}` : ''}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
on:upload={async (e) => {
|
on:upload={async (e) => {
|
||||||
|
|
|
||||||
|
|
@ -216,10 +216,12 @@
|
||||||
{createMessagePair}
|
{createMessagePair}
|
||||||
placeholder={$i18n.t('How can I help you today?')}
|
placeholder={$i18n.t('How can I help you today?')}
|
||||||
onChange={(input) => {
|
onChange={(input) => {
|
||||||
if (input.prompt !== null) {
|
if (!$temporaryChatEnabled) {
|
||||||
localStorage.setItem(`chat-input`, JSON.stringify(input));
|
if (input.prompt !== null) {
|
||||||
} else {
|
localStorage.setItem(`chat-input`, JSON.stringify(input));
|
||||||
localStorage.removeItem(`chat-input`);
|
} else {
|
||||||
|
localStorage.removeItem(`chat-input`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
on:upload={(e) => {
|
on:upload={(e) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue