Skip to content

Commit 336e472

Browse files
committed
Add generated copilot instructions
1 parent f050601 commit 336e472

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/copilot-instructions.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copilot Coding Agent Instructions for `vscode-csharp`
2+
3+
## Project Overview
4+
- This is the official C# extension for Visual Studio Code, supporting C# development via OmniSharp and Roslyn-based language servers.
5+
- The codebase is TypeScript/JavaScript, with some JSON and configuration files. It integrates with .NET components and external language servers.
6+
7+
## Architecture & Key Components
8+
- **src/**: Main extension source. Key subfolders:
9+
- `lsptoolshost/`: Hosts LSP (Language Server Protocol) logic, including Copilot integration (`copilot/`), Roslyn, and Razor support.
10+
- `omnisharp/`: Protocols and logic for OmniSharp-based language server.
11+
- `razor/`: Razor language support and configuration.
12+
- **Copilot Integration**:
13+
- `src/lsptoolshost/copilot/contextProviders.ts` and `relatedFilesProvider.ts` register C# context and related files providers for GitHub Copilot and Copilot Chat extensions.
14+
- The Roslyn Copilot language server is managed as a downloadable component (see `package.json` and `CONTRIBUTING.md`).
15+
16+
## Developer Workflows
17+
- **Build**: `npm run compile` (or use VS Code build task)
18+
- **Test**: `npm test` (runs Jest tests)
19+
- **Package**: `npm run package` (creates VSIX)
20+
- **Dependencies**: Use `gulp installDependencies` to fetch .NET/LS components
21+
- **Debugging**: See `docs/debugger/` for advanced .NET debugging, including runtime and external library debugging.
22+
- **Roslyn Copilot Language Server**: To update/test, see instructions in `CONTRIBUTING.md` (triggers pipeline, checks logs for install, etc.)
23+
24+
## Project Conventions & Patterns
25+
- **TypeScript**: Follows strict linting (`.eslintrc.js`), including header/license blocks and camelCase filenames (except for interfaces and special files).
26+
- **Component Downloads**: Language servers and debuggers are downloaded at runtime; see `package.json` for URLs and install logic.
27+
- **Copilot Providers**: Use `registerCopilotContextProviders` and `registerCopilotRelatedFilesProvider` to extend Copilot context for C#.
28+
- **Testing**: Tests are in `test/` and use Jest. Some grammars and language configs are embedded for Razor and XAML.
29+
30+
## Integration Points
31+
- **GitHub Copilot**: Extension registers C# context and related files providers if Copilot/Copilot Chat extensions are present.
32+
- **Roslyn Language Server**: Managed as a downloadable component, versioned in `package.json` and updated via pipeline.
33+
- **OmniSharp**: Legacy support, also downloaded as a component.
34+
35+
## Examples
36+
- To add a new Copilot context provider: see `src/lsptoolshost/copilot/contextProviders.ts`.
37+
- To update Roslyn Copilot server: follow `CONTRIBUTING.md` > "Updating the Roslyn Copilot Language Server version".
38+
39+
## References
40+
- [README.md](../README.md): User-facing overview and features
41+
- [CONTRIBUTING.md](../CONTRIBUTING.md): Dev setup, packaging, and advanced workflows
42+
- [package.json](../package.json): Component download logic, scripts
43+
- [src/lsptoolshost/copilot/](../src/lsptoolshost/copilot/): Copilot integration logic
44+
45+
---
46+
For any unclear or incomplete sections, please provide feedback to improve these instructions.

0 commit comments

Comments
 (0)