feat: AI assistant panel, editor improvements, vite and package config

This commit is contained in:
2026-06-15 10:24:27 +08:00
parent 80b361813e
commit 33357650c7
10 changed files with 721 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import { useEditorStore } from './stores/editorStore'
import SceneGraph from './components/SceneGraph.vue'
import NodeEditor from './components/NodeEditor.vue'
import PreviewPanel from './components/PreviewPanel.vue'
import AIPanel from './components/AIPanel.vue'
const store = useEditorStore()
const editor = useGraphEditor()
@@ -111,6 +112,9 @@ onMounted(() => restoreOrLoad())
<button @click="showPreview = !showPreview" :class="{ secondary: true, active: showPreview }">
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
</button>
<button @click="store.showAIPanel = !store.showAIPanel" :class="{ secondary: true, active: store.showAIPanel }">
🤖 AI
</button>
</div>
</div>
@@ -139,6 +143,7 @@ onMounted(() => restoreOrLoad())
@delete-scene="delNode"
@close="store.selectedNodeId = null"
/>
<AIPanel v-if="store.showAIPanel" />
</div>
<input ref="fileInputRef" type="file" accept=".json" style="display:none" @change="onFileSelected" />