You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note:** Simple questions (e.g. "explain this code") may return a direct answer without generating a multi-step plan. This is expected — the planner activates for tasks that require file changes or multi-step execution.
173
+
174
+
### Code generation and Apply Patch
175
+
176
+
When you ask GitPilot to create or edit files, the response includes structured `edits` — not just text. The **Apply Patch** button writes them directly to your workspace.
177
+
178
+
```
179
+
You: "Create a Flask app with app.py, requirements.txt, and README.md"
- The LLM is instructed to output code blocks with the filename on the fence line (` ```python hello.py`)
193
+
- The backend parses these blocks into `ProposedEdit` objects with file path, kind, and content
194
+
- All paths are sanitized (rejects `../` traversal, absolute paths, drive letters)
195
+
- The extension stores edits in `activeTask.edits` and shows Apply / Revert
196
+
-`PatchApplier` writes files via `vscode.workspace.fs.writeFile`
197
+
- After apply, project context refreshes and the first file opens
198
+
199
+
> **Note:** For folder-only sessions (no GitHub remote), code generation uses the LLM directly with structured output instructions. For GitHub-connected sessions, the full CrewAI multi-agent pipeline (Explorer → Planner → Coder → Reviewer) handles planning and execution.
125
200
126
201
### Supported AI Providers
127
202
@@ -165,7 +240,7 @@ GitPilot uses a multi-agent system powered by CrewAI:
165
240
3.**Executor** writes code and runs tests, self-correcting on failure
166
241
4.**Reviewer** validates the output and summarises what changed
167
242
168
-
You approve every change before it's applied.
243
+
In **Ask** mode (default), you approve every change before it's applied. In **Auto** mode, tools execute without prompts. In **Plan** mode, only the plan is generated — no files are touched.
0 commit comments