deerflow2/.planning/phases/06-/06-02-SUMMARY.md

50 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
phase: 06-
plan: 02
subsystem: ui
tags: [mention, dropdown, chip, keyboard]
requires:
- phase: 06-
provides: reference payload contract and soft-fail behavior
provides:
- thread-scoped @ candidate aggregation
- dropdown filtering and keyboard navigation
- removable reference chips with max-limit enforcement
affects: [prompt-input, submit-payload, e2e]
tech-stack:
added: []
patterns:
- current-thread-only reference candidates
- IME-safe keyboard handling for mention selection
key-files:
created:
- .planning/phases/06-/06-02-SUMMARY.md
modified:
- frontend/src/components/workspace/input-box.tsx
- frontend/src/components/ai-elements/prompt-input.tsx
- frontend/src/core/uploads/hooks.ts
- frontend/src/components/ui/dropdown-menu.tsx
key-decisions:
- "@候选严格限定在当前 thread 的 artifacts + uploads。"
- "引用上限固定为 10超限 toast 并阻止新增。"
requirements-completed: [ATREF-01, ATREF-02]
duration: 25 min
completed: 2026-04-15
---
# Phase 06 Plan 02 Summary
**完成输入框 `@` 引用交互闭环候选展示、过滤、选择、chip 渲染、删除、键盘操作与上限控制。**
## Verification
- `cd frontend && pnpm -s typecheck`
- passed
## Outcome
- 输入 `@` 可拉起 `DropdownMenu` 候选并按 query 过滤。
- 选择候选后以 chip 展示,可删除且支持去重。
- `ArrowUp/ArrowDown/Enter/Escape/Backspace``isComposing` 保护已落地。