jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: remote engine management

Open urmauur opened this issue 1 month ago • 2 comments

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 and EngineMetadata types in core/src/types/engine/index.ts to encapsulate engine configuration and metadata details.
  • Updated methods in EngineManagementExtension and JSONEngineManagementExtension to use the new EngineConfig type, improving consistency and flexibility.

New Functionality:

  • Introduced a new method getRemoteModels in EngineManagementExtension and JSONEngineManagementExtension to fetch remote models.

User Interface Updates:

  • Added showSettingActiveRemoteEngineAtom to manage the state of active remote engines in web/helpers/atoms/Extension.atom.ts.
  • Created a new component LocalEngineItems to display and manage local engine settings in web/screens/Settings/Engines/LocalEngineItem.tsx.
  • Renamed Settings.tsx to LocalEngineSettings.tsx and updated its content to reflect the changes in engine management.

Dependency Updates:

  • Added new dependencies @hookform/resolvers, react-hook-form, and zod to web/package.json for improved form handling and validation.

Fixes Issues

  • [X] Form to add new remote engine

CleanShot 2024-12-30 at 22 14 18

CleanShot 2024-12-30 at 22 14 24

  • [X] Show remote engine list in Engine setting page
  • [X] Show remote engine list in setting left panel based toggle active

CleanShot 2024-12-30 at 22 15 30

  • [X] Detail page for remote engine

CleanShot 2024-12-30 at 22 17 49

  • [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

urmauur avatar Dec 30 '24 15:12 urmauur