feat: Add auto-snapshot feature with git commit every N words
- Add new module src/app/auto_snapshot.rs for auto-snapshot functionality - Add configuration options: auto_snapshot_enabled (default: false) and auto_snapshot_threshold (default: 250 words) - Automatically create git commits when word count crosses threshold boundaries - Add 'Edit -> Snapshots' menu option to open snapshots window - Snapshots window shows: enable/disable toggle, threshold setting, current word count, next snapshot target, list of all snapshots with rollback buttons - Manual snapshot creation via button in snapshots window - Rollback to any previous snapshot with one click - Snapshot info includes: word count, timestamp, commit message, commit hash - Make run_git in gitsync.rs public for use by auto_snapshot module - Update README.md with Auto-Snapshots documentation Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -325,6 +325,10 @@ impl App {
|
||||
ui.close_menu();
|
||||
self.open_story_bible_editor();
|
||||
}
|
||||
if ui.button("📸 Snapshots…").clicked() {
|
||||
ui.close_menu();
|
||||
self.show_snapshots = true;
|
||||
}
|
||||
});
|
||||
ui.menu_button("Tools", |ui| {
|
||||
if ui.button("☑ Outline…").clicked() {
|
||||
@@ -581,6 +585,9 @@ impl App {
|
||||
} else {
|
||||
self.editor(ui);
|
||||
}
|
||||
|
||||
// Check for auto-snapshot after editor updates
|
||||
self.check_auto_snapshot();
|
||||
}
|
||||
None => {
|
||||
ui.centered_and_justified(|ui| {
|
||||
|
||||
Reference in New Issue
Block a user