feat: collapsible AI panel with overlay layout

This commit is contained in:
2026-06-16 16:34:58 +08:00
parent f14390a69c
commit 897522ed5a
3 changed files with 178 additions and 110 deletions

View File

@@ -26,6 +26,7 @@ export const useEditorStore = defineStore('editor', () => {
const sourcePath = ref('/scenes/demo.json')
const deepseekKey = ref(localStorage.getItem('deepseek_key') || '')
const showAIPanel = ref(false)
const aiCollapsed = ref(true)
const aiSessionId = ref('')
const aiChanges = ref<AIDiff | null>(null)
const versions = ref<EditorVersion[]>([])
@@ -234,7 +235,7 @@ export const useEditorStore = defineStore('editor', () => {
return {
gameData, selectedNodeId, selectedScene, startSceneId, dirty, sourcePath,
deepseekKey, showAIPanel, aiSessionId, aiChanges, versions,
deepseekKey, showAIPanel, aiSessionId, aiCollapsed, aiChanges, versions,
markDirty, loadJSON, exportJSON, addScene, deleteScene,
updateScene, addChoice, updateChoice, deleteChoice, generateId,
setSourcePath, setDeepseekKey, setAISessionId, clearAISession, autoSave, reloadFromDisk,