Merged
Conversation
Detect Amp agent via AGENT=amp environment variable. - Add agent mapping in env_mapping.rs with HIGH confidence - Add display name 'Amp' in agent.rs descriptor - Add unit test in agent_declarative.rs - Add CLI integration test in cli_declarative.rs - Add mapping unit test in env_mapping.rs - Add snapshot test in info_snapshots.rs All 329 tests passing. Amp-Thread-ID: https://ampcode.com/threads/T-498346d9-f5bd-4c4d-a1a3-90ea721ff4c8 Co-authored-by: Amp <amp@ampcode.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for detecting the Amp agent when running in agent mode using the AGENT=amp environment variable. This enhancement allows envsense to properly identify and report the Amp development agent context.
- Add Amp agent detection with HIGH confidence level mapping
- Include comprehensive test coverage across unit, integration, and snapshot tests
- Register Amp agent descriptor with display name and capabilities
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/detectors/env_mapping.rs | Adds Amp agent detection mapping and unit test |
| src/agent.rs | Registers Amp agent descriptor with display name and capabilities |
| src/detectors/agent_declarative.rs | Adds unit test for Amp agent detection |
| tests/cli_declarative.rs | Adds CLI integration test for Amp agent detection |
| tests/info_snapshots.rs | Adds snapshot test for Amp agent detection |
| tests/snapshots/info_snapshots__amp.snap | Generated snapshot file for Amp agent detection |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Adds support for detecting Amp running in agent mode via the `AGENT=amp` environment variable.
Changes
Testing
All 329 tests passing ✅
Example Usage