Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Dec 17, 2024

Describe Your Changes

  1. ModelDropdown Component (index.tsx)

    • Imported atom from jotai.
    • Introduced a new atom modelDropdownStateAtom initialized to false.
    • Updated the state handling of the dropdown's open/close status to use the new atom.
    • Added a useEffect to sync the dropdown open state with the chatInputMode.
  2. useCreateNewThread Hook

    • Removed import and usage of the useRecommendedModel hook.
    • Adjusted logic to set defaultModel without using recommendedModel.
  3. useSendChatMessage Hook

    • Imported modelDropdownStateAtom and added logic to open the model dropdown if no model is selected when sending a chat message.
  4. RichTextEditor Component

    • Added import for selectedModelAtom and used it to determine if the editor should reset after sending a message.
  5. ChatInput Component

    • Added logic to automatically set the input box as active if no model is selected.
    • Slightly reorganized the activeSettingInputBox rendering logic to always include the setting input box with conditionally visible elements based on the selectedModel.

Fixes Issues

CleanShot 2024-12-17 at 15 12 36

CleanShot 2024-12-17 at 15 12 58

CleanShot 2024-12-17 at 15 23 40

CleanShot 2024-12-17 at 15 33 43

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 this to the v0.5.12 milestone Dec 17, 2024
@urmauur urmauur requested a review from louis-jan December 17, 2024 08:35
@urmauur urmauur self-assigned this Dec 17, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2024

@github-actions
Copy link
Contributor

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

@urmauur urmauur merged commit 7d07e99 into dev Dec 18, 2024
9 checks passed
@urmauur urmauur deleted the feat/model-selector branch December 18, 2024 10:37
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.

feat: Prompt user to download model, if no models are available feat: Pick new model in thread if original model is unavailable

3 participants