董宏凯
2ab3ab8444
fix: 写作管线整批接收对话检索结果,不再自己检索
...
- 相关性过滤新增位置通道:收割器给每条材料标记来源消息位置,课题
请求之后的检索结果整批入池(与语言/词面无关)——线上中文课题 +
英文检索结果被纯词面匹配误杀 31/35 条,报告只带着 4 条残料在写
- 课题切换保护保留:新请求之前的旧课题检索仍按词面强过滤,不凑
门槛、不入报告;对话里找不到课题消息时退化为原词面过滤
- 删除死代码 HarvestPlusSearchMaterialProvider(retrieve=True 的
自检索补充分支,早已被显式忽略):写作管线只负责写文件,检索
全部由对话完成成为结构保证
- 测试:锚点规则(澄清回答不充当新课题)、中文课题+英文资料整批
保留、课题切换旧检索过滤等场景,25 个用例入库(此前该测试文件
一直被 tests/* 忽略规则挡在版本库外)
2026-08-30 16:20:55 +08:00
董宏凯
f7e6ed65bd
fix: retry httpx timeout family as transient LLM errors
...
Live incident: the compatible-mode provider stalled mid-stream after
200 OK (~17s without data) and raised httpx.ReadTimeout, which was not
in the retriable exception-name set, so the call failed after 1
attempt and killed the whole run. Add ReadTimeout/ConnectTimeout/
WriteTimeout/PoolTimeout/TimeoutError/ConnectError to the transient
set in LLMErrorHandlingMiddleware (retry with backoff, then a
transient fallback message instead of generic), and add ReadTimeout/
ConnectTimeout to ai_writing's classify_exception for model
switching.
2026-08-30 15:53:51 +08:00
董宏凯
4964967295
fix: writing mode first-report allows only the pipeline to write the report
...
- Strip write_file/str_replace/bash from the model binding in the
first-report run: after_model rewrites only fire after a full model
response, so any bound write tool let weak models draft the whole
essay into tool args (write_file content or bash cat>/python
heredocs) for tens of invisible seconds before interception
- Hallucinated hand-writes are still handled: after_model rewrites
bash cat >/python open('w')/tee and leftover write calls to
deep_research_report; wrap_tool_call rejects whatever reaches the
tool layer; post-success writes are dropped, nudged to a 2-3
sentence summary, and patched with a fallback closing message so
the turn never ends silently
- The rewritten pipeline call carries topic = original request
(clarification answers skipped) plus focus = clarification answers,
so the pipeline writes the clarified subject instead of the raw
prompt text; prompts updated to match (tools unavailable, call the
tool directly, do not draft first)
- Frontend write-step interception and streaming preview scoping now
applies only in writing mode; normal mode shows/previews writes
exactly as before
2026-08-30 15:53:43 +08:00
董宏凯 and Cursor
49c01cb72b
fix: writing mode uses chat search then pipeline write only
...
Keep deep_research_report as a write-only deliverable from conversation materials, block post-success rewrite loops with a summary nudge, fill thin/empty pools from model knowledge, and open the sandbox only on real report.md content.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-30 12:41:04 +08:00
董宏凯
440b490b0d
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into master-nj
2026-08-27 16:33:33 +08:00
董宏凯 and Cursor
52b9cbf707
feat: 新增 agentfx 任务深链与研判报告入库流程
...
支持 goPath=agentfx 的 iframe 嵌入问答、内置研判助手种子与报告导入协助卡,并完善深度研究流式报告能力。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-27 16:32:22 +08:00
吉鑫升
11326eeb1c
feat: improve skill uploads and agent runtime stability
2026-08-27 11:14:23 +08:00
吉鑫升
485a8fa9d9
feat: standardize Word export and Office conversion
2026-08-27 00:09:53 +08:00
董宏凯
babc5e95c6
代码提交
2026-08-24 20:47:31 +08:00
吉鑫升
bc49df4561
feat: add public wiki embeds and ES query routing
2026-08-24 15:21:28 +08:00
吉鑫升
e818c24769
Merge remote-tracking branch 'origin/master' into ji
...
# Conflicts:
# .gitignore
# frontend-web/src/components/workspace/artifacts/context.tsx
# frontend-web/src/components/workspace/messages/message-group.tsx
# offline-backend-20260512/backend/CLAUDE.md
# offline-backend-20260512/backend/README.md
# offline-backend-20260512/backend/app/gateway/app.py
# offline-backend-20260512/backend/app/gateway/deps.py
# offline-backend-20260512/backend/app/gateway/routers/llmwiki.py
2026-08-24 14:21:19 +08:00
董宏凯 and Cursor
541bc3280f
fix: 岗位会商本轮只允许 present_files 一次,避免重复产物卡
...
弱模型写完报告后仍会再调用一次 present_files,前端会画出两张相同卡片。上限同时覆盖呈现,已呈现则只催收尾。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-23 21:26:57 +08:00
董宏凯 and Cursor
b81d200eca
fix: 协助卡停轮与提交防 409,隐藏配置向导会话,并限制岗位会商产物重复写入
...
澄清中间件改为 ToolMessage + after_model 停轮,前端提交前取消残留 run;系统/向导 thread_type 从对话列表排除;岗位总结席位加 write_file 上限。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-23 20:29:59 +08:00
董宏凯 and Cursor
51afebb394
feat: 报告结构支持检索方向/来源与智能新增,并修复协助卡停轮与宿主跳转
...
为深度研究报告结构增加检索方向与技能来源、对话式智能新增页与详情排版;澄清中间件在 after_model 可靠结束本轮,避免弱模型出卡后继续生成;任务按钮补充 host 跳转与相关深链能力。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-22 17:46:06 +08:00
董宏凯 and Cursor
a5a9c952e8
feat: 深度研究支持独立新报告与原文改写,并完善沙箱、模型管理与全文改写
...
新报告不再覆盖当前文件卡片,写入时打开沙箱;步骤条仅在改写原文时位于卡片上方。同时补齐改写本地回退、模型管理与会商第三步相关改动。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-21 21:46:04 +08:00
吉鑫升
4c9f75f31e
feat: add fixed questions and improve authentication
2026-08-21 17:58:39 +08:00
董宏凯
33b0af333c
Merge branch 'master-nj' into 'master'
...
增强 Deep Research 可靠性,并接入 8BF 任务卡片与会商上下文。
See merge request knowledge-base-bj/deerflow-code!25
2026-08-18 09:55:17 +00:00
董宏凯 and Cursor
15a46b903a
增强文档改写配图与深度研究流式稳定性,并完善 8BF/会商工作区。
...
全文改写支持可选配图与思考过程展示,深度研究接入 DashScope 原生出图并剥离内联 think 标签;8BF 会商补齐第一步工作区与任务卡回退,同时限制热重载扫描范围。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-18 17:46:11 +08:00
董宏凯
819e537aa3
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into master-nj
2026-08-17 19:30:37 +08:00
吉鑫升
68c4896088
fix: stabilize auth sync and stream recovery for ji
2026-08-17 19:27:39 +08:00
董宏凯 and Cursor
771957429a
增强 Deep Research 可靠性,并接入 8BF 任务卡片与会商上下文。
...
修复 MySQL 读写分离下的持久化与 SSE 重连问题,报告完成前先落库;8BF 嵌入页支持 taskId 任务卡与独立意图 metadata;前端统一 createClientId 并更新 runtime 配置。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-17 18:16:05 +08:00
吉鑫升
5bf08c83a6
Merge remote-tracking branch 'origin/master' into ji
2026-08-17 15:53:36 +08:00
吉鑫升
94cf37a2ae
fix: normalize system messages before model calls
2026-08-17 10:12:43 +08:00
董宏凯
178572bc7f
代码提交
2026-08-16 19:17:45 +08:00
董宏凯
70da7c5649
代码提交
2026-08-15 12:51:58 +08:00
董宏凯 and Cursor
75963c9ad9
feat: 岗位会商命令幂等与圆桌后台作业租约调度
...
岗位会商写操作引入 command_id 幂等与版本锁,前端支持同键重试;圆桌后台作业改为 DB 租约 dispatcher、去重与草稿 outbox 补偿,并持久化 intent turns。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-14 11:08:12 +08:00
Administrator
56044d9cb7
fix: improve llmwiki search integration
2026-08-13 16:03:08 +08:00
董宏凯
27e6b0b23e
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into dhk-dev
...
# Conflicts:
# frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx
2026-07-11 19:01:10 +08:00
fengxiangdebaozi
388a9133fc
fix: adapt frontend for legacy Chrome and runtime config
2026-07-11 16:55:08 +08:00
董宏凯
221e947488
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-dev
...
# Conflicts:
# frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx
# frontend-web/src/open-canvas/components/ai-writing/AIWritingPanel.tsx
# offline-backend-20260512/backend/CLAUDE.md
# offline-backend-20260512/backend/app/gateway/services.py
# offline-backend-20260512/backend/tests/test_ai_writing_knowledge_base.py
2026-07-03 22:28:21 +08:00
董宏凯
da856f2b58
fix: improve ai writing chat streaming and intent handling
2026-07-02 17:43:23 +08:00
董宏凯
845c87e3ee
feat: add AI writing chat workspace
2026-07-02 13:56:46 +08:00
吉鑫升
7e7d3c9846
fix: truncate rwfx 3q context
2026-07-02 11:05:12 +08:00
吉鑫升
36a3851233
feat: inject 3q context into rwfx chat
2026-07-02 10:03:34 +08:00
董宏凯
54190d7a83
提交代码
2026-07-01 19:24:23 +08:00
董宏凯
d21dbeb214
feat: refine ai writing search flow
2026-07-01 18:00:14 +08:00
董宏凯
025e43f4c5
feat: improve ai writing imitation flow
2026-07-01 17:16:12 +08:00
董宏凯
bb6b9bd84b
feat: add ai writing imitation mode
2026-07-01 11:21:41 +08:00
董宏凯
4bfaeb728b
fix: disable ssl verification for intranet ai writing search
2026-07-01 10:21:52 +08:00
董宏凯
dfb745a5e4
代码提交
2026-06-30 16:04:51 +08:00
fengxiangdebaozi
4fce6f9104
Add intranet retrieval diagnostics for AI writing
2026-06-29 10:21:10 +08:00
Administrator
2d3033434b
Fix async thread title generation flow
2026-06-28 18:09:48 +08:00
董宏凯 and Cursor
5de74e90dc
feat(ai写作): 左栏智能体 Tab 内嵌问答并优化模块侧栏
...
AI 写作页默认展示智能体 Tab,在页内复用 ai-writing 模块配置与 AgentChatPage;确认类型后侧栏扁平展示类型名并支持整块收起动画。同步历史回看、流式续跑、改写菜单与 researcher 检索相关改动。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-27 15:53:51 +08:00
董宏凯 and Claude Opus 4.8
0089af94d3
fix(ai写作): 恢复内网直连检索(知识库检索)空地址回退默认端点
...
knowledge_base 检索类型遇到空 intranet_search_url 会短路报「未配置」、返回 0
素材,导致「内网直连检索不能用」。旧版 get_search_provider(search_provider=
intranet) 在空地址时由 IntranetSearchProvider 回退内置默认内网端点,所以不配
地址也能直连。本次去掉该短路,空地址原样下传由 provider 回退默认端点,恢复旧逻辑。
- researcher.py: knowledge_base 分支无条件构造 IntranetSearchProvider
- test_ai_writing_knowledge_base.py: 空地址用例改为断言回退默认端点仍出素材
- backend CLAUDE.md: 检索类型段说明更新
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 22:13:19 +08:00
fengxiangdebaozi
4d10590511
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-26 11:04:19 +08:00
fengxiangdebaozi and Claude Opus 4.8
3d60651491
feat(ai-writing): 检索类型加回「知识库检索」(直连内网 ES 接口)
...
弱模型常识别不了配置技能(deepseek-chat 等),恢复旧的"不用技能"检索路径
作为独立检索类型 knowledge_base:绕过技能编排,直接调
ai_writing.intranet_search_url 内网知识库 ES 接口(IntranetSearchProvider)
对检索词并发检索;未配地址 → 无素材 + skill_error 告警。
- researcher.py: material_source 归一保留 knowledge_base + 新增直连内网分支
- state.py: material_source 三值注释
- 前端 AIWritingForm/WritingFormContext/types: 下拉新增「知识库检索」
- tests/test_ai_writing_knowledge_base.py: 直连/未配/不编排技能 3 用例
- backend CLAUDE.md: 检索类型段更新为三值
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 10:04:57 +08:00
fengxiangdebaozi and Claude Opus 4.8
158d157af4
feat(ai写作): 内网检索接口执行诊断写入 material_package.intranet_debug(排查用)
...
- material_package 新增 intranet_debug:是否配置/端点/知识库/超时/每个检索词命中数与
报错/原始响应片段/总命中数/是否被采用为兜底/status(not_configured|pending|ran|
cancelled|crashed)。随 values 事件回前端,前端忽略该字段,仅供 devtools 排查。
- 新增 config ai_writing.intranet_search_debug(默认 false):开启后即使技能成功也跑完
内网并记录完整结果,用于验证内网接口是否真能通。
- 前端不改动。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-25 22:55:27 +08:00
fengxiangdebaozi and Claude Opus 4.8
1ed004fbb1
fix(ai写作): 弱模型也能真正执行技能脚本(执行优先的强提示)
...
弱模型在 lead agent 能执行 py 脚本、在 ai写作子智能体却不能:根因是子智能体的
_MATERIAL_OUTPUT_CONTRACT 过度强调"只输出 JSON",弱模型据此跳过工具执行直接吐空 JSON。
对齐 lead agent 的 skill_system 强框架,把契约改成"执行优先":
- 第一步强制先用 bash 实际运行技能脚本(给出 cd 技能目录 && python3 scripts/..py 的命令形态),
严禁不调用工具就直接输出 JSON/凭记忆编造
- JSON 输出降级为第二步"检索完成后再整理"
- task 末尾追加"现在立刻开始执行检索"的强指令,进一步推动弱模型先动手
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-25 22:50:10 +08:00
吉鑫升 and Claude Opus 4.8
58357547c9
Merge branch 'ji' into master
...
按钮管理「登录参数」两套实现冲突解决——两分支各自独立给跳转按钮加了登录态追加能力,
二者正交、保留两套,互不影响:
- master: login_params (JSON 列 login_params_json,从 userInfo 解析,类似轻应用登录参数)
- ji: append_auth + auth_token_param + auth_name_param (token 登录时追加 token1+用户名)
迁移 revision 碰撞修复(两分支都用了 20260625_01):重编号为线性链
20260620_02 → 20260625_01 (login_params) → 20260625_02 (auth_params) → 20260625_03 (users_approved)
并同步 column_additions_mysql.sql 注释里的 migration 编号。
前后端 task_buttons(model/sql/memory/router/前端 type·api·admin 页)均保留两套字段;
两份 CLAUDE.md 文档合并为同时记录两种机制。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-25 19:36:43 +08:00
fengxiangdebaozi and Claude Opus 4.8
854de9b43c
fix(ai写作): 技能检索稳定接收数据(复用参考文献提取+截断抢救+上限早停)
...
- 复用主智能体「参考文献」模式的提取逻辑(deerflow.runtime.references)解析技能JSON,字段并集兼容
- bash输出中间截断时逐条抢救完整记录对象,不再因大JSON解析失败而全丢
- 所有退出路径(超时/递归上限/异常)都从tool输出收割,不依赖模型最终汇总
- 达到max_materials上限即停止驱动模型,修复步骤条爆100+条/素材超额
- 步骤条实时显示每次检索获得多少条数据
- 内网兜底:与技能并行预跑、响应解析兼容两套接口字段、0结果换简单检索词重试、超时放宽到10分钟
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-25 17:05:09 +08:00