#42 fix: remove AI chat limit and unblock submit

Слито
LiuLuLin слито 2 коммит(ов) из FanYanPeng/lll_fix_llm в FanYanPeng/host-nju 4 месяцев назад
3 измененных файлов с 2 добавлено и 21 удалено
  1. 0 9
      src/components/AIChatter/AIChatter.vue
  2. 0 10
      src/views/Home/component/Edit/index.vue
  3. 2 2
      vite.config.js

+ 0 - 9
src/components/AIChatter/AIChatter.vue

@@ -188,7 +188,6 @@
     "请用英文描述一个场景或一个观点:xxx",
     // 更多问题模板...
   ];
-  let AICount = ref(0);
 
   const inputRef = ref(null);
   const messagesEndRef = ref(null);
@@ -269,14 +268,6 @@
       startTime: startTime,
       endTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss.SSS")
     })
-    //限制会话次数
-    if(AICount.value<10){
-      AICount.value++
-    } else {
-      ElMessage.warning("单次只能使用10次对话功能")
-      // AICount.value++
-      return
-    }
     data.loading = true;
 
     const questionContent = data.questionContent.trim()

+ 0 - 10
src/views/Home/component/Edit/index.vue

@@ -14,7 +14,6 @@
         <el-button
           type="primary"
           @click="handleSubmit"
-          :disabled="aiEvalBusy || store.aiEvalBusy"
           color="#4A90C4"
           style="color: #FFFFFF; width: 70px;"
         >
@@ -23,7 +22,6 @@
         <el-button
           type="primary"
           @click="handleStage"
-          :disabled="aiEvalBusy || store.aiEvalBusy"
           color="#4A90C4"
           style="color: #FFFFFF; width: 70px; margin-left: 15px;"
         >
@@ -108,10 +106,6 @@
 
   // 提交操作
   const handleSubmit = async () => {
-    if (aiEvalBusy.value || store.aiEvalBusy) {
-      ElMessage.warning('智能批改进行中,请稍候再提交')
-      return
-    }
     if (props.isExamMode) {
       try {
         await ElMessageBox.confirm(
@@ -157,10 +151,6 @@
 
   // 暂存操作
   const handleStage = async (isSubmit = false) => {
-    if (aiEvalBusy.value || store.aiEvalBusy) {
-      ElMessage.warning('智能批改进行中,请稍候再暂存')
-      return
-    }
     try {
       console.log(props)
       const _res = await apis.engagementStage(store.user.id, props.engagement.assignmentId, JSON.stringify(getQuillContent), getText.value, getHTML.value);

+ 2 - 2
vite.config.js

@@ -11,8 +11,8 @@ export default defineConfig({
             scss: {
                 // Use Sass modern JS API to avoid legacy API warnings.
                 api: 'modern-compiler',
-            },
-        },
+            }
+        }
     },
     resolve: {
         alias: {