context menu for file tree

This commit is contained in:
2026-02-26 10:40:38 +10:00
parent ee09163a7d
commit 13f5386420
8 changed files with 410 additions and 41 deletions

View File

@@ -48,6 +48,9 @@ interface EditorState {
// File tree reordering
moveNode: (dirPath: string, fromIdx: number, toIdx: number) => void
// Clear active file (e.g. after deletion)
clearActiveFile: () => void
// Word counts
projectWordCount: number
setProjectWordCount: (count: number) => void
@@ -115,6 +118,8 @@ export const useEditorStore = create<EditorState>((set, get) => ({
})
},
clearActiveFile: () => set({ activeFilePath: null, activeFileContent: '', isDirty: false }),
activeFilePath: null,
activeFileContent: '',
isDirty: false,