From 7eea3ef3136b8b24895fd60064d2b99ce499ef2b Mon Sep 17 00:00:00 2001 From: Marclass Date: Tue, 23 Jan 2024 00:00:07 -0700 Subject: [PATCH] copy list of file ext from backend to front end --- backend/apps/rag/main.py | 4 ++-- src/lib/constants.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/apps/rag/main.py b/backend/apps/rag/main.py index 44cb78f3..4ceae2a8 100644 --- a/backend/apps/rag/main.py +++ b/backend/apps/rag/main.py @@ -149,9 +149,9 @@ def store_doc( text_xml=["xml"] octet_markdown=["md"] known_source_ext=[ - "go", "py", "java", "sh", "bat", "ps1", "cmd", "js", + "go", "py", "java", "sh", "bat", "ps1", "cmd", "js", "ts", "css", "cpp", "hpp","h", "c", "cs", "sql", "log", "ini", - "pl" "pm", "r", "dart", "dockerfile", "env", "php", "hs", + "pl", "pm", "r", "dart", "dockerfile", "env", "php", "hs", "hsc", "lua", "nginxconf", "conf", "m", "mm", "plsql", "perl", "rb", "rs", "db2", "scala", "bash", "swift", "vue", "svelte" ] diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 0cb66a07..5e736313 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -24,7 +24,14 @@ export const SUPPORTED_FILE_TYPE = [ 'text/markdown' ]; -export const SUPPORTED_FILE_EXTENSIONS = ['md', 'rst']; +export const SUPPORTED_FILE_EXTENSIONS = [ + 'md', 'rst','go', 'py', 'java', 'sh', 'bat', 'ps1', 'cmd', 'js', + 'ts', 'css', 'cpp', 'hpp','h', 'c', 'cs', 'sql', 'log', 'ini', + 'pl', 'pm', 'r', 'dart', 'dockerfile', 'env', 'php', 'hs', + 'hsc', 'lua', 'nginxconf', 'conf', 'm', 'mm', 'plsql', 'perl', + 'rb', 'rs', 'db2', 'scala', 'bash', 'swift', 'vue', 'svelte', + 'doc','docx', 'pdf', 'csv', 'txt' +]; // Source: https://kit.svelte.dev/docs/modules#$env-static-public // This feature, akin to $env/static/private, exclusively incorporates environment variables