Lesson 2#163
Closed
ewyuen wants to merge 4 commits into
Closed
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors the sample book app to centralize UI helpers in utils.py, adds basic input validation, and introduces RTK configuration/documentation to reduce token-heavy CLI output.
Changes:
- Add validation loops for menu selection and book title input in
utils.py. - Move
show_booksout ofbook_app.pyintoutils.pyand update imports accordingly. - Add RTK hook/config files and instructions for using
rtk-prefixed commands.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
samples/book-app-project/utils.py |
Adds input validation and consolidates book display logic into shared utils. |
samples/book-app-project/book_app.py |
Imports show_books from utils after refactor to reduce duplication. |
.rtk/filters.toml |
Adds project-local RTK filter configuration scaffold. |
.github/hooks/rtk-rewrite.json |
Adds a hook to run rtk hook copilot before tool usage. |
.github/copilot-instructions.md |
Documents RTK usage expectations for shell commands. |
Comment on lines
10
to
+15
| def get_user_choice() -> str: | ||
| return input("Choose an option (1-5): ").strip() | ||
| while True: | ||
| choice = input("Choose an option (1-5): ").strip() | ||
| if choice in {"1", "2", "3", "4", "5"}: | ||
| return choice | ||
| print("Invalid choice. Please enter a number between 1 and 5.") |
Comment on lines
+83
to
+87
| git status rtk git status | ||
| git log -10 rtk git log -10 | ||
| cargo test rtk cargo test | ||
| docker ps rtk docker ps | ||
| kubectl get pods rtk kubectl pods |
Comment on lines
+1
to
+12
| { | ||
| "hooks": { | ||
| "PreToolUse": [ | ||
| { | ||
| "type": "command", | ||
| "command": "rtk hook copilot", | ||
| "cwd": ".", | ||
| "timeout": 5 | ||
| } | ||
| ] | ||
| } | ||
| } |
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.
No description provided.