Fix --dev extension agent symlinks#2554
Open
NgoQuocViet2001 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2451.
specify extension add --devnow asks extension registration to link generated agent command files when possible. The registrar writes rendered output into an extension-local.specify-devcache and points the agent-facing command file at it, while falling back to a normal copy when symlink creation is unavailable. The same option is threaded through extension skill registration, and unregister now removes symlinked command entries too.Testing
PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run specify --helpuv run specify --helpon this Windows cp1252 console hit an existing bannerUnicodeEncodeError; the UTF-8 run passed.uv sync --extra test && uv run pytest tests/test_extensions.pytests/test_extensions.py::TestExtensionAddCLI::test_add_dev_links_copilot_agent_when_supporteduv run pytest tests/integrations/test_integration_subcommand.py -k "extension_add or switch_migrates_extension_commands or switch_migrates_copilot_skills_extension_commands"uvx ruff check src/specify_cli/agents.py src/specify_cli/extensions.py src/specify_cli/__init__.pygit diff --checkAI Disclosure
This PR was implemented with OpenAI Codex assistance. Codex helped identify the regression path, make the code changes, add tests, run validation, and draft this PR; I reviewed the resulting diff and test output before submission.