|
@@ -232,6 +232,7 @@ export default {
|
|
try {
|
|
try {
|
|
const idToken = sessionStorage.getItem("idToken");
|
|
const idToken = sessionStorage.getItem("idToken");
|
|
const task = await this.$api.coreApi.createAITask(idToken, question);
|
|
const task = await this.$api.coreApi.createAITask(idToken, question);
|
|
|
|
+ // console.log(task,"235")
|
|
const taskId = task?.taskId;
|
|
const taskId = task?.taskId;
|
|
|
|
|
|
that.showCancelBtnTimeOut=setTimeout(() => {
|
|
that.showCancelBtnTimeOut=setTimeout(() => {
|
|
@@ -243,7 +244,7 @@ export default {
|
|
that.finalTaskId = taskId
|
|
that.finalTaskId = taskId
|
|
const checkCompletionText = async () => {
|
|
const checkCompletionText = async () => {
|
|
const result = await this.$api.coreApi.getAITaskResult(idToken, taskId);
|
|
const result = await this.$api.coreApi.getAITaskResult(idToken, taskId);
|
|
-
|
|
|
|
|
|
+ // console.log(result,"238")
|
|
if (result.hasOwnProperty('completionText')&&!that.cancelWaitingGPTRes) {
|
|
if (result.hasOwnProperty('completionText')&&!that.cancelWaitingGPTRes) {
|
|
that.currentGPTAns = result.completionText;
|
|
that.currentGPTAns = result.completionText;
|
|
that.$parent.isWaitingGptFeedbackDone = false;
|
|
that.$parent.isWaitingGptFeedbackDone = false;
|
|
@@ -255,6 +256,7 @@ export default {
|
|
that.currentGPTAns = this.$t('gptBox["emptyReply"]');
|
|
that.currentGPTAns = this.$t('gptBox["emptyReply"]');
|
|
that.$parent.isWaitingGptFeedbackDone = false;
|
|
that.$parent.isWaitingGptFeedbackDone = false;
|
|
that.clearShowCancelBtnTimeOut()
|
|
that.clearShowCancelBtnTimeOut()
|
|
|
|
+ that.cancelWaitingGPTRes = true
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|