jan
jan copied to clipboard
feat: remote engine management
Describe Your Changes
This pull request introduces several changes related to engine management, including the addition of new types, modifications to existing methods, and updates to the user interface for handling engines. The most important changes are summarized below:
Engine Management Enhancements:
- Added
EngineConfig
andEngineMetadata
types incore/src/types/engine/index.ts
to encapsulate engine configuration and metadata details. - Updated methods in
EngineManagementExtension
andJSONEngineManagementExtension
to use the newEngineConfig
type, improving consistency and flexibility.
New Functionality:
- Introduced a new method
getRemoteModels
inEngineManagementExtension
andJSONEngineManagementExtension
to fetch remote models.
User Interface Updates:
- Added
showSettingActiveRemoteEngineAtom
to manage the state of active remote engines inweb/helpers/atoms/Extension.atom.ts
. - Created a new component
LocalEngineItems
to display and manage local engine settings inweb/screens/Settings/Engines/LocalEngineItem.tsx
. - Renamed
Settings.tsx
toLocalEngineSettings.tsx
and updated its content to reflect the changes in engine management.
Dependency Updates:
- Added new dependencies
@hookform/resolvers
,react-hook-form
, andzod
toweb/package.json
for improved form handling and validation.
Fixes Issues
- [X] Form to add new remote engine
- [X] Show remote engine list in Engine setting page
- [X] Show remote engine list in setting left panel based toggle active
- [X] Detail page for remote engine
-
[x] Migration remote engine from extension, need @louis-jan help
-
Closes #4251
-
Closes #4364
Self Checklist
- [ ] Added relevant comments, esp in complex areas
- [ ] Updated docs (for bug fixes / features)
- [ ] Created issues for follow-up changes or refactoring needed