Added twMerge from tailwind-merge to conditionally apply Tailwind CSS classes.
Modified the className prop of the SliderPrimitive.Root component to use twMerge for dynamic class names based on whether the slider is disabled.
Slider Styles:
Added styles for a disabled state in styles.scss, making the cursor unavailable and reducing opacity when the slider is disabled.
Atom Updates:
Added a new atom LocalAPIserverModelParamsAtom in LocalServer.atom.ts.
Updated imports and uses of serverEnabledAtom and selectedModelAtom across various components to ensure consistency and access to these atoms.
Left Panel Enhancements:
Imported necessary types from @janhq/core for better type safety.
Used EngineManager and Model to manage model loading more effectively.
Enhanced the logic to handle overridden settings, specifically setting ctx_len to 4096 if it's greater than 2048.
Right Panel Enhancements:
Added a new state management function onUpdateParams to update the LocalAPIserverModelParamsAtom.
Ensured that the disabled prop is passed down to ModelSetting and EngineSetting components to reflect the server's enabled status.
These changes aim to improve the user interface, enhance type safety, and provide more dynamic control over model settings in a local server environment.
Describe Your Changes
Slider Component Enhancements:
twMerge
fromtailwind-merge
to conditionally apply Tailwind CSS classes.className
prop of theSliderPrimitive.Root
component to usetwMerge
for dynamic class names based on whether the slider is disabled.Slider Styles:
styles.scss
, making the cursor unavailable and reducing opacity when the slider is disabled.Atom Updates:
LocalAPIserverModelParamsAtom
inLocalServer.atom.ts
.serverEnabledAtom
andselectedModelAtom
across various components to ensure consistency and access to these atoms.Left Panel Enhancements:
@janhq/core
for better type safety.EngineManager
andModel
to manage model loading more effectively.ctx_len
to 4096 if it's greater than 2048.Right Panel Enhancements:
onUpdateParams
to update theLocalAPIserverModelParamsAtom
.disabled
prop is passed down toModelSetting
andEngineSetting
components to reflect the server's enabled status.These changes aim to improve the user interface, enhance type safety, and provide more dynamic control over model settings in a local server environment.
Fixes Issues
Self Checklist