Commit da789bb
committed
refactor(ui): 重组 composables 目录结构并优化模式功能
**目录结构重构**:
- 将 41 个 composables 文件按功能分类到 10 个子目录
- model/ - 模型管理相关(5个文件)
- prompt/ - 提示词相关(6个文件)
- context/ - 上下文相关(2个文件)
- image/ - 图像相关(2个文件)
- ui/ - UI交互相关(11个文件)
- accessibility/ - 无障碍相关(3个文件)
- performance/ - 性能优化相关(4个文件)
- storage/ - 存储相关(3个文件)
- system/ - 系统相关(2个文件)
- mode/ - 功能模式相关(4个文件)
**技术实现**:
- 使用 git mv 保留文件历史
- 为每个子目录创建 barrel export (index.ts)
- 更新 120+ 处导入路径引用
- 修复测试文件中的导入路径
**功能优化**:
- 新增 useCurrentMode composable 提供只读模式访问
- 基础模式下隐藏变量相关UI组件
- 优化 TestAreaPanel 根据功能模式动态显示变量表单
**影响范围**:
- 移动文件:41个 composables
- 新增文件:10个 index.ts
- 更新导入:120+ 处导入路径
- 测试修复:3个测试文件路径更新1 parent 8de8a84 commit da789bb
File tree
90 files changed
+327
-146
lines changed- packages/ui
- src
- components
- context-mode
- image-mode
- variable
- composables
- accessibility
- context
- image
- model
- mode
- performance
- prompt
- storage
- system
- ui
- plugins
- utils
- tests/unit
- composables
- image
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
90 files changed
+327
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
0 commit comments