fix(coding-teacher): restore context and read project files

This commit is contained in:
2026-09-22 19:12:59 +08:00
parent 7f5131e92f
commit 44e754a43e
14 changed files with 626 additions and 37 deletions

View File

@@ -225,7 +225,7 @@ export function TeacherChatPanel({
<div className="min-w-0 flex-1">
<h2 className="truncate text-sm font-semibold">{definition?.name ?? '编程老师'}</h2>
<p className="text-xs text-muted-foreground">
{draftRevision ? '运营草稿试聊' : '结合当前编程会话答疑'}
{draftRevision ? '运营草稿试聊' : '结合当前会话和项目文件答疑'}
</p>
</div>
<button
@@ -298,6 +298,11 @@ export function TeacherChatPanel({
本轮上下文已省略 {request.omittedMessages} 条较早消息。
</p>
)}
{(request.truncatedMessages ?? 0) > 0 && (
<p className="text-xs text-muted-foreground">
{draftRevision ? '较长的上下文已节选。' : '较长的上下文已节选,老师可按需读取原文。'}
</p>
)}
{request.error && <p className="text-xs text-destructive">{request.error}</p>}
{request.response && (
<div className="flex gap-3 text-xs text-muted-foreground">