Conversation
…prove code formatting across multiple files
…, FileSystem.type.ts, and FileSystem.utility.ts
Create FileSystemUtility for Ts Backend
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive File System Utils Class for the TypeScript backend, providing utilities for reading various file formats including CSV, XLSX, PDF, and DOCX files with LangChain integration.
Key changes include:
- Added FileSystemUtility class with methods for file operations and format-specific readers
- Added type definitions for file system operations
- Updated code formatting and removed trailing whitespace across multiple files
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| templates/mern/Ts-Backend/src/utils/FileSystem.utility.ts | New utility class with comprehensive file system operations and document processing |
| templates/mern/Ts-Backend/src/type/FileSystem.type.ts | Type definitions for document and row interfaces |
| templates/mern/Ts-Backend/package.json | Added dependencies for LangChain, xlsx, csv-parser, and pdf-parse |
| templates/mern/Ts-Backend/src/validator/env.validator.ts | Code formatting improvements (quote consistency and line breaks) |
| templates/mern/Ts-Backend/src/utils/SendResponse.utils.ts | Code formatting improvements for better readability |
| Multiple config/source files | Removed trailing whitespace and empty lines |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const firstSheet = sheetNames[0] | ||
| ? workbook.Sheets[sheetNames[0]] | ||
| : undefined; |
There was a problem hiding this comment.
[nitpick] The conditional assignment can be simplified using optional chaining and nullish coalescing for better readability: const firstSheet = workbook.Sheets[sheetNames[0]];
| const firstSheet = sheetNames[0] | |
| ? workbook.Sheets[sheetNames[0]] | |
| : undefined; | |
| const firstSheet = workbook.Sheets?.[sheetNames[0]] ?? undefined; |
|
@abhishek-nexgen-dev , Yeah will see to it. Pls take a look on #149 , #148 . |
@JoeCelaster okay |
|
@abhishek-nexgen-dev , Pls make sure the backend runs properly after selecting typescript as preffered language. Add a sample video of working !. Once done we can merge ! |
JoeCelaster
left a comment
There was a problem hiding this comment.
@abhishek-nexgen-dev , Pls make sure the backend runs properly after selecting typescript as preffered language. Add a sample video of working !. Once done we can merge !
Working on it |
|
@JoeCelaster Bro when you Review it |
Description
Related Issue
Fixes #134
Type of Change
Checklist
Additional Notes
Add anything else reviewers should know.