This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
forked from ChatGPTNextWeb/NextChat
-
Notifications
You must be signed in to change notification settings - Fork 8
Better TypeScript not a javascript #222
Draft
H0llyW00dzZ
wants to merge
18
commits into
main
Choose a base branch
from
refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
H0llyW00dzZ
commented
Dec 28, 2023
- [+] fix(chat.ts): import getProviderFromState function from utils
- [+] refactor(chat.ts): remove unused code related to text moderation
- [+] refactor(chat.ts): simplify logic for skipping text moderation for certain providers
- [+] refactor(chat.ts): change 'var' to 'let' for variable 'api'
CodeQL analysis is complete for PR #222 |
9b8dc2e
to
cca36d6
Compare
- [+] fix(chat.ts): import getProviderFromState function from utils - [+] refactor(chat.ts): remove unused code related to text moderation - [+] refactor(chat.ts): simplify logic for skipping text moderation for certain providers - [+] refactor(chat.ts): change 'var' to 'let' for variable 'api'
- [+] fix(config.ts): change textmoderation default value from true to false - [+] chore(config.ts): update version to 4.6 and add migration logic for textmoderation
- [+] fix(chat.ts): fix condition grouping for text moderation checks
- [+] refactor(openai.ts): remove text moderation logic from chat method
- [+] feat(chat.tsx): add import statement for ChatOptions from "../client/api" - [+] refactor(chat.tsx): extract handleChatCommand function from doSubmit function - [+] refactor(chat.tsx): extract submitText function from doSubmit function - [+] refactor(chat.tsx): extract sendMessage function from doSubmit function - [+] refactor(chat.tsx): extract findUserMessageForResend helper function - [+] refactor(chat.tsx): extract findBotMessageForResend helper function - [+] refactor(chat.tsx): refactor onResend function to use helper functions - [+] refactor(chat.tsx): refactor doSubmit function to use sendMessage function - [+] refactor(chat.tsx): refactor doSubmit function to use setAutoScroll function - [+] refactor(chat.tsx): refactor doSubmit function to clear input field and local state - [+] refactor(chat.tsx): refactor doSubmit function to focus on input field after submission - [+] refactor(chat.tsx): refactor onResend function to use chatOptions object with onFinish property - [+] refactor(chat.tsx): refactor onResend function to use chatOptions object with messages property - [+] refactor(chat.tsx): refactor onResend function to use chatOptions object with config property - [+] refactor(chat.tsx): refactor onResend function to use chatOptions object with whitelist property - [+] refactor(chat.tsx): refactor onResend function to use setIsLoading function - [+] refactor(chat.tsx): refactor onResend function to delete botMessage only if it exists - [+] refactor(chat.tsx): refactor onResend function to focus on input field after resending
- [+] fix(utils.ts): add import statements for ModelProvider and ServiceProvider - [+] refactor(utils.ts): refactor getProviderFromState function to handle enum values correctly - [+] feat(utils.ts): add helper functions isServiceProvider and isModelProvider to check enum values in getProviderFromState function
- [+] refactor(utils.ts): remove unnecessary type casting in getProviderFromState function - [+] fix(utils.ts): throw error when provider is not a valid ServiceProvider
- [+] feat(chat.tsx): add support for DEFAULT_MODELS constant - [+] feat(chat.tsx): add helper function isGoogleAI to check if model is provided by Google - [+] feat(chat.tsx): add textModerationEnabled variable to access text moderation state - [+] feat(chat.tsx): add modelProviderName variable to access model name from session - [+] feat(chat.tsx): update sendMessage function to handle text moderation result and loading state - [+] feat(chat.tsx): update doSubmit function to send message, handle response, and clear input field - [+] feat(chat.tsx): update _Chat function to use helper functions to find user and bot messages
- [+] fix(chat.tsx): remove unnecessary await keyword before submitText function call
- [+] feat(chat.tsx): add support for isGoogleAI helper function - [+] feat(utils.ts): add isGoogleAI helper function - [+] feat(chat.tsx): add support for findUserMessageForResend helper function - [+] feat(chat.tsx): add support for findBotMessageForResend helper function
- [+] fix(constant.ts): fix UNFINISHED_INPUT function to use template literals instead of string concatenation - [+] feat(constant.ts): add type definitions for Provider and Model - [+] feat(constant.ts): update DEFAULT_MODELS array to include provider information for each model
- [+] fix(chat.ts): fix type error in fillTemplateWith function - [+] feat(chat.ts): add ModelName type for modelConfig.model
- [+] fix(openai.ts): fix models() method to correctly map DEFAULT_MODELS to LLMModel type
- [+] refactor(common.ts): modify requestOpenai function to handle multiple providers for custom models - [+] feat(common.ts): add support for LLMModelProvider in collectModelTable function
- [+] refactor(utils.ts): simplify logic for checking if a model is a Google AI model - [+] fix(utils.ts): fix comment to accurately describe the fallback behavior
- [+] feat(constant.ts): add support for new GPT-4-32k models
- [+] refactor(constant.ts): update provider id, name, and type for Gopher Secret model
- [+] chore(model-config.tsx): remove unused import of ModelProvider - [+] chore(model-config.tsx): add TODO comment for listing all models based on the provider
a95fde7
to
c281732
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.