This commit fixes an issue in the ConfigStore where model updates were not being handled correctly. The code now properly updates the models in the newConfig object and sets the needUpdate flag when necessary. This ensures that the models are updated accurately and consistently.
- Added conditional check to prevent error when modelArray is empty
- Moved axios request into try-catch block to handle network errors
- Modified refreshModelList to handle fetchLLMs errors gracefully
- Adjusted default model assignment to use first available model if default is not found
- Corrected model list retrieval parameters to prevent errors with empty model lists
- Updated provider and API base URLs based on configuration settings
- Add forced model list refresh after reading configuration
- Remove unnecessary modelMenus registration and fetching
- Replace modelMenus with config.modelNames for consistency and reliability
- Enclose if statement body with braces for better readability
- Remove redundant and unused model list fetching code
Closes#360
- Removed axios dependency and complex API key handling in App.tsx
- Ensured safe navigation with optional chaining for devchat API paths
- Added concise return statements in Config.tsx conditionals for clarity
- Streamline the initialization of config models and providers
- Ensure default provider settings for openai and devchat on first access
- Improve code readability and efficiency by using logical OR for defaults
- Added IconFile import for better UI representation in NewFileButton
- Integrated language support for NewFileButton to handle different coding languages
- Adjusted NewFileButton component's props to include language for file creation command
Closes#171
- Implemented a NewFileButton component in MessageMarkdown
- NewFileButton enables users to create a file directly from code block
- Integrated the NewFileButton into the CodeButtons component UI
Closes#171
- Revised chat help instructions for clarity in zh.json.
- Minor adjustment to chat introduction message in ChatStore.ts.
- Removed redundant mention of "+" button functionality in zh.json and ChatStore.ts instructions.