feat: AI assistant panel, editor improvements, vite and package config
This commit is contained in:
@@ -51,10 +51,24 @@
|
||||
- [x] `@blur` → JSON.parse → `store.updateScene(id, parsed)`
|
||||
- [x] 解析失败 → 红色边框 + 错误提示
|
||||
|
||||
## E17: AI 编码助手 — opencode + DeepSeek 集成
|
||||
|
||||
目标:编辑器内嵌 AI 对话面板。JSON 模式填充 textarea 供用户审查后接受;代码模式直接修改 Vue 组件/CSS,Vite HMR 实时预览。
|
||||
|
||||
详见 [E17_AI_ASSISTANT_PROPOSAL.md](../E17_AI_ASSISTANT_PROPOSAL.md)
|
||||
|
||||
- [x] `vite.config.ts` — `POST /api/ai` 中间件(spawn opencode)
|
||||
- [x] `editor/composables/useAI.ts` — DeepSeek API 调用封装
|
||||
- [x] `editor/components/AIPanel.vue` — AI 对话面板
|
||||
- [x] `editor/components/NodeEditor.vue` — `aiResult` prop + [接受]/[撤销]
|
||||
- [x] `editor/stores/editorStore.ts` — `deepseekKey` + `showAIPanel` + `aiResult`
|
||||
- [x] `editor/App.vue` — "AI 助手" 按钮 + API Key 设置
|
||||
|
||||
**优先级建议:**
|
||||
|
||||
| 优先级 | 编号 | 说明 |
|
||||
|:--:|------|------|
|
||||
| **P0** | E17 | AI 编码助手 — DeepSeek 集成 ✅ 核心已完成 |
|
||||
| **P0** | E16 | JSON 编辑器 ✅ 已完成 |
|
||||
| **P0** | E10 | 内嵌快速测试 |
|
||||
| **P1** | E12 | JSON 校验 |
|
||||
|
||||
Reference in New Issue
Block a user