6 Commits

Author SHA1 Message Date
Cai
8fe5ee1611 准备合并main 2025-10-26 13:38:29 +08:00
Cai
57d8ac32a1 first 2025-10-25 09:15:29 +08:00
Cai
0196f37e4f Merge branch 'syt' of https://gitee.com/CakeCN/code-agent into syt 2025-10-23 12:01:12 +08:00
Cai
57eb1197a2 ok 2025-10-23 12:01:01 +08:00
syt
771bf0455c 更新 foot.html 为图3完整页脚样式 2025-10-22 19:21:10 +08:00
syt
382f200663 add foot.html 2025-10-22 16:12:30 +08:00
9 changed files with 157 additions and 45 deletions

View File

@@ -44,6 +44,8 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
bb.pasted_content = realtime_action.get("content")
with open(os.path.join(bb.root_path, bb.active_file_path), "r", encoding="utf-8") as f:
bb.active_file_content = f.read()
# TODO: 让大模型检查当前这个文件和用户paste的代码,基于此判断是否需要打断学生写代码并询问其理解
# chatmanager.ase_client.send("check_code", {"file_path": file_path, "content": bb.pasted_content})
elif rtype == "fileEdit":
file_path = realtime_action.get("filePath")

View File

@@ -391,7 +391,6 @@ def _default_markdowns(lesson_name: str):
"""三份占位 Markdown 文本。可按需调整模板内容。"""
ts = datetime.now().strftime('%Y-%m-%d %H:%M')
lesson_md = f"""# {lesson_name}
> Auto-generated at {ts}
## 阶段一:示例阶段
### 步骤A
@@ -402,7 +401,6 @@ def _default_markdowns(lesson_name: str):
"""
prompt_md = f"""# {lesson_name}
> Prompt for LLM (auto-generated at {ts})
## 阶段一:示例阶段
### 步骤A
@@ -413,7 +411,6 @@ def _default_markdowns(lesson_name: str):
"""
score_prompt_md = f"""# {lesson_name}
> Scoring Prompt for LLM (auto-generated at {ts})
## 评分准则
- 正确性、完整性、可读性、效率(按需调整权重)

View File

@@ -0,0 +1,85 @@
/* === 同款页脚 === */
.hs-footer {
background: #ffffff;
border-top: 1px solid #e5e7eb;
color: #4b5563;
font-size: 14px;
line-height: 1.8;
padding: 48px 20px 24px;
}
.footer-main {
display: flex;
flex-wrap: wrap;
gap: 48px;
max-width: 1200px;
margin: 0 auto;
}
.footer-col {
flex: 1 1 240px;
}
.footer-col h4 {
font-size: 16px;
font-weight: 600;
color: #111827;
margin: 0 0 16px;
}
.footer-col ul {
list-style: none;
margin: 0;
padding: 0;
}
.footer-col li {
margin: 4px 0;
}
.footer-col a {
color: #4b5563;
text-decoration: none;
}
.footer-col a:hover {
color: #2563eb;
}
.footer-bottom {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
max-width: 1200px;
margin: 40px auto 0;
border-top: 1px solid #e5e7eb;
padding-top: 24px;
font-size: 13px;
color: #9ca3af;
}
.footer-bottom-left a,
.footer-bottom-right a {
color: #9ca3af;
margin-right: 12px;
text-decoration: none;
}
.footer-bottom-left a:hover,
.footer-bottom-right a:hover {
text-decoration: underline;
}
/* 移动端 */
@media (max-width: 768px) {
.footer-main {
flex-direction: column;
gap: 32px;
}
.footer-bottom {
flex-direction: column;
align-items: flex-start;
}
}

View File

@@ -46,6 +46,7 @@
</div>
</div>
</div>
{% include 'foot.html' %}
</body>
<script>
var course_id = "{{course_id}}";

View File

@@ -79,6 +79,9 @@
</ul>
</div>
</div>
{% include 'foot.html' %}
<script src="/static/js/dashboard.js"></script>
<script>
// 解析用户数据和课程数据

View File

@@ -0,0 +1,50 @@
<link rel="stylesheet" href="/static/css/footer.css">
<footer class="hs-footer">
<div class="footer-main">
<div class="footer-col">
<h4>华实学伴</h4>
<ul>
<li><a href="/">首页</a></li>
<li><a href="/guide">学习指南</a></li>
<li><a href="/about">关于华实</a></li>
<li><a href="/contact">联系我们</a></li>
</ul>
</div>
<div class="footer-col">
<h4>课程分类</h4>
<ul>
<li><a href="/courses/popular">热门课程</a></li>
<li><a href="/courses/latest">最新课程</a></li>
<li><a href="/resources">学习资源库</a></li>
<li><a href="/faq">常见问题</a></li>
</ul>
</div>
<div class="footer-col">
<h4>联系我们</h4>
<p>邮箱huashi@ecnu.com</p>
<p>致力于为全球学习者提供高质量的在线教育资源和学习体验,帮助每个人实现自我提升和职业发展。</p>
</div>
<div class="footer-col">
<h4>华东师范大学</h4>
<p>热门课程</p>
<p>学习社区</p>
<p>联系我们</p>
<p>最新课程</p>
<p>学习资源库</p>
</div>
</div>
<div class="footer-bottom">
<div class="footer-bottom-left">
<a href="/privacy">隐私政策</a>
<a href="/terms">使用条款</a>
</div>
<div class="footer-bottom-right">
<span>© 2025 华实学伴. 保留所有权利</span>
<a href="https://beian.miit.gov.cn" target="_blank">沪ICP备2025142149号</a>
</div>
</div>
</footer>

View File

@@ -1,49 +1,22 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>课程选择主页</title>
<link rel="stylesheet" href="/static/css/index.css">
<meta charset="UTF-8">
<title>课程选择主页</title>
<link rel="stylesheet" href="/static/css/navbar.css">
<link rel="stylesheet" href="/static/css/footer.css">
</head>
<body >
{% include 'navbar.html' %} <!-- 引入navbar.html -->
<main>
<div class="course-selection">
<h2>课程列表</h2>
<div class="course-list">
{% for course in courses_data %}
<div class="course-card" onclick="show_course_details('{{ course._id }}')">
<img src="{{ course.image_url }}" alt="{{ course.course_name }}">
<h3>{{ course.name }}</h3>
<p>{{ course.description }}</p>
{% if course._id in selected_courses %}
<button class="selected-button">已选择</button>
{% else %}
<button class="select-button" data-course-id="{{course._id}}">选择课程</button>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</main>
<body>
<header class="navbar">
<!-- 原有导航内容保留 -->
{% include 'navbar.html' %}
</header>
<footer>
<p>版权所有 &copy; 2024 “华实伴学君”——教学练评一体的虚拟编码助教</p>
<p>
<a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer">
沪ICP备2025142149号
</a>
</p>
</footer>
<main>
<!-- 原有主体内容保留 -->
{% block content %}{% endblock %}
</main>
{% include 'foot.html' %}
</body>
<script>
window.appData = {
user_selected_courses: JSON.parse(`{{selected_courses}}`.replace(/&#34;/g, "\""))
}
</script>
<script src="/static/js/index.js"></script>
</html>

View File

@@ -120,6 +120,6 @@
<script src="/static/js/course_current.js"></script>
<script src="/static/js/teacherboard.js"></script>
<script src="/static/js/teacher_course_setting.js"></script>
{% include 'foot.html' %}
</body>
</html>

View File

@@ -0,0 +1 @@
{"username": "test1020"}