This commit is contained in:
2025-11-14 01:53:18 +01:00
parent e7ffcda096
commit 8941ee13bc
29 changed files with 3752 additions and 122 deletions

View File

@ -6,6 +6,7 @@ import { ExecutionContext } from '../csound/execution-context';
import { createEditorSettingsStore } from '../stores/editorSettings';
import { EditorState } from '../stores/editorState.svelte';
import { UIState } from '../stores/uiState.svelte';
import { getCsoundVersion } from '../utils/preferences';
import type { CsoundStore } from '../csound/store';
import type { EditorSettingsStore } from '../stores/editorSettings';
@ -23,7 +24,15 @@ const APP_CONTEXT_KEY = Symbol('app-context');
export function createAppContext(): AppContext {
const db = new FileDatabase();
const fileManager = new FileManager(db);
const csound = createCsoundStore();
const csound = createCsoundStore({
getProjectFiles: async () => {
const result = await fileManager.getAllFiles();
return result.success ? result.data : [];
},
useCsound7: getCsoundVersion()
});
const executionContext = new ExecutionContext(csound);
return {