Skip to content
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

feat: added support for attached images #14

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

ErikBjare
Copy link
Owner

@ErikBjare ErikBjare commented Feb 7, 2025

Depends on ErikBjare/gptme#440

Copy link

@ellipsis-dev ellipsis-dev bot left a 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 7a4a15a in 1 minute and 48 seconds

More details
  • Looked at 172 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 10 drafted comments based on config settings.
1. src/components/ChatMessage.tsx:28
  • Draft comment:
    Consider stronger sanitization for file paths to prevent potential directory traversal vulnerabilities.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. src/components/ChatMessage.tsx:50
  • Draft comment:
    Image onError handler: Ensure consistency in error messaging for security and UX.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the author to ensure consistency in error messaging, which is a general request for verification. It doesn't provide a specific suggestion or point out a specific issue in the code. This violates the rule against asking the author to ensure behavior is intended or tested.
3. src/components/ChatMessage.tsx:147
  • Draft comment:
    Consider memoizing the parsed markdown to improve performance on static content.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
4. src/components/ConversationContent.tsx:126
  • Draft comment:
    Passing conversation name as conversationId; ensure that conversation.name is a safe and stable identifier.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    This comment falls into the category of asking developers to "verify" or "ensure" something, which is against our rules. It's not pointing out a clear issue that needs fixing. If conversation.name wasn't stable, it would likely cause obvious issues in the query key usage. The comment is speculative rather than identifying a concrete problem.
    Perhaps conversation.name could actually be problematic if it's not unique or stable, which could affect React keys and query caching.
    While that's a valid concern, the comment doesn't provide evidence of an actual problem. If there were stability issues, they would manifest in React key conflicts or query caching problems. The comment is just asking for verification without pointing to a specific issue.
    Delete this comment as it violates the rule against asking developers to verify things and doesn't point out a concrete issue that needs fixing.
5. src/components/__tests__/ChatMessage.test.tsx:38
  • Draft comment:
    Add tests for rendering attached image files to cover new functionality.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. src/components/ChatMessage.tsx:50
  • Draft comment:
    The onError handler checks img.src for '..' even after sanitization. Consider comparing the original filename instead.
  • Reason this comment was not posted:
    Marked as duplicate.
7. src/components/ChatMessage.tsx:21
  • Draft comment:
    Consider memoizing the renderFiles function using useCallback to avoid recreating it on every render.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
8. src/components/ChatMessage.tsx:29
  • Draft comment:
    Ensure that the conversationId used in constructing fileUrl is URL safe; using conversation.name may introduce unsafe characters.
  • Reason this comment was not posted:
    Marked as duplicate.
9. src/components/ConversationContent.tsx:126
  • Draft comment:
    Review the use of conversation.name as the conversationId prop. Verify it is intended as a unique and URL-safe identifier.
  • Reason this comment was not posted:
    Marked as duplicate.
10. src/components/__tests__/ChatMessage.test.tsx:14
  • Draft comment:
    Add tests to cover file attachment rendering (for both image and non-image files) to fully verify new functionality.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_2pVflCBOBlgCb4t7


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ErikBjare ErikBjare merged commit 2e9a316 into main Feb 7, 2025
1 check passed
@ErikBjare ErikBjare mentioned this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant