From 6db5359cd1e59e47a13b5e1b17950e403ae5e0ac Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 7 Dec 2023 22:16:12 +0800 Subject: [PATCH] Complain about token first before question --- src/components/ShellView/ShellCell.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ShellView/ShellCell.vue b/src/components/ShellView/ShellCell.vue index 8fe0688..9ae2c6a 100644 --- a/src/components/ShellView/ShellCell.vue +++ b/src/components/ShellView/ShellCell.vue @@ -132,12 +132,12 @@ export default { question = question.trim(); const token = this.settingsStore.gpt.apiToken; const model = this.settingsStore.gpt.model; - if (!question) { - this.errorMessage = "The question cannot be empty. Please type a question and try again."; - } if (!token) { this.errorMessage = "OpenAI API token is not set. Please set the token in the settings and try again."; } + if (!question) { + this.errorMessage = "The question cannot be empty. Please type a question and try again."; + } if (this.errorMessage) { this.$nextTick(() => { this.$refs.resultContainer.handleDataChange(this.schema, null, this.errorMessage);