52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
---
|
||
phase: 06-
|
||
plan: 01
|
||
subsystem: messaging
|
||
tags: [references, files, submit-payload, unit-test]
|
||
requires:
|
||
- phase: 05-test-hardening-and-commit-hygiene
|
||
provides: stable test baseline and commit hygiene
|
||
provides:
|
||
- PromptInputMessage references contract
|
||
- FileInMessage reference metadata compatibility
|
||
- stale reference soft-fail filtering in submit payload
|
||
affects: [input-box, thread-submit, e2e]
|
||
tech-stack:
|
||
added: []
|
||
patterns:
|
||
- additional_kwargs.files as single submit envelope
|
||
- stale reference dropped without blocking submit
|
||
key-files:
|
||
created:
|
||
- .planning/phases/06-/06-01-SUMMARY.md
|
||
modified:
|
||
- frontend/src/components/ai-elements/prompt-input.tsx
|
||
- frontend/src/core/messages/utils.ts
|
||
- frontend/src/core/threads/hooks.ts
|
||
- frontend/src/core/threads/hooks.test.ts
|
||
key-decisions:
|
||
- "引用文件沿用 additional_kwargs.files,不引入并行字段结构。"
|
||
- "失效引用只剔除并 toast,文本发送继续。"
|
||
requirements-completed: [ATREF-03]
|
||
duration: 20 min
|
||
completed: 2026-04-15
|
||
---
|
||
|
||
# Phase 06 Plan 01 Summary
|
||
|
||
**完成引用提交契约与软失败链路,确保 uploads + references 统一进 `additional_kwargs.files`。**
|
||
|
||
## Verification
|
||
|
||
- `cd frontend && node --test src/core/threads/hooks.test.ts`
|
||
- 2 passed, 0 failed
|
||
- `cd frontend && pnpm -s typecheck`
|
||
- passed
|
||
|
||
## Outcome
|
||
|
||
- `PromptInputMessage` 已支持 `references` 字段。
|
||
- `FileInMessage` 已支持 `ref_kind/ref_source` 可选元信息。
|
||
- `buildFilesForSubmit` 对 stale 引用执行软剔除且不阻断发送。
|
||
|