From e881c242fe7f47668785f4ad767128794afc514b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Wed, 19 Aug 2026 22:26:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=B2=97=E4=BD=8D=E8=81=8C?= =?UTF-8?q?=E8=B4=A3=E8=BF=81=E8=87=B3=E4=B8=9A=E5=8A=A1=E9=93=BE=E5=B8=AD?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=E5=B9=B6=E6=94=AF=E6=8C=81=20WeKnora=20?= =?UTF-8?q?=E5=B5=8C=E5=85=A5=E9=A1=B5=E7=9F=A5=E8=AF=86=E5=BA=93=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将岗位职责从智能体配置迁移到业务链席位 JSON,会商面板只读展示;WeKnora 嵌入 iframe 支持在授权可见范围内切换知识库并重新签发会话。 Co-authored-by: Cursor --- .../workspace/agents/agent-detail-panel.tsx | 56 ++-- frontend-web/src/core/agents/types.ts | 6 - .../components/EightBfStep1Workspace.tsx | 14 +- .../src/eightbf-roundtable/styles/step1.css | 5 + .../pages/PositionRoundtablePage.tsx | 4 + .../roundtable-planning/lib/business-chain.ts | 5 + .../pages/BusinessChainEditorPage.tsx | 37 +++ offline-backend-20260512/backend/CLAUDE.md | 2 + offline-backend-20260512/backend/README.md | 1 + .../backend/app/gateway/routers/agents.py | 19 +- .../backend/app/gateway/routers/llmwiki.py | 303 +++++++++++------- .../app/gateway/routers/roundtable_chains.py | 3 + .../backend/app/gateway/weknora_embed.py | 8 +- .../harness/deerflow/config/agents_config.py | 3 - .../backend/tests/test_agents_backend.py | 27 -- .../backend/tests/test_llmwiki_weknora.py | 198 +++++++++--- 16 files changed, 434 insertions(+), 257 deletions(-) diff --git a/frontend-web/src/components/workspace/agents/agent-detail-panel.tsx b/frontend-web/src/components/workspace/agents/agent-detail-panel.tsx index c2c12ef1..c94fa96d 100644 --- a/frontend-web/src/components/workspace/agents/agent-detail-panel.tsx +++ b/frontend-web/src/components/workspace/agents/agent-detail-panel.tsx @@ -84,7 +84,6 @@ interface AgentDraft { /** 会商席位「技能识别强化」开关。 */ seatSkillDirective: boolean; knowledgeBaseIds: string[]; - jobResponsibilities: string; } function draftFromAgent(agent: Agent): AgentDraft { @@ -99,7 +98,6 @@ function draftFromAgent(agent: Agent): AgentDraft { templateName: agent.template_name ?? "", seatSkillDirective: agent.seat_skill_directive ?? false, knowledgeBaseIds: agent.llmwiki_knowledge_base_ids ?? [], - jobResponsibilities: agent.job_responsibilities ?? "", }; } @@ -153,6 +151,7 @@ export function AgentDetailPanel({ skillsIcon, skillsTitle, showCommonQuestions = false, + jobResponsibilities, panelTitle, embedded, hideStatusBadges = false, @@ -173,6 +172,11 @@ export function AgentDetailPanel({ skillsIcon?: ReactNode; skillsTitle?: string; showCommonQuestions?: boolean; + /** + * 业务链席位上配置的岗位职责。传入(含空字符串)时在常用问题上方展示; + * 不传则隐藏该区块。此字段来自业务链,不随智能体本身编辑。 + */ + jobResponsibilities?: string | null; /** Overrides the standard panel heading for an embedded consumer. */ panelTitle?: string; /** Renders one fixed panel instead of the responsive collapsible rail. */ @@ -341,8 +345,6 @@ export function AgentDetailPanel({ request.template_name = draft.templateName.trim(); if (draft.seatSkillDirective !== (agent.seat_skill_directive ?? false)) request.seat_skill_directive = draft.seatSkillDirective; - if (draft.jobResponsibilities.trim() !== (agent.job_responsibilities ?? "")) - request.job_responsibilities = draft.jobResponsibilities.trim(); if ( JSON.stringify(draft.knowledgeBaseIds) !== JSON.stringify(agent.llmwiki_knowledge_base_ids ?? []) @@ -725,37 +727,21 @@ export function AgentDetailPanel({ - {/* ── 岗位职责 ───────────────────────────────────────────────────── */} -
} - title="岗位职责" - > - {editing && draft ? ( -