deerflow2/.planning/phases/07-phase-06-mention-upload/07-01-SUMMARY.md

2.5 KiB
Raw Blame History

phase plan subsystem tags requires provides affects tech-stack key-files key-decisions requirements-completed duration completed
07-phase-06-mention-upload 01 prompt-submit-and-display-separation
prompt-compose
references
skills
message-display
e2e
phase provides
07-phase-06-mention-upload 07-01-PLAN.md
提交态拼接“优先使用”提示附件优先Skill次之
显示态与提交态分离(消息区不回显拼接提示)
规则单测与发送链路 e2e 回归
frontend-chat-input
thread-submit-payload
message-render
added patterns
frontend/src/core/threads/priority-hint.ts
compose-before-submit with original-display preservation
case-insensitive dedupe for attachment/skill labels
created modified
.planning/phases/07-phase-06-mention-upload/07-01-SUMMARY.md
frontend/src/core/threads/priority-hint.ts
frontend/src/core/threads/hooks.ts
frontend/src/core/threads/hooks.test.ts
frontend/src/components/workspace/input-box.tsx
frontend/src/components/ai-elements/prompt-input.tsx
frontend/src/core/messages/utils.ts
frontend/src/components/workspace/messages/message-list-item.tsx
frontend/tests/e2e/input-and-compose.spec.ts
发送 payload 使用 submitText消息显示继续使用用户原文。
拼接模板固定为:优先使用【附件...】和【Skill...】;单类单出;大小写不敏感去重。
在渲染层仅剥离固定后缀,避免拼接文案回显到用户消息区。
P7-01
P7-02
P7-03
P7-04
45 min 2026-04-17

Phase 07 Plan 01 Summary

实现了“提交态增强文本 / 显示态原文”的完整链路:发送时自动拼接附件与 Skill 优先提示,消息区仍只展示用户输入内容。

Implemented

  • 新增 priority-hint 纯函数模块,封装 buildPriorityHintTextcomposeSubmitText
  • InputBox 在提交时统一透传 references + selectedSkills,覆盖按钮发送、回车发送、建议词发送路径。
  • useThreadStreamuseSubmitThread 在调用 thread.submit 前组装 submitText
  • message-list-item 渲染人类消息时增加固定后缀剥离,避免回显“优先使用【...】”。

Verification

  • node --test frontend/src/core/threads/hooks.test.ts7 passed
  • cd frontend && pnpm -s typecheckpassed
  • cd frontend && pnpm -s test:e2e --grep "DF-INPUT-008A"passed

Notes

  • 本次新增 e2e 用例验证“请求体包含拼接文案,消息区不显示拼接文案”的核心回归场景。