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: scroll bottom issue #4308

Merged
merged 1 commit into from
Dec 20, 2024
Merged

fix: scroll bottom issue #4308

merged 1 commit into from
Dec 20, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Dec 20, 2024

Describe Your Changes

  1. ModelDropdown Component (index.tsx):

    • Text placeholders have been updated for consistency:
      • Changed "Select Model" to "Select a model" in two different instances.
  2. EmptyThread Component (EmptyThread/index.tsx):

    • Changed the onboarding message text from "You don't have a local model yet." to "You don't have any model."
  3. ChatBody Component (ChatBody/index.tsx):

    • Additional imports include isGeneratingResponseAtom and threadStatesAtom from Thread.atom.
    • Added state checks for generating or streaming responses:
      • isGeneratingResponse is used to check if a response is currently being generated.
      • isStreamingResponse determines if any thread state is waiting for a response.
    • Updated scrolling behavior logic:
      • Ensured that scrolling only happens when it should, based on the generating and streaming states.
      • Refactored handleScroll to account for the isStreamingResponse state, preventing unnecessary callback execution.
      • Updated useEffect to conditionally handle scrolling at appropriate times.

These changes aim to enhance user interaction by providing consistent text prompts and optimizing the chat scrolling experience when new messages are generated or streamed.

Fixes Issues

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 20, 2024
@urmauur urmauur added this to the v0.5.12 milestone Dec 20, 2024
@urmauur urmauur requested a review from louis-jan December 20, 2024 10:32
@urmauur urmauur self-assigned this Dec 20, 2024
@urmauur urmauur merged commit af84a3a into main Dec 20, 2024
16 checks passed
@urmauur urmauur deleted the fix/scroll-bottom-issue branch December 20, 2024 15:39
Copy link
Contributor

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

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