feat(ai-writing): 大纲先行确认 + 新文章类型识别 + 参考文献 + 编辑器修复

- 写作配置 Q&A 改为「先流式生成大纲并多轮确认 → 再确认意图」,放宽轮数上限
- 意图识别出列表外的新文章类型时带上类型名+简介(仅本次写作临时使用)
- 成稿支持参考文献:正文 [n] 角标 + 文末按出现顺序的「参考文献」列表(表单开关,默认开)
- 流式接取未闭合 <think> 思考内容,首 token 前加「正在整理…」占位
- 修复右侧编辑器输入空格只出一次、光标跳字(避免自激回灌 setContent 重置光标)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
fengxiangdebaoziandClaude Opus 4.8 committed 2026-06-23 19:07:03 +08:00
1 parent cd33aaeded
commit b8c78ba06e
26 files changed
+1273 -352

No files matched your search

@@ -209,11 +209,17 @@ async def pause_draft_confirm(state: AIWritingState, config: RunnableConfig) ->
"progress_events": [{"type": "resumed", "agent_name": "系统", "message": f"按用户意见重写({notes[:30]})"}],
}
# to_editor
# to_editor:用户可能在「您的修改意见」里填了关注点再点「让编辑继续审核」,
# 把它带给编辑节点,让三维度审查重点核查用户在意的方面(不再被丢弃)。
editor_notes = (user_input.get("userRevisionNotes") or "").strip()
msg = (
f"提交编辑审核(已附带你的修改意见:{editor_notes[:30]})"
if editor_notes else "提交编辑审核"
)
return {
"last_user_intervention": user_input,
"last_user_intervention": {**user_input, "_editor_notes": editor_notes},
"status": "reviewing",
"progress_events": [{"type": "resumed", "agent_name": "系统", "message": "提交编辑审核"}],
"progress_events": [{"type": "resumed", "agent_name": "系统", "message": msg}],
}