mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
🗃️ feat: Code Interpreter File Persistence between Sessions (#6790)
* refactor: Enhance FileContainer with customizable button and container styles, onClick button handling, and type override * refactor: Update file type handling to support partial file objects * refactor: Extract download handling into a custom hook for improved reusability * refactor: Replace LogContent with Stdout component and enhance Attachment rendering for added visibility * feat: Update @librechat/agents to version 2.4.1 for referencing generated files in subsequent code interpreter uses * feat: Add support for tab-separated values (TSV) in mime type handling and improve error logging for regex patterns * chore: Update @librechat/agents to version 2.4.11 for better `session_id` instructions when wanting to persist files between executions * chore: Update @librechat/agents to version 2.4.12 for improved functionality * fix: Enhance argument parsing in useParseArgs to support JSON input and improve code extraction * refactor: Update input handling in useAutoSave to require more than one character before saving to local storage
This commit is contained in:
parent
910c73359b
commit
5d668748f9
12 changed files with 113 additions and 30 deletions
|
|
@ -112,7 +112,7 @@ export const excelMimeTypes =
|
|||
/^application\/(vnd\.ms-excel|msexcel|x-msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls|vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet)$/;
|
||||
|
||||
export const textMimeTypes =
|
||||
/^(text\/(x-c|x-csharp|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv))$/;
|
||||
/^(text\/(x-c|x-csharp|tab-separated-values|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv))$/;
|
||||
|
||||
export const applicationMimeTypes =
|
||||
/^(application\/(epub\+zip|csv|json|pdf|x-tar|typescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)|xml|zip))$/;
|
||||
|
|
@ -152,6 +152,7 @@ export const codeTypeMapping: { [key: string]: string } = {
|
|||
yml: 'application/x-yaml',
|
||||
yaml: 'application/x-yaml',
|
||||
log: 'text/plain',
|
||||
tsv: 'text/tab-separated-values',
|
||||
};
|
||||
|
||||
export const retrievalMimeTypes = [
|
||||
|
|
@ -230,7 +231,7 @@ export const convertStringsToRegex = (patterns: string[]): RegExp[] =>
|
|||
const regex = new RegExp(pattern);
|
||||
acc.push(regex);
|
||||
} catch (error) {
|
||||
console.error(`Invalid regex pattern "${pattern}" skipped.`);
|
||||
console.error(`Invalid regex pattern "${pattern}" skipped.`, error);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue