Skip to content

Detect outdated Dev Proxy config files and offer Copilot-powered upgrade#349

Merged
garrytrinder merged 5 commits intomainfrom
copilot/detect-upgrade-outdated-configs
Mar 2, 2026
Merged

Detect outdated Dev Proxy config files and offer Copilot-powered upgrade#349
garrytrinder merged 5 commits intomainfrom
copilot/detect-upgrade-outdated-configs

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

  • Explore codebase to understand architecture, patterns, and existing version detection
  • Add upgradeConfigs command ID to src/constants.ts
  • Add extractVersionFromSchemaUrl() utility to extract version from schema URLs
  • Add findOutdatedConfigFiles() to scan workspace for outdated config files
  • Create src/commands/upgrade-config.ts with Copilot Chat integration
  • Register the new command in src/commands/index.ts
  • Add getNormalizedVersion() shared utility in src/detect.ts
  • Add outdated config files notification in src/notifications.ts
  • Wire up notification in src/extension.ts
  • Add command to package.json
  • Add tests for version extraction and command registration
  • Lint, build, and test all changes
  • Run code review and address feedback
  • Run CodeQL security scan (no alerts)
  • Add changelog and readme updates
Original prompt

This section details on the original issue you should resolve

<issue_title>Feature: Detect and upgrade outdated Dev Proxy config files on version mismatch</issue_title>
<issue_description>### Summary

When a newer version of Dev Proxy is installed and started with a configuration file from an older version, Dev Proxy Toolkit should warn the user that the config is for a different version than what's installed. The Toolkit should:

  • Detect the current Dev Proxy version.
  • Find all Dev Proxy config files in the workspace.
  • Compare their versions to the installed Dev Proxy version.
  • Suggest a one-click upgrade to the current Dev Proxy version if necessary.

Suggested Implementation

One way to solve this could be to use GitHub Copilot Chat with the Dev Proxy MCP server (which has access to the latest schemas, etc.) and let the LLM generate the necessary config upgrades. The approach would:

  • Send a preconfigured prompt to Copilot Chat.
  • Pre-select the MCP tools.
  • Select Claude 4 as the model.

Action Items:

  • Investigate if Copilot Chat can be programmatically invoked from the Toolkit with pre-selected tools and model, via the VSCode APIs.
  • Implement detection and comparison logic for Dev Proxy/config versions.
  • Add UI for warning and one-click upgrade.

Questions:

  • Is it possible to programmatically configure Copilot Chat in this way through VSCode APIs?
  • Are there edge cases (e.g. breaking config changes) that should be handled?

This feature would help keep config files up to date and avoid runtime issues due to version mismatches.
</issue_description>

Comments on the Issue (you are @copilot in this section)

@garrytrinder Great suggestion @waldekmastykarz 👏

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Detect and upgrade outdated Dev Proxy config files on version mismatch Detect outdated Dev Proxy config files and offer Copilot-powered upgrade Feb 27, 2026
@garrytrinder
Copy link
Member

@copilot update this PR to include changelog and readme updates following the guidelines in AGENTS.md

Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot update this PR to include changelog and readme updates following the guidelines in AGENTS.md

Added in a86e1e9:

  • CHANGELOG.md: Added Notification and Command entries under [1.13.0] - Unreleased
  • README.md: Added Upgrade config files to the Commands table and a new Notifications section after Status Bar describing the outdated config file detection feature

@garrytrinder garrytrinder force-pushed the copilot/detect-upgrade-outdated-configs branch from a86e1e9 to 66015c2 Compare March 2, 2026 10:10
@garrytrinder garrytrinder marked this pull request as ready for review March 2, 2026 10:14
Copilot AI and others added 4 commits March 2, 2026 13:57
Add version mismatch detection for Dev Proxy config files in the workspace.
When the schema version in config files doesn't match the installed Dev Proxy
version, show a warning notification offering to upgrade using Copilot Chat.

- Add extractVersionFromSchemaUrl() to extract version from schema URLs
- Add findOutdatedConfigFiles() to scan workspace for outdated configs
- Add upgradeConfigs command that opens Copilot Chat with upgrade prompt
- Add handleOutdatedConfigFilesNotification() for the warning UI
- Add tests for version extraction and command registration

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
- Use async vscode.workspace.fs.readFile instead of sync fs.readFileSync
- Add type guard for parse result before casting to ObjectNode
- Extract getNormalizedVersion() as shared utility to reduce duplication
- Add regex pattern documentation and named constant
- Check for workbench.action.chat.open command availability before invoking

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
- CHANGELOG: Add notification and upgrade-configs command entries under [1.13.0]
- README: Add Upgrade config files command to Commands table
- README: Add Notifications section with outdated config files description

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
@garrytrinder garrytrinder force-pushed the copilot/detect-upgrade-outdated-configs branch from 66015c2 to c447bb5 Compare March 2, 2026 14:03
@garrytrinder garrytrinder merged commit c9dcb3b into main Mar 2, 2026
@garrytrinder garrytrinder deleted the copilot/detect-upgrade-outdated-configs branch March 2, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Detect and upgrade outdated Dev Proxy config files on version mismatch

2 participants