diff --git a/frontend-web/.env.development b/frontend-web/.env.development index 3837c075..ac6db962 100644 --- a/frontend-web/.env.development +++ b/frontend-web/.env.development @@ -5,7 +5,7 @@ VITE_USE_REAL_DATA=true # 任务详情(登录深链 cop-task-detail)数据源:默认真实接口;改成 true 走本地假数据(consumer 外网不可达时调试用)。 -VITE_MOCK_COP_TASK_DETAIL=true +VITE_MOCK_COP_TASK_DETAIL=flase # 研判情报报告(大屏绘制智能体深链 selectSqReport)数据源:true 走本地样例假数据(真实接口未就绪时调试用);联调通过后置 false。 VITE_MOCK_SQ_REPORT=true diff --git a/frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx b/frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx index cbf26130..9b95b7ff 100644 --- a/frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx +++ b/frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx @@ -40,11 +40,12 @@ const INPUT_CLASS = const DEFAULT_KEYWORD_COUNT = 1; const DEFAULT_AUDIENCE = '普通读者'; -type MaterialSource = 'general' | 'notebook'; +type MaterialSource = 'general' | 'knowledge_base' | 'notebook'; const MAX_INTENT_LENGTH = 500; const MATERIAL_SOURCE_OPTIONS: Array<{ value: MaterialSource; label: string; desc: string }> = [ { value: 'general', label: '通用检索', desc: '用素材收集专家配置的技能检索(默认:知识库检索)' }, + { value: 'knowledge_base', label: '知识库检索', desc: '直连内网知识库检索接口,不走技能编排' }, { value: 'notebook', label: '我的空间', desc: '从空间中检索素材' }, ]; diff --git a/frontend-web/src/open-canvas/contexts/WritingFormContext.tsx b/frontend-web/src/open-canvas/contexts/WritingFormContext.tsx index 364dc78c..e8ca3b0d 100644 --- a/frontend-web/src/open-canvas/contexts/WritingFormContext.tsx +++ b/frontend-web/src/open-canvas/contexts/WritingFormContext.tsx @@ -37,8 +37,8 @@ export interface WritingFormValue { /** 是否在成稿里加参考文献(正文 [n] 角标 + 文末「参考文献」列表,像论文)。默认开。 */ addReferences: boolean; setAddReferences: (v: boolean) => void; - materialSource: 'general' | 'notebook'; - setMaterialSource: (v: 'general' | 'notebook') => void; + materialSource: 'general' | 'knowledge_base' | 'notebook'; + setMaterialSource: (v: 'general' | 'knowledge_base' | 'notebook') => void; /** 不收集素材,直接用通用知识写作:勾选后跳过素材检索阶段(含素材确认暂停点)。默认关。 */ skipResearch: boolean; setSkipResearch: (v: boolean) => void; @@ -75,7 +75,7 @@ export function WritingFormProvider({ initialDocumentIds, }: { children: ReactNode; - initialMaterialSource?: 'general' | 'notebook'; + initialMaterialSource?: 'general' | 'knowledge_base' | 'notebook'; initialNotebookId?: number | null; initialDocumentIds?: number[]; }) { @@ -88,7 +88,7 @@ export function WritingFormProvider({ const [audience, setAudience] = useState('普通读者'); const [strictMode, setStrictMode] = useState(false); const [addReferences, setAddReferences] = useState(true); - const [materialSource, setMaterialSource] = useState<'general' | 'notebook'>(initialMaterialSource ?? 'general'); + const [materialSource, setMaterialSource] = useState<'general' | 'knowledge_base' | 'notebook'>(initialMaterialSource ?? 'general'); const [skipResearch, setSkipResearch] = useState(false); const [selectedNotebookId, setSelectedNotebookId] = useState(initialNotebookId ?? null); const [selectedDocumentIds, setSelectedDocumentIds] = useState(initialDocumentIds ?? []); @@ -105,8 +105,10 @@ export function WritingFormProvider({ if (payload.target_audience?.trim()) setAudience(payload.target_audience.trim()); if (payload.writing_mode === 'strict') setStrictMode(true); else if (payload.writing_mode === 'loose') setStrictMode(false); - // 旧值 skill / knowledge_base 已合并为通用检索 general - if (payload.material_source === 'skill' || payload.material_source === 'knowledge_base' || payload.material_source === 'general') { + // knowledge_base=知识库检索(直连内网 ES)保留;旧值 skill 归一为通用检索 general + if (payload.material_source === 'knowledge_base') { + setMaterialSource('knowledge_base'); + } else if (payload.material_source === 'skill' || payload.material_source === 'general') { setMaterialSource('general'); } if (payload.outline?.trim()) { diff --git a/frontend-web/src/open-canvas/types/ai-writing.ts b/frontend-web/src/open-canvas/types/ai-writing.ts index 82c245a8..dabafb9a 100644 --- a/frontend-web/src/open-canvas/types/ai-writing.ts +++ b/frontend-web/src/open-canvas/types/ai-writing.ts @@ -265,8 +265,9 @@ export interface AIWritingRequest { writingMode: "strict" | "loose"; /** 是否在成稿里加参考文献(正文 [n] 角标 + 文末「参考文献」列表,像论文)。默认 true。 */ addReferences?: boolean; - /** 检索类型:general=通用检索(素材收集专家按配置技能检索,默认知识库检索技能)/ notebook=我的空间 */ - materialSource: "general" | "notebook"; + /** 检索类型:general=通用检索(素材收集专家按配置技能检索,默认知识库检索技能)/ + * knowledge_base=知识库检索(直连内网知识库 ES 接口,不走技能编排)/ notebook=我的空间 */ + materialSource: "general" | "knowledge_base" | "notebook"; /** 不收集素材,直接用通用知识写作:勾选后跳过整个素材检索流程(含素材确认暂停点), * 直接进入大纲规划;后端强制 loose 写作模式。默认 false。 */ skipResearch?: boolean; diff --git a/frontend-web/src/roundtable-planning/dashboard/DashboardApp.tsx b/frontend-web/src/roundtable-planning/dashboard/DashboardApp.tsx index c636df23..3b2046c9 100644 --- a/frontend-web/src/roundtable-planning/dashboard/DashboardApp.tsx +++ b/frontend-web/src/roundtable-planning/dashboard/DashboardApp.tsx @@ -86,31 +86,31 @@ export function DashboardApp({
- {/* Header */} -
-
-
-

- {data.meta.title} -

+ {/* Header(标题 + 副标题 + 生成时间)。战情多页(dashboard-agent 战情大屏)隐藏整块标题区, + 只保留下方导航 Tab;会商 Step3 大屏照常展示。 */} + {!usingPages && ( +
+
+
+

+ {data.meta.title} +

+
+ {data.meta.subtitle && ( +

+ {data.meta.subtitle} +

+ )}
- {data.meta.subtitle && ( -

- {data.meta.subtitle} -

- )} -
- {/* 战情多页(dashboard-agent)不展示「生成于」时间标签;会商 Step3 大屏保留。 */} - {!usingPages && (
生成于 {data.meta.generatedAt}
- )} -
+ + )} {/* 导航 Tab */}