-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use full paths to files in workspace context prompt #330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 3bbbd96 in 19 seconds
More details
- Looked at
45
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. gptme/prompts.py:271
- Draft comment:
The addition of the markdown header# Workspace Context
resolves issue 328 by clearly separating the workspace context section from the previous heading. - Reason this comment was not posted:
Confidence changes required:0%
The PR resolves the issue by adding a markdown header to the workspace context section, which was missing before. This aligns with the requirement to separate it from the previous heading.
2. gptme/prompts.py:259
- Draft comment:
Switching fromglob.glob
toworkspace.glob
is a good change as it aligns with the use ofPath
objects and ensures full paths are used. - Reason this comment was not posted:
Confidence changes required:0%
The PR changes the method of file globbing fromglob.glob
toworkspace.glob
, which is more appropriate forPath
objects and ensures full paths are used.
3. gptme/prompts.py:263
- Draft comment:
The error message correctly reflects the use of file globs, improving clarity when a specified file pattern does not match any files. - Reason this comment was not posted:
Confidence changes required:0%
The PR correctly changes the error message to reflect the use of file globs instead of individual files.
Workflow ID: wflow_KpkHG22ZsUOpWlsX
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
3bbbd96
to
d15d533
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on d15d533 in 35 seconds
More details
- Looked at
45
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_5I5nv174FTKVlNZq
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
# expand with glob | ||
if new_files := glob.glob(file): | ||
if new_files := workspace.glob(fileglob): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspace.glob(fileglob)
returns a generator, not a list. Convert it to a list before extending files
to avoid potential issues.
if new_files := workspace.glob(fileglob): | |
if new_files := list(workspace.glob(fileglob)): |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #330 +/- ##
==========================================
+ Coverage 70.65% 72.68% +2.03%
==========================================
Files 67 67
Lines 4951 4954 +3
==========================================
+ Hits 3498 3601 +103
+ Misses 1453 1353 -100
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Fixes #328 #329
Important
Updates
get_workspace_prompt
to use full file paths and removes unused import ingptme/prompts.py
.get_workspace_prompt
ingptme/prompts.py
now uses full file paths instead of file names in the workspace context prompt.glob
import fromgptme/prompts.py
.This description was created by for d15d533. It will automatically update as commits are pushed.