Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 26, 2025

Overview

This PR implements a new devcontainer feature copilot-agent-env that addresses the GitHub documentation requirements for preinstalling tools and dependencies in GitHub Copilot agent environments. The feature provides a comprehensive setup for optimal Copilot agent performance by installing essential development tools, language servers, package managers, and VS Code configurations.

What's New

New Devcontainer Feature: copilot-agent-env

A complete devcontainer feature located in src/copilot-agent-env/ that includes:

  • Development Tools Installation: curl, git, jq, tree, ripgrep, fd for code analysis and file operations
  • Language Server Support: TypeScript, Python, Rust, and Go language servers for enhanced code understanding
  • Package Manager Setup: npm, pip, cargo, and composer for dependency management
  • VS Code Integration: Pre-configured extensions including GitHub Copilot and language support
  • Environment Configuration: Optimized PATH setup, development aliases, and shell configurations

Key Features

Flexible Configuration Options:

  • languageServers: Customize which language servers to install (default: "typescript python rust go")
  • developmentTools: Select development tools to include (default: "curl git jq tree ripgrep fd")
  • packageManagers: Choose package managers to set up (default: "npm pip cargo")
  • enableLanguageSupport: Toggle language-specific tooling installation (default: true)

Robust Error Handling:

  • Graceful fallback when common utilities are unavailable
  • Cross-platform package installation support (apt-get, apk, yum)
  • Conditional installation based on available tools

VS Code Optimizations:

  • 9 pre-configured extensions for enhanced development experience
  • Optimized editor settings for Copilot workflows
  • Terminal and file association configurations

Usage

{
  "features": {
    "ghcr.io/tomgrv/devcontainer-features/copilot-agent-env:1": {
      "languageServers": "typescript python",
      "developmentTools": "curl git jq tree",
      "packageManagers": "npm pip",
      "enableLanguageSupport": true
    }
  }
}

For basic installation with default settings:

{
  "features": {
    "ghcr.io/tomgrv/devcontainer-features/copilot-agent-env:1": {}
  }
}

Implementation Details

The feature follows the established devcontainer feature pattern with:

  • Standard devcontainer-feature.json configuration
  • Multiple installation scripts for different components
  • Configuration script for post-installation setup
  • Comprehensive README with usage examples
  • Integration with the existing common-utils framework

Testing

  • Manual validation of individual installation scripts
  • Verified package manager detection and language server installation
  • Confirmed cross-platform compatibility and error handling
  • Validated JSON structure and devcontainer format compliance

This feature enables developers to create Copilot-optimized development environments with a single configuration entry, ensuring GitHub Copilot agents have access to all necessary tools for effective code analysis and assistance.

Original prompt

https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinstalling-tools-or-dependencies-in-copilots-environment


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 10 commits September 22, 2025 18:02
* Initial plan

* feat: add VERSION file update with gitversion semver on checkout

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* fix: improve version extraction logic for better semver detection

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* feat: add VERSION file update with gitversion semver on checkout

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* feat: support flexible naming

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: 🐛 handle legitimate naming

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tall.sh (#17)

* Initial plan

* Initial analysis: Bug in install.sh referencing incorrect log file name

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* Fix: Correct filename reference from _zz_logs.sh to _zz_log.sh in install.sh

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
* Initial plan

* feat(gitutils): add git pn alias for push --no-verify

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
…es repository (#9)

* Initial plan

* Initial exploration and understanding of devcontainer-features repository

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* Create comprehensive GitHub Copilot instructions with validated commands and timings

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* refactor: enhance copilot instructions with focused structure and clear workflows

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* revert: remove all changes except copilot instructions per user request

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
* Initial plan

* Initial exploration - understand larasets feature structure

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* Add validate-pr.yml workflow to larasets feature stubs

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

* Revert unrelated infrastructure changes, update copilot instructions for minimal changes

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
@tomgrv tomgrv changed the title [WIP] https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinstalling-tools-or-dependencies-in-copilots-environment [WIP] customize-the-agent-environment to have tomgrv/devcontainer-feature#gitutils installed Sep 26, 2025
@tomgrv tomgrv assigned Copilot and unassigned tomgrv and Copilot Sep 26, 2025
@tomgrv
Copy link
Owner

tomgrv commented Sep 26, 2025

@copilot proceed

Copilot AI and others added 4 commits September 26, 2025 11:17
…installation

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
… for preinstalling tools and dependencies

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
…age server package name

Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
Copilot AI changed the title [WIP] customize-the-agent-environment to have tomgrv/devcontainer-feature#gitutils installed feat: Add GitHub Copilot Agent Environment feature for preinstalling tools and dependencies Sep 26, 2025
Copilot AI requested a review from tomgrv September 26, 2025 11:31
@tomgrv tomgrv force-pushed the main branch 2 times, most recently from 4fcee28 to 9456163 Compare October 1, 2025 09:37
@tomgrv tomgrv changed the base branch from main to develop October 6, 2025 16:25
@tomgrv tomgrv closed this Oct 6, 2025
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.

2 participants