Skip to content

Commit

Permalink
fix: release input area when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
OrenZhang committed Feb 5, 2024
1 parent 74c2b21 commit 047caed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const onKeydown = (event) => {
lastMeta.value = true;
return;
}
if (lastMeta.value && event.key === 'Enter') {
if (lastMeta.value && event.key === 'Enter' && !props.chatLoading) {
doChat();
}
lastMeta.value = false;
Expand Down Expand Up @@ -189,7 +189,6 @@ defineExpose({reGenerate, promptForm});
v-model="promptForm.content"
:placeholder="model ? ($t('CurrentModel') + ': ' + modelName) : $t('NoModelChoosed')"
:auto-size="{minRows: 6, maxRows: 6}"
:disabled="chatLoading"
@keydown="onKeydown"
@input="emits('toggleUserBehavior', false); emits('setPromptForm', promptForm)"
@focus="emits('toggleUserBehavior', false)"
Expand Down

0 comments on commit 047caed

Please sign in to comment.