QihuAI Design
e1e50e884e
feat(chat): align AI tool-use with GPT-4.1/Anthropic standards -- Fix1: AGENT_GUIDE in system prompt (Persistence/Tool-calling/Planning), Fix2: install_app def improved, Fix3: max_tool_rounds 5->15
CI / gate (push) Has been cancelled
2026-07-26 08:35:42 +08:00
QihuAI Design
a2504bce34
fix(chat): resolve Auto-route failover event-loop freeze ( #812 )
...
Root cause: ensure_structured_column() executed a synchronous blocking
engine.connect().execute(SELECT information_schema.columns ...) inside the
async request path (_build_chat_history / _maybe_compress_history), freezing
the uvicorn event loop and hanging all endpoints (~200s, recovered only by
docker restart).
Fix:
- chat_context.py: remove per-request ensure_structured_column() calls; run
once idempotently at app startup (main.py lifespan). Use CURRENT_DATABASE()
for PostgreSQL compatibility.
- main.py: add startup-only ensure_structured_column() hook (try/except).
- llm_client.py: trust_env=False + bounded httpx.Timeout/wait_for so broken
endpoints fail fast instead of hanging the event loop.
- chat_service.py: run media generation in a background daemon thread with its
own event loop (_launch_media_task_bg) so SSE end does not cancel image/video
tasks (#811 ); remove TEMP faulthandler diagnostic.
Safe-align: persist accumulated live container changes (admin/*, knowledge,
market, models, config, observability, mcp_client, platform_knowledge,
im_bot_platform, chat_media, capability_registry, requirements) and add
workflow_templates.
Verified: live failover test (model-006 -> conn-refused) returns in ~1.9s with
concurrent login 0.83s/200; event-loop responsiveness restored (sub-second).
2026-07-26 00:35:35 +08:00
QihuAI Design
394a7786e0
chore: remove MySQL service from docker-compose (PostgreSQL migration complete)\n\n- Drop dead mysql service, mysql_data volume, and aiflow depends_on: mysql\n- Remove unused MYSQL_* env vars from aiflow service\n- Retain DATABASE_URL/POSTGRES_* pointing at qihu-aiflow-pg18\n- Closes the MySQL teardown started in task #802
CI / gate (push) Has been cancelled
2026-07-25 20:59:44 +08:00
QihuAI Design
640edc4970
chore: normalize tsconfig.json line endings (file missed by prior commit)
...
CI / gate (push) Has been cancelled
The earlier renormalize commit (771c845 ) missed frontend/tsconfig.json; this
completes the LF normalization so all tracked text files are LF. .gitattributes
(* text=auto eol=lf) prevents future CRLF.
2026-07-25 12:33:53 +08:00
QihuAI Design
771c8456b8
chore: normalize line endings to LF via .gitattributes
...
Root-cause fix for mixed CRLF/LF in the repo (no .gitattributes previously).
Adds '* text=auto eol=lf' and explicit binary rules so all future checkouts
are LF. Renormalizes all tracked text files (no logical content change).
Backup tags: image qihuaiflow:backup-lineend-20260725-121632, git backup-lineend-pre-20260725-121632.
2026-07-25 12:16:39 +08:00
QihuAI Design
2a7bb875f9
fix(mcp/chat): root-cause fixes for AnySearch MCP test + URL app install
...
- mcp_admin.py: replace get_event_loop().run_until_complete() with asyncio.run() in _test_mcp_server worker-thread path (RuntimeError: no current event loop in thread). Fixes backend AnySearch 'test failed'.
- chat_skill.py: add synchronous _execute_install_app() that auto-detects skill/mcp/agent from a URL and creates MarketApp(+MCPServer is_enabled=True for mcp) + AppInstallation. No running-loop asyncio call (called sync from chat dispatch).
- chat_service.py: register 'install_app' function_definition and dispatch branch so the AI chat can install skills/mcp/agent by URL.
Image already persisted via docker export/import (qihuaiflow:with-deps=aaf6fe67cde8) because base image was pruned and docker commit failed.
2026-07-25 11:51:19 +08:00
QihuAI Design
256d9f33e6
chore(align): sync Git with running container as authoritative source
...
Phase 0 SSE 流式聊天 landed in the running container and captured in Git so
the three sources (container := image := Git) agree.
Phase 0 — SSE 流式聊天(Web 端,IM bot 路径保持不变、共用引擎):
- app/api/chat.py: 新增独立 SSE 端点
POST /app/api/chat/conversations/{conv_id}/messages/stream
基于 asyncio.Queue + create_task 将 _send_message_core 桥接为
text/event-stream 生成器,吐出 delta / reasoning / done / error 事件
- app/api/chat_service.py: _send_message_core 增加 stream + on_event 参数;
普通(无工具)聊天 round-0 主调用走 achat_complete(stream=True) 流式;
done 事件携带 message_id / content / process_steps / used_skills /
used_mcp / generating
- app/core/llm_client.py: 修复 _create_kwargs 硬编码 stream=False 的根因 bug
(流式调用传 stream=True 导致 TypeError: multiple values for keyword),
现 _create_kwargs(request_body, stream=True) 字段随参数变化
- frontend/src/pages/front/ChatPage.tsx + ChatPage.css + types/index.ts:
发消息改为 fetch SSE 消费,实时增量渲染 AI 回复文本与思考链(reasoning),
done 事件用 message_id 定稿并渲染过程步骤;网络/流式失败自动回退非流式
Alignment performed 2026-07-24 18:25:11. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-24 18:25:15 +08:00
QihuAI Design
3788a93425
chore(align): sync Git with running container as authoritative source
...
Phase 0 SSE 流式聊天 landed in the running container and captured in Git so
the three sources (container := image := Git) agree.
Phase 0 — SSE 流式聊天(Web 端,IM bot 路径保持不变、共用引擎):
- app/api/chat.py: 新增独立 SSE 端点
POST /app/api/chat/conversations/{conv_id}/messages/stream
基于 asyncio.Queue + create_task 将 _send_message_core 桥接为
text/event-stream 生成器,吐出 delta / reasoning / done / error 事件
- app/api/chat_service.py: _send_message_core 增加 stream + on_event 参数;
普通(无工具)聊天 round-0 主调用走 achat_complete(stream=True) 流式;
done 事件携带 message_id / content / process_steps / used_skills /
used_mcp / generating
- app/core/llm_client.py: 修复 _create_kwargs 硬编码 stream=False 的根因 bug
(流式调用传 stream=True 导致 TypeError: multiple values for keyword),
现 _create_kwargs(request_body, stream=True) 字段随参数变化
- frontend/src/pages/front/ChatPage.tsx + ChatPage.css + types/index.ts:
发消息改为 fetch SSE 消费,实时增量渲染 AI 回复文本与思考链(reasoning),
done 事件用 message_id 定稿并渲染过程步骤;网络/流式失败自动回退非流式
Alignment performed 2026-07-24 16:28:19. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-24 16:28:19 +08:00
QihuAI Design
e8a1791c9f
chore(align): sync Git with running container as authoritative source
...
Standards alignment (STANDARDS_AUDIT_2026-07-24): Phase 1 标准化核心 +
Phase 2 质量层 landed in the running container and captured in Git so the
three sources (container := image := Git) agree.
Backend (Phase 1 标准化核心):
- mcp_client.py: replaced hand-rolled JSON-RPC with official `mcp` SDK
(ClientSession, streamable_http/sse transports, protocol auto-negotiation)
- core/otel.py + core/observability.py: standard OpenTelemetry SDK bridge
(OTLP gRPC), wired to Grafana Alloy (qihu-aiflow-alloy:4317) which forwards
metrics to Prometheus; emits aiflow_span_duration_ms / aiflow_span_count
- deployments: Grafana Alloy container + Prometheus remote-write receiver
Backend (Phase 2 质量层):
- core/rag_pipeline.py: standardized RAG (recursive overlap chunking +
rerank hook) reusing pgvector_search
- core/llm_client.py: SDK-ified LLM + embeddings (aembed/embed) collapsing
hand-rolled httpx calls; trust_env=False to bypass container proxy
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-24 12:18:51. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-24 12:18:52 +08:00
QihuAI Design
acde481bed
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-24 07:44:19. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-24 07:44:19 +08:00
QihuAI Design
26075272d6
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-23 22:42:43. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-23 22:42:46 +08:00
QihuAI Design
a1fd8b074d
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-23 22:16:24. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-23 22:16:25 +08:00
QihuAI Design
2721da5d4c
feat: 思考过程展示优化 — 先展开再自动收拢
...
AiProcessBlock 改进:
- 超时从 2.6s 延至 6s,用户有充足时间阅读思考链路
- 新增 aiProcessPulse 脉冲高亮动画,强调'思考过程刚出炉'
- 展开时自动 scrollIntoView,确保不被正文遮挡
- 摘要文案改为'AI 思考 / 执行过程(N步 — 自动收拢中...)'
CSS 新增:
- .ai-process-fresh 脉冲动画 + summary 文字高亮
- @keyframes aiProcessPulse: 0→50%→100% 边框扩散+收拢
2026-07-23 22:00:49 +08:00
QihuAI Design
9d67b0544c
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-23 19:43:56. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-23 19:43:56 +08:00
QihuAI Design
4a95657030
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-23 16:04:25. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-23 16:04:26 +08:00
QihuAI Design
d3d8d62b94
fix(media): repair JSON_CONTAINS auto-routing + reconcile stale backend tests
...
CI / gate (push) Has been cancelled
Real bug:
- capability_registry.resolve_auto_model and chat_media._build_media_route used
`Column.op("JSON_CONTAINS")(col, val)`, but SQLAlchemy's op() accepts only ONE
argument -> TypeError on every image/video/audio auto-route, silently failing
media generation (caught as "后台生成异常"). Replaced with func.json_contains().
Test reconciliation (no production behavior change):
- tests/test_context_engine.py: tiktoken upgrade made the hardcoded len//2 token
estimates wrong; relax to tokenizer-agnostic assertions and add
structured_memory=None to the _Summary mock (code now branches on it).
- tests/test_regression_r1r2r3.py: R3 FakeModel lacked `name` (code reads m.name);
also the assertion assumed a literal '超时' string, but the failover architecture
catches model-level exceptions and writes a user-understandable error marker
instead. Align the assertion to the real contract: a media failure/timeout must
be written back as a user-understandable error message, never left as '生成中…'.
CI gate: 28 backend pytest + 15 frontend vitest all green.
2026-07-23 09:16:31 +08:00
QihuAI Design
a08ec87b22
chore(align): sync Git with running container as authoritative source
...
One-time alignment to close drift between the running container
(qihu-aiflow / image qihuaiflow:with-deps) and this Git repository.
Container hotfixes previously persisted only via `docker commit` are now
captured in Git so Git becomes the single source of truth.
Backend:
- chat_service.py: accumulated fixes incl. EigenFlux README guidance
- chat_context.py / chat_media.py: URL/web-repo context injection
- api/url_reader.py: NEW SSRF-safe web/README reader (Issue #725 )
- skills_admin.py & Skills.tsx: 14-scene capability unification
- pgvector_search.py, orchestrator.py, platform_knowledge.py,
market.py, admin/models.py: drift sync
Frontend:
- ChatPage.tsx: collapsible AI think/act block (Issue #724 )
- MarketPage / EvolutionDashboard / TokenDashboard styling sync
Migrations:
- 018_normalize_marketapp_scene.sql: fixed capability allowlist
(prevents capability wipe on restart)
Alignment performed 2026-07-23 05:42:47. No deletions; secrets/venv/node_modules/
caches were not touched (tracked-source-only copy).
2026-07-23 05:42:48 +08:00
QihuAI Design
49f7503978
fix(models): widen market_apps.skill_content to MEDIUMTEXT for large SKILL.md
2026-07-22 12:42:43 +08:00
QihuAI Design
6da8c3938e
fix(admin/mcp): prevent unnecessary wrapping in table headers and badges
2026-07-22 08:54:03 +08:00
QihuAI Design
6d06f9165c
feat(skills): auto-tag+classify existing 60 skills, auto-tag on import, 409 uniqueness check, add tags column to admin
2026-07-22 07:58:40 +08:00
QihuAI Design
46528eddbb
fix(market): 补齐MarketApp ORM category/tags字段 + 硬化导入管道(空内容兜底生成SKILL.md + GitHub直链归一)
2026-07-21 20:25:55 +08:00
QihuAI Design
97125d7b65
T4: AnySearch 改为全局固定配置 + 修复外部服务弹窗 UI
2026-07-21 19:27:27 +08:00
QihuAI Design
3c9d9518b1
T4: AnySearch 联网检索接入 (anysearch_client trust_env直连 NO_PROXY, kb_router use_web RRF融合, chat_context 自动注入联网上下文, admin 支持 anysearch 服务类型, 新增 POST /api/knowledge/web-search 端点)
2026-07-21 18:29:51 +08:00
QihuAI Design
be7d792dc2
T3: TreeSearch 结构化文档两级检索 (build_kb_tree + tree_search BM25+向量融合, 接入 kb_router 为 tree_chunk 源, 新增 GET /api/knowledge/tree-search)
2026-07-21 12:56:57 +08:00
QihuAI Design
75f53a7e8a
fix: 文生图/视频测试连接走媒体端点直连(_proxy_for_url 增加 images/videos 直连规则),绕过智能路由代理重置长连接导致的 Server disconnected;gpt-image-2/agnes 测试连接恢复。配合 models.py 的 1024x1024 size 与 chat_media.py 的 failover 路由(默认模型第一顺位)。
2026-07-20 22:26:30 +08:00
QihuAI Design
0b00d6da45
fix: 文生图连接测试 size 1024x1024 + 媒体端点智能推导 + 图像/视频模型 failover 路由(默认模型第一顺位)
2026-07-20 22:11:53 +08:00
QihuAI Design
7674729804
test(frontend): extract Markdown renderer to utils/markdown.ts + add vitest regression tests
CI / gate (push) Has been cancelled
2026-07-20 20:32:36 +08:00
QihuAI Design
11b80b90f4
fix(migrations): MariaDB 兼容幂等化 privacy_mode 列与 distributions 种子插入
CI / gate (push) Has been cancelled
2026-07-20 19:37:57 +08:00
QihuAI Design
71a6403e5b
fix: 加宽 skill_trajectory_links.atom_id 列 VARCHAR(36)->128 修复 DataError(1406);TraceIdFilter 从 root logger 移至 handler 修复子 logger %(trace_id)s KeyError 日志刷屏;evolution scheduler 循环增加 db.rollback() 兜底;附带 models.py CRLF->LF 归一。
CI / gate (push) Has been cancelled
2026-07-20 19:02:40 +08:00
QihuAI Design
5def2697de
fix(chat): image send 500 + table/newline formatting (v2026.07.20.1708)
CI / gate (push) Has been cancelled
2026-07-20 17:08:20 +08:00
QihuAI Design
612ce37518
audit fixes: align all frontend timestamps to Beijing time + debounce MarketPage search (vv2026.07.20.1)
CI / gate (push) Has been cancelled
2026-07-20 15:38:55 +08:00
QihuAI Design
d55a496ff4
Phase 4.3 ACA: MCP.tsx protocol selector panel + api ACA methods (v2026.07.19.12)
CI / gate (push) Has been cancelled
2026-07-20 14:45:21 +08:00
QihuAI Design
72d6f9ab66
Phase 4.1+: mermaid diagrams + YAML workflow buttons + agents API (v2026.07.19.11)
CI / gate (push) Has been cancelled
2026-07-20 09:24:40 +08:00
QihuAI Design
79c27795a8
Phase 4.2+4.3: YAML workflow spec + ACA protocol abstraction (v2026.07.19.10)
CI / gate (push) Has been cancelled
2026-07-19 20:17:49 +08:00
QihuAI Design
c716dab851
Phase 4.1+: expose version/verified/security_scan/dependencies in admin get_all_apps
CI / gate (push) Has been cancelled
2026-07-19 19:29:48 +08:00
QihuAI Design
669c16b0a0
Phase 4.1: 技能市场安检引擎 + 版本化 + 绿标 (v2026.07.19.9)
CI / gate (push) Has been cancelled
2026-07-19 19:15:35 +08:00
QihuAI Design
71fc502a92
Phase 3.3 前端: 后台 Agent 编排图 JSON 编辑器(载入/校验/保存/清除/示例)
CI / gate (push) Has been cancelled
2026-07-19 16:55:20 +08:00
QihuAI Design
96b3f0af37
Phase 3.3 多 Agent 编排图引擎: orchestration JSON 列 + 拓扑并行引擎 + local/external/reduce 节点 + 工具沙箱继承 + 后台编排 API
CI / gate (push) Has been cancelled
2026-07-19 16:41:27 +08:00
QihuAI Design
3b34ba78b8
feat(agents): Phase3.2 Agent凭据Fernet加密存储 写入加密+调用点解密+返回脱敏+主密钥持久化防竞态 [v2026.07.19.7]
CI / gate (push) Has been cancelled
2026-07-19 15:27:15 +08:00
QihuAI Design
0600c37b9e
feat(agents): Phase3.1 工具/MCP权限沙箱(tool_policy) 白名单+预算熔断+每轮上限+后台管理UI [v2026.07.19.6]
CI / gate (push) Has been cancelled
2026-07-19 12:34:40 +08:00
QihuAI Design
2969544d54
feat(observability): Phase2.3 媒体/LLM 可观测面板(后端归因聚合+前端页) 并修复 token_usage_logs trace_id 写入(chat_service/im_llm) [v2026.07.19.5]
CI / gate (push) Has been cancelled
2026-07-19 10:18:14 +08:00
QihuAI Design
491f31cead
refactor(context): Phase2 上下文引擎升级 分层记忆+压缩+隔离 [v2026.07.19.4]
CI / gate (push) Has been cancelled
2026-07-19 09:29:57 +08:00
QihuAI Design
a7a57f9a03
refactor(observability): Phase2.2 成本归因 trace_id列+token日志写入+LLM/MCP/媒体子span [v2026.07.19.3]
CI / gate (push) Has been cancelled
2026-07-19 08:51:28 +08:00
QihuAI Design
6aefdfa5c2
refactor(observability): Phase2.1 统一可观测基座 trace_id+结构化日志+span计时 [v2026.07.19.2]
CI / gate (push) Has been cancelled
2026-07-19 07:47:25 +08:00
QihuAI Design
1b6a184d27
refactor(chat): split 10070-line monolith into 8 service submodules (Phase1) [v2026.07.19.1]
CI / gate (push) Has been cancelled
2026-07-19 00:59:03 +08:00
QihuAI Design
4167e23e50
ci: add minimal CI gate (pre-push hook + ci_gate.py + dormant Gitea workflow) [v2026.07.18.5]
CI / gate (push) Has been cancelled
2026-07-19 00:01:07 +08:00
QihuAI Design
dd10245ad5
test: 前端 vitest 测试基建 (Phase0) — 北京时间渲染回归 4 用例全绿
2026-07-18 23:47:21 +08:00
QihuAI Design
1744ff40ce
test: 回归用例 R1/R2/R3 固化三个反复问题 (Phase0) — 9 用例全绿
2026-07-18 23:36:01 +08:00
QihuAI Design
13578ba4c2
test: 后端 pytest 测试基建 (Phase0) — 6 用例全绿 + 部署前备份SOP合规
2026-07-18 23:29:55 +08:00
QihuAI Design
9e9c506ba9
release: v2026.07.18.1 (prod) — Phase0 工程纪律止血:部署前镜像备份SOP + 版本号规范 + 测试基建
2026-07-18 23:19:18 +08:00
QihuAI Design
1ea7ea352f
chore: remove accidental .bak file
2026-07-18 13:54:19 +08:00
QihuAI Design
d593d8dc42
fix: 显式选中技能/MCP 时优先按工具资料回答 + 媒体任务超时/日志
...
- _build_system_prompt 末尾增加【最高优先级覆盖规则】:用户明确选择技能/MCP 并询问其介绍/功能/用法时,
必须只基于该工具资料作答,禁止引用平台知识库中技能市场/MCP/平台能力的通用描述。
- _generate_media_task 增加启动/结束日志,对图像生成加 90s 超时、视频 300s 超时,避免异步任务挂死导致前端一直显示“生成中”。
2026-07-18 13:52:26 +08:00
QihuAI Design
1578d68f95
fix: 修复前台4项问题(MCP列举/微信技能上限/Word资产栏/技能MCP反馈) + 同步容器live状态
...
- #549 平台MCP列举: 注入全量已启用MCP清单, AI不再凭空编造
- #550 微信Bot技能自动发现上限 15->300
- #551 知识库Word文档同步资产后Word栏可见 + 双向删除同步(assets/knowledge级联软删)
- #552 对话反馈实际使用的技能/MCP(used_mcp字段), 含历史消息序列化
- 同步容器内其他未提交live改动(im_bot_platform/TokenDashboard/WechatBot/ChatPage)
2026-07-18 08:06:37 +08:00
QihuAI Design
7fb7c07f57
fix(admin/skills): 支持删除从市场导入的 MarketApp 技能
2026-07-17 22:25:47 +08:00
QihuAI Design
cc35c61fbd
fix: 技能市场分类映射缺失+筛选chip激活态配色;聊天显式选中技能时正确介绍技能并精简回复排版
2026-07-17 21:45:30 +08:00
QihuAI Design
f8d1c18927
fix(admin): 后台未登录访问 Skills/MCP/Agent 报 Not authenticated\n\n- AdminLayout 增加登录+管理员守卫,无 token 或非 admin 跳 /login\n- api request() 处理 403 Not authenticated/需要管理员权限,清 token 跳登录\n- 根因:FastAPI HTTPBearer 无 token 返回 403 而非 401,前端未处理 403 跳转
2026-07-17 20:46:05 +08:00
QihuAI Design
e2369b4915
fix(market): 强化场景分类器解析兜底,避免合法 id 误判为 None
2026-07-17 15:44:58 +08:00
QihuAI Design
dc3077b5ae
fix(market): 强化场景分类器解析兜底,避免合法 id 误判为 None
2026-07-17 15:37:35 +08:00
QihuAI Design
fe051bd9f3
feat(market): 采用元宝岗位/职能分类(14类)替代人群场景 + AI验证期自动归类
2026-07-17 15:22:57 +08:00
QihuAI Design
9bcf15099f
feat(market): 技能/MCP 分类改为面向用户的业务场景(人群->场景),AI验证期按场景归类
2026-07-17 14:55:21 +08:00
QihuAI Design
6f3fb400a4
feat(market): skills/mcp 能力分类 + AI验证期自动识别 + 导入自动入座
2026-07-17 12:09:42 +08:00
QihuAI Design
2ae5d9f9b5
fix(skills): 修复导入技能时 SKILL 内容丢失导致无法正常工作
...
- 前端 handleSubmit/handleCreateApp 发送 skillsContent;handleHubImport 对 skill 把目录 URL 作为 download_url
- 后端 upload_app 对 skill 类型写入 skill_content(手动粘贴或 Hub 抓取)
- 新增 _fetch_skill_content 按目录 URL 抓取真实 SKILL.md 回填(best-effort,仅接受有效 markdown)
- 清理 50 条空壳 skill 记录(skill_content 为空,不可恢复)
- 经 E2E 验证:手动粘贴/Hub 抓取/MCP 重导三条路径均能正确落库
2026-07-17 10:46:47 +08:00
QihuAI Design
47d38ca173
fix(MCP): 修复导入MCP时传输代码丢失导致无法连接的问题
...
- 前端 MarketPage 提交时随 download_url 发送粘贴的 MCP 代码(handleSubmit+handleCreateApp)
- 后端新增 parse_mcp_config 解析标准 JSON 配置, 提取 url/headers/transport
- upload_app 与 _sync 使用解析器落库 mcp_servers 并自动连通性测试
- _test_mcp_server 连接测试携带 headers 鉴权头
- 优化 MCP 代码输入框占位符为真实配置格式
2026-07-17 09:43:43 +08:00
QihuAI Design
24ed907ba5
feat: 实现MCP工具调用链路(streamable_http) - chat中MCP作为function calling真实调用tools/call
2026-07-16 20:59:42 +08:00
QihuAI Design
ab90ac9473
fix: MCP后台删除/禁用同步清理market_apps源头,避免被_sync复活
2026-07-16 20:09:16 +08:00
QihuAI Design
6331e84185
feat: MCP streamable_http connection test + auto-test on import
2026-07-16 18:38:10 +08:00
QihuAI Design
feb9865b00
fix: sync MarketApp MCP records to admin MCP Client management
2026-07-16 18:12:07 +08:00
QihuAI Design
c9b5f964be
feat(frontend): per-platform Streamable HTTP input for MCP Hub import
2026-07-16 17:36:58 +08:00
QihuAI Design
e856f186be
ui(mcp-hub): MCP导入弹窗复用 skills 优化方案
...
两个问题:
1. 标题"导入Hub - MCP"偏左未居中 — .market-modal-header h2
加 flex:1 + text-align:center
2. 说明textarea 与 MCP传输代码 框紧挨着无分隔 —
.hub-code-section 加 margin-top: var(--space-xl)
2026-07-16 16:39:12 +08:00
QihuAI Design
e95fec0c1b
ui(admin): 修复后台侧边栏 logo 区域未垂直居中
...
.admin-sidebar-header 原 align-items: baseline + height: var(--header-height) + padding: 0
导致 logo 紧贴顶部边线。
修复:
- align-items: baseline → center
- padding: 0 var(--space-lg) → var(--space-md) var(--space-lg)
- height → min-height
- justify-content: center (水平居中)
- logo/subtitle 加 line-height: 1 + display: flex align-items: center
2026-07-16 16:30:57 +08:00
QihuAI Design
dc577eb0f0
feat(chat): 增强AI回复渲染 — 代码高亮/KaTeX数学/删除线/URL自动链接
...
新增渲染能力:
1. highlight.js 代码语法高亮 + 复制按钮 (hover显示)
2. KaTeX 数学公式渲染 ($$...$$块级 + $...$行内)
3. 删除线 ~~text~~ → <del>
4. 裸URL自动转可点击链接
依赖: npm install highlight.js katex mermaid
2026-07-16 16:25:41 +08:00
QihuAI Design
8486a2a0e5
ui(chat): MarkdownContent 支持表格渲染
...
AI 聊天回复中常出现 Markdown 表格语法 (| h1 | h2 | + |---|---| ),
但 MarkdownContent 仅支持 headers/lists/code,未渲染表格,
显示为原始 | 分隔文本。
修复:
1. ChatPage.tsx MarkdownContent 新增表格解析步骤(步骤 2.7)
- 匹配 | header |
|---|---| 的多行表格块
- 解析对齐方式 (:---, :---:, ---:)
- 生成 <table><thead><tbody> HTML
2. 步骤 10 恢复占位符,步骤 11 解包 <table> 不被 <p> 包裹
3. ChatPage.css 新增 .md-table 样式
- 蓝色渐变表头 + 斑马纹 + hover 高亮
- 用户消息气泡内深色适配
2026-07-16 16:15:29 +08:00
QihuAI Design
845355e4e7
fix(timezone): 容器时区统一为 Asia/Shanghai,DB 历史 UTC 时间批量 +8h 修正
...
根因:容器 TZ 为空(默认 UTC),Python datetime.now() 返回 UTC 写入
MySQL datetime 列时无时区转换,导致存储值被当成北京时间显示(偏 8h)。
修复:
1. run.sh 加 export TZ=Asia/Shanghai,新写入的时间即为北京时
2. 批量 UPDATE 所有 datetime 列 + INTERVAL 8 HOUR(105 表 216 列)
3. market_apps 等 59 表的 updated_at 因 ON UPDATE 触发器被重置,
改为 = created_at(用户未实际编辑过)
后续:新写入的数据天然为北京时;旧数据已对齐。
2026-07-16 16:07:59 +08:00
QihuAI Design
4d27dd3429
ui(import-hub): 优化 skills.sh 卡片布局
...
- skills.sh 卡片改为列布局:
顶部:图标+名称+URL(左侧)+ 访问按钮(右上)
中部:URL 输入框(全宽)
底部:检测名称预览 + 导入按钮(右下)
- 加大"说明"与平台卡片的间距(margin-top: space-xl)
- 导入按钮与名称预览在右侧同一行,间距更协调
2026-07-16 16:00:35 +08:00
QihuAI Design
0e6f1931e1
fix(skills-admin): market 项加 publish_records 字段,列表"已发布"标识正确显示
...
修复顶部卡片(已发布=50)与列表行(市场=未发布)不一致问题:
列表行 isPublished 仅看 skill.publish_records[],
market_apps 项无该字段故一直显示"未发布"。
改为 market_app_to_skill_dict 中按 status 注入 publish_records。
2026-07-16 15:46:43 +08:00
QihuAI Design
8942339744
fix(skills-admin): get_skills_stats 合并 market_apps(type=skill) 统计
...
修复顶部卡片仍显示 0 的问题:list_skills 已支持合并查询,
但 stats/overview 端点仍只读 evolution_skills。
新增对 market_apps 的统计: published→main, 其它→baby。
验证: total_skills=50, by_state.main=50, total_published=50
2026-07-16 15:39:21 +08:00
QihuAI Design
ce81297159
fix: 修复技能市场分页、后台Skills管理、微信Bot图片生成超时
...
1. MarketPage.tsx: getApps 加 page_size=100,修复只显示20条
2. skills_admin.py: list_skills 同时查询 market_apps(type=skill)
解决前台导入50个技能后台看不到(前后台用不同表)
3. im_llm.py: _run_async 加 timeout 参数,_call_real_llm 媒体生成
5分钟超时保护,解决微信Bot图片生成无限期挂住的问题
2026-07-16 15:10:50 +08:00
QihuAI Design
b3866f770c
fix: 全站时间统一为北京时间(Asia/Shanghai)
...
新增 src/utils/datetime.ts 共享 formatBjTime 工具,
13 个页面(11后台+2前台) 的 toLocaleString/formatDate
改为显式北京时间。Dashboard.tsx 保留图表标签的
formatDate(split) 不受影响。
2026-07-16 12:39:35 +08:00
QihuAI Design
82afe14a23
fix(wechat/token/market): 修复微信对话时间、Token数据重置、技能市场复活、媒体内联
...
1. 微信Bot对话记录时间按北京时间渲染(ImBotHub/WechatHistory 的 formatTime 显式 +08:00 + Asia/Shanghai);
2. 新增 /app/api/chat/media/relay 媒体中转端点(白名单 agnES 域名, 经香港代理代取),
改写 _wechat_send_media 用平台中转地址,微信/iLink 可内联播放图片/视频;
3. 删除 014_clean_test_data.sql:该迁移每次重启重跑并 DELETE token_usage_logs/
messages/conversations/knowledge 等,导致 Token 驾驶舱数据每次重启被清空;
4. 002_init_data.sql 移除 market_apps 自动播种(原 WHERE COUNT=0 在用户删空后重启复活),
技能市场交由用户后台维护,重启不再复活。
2026-07-16 09:19:23 +08:00
QihuAI Design
da89a27bca
fix(wechat-bot): ①对话时间统一北京时间 ②媒体内联发送(微信直看图片/视频) ③媒体生成计入Token驾驶舱 ④清空技能市场
2026-07-15 23:37:30 +08:00
QihuAI Design
7739f17594
fix(wechat-bot): 修复 AGNES 媒体生成失败——优化步骤相对导入路径错误(从未生效)+ 国内模型直连 + 内容策略重试
2026-07-15 22:04:22 +08:00
QihuAI Design
fd2011b93e
fix: AGNES 三个模型改走香港代理(实测延迟更低、更稳定)
2026-07-15 20:17:44 +08:00
QihuAI Design
d374d464e8
feat: 智能Agent接入前连通性/鉴权校验
...
- 前端技能市场「接入单个Agent」新增「测试连接」按钮,接入前必须校验通过
- 后端 POST /market/apps/verify-agent:dify 走 chat-messages 鉴权探测(trust_env=False 直连),n8n/coze 走 HEAD 可达性探测
- upload_app 对 agent 类型做服务端守卫,密钥无效/不可达直接 400 拒绝
- MarketApp 新增 platform 列(dify/n8n/coze),009 迁移幂等加列
2026-07-15 13:01:19 +08:00
QihuAI Design
b0bfba5c16
fix: 技能/应用市场官方种子改为仅空表时写入,修复删掉的技能重启后被迁移脚本复活
...
- run.sh 每次重启无条件重跑 migrations/002_init_data.sql
- 原 INSERT IGNORE 在用户删行(PK消失)后会重新插入,导致已删技能复活
- 改为 INSERT...SELECT...WHERE (SELECT COUNT(*) FROM market_apps)=0,仅全新库播种,用户删除任一后表非空即不再复活
2026-07-15 12:38:36 +08:00
QihuAI Design
996d5413da
fix: 修复AI聊天/IM多项问题(媒体直连+技能自动发现+agent/mcp上下文)
...
- Issue4/7: 图像/视频生成对AGNES国内域名强制直连(trust_env=False),修复Server disconnected(代理172.18.0.1:7890返回502)
- Issue8: 修复_parse_skill_content缺失def导致的NameError;新增_discover_installed_skills默认技能自动发现
- Issue2/3: system prompt注入agent资料与mcp描述/endpoint
- Issue7: IM Bot制作图片走Auto路由媒体模型
2026-07-15 12:23:56 +08:00
QihuAI Design
bc2899ed09
前台8项体验修复: 知识库上传自动刷新; 资产PDF归类; Token驾驶舱媒体统计; AI模糊意图澄清选择; ChatPage增加MCP/附件上传/语音; 技能市场安装态修复+清理演示数据; MCP协议应用改名MCP应用; Agent单应用接入(名称/介绍/API Key)
2026-07-15 10:33:43 +08:00
QihuAI Design
463824480b
fix: 知识库文档上传(尾斜杠+FormData+真文件接收); AI回复强制Markdown; 平台全功能知识库注入系统提示
2026-07-14 23:04:30 +08:00
QihuAI Design
62631a3b95
feat: 技能市场Hub导入MCP/Skills添加名称说明输入;MCP传输代码验证后独立导入按钮
2026-07-14 22:33:43 +08:00
QihuAI Design
c0ec9e0e88
fix: ChatPage loadMessages 中 mapped.forEach 闭包错误导致页面白屏;移至 async 内部
2026-07-14 22:21:16 +08:00
QihuAI Design
5d1370156e
fix: 停止迁移复活默认模型供应商/模型;AI聊天媒体生成改为异步(修复视频请求失败)
...
- migrations/002_init_data.sql: 移除 model_providers/models 的 INSERT IGNORE 种子,重启容器不再复活 deepseek/openai/通义千问等默认供应商与模型,改由用户在后台大模型库自行维护
- chat.py: 图像/视频生成分支改为立即返回占位(generating=true),后台 asyncio 任务轮询 AGNES 并回写消息内容,避免最长 5 分钟同步轮询阻塞 HTTP 请求导致前端「发送失败:请求失败」
- ChatPage.tsx: 发送后若 assistant_message.generating,每 3s 轮询 getMessages 直至内容更新;页面刷新时若仍有「⏳ 」占位继续轮询;卸载清理定时器
2026-07-14 21:48:39 +08:00
QihuAI Design
b7f76c3e92
refactor(admin): 将「数据分析」从数据驾驶舱移至待处理板块
2026-07-14 21:21:35 +08:00
QihuAI Design
a1669374e6
feat(kb): 接入 Dify 知识库,移除 FastGPT;AI 聊天产出+用户文档自动入库量化
...
- 新增 app/dify_kb.py Dify v1 客户端(连通测试/检索/文本入库)
- kb_router 仅保留 Dify 外部检索分支
- knowledge_admin 去掉 FastGPT/RAGFlow,新增 dify 批量入库端点
- chat.py 注入 Dify RAG 上下文 + 助手回答 fire-and-forget 入库
- 前端 Knowledge.tsx 改为 Dify 单服务 UI(可通讯/可用验证+入库按钮)
- DB: external_kb_services 删除 fastgpt,qihuai 设为 https+connected
2026-07-14 20:56:53 +08:00
QihuAI Design
d3a890eb18
Round6 fix: 自动化任务提交按钮文案/去掉创建分支; 补建 sms_verification_codes 表
2026-07-14 19:38:50 +08:00
QihuAI Design
d179cc2f02
Round6: 前台图片缩略图+下载/视频修复; 后台连接测试单次+自动消失; 导航重组; 存储中文化; 自动化去掉创建按钮; 短信验证码(注册/重置/充值通知)
2026-07-14 18:49:27 +08:00
QihuAI Design
ba09017884
fix: AGNES图像/视频生成强制经智能路由代理(172.18.0.1:7890),修复容器内直连被重置导致图像生成异常
2026-07-14 17:11:12 +08:00
QihuAI Design
202a181ebe
同步页面正文标题改名:付费中心→会员订阅、微信机器人→微信Bot、会员订阅→会员管理、应用市场审核→AI技能审核、技能管理→Skills技能管理、MCP服务→MCP Client管理、支付渠道配置→支付渠道、广告位管理→广告管理
2026-07-14 12:11:50 +08:00
QihuAI Design
fcc84d98df
增强后台数据驾驶舱:6张指标卡(近7天活跃/订阅成功/文档数等)+30天Token趋势+操作/审计日志分页与CSV下载
2026-07-14 12:00:19 +08:00
QihuAI Design
6525b4d994
feat: 补齐缺失页 Phase1 - 多平台IM Bot(企业微信/飞书/QQ/悟空IM)+应用服务页+路由导航
2026-07-14 11:38:08 +08:00
QihuAI Design
fa01b5df5b
refactor: 按新规格重组前后台菜单导航(前台分组+改名、后台5板块+待处理)
2026-07-14 11:02:21 +08:00
QihuAI Design
6e4fcad2b9
style: 首页轮播箭头默认隐藏(hover显现)、指示器圆点去边框极淡透明
2026-07-14 10:40:52 +08:00