 }
    }

    // Git Repository Wrapper
    class GitZipRepository {
      constructor(zipBlob = null) {
        this.fs = new ZipFsAdapter(zipBlob)
      }

      async init() {
        await this.fs.ready
        // Always initialize git - this ensures proper .git structure
        await git.init({
          fs: this.fs,
          dir: '/',
          defaultBranch: 'main'
        })
      }

      async add(filepath) {
        // Ensure the index is initialized before adding
        await git.init({ fs: t