Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a local filesystem #1506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rusher2004
Copy link

This pull request includes significant changes to the Docker setup, the file system adapter, and various components to improve functionality and error handling. The most important changes include modifying the Dockerfile to streamline dependency installation, introducing a new DockerWebContainer class, enhancing the FileSystemAdapter with robust methods, and updating several components to handle errors more gracefully.

Docker and File System Changes:

  • Dockerfile: Simplified the dependency installation process by removing unnecessary steps and ensuring pnpm is installed and used correctly.
  • app/adapters/docker-adapter.ts: Introduced a new DockerWebContainer class to manage file system operations within a Docker container, including a proxy for fs methods and a boot method to ensure a valid workspace path.
  • app/adapters/filesystem-adapter.ts: Added a FileSystemAdapter class with methods for creating directories, handling errors, and sanitizing paths.

Component Enhancements:

Other Notable Changes:

  • app/entry.client.tsx: Introduced a custom provider to ensure consistent React context and added error handling for hydration.
  • app/hooks/useShortcuts.ts: Added a safeUseShortcuts function to provide a safer fallback if called outside of a React component context.
  • app/lib/.server/llm/constants.ts: Updated the maximum tokens constant and refined ignore patterns for better file handling. [1] [2]
  • app/lib/fs-adapter/index.ts: Enhanced the FileSystemAdapter with comprehensive methods for file operations, including reading, writing, creating directories, and watching paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant