Commit eeed994
!120 merge qt-migrate into main
feat(qt-migrate)QT工程迁移鸿蒙功能
Created-by: themoonlzs
Commit-by: lzs
Merged-by: SWangHash
Description: ## Summary
新增 Qt 工程迁移到 HarmonyOS/OpenHarmony 的垂直能力:
- 新增 `QtMigration` 专家模式(QT Migration Expert),并内置 `ohos-qt-skills` 领域知识技能作为唯一事实源;
- 后端对用户请求做完整的 Qt→HarmonyOS 迁移意图识别,只有同时满足 Qt 语境、迁移动作、鸿蒙目标才进入迁移流程;
- 引入会话级 intake 状态机,约束四项最小输入(原始工程 / 输出工程 / 工具链 / 模板工程)必须绑定后才放行迁移副作用;
- 新增后端模板化的路径收集问题卡片,候选路径由后端探测、过滤、排序,模型无法改写问题内容;
- 增加统一工具执行边界的副作用门禁:输入未完备或技能未加载时拒绝迁移类工具,普通会话零开销。
Fixes #
## Type and Areas
Type:
Feature
Areas:
- Rust core(agent-runtime、assembly/core)
- web UI
- 内置技能资源(assembly/core/builtin_skills)
- 测试(Rust 契约测试 + 前端组件测试)
## Motivation / Impact
- 提供开箱即用的 Qt→HarmonyOS 迁移能力,模型不再自创迁移流程,关键规则由后端固定拥有;
- 迁移前强制确认四项输入,避免在输入缺失时误执行写文件、构建、部署等迁移副作用;
- 迁移领域知识以内置技能为准一来源,不混入代码或提示词;
- 对用户可见的变化:新增 QT 迁移专家模式、迁移前的路径确认问题卡片、卡片路径选项自动探测与校验。
## Verification
- `cargo check -p bitfun-core --no-default-features --features product-full`
- `cargo check -p bitfun-desktop`
- `pnpm run type-check:web`
- `pnpm --dir src/web-ui run test:run src/flow_chat/tool-cards/AskUserQuestionCard.test.tsx`
- `pnpm run fmt:rs`
- Rust 契约/单元测试覆盖:intake 状态机、问题模板、候选探测(qt_migration_candidates)
说明:OHOS 交叉编译与 HAP 打包在 WSL 环境单独验证,不属于本 MR 的构建链范围。
## Reviewer Notes
- 副作用门禁挂在统一工具执行边界(`qt_migration_gate`),仅在 QtMigration 会话且 intake 已激活时生效;
- intake 快照带 schema 版本,保持旧数据可反序列化;
- 远程工作区场景跳过本地路径存在性校验,路径正确性交由模型与技能侧判断;
- 内置 `ohos-qt-skills` 为领域知识文件,非业务代码。
## Checklist
- [ ] This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
- [ ] Relevant verification is recorded above, or skipped checks are explained.
- [ ] User-facing strings, docs, and locales are updated where applicable.
See merge request: OpenHarmonyPCDeveloper/BitFun!120215 files changed
Lines changed: 31444 additions & 116 deletions
File tree
- src
- apps/desktop/src/api
- crates
- assembly
- agent-content
- prompts/agents
- tests
- core
- builtin_skills/ohos-qt-skills
- _index
- episodic
- postmortems
- ohos-common-kb-public
- problems
- procedural
- semantic
- preference
- problems
- procedural
- semantic
- skills/kb-init
- references
- scripts
- src
- agentic
- agents
- definitions/modes
- registry
- coordination
- execution
- memories
- session
- tools
- implementations
- pipeline
- product_runtime
- infrastructure/app_paths
- service/session_usage
- execution/agent-runtime
- src
- skills
- tests
- agent_definition_contracts
- agent_interaction_contracts
- interfaces/acp/src/runtime
- services/services-core
- src/session
- tests/session_contracts
- web-ui/src
- app/scenes/agents
- components
- flow_chat
- components
- modern
- services
- flow-chat-manager
- store
- tool-cards
- types
- infrastructure
- api/service-api
- appearance/registry
- locales
- en-US
- scenes
- zh-CN
- scenes
- zh-TW
- scenes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4483 | 4483 | | |
4484 | 4484 | | |
4485 | 4485 | | |
| 4486 | + | |
4486 | 4487 | | |
4487 | 4488 | | |
4488 | 4489 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
Lines changed: 129 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 136 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
0 commit comments