feat(aia): Protocol Agent MVP complete with one-click generation and Word export
- Add one-click research protocol generation with streaming output - Implement Word document export via Pandoc integration - Add dynamic dual-panel layout with resizable split pane - Implement collapsible content for StatePanel stages - Add conversation history management with title auto-update - Fix scroll behavior, markdown rendering, and UI layout issues - Simplify conversation creation logic for reliability
This commit is contained in:
@@ -189,6 +189,36 @@ export class ProtocolContextService {
|
||||
return requiredStages.every(stage => context.completedStages.includes(stage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否可以生成研究方案(4/5 必填项)
|
||||
* 必填:科学问题、PICO、研究设计、观察指标
|
||||
* 可选:样本量
|
||||
*/
|
||||
canGenerateProtocol(context: ProtocolContextData): boolean {
|
||||
const requiredStages: ProtocolStageCode[] = [
|
||||
'scientific_question',
|
||||
'pico',
|
||||
'study_design',
|
||||
'endpoints',
|
||||
];
|
||||
|
||||
return requiredStages.every(stage => context.completedStages.includes(stage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缺失的必填阶段
|
||||
*/
|
||||
getMissingRequiredStages(context: ProtocolContextData): ProtocolStageCode[] {
|
||||
const requiredStages: ProtocolStageCode[] = [
|
||||
'scientific_question',
|
||||
'pico',
|
||||
'study_design',
|
||||
'endpoints',
|
||||
];
|
||||
|
||||
return requiredStages.filter(stage => !context.completedStages.includes(stage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取进度百分比
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user