-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Description
Currently, Forge saves conversations using workspace_id calculated from the current working directory (cwd) of the environment. This means that running Forge commands in subdirectories of a project saves conversations separately, fragmenting conversation history across the project’s folder structure. Conversation history is not unified for the entire project repository.
Current Behavior
- workspace_id is derived from the current working directory.
- Conversations started in subdirectories are stored separately and isolated.
- No visibility of conversations across the main project or other subdirectories.
Proposed Changes
- Change workspace_id calculation to point to the main repository root folder containing the .git directory.
- Ensure that navigating and running Forge in any subdirectory under the main project retrieves conversation history relevant to the entire project repository.
- Make workspace_id resolution configurable with markers like
.git,.envrc, or other custom markers similar to the approach used in zsh-per-project-history, where the project root is discovered via configurable tags. - Add details about the workspace_id resolution logic and active configuration markers to the
/infoand/envcommands. - Provide a new CLI command to inspect how workspace_id is determined for the current environment and project.
Benefits
- Unified conversation history for entire project repositories regardless of the subdirectory where Forge is run.
- Improved developer experience by having a consistent workspace context.
- Flexibility to adapt workspace detection to various project structures or user preferences.
Additional Context
The approach is inspired by plugins like zsh-per-project-history which dynamically detect project roots based on configurable markers to maintain a per-project history. This improves multi-directory workflows within single repositories.
Metadata
Metadata
Assignees
Labels
No labels