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
**Update VS Code extension development guide with AI usage and limitations**
- Revise Git branch naming conventions and AI-generated file management
- Add AI as a judge for diff validation and test visx in codespace
- Update context window visibility, rate limits, and system prompt design
- Adjust CI considerations and conclusion for GitHub Copilot's agent mode
Copy file name to clipboardExpand all lines: content/en/blog/developing-a-vs-code-extension-with-github-copilot-agent-mode-and-claude-4-sonnet-may-2025.md
+10-15Lines changed: 10 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ To enable Claude 4 Sonnet:
66
66
67
67
### 1. Git Branch Naming
68
68
69
-
By default, the cloned repository uses `master` as the main branch. To align with modern conventions:
69
+
By default (claude sonnet-4 prompt without details about the branch name), the cloned repository uses `master` as the main branch. To align with modern conventions:
70
70
71
71
```bash
72
72
git branch -m master main
@@ -81,47 +81,42 @@ Claude 4 Sonnet tends to generate `.md` files for various outputs, which can clu
81
81
* Implement a cleanup script that removes outdated `.md` files not matching the current codebase.
82
82
* Run this script as part of your build or deployment process to maintain a clean workspace.
83
83
84
-
### 3. Managing Large Diffs
85
-
86
-
When applying diffs suggested by AI models:
87
-
88
-
***Reliable Diff Application**: Writing changes to files and applying diffs works reliably with minimal issues in this setup. Performance is generally stable and fast, especially when files are properly split into smaller modules rather than large monolithic ones.
89
-
***Split Large Files**: Break down large files into smaller modules to prevent timeouts or memory issues.
90
-
***Incremental Application**: Apply diffs incrementally across modules to ensure stability and reduce errors.
91
-
92
-
## AI as a Judge (Diff Validation)
84
+
## AI as a Judge / Additional AI usage
93
85
94
86
To assess the quality of AI-generated changes:
95
87
96
88
***Use Roo Code**: Utilize [Roo Code](https://docs.roocode.com/features/custom-modes) in its **chat interface**, paired with a custom mode configuration and Gemini 2.5 Pro/Flash as the backing model. The `.roomodes` used in this project are tailored for tasks such as additional validation, Git operations, and technical consulting. You can review the configuration here: [roomodes file](https://github.com/d-oit/do-vscode-lm-api-explorer/blob/main/.roomodes).
97
89
98
90
This enables high-level, context-aware evaluation of your implementation without needing to paste diffs or use any CLI tools. For more, see [Roo Code Chat usage](https://docs.roocode.com/basic-usage/the-chat-interface).
99
91
92
+
And important: Test the **visx** in codespace or on other system.
93
+
100
94
## Limitations and Known Issues
101
95
102
-
### 1. Context Window Visibility
96
+
### 1. Context Window Visibility / Agent mode
103
97
104
-
GitHub Copilot does not currently expose information about the context window size or token usage during interactions. This lack of transparency makes it difficult to manage prompt size, debug unexpected truncations, or optimize for longer code generation tasks.
98
+
GitHub Copilot does not currently expose information about the context window size or token usage during interactions. This lack of transparency makes it difficult to manage prompt size, debug unexpected truncations, or optimize for longer code generation tasks. You have to press "Continue" for the next step in Agent Mode - not a complete agent mode without interactions.
105
99
106
100
### 2. Rate Limits and High Load Conditions
107
101
108
102
Claude 4 Sonnet on GitHub Copilot may become temporarily unavailable under high load, particularly during peak usage times. While most operations work smoothly, occasional delays or fallback to other models may occur. Best practice for me: wait, do not change to another model. Try again with retry or chat with "continue".
109
103
110
104
### 3. System Prompt Design (Hint)
111
105
112
-
Although GitHub does not publicly document the system prompt structure, those interested in how GitHub Copilot might structure its system prompts can refer to this Postman trace capture: [example gist](https://gist.github.com/d-oit/231f6f949cad9ea8d1804ee047581ca6).
106
+
Although GitHub does not publicly document the system prompt structure, those interested in how GitHub Copilot might structure its system prompts can refer to this Postman trace capture: [example gist](https://gist.github.com/d-oit/231f6f949cad9ea8d1804ee047581ca6). You could not customize the system prompt or set another temperature like e.g. in Roo Code
113
107
114
108
## Continuous Integration (CI) Considerations
115
109
116
110
The existing CI pipeline may encounter issues due to:
117
111
118
112
***Branch Naming**: Ensure your CI configuration references the correct branch (`main` instead of `master`).
119
-
***Copilot Chat Dependency**: End-to-end (E2E) tests that depend on GitHub Copilot Chat integration are challenging to automate and remain on the TODO list for future implementation.
113
+
***Copilot Chat Dependency**: End-to-end (E2E) tests that depend on GitHub Copilot Chat integration are challenging to automate and remain on my TODO list for implementation.
120
114
121
115
## Conclusion
122
116
123
-
I'm genuinely impressed by the current state of GitHub Copilot's agent mode, especially when paired with Claude Sonnet 4. The improvements in functionalities like "apply diff" and codebase search are substantial compared to earlier versions this year. However, it's important to note that this enhanced experience is available without limitations only until June 4, 2025.
117
+
I'm genuinely impressed by the current state of GitHub Copilot's agent mode, especially when paired with Claude Sonnet 4. The improvements in functionalities like "apply diff" and codebase search are substantial compared to earlier versions this year. However, it's important to note that this enhanced experience is available without [limitations only until June 4, 2025](https://docs.github.com/en/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests#premium-requests).
124
118
125
119
Previously, using Claude Sonnet 3.7 within GitHub Copilot presented challenges, including frequent rate limiting and inconsistent performance. These issues often hindered productivity and made the development process less efficient.
126
120
127
121
With the introduction of Claude Sonnet 4, many of these problems have been addressed. The model offers a more reliable and efficient coding assistant experience, making it a valuable tool for developers.
122
+
I was particularly impressed by the speed and error-free writing of file changes compared to before.
0 commit comments