mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
🔧 chore: Update ESLint config, Import Sorting script, Test Sharding, Bump @librechat/agents (#13552)
* 🔧 chore: Update ESLint config, add import sorting script, Test Sharding, Bump `@librechat/agents`
* Change 'no-nested-ternary' rule from 'warn' to 'error' in ESLint config
* Add new scripts for sorting imports in the project
* Update lint-staged configuration to include import sorting
* Modify GitHub Actions workflows to support sharding for unit tests
* chore: remove nested ternary expressions
* refactor: Extract scale multiplier logic into a separate function in CircleRender component
* refactor: Simplify auto-refill rendering logic in Balance component for better readability
* refactor: Improve width style handling in DataTable components for clarity and maintainability
* chore: remove CircleRender component
* delete: Remove CircleRender component as it is no longer needed in the project
* chore: Bump @librechat/agents to version 3.2.31 and update Node.js engine requirement
* Update @librechat/agents dependency from 3.2.2 to 3.2.31 in package-lock.json, api/package.json, and packages/api/package.json
* Change Node.js engine requirement from >=20.0.0 to >=24.0.0 in @librechat/agents
* chore: Add import sorting check to ESLint CI workflow
* Implement a new job in the GitHub Actions workflow to verify import ordering on changed files.
* The job checks for changes in specific file types and reports any import order drift, providing instructions for local fixes.
This commit is contained in:
parent
21607ba3d7
commit
bfb6b224d2
16 changed files with 396 additions and 114 deletions
|
|
@ -421,11 +421,12 @@ describe('extractCodeArtifactText', () => {
|
|||
['deck', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],
|
||||
])('routes extensionless office files by MIME alone (%s, %s)', async (name, mime) => {
|
||||
mockOfficeHtml.mockResolvedValueOnce('<!DOCTYPE html><body>x</body></html>');
|
||||
const category = mime.includes('presentation')
|
||||
? 'pptx'
|
||||
: mime.startsWith('text/')
|
||||
? 'utf8-text'
|
||||
: 'document';
|
||||
let category: 'pptx' | 'utf8-text' | 'document' = 'document';
|
||||
if (mime.includes('presentation')) {
|
||||
category = 'pptx';
|
||||
} else if (mime.startsWith('text/')) {
|
||||
category = 'utf8-text';
|
||||
}
|
||||
const text = await extractCodeArtifactText(Buffer.from('PK'), name, mime, category);
|
||||
expect(mockOfficeHtml).toHaveBeenCalledWith(expect.any(Buffer), name, mime);
|
||||
expect(text).toContain('<body>');
|
||||
|
|
|
|||
|
|
@ -987,12 +987,12 @@ function renderPptxSlidesBody(slides: PptxSlide[]): string {
|
|||
const titleHtml = slide.title
|
||||
? `<h2 class="lc-pptx-slide-title">${escapeHtml(slide.title)}</h2>`
|
||||
: '';
|
||||
const bodyHtml =
|
||||
slide.body.length > 0
|
||||
? `<ul class="lc-pptx-slide-body">${slide.body.map((line) => `<li>${escapeHtml(line)}</li>`).join('')}</ul>`
|
||||
: !slide.title
|
||||
? '<p class="lc-pptx-slide-empty">(empty slide)</p>'
|
||||
: '';
|
||||
let bodyHtml = '';
|
||||
if (slide.body.length > 0) {
|
||||
bodyHtml = `<ul class="lc-pptx-slide-body">${slide.body.map((line) => `<li>${escapeHtml(line)}</li>`).join('')}</ul>`;
|
||||
} else if (!slide.title) {
|
||||
bodyHtml = '<p class="lc-pptx-slide-empty">(empty slide)</p>';
|
||||
}
|
||||
return `<li class="lc-pptx-slide">
|
||||
<span class="lc-pptx-slide-number">Slide ${slide.number}</span>
|
||||
${titleHtml}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue