From 01af770d8e78a48d9376f13ffbb26ddd2fb4c935 Mon Sep 17 00:00:00 2001 From: chenyuan Date: Tue, 4 Aug 2026 17:06:34 +0800 Subject: [PATCH] docs: plan student AI panel --- .../plans/2026-08-04-student-ai-panel.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/superpowers/plans/2026-08-04-student-ai-panel.md diff --git a/docs/superpowers/plans/2026-08-04-student-ai-panel.md b/docs/superpowers/plans/2026-08-04-student-ai-panel.md new file mode 100644 index 0000000..23ce02b --- /dev/null +++ b/docs/superpowers/plans/2026-08-04-student-ai-panel.md @@ -0,0 +1,38 @@ +# Student AI Panel Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Replace duplicate student training AI cards with one persistent right-side assistance and assessment panel. + +**Architecture:** A reusable Vue component owns prompt insertion, help requests, evaluation loading, scoring requests and responsive presentation. Student training pages pass task key and answer state only; the component uses the existing AI evaluation APIs. + +**Tech Stack:** Vue 3 Composition API, Element Plus, existing `aiTrainingEvaluation` API. + +## Global Constraints + +- Reuse existing AI help and assessment endpoints. +- Keep desktop panel persistent on the right and stack below content below 1100px. +- Do not change backend scoring rules. + +--- + +### Task 1: Create reusable AI panel + +**Files:** +- Create: `src/views/components/StudentTrainingAiPanel.vue` +- Test: `tests/student-training-ai-panel.test.mjs` + +- [ ] Write a failing test asserting a task prompt is inserted into the question field and a completed assessment exposes report and score. +- [ ] Implement the panel with help input/send, report display, score display and `AI智能评分` action backed by existing APIs. +- [ ] Run the test and commit the component. + +### Task 2: Integrate and verify + +**Files:** +- Modify: `src/views/training/GenericTrainingPage.vue` +- Modify: applicable student task pages currently rendering `TrainingAiSidebar` or `TrainingAiEvaluation` +- Test: `tests/student-training-ai-panel.test.mjs` + +- [ ] Replace duplicate AI cards with the unified panel and pass task key, prompt and answer state. +- [ ] Add responsive styling verification. +- [ ] Run tests and `npm run build:prod`, then commit.