fix startup status detect

This commit is contained in:
josc146
2023-05-25 00:51:45 +08:00
parent 5729d9fc62
commit 6f629dbc55
6 changed files with 24 additions and 24 deletions

View File

@@ -93,7 +93,7 @@ const ChatPanel: FC = observer(() => {
e.stopPropagation();
if (e.type === 'click' || (e.keyCode === 13 && !e.shiftKey)) {
e.preventDefault();
if (commonStore.status.modelStatus === ModelStatus.Offline) {
if (commonStore.status.status === ModelStatus.Offline) {
toast(t('Please click the button in the top right corner to start the model'), { type: 'warning' });
return;
}

View File

@@ -135,7 +135,7 @@ const CompletionPanel: FC = observer(() => {
};
const onSubmit = (prompt: string) => {
if (commonStore.status.modelStatus === ModelStatus.Offline) {
if (commonStore.status.status === ModelStatus.Offline) {
toast(t('Please click the button in the top right corner to start the model'), { type: 'warning' });
commonStore.setCompletionGenerating(false);
return;