lsc 5 ay önce
ebeveyn
işleme
199e722457

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.3e7a02624d59a3b1292768aeaa83846f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.382e92fdebaf6164bf93.js></script><script type=text/javascript src=./static/js/app.6f3a7b008a9a68b1510e.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.aa48c79d455410a7c9a8307816e9074b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.382e92fdebaf6164bf93.js></script><script type=text/javascript src=./static/js/app.44b52e3de8bb006dccb1.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.3e7a02624d59a3b1292768aeaa83846f.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.aa48c79d455410a7c9a8307816e9074b.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.aa48c79d455410a7c9a8307816e9074b.css.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.44b52e3de8bb006dccb1.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.44b52e3de8bb006dccb1.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 4 - 3
src/components/pages/aiAddCourse/addCourse.vue

@@ -5562,6 +5562,7 @@
         :targetCourseText2="targetCourseText2"
         :cpote="cpote"
         @addCourseBehavior="addCourseBehavior"
+        :fileids='[...knowFileids, ...knowFileids2]'
         @setIsQuote="setIsQuote"></aiBoxRight>
       </div>
       <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"  v-show="istemplate != 1 && isDialog == 1 && chatid">
@@ -8341,7 +8342,7 @@ export default {
           for(var index = 0; index < taskJson.length; index++){
             for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
               if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
-                if(this.$refs['evalist'+index+j][0].loading){
+                if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
                   this.$message({
                     message: `请等待任务${index+1}回答完毕后再继续`,
                     type: "warning"
@@ -8815,7 +8816,7 @@ export default {
         for(var index = 0; index < taskJson.length; index++){
           for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
             if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
-              if(this.$refs['evalist'+index+j][0].loading){
+              if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
                 this.$message({
                   message: `请等待任务${index+1}回答完毕后再继续`,
                   type: "warning"
@@ -17173,7 +17174,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
       for(var index = 0; index < taskJson.length; index++){
         for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
           if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
-            if(this.$refs['evalist'+index+j][0].loading){
+            if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
               this.$message({
                 message: `请等待任务${index+1}回答完毕后再继续`,
                 type: "warning"

+ 222 - 50
src/components/pages/aiAddCourse/aiBoxRight.vue

@@ -52,6 +52,10 @@
               @click="onCopy(item.aiContent)"
             />
           </div>
+          <div class="ai_tips_btn_box" v-if="item.promptArray && item.promptArray.length">
+            <span v-for="(pr, pindex) in item.promptArray" :key="pindex">{{ pr.name }}</span>
+            <span>更多</span>
+          </div>
         </div>
       </div>
     </div>
@@ -435,6 +439,10 @@ export default {
         return {};
       }
     },
+    fileids: {
+      type: Array,
+      default: []
+    },
     languageSetting: {
       type: Number,
       default: 0
@@ -621,6 +629,115 @@ export default {
           this.showjList = false;
         }
       }
+    },
+    jArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        if (newValue.length > oldValue.length) {
+          return
+          let addedData = newValue.filter((item, index) => {
+            return !oldValue.some((oldItem, oldIndex) => {
+              return JSON.stringify(oldItem) === JSON.stringify(item);
+            });
+          });
+          if (addedData[0].string.includes('aiDetail') || 
+              addedData[0].string.includes('aitargetTextDetail2') || 
+              addedData[0].string.includes('aiDetail1') || 
+              addedData[0].string.includes('teacherDetail2')) {
+            let promptJson = {
+              aiDetail: [
+                {
+                  name: '更换驱动性问题',
+                  prompt: '请重新生成该课程的驱动性问题,并确保它更加贴合实际课堂环境。确保问题能激发学生的好奇心和批判性思维。你仅需要重新输出新的驱动性问题。'
+                },
+                {
+                  name: '更换最终作品',
+                  prompt: '请重新生成该课程的最终作品(区分个人和团队作品),并确保它们更加贴合实际校园环境,更加具备可操作性,且更加丰富。'
+                },
+                {
+                  name: '生成更有创意的课程概述',
+                  prompt: '请优化该课程概述,使其更加创意十足,吸引学生的兴趣,但仍遵循原有结构。'
+                },
+              ],
+              aitargetTextDetail2: [
+                {
+                  name: '重新匹配课程标准',
+                  prompt: '请重新匹配适合该课程的具体学习目标,确保目标清晰、可衡量,并与国家标准接轨。'
+                },
+                {
+                  name: '整合课程目标',
+                  prompt: '将【课程目标】的分科课程目标进行整合,重新生成跨学科的综合课程目标描述,并确保目标在整个课程体系中相互关联。'
+                },
+                {
+                  name: '优化课程目标的可衡量性',
+                  prompt: '请重新设计课程目标,确保每个目标都具有可衡量性,能够有效评估学生的学习成果。'
+                },
+              ],
+              aiDetail1: [
+                {
+                  name: '优化子教学目标',
+                  prompt: '请根据该任务的内容,优化其子教学目标,使其更加具体且具有挑战性,帮助学生更好理解学习内容。'
+                },
+                {
+                  name: '改进过程性成果',
+                  prompt: '请重新设计该任务的过程性成果,并确保学生能够通过该过程成果展示出他们的学习进展。'
+                },
+                {
+                  name: '优化的子评价标准',
+                  prompt: '请重新设计该任务的评价标准,使其涵盖更多方面,综合评估学生的知识应用和技能发展。'
+                },
+              ],
+              teacherDetail2: [
+                {
+                  name: '优化教学过程',
+                  prompt: '请根据该任务的教学目标,优化教师活动和学生活动,确保两者有效互动,并加强教学设计意图的表达。'
+                },
+                {
+                  name: '改进评价量规',
+                  prompt: '请重新设计该任务的评价量规,确保其能够有效评估学生的学习成果,并指导改进学生的学习行为。'
+                },
+                {
+                  name: '扩展知识点讲解',
+                  prompt: '请扩展该任务中的相关知识点讲解,确保学生能够深刻理解核心概念,并通过课堂活动加以应用。'
+                },
+              ],
+            }
+            let _uid = uuidv4();
+            const md = new MarkdownIt();
+            let content = `根据您引用的内容, 猜您想让小可... 
+  \`\`\`
+  ${addedData[0].area + ':' + (addedData[0].value.length > 200 ? addedData[0].value.slice(0, 200) + '...' : addedData[0].value)}
+  \`\`\`
+              `
+            this.array.push({
+              loading: false,
+              role: "",
+              content: "",
+              uid: _uid,
+              AI: "AI",
+              aiContent: md.render(content),
+              oldContent: "",
+              isShowSynchronization: false,
+              filename: "",
+              index: 0,
+              is_mind_map: false,
+              fileid: "",
+              createtime: new Date().toLocaleString().replaceAll("/", "-"),
+              addedData: addedData[0],
+              promptArray: promptJson[Object.keys(promptJson).find(item => addedData[0].string.includes(item))] || []
+            });
+            console.log('新增数据:', addedData);
+            console.log(Object.values(promptJson).find(arr => arr.some(item => addedData[0].string.includes(item.name))))
+            this.$nextTick(() => {
+              this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+            });
+          }
+
+        } else {
+          console.log('没有新增数据');
+        }
+      }
     }
   },
   methods: {
@@ -843,9 +960,9 @@ ${message}`;
               message: _replaceText,
               session_name: `${this.courseId}-addCourseA`,
               uid: _uid,
-              file_ids: [],
+              file_ids: [...this.fileids],
               // model: "gpt-4o-mini"
-              model: "qwen-plus"
+              // model: "qwen-plus"
             };
 
             this.ajax
@@ -884,58 +1001,58 @@ ${message}`;
           });
 
           let history = [];
-          if (this.continuous) {
-            this.array.forEach((i, index) => {
-              if (i.content)
-                history.push({
-                  role: "user",
-                  content: index == this.array.length - 1 ? `NOTICE
-Language: ${this.getLang()}
-
-${message}` : `NOTICE
-Language: ${this.getLang()}
-
-${i.content}`
-                });
-              if (i.aiContent)
-                history.push({ role: "assistant", content: i.aiContent });
-            });
-          } else {
-            history.push({ role: "user", content: message });
-          }
-          history = history.filter(
-            i =>
-              i.content !=
-              "您好,我是您的创课助手小可,在创课中遇到什么问题,都可以与我对话~,我会尽量帮助您的"
-          );
-
-          history = history.map(i => ({
-            role: i.role,
-            content: `NOTICE
-Language: ${this.getLang()}
+//           if (this.continuous) {
+//             this.array.forEach((i, index) => {
+//               if (i.content)
+//                 history.push({
+//                   role: "user",
+//                   content: index == this.array.length - 1 ? `NOTICE
+// Language: ${this.getLang()}
+
+// ${message}` : `NOTICE
+// Language: ${this.getLang()}
+
+// ${i.content}`
+//                 });
+//               if (i.aiContent)
+//                 history.push({ role: "assistant", content: i.aiContent });
+//             });
+//           } else {
+//             history.push({ role: "user", content: message });
+//           }
+//           history = history.filter(
+//             i =>
+//               i.content !=
+//               "您好,我是您的创课助手小可,在创课中遇到什么问题,都可以与我对话~,我会尽量帮助您的"
+//           );
+
+//           history = history.map(i => ({
+//             role: i.role,
+//             content: `NOTICE
+// Language: ${this.getLang()}
+
+// ${i.content}`
+//           }));
+          let _replaceText = `NOTICE
+          Language: ${this.getLang()}
 
-${i.content}`
-          }));
+          ${message}`;
           this.$nextTick(() => {
             this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
           });
-          let params = JSON.stringify({
-            // model: "gpt-3.5-turbo",
-            // model: "gpt-4o-mini",
-            model: "qwen-plus",
-            temperature: 0,
-            max_tokens: 4096,
-            top_p: 1,
-            frequency_penalty: 0,
-            presence_penalty: 0,
-            messages: history,
+          let params = {
+            assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
+            userId: this.userid,
+            message: _replaceText,
+            session_name: this.continuous ? `${this.courseId}-addCourseA` : uuidv4(),
             uid: _uuid,
-            mind_map_question: ""
-          });
-          this.courseText = "";
+            file_ids: [...this.fileids],
+            // model: "gpt-4o-mini"
+            // model: "qwen-plus"
+          };
 
           this.ajax
-            .post("https://gpt4.cocorobo.cn/chat", params)
+            .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
             .then(res => {
               if (
                 converter(res.data.FunctionResponse.result) ==
@@ -945,11 +1062,43 @@ ${i.content}`
                 this.$message.warning(res.data.FunctionResponse.result);
               }
             })
-            .catch(e => {
-              console.log(e);
+            .catch(err => {
+              console.log(err);
             });
-          this.getAiContent(_uuid);
+          this.getAtAuContent(_uuid);
           this.saveUid = _uuid;
+          this.courseText = "";
+          // let params = JSON.stringify({
+          //   // model: "gpt-3.5-turbo",
+          //   // model: "gpt-4o-mini",
+          //   model: "qwen-plus",
+          //   temperature: 0,
+          //   max_tokens: 4096,
+          //   top_p: 1,
+          //   frequency_penalty: 0,
+          //   presence_penalty: 0,
+          //   messages: history,
+          //   uid: _uuid,
+          //   mind_map_question: ""
+          // });
+          // this.courseText = "";
+
+          // this.ajax
+          //   .post("https://gpt4.cocorobo.cn/chat", params)
+          //   .then(res => {
+          //     if (
+          //       converter(res.data.FunctionResponse.result) ==
+          //       converter("发送成功")
+          //     ) {
+          //     } else {
+          //       this.$message.warning(res.data.FunctionResponse.result);
+          //     }
+          //   })
+          //   .catch(e => {
+          //     console.log(e);
+          //   });
+          // this.getAiContent(_uuid);
+          // this.saveUid = _uuid;
         }
       }
     },
@@ -1874,6 +2023,7 @@ ${i.content}`
   display: flex;
   align-items: flex-start;
   width: 100%;
+  flex-wrap: wrap;
 }
 
 .dialog_content + .dialog_content {
@@ -2157,4 +2307,26 @@ ${i.content}`
   cursor: pointer;
   width: 15px;
 }
+
+.ai_tips_btn_box{
+  width: 100%;
+  padding: 0 20px 0 50px;
+  display: flex;
+  flex-direction: column;
+  margin-top: 27px;
+  box-sizing: border-box;
+}
+
+.ai_tips_btn_box > span{
+  cursor: pointer;
+  background: #9bc1ff;
+  color: #ffffff;
+  width: fit-content;
+  padding: 8px;
+  border-radius: 5px;
+}
+
+.ai_tips_btn_box > span + span{
+  margin-top: 6px;
+}
 </style>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor