diff --git a/routes/document_routes.py b/routes/document_routes.py
index dae8b09fa2..fa09bb8acb 100644
--- a/routes/document_routes.py
+++ b/routes/document_routes.py
@@ -576,6 +576,7 @@ async def documents_export_zip(request: Request):
"sql": ".sql", "rust": ".rs", "go": ".go", "java": ".java", "c": ".c",
"cpp": ".cpp", "typescript": ".ts", "ruby": ".rb", "php": ".php",
"text": ".txt", "xml": ".xml", "toml": ".toml", "ini": ".ini",
+ "latex": ".tex",
}
db = SessionLocal()
try:
diff --git a/src/agent_tools/document_tools.py b/src/agent_tools/document_tools.py
index 65ee0461ec..fea6d70ad5 100644
--- a/src/agent_tools/document_tools.py
+++ b/src/agent_tools/document_tools.py
@@ -104,6 +104,9 @@ def _sniff_doc_language(text: str) -> str:
if (hl.startswith("ruby
+
@@ -9346,6 +9347,7 @@ import { bindMenuDismiss, dismissOrRemove } from './escMenuStack.js';
sql: '.sql', rust: '.rs', go: '.go', java: '.java', c: '.c', cpp: '.cpp', csharp: '.cs',
typescript: '.ts', ruby: '.rb', php: '.php', text: '.txt',
xml: '.xml', toml: '.toml', ini: '.ini', csv: '.csv',
+ latex: '.tex',
};
const ext = extMap[lang] || '.txt';
const safeName = title.replace(/[^a-zA-Z0-9_\-. ]/g, '_').trim() || 'document';
@@ -9373,6 +9375,7 @@ import { bindMenuDismiss, dismissOrRemove } from './escMenuStack.js';
'.java':'java','.c':'c','.cpp':'cpp','.h':'c','.hpp':'cpp',
'.rb':'ruby','.php':'php','.xml':'xml','.toml':'toml','.ini':'ini',
'.txt':'','.log':'','.csv':'csv','.tsv':'csv','.jsx':'javascript','.tsx':'typescript',
+ '.tex':'latex',
};
const fi = document.createElement('input');
fi.type = 'file';
@@ -9470,6 +9473,7 @@ import { bindMenuDismiss, dismissOrRemove } from './escMenuStack.js';
sql: '.sql', rust: '.rs', go: '.go', java: '.java', c: '.c', cpp: '.cpp', csharp: '.cs',
typescript: '.ts', ruby: '.rb', php: '.php', text: '.txt',
xml: '.xml', toml: '.toml', ini: '.ini', csv: '.csv',
+ latex: '.tex',
};
const ext = extMap[lang] || '.txt';
diff --git a/static/js/documentLibrary.js b/static/js/documentLibrary.js
index c9f163c49a..18ea9e0b3f 100644
--- a/static/js/documentLibrary.js
+++ b/static/js/documentLibrary.js
@@ -1488,6 +1488,7 @@ let _libraryArchivedView = false; // Documents tab showing archived docs?
'.csv': 'csv', '.tsv': 'csv',
'.xlsx': 'csv', '.xls': 'csv', '.ods': 'csv',
'.docx': 'markdown', '.doc': 'markdown',
+ '.tex': 'latex',
};
let imported = 0;