mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-24 16:46:33 +01:00
🔄 chore: Consolidate agent model imports across middleware and tests from rebase
- Updated imports for `createAgent` and `getAgent` to streamline access from a unified `~/models` path. - Enhanced test files to reflect the new import structure, ensuring consistency and maintainability across the codebase. - Improved clarity by removing redundant imports and aligning with the latest model updates.
This commit is contained in:
parent
a0fed6173c
commit
dd72b7b17e
5 changed files with 7 additions and 7 deletions
|
|
@ -58,8 +58,8 @@ jest.mock('~/cache', () => ({
|
|||
}));
|
||||
|
||||
const { initializeClient } = require('./initialize');
|
||||
const { createAgent } = require('~/models/Agent');
|
||||
const { User, AclEntry } = require('~/db/models');
|
||||
const { createAgent } = require('~/models');
|
||||
|
||||
const PRIMARY_ID = 'agent_primary';
|
||||
const TARGET_ID = 'agent_target';
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ jest.mock('~/server/services/PermissionService', () => ({
|
|||
checkPermission: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('~/models/Agent', () => ({
|
||||
jest.mock('~/models', () => ({
|
||||
getAgent: jest.fn(),
|
||||
}));
|
||||
|
||||
const { logger } = require('@librechat/data-schemas');
|
||||
const { Constants, PermissionBits, ResourceType } = require('librechat-data-provider');
|
||||
const { checkPermission } = require('~/server/services/PermissionService');
|
||||
const { getAgent } = require('~/models/Agent');
|
||||
const { getAgent } = require('~/models');
|
||||
const { filterFilesByAgentAccess, hasAccessToFilesViaAgent } = require('./permissions');
|
||||
|
||||
const AUTHOR_ID = 'author-user-id';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue