Migrating SDK cookbook over#632
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a comprehensive cookbook section to the awesome-copilot repository, containing practical recipes and runnable examples for the GitHub Copilot SDK across four programming languages (Python, Node.js/TypeScript, Go, and .NET/C#). Each recipe demonstrates common SDK usage patterns including error handling, session management, file operations, and GitHub PR visualization.
Changes:
- Added cookbook structure with 5 recipes per language (error handling, multiple sessions, managing local files, PR visualization, persisting sessions)
- Added runnable code examples in
recipe/subdirectories for each language - Updated main README to include the new cookbook section and changed repository title from "Awesome GitHub Copilot Customizations" to "Awesome GitHub Copilot"
Reviewed changes
Copilot reviewed 53 out of 55 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updated repository title and added cookbook link to main navigation |
| cookbook/README.md | Top-level cookbook overview with links to SDK recipes |
| cookbook/copilot-sdk/README.md | SDK cookbook hub linking all language-specific recipes |
| cookbook/copilot-sdk/{python,nodejs,go,dotnet}/README.md | Language-specific recipe indexes |
| cookbook/copilot-sdk/{python,nodejs,go,dotnet}/*.md | Recipe documentation for each pattern |
| cookbook/copilot-sdk/{python,nodejs,go,dotnet}/recipe/* | Runnable example implementations |
| cookbook/copilot-sdk/nodejs/recipe/package*.json | Node.js dependencies and scripts |
| cookbook/copilot-sdk/python/recipe/requirements.txt | Python dependencies |
| cookbook/copilot-sdk/go.sum | Go module dependencies |
Files not reviewed (1)
- cookbook/copilot-sdk/nodejs/recipe/package-lock.json: Language not supported
| session.send(prompt=user_input) | ||
| session.wait_for_idle() | ||
|
|
||
| client.stop() |
There was a problem hiding this comment.
The code example in the documentation is missing the session.destroy() call before client.stop(). The actual runnable example file includes this call at line 157, but the documentation omits it. This inconsistency could lead users to forget proper cleanup when following the documentation.
|
|
||
| ## Contributing | ||
|
|
||
| Add a new recipe by creating a markdown file in this folder and linking it above. Follow repository guidance in [CONTRIBUTING.md](../../CONTRIBUTING.md). |
There was a problem hiding this comment.
The path to CONTRIBUTING.md is incorrect. From cookbook/copilot-sdk/nodejs/README.md, the path should be ../../../CONTRIBUTING.md (three levels up to reach the repository root), not ../../CONTRIBUTING.md.
| Add a new recipe by creating a markdown file in this folder and linking it above. Follow repository guidance in [CONTRIBUTING.md](../../CONTRIBUTING.md). | |
| Add a new recipe by creating a markdown file in this folder and linking it above. Follow repository guidance in [CONTRIBUTING.md](../../../CONTRIBUTING.md). |
|
|
||
| ## Local SDK Development | ||
|
|
||
| The `package.json` references the local Copilot SDK using `"file:../../.."`. This means: |
There was a problem hiding this comment.
The documentation states that package.json references the local SDK using "file:../../.." but the actual package.json uses "*" which resolves to "file:../../src" (as seen in package-lock.json). The documentation should be updated to accurately reflect either the wildcard approach or the correct file path.
|
@aaronpowell I've opened a new pull request, #633, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@aaronpowell I've opened a new pull request, #634, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Fix Prerequisites description in Python cookbook README
Fix misleading comment in Python recipe requirements.txt
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.Description
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.