Add contextual teacher help entry and simplify consultation panel

This commit is contained in:
鲨鱼辣椒
2026-09-22 16:55:07 +08:00
parent 68e676cb62
commit 12d800ec51
11 changed files with 603 additions and 50 deletions

View File

@@ -56,3 +56,12 @@
2. Integrate prototype layout, character entry points, resizable consultation, project drafts, and central real work preview.
3. Verify roles/project isolation, explicit-only submission, draft persistence, source bounds, existing Code behavior; typecheck, focused tests, build and native trial inspection.
4. Point the trial launcher at this combined source for future iterations and document current behavior.
## Approved Interaction Follow-up (2026-09-22)
- Same task, branch and worktree resumed with matching ownership; no other active task owners. Gate passed after reloading task record, relevant project memory, teacher ADR, README and AGENTS. Current baseline is 68e676c; the recorded task base remains e5d271b.
- User explicitly approves this iteration after discussion: remove redundant project-context strip from the project-scoped consultation; support free questions and a deliberate “老师,帮我看看” action that generates project-contextual discussion questions. Offer “我也说不清,你带我看看” to start a concrete guided conversation. No demonstration view, memo, consensus or automatic implementation actions.
- Keep the existing quiet sage/sand UI; generic skill design-system results do not override the approved design. Add request intent and structured generated suggestions through the existing Main-owned consultation pipeline, then update Renderer, focused tests, README and the same temporary application.
- Implemented: removed redundant project strip from both consultation roles; student teacher empty state offers free input and “老师,帮我看看”. Explicit help requests carry per-turn intent through the existing model pipeline, validate a short introduction plus 2–3 contextual questions, and render questions as deliberate send actions. “我也说不清,你带我看看” starts one concrete conversational prompt; the help entry remains available during ongoing chat. Quick actions preserve free-text/quoted drafts; ordinary sends still clear accepted drafts. Reopened history and live snapshots reconcile accepted request identities, so unknown delivery can retry safely and known terminal requests can start a fresh request.
- Verification: 55 backend tests and 46 teacher/chat UI tests passed (101 total), with structured output validation, scope/intent/idempotency, streaming JSON suppression, failed/reopened/live-snapshot retries, draft retention and legacy friend/admin compatibility. Full typecheck, scoped ESLint, whitespace and production build passed. E2E fixture/spec updated but E2E runner not executed. Existing isolated trial restarted from the new build; native app visually confirmed the teacher project strip is gone and the ongoing-conversation help entry is present. One deliberate real help request reached the existing model path and ended with “老师暂时无法回复,请稍后重试。”; verified the retry action and restored editable composer. Successful real model-generated questions were not verified. Existing user conversation history was preserved.
- Service follow-up (outside this frontend iteration): the current generic model error does not prove a sign-in failure. Read-only comparison found teacher model-runner differs from normal provider/AI proxy handling of credential_mode, bare gateway base URL /v1 normalization, credential refresh, and upstream error categorization. These differences are possible investigation leads, not a confirmed root cause. No runtime credentials were inspected or changed, and model-runner remains untouched.