feat: Implement terminal panel for command execution and monitoring

- Added TerminalPanel component with navigation and main area for terminal interactions.
- Integrated terminal session management with CLI execution output display.
- Enhanced SolutionDrawer to open terminal panel on command execution.
- Updated localization files for terminal panel strings in English and Chinese.
- Introduced hooks for terminal panel state management.
- Created JSON schemas for plan overview and fix plan types.
This commit is contained in:
catlog22
2026-02-13 00:22:16 +08:00
parent ddbe12b7af
commit a77c965e89
17 changed files with 744 additions and 254 deletions

View File

@@ -123,6 +123,10 @@
"items": { "type": "string" },
"description": "修改描述列表"
},
"change": {
"type": "string",
"description": "单条变更描述 (精确修改说明,合并自 modification_points.change)"
},
"conflict_risk": {
"type": "string",
"enum": ["low", "medium", "high"],
@@ -163,6 +167,16 @@
"minimum": 0,
"maximum": 100,
"description": "覆盖率目标 (%)"
},
"manual_checks": {
"type": "array",
"items": { "type": "string" },
"description": "手动验证步骤 (合并自 verification_detail)"
},
"success_metrics": {
"type": "array",
"items": { "type": "string" },
"description": "量化成功指标 (如 '响应时间 <200ms', '覆盖率 >80%',合并自 verification_detail)"
}
},
"additionalProperties": false,
@@ -174,6 +188,132 @@
"description": "回归检查点"
},
"_comment_PLANNING": "PLANNING 区块 (可选) — 规划详情 (reference + rationale + risks + code_skeleton)",
"reference": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "参考模式名称"
},
"files": {
"type": "array",
"items": { "type": "string" },
"description": "参考文件路径"
},
"examples": {
"type": "string",
"description": "参考指南或示例"
}
},
"additionalProperties": false,
"description": "参考实现资料"
},
"rationale": {
"type": "object",
"properties": {
"chosen_approach": {
"type": "string",
"description": "选定方案及原因"
},
"alternatives_considered": {
"type": "array",
"items": { "type": "string" },
"description": "被考虑但未选择的替代方案"
},
"decision_factors": {
"type": "array",
"items": { "type": "string" },
"description": "影响决策的关键因素 (性能、可维护性、成本等)"
},
"tradeoffs": {
"type": "string",
"description": "选定方案的已知权衡"
}
},
"additionalProperties": false,
"description": "设计决策原因 (Medium/High complexity 时使用)"
},
"risks": {
"type": "array",
"items": {
"type": "object",
"required": ["description", "probability", "impact", "mitigation"],
"properties": {
"description": {
"type": "string",
"description": "风险描述"
},
"probability": {
"type": "string",
"enum": ["Low", "Medium", "High"],
"description": "发生概率"
},
"impact": {
"type": "string",
"enum": ["Low", "Medium", "High"],
"description": "影响程度"
},
"mitigation": {
"type": "string",
"description": "缓解策略"
},
"fallback": {
"type": "string",
"description": "缓解失败时的替代方案"
}
},
"additionalProperties": false
},
"description": "结构化风险评估"
},
"code_skeleton": {
"type": "object",
"properties": {
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"definition": { "type": "string" },
"purpose": { "type": "string" }
}
},
"description": "关键接口/类型定义"
},
"key_functions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signature": { "type": "string" },
"purpose": { "type": "string" },
"returns": { "type": "string" }
}
},
"description": "关键函数签名"
},
"classes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"purpose": { "type": "string" },
"methods": {
"type": "array",
"items": { "type": "string" }
}
}
},
"description": "关键类结构"
}
},
"additionalProperties": false,
"description": "代码骨架 (High complexity 时使用)"
},
"_comment_EXECUTION": "EXECUTION 区块 (可选) — 执行策略",
"meta": {
"type": "object",
@@ -268,11 +408,6 @@
"type": "array",
"description": "支撑证据"
},
"risk_items": {
"type": "array",
"items": { "type": "string" },
"description": "风险项"
},
"inputs": {
"type": "array",
"items": { "type": "string" },
@@ -356,7 +491,8 @@
"_field_usage_by_producer": {
"workflow-plan": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + FILES + EXECUTION(meta+cli_execution) + CONTEXT(context_package_path)",
"lite-plan": "IDENTITY + CLASSIFICATION + DEPENDENCIES + CONVERGENCE + FILES",
"req-plan": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + CONTEXT(inputs/outputs/risk_items)",
"lite-plan (v2)": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + FILES(+change) + IMPLEMENTATION(+manual_checks +success_metrics) + PLANNING(reference + rationale + risks + code_skeleton)",
"req-plan": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + PLANNING(risks) + CONTEXT(inputs/outputs)",
"collaborative-plan": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + FILES + CONTEXT(source)",
"issue-resolve": "IDENTITY + CLASSIFICATION + SCOPE + DEPENDENCIES + CONVERGENCE + FILES(with target) + IMPLEMENTATION + CONTEXT(commit/source)",
"review-cycle": "IDENTITY + CLASSIFICATION + FILES + CONVERGENCE + IMPLEMENTATION + CONTEXT(source/evidence)",