Definition: Clarifies usersβ legal terms and obligations.
Key Points:
- Terms depend on whether Copilot is purchased through GitHub or Microsoft.
- Includes licensing, data usage, and privacy policies.
- Important for understanding code suggestions and intellectual property.
MBSA (Microsoft Business & Services Agreement): Part of the contract stack when Copilot is purchased through Microsoft, outlining the legal terms of service.
- Fairness: Unbiased code suggestions - AI systems should treat all people fairly (incl. code styles and paradigms).
- Transparency: Clear communication about how Copilot works.
- Accountability: Users must validate generated code.
- Privacy & Security: Minimize vulnerabilities in code suggestions. Protect user data and code.
- Inclusiveness: AI systems should empower everyone and engage people.
- Reliability & Safety: Consistent, high-quality suggestions.
- Free Plan: Limited features for verified students, teachers, and open-source maintainersβ2000 completions + 50 messages/month.
- Pro Plan: Full features for individual developers (subscription-based).
- Business Plan: For small-medium teams with enhanced admin controls.
- Enterprise Plan: Advanced security, compliance, and integration features for large organizations.
- Overview: Provides usage data on GitHub Copilot.
- Key Path Parameters:
org
,enterprise
- Metrics: Code suggestions, acceptance rates, active users.
- Max Days Retrieval: 28 days per page.
- Query Parameters:
since
(start date),until
(end date). - Requirement: Minimum 5 active Copilot licenses for metrics.
- Log Retrieval: Available via the Audit Log API or GitHub UI.
- Log Types: Vary by planβFree/Pro (basic security), Business (repository activities), Enterprise (organization-wide actions).
- Key Features: Access metrics, automate user management, retrieve content exclusion settings.
- Auth: Fine-grained access tokens required.
- Maximum number of results that can be fetched per page when listing all Copilot seat assignments for an enterprise: 100
- Definition: Guiding Copilot to generate desired code.
- Types:
- Zero-shot: No examples.
- One-shot: One example.
- Few-shot: Multiple examples.
- Use Cases: Enhance, refactor, or fix code.
- Best Practices: Be specific, define context, and iterate.
- Purpose: Prevents harmful/offensive content but may block benign content (role of the proxy-server)
- Purpose: Prevents certain repos/files from training.
- Limitations: Doesnβt affect already processed data/public code.
- Pattern matching used to specify file paths: fnmatch.
- Repository administrators and organization owners can configure content exclusion from their repositories settings.
- May not exclude semantic data in non-excluded files.
- Policy management available to org/enterprise owners.
- Policies help determine how Copilot can be used within the organization.
- Available to organizations with a subscription to GitHub Copilot Business or GitHub Copilot Enterprise.
Slash Commands:
/explain
- Explain code./fix
- Propose fixes./tests
- Generate tests./help
- Assistance./clear
- Clear chat./doc
- Add documentation./generate
- Generate code./optimize
- Improve performance./new
- Scaffold code./simplify
- Simplify code./feedback
- Provide feedback./runCommand
- Can be used with@vscode
to execute VS Code commands.copilot-debug
- Debugging tool.
Variables: #codebase
, #editor
, #git
, etc.
Agents: Target contexts like @workspace
, @terminal
, @vscode
.
- Admins: Modify settings.
- Owners: Full access.
- Public Code Match Settings: Admin/owner control.
- Code Suggestions: No retention unless saved.
- Copilot Chat: Temporary session storage.
curl --verbose https://copilot-proxy.githubusercontent.com/_ping
- With proxy:
curl -x http://YOUR-PROXY-URL:PORT -i -L https://copilot-proxy.githubusercontent.com/_ping
- Test Copilot Chat:
https://api.githubcopilot.com/_ping
- Usage: Execute commands via CLI.
- Example:
gh copilot explain "sudo apt-get"
- Settings:
gh copilot config
- Fast, cost-effective model specialization.
- Adds small trainable parts to pre-trained models.
- Complete content between provided prefix/suffix.
- Manage Copilot Business with IdP via SCIM.
- Create/share micro apps without coding using natural language.
- To get suggestions with up-to-date libraries and code samples, guide Copilot with up-to-date library versions.
- Modify a code suggestion
- Reject a code suggestion
- Accept a code suggestion
- Admin-configured, not in individual plans.
- Detects exact matches, may miss semantic similarities.
- Integrate external tools with Copilot Chat.
- Custom instructions via
.github/copilot-instructions.md
orgithub.copilot.chat.codeGeneration.instructions
property in settings.json. - Settings managed individually or by business.
- Allows users to engage in an ongoing conversation while applying code suggestions inline, combining multi-turn chat and fast inline feedback.
- Supports multi-file editing and displays real-time previews of proposed changes within each file in the working set.
- Working set is limited to 10 files.
- Limited to one editing session at a time, which restricts parallel workflows.
- Does not yet fully support Jupyter notebooks, custom text formats, or binary files.
- 90% of devs report faster coding with Copilot.
- Security risks when ignoring certificate errors.
- Use Copilot logs to view public code matches.
- Preprocessing user prompts in the GitHub Copilot data pipeline optimizes prompts for better suggestions.
- Reload content exclusion settings by using the 'Developer: Reload Window' command.
- Administrators can manage access to Copilot for members of the organization.
- Organization owners can create knowledge bases, not specifically for administrators.
- Administrators can review audit logs to understand actions taken within Copilot.
- Responses containing unique identifiers like email addresses or IP addresses are truncated.
- The feedback loop, through user actions like accepting, modifying, or rejecting suggestions, helps Copilot understand which suggestions are helpful and align with user needs.
- Prompt pre-processing & code suggestions generation pipeline: Preprocessing -> Filtering -> LLM Processing -> Suggestion Generation
- The ease of generating large code blocks might discourage developers from thoroughly understanding and verifying the code, potentially leading to lower quality or the introduction of errors.
- Valid methods for defining test-generation instructions include configuring the
github.copilot.chat.testGeneration.instructions
setting insettings.json
or linking to an external Markdown file that contains the instructions. - Insert into Terminal (Ctrl+Alt+Enter) -> executes the code block as a command within the integrated terminal.