mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
✨ feat(model): improve model list UI and add disabled models management (#11036)
* ✨ feat(model): improve model list UI and add disabled models management - Enhanced DisabledModels component with better UI/UX - Updated ModelList layout and interactions - Added repository methods for disabled model management - Improved AI model service and router functionality - Added tests for new functionality * ✨ feat(DisabledModels): enhance loading and rendering logic for disabled models - Implemented pagination and dynamic loading for disabled models - Improved state management for visible models and loading conditions - Ensured unique model entries in the displayed list - Updated component to handle provider changes effectively Signed-off-by: Innei <tukon479@gmail.com> * fix(DisabledModels): handle edge case for last page in pagination logic - Added a check to ensure lastPage is defined before evaluating pagination end conditions - Improved robustness of loading state management in DisabledModels component Signed-off-by: Innei <tukon479@gmail.com> * lint * lint * lint --------- Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ const { spawnMock } = vi.hoisted(() => ({
|
||||
}));
|
||||
|
||||
vi.mock('node:child_process', () => ({
|
||||
spawn: (...args: any[]) => spawnMock(...args),
|
||||
spawn: (...args: any[]) => spawnMock.call(null, ...args),
|
||||
}));
|
||||
|
||||
// Mock electron
|
||||
@@ -229,7 +229,9 @@ describe('SystemController', () => {
|
||||
|
||||
await invokeIpc('system.openFullDiskAccessSettings');
|
||||
|
||||
expect(shell.openExternal).toHaveBeenCalledWith('com.apple.settings:Privacy&path=FullDiskAccess');
|
||||
expect(shell.openExternal).toHaveBeenCalledWith(
|
||||
'com.apple.settings:Privacy&path=FullDiskAccess',
|
||||
);
|
||||
expect(shell.openExternal).toHaveBeenCalledWith(
|
||||
'x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user