+
{{ displayEvalMessage }}
@@ -37,18 +38,17 @@
-
-
-
-
+
AI智能评分
@@ -194,6 +224,10 @@ function requestEvaluation() {
margin: 0;
}
}
+.ai-instruction { margin: -4px 0 12px; color: #9fcbe2; font-size: 13px; line-height: 1.6; }
+.reference-block { width: 100%; border: 0; background: transparent; padding: 14px 0 0; text-align: left; cursor: pointer; }
+.reference-block:hover strong { color: #77eaff; }
+.assessment-button { width: 100%; margin-top: 14px; min-height: 44px; font-weight: 800; }
.output-glow {
position: absolute;
diff --git a/src/views/components/studentTrainingAiPanel.js b/src/views/components/studentTrainingAiPanel.js
new file mode 100644
index 0000000..7c09f6b
--- /dev/null
+++ b/src/views/components/studentTrainingAiPanel.js
@@ -0,0 +1,4 @@
+export function buildReferencePrompt(referenceText) {
+ const text = String(referenceText || "").trim();
+ return text ? `请根据以下参考提示词协助我完成当前任务:\n${text}` : "";
+}
diff --git a/src/views/training/GenericTrainingPage.vue b/src/views/training/GenericTrainingPage.vue
index d90a329..701d259 100644
--- a/src/views/training/GenericTrainingPage.vue
+++ b/src/views/training/GenericTrainingPage.vue
@@ -155,9 +155,8 @@
-
-
@@ -170,7 +169,6 @@ import { Download, Upload } from "@element-plus/icons-vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import { getStudentTrainingPage } from "./studentTrainingPages";
-import TrainingAiEvaluation from "@/views/components/TrainingAiEvaluation.vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingTaskBrief from "@/views/components/TrainingTaskBrief.vue";
import { isStudentDemo } from "@/utils/studentDemo";
diff --git a/tests/student-training-ai-panel.test.mjs b/tests/student-training-ai-panel.test.mjs
new file mode 100644
index 0000000..bf02bb1
--- /dev/null
+++ b/tests/student-training-ai-panel.test.mjs
@@ -0,0 +1,10 @@
+import assert from "node:assert/strict";
+import { buildReferencePrompt } from "../src/views/components/studentTrainingAiPanel.js";
+
+assert.equal(
+ buildReferencePrompt("先从案例中拆出核心层、有形层、延伸层。"),
+ "请根据以下参考提示词协助我完成当前任务:\n先从案例中拆出核心层、有形层、延伸层。"
+);
+assert.equal(buildReferencePrompt(""), "");
+
+console.log("student training AI panel contract passed");