mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-12 12:15:12 +00:00
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1598,7 +1598,7 @@ a:hover {
|
||||
|
||||
.learning-hub-sidebar {
|
||||
position: sticky;
|
||||
top: 24px;
|
||||
top: calc(var(--header-height) + 24px);
|
||||
max-height: calc(100vh - 48px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ relatedArticles:
|
||||
- ./defining-custom-instructions.md
|
||||
---
|
||||
|
||||
# Before/After Customization Examples
|
||||
|
||||
The power of GitHub Copilot customization becomes clear when you see concrete examples of how agents, skills, and instructions transform everyday development workflows. This article presents real-world scenarios showing the dramatic difference between default Copilot behavior and customized experiences that align with your team's standards, tools, and practices.
|
||||
|
||||
> Note: The following examples illustrate typical before-and-after scenarios. The actual before and after code may vary depending on the model used and any other context present at generation time.
|
||||
|
||||
@@ -364,11 +364,11 @@ A: Use the `excludedFiles` setting in your IDE configuration or create a workspa
|
||||
|
||||
**Q: Can I have different settings per project?**
|
||||
|
||||
A: Yes! Use workspace settings (`.vscode/settings.json`) for project-specific preferences that don't need to be shared, or use repository settings (`.github/copilot/`) for team-wide customizations that should be version-controlled.
|
||||
A: Yes! Use workspace settings (`.vscode/settings.json`) for project-specific preferences that don't need to be shared, or use repository settings (for example, files in `.github/agents/`, `.github/skills/`, `.github/instructions/`, and `.github/copilot-instructions.md`) for team-wide customizations that should be version-controlled.
|
||||
|
||||
**Q: How do team settings override personal settings?**
|
||||
|
||||
A: Repository settings in `.github/copilot/` have the highest precedence, followed by workspace settings, then user settings. This means team-defined instructions and agents will apply even if your personal settings differ, ensuring consistency across the team.
|
||||
A: Repository-level Copilot configuration (such as `.github/agents/`, `.github/skills/`, `.github/instructions/`, and `.github/copilot-instructions.md`) has the highest precedence, followed by workspace settings, then user settings. This means team-defined instructions and agents will apply even if your personal settings differ, ensuring consistency across the team.
|
||||
|
||||
**Q: Where should I put customizations that apply to all my projects?**
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ relatedArticles:
|
||||
- ./copilot-configuration-basics.md
|
||||
---
|
||||
|
||||
# GitHub Copilot Terminology Glossary
|
||||
|
||||
New to GitHub Copilot customization? This glossary defines common terms you'll encounter while exploring agents, skills, instructions, and related concepts in the Awesome GitHub Copilot ecosystem.
|
||||
|
||||
Use this page as a quick reference when reading articles in the Learning Hub or browsing the repository.
|
||||
|
||||
@@ -118,7 +118,7 @@ Using `#` to reference specific files gives Copilot precise context about which
|
||||
GitHub Copilot has a maximum token limit for how much context it can process at once. When you have many files open or a long chat history, Copilot prioritizes:
|
||||
|
||||
1. **Closest proximity**: Code immediately surrounding your cursor
|
||||
2. **Explicitly referenced files**: Files you @-mention in chat for CLI, and #-mention for IDE's (VS Code, Visual Studio, JetBrains, etc.)
|
||||
2. **Explicitly referenced files**: Files you @-mention in chat for CLI, and #-mention for IDEs (VS Code, Visual Studio, JetBrains, etc.)
|
||||
3. **Recently modified files**: Files you've edited recently
|
||||
4. **Direct dependencies**: Files imported by your current file
|
||||
|
||||
|
||||
@@ -14,15 +14,32 @@ interface Props {
|
||||
const { title, description, estimatedReadingTime, lastUpdated, tags } = Astro.props;
|
||||
const base = import.meta.env.BASE_URL;
|
||||
|
||||
const createOrderIndexMap = (order: string[]) => {
|
||||
const map = new Map<string, number>();
|
||||
for (let i = 0; i < order.length; i += 1) {
|
||||
map.set(order[i], i);
|
||||
}
|
||||
return map;
|
||||
};
|
||||
|
||||
const articles = await getCollection('learning-hub');
|
||||
|
||||
const fundamentalsOrderIndex = createOrderIndexMap(fundamentalsOrder);
|
||||
const referenceOrderIndex = createOrderIndexMap(referenceOrder);
|
||||
|
||||
const fundamentals = articles
|
||||
.filter((a) => fundamentalsOrder.includes(a.id))
|
||||
.sort((a, b) => fundamentalsOrder.indexOf(a.id) - fundamentalsOrder.indexOf(b.id));
|
||||
.filter((a) => fundamentalsOrderIndex.has(a.id))
|
||||
.sort(
|
||||
(a, b) =>
|
||||
(fundamentalsOrderIndex.get(a.id) ?? 0) - (fundamentalsOrderIndex.get(b.id) ?? 0),
|
||||
);
|
||||
|
||||
const reference = articles
|
||||
.filter((a) => referenceOrder.includes(a.id))
|
||||
.sort((a, b) => referenceOrder.indexOf(a.id) - referenceOrder.indexOf(b.id));
|
||||
.filter((a) => referenceOrderIndex.has(a.id))
|
||||
.sort(
|
||||
(a, b) =>
|
||||
(referenceOrderIndex.get(a.id) ?? 0) - (referenceOrderIndex.get(b.id) ?? 0),
|
||||
);
|
||||
|
||||
const currentSlug = Astro.url.pathname.replace(/\/$/, '').split('/').pop();
|
||||
---
|
||||
|
||||
@@ -6,13 +6,23 @@ import { fundamentalsOrder, referenceOrder } from '../../config/learning-hub';
|
||||
const base = import.meta.env.BASE_URL;
|
||||
const articles = await getCollection('learning-hub');
|
||||
|
||||
const fundamentalsOrderIndex = {};
|
||||
fundamentalsOrder.forEach((id, index) => {
|
||||
fundamentalsOrderIndex[id] = index;
|
||||
});
|
||||
|
||||
const referenceOrderIndex = {};
|
||||
referenceOrder.forEach((id, index) => {
|
||||
referenceOrderIndex[id] = index;
|
||||
});
|
||||
|
||||
const fundamentals = articles
|
||||
.filter((a) => fundamentalsOrder.includes(a.id))
|
||||
.sort((a, b) => fundamentalsOrder.indexOf(a.id) - fundamentalsOrder.indexOf(b.id));
|
||||
.sort((a, b) => fundamentalsOrderIndex[a.id] - fundamentalsOrderIndex[b.id]);
|
||||
|
||||
const reference = articles
|
||||
.filter((a) => referenceOrder.includes(a.id))
|
||||
.sort((a, b) => referenceOrder.indexOf(a.id) - referenceOrder.indexOf(b.id));
|
||||
.sort((a, b) => referenceOrderIndex[a.id] - referenceOrderIndex[b.id]);
|
||||
---
|
||||
|
||||
<BaseLayout title="Learning Hub" description="Curated articles and walkthroughs to help you unlock everything you can do with GitHub Copilot" activeNav="learning-hub">
|
||||
|
||||
Reference in New Issue
Block a user