-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add quick suggestions for include/exclude patterns #45
Add quick suggestions for include/exclude patterns #45
Conversation
Related to cyclotruc#44 Add quick suggestions feature to easily amend include/exclude parameters. * **In `src/gitingest/ingest_from_query.py`**: - Add `generate_suggestions` function to analyze repository and identify common file patterns. - Implement `check_relevance` function to check the relevance of each suggestion. - Add `sort_suggestions` function to sort suggestions based on the number of files or total lines affected. * **In `src/gitingest/cli.py`**: - Add new `--suggestions` option to display quick suggestions for include/exclude patterns. - Update `main` function to include suggestions in the output. * **In `src/gitingest/parse_query.py`**: - Add `normalize_user_added_patterns` function to normalize user-added patterns. - Add `check_user_added_matches_suggestions` function to check if user-added patterns match any suggestions. * **In `src/gitingest/tests/test_ingest.py`**: - Add tests for `generate_suggestions`, `check_relevance`, and `sort_suggestions` functions. * **In `src/static/js/utils.js`**: - Add `toggleSuggestion` function to handle adding/removing suggestions by clicking. - Add `displaySuggestions` function to display suggestions in the web interface. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/cyclotruc/gitingest/issues/44?shareId=XXXX-XXXX-XXXX-XXXX).
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.
Minor edits needed
@@ -1,25 +1,17 @@ | |||
// Copy functionality |
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.
Don't remove the existing comments in this file
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.
While I like this idea of suggestions, this implementation is not ready to merge.
Unit tests are not passing and I couldn't make it work when I tried the CLI
I see that you used AI to generate this code and this is okay. This project draws in people interested in AI coding and I believe it's a great opportunity to experiment and learn together.
That being said, I think you should test your code a bit more to maybe understand why It didn't work when I tried it
relevant_suggestions = [] | ||
base_path = query['local_path'] | ||
for suggestion in suggestions: | ||
if should_include(base_path, base_path, [suggestion]): |
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.
base_path, base_path doesn't use should_include properly
document.addEventListener('DOMContentLoaded', () => { | ||
initializeSlider(); | ||
setupGlobalEnterHandler(); | ||
}); | ||
|
||
function toggleSuggestion(suggestion) { |
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.
The suggestion should not appear in front-end?
@cyclotruc Thank you for reviewing! I'm afraid I won't be able to make a good PR for #44, I'm happy to close this and just keep the feature request open. Let me know in case you'd like me to reopen this PR. All the best! |
It's all good, the issue will help us frame the discussion and so this helps already |
Related to #44
Add quick suggestions feature to easily amend include/exclude parameters.
In
src/gitingest/ingest_from_query.py
:generate_suggestions
function to analyze repository and identify common file patterns.check_relevance
function to check the relevance of each suggestion.sort_suggestions
function to sort suggestions based on the number of files or total lines affected.In
src/gitingest/cli.py
:--suggestions
option to display quick suggestions for include/exclude patterns.main
function to include suggestions in the output.In
src/gitingest/parse_query.py
:normalize_user_added_patterns
function to normalize user-added patterns.check_user_added_matches_suggestions
function to check if user-added patterns match any suggestions.In
src/gitingest/tests/test_ingest.py
:generate_suggestions
,check_relevance
, andsort_suggestions
functions.In
src/static/js/utils.js
:toggleSuggestion
function to handle adding/removing suggestions by clicking.displaySuggestions
function to display suggestions in the web interface.For more details, open the Copilot Workspace session.