Skip to content

Commit c33c1d6

Browse files
cteytonclaude
andcommitted
Display "Copilot instructions" badge for .github/instructions/ files
Files in .github/instructions/ that don't match *.instructions.md pattern were falling through to the default "agents" type. Simplified the check to classify all files in that directory as copilot type, and updated the badge label from "Copilot" to "Copilot instructions". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 4aff29dfc8d7
1 parent fe67dd4 commit c33c1d6

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

frontend/src/components/ContextTreeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function getFileTypeBadge(
9292
};
9393
case "copilot":
9494
return {
95-
label: "Copilot",
95+
label: "Copilot instructions",
9696
className: "bg-slate-600/40 text-slate-300",
9797
};
9898
case "rules":

src/shared/file-system/context-files-summarizer.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ export function getContextFileType(
6161
return "copilot";
6262
}
6363

64-
// New pattern: *.instructions.md in .github/instructions/ directory
65-
if (
66-
filename.endsWith(".instructions.md") &&
67-
filePath.includes(".github/instructions/")
68-
) {
64+
// Files in .github/instructions/ directory (Copilot instructions)
65+
if (filePath.includes(".github/instructions/")) {
6966
return "copilot";
7067
}
7168

0 commit comments

Comments
 (0)