-
Notifications
You must be signed in to change notification settings - Fork 64.8k
Fix deprecated mode attribute in README generator prompt #41600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fix formatting in README generator prompt.
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates deprecated prompt file configuration syntax by replacing mode: 'agent' with agent: 'agent' in the README generator prompt example. The deprecated mode attribute causes parsing errors in current versions of OpenCode, and this change aligns the documentation with the current schema.
Key changes:
- Removed deprecated
mode: 'agent'line from the YAML frontmatter in the README generator prompt example - Retained
agent: 'agent'as the correct configuration attribute
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```text copy | ||
| --- | ||
| mode: 'agent' | ||
| agent: 'agent' |
Copilot
AI
Nov 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this change correctly updates the deprecated mode: 'agent' to agent: 'agent', the same deprecated pattern exists in 5 other prompt file examples that should also be updated for consistency:
content/copilot/tutorials/customization-library/prompt-files/document-api.md(line 26)content/copilot/tutorials/customization-library/prompt-files/generate-unit-tests.md(line 26)content/copilot/tutorials/customization-library/prompt-files/onboarding-plan.md(line 24)content/copilot/tutorials/customization-library/prompt-files/review-code.md(line 28)content/copilot/tutorials/customization-library/prompt-files/your-first-prompt-file.md(line 35)
Updating all occurrences in the same PR would ensure consistent documentation and prevent users from copying deprecated configurations from other examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
The mode attribute used in older OpenCode examples has been deprecated and replaced by agent.
Using mode causes parsing errors in current versions of OpenCode, while agent works as expected.
This PR updates the README generator prompt to remove the deprecated mode key and align the documentation with the updated OpenCode schema.
Before
After
This improves accuracy, prevents configuration errors for users, and reflects the current agent configuration model described in the OpenCode documentation.