Files
deer-flow/.gitignore
LofiSu d9a86c10e8 fix(frontend): no half-finished citations, correct state when SSE ends
Citations:
- In shouldShowCitationLoading, treat any unreplaced [cite-N] in cleanContent
  as show-loading (no body). Fixes Ultra and other modes when refs arrive
  before the <citations> block in the stream.
- Single rule: hasUnreplacedCitationRefs(cleanContent) => true forces loading;
  then isLoading && hasCitationsBlock(rawContent) for streaming indicator.

SSE end state:
- When stream finishes, SDK may set isLoading=false before client state has
  the final message content, so UI stayed wrong until refresh.
- Store onFinish(state) as finalState in chat page; clear when stream starts.
- Pass messagesOverride={finalState.messages} to MessageList when not loading
  so the list uses server-complete messages right after SSE ends (no refresh).

Chore:
- Stop tracking .githooks/pre-commit; add .githooks/ to .gitignore (local only).

Co-authored-by: Cursor <cursoragent@cursor.com>

---
fix(前端): 杜绝半成品引用,SSE 结束时展示正确状态

引用:
- shouldShowCitationLoading 中只要 cleanContent 仍含未替换的 [cite-N] 就
  只显示加载、不渲染正文,解决流式时引用块未到就出现 [cite-1] 的问题。
- 规则:hasUnreplacedCitationRefs(cleanContent) 为真则一律显示加载;
  此外 isLoading && hasCitationsBlock 用于流式时显示「正在整理引用」。

SSE 结束状态:
- 流结束时 SDK 可能先置 isLoading=false,客户端 messages 尚未包含
  最终内容,导致需刷新才显示正确。
- 在对话页保存 onFinish(state) 为 finalState,流开始时清空。
- 非加载时向 MessageList 传入 messagesOverride={finalState.messages},
  列表在 SSE 结束后立即用服务端完整消息渲染,无需刷新。

杂项:
- 取消跟踪 .githooks/pre-commit,.gitignore 增加 .githooks/(仅本地)。
2026-02-09 15:15:20 +08:00

43 lines
461 B
Plaintext

# OS generated files
.DS_Store
*.local
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Python cache
__pycache__/
*.pyc
*.pyo
# Virtual environments
.venv
venv/
# Environment variables
.env
# Configuration files
config.yaml
mcp_config.json
extensions_config.json
# IDE
.idea/
# Coverage report
coverage.xml
coverage/
.deer-flow/
.claude/
skills/custom/*
logs/
# Local git hooks (keep only on this machine, do not push)
.githooks/
# pnpm
.pnpm-store