The Problem
You work on two projects:Project A (a Go API) and Project B (a React frontend). One moment you are debugging a bug in the API; the next, you need to implement a new feature in the frontend. Keeping the conversation history and file context separate for each is a challenge.
Ingredients
- Two or more project directories on your machine.
The Workflow
The strategy is to create a Context for each project’s codebase and a Session for each task’s conversation history.Create Persistent Contexts for Each Project
First, let’s create “snapshots” of the codebases. We will do this once for each project.Navigate to the Now, navigate to the
Project A folder:Project B folder:What did we do? We created two persistent contexts. Now, ChatCLI “knows” the structure of these two projects and we can refer to them by name (
project-a-api, project-b-frontend) at any time, from anywhere on your system.Start Working on Project A
Let’s begin debugging the bug in the API.
-
Load (or create) a conversation session:
(If the session does not exist, it will be created when you save.)
-
Attach the project context:
Switch to Project B
Your lead asks you to pause the debug and work on a new feature in the frontend.
-
Save the current session: All your debug history will be preserved.
-
Detach the old context:
-
Load the session and context for Project B:
Project B’s code as context.