fix
This commit is contained in:
1 parent
e55b894309
commit
75884bbaa7
3 files changed
+7
-2
No files matched your search
@@ -9,7 +9,7 @@ import { IContent, IError, IMessageState } from '@/operators/message/models';
|
|||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import MarkdownRenderer from '@/components/common/MarkdownRenderer.vue';
|
import MarkdownRenderer from '@/components/common/MarkdownRenderer.vue';
|
||||||
import { ElAlert } from 'element-plus';
|
import { ElAlert } from 'element-plus';
|
||||||
import { ERROR_CODE_API_ERROR, ERROR_CODE_BUSY, ERROR_CODE_BAD_REQUEST } from '@/constants';
|
import { ERROR_CODE_API_ERROR, ERROR_CODE_BUSY, ERROR_CODE_BAD_REQUEST, ERROR_CODE_NO_CONVERSATION } from '@/constants';
|
||||||
import AnsweringMark from './AnsweringMark.vue';
|
import AnsweringMark from './AnsweringMark.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -57,6 +57,9 @@ export default defineComponent({
|
|||||||
if (this.error?.code === ERROR_CODE_BAD_REQUEST) {
|
if (this.error?.code === ERROR_CODE_BAD_REQUEST) {
|
||||||
return this.$t('conversation.message.errorBadRequest');
|
return this.$t('conversation.message.errorBadRequest');
|
||||||
}
|
}
|
||||||
|
if (this.error?.code === ERROR_CODE_NO_CONVERSATION) {
|
||||||
|
return this.$t('conversation.message.errorNoConversation');
|
||||||
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ export const ERROR_CODE_DUPLICATION = 'duplication';
|
|||||||
export const ERROR_CODE_BUSY = 'busy';
|
export const ERROR_CODE_BUSY = 'busy';
|
||||||
export const ERROR_CODE_API_ERROR = 'api_error';
|
export const ERROR_CODE_API_ERROR = 'api_error';
|
||||||
export const ERROR_CODE_BAD_REQUEST = 'bad_request';
|
export const ERROR_CODE_BAD_REQUEST = 'bad_request';
|
||||||
|
export const ERROR_CODE_NO_CONVERSATION = 'no_conversation';
|
||||||
@@ -16,5 +16,6 @@ export default {
|
|||||||
onlyKnowBefore2021: '对2021年之后的世界和事件了解有限',
|
onlyKnowBefore2021: '对2021年之后的世界和事件了解有限',
|
||||||
errorBusy: 'Worker正在忙碌中,请稍后重试',
|
errorBusy: 'Worker正在忙碌中,请稍后重试',
|
||||||
errorApiError: '回答失败,请稍后重试',
|
errorApiError: '回答失败,请稍后重试',
|
||||||
errorBadRequest: '请求内容不规范,请重新提问'
|
errorBadRequest: '请求内容不规范,请重新提问',
|
||||||
|
errorNoConversation: '对话内容不存在或者已经过期,请发起新的会话'
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user