diff --git a/.github/chatmodes/learn.chatmode.md b/.github/chatmodes/learn.chatmode.md new file mode 100644 index 00000000000..debbed0e56e --- /dev/null +++ b/.github/chatmodes/learn.chatmode.md @@ -0,0 +1,7 @@ +--- +description: 'Save learnings from conversation' +tools: ['codebase', 'editFiles', 'githubRepo', 'runCommands', 'search', 'searchResults', 'usages'] +--- +Please take a moment and deeply reflect on all the steps you took and think if there would have been a piece of information which would have allowed you to work faster (take less steps). + +The file .vscode/project.instructions.md has been already provided to you. Edit the file such that it would contain information which would have made you work faster. Please don't make this too specific to this task, but rather something that is generic but useful enought to ensure speed-ups in the future for other tasks. diff --git a/.github/chatmodes/plan.chatmode.md b/.github/chatmodes/plan.chatmode.md new file mode 100644 index 00000000000..44b5a4e902d --- /dev/null +++ b/.github/chatmodes/plan.chatmode.md @@ -0,0 +1,5 @@ +--- +description: 'Plan the solution for a problem.' +tools: ['codebase', 'findTestFiles', 'githubRepo', 'search', 'searchResults', 'usages'] +--- +I need your help with the following problem. Please take a look, understand the request in depth, and if the request makes sense, research it, understand the existing code, then suggest a clear plan with steps to take to address the request. diff --git a/.vscode/project.instructions.md b/.vscode/project.instructions.md new file mode 100644 index 00000000000..c5ad68bce74 --- /dev/null +++ b/.vscode/project.instructions.md @@ -0,0 +1,61 @@ +--- +applyTo: '**' +--- + +# VS Code Copilot Development Guide + +This file contains key information to help AI assistants work more efficiently with the VS Code codebase. + +## Quick Reference for Common Issues + +### Build & Test Workflow +1. **Compile**: `npm run compile` (required before testing code changes) +2. **Run specific tests**: `./scripts/test.sh --grep "pattern"` +3. **Test file location**: `out/` directory contains compiled JavaScript +4. **Extension compilation**: Extensions compile separately and take significant time + +### Code Architecture Patterns + +#### Testing Strategy +- Unit tests in `src/vs/*/test/` directories +- Integration tests in `test/` directory +- Use `npm run compile` before running node-based tests + +## Common Gotchas + +### Module Loading +- Use compiled files from `out/` directory when testing with node +- Import paths: `const { Class } = require('../out/vs/path/to/module.js')` +- ES modules require `.mjs` extension or package.json type modification + +### Test Location +- Don't add tests to the wrong test suite (e.g., adding to end of file instead of inside relevant suite) +- Look for existing test patterns before creating new structures +- Use `describe` and `test` consistently with existing patterns + +## Investigation Shortcuts + +### Finding Related Code +1. **Semantic search first**: Use file search for general concepts +2. **Grep for exact strings**: Use grep for error messages or specific function names +3. **Follow imports**: Check what files import the problematic module +4. **Check test files**: Often reveal usage patterns and expected behavior + +### Build Optimization +- Compilation takes ~2 minutes - do this once at start +- Extensions compile separately - skip if not needed +- Use incremental compilation for faster iteration + +## File Structure Quick Reference + +``` +src/vs/ +├── base/common/ # Core utilities (color.ts, etc.) +├── editor/contrib/ # Editor features +├── platform/ # Platform services +└── workbench/ # Main UI components + +test/ # Integration tests +out/ # Compiled output +scripts/ # Build and test scripts +``` diff --git a/.vscode/settings.json b/.vscode/settings.json index ba659d5ac8b..9bc25b85f21 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -181,5 +181,9 @@ "*": "error", "ts": "warning", "eslint": "warning" + }, + "chat.instructionsFilesLocations": { + ".github/instructions": true, + ".vscode": true } }