feat: note scoring 60/6 with rating award + Minecraft theme
- Score max changed from 100 to 60, rating max from 10 to 6 - Note scoring now awards actual rating points (delta-based) - Re-scoring only awards/deducts the difference - Rating history shows note_score entries with problem link - LLM prompt includes problem statement context for better evaluation - LLM scoring dimensions: 题意理解/思路算法/代码记录/踩坑反思 (15 each) - Minecraft-themed UI: 矿石鉴定, 探索笔记, 存入宝典, etc. - Fallback scoring adjusted for 60-point scale - Handle LLM markdown code fence wrapping in response Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
这个提交包含在:
@@ -143,8 +143,19 @@ export default function MePage() {
|
||||
first_ac: ["首次通过 ⭐", "First AC ⭐"],
|
||||
code_quality: ["代码质量 🛠️", "Code Quality 🛠️"],
|
||||
};
|
||||
if (type === "daily_task" && taskLabels[note]) {
|
||||
return isZh ? taskLabels[note][0] : taskLabels[note][1];
|
||||
if (type === "daily_task") {
|
||||
if (taskLabels[note]) {
|
||||
return isZh ? taskLabels[note][0] : taskLabels[note][1];
|
||||
}
|
||||
// Note score: "note_score_1234"
|
||||
const ns = note.match(/^note_score_(\d+)$/);
|
||||
if (ns) {
|
||||
return (
|
||||
<a href={`/problems/${ns[1]}`} className="hover:underline text-[color:var(--mc-diamond)]">
|
||||
{isZh ? `📜 探索笔记鉴定 P${ns[1]}` : `📜 Note Appraisal P${ns[1]}`}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
}
|
||||
// Solution view: "Problem 1234:Title"
|
||||
const m = note.match(/^Problem (\d+):(.*)$/);
|
||||
|
||||
@@ -1031,15 +1031,15 @@ export default function ProblemDetailPage() {
|
||||
|
||||
<div className="mt-5 rounded border-[3px] border-black bg-[color:var(--mc-plank)] p-3 shadow-[3px_3px_0_rgba(0,0,0,0.45)]">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<h3 className="font-bold text-black">{tx("学习笔记(看完视频后上传/粘贴)", "Learning Notes (paste after watching)")}</h3>
|
||||
<span className="text-xs text-zinc-700">{tx("满分100分 = rating 10分", "100 pts = rating 10")}</span>
|
||||
<h3 className="font-bold text-black">📜 {tx("探索笔记(看完视频后记录)", "Explorer Notes (record after watching)")}</h3>
|
||||
<span className="text-xs text-zinc-700">⚡ {tx("满分60 = 经验值+6", "Max 60 = +6 XP")}</span>
|
||||
</div>
|
||||
|
||||
<textarea
|
||||
className="mt-2 w-full rounded-none border-[2px] border-black bg-[color:var(--mc-plank-light)] p-2 text-xs text-black shadow-[2px_2px_0_rgba(0,0,0,0.35)]"
|
||||
rows={8}
|
||||
value={noteText}
|
||||
placeholder={tx("建议写:学习目标/关键概念/代码模板/踩坑与修复/总结", "Suggested: goals / key ideas / code template / pitfalls / summary")}
|
||||
placeholder={tx("⛏️ 记录你的探索:题意理解/解题思路/代码配方/踩坑与修复/总结", "⛏️ Log your adventure: problem understanding / approach / code recipe / pitfalls / summary")}
|
||||
onChange={(e) => setNoteText(e.target.value)}
|
||||
/>
|
||||
|
||||
@@ -1054,17 +1054,17 @@ export default function ProblemDetailPage() {
|
||||
onChange={(e) => void handleNoteImageFiles(e.target.files)}
|
||||
disabled={noteUploading}
|
||||
/>
|
||||
{noteUploading ? tx("上传中...", "Uploading...") : tx("拍照/上传图片", "Upload Photos")}
|
||||
{noteUploading ? tx("传送中...", "Teleporting...") : tx("📷 截图上传", "📷 Upload Screenshot")}
|
||||
</label>
|
||||
<button className="mc-btn mc-btn-success text-xs" onClick={() => void saveLearningNote()} disabled={noteSaving}>
|
||||
{noteSaving ? tx("保存中...", "Saving...") : tx("保存笔记", "Save")}
|
||||
{noteSaving ? tx("刻录中...", "Engraving...") : tx("💾 存入宝典", "💾 Save to Codex")}
|
||||
</button>
|
||||
<button className="mc-btn text-xs" onClick={() => void scoreLearningNote()} disabled={noteScoring}>
|
||||
{noteScoring ? tx("评分中...", "Scoring...") : tx("笔记评分", "Score")}
|
||||
<button className="mc-btn mc-btn-primary text-xs" onClick={() => void scoreLearningNote()} disabled={noteScoring}>
|
||||
{noteScoring ? tx("⛏️ 鉴定中...", "⛏️ Appraising...") : tx("⛏️ 矿石鉴定", "⛏️ Appraise Ore")}
|
||||
</button>
|
||||
{noteScore !== null && noteRating !== null && (
|
||||
<span className="text-xs text-black self-center">
|
||||
{tx("得分:", "Score: ")}{noteScore}/100 · {tx("评级:", "Rating: ")}{noteRating}/10
|
||||
<span className="text-xs text-black self-center font-bold">
|
||||
💎 {noteScore}/60 · ⚡ +{noteRating} XP
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
在新工单中引用
屏蔽一个用户