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

fix: empty tooltip on attachment icon, also fix z-index #4290

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Dec 18, 2024

Describe Your Changes

  1. In web/screens/Hub/ModelList/ModelHeader/index.tsx:

    • The z-50 class was removed from the Button component. This class might have been related to the z-index, and its removal suggests a possible simplification or a fix for a styling issue.
  2. In web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx:

    • The isModelSupportRagAndTools constant has been refined to focus solely on the result of isLocalEngine(selectedModel?.engine as InferenceEngine). Previously, it also checked if selectedModel?.engine === InferenceEngine.openai.
    • The logic for the disabled property of certain elements has been updated to disable the button if !isModelSupportRagAndTools instead of isModelSupportRagAndTools.
    • The text list item’s className logic was updated to disable user interaction with a "cursor-not-allowed opacity-50" class when isModelSupportRagAndTools is false, reflecting conditions under which interaction should be permissible.
    • For handling file input clicks, the code now checks if isModelSupportRagAndTools is true before executing the file input click and closing the attachment menus. This check prevents actions when the conditions do not support them.

These changes aim to clean up the code, refactor conditions for clarity, and ensure user interfaces respond correctly to model support conditions.

Fixes Issues

CleanShot 2024-12-18 at 15 13 00
CleanShot 2024-12-18 at 15 12 44

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur urmauur added the type: bug Something isn't working label Dec 18, 2024
@urmauur urmauur added this to the v0.5.12 milestone Dec 18, 2024
@urmauur urmauur requested a review from louis-jan December 18, 2024 08:14
@urmauur urmauur self-assigned this Dec 18, 2024
Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

Copy link
Contributor

Barecheck - Code coverage report

Total: 69.08%

Your code coverage diff: -0.02% ▾

Uncovered files and lines
FileLines
web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx81, 89, 94, 107-111, 121-123, 128, 131, 157, 166, 172, 174, 240-242, 264-266, 295, 318, 370-372, 374-376, 378-380, 382, 386-387, 399

@urmauur urmauur merged commit ffdea36 into dev Dec 19, 2024
21 checks passed
@urmauur urmauur deleted the fix/empty-tooltip-attachment branch December 19, 2024 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants