refac
This commit is contained in:
1 parent
b37907671e
commit
51e05988bd
2 files changed
+4
No files matched your search
@@ -2121,6 +2121,7 @@
|
|||||||
{stopResponse}
|
{stopResponse}
|
||||||
{createMessagePair}
|
{createMessagePair}
|
||||||
onChange={(input) => {
|
onChange={(input) => {
|
||||||
|
if (!$temporaryChatEnabled) {
|
||||||
if (input.prompt !== null) {
|
if (input.prompt !== null) {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
`chat-input${$chatId ? `-${$chatId}` : ''}`,
|
`chat-input${$chatId ? `-${$chatId}` : ''}`,
|
||||||
@@ -2129,6 +2130,7 @@
|
|||||||
} else {
|
} else {
|
||||||
localStorage.removeItem(`chat-input${$chatId ? `-${$chatId}` : ''}`);
|
localStorage.removeItem(`chat-input${$chatId ? `-${$chatId}` : ''}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
on:upload={async (e) => {
|
on:upload={async (e) => {
|
||||||
const { type, data } = e.detail;
|
const { type, data } = e.detail;
|
||||||
|
|||||||
@@ -216,11 +216,13 @@
|
|||||||
{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 (!$temporaryChatEnabled) {
|
||||||
if (input.prompt !== null) {
|
if (input.prompt !== null) {
|
||||||
localStorage.setItem(`chat-input`, JSON.stringify(input));
|
localStorage.setItem(`chat-input`, JSON.stringify(input));
|
||||||
} else {
|
} else {
|
||||||
localStorage.removeItem(`chat-input`);
|
localStorage.removeItem(`chat-input`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
on:upload={(e) => {
|
on:upload={(e) => {
|
||||||
dispatch('upload', e.detail);
|
dispatch('upload', e.detail);
|
||||||
|
|||||||
Reference in new issue
Block a user