Local File Sync is a powerful feature that allows you to synchronize your Assembly context files with your local filesystem. This guide will walk you through setting up and using Local File Sync to streamline your development workflow.

Understanding Local File Sync

Local File Sync creates a direct connection between your local workspace and Assembly, offering several benefits:

  • Automatic synchronization of context files with your local Git repository
  • Real-time updates of context as you edit files locally
  • Ability to save generated fragments directly to your local filesystem
  • Diff viewing capabilities for comparing changes

Setting Up Local File Sync

1

Access Context Panel

In your Assembly session, navigate to the context panel.

2

Initiate Local Sync

Look for the “Add Local Repository” or similar option to begin the setup process.

3

Select Local Directory

Choose the directory on your local machine that contains your Git repository. Ensure this directory has a .git file.

4

Confirm Mapping

Assembly will automatically detect and map your context files to the corresponding files in your local repository.

Local File Sync uses the File Systems Access API to enable continuous synchronization. Ensure your browser supports this API for the best experience.

Using Local File Sync

Syncing Context Files

Once set up, Local File Sync will automatically keep your context files up-to-date with your local changes:

  • Edit a file locally, and the changes will be reflected in your Assembly context
  • Assembly will use the most recent version of your files, even as you chat and work on your project

Saving Fragments to Local Files

1

Generate a Fragment

Use Assembly to generate or modify code within a fragment.

2

Save to Local

Look for the “Save to Local” option at the footer of the fragment interface.

3

Review Changes

Use the diff viewer to compare the changes between the fragment and your local file.

4

Confirm Save

If satisfied with the changes, confirm to save the fragment directly to your local filesystem.

Using the Diff Viewer

The diff viewer allows you to compare changes before saving:

  • View differences between the current fragment and the local file
  • Compare changes across multiple fragments
  • Make informed decisions about which changes to apply

Best Practices

  1. Regular Commits: Commit your local changes regularly to maintain a clear history and avoid conflicts.
  2. Use Branches: When working on significant changes, consider using feature branches to keep your main branch stable.
  3. Review Diffs Carefully: Always review the diff viewer before saving fragments to ensure you’re not overwriting important local changes.

Troubleshooting