From e20768fa4edaa72dcfb55b86cc518ccc4b1964a3 Mon Sep 17 00:00:00 2001 From: sladro Date: Mon, 29 Sep 2025 15:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8BInteractionHandler=E6=9C=AA=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E5=88=9B=E5=BB=BA=E5=AF=BC=E8=87=B4=E7=9A=84=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - 交互模式下AnalysisAgent未创建InteractionHandler,导致交互提示无法显示 - console.status动画干扰了Agent内部的交互提示 解决方案: - 在BaseAgentFactory中添加create_interactive()方法,统一交互模式的创建方式 - 修改project.py使用AnalysisAgent.create_interactive() - 移除console.status动画,改为清晰的提示信息,避免干扰交互 - 优化交互提示格式,添加分隔线让提示更明显 影响: - 用户能正确看到并响应AI审查建议等交互提示 - 交互体验更加清晰流畅 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- 111/analysis_result.json | 403 ++++++++++++++++++++++++++ {888 => 111}/tasks.json | 78 ++--- 888/analysis_result.json | 429 ---------------------------- src/bidmaster/agents/base.py | 11 + src/bidmaster/agents/interaction.py | 2 + src/bidmaster/cli/project.py | 11 +- 6 files changed, 439 insertions(+), 495 deletions(-) create mode 100644 111/analysis_result.json rename {888 => 111}/tasks.json (53%) delete mode 100644 888/analysis_result.json diff --git a/111/analysis_result.json b/111/analysis_result.json new file mode 100644 index 0000000..d834b0d --- /dev/null +++ b/111/analysis_result.json @@ -0,0 +1,403 @@ +{ + "project_name": "111", + "source_file": "C:\\Users\\sladr\\Downloads\\test2.docx", + "success": true, + "technical_count": 6, + "commercial_count": 3, + "deviation_count": 0, + "chapter_count": 8, + "execution_time": 259.9994738101959, + "warnings": [ + "AI审查: 5条优化建议" + ], + "bid_structure": { + "scoring_criteria": [ + { + "item_name": "质保期", + "max_score": 3.0, + "description": "售后质保期2年,得1分。售后质保期延长至3年,得2分。售后质保期延长至4年,得3分。", + "category": "after_sales", + "chapter_id": "chapter_02" + }, + { + "item_name": "硬件配置", + "max_score": 8.0, + "description": "以确保设备性配置不低于招标文件硬件配置要求。打分标准设备硬件的品牌、硬件配置高低、技术先进性、稳定性、兼容性以及售后服务质量等每项指标综合打分。硬件未满足技术要求按每1项不满足扣1分,扣完为止。(招标文件中参数要求提供的检测报告、功能截图、证书等证明材料供应商必须按要求提供,否则评委不予采信)", + "category": "equipment_spec", + "chapter_id": "chapter_04" + }, + { + "item_name": "软件功能", + "max_score": 8.0, + "description": "应按照磋商文件功能要求实现,各项软件功能完成率,软件功能按每1项不满足扣1分,扣完为止。", + "category": "technical_solution", + "chapter_id": "chapter_05" + }, + { + "item_name": "系统架构", + "max_score": 5.0, + "description": "对系统架构、实施内容、技术特点、安装规范、售后服务等方面进行说明,缺少1项扣1分,扣完为止。", + "category": "technical_solution", + "chapter_id": "chapter_06" + }, + { + "item_name": "网路安全防护", + "max_score": 5.0, + "description": "1.防火墙配置、入侵检测系统、安全更新和补丁管理、用户权限管理、安全培训和意识提升、数据加密根据以上各项内容的打分情况,可以综合评估组织的网络安全防护水平,缺少1项扣1分,扣完为止。", + "category": "quality_safety", + "chapter_id": "chapter_07" + }, + { + "item_name": "技术实力", + "max_score": 3.0, + "description": "投标人具有自主研发的实时视频分析平台系统的知识产权和AI识别方法的发明专利,每提供一个得1分,共3分。(提供证书原件的扫描件并加盖公章)", + "category": "compliance", + "chapter_id": "chapter_08" + } + ], + "deviation_items": [], + "chapters": [ + { + "id": "evaluation_index", + "title": "评标索引表(技术评分完全对应)", + "level": 1, + "score": null, + "template_placeholder": "{{evaluation_index_content}}", + "children": [] + }, + { + "id": "chapter_1_after_sales_service", + "title": "售后服务", + "level": 1, + "score": 3.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_warranty_service", + "title": "质保期服务承诺", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_warranty_scope", + "title": "质保期限及范围", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_service_response", + "title": "质保期内服务响应机制", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_fault_handling", + "title": "质保期故障处理流程", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_4_service_guarantee", + "title": "质保期服务保障措施", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + }, + { + "id": "chapter_1_equipment_specification", + "title": "设备规格", + "level": 1, + "score": 8.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_hardware_config", + "title": "硬件配置方案", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_core_hardware", + "title": "核心硬件技术参数", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_performance_indicators", + "title": "设备性能指标说明", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_hardware_compatibility", + "title": "硬件兼容性与扩展性", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_4_config_optimization", + "title": "硬件配置优化方案", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + }, + { + "id": "chapter_1_software_design", + "title": "软件功能设计", + "level": 1, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_software_functions", + "title": "软件功能设计", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_core_modules", + "title": "核心功能模块", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_user_interaction", + "title": "用户交互功能", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_data_management", + "title": "数据管理功能", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_4_system_management", + "title": "系统管理功能", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + }, + { + "id": "chapter_1_system_architecture", + "title": "系统架构设计", + "level": 1, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_architecture_design", + "title": "系统架构设计", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_overall_architecture", + "title": "总体架构设计", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_technology_selection", + "title": "技术架构选型", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_deployment_architecture", + "title": "系统部署架构", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + }, + { + "id": "chapter_1_project_implementation", + "title": "项目实施方案", + "level": 1, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_project_plan", + "title": "项目计划", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_2_2_implementation_team", + "title": "实施团队", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_2_3_schedule_arrangement", + "title": "进度安排", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + }, + { + "id": "chapter_1_quality_security", + "title": "质量安全", + "level": 1, + "score": 5.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_network_security", + "title": "网络安全防护体系", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_border_security", + "title": "网络边界安全防护", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_intrusion_detection", + "title": "入侵检测与防御系统", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_security_audit", + "title": "网络安全审计与监控", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_4_access_control", + "title": "网络访问控制策略", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_5_security_emergency", + "title": "网络安全应急预案", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + }, + { + "id": "chapter_1_compliance_response", + "title": "合规响应", + "level": 1, + "score": 3.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_2_1_technical_strength", + "title": "技术实力", + "level": 2, + "score": 0.0, + "template_placeholder": null, + "children": [ + { + "id": "chapter_3_1_core_team", + "title": "核心技术团队介绍", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_2_technical_certification", + "title": "技术资质与认证", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_3_rd_capability", + "title": "技术研发能力", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + }, + { + "id": "chapter_3_4_implementation_experience", + "title": "技术实施经验", + "level": 3, + "score": 0.0, + "template_placeholder": null, + "children": [] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/888/tasks.json b/111/tasks.json similarity index 53% rename from 888/tasks.json rename to 111/tasks.json index 304423b..cfd617c 100644 --- a/888/tasks.json +++ b/111/tasks.json @@ -1,112 +1,68 @@ [ { "id": 1, - "title": "资质要求", - "chapter_id": "chapter_01_compliance", - "score": 0.0, - "description": "符合第一章'供应商资格要求'规定", - "category": "compliance", - "status": "pending", - "content": "", - "placeholder": "{{chapter_01_compliance_content}}" - }, - { - "id": 2, - "title": "技术性能指标", - "chapter_id": "chapter_02_equipment_spec", - "score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定", - "category": "equipment_spec", - "status": "pending", - "content": "", - "placeholder": "{{chapter_02_equipment_spec_content}}" - }, - { - "id": 3, - "title": "响应设备及技术服务和质保服务", - "chapter_id": "chapter_03_after_sales", - "score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定和第五章'合同主要条款'中的实质性要求和条件", - "category": "after_sales", - "status": "pending", - "content": "", - "placeholder": "{{chapter_03_after_sales_content}}" - }, - { - "id": 4, - "title": "技术支持资料", - "chapter_id": "chapter_03_after_sales", - "score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定", - "category": "after_sales", - "status": "pending", - "content": "", - "placeholder": "{{chapter_03_after_sales_content}}" - }, - { - "id": 5, "title": "质保期", - "chapter_id": "chapter_03_after_sales", + "chapter_id": "chapter_02", "score": 3.0, "description": "售后质保期2年,得1分。售后质保期延长至3年,得2分。售后质保期延长至4年,得3分。", "category": "after_sales", "status": "pending", "content": "", - "placeholder": "{{chapter_03_after_sales_content}}" + "placeholder": "{{chapter_02_content}}" }, { - "id": 6, + "id": 2, "title": "硬件配置", - "chapter_id": "chapter_02_equipment_spec", + "chapter_id": "chapter_04", "score": 8.0, "description": "以确保设备性配置不低于招标文件硬件配置要求。打分标准设备硬件的品牌、硬件配置高低、技术先进性、稳定性、兼容性以及售后服务质量等每项指标综合打分。硬件未满足技术要求按每1项不满足扣1分,扣完为止。(招标文件中参数要求提供的检测报告、功能截图、证书等证明材料供应商必须按要求提供,否则评委不予采信)", "category": "equipment_spec", "status": "pending", "content": "", - "placeholder": "{{chapter_02_equipment_spec_content}}" + "placeholder": "{{chapter_04_content}}" }, { - "id": 7, + "id": 3, "title": "软件功能", - "chapter_id": "chapter_04_technical_solution", + "chapter_id": "chapter_05", "score": 8.0, "description": "应按照磋商文件功能要求实现,各项软件功能完成率,软件功能按每1项不满足扣1分,扣完为止。", "category": "technical_solution", "status": "pending", "content": "", - "placeholder": "{{chapter_04_technical_solution_content}}" + "placeholder": "{{chapter_05_content}}" }, { - "id": 8, + "id": 4, "title": "系统架构", - "chapter_id": "chapter_04_technical_solution", + "chapter_id": "chapter_06", "score": 5.0, "description": "对系统架构、实施内容、技术特点、安装规范、售后服务等方面进行说明,缺少1项扣1分,扣完为止。", "category": "technical_solution", "status": "pending", "content": "", - "placeholder": "{{chapter_04_technical_solution_content}}" + "placeholder": "{{chapter_06_content}}" }, { - "id": 9, + "id": 5, "title": "网路安全防护", - "chapter_id": "chapter_05_quality_safety", + "chapter_id": "chapter_07", "score": 5.0, "description": "1.防火墙配置、入侵检测系统、安全更新和补丁管理、用户权限管理、安全培训和意识提升、数据加密根据以上各项内容的打分情况,可以综合评估组织的网络安全防护水平,缺少1项扣1分,扣完为止。", "category": "quality_safety", "status": "pending", "content": "", - "placeholder": "{{chapter_05_quality_safety_content}}" + "placeholder": "{{chapter_07_content}}" }, { - "id": 10, + "id": 6, "title": "技术实力", - "chapter_id": "chapter_01_compliance", + "chapter_id": "chapter_08", "score": 3.0, "description": "投标人具有自主研发的实时视频分析平台系统的知识产权和AI识别方法的发明专利,每提供一个得1分,共3分。(提供证书原件的扫描件并加盖公章)", "category": "compliance", "status": "pending", "content": "", - "placeholder": "{{chapter_01_compliance_content}}" + "placeholder": "{{chapter_08_content}}" } ] \ No newline at end of file diff --git a/888/analysis_result.json b/888/analysis_result.json deleted file mode 100644 index 39fc780..0000000 --- a/888/analysis_result.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "project_name": "888", - "source_file": "C:\\Users\\sladr\\Downloads\\test2.docx", - "success": true, - "technical_count": 10, - "commercial_count": 21, - "deviation_count": 0, - "chapter_count": 6, - "execution_time": 169.6271300315857, - "warnings": [ - "AI审查: 4条优化建议" - ], - "bid_structure": { - "scoring_criteria": [ - { - "item_name": "资质要求", - "max_score": 0.0, - "description": "符合第一章'供应商资格要求'规定", - "category": "compliance", - "chapter_id": "chapter_01_compliance" - }, - { - "item_name": "技术性能指标", - "max_score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定", - "category": "equipment_spec", - "chapter_id": "chapter_02_equipment_spec" - }, - { - "item_name": "响应设备及技术服务和质保服务", - "max_score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定和第五章'合同主要条款'中的实质性要求和条件", - "category": "after_sales", - "chapter_id": "chapter_03_after_sales" - }, - { - "item_name": "技术支持资料", - "max_score": 0.0, - "description": "符合第三章'采购需求及技术要求'规定", - "category": "after_sales", - "chapter_id": "chapter_03_after_sales" - }, - { - "item_name": "质保期", - "max_score": 3.0, - "description": "售后质保期2年,得1分。售后质保期延长至3年,得2分。售后质保期延长至4年,得3分。", - "category": "after_sales", - "chapter_id": "chapter_03_after_sales" - }, - { - "item_name": "硬件配置", - "max_score": 8.0, - "description": "以确保设备性配置不低于招标文件硬件配置要求。打分标准设备硬件的品牌、硬件配置高低、技术先进性、稳定性、兼容性以及售后服务质量等每项指标综合打分。硬件未满足技术要求按每1项不满足扣1分,扣完为止。(招标文件中参数要求提供的检测报告、功能截图、证书等证明材料供应商必须按要求提供,否则评委不予采信)", - "category": "equipment_spec", - "chapter_id": "chapter_02_equipment_spec" - }, - { - "item_name": "软件功能", - "max_score": 8.0, - "description": "应按照磋商文件功能要求实现,各项软件功能完成率,软件功能按每1项不满足扣1分,扣完为止。", - "category": "technical_solution", - "chapter_id": "chapter_04_technical_solution" - }, - { - "item_name": "系统架构", - "max_score": 5.0, - "description": "对系统架构、实施内容、技术特点、安装规范、售后服务等方面进行说明,缺少1项扣1分,扣完为止。", - "category": "technical_solution", - "chapter_id": "chapter_04_technical_solution" - }, - { - "item_name": "网路安全防护", - "max_score": 5.0, - "description": "1.防火墙配置、入侵检测系统、安全更新和补丁管理、用户权限管理、安全培训和意识提升、数据加密根据以上各项内容的打分情况,可以综合评估组织的网络安全防护水平,缺少1项扣1分,扣完为止。", - "category": "quality_safety", - "chapter_id": "chapter_05_quality_safety" - }, - { - "item_name": "技术实力", - "max_score": 3.0, - "description": "投标人具有自主研发的实时视频分析平台系统的知识产权和AI识别方法的发明专利,每提供一个得1分,共3分。(提供证书原件的扫描件并加盖公章)", - "category": "compliance", - "chapter_id": "chapter_01_compliance" - } - ], - "deviation_items": [], - "chapters": [ - { - "id": "evaluation_index", - "title": "评标索引表(技术评分完全对应)", - "level": 1, - "score": null, - "template_placeholder": "{{evaluation_index_content}}", - "children": [] - }, - { - "id": "chapter_01_compliance", - "title": "合规响应 (3.0分)", - "level": 1, - "score": 3.0, - "template_placeholder": "{{chapter_01_compliance_content}}", - "children": [ - { - "id": "chapter_01_compliance_sub_01", - "title": "资质要求", - "level": 2, - "score": 0.0, - "template_placeholder": "{{chapter_01_compliance_sub_01_content}}", - "children": [] - }, - { - "id": "chapter_01_compliance_sub_02", - "title": "技术实力", - "level": 2, - "score": 3.0, - "template_placeholder": "{{chapter_01_compliance_sub_02_content}}", - "children": [ - { - "id": "chapter_01_compliance_sub_02_01", - "title": "技术团队配置与经验", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_01_compliance_sub_02_01_content}}", - "children": [] - }, - { - "id": "chapter_01_compliance_sub_02_02", - "title": "技术方案先进性", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_01_compliance_sub_02_02_content}}", - "children": [] - }, - { - "id": "chapter_01_compliance_sub_02_03", - "title": "技术实施能力", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_01_compliance_sub_02_03_content}}", - "children": [] - }, - { - "id": "chapter_01_compliance_sub_02_04", - "title": "技术保障措施", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_01_compliance_sub_02_04_content}}", - "children": [] - } - ] - } - ] - }, - { - "id": "chapter_02_equipment_spec", - "title": "设备规格 (8.0分)", - "level": 1, - "score": 8.0, - "template_placeholder": "{{chapter_02_equipment_spec_content}}", - "children": [ - { - "id": "chapter_02_equipment_spec_sub_01", - "title": "技术性能指标", - "level": 2, - "score": 0.0, - "template_placeholder": "{{chapter_02_equipment_spec_sub_01_content}}", - "children": [] - }, - { - "id": "chapter_02_equipment_spec_sub_02", - "title": "硬件配置", - "level": 2, - "score": 8.0, - "template_placeholder": "{{chapter_02_equipment_spec_sub_02_content}}", - "children": [ - { - "id": "chapter_02_equipment_spec_sub_02_01", - "title": "核心硬件配置参数", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_02_equipment_spec_sub_02_01_content}}", - "children": [] - }, - { - "id": "chapter_02_equipment_spec_sub_02_02", - "title": "硬件性能指标", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_02_equipment_spec_sub_02_02_content}}", - "children": [] - }, - { - "id": "chapter_02_equipment_spec_sub_02_03", - "title": "硬件兼容性与扩展性", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_02_equipment_spec_sub_02_03_content}}", - "children": [] - }, - { - "id": "chapter_02_equipment_spec_sub_02_04", - "title": "硬件质量保证", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_02_equipment_spec_sub_02_04_content}}", - "children": [] - } - ] - } - ] - }, - { - "id": "chapter_03_after_sales", - "title": "售后服务 (3.0分)", - "level": 1, - "score": 3.0, - "template_placeholder": "{{chapter_03_after_sales_content}}", - "children": [ - { - "id": "chapter_03_after_sales_sub_01", - "title": "响应设备及技术服务和质保服务", - "level": 2, - "score": 0.0, - "template_placeholder": "{{chapter_03_after_sales_sub_01_content}}", - "children": [] - }, - { - "id": "chapter_03_after_sales_sub_02", - "title": "技术支持资料", - "level": 2, - "score": 0.0, - "template_placeholder": "{{chapter_03_after_sales_sub_02_content}}", - "children": [] - }, - { - "id": "chapter_03_after_sales_sub_03", - "title": "质保期", - "level": 2, - "score": 3.0, - "template_placeholder": "{{chapter_03_after_sales_sub_03_content}}", - "children": [ - { - "id": "chapter_03_after_sales_sub_03_01", - "title": "质保期限承诺", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_03_after_sales_sub_03_01_content}}", - "children": [] - }, - { - "id": "chapter_03_after_sales_sub_03_02", - "title": "质保服务内容", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_03_after_sales_sub_03_02_content}}", - "children": [] - }, - { - "id": "chapter_03_after_sales_sub_03_03", - "title": "质保响应机制", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_03_after_sales_sub_03_03_content}}", - "children": [] - }, - { - "id": "chapter_03_after_sales_sub_03_04", - "title": "质保期满后服务方案", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_03_after_sales_sub_03_04_content}}", - "children": [] - } - ] - } - ] - }, - { - "id": "chapter_04_technical_solution", - "title": "技术方案 (13.0分)", - "level": 1, - "score": 13.0, - "template_placeholder": "{{chapter_04_technical_solution_content}}", - "children": [ - { - "id": "chapter_04_technical_solution_sub_01", - "title": "软件功能设计", - "level": 2, - "score": 8.0, - "template_placeholder": "{{chapter_04_technical_solution_sub_01_content}}", - "children": [ - { - "id": "chapter_04_technical_solution_sub_01_01", - "title": "核心功能模块设计", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_01_01_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_01_02", - "title": "业务流程实现方案", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_01_02_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_01_03", - "title": "用户界面与交互设计", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_01_03_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_01_04", - "title": "功能扩展与维护机制", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_01_04_content}}", - "children": [] - } - ] - }, - { - "id": "chapter_04_technical_solution_sub_02", - "title": "系统架构设计", - "level": 2, - "score": 5.0, - "template_placeholder": "{{chapter_04_technical_solution_sub_02_content}}", - "children": [ - { - "id": "chapter_04_technical_solution_sub_02_01", - "title": "总体架构设计", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_02_01_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_02_02", - "title": "技术选型与平台架构", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_02_02_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_02_03", - "title": "数据架构与存储设计", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_02_03_content}}", - "children": [] - }, - { - "id": "chapter_04_technical_solution_sub_02_04", - "title": "安全架构与防护机制", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_04_technical_solution_sub_02_04_content}}", - "children": [] - } - ] - } - ] - }, - { - "id": "chapter_05_quality_safety", - "title": "质量安全 (5.0分)", - "level": 1, - "score": 5.0, - "template_placeholder": "{{chapter_05_quality_safety_content}}", - "children": [ - { - "id": "chapter_05_quality_safety_sub_01", - "title": "网络安全防护体系", - "level": 2, - "score": 5.0, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_content}}", - "children": [ - { - "id": "chapter_05_quality_safety_sub_01_01", - "title": "网络边界安全防护", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_01_content}}", - "children": [] - }, - { - "id": "chapter_05_quality_safety_sub_01_02", - "title": "入侵检测与防御系统", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_02_content}}", - "children": [] - }, - { - "id": "chapter_05_quality_safety_sub_01_03", - "title": "网络安全审计与监控", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_03_content}}", - "children": [] - }, - { - "id": "chapter_05_quality_safety_sub_01_04", - "title": "网络安全应急响应机制", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_04_content}}", - "children": [] - }, - { - "id": "chapter_05_quality_safety_sub_01_05", - "title": "网络安全管理制度", - "level": 3, - "score": null, - "template_placeholder": "{{chapter_05_quality_safety_sub_01_05_content}}", - "children": [] - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/src/bidmaster/agents/base.py b/src/bidmaster/agents/base.py index 0f91597..cab7124 100644 --- a/src/bidmaster/agents/base.py +++ b/src/bidmaster/agents/base.py @@ -317,4 +317,15 @@ class BaseAgentFactory: """ from .interaction import InteractionHandler, InteractionMode handler = InteractionHandler(mode=InteractionMode.PROGRAMMATIC, presets=presets) + return cls(handler) + + @classmethod + def create_interactive(cls): + """创建交互模式的Agent(使用交互式输入) + + Returns: + 交互模式的Agent实例 + """ + from .interaction import InteractionHandler, InteractionMode + handler = InteractionHandler(mode=InteractionMode.INTERACTIVE) return cls(handler) \ No newline at end of file diff --git a/src/bidmaster/agents/interaction.py b/src/bidmaster/agents/interaction.py index 05835bb..c057c8e 100644 --- a/src/bidmaster/agents/interaction.py +++ b/src/bidmaster/agents/interaction.py @@ -235,6 +235,8 @@ class InteractionHandler: 确认结果 """ try: + # 在提示前添加分隔线,让交互更明显 + self.console.print("\n" + "="*50, style="dim") return click.confirm(prompt, default=default) except (click.Abort, KeyboardInterrupt): if default is not None: diff --git a/src/bidmaster/cli/project.py b/src/bidmaster/cli/project.py index 5384245..1bc78e8 100644 --- a/src/bidmaster/cli/project.py +++ b/src/bidmaster/cli/project.py @@ -191,12 +191,13 @@ def new(mode: str, presets: str): console.print("❌ 预设配置JSON格式错误", style="red") return else: # interactive - analysis_agent = AnalysisAgent() + analysis_agent = AnalysisAgent.create_interactive() console.print("📌 使用交互模式", style="dim") # 执行完整的分析流程(包括目录生成) - with console.status("正在分析招标文件并生成目录结构..."): - result = analysis_agent.execute_sync(bidding_file) + console.print("📊 开始分析招标文件并生成目录结构...", style="blue") + console.print("💡 提示:过程中可能需要您的确认和选择", style="yellow") + result = analysis_agent.execute_sync(bidding_file) if not result.success: console.print(f"❌ 分析失败: {result.error_message}", style="red") @@ -451,8 +452,8 @@ def smart_parse(word_file: str): analysis_agent = AnalysisAgent.create_silent() # 智能解析单个Word文档 - with console.status("正在智能识别和解析表格..."): - result = analysis_agent.execute_sync(word_file) + console.print("📊 开始智能识别和解析表格...", style="blue") + result = analysis_agent.execute_sync(word_file) if not result.success: console.print(f"❌ 分析失败: {result.error_message}", style="red")