deerflow2/.planning/phases/06-/06-04-ARCHIVED.md

97 lines
3.3 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.

> Archived in revision pass on 2026-04-15. This file is preserved for traceability only and is intentionally not executable because Task 2 conflicted with locked decision D-08 (`max 10`) and the plan lacked required `must_haves`, `<files>`, `<verify>`, and `<done>` sections.
---
phase: 06-
plan: 04
type: execute
wave: 4
depends_on:
- 06-01
- 06-02
- 06-03
gap_closure: true
files_modified:
- frontend/src/components/workspace/input-box.tsx
- frontend/src/components/ai-elements/prompt-input.tsx
- frontend/src/core/threads/submit-files.ts
- frontend/src/core/threads/hooks.ts
- frontend/src/core/threads/hooks.test.ts
- frontend/tests/e2e/input-and-compose.spec.ts
- .planning/phases/06-/06-UAT.md
autonomous: true
requirements:
- ATREF-01
- ATREF-02
- ATREF-03
- ATREF-04
---
<objective>
关闭 06-UAT 中的 4 个缺口候选位置、引用展示形态、上限与输入态保持、artifact 引用上下文可用性与任意输入位置 @ 触发。
</objective>
<context>
@.planning/phases/06-/06-UAT.md
@frontend/src/components/workspace/input-box.tsx
@frontend/src/components/ai-elements/prompt-input.tsx
@frontend/src/core/threads/submit-files.ts
@frontend/src/core/threads/hooks.ts
@frontend/src/core/threads/hooks.test.ts
@frontend/tests/e2e/input-and-compose.spec.ts
</context>
<tasks>
<task type="auto" tdd="true">
<name>Task 1: 修正 @ 候选定位与触发策略</name>
<action>
- 让候选列表始终紧贴输入区上方渲染(相对 textarea 锚点)。
- 在输入中的任意位置输入 `@` 都可触发候选,不再要求输入框空白态。
- 选择候选后保持 input 展开与焦点,不自动收起输入态。
</action>
<acceptance_criteria>
- `@` 在任意输入位置触发候选;
- 候选面板位置紧贴输入区上边缘;
- 点击候选后输入区保持可继续输入。
</acceptance_criteria>
</task>
<task type="auto" tdd="true">
<name>Task 2: 重构引用展示与数量约束</name>
<action>
- 将引用图片/文件预览渲染到 textarea 区域内,不再显示在 input 上方独立层。
- 不复用 `Tag` 组件,改为专用引用预览 UI。
- 引用上限改为 6并同步提示文案与测试断言。
</action>
<acceptance_criteria>
- 引用元素显示在 textarea 区域内;
- 代码中不再用 `Tag` 渲染引用;
- 第 7 个引用被阻止并提示“最多 6 个”。
</acceptance_criteria>
</task>
<task type="auto" tdd="true">
<name>Task 3: 对齐 artifact 引用上下文提交契约</name>
<action>
- 调整 `additional_kwargs.files` 中 artifact 引用结构,使其与后端“可作为上下文文件”的识别契约一致。
- 保持 upload 行为不回退,并补充单测覆盖 artifact/upload 两类上下文可用性差异。
</action>
<acceptance_criteria>
- artifact 引用在后续上下文中可用;
- upload 路径行为保持通过;
- hooks 单测覆盖并通过。
</acceptance_criteria>
</task>
</tasks>
<verification>
- `cd frontend && node --test src/core/threads/hooks.test.ts`
- `cd frontend && pnpm -s typecheck`
- `cd frontend && pnpm -s test:e2e --grep "DF-INPUT-007|DF-INPUT-008"`
</verification>
<output>
After completion, create `.planning/phases/06-/06-04-SUMMARY.md`
</output>