feat: add project save/load with .wheel files and auto-save thread

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-02 22:53:59 +00:00
parent bee7f6d22b
commit 1487619cc2
7 changed files with 778 additions and 11 deletions

21
fs.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef FS_H
#define FS_H
#include "dispatcher.h"
// Initialize the auto-save thread
void fs_init(AppState *state);
// Cleanup the auto-save thread
void fs_cleanup(void);
// Trigger an auto-save (thread-safe, non-blocking)
void fs_trigger_autosave(void);
// Save project to .wheel file (called from dispatcher thread)
int fs_save_project(const char *filename, AppState *state);
// Load project from .wheel file (called from dispatcher thread)
int fs_load_project(const char *filename, AppState *state);
#endif // FS_H