Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major refactor and modularization of the simulation state management system. The simulation store has been split into focused modules for data, file loading, frame handling, perception, and timeline management. The new structure separates non-reactive data from Svelte stores, adds robust file and URL loading with progress tracking, and introduces a clear API for interacting with simulation state. Additionally, the perception system has been improved for reconstructing agent-specific worldviews, and the sevenzip extraction logic has been moved and cleaned up for better maintainability.
Simulation state management and modularization:
src/lib/stores/simulation/data.tsto hold all non-reactive simulation data in a single mutable object, allowing safe resets and updates across modules.file.ts,frame.ts,perception.ts,timeline.ts,reset.ts), each handling a distinct aspect of simulation state, and provided a unified public API viaindex.ts. [1] [2] [3] [4]File and URL loading improvements:
file.ts, including progress tracking for download, extraction, and parsing, as well as error handling and support for both direct and proxied fetches.Perception and agent worldview reconstruction:
Simulation log frame handling and timeline management:
config,initialCondition,command,perception,update) inframe.ts, updating both non-reactive data and Svelte stores as appropriate.Sevenzip extraction code reorganization:
This refactor greatly improves code maintainability, scalability, and clarity, while providing a more robust and featureful simulation state management system.