fix(copilot): honor preset command template overrides (#3592)

* fix(copilot): honor preset command template overrides

* fix(copilot): resolve canonical preset command names

---------

Co-authored-by: Faqeha Noor <faqehanoor022@gmail.com>
This commit is contained in:
Faqeha Noor
2026-07-28 18:26:12 +05:00
committed by GitHub
parent 39f2ac3c63
commit 9602ad2edf
2 changed files with 46 additions and 1 deletions

View File

@@ -379,6 +379,10 @@ class CopilotIntegration(IntegrationBase):
if not templates:
return []
from ...presets import PresetResolver
preset_resolver = PresetResolver(project_root_resolved)
dest = self.commands_dest(project_root)
dest_resolved = dest.resolve()
try:
@@ -396,7 +400,11 @@ class CopilotIntegration(IntegrationBase):
# 1. Process and write command files as .agent.md
for src_file in templates:
raw = src_file.read_text(encoding="utf-8")
resolved_template = preset_resolver.resolve(
f"speckit.{src_file.stem}", template_type="command"
)
source_path = resolved_template or src_file
raw = source_path.read_text(encoding="utf-8")
processed = self.process_template(
raw, self.key, script_type, arg_placeholder,
project_root=project_root,