-
Notifications
You must be signed in to change notification settings - Fork 0
Jules was unable to complete the task in time. Please review the work… #66
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| from .models import EmailCreate, EmailUpdate, CategoryCreate, ActivityCreate | ||
| # Updated import to use NLP GmailAIService directly | ||
| from server.python_nlp.gmail_service import GmailAIService | ||
| # Removed: from .smart_filters import EmailFilter (as per instruction) | ||
| from server.python_nlp.smart_filters import SmartFilterManager | ||
| from .ai_engine import AdvancedAIEngine | ||
| from .performance_monitor import PerformanceMonitor | ||
|
|
@@ -250,7 +251,7 @@ async def create_email( | |
| """Create new email with AI analysis""" | ||
| try: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (code-quality): Explicitly raise from a previous error [×2] ( |
||
| # Perform AI analysis | ||
| ai_analysis = await ai_engine.analyze_email(email.subject, email.content) | ||
| ai_analysis = ai_engine.analyze_email(email.subject, email.content) # Changed to synchronous | ||
|
|
||
| # Apply smart filters | ||
| filter_results = await filter_manager.apply_filters_to_email(email.dict()) | ||
|
|
@@ -610,22 +611,17 @@ async def get_filters(request: Request): | |
| async def create_filter(request: Request, filter_request_model: FilterRequest): # Renamed model | ||
| """Create new email filter""" | ||
| try: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (code-quality): We've found these issues:
|
||
| # Assuming filter_manager.create_filter (or add_custom_filter) takes a dict or an EmailFilter object | ||
| # The smart_filters.py in context had add_custom_filter(EmailFilter(...)) | ||
| # and no create_filter. This might need adjustment in SmartFilterManager or here. | ||
| # For now, assuming a compatible create_filter or add_custom_filter exists. | ||
| # Let's assume add_custom_filter is the intended method from previous context for adding new filters. | ||
| from .smart_filters import EmailFilter # Ensure EmailFilter is available for instantiation | ||
| new_filter_config = EmailFilter( | ||
| description = filter_request_model.criteria.get("description", "") | ||
|
|
||
| new_filter_object = filter_manager.add_custom_filter( | ||
| name=filter_request_model.name, | ||
| description=filter_request_model.criteria.get("description", ""), # Assuming description might be in criteria | ||
| description=description, | ||
| criteria=filter_request_model.criteria, | ||
| action=filter_request_model.actions.get("type", ""), # Assuming actions dict has a 'type' for the action name | ||
| priority=filter_request_model.priority, | ||
| enabled=True | ||
| actions=filter_request_model.actions, | ||
| priority=filter_request_model.priority | ||
| ) | ||
| filter_manager.add_custom_filter(new_filter_config) # Using add_custom_filter | ||
| return new_filter_config.__dict__ # Return the created filter as dict | ||
| # FastAPI will handle dataclass serialization to JSON | ||
| return new_filter_object | ||
| except Exception as e: | ||
| logger.error( | ||
| json.dumps({ | ||
|
|
@@ -717,10 +713,10 @@ async def extract_actions_from_text( | |
|
|
||
| logger.info(f"Received action extraction request for subject: '{request_model.subject[:50] if request_model.subject else 'N/A'}'") | ||
|
|
||
| ai_analysis_result = await ai_engine.analyze_email( | ||
| ai_analysis_result = ai_engine.analyze_email( | ||
| subject=request_model.subject or "", # Pass empty string if subject is None | ||
| content=request_model.content | ||
| ) | ||
| ) # Changed to synchronous | ||
|
|
||
| # The AIAnalysisResult object should have an 'action_items' attribute | ||
| action_items_data = ai_analysis_result.action_items | ||
|
|
||
Oops, something went wrong.
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.
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.
issue (bug_risk): HAS_NLTK not defined on NLPEngine instance
Reference HAS_NLTK directly from the module or assign it to self in NLPEngine.init to prevent AttributeError.