Azure-Samples / Azure-Samples/Legacy-Modernization-Agents
[docs] Documentation update needed for push to main by `@jkordick`
- Dominant language
- C#
- Stars
- 213
- Forks
- 92
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
## Summary
Commit [`b260b5ad`](https://github.com/Azure-Samples/Legacy-Modernization-Agents/commit/b260b5ad01e52d9c2e928edf7c53f05e8ae52eac) pushed directly to `main` by `@jkordick` on 2026-05-08 introduced two user-facing changes that are not yet reflected in documentation:
1. **`doctor.sh` — GitHub host selection during interactive setup**
2. **`Agents/Infrastructure/CopilotChatClient.cs` — New `IChatClient` adapter for the GitHub Copilot SDK** (the README already references this class, but supporting infrastructure such as the `GITHUB_HOST` env var is undocumented)
---
## What Changed
### 1. GitHub host selection in `./doctor.sh setup`
The interactive setup wizard now includes a step that lets users choose between:
- `github.com` (default)
- A custom **GitHub Data Residency** host (e.g. `github.yourcompany.ghe.com`)
The selection is driven by a `GITHUB_HOST` environment variable (defaulting to `github.com`). If a custom host is chosen, `copilot login --host "https://\$\{GITHUB_HOST}"` is used for authentication, and the host is persisted to `Config/ai-config.env` under `GITHUB_HOST`.
### 2. `CopilotChatClient.cs` — New file
A new `CopilotChatClient` class was added under `Agents/Infrastructure/`. It is an `IChatClient` adapter over the GitHub Copilot SDK that routes completions through `gh copilot` via stdio. The class supports both non-streaming (`GetResponseAsync`) and streaming (`GetStreamingResponseAsync`) calls, with a built-in 5-minute request timeout.
---
## Documentation Gaps
### `README.md`
- The **Setup (2 minutes)** section and the **`./doctor.sh setup`** description do not mention the new GitHub host selection step. Users running `./doctor.sh setup` on a GitHub Data Residency instance have no guidance.
- The **Supported AI Providers** table lists `GitHubCopilotSDK` / `CopilotChatClient` but does not mention the `GITHUB_HOST` environment variable or that a custom GitHub host can be configured.
Suggested additions:
1. In the **Setup** section or a new note beneath the `GitHubCopilotSDK` row, add:
> **GitHub Data Residency / custom host**: Set `GITHUB_HOST=your.ghe.com` before running `./doctor.sh setup`, or select option 2 when prompted. The host is saved to `Config/ai-config.env`.
2. In the **`./doctor.sh setup` — Interactive Options** description, add a bullet documenting the GitHub host selection prompt.
### `Config/ai-config.env.example`
The template comment only lists `AzureOpenAI` and `GitHubCopilot` as supported `AZURE_OPENAI_SERVICE_TYPE` values, but not `GitHubCopilotSDK`. It also has no entry for `GITHUB_HOST`.
Suggested additions to `Config/ai-config.env.example`:
```
# Supported values: "AzureOpenAI" (default), "GitHubCopilot", "GitHubCopilotSDK", "OpenAI"
# GitHubCopilotSDK: uses CopilotChatClient via gh copilot CLI; requires 'gh auth login'.
# For GitHub Data Residency, set GITHUB_HOST to your custom host:
# GITHUB_HOST=github.yourcompany.ghe.com
```
### `docs/` — No deep-dive doc needed
No new `docs/` file is required — the changes can be covered by `README.md` and the config template.
---
## References
- Commit: [`b260b5ad`](https://github.com/Azure-Samples/Legacy-Modernization-Agents/commit/b260b5ad01e52d9c2e928edf7c53f05e8ae52eac)
- Changed files: `doctor.sh`, `Agents/Infrastructure/CopilotChatClient.cs`
> Generated by [Documentation Updater](https://github.com/Azure-Samples/Legacy-Modernization-Agents/actions/runs/25551893953)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.