Refactor ServeSession to support oneshot sessions

- Updated the ServeSession struct to allow for optional ChangeProcessor and related fields, enabling lightweight oneshot sessions that do not require live filesystem monitoring.
- Modified the new and new_oneshot methods to initialize sessions accordingly, improving flexibility for commands that only need a snapshot of the tree.
- Adjusted related CLI commands to utilize the new oneshot session functionality, enhancing performance for operations like plugin installation and syncback.

These changes streamline session management and improve the efficiency of operations that do not require continuous updates.
This commit is contained in:
Joe 2026-02-15 14:43:19 -06:00
parent 431b1fb5a5
commit 484b190464
4 changed files with 81 additions and 33 deletions

View file

@ -55,7 +55,7 @@ fn initialize_plugin() -> anyhow::Result<ServeSession> {
in_memory_fs.load_snapshot("/plugin", plugin_snapshot)?;
let vfs = Vfs::new(in_memory_fs);
Ok(ServeSession::new(vfs, "/plugin", None)?)
Ok(ServeSession::new_oneshot(vfs, "/plugin")?)
}
fn install_plugin() -> anyhow::Result<()> {