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

Created list of supported ChatCraftProviders #449

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Created list of supported ChatCraftProviders #449

merged 1 commit into from
Feb 14, 2024

Conversation

kliu57
Copy link
Collaborator

@kliu57 kliu57 commented Feb 13, 2024

Closes #423

Summary:

  • Settings API URL field now displays list of supportedProviders which is stored in ChatCraftProvider.ts

image

Code changes in this PR:

src/components/PreferencesModal.tsx:

  • Modified code of the event handler of the API URL dropdown field, so that it iterates through the list of supportedProviders

src/lib/ChatCraftProvider.ts:

  • Moved ProviderData (associative array of ChatCraftProvider) from src/lib/settings.ts to src/lib/ChatCraftProvider.ts since it is something that is solely used by settings
  • Added supportedProviders (list of currently supported providers)

src/lib/settings.ts:

  • Moved ProviderData out of this file, see above explanation

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4fd6d92
Status: ✅  Deploy successful!
Preview URL: https://dbcc9317.console-overthinker-dev.pages.dev
Branch Preview URL: https://issue-423.console-overthinker-dev.pages.dev

View logs

@kliu57 kliu57 marked this pull request as ready for review February 14, 2024 00:00
@kliu57 kliu57 self-assigned this Feb 14, 2024
@kliu57 kliu57 added this to the Release 1.3 milestone Feb 14, 2024
Copy link
Collaborator

@Amnish04 Amnish04 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. Just requesting a minor cosmetic change.

src/lib/ChatCraftProvider.ts Show resolved Hide resolved
@kliu57 kliu57 dismissed Amnish04’s stale review February 14, 2024 13:36

ESLint or Prettier will not allow the quotations

@kliu57 kliu57 merged commit bb286b2 into main Feb 14, 2024
4 checks passed
@Amnish04
Copy link
Collaborator

Right, sorry didn't realize that

@kliu57 kliu57 deleted the issue-423 branch February 14, 2024 13:52
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.

Refactor settings API URL dropdown to read from list of ChatCraftProvider
3 participants