|
| 1 | +```language: .vscode-copilot-instructions |
| 2 | +
|
| 3 | +You are a software engineer working on a VS Code extension called "Prompts Sync Extension" that synchronizes GitHub Copilot prompts from Git repositories. Key points about the codebase: |
| 4 | +
|
| 5 | +1. Core Components: |
| 6 | +- Main extension entry: [src/extension.ts](src/extension.ts) handles activation and command registration |
| 7 | +- Sync management: [src/syncManager.ts](src/syncManager.ts) orchestrates the sync process |
| 8 | +- Config handling: [src/configManager.ts](src/configManager.ts) manages extension settings |
| 9 | +- Status bar: [src/statusBarManager.ts](src/statusBarManager.ts) shows sync status |
| 10 | +- GitHub API: [src/utils/github.ts](src/utils/github.ts) handles repository operations |
| 11 | +- File operations: [src/utils/fileSystem.ts](src/utils/fileSystem.ts) manages local file system |
| 12 | +
|
| 13 | +2. Key Features: |
| 14 | +- Multi-repository sync support with error handling |
| 15 | +- Configurable sync frequency (startup/hourly/daily/weekly/manual) |
| 16 | +- Cross-platform file path handling |
| 17 | +- GitHub authentication via VS Code's built-in auth |
| 18 | +- Status bar integration with sync indicators |
| 19 | +- Selective sync for different prompt types (chatmode/instructions/prompt) |
| 20 | +
|
| 21 | +3. Best Practices: |
| 22 | +- Use TypeScript with strict type checking |
| 23 | +- Follow VS Code extension guidelines |
| 24 | +- Implement proper error handling and logging |
| 25 | +- Use async/await for asynchronous operations |
| 26 | +- Support cross-platform paths |
| 27 | +- Provide clear user feedback through notifications |
| 28 | +- Maintain backward compatibility |
| 29 | +- Handle GitHub API rate limits |
| 30 | +
|
| 31 | +4. Common Tasks: |
| 32 | +- File operations should use [FileSystemManager](src/utils/fileSystem.ts) |
| 33 | +- GitHub API calls through [GitHubApiManager](src/utils/github.ts) |
| 34 | +- Configuration changes via [ConfigManager](src/configManager.ts) |
| 35 | +- Status updates using [StatusBarManager](src/statusBarManager.ts) |
| 36 | +- Error logging through [Logger](src/utils/logger.ts) |
| 37 | +- User notifications via [NotificationManager](src/utils/notifications.ts) |
| 38 | +
|
| 39 | +5. Repository Structure: |
| 40 | +- Source code in `src/` with TypeScript files |
| 41 | +- Configuration in `package.json` |
| 42 | +- Build settings in `tsconfig.json` |
| 43 | +- ESLint config in `.eslintrc.js` |
| 44 | +- GitHub workflows in `.github/workflows/` |
| 45 | +
|
| 46 | +When suggesting code: |
| 47 | +- Use TypeScript with proper type annotations |
| 48 | +- Follow existing error handling patterns |
| 49 | +- Consider cross-platform compatibility |
| 50 | +- Include appropriate logging statements |
| 51 | +- Add JSDoc comments for public APIs |
| 52 | +- Handle VS Code disposal and cleanup |
| 53 | +- Consider backward compatibility |
| 54 | +``` |
0 commit comments