Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(soup): filter file associations (#718)
Sean Aye4beec8b5157e
diff --git a/rust/cloud-storage/Cargo.lock b/rust/cloud-storage/Cargo.lockindex eeaf44cc08..01885686d8 100644--- a/rust/cloud-storage/Cargo.lock+++ b/rust/cloud-storage/Cargo.lock@@ -4515,9 +4515,11 @@ version = "0.1.0"dependencies = ["chrono","cool_asserts",+ "either","filter_ast","macro_user_id","model_file_type",+ "nom 8.0.0","non_empty","schemars","serde",@@ -5445,6 +5447,7 @@ version = "0.1.0"dependencies = ["serde","serde_json",+ "strum","thiserror 2.0.17","utoipa",]@@ -7555,6 +7558,7 @@ dependencies = ["macro_uuid","mention_utils","model",+ "model_file_type","models_opensearch","models_search","nom 8.0.0",diff --git a/rust/cloud-storage/item_filters/Cargo.toml b/rust/cloud-storage/item_filters/Cargo.tomlindex d150e5c6ee..9550aad7aa 100644--- a/rust/cloud-storage/item_filters/Cargo.toml+++ b/rust/cloud-storage/item_filters/Cargo.toml@@ -10,9 +10,11 @@ schema = ["dep:schemars", "dep:utoipa"][dependencies]chrono = { workspace = true }+either = { workspace = true }filter_ast = { path = "../filter_ast" }macro_user_id = { path = "../macro_user_id" }model_file_type = { path = "../model_file_type" }+nom = { workspace = true }non_empty = { path = "../non_empty" }schemars = { workspace = true, optional = true }serde = { workspace = true, features = ["rc"] }diff --git a/rust/cloud-storage/item_filters/src/ast/document.rs b/rust/cloud-storage/item_filters/src/ast/document.rsindex d3891c3695..7f97e4b489 100644--- a/rust/cloud-storage/item_filters/src/ast/document.rs+++ b/rust/cloud-storage/item_filters/src/ast/document.rs@@ -1,9 +1,17 @@use crate::{DocumentFilters, ast::ExpandErr};+use either::Either;use filter_ast::{ExpandFrame, Expr, FoldTree, TryExpandNode};use macro_user_id::{cowlike::CowLike, user_id::MacroUserIdStr};-use model_file_type::FileType;+use model_file_type::{+ Archive, Audio, Canvas, Code, Data, Database, Document, Executable, FileAssociation, FileType,+ Font, Image, Md, Media, Pdf, ThreeD, ValueError, Vector, Video, Vm, Write,+};+use nom::{+ IResult, Parser, branch::alt, bytes::complete::tag, combinator::eof, sequence::separated_pair,+};use serde::{Deserialize, Serialize};use std::str::FromStr;+use strum::IntoEnumIterator;use uuid::Uuid;/// the literal type that can appear in the item filter ast@@ -19,6 +27,94 @@ pub enum DocumentLiteral {Owner(MacroUserIdStr<'static>),}+fn prefix(s: &str) -> IResult<&str, &str> {+ tag("assoc").parse(s)+}++fn assotiation<T: Default>(t: &'static str) -> impl Fn(&str) -> IResult<&str, T> {+ move |s| tag(t).and(eof).map(|(_, _)| T::default()).parse(s)+}++fn file_association(s: &str) -> IResult<&str, FileAssociation> {+ alt((+ assotiation::<Write>("write").map(FileAssociation::from),+ assotiation::<Pdf>("pdf").map(FileAssociation::from),+ assotiation::<Md>("md").map(FileAssociation::from),+ assotiation::<Canvas>("canvas").map(FileAssociation::from),+ assotiation::<Code>("code").map(FileAssociation::from),+ assotiation::<Image>("image").map(FileAssociation::from),+ assotiation::<Archive>("archive").map(FileAssociation::from),+ assotiation::<Executable>("executable").map(FileAssociation::from),+ assotiation::<Audio>("audio").map(FileAssociation::from),+ assotiation::<Video>("video").map(FileAssociation::from),+ assotiation::<Font>("font").map(FileAssociation::from),+ assotiation::<Document>("document").map(FileAssociation::from),+ assotiation::<Database>("database").map(FileAssociation::from),+ assotiation::<Data>("data").map(FileAssociation::from),+ assotiation::<Vector>("vector").map(FileAssociation::from),+ assotiation::<ThreeD>("3d").map(FileAssociation::from),+ assotiation::<Vm>("vm").map(FileAssociation::from),+ assotiation::<Media>("media").map(FileAssociation::from),+ ))+ .parse(s)+}++fn expand_file_association(association: FileAssociation) -> impl Iterator<Item = FileType> {+ FileType::iter().filter(move |ty| ty.macro_app_path().eq(&association))+}++/// other is defined as+/// not write,+/// not pdf,+/// not md,+/// not canvas,+/// not code+/// yes this is kinda weird+fn other(s: &str) -> IResult<&str, impl Iterator<Item = FileType>> {+ tag("other")+ .map(|_| {+ FileType::iter().filter(|ty| {+ let association = ty.macro_app_path();+ !matches!(+ association,+ FileAssociation::Write(_)+ | FileAssociation::Pdf(_)+ | FileAssociation::Md(_)+ | FileAssociation::Canvas(_)+ | FileAssociation::Code(_)+ )+ })+ })+ .parse(s)+}++fn format(s: &str) -> IResult<&str, impl Iterator<Item = FileType>> {+ let (rest, (_, out)) = separated_pair(+ prefix,+ tag(":"),+ alt((+ file_association+ .map(expand_file_association)+ .map(Either::Left),+ other.map(Either::Right),+ )),+ )+ .parse(s)?;+ Ok((rest, out))+}++fn create_file_iter(s: &str) -> impl Iterator<Item = Result<FileType, ValueError<FileType>>> {+ match FileType::from_str(s) {+ Ok(f) => Either::Left(Some(Ok(f)).into_iter()),+ Err(e) => {+ let Ok((_, file_types)) = format(s) else {+ return Either::Left(Some(Err(e)).into_iter());+ };+ Either::Right(file_types.map(Result::Ok))+ }+ }+}+impl ExpandFrame<DocumentLiteral> for DocumentFilters {type Err = ExpandErr;fn expand_ast(@@ -33,7 +129,7 @@ impl ExpandFrame<DocumentLiteral> for DocumentFilters {let file_types_node = file_types.iter()- .map(|s| FileType::from_str(s))+ .flat_map(|s| create_file_iter(s)).try_expand(|r| r.map(DocumentLiteral::FileType), Expr::or)?;let document_id_nodes = document_idsdiff --git a/rust/cloud-storage/item_filters/src/ast/tests.rs b/rust/cloud-storage/item_filters/src/ast/tests.rsindex 5e865e5687..242b2b778d 100644--- a/rust/cloud-storage/item_filters/src/ast/tests.rs+++ b/rust/cloud-storage/item_filters/src/ast/tests.rs@@ -87,3 +87,97 @@ fn it_expands_filters() {assert_eq!(json, exp);}++#[test]+fn it_expands_file_associations() {+ let f = EntityFilters {+ document_filters: DocumentFilters {+ file_types: vec!["assoc:vector".to_string()],+ document_ids: vec![],+ project_ids: vec![],+ owners: vec![],+ },+ ..Default::default()+ };++ let ast = Arc::into_inner(+ EntityFilterAst::new_from_filters(f)+ .unwrap()+ .unwrap()+ .document_filter+ .unwrap(),+ )+ .unwrap();++ let json = serde_json::to_value(ast).unwrap();+ println!("{}", serde_json::to_string_pretty(&json).unwrap());++ let exp = serde_json::json!({+ "Or": [+ {+ "Or": [+ {+ "Or": [+ {+ "Or": [+ {+ "Literal": {+ "FileType": "ai"+ }+ },+ {+ "Literal": {+ "FileType": "eps"+ }+ }+ ]+ },+ {+ "Literal": {+ "FileType": "ps"+ }+ }+ ]+ },+ {+ "Literal": {+ "FileType": "dxf"+ }+ }+ ]+ },+ {+ "Literal": {+ "FileType": "dwg"+ }+ }+ ]+ });+ assert_eq!(json, exp);+}++#[test]+fn it_expands_other_association() {+ let f = EntityFilters {+ document_filters: DocumentFilters {+ file_types: vec!["assoc:other".to_string()],+ document_ids: vec![],+ project_ids: vec![],+ owners: vec![],+ },+ ..Default::default()+ };++ let ast = Arc::into_inner(+ EntityFilterAst::new_from_filters(f)+ .unwrap()+ .unwrap()+ .document_filter+ .unwrap(),+ )+ .unwrap();++ let json = serde_json::to_string(&ast).unwrap();++ assert_eq!(json.trim(), include_str!("tests/other.json").trim());+}diff --git a/rust/cloud-storage/item_filters/src/ast/tests/other.json b/rust/cloud-storage/item_filters/src/ast/tests/other.jsonnew file mode 100644index 0000000000..662e220ae3--- /dev/null+++ b/rust/cloud-storage/item_filters/src/ast/tests/other.json@@ -0,0 +1 @@+{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Or":[{"Literal":{"FileType":"jpeg"}},{"Literal":{"FileType":"jpg"}}]},{"Literal":{"FileType":"png"}}]},{"Literal":{"FileType":"gif"}}]},{"Literal":{"FileType":"svg"}}]},{"Literal":{"FileType":"webp"}}]},{"Literal":{"FileType":"avif"}}]},{"Literal":{"FileType":"bmp"}}]},{"Literal":{"FileType":"ico"}}]},{"Literal":{"FileType":"tiff"}}]},{"Literal":{"FileType":"tif"}}]},{"Literal":{"FileType":"heic"}}]},{"Literal":{"FileType":"heif"}}]},{"Literal":{"FileType":"tar"}}]},{"Literal":{"FileType":"targz"}}]},{"Literal":{"FileType":"tgz"}}]},{"Literal":{"FileType":"gz"}}]},{"Literal":{"FileType":"bz2"}}]},{"Literal":{"FileType":"tarbz2"}}]},{"Literal":{"FileType":"tbz2"}}]},{"Literal":{"FileType":"z"}}]},{"Literal":{"FileType":"tarz"}}]},{"Literal":{"FileType":"lz"}}]},{"Literal":{"FileType":"tarlz"}}]},{"Literal":{"FileType":"xz"}}]},{"Literal":{"FileType":"tarxz"}}]},{"Literal":{"FileType":"txz"}}]},{"Literal":{"FileType":"lzma"}}]},{"Literal":{"FileType":"tarlzma"}}]},{"Literal":{"FileType":"rar"}}]},{"Literal":{"FileType":"sevenz"}}]},{"Literal":{"FileType":"zst"}}]},{"Literal":{"FileType":"tarzst"}}]},{"Literal":{"FileType":"tzst"}}]},{"Literal":{"FileType":"zip"}}]},{"Literal":{"FileType":"exe"}}]},{"Literal":{"FileType":"msi"}}]},{"Literal":{"FileType":"dll"}}]},{"Literal":{"FileType":"bat"}}]},{"Literal":{"FileType":"cmd"}}]},{"Literal":{"FileType":"com"}}]},{"Literal":{"FileType":"appimage"}}]},{"Literal":{"FileType":"app"}}]},{"Literal":{"FileType":"bin"}}]},{"Literal":{"FileType":"deb"}}]},{"Literal":{"FileType":"rpm"}}]},{"Literal":{"FileType":"apk"}}]},{"Literal":{"FileType":"dmg"}}]},{"Literal":{"FileType":"pkg"}}]},{"Literal":{"FileType":"crx"}}]},{"Literal":{"FileType":"xpi"}}]},{"Literal":{"FileType":"mp3"}}]},{"Literal":{"FileType":"wav"}}]},{"Literal":{"FileType":"ogg"}}]},{"Literal":{"FileType":"flac"}}]},{"Literal":{"FileType":"aac"}}]},{"Literal":{"FileType":"m4a"}}]},{"Literal":{"FileType":"wma"}}]},{"Literal":{"FileType":"mid"}}]},{"Literal":{"FileType":"midi"}}]},{"Literal":{"FileType":"mp4"}}]},{"Literal":{"FileType":"mkv"}}]},{"Literal":{"FileType":"webm"}}]},{"Literal":{"FileType":"avi"}}]},{"Literal":{"FileType":"mov"}}]},{"Literal":{"FileType":"wmv"}}]},{"Literal":{"FileType":"mpg"}}]},{"Literal":{"FileType":"mpeg"}}]},{"Literal":{"FileType":"m4v"}}]},{"Literal":{"FileType":"flv"}}]},{"Literal":{"FileType":"f4v"}}]},{"Literal":{"FileType":"threegp"}}]},{"Literal":{"FileType":"ttf"}}]},{"Literal":{"FileType":"otf"}}]},{"Literal":{"FileType":"woff"}}]},{"Literal":{"FileType":"woff2"}}]},{"Literal":{"FileType":"eot"}}]},{"Literal":{"FileType":"rtf"}}]},{"Literal":{"FileType":"odt"}}]},{"Literal":{"FileType":"ods"}}]},{"Literal":{"FileType":"odp"}}]},{"Literal":{"FileType":"odg"}}]},{"Literal":{"FileType":"odf"}}]},{"Literal":{"FileType":"epub"}}]},{"Literal":{"FileType":"mobi"}}]},{"Literal":{"FileType":"azw"}}]},{"Literal":{"FileType":"azw3"}}]},{"Literal":{"FileType":"djvu"}}]},{"Literal":{"FileType":"xls"}}]},{"Literal":{"FileType":"ppt"}}]},{"Literal":{"FileType":"pptx"}}]},{"Literal":{"FileType":"xlsx"}}]},{"Literal":{"FileType":"db"}}]},{"Literal":{"FileType":"sqlite"}}]},{"Literal":{"FileType":"sqlite3"}}]},{"Literal":{"FileType":"mdb"}}]},{"Literal":{"FileType":"accdb"}}]},{"Literal":{"FileType":"dbf"}}]},{"Literal":{"FileType":"plist"}}]},{"Literal":{"FileType":"toml"}}]},{"Literal":{"FileType":"env"}}]},{"Literal":{"FileType":"dot"}}]},{"Literal":{"FileType":"gv"}}]},{"Literal":{"FileType":"torrent"}}]},{"Literal":{"FileType":"ics"}}]},{"Literal":{"FileType":"vcf"}}]},{"Literal":{"FileType":"ai"}}]},{"Literal":{"FileType":"eps"}}]},{"Literal":{"FileType":"ps"}}]},{"Literal":{"FileType":"dxf"}}]},{"Literal":{"FileType":"dwg"}}]},{"Literal":{"FileType":"stl"}}]},{"Literal":{"FileType":"obj"}}]},{"Literal":{"FileType":"fbx"}}]},{"Literal":{"FileType":"blend"}}]},{"Literal":{"FileType":"dae"}}]},{"Literal":{"FileType":"threeds"}}]},{"Literal":{"FileType":"gltf"}}]},{"Literal":{"FileType":"glb"}}]},{"Literal":{"FileType":"vhd"}}]},{"Literal":{"FileType":"vhdx"}}]},{"Literal":{"FileType":"vmdk"}}]},{"Literal":{"FileType":"ova"}}]},{"Literal":{"FileType":"ovf"}}]},{"Literal":{"FileType":"iso"}}]},{"Literal":{"FileType":"img"}}]},{"Literal":{"FileType":"swf"}}]}diff --git a/rust/cloud-storage/model_file_type/Cargo.toml b/rust/cloud-storage/model_file_type/Cargo.tomlindex 2b6056fafd..55bbe32fb9 100644--- a/rust/cloud-storage/model_file_type/Cargo.toml+++ b/rust/cloud-storage/model_file_type/Cargo.toml@@ -14,5 +14,6 @@ utoipa = ["dep:utoipa"][dependencies]serde = { workspace = true }serde_json = { workspace = true }+strum = { workspace = true }thiserror = { workspace = true }utoipa = { workspace = true, optional = true }diff --git a/rust/cloud-storage/model_file_type/src/lib.rs b/rust/cloud-storage/model_file_type/src/lib.rsindex aa004dba1e..c12c897a68 100644--- a/rust/cloud-storage/model_file_type/src/lib.rs+++ b/rust/cloud-storage/model_file_type/src/lib.rs@@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};use std::borrow::Cow;use std::marker::PhantomData;use std::str::FromStr;+use strum::EnumIter;use thiserror::Error;/// Indicates we eoncountered an unknown string value while attempting to construct type T@@ -29,7 +30,7 @@ impl<'a> Lowercase<'a> {}macro_rules! generate_file_types {- ($(($variant:ident, $str_name:expr, $mime_type:expr, $app_path:expr)),* $(,)?) => {+ ($(($variant:ident, $str_name:expr, $mime_type:expr, $app_path:ident)),* $(,)?) => {/// Generates a FileType enum and associated ContentType enum with their implementations.////// This macro takes a list of tuples in the format:@@ -44,7 +45,7 @@ macro_rules! generate_file_types {/// - From<FileType> for ContentType - Maps FileType to ContentType/// - ContentType::mime_type() - Gets MIME type for ContentType///- #[derive(Serialize, Deserialize, Eq, PartialEq, Debug, Copy, Clone)]+ #[derive(Serialize, Deserialize, Eq, PartialEq, Debug, Copy, Clone, EnumIter)]#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]#[serde(rename_all = "lowercase")]pub enum FileType {@@ -91,10 +92,10 @@ macro_rules! generate_file_types {}/// return the app path for the file type- pub fn macro_app_path(&self) -> String {+ pub fn macro_app_path(&self) -> FileAssociation {match self {$(- FileType::$variant => $app_path.to_string(),+ FileType::$variant => FileAssociation::from($app_path),)*}}@@ -184,499 +185,551 @@ macro_rules! generate_file_types {};}+macro_rules! define_file_associations {+ (+ $(+ ($struct_name:ident, $display_str:literal, $doc:literal)+ ),* $(,)?+ ) => {+ $(+ #[doc = $doc]+ #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]+ pub struct $struct_name;+ )*++ /// File association type for routing files to the appropriate application+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]+ pub enum FileAssociation {+ $(+ #[doc = $doc]+ $struct_name($struct_name),+ )*+ }++ impl std::fmt::Display for FileAssociation {+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {+ match self {+ $(+ FileAssociation::$struct_name(_) => write!(f, $display_str),+ )*+ }+ }+ }++ $(+ impl From<$struct_name> for FileAssociation {+ fn from(value: $struct_name) -> Self {+ FileAssociation::$struct_name(value)+ }+ }+ )*+ };+}++define_file_associations!(+ (Write, "write", "Write application file association"),+ (Pdf, "pdf", "PDF viewer file association"),+ (Md, "md", "Markdown editor file association"),+ (Canvas, "canvas", "Canvas editor file association"),+ (Code, "code", "Code editor file association"),+ (Image, "image", "Image viewer file association"),+ (Archive, "archive", "Archive file association"),+ (Executable, "executable", "Executable file association"),+ (Audio, "audio", "Audio player file association"),+ (Video, "video", "Video player file association"),+ (Font, "font", "Font viewer file association"),+ (Document, "document", "Document viewer file association"),+ (Database, "database", "Database file association"),+ (Data, "data", "Data file association"),+ (Vector, "vector", "Vector graphics file association"),+ (ThreeD, "3d", "3D model file association"),+ (Vm, "vm", "Virtual machine file association"),+ (Media, "media", "Media file association"),+);+generate_file_types!((Docx,"docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document",- "write"+ Write),- (Pdf, "pdf", "application/pdf", "pdf"),- (Md, "md", "text/markdown", "md"),- (Canvas, "canvas", "application/x-macro-canvas", "canvas"),+ (Pdf, "pdf", "application/pdf", Pdf),+ (Md, "md", "text/markdown", Md),+ (Canvas, "canvas", "application/x-macro-canvas", Canvas),// Code block: generated from VS Code extensions {- (Coffee, "coffee", "text/plain", "code"),- (Cson, "cson", "text/plain", "code"),- (Iced, "iced", "text/plain", "code"),- (C, "c", "text/plain", "code"),- (I, "i", "text/plain", "code"),- (Cpp, "cpp", "text/plain", "code"),- (Cppm, "cppm", "text/plain", "code"),- (Cc, "cc", "text/plain", "code"),- (Ccm, "ccm", "text/plain", "code"),- (Cxx, "cxx", "text/plain", "code"),- (Cxxm, "cxxm", "text/plain", "code"),- (CPlusPlus, "c++", "text/plain", "code"),- (CPlusPlusm, "c++m", "text/plain", "code"),- (Hpp, "hpp", "text/plain", "code"),- (Hh, "hh", "text/plain", "code"),- (Hxx, "hxx", "text/plain", "code"),- (HPlusPlus, "h++", "text/plain", "code"),- (H, "h", "text/plain", "code"),- (Ii, "ii", "text/plain", "code"),- (Ino, "ino", "text/plain", "code"),- (Inl, "inl", "text/plain", "code"),- (Ipp, "ipp", "text/plain", "code"),- (Ixx, "ixx", "text/plain", "code"),- (Tpp, "tpp", "text/plain", "code"),- (Txx, "txx", "text/plain", "code"),- (HppIn, "hpp.in", "text/plain", "code"),- (HIn, "h.in", "text/plain", "code"),- (Cu, "cu", "text/plain", "code"),- (Cuh, "cuh", "text/plain", "code"),- (Cs, "cs", "text/plain", "code"),- (Csx, "csx", "text/plain", "code"),- (Cake, "cake", "text/plain", "code"),- (Css, "css", "text/plain", "code"),- (Dart, "dart", "text/plain", "code"),- (Diff, "diff", "text/plain", "code"),- (Patch, "patch", "text/plain", "code"),- (Rej, "rej", "text/plain", "code"),- (Dockerfile, "dockerfile", "text/plain", "code"),- (Containerfile, "containerfile", "text/plain", "code"),- (Go, "go", "text/plain", "code"),- (Handlebars, "handlebars", "text/plain", "code"),- (Hbs, "hbs", "text/plain", "code"),- (Hjs, "hjs", "text/plain", "code"),- (Hlsl, "hlsl", "text/plain", "code"),- (Hlsli, "hlsli", "text/plain", "code"),- (Fx, "fx", "text/plain", "code"),- (Fxh, "fxh", "text/plain", "code"),- (Vsh, "vsh", "text/plain", "code"),- (Psh, "psh", "text/plain", "code"),- (Cginc, "cginc", "text/plain", "code"),- (Compute, "compute", "text/plain", "code"),- (Html, "html", "text/plain", "code"),- (Htm, "htm", "text/plain", "code"),- (Shtml, "shtml", "text/plain", "code"),- (Xhtml, "xhtml", "text/plain", "code"),- (Xht, "xht", "text/plain", "code"),- (Mdoc, "mdoc", "text/plain", "code"),- (Jsp, "jsp", "text/plain", "code"),- (Asp, "asp", "text/plain", "code"),- (Aspx, "aspx", "text/plain", "code"),- (Jshtm, "jshtm", "text/plain", "code"),- (Volt, "volt", "text/plain", "code"),- (Ejs, "ejs", "text/plain", "code"),- (Rhtml, "rhtml", "text/plain", "code"),- (Ini, "ini", "text/plain", "code"),- (Conf, "conf", "text/plain", "code"),- (Properties, "properties", "text/plain", "code"),- (Cfg, "cfg", "text/plain", "code"),- (Directory, "directory", "text/plain", "code"),- (Gitattributes, "gitattributes", "text/plain", "code"),- (Gitconfig, "gitconfig", "text/plain", "code"),- (Gitmodules, "gitmodules", "text/plain", "code"),- (Editorconfig, "editorconfig", "text/plain", "code"),- (Repo, "repo", "text/plain", "code"),- (Java, "java", "text/plain", "code"),- (Jav, "jav", "text/plain", "code"),- (Jsx, "jsx", "text/plain", "code"),- (Js, "js", "text/plain", "code"),- (Es6, "es6", "text/plain", "code"),- (Mjs, "mjs", "text/plain", "code"),- (Cjs, "cjs", "text/plain", "code"),- (Pac, "pac", "text/plain", "code"),- (Json, "json", "text/plain", "code"),- (Bowerrc, "bowerrc", "text/plain", "code"),- (Jscsrc, "jscsrc", "text/plain", "code"),- (Webmanifest, "webmanifest", "text/plain", "code"),- (JsMap, "js.map", "text/plain", "code"),- (CssMap, "css.map", "text/plain", "code"),- (TsMap, "ts.map", "text/plain", "code"),- (Har, "har", "text/plain", "code"),- (Jslintrc, "jslintrc", "text/plain", "code"),- (Jsonld, "jsonld", "text/plain", "code"),- (Geojson, "geojson", "text/plain", "code"),- (Ipynb, "ipynb", "text/plain", "code"),- (Vuerc, "vuerc", "text/plain", "code"),- (Jsonc, "jsonc", "text/plain", "code"),- (Eslintrc, "eslintrc", "text/plain", "code"),- (EslintrcJson, "eslintrc.json", "text/plain", "code"),- (Jsfmtrc, "jsfmtrc", "text/plain", "code"),- (Jshintrc, "jshintrc", "text/plain", "code"),- (Swcrc, "swcrc", "text/plain", "code"),- (Hintrc, "hintrc", "text/plain", "code"),- (Babelrc, "babelrc", "text/plain", "code"),- (Jsonl, "jsonl", "text/plain", "code"),- (Ndjson, "ndjson", "text/plain", "code"),- (CodeSnippets, "code-snippets", "text/plain", "code"),- (Jl, "jl", "text/plain", "code"),- (Jmd, "jmd", "text/plain", "code"),- (Sty, "sty", "text/plain", "code"),- (Cls, "cls", "text/plain", "code"),- (Bbx, "bbx", "text/plain", "code"),- (Cbx, "cbx", "text/plain", "code"),- (Tex, "tex", "text/plain", "code"),- (Ltx, "ltx", "text/plain", "code"),- (Ctx, "ctx", "text/plain", "code"),- (Bib, "bib", "text/plain", "code"),- (Less, "less", "text/plain", "code"),- (Log, "log", "text/plain", "code"),- (Lua, "lua", "text/plain", "code"),- (Mak, "mak", "text/plain", "code"),- (Mk, "mk", "text/plain", "code"),- (Mkd, "mkd", "text/plain", "code"),- (Mdwn, "mdwn", "text/plain", "code"),- (Mdown, "mdown", "text/plain", "code"),- (Markdown, "markdown", "text/plain", "code"),- (Markdn, "markdn", "text/plain", "code"),- (Mdtxt, "mdtxt", "text/plain", "code"),- (Mdtext, "mdtext", "text/plain", "code"),- (Workbook, "workbook", "text/plain", "code"),- (M, "m", "text/plain", "code"),- (Mm, "mm", "text/plain", "code"),- (Pl, "pl", "text/plain", "code"),- (Pm, "pm", "text/plain", "code"),- (Pod, "pod", "text/plain", "code"),- (T, "t", "text/plain", "code"),- (Psgi, "psgi", "text/plain", "code"),- (Raku, "raku", "text/plain", "code"),- (Rakumod, "rakumod", "text/plain", "code"),- (Rakutest, "rakutest", "text/plain", "code"),- (Rakudoc, "rakudoc", "text/plain", "code"),- (Nqp, "nqp", "text/plain", "code"),- (P6, "p6", "text/plain", "code"),- (Pl6, "pl6", "text/plain", "code"),- (Pm6, "pm6", "text/plain", "code"),- (Php, "php", "text/plain", "code"),- (Php4, "php4", "text/plain", "code"),- (Php5, "php5", "text/plain", "code"),- (Phtml, "phtml", "text/plain", "code"),- (Ctp, "ctp", "text/plain", "code"),- (Ps1, "ps1", "text/plain", "code"),- (Psm1, "psm1", "text/plain", "code"),- (Psd1, "psd1", "text/plain", "code"),- (Pssc, "pssc", "text/plain", "code"),- (Psrc, "psrc", "text/plain", "code"),- (Py, "py", "text/plain", "code"),- (Rpy, "rpy", "text/plain", "code"),- (Pyw, "pyw", "text/plain", "code"),- (Cpy, "cpy", "text/plain", "code"),- (Gyp, "gyp", "text/plain", "code"),- (Gypi, "gypi", "text/plain", "code"),- (Pyi, "pyi", "text/plain", "code"),- (Ipy, "ipy", "text/plain", "code"),- (Pyt, "pyt", "text/plain", "code"),- (R, "r", "text/plain", "code"),- (Rhistory, "rhistory", "text/plain", "code"),- (Rprofile, "rprofile", "text/plain", "code"),- (Rt, "rt", "text/plain", "code"),- (Cshtml, "cshtml", "text/plain", "code"),- (Razor, "razor", "text/plain", "code"),- (Rb, "rb", "text/plain", "code"),- (Rbx, "rbx", "text/plain", "code"),- (Rjs, "rjs", "text/plain", "code"),- (Gemspec, "gemspec", "text/plain", "code"),- (Rake, "rake", "text/plain", "code"),- (Ru, "ru", "text/plain", "code"),- (Erb, "erb", "text/plain", "code"),- (Podspec, "podspec", "text/plain", "code"),- (Rbi, "rbi", "text/plain", "code"),- (Rs, "rs", "text/plain", "code"),- (Scss, "scss", "text/plain", "code"),- (Sass, "sass", "text/plain", "code"),- (Shader, "shader", "text/plain", "code"),- (Sh, "sh", "text/plain", "code"),- (Bash, "bash", "text/plain", "code"),- (Bashrc, "bashrc", "text/plain", "code"),- (BashAliases, "bash_aliases", "text/plain", "code"),- (BashProfile, "bash_profile", "text/plain", "code"),- (BashLogin, "bash_login", "text/plain", "code"),- (Ebuild, "ebuild", "text/plain", "code"),- (Eclass, "eclass", "text/plain", "code"),- (Profile, "profile", "text/plain", "code"),- (BashLogout, "bash_logout", "text/plain", "code"),- (Xprofile, "xprofile", "text/plain", "code"),- (Xsession, "xsession", "text/plain", "code"),- (Xsessionrc, "xsessionrc", "text/plain", "code"),- (Zsh, "zsh", "text/plain", "code"),- (Zshrc, "zshrc", "text/plain", "code"),- (Zprofile, "zprofile", "text/plain", "code"),- (Zlogin, "zlogin", "text/plain", "code"),- (Zlogout, "zlogout", "text/plain", "code"),- (Zshenv, "zshenv", "text/plain", "code"),- (ZshTheme, "zsh-theme", "text/plain", "code"),- (Fish, "fish", "text/plain", "code"),- (Ksh, "ksh", "text/plain", "code"),- (Csh, "csh", "text/plain", "code"),- (Cshrc, "cshrc", "text/plain", "code"),- (Tcshrc, "tcshrc", "text/plain", "code"),- (Yashrc, "yashrc", "text/plain", "code"),- (YashProfile, "yash_profile", "text/plain", "code"),- (Sql, "sql", "text/plain", "code"),- (Dsql, "dsql", "text/plain", "code"),- (Swift, "swift", "text/plain", "code"),- (Ts, "ts", "text/plain", "code"),- (Cts, "cts", "text/plain", "code"),- (Mts, "mts", "text/plain", "code"),- (Tsx, "tsx", "text/plain", "code"),- (Tsbuildinfo, "tsbuildinfo", "text/plain", "code"),- (Xml, "xml", "text/plain", "code"),- (Xsd, "xsd", "text/plain", "code"),- (Ascx, "ascx", "text/plain", "code"),- (Atom, "atom", "text/plain", "code"),- (Axml, "axml", "text/plain", "code"),- (Axaml, "axaml", "text/plain", "code"),- (Bpmn, "bpmn", "text/plain", "code"),- (Cpt, "cpt", "text/plain", "code"),- (Csl, "csl", "text/plain", "code"),- (Csproj, "csproj", "text/plain", "code"),- (CsprojUser, "csproj.user", "text/plain", "code"),- (Dita, "dita", "text/plain", "code"),- (Ditamap, "ditamap", "text/plain", "code"),- (Dtd, "dtd", "text/plain", "code"),- (Ent, "ent", "text/plain", "code"),- (Mod, "mod", "text/plain", "code"),- (Dtml, "dtml", "text/plain", "code"),- (Fsproj, "fsproj", "text/plain", "code"),- (Fxml, "fxml", "text/plain", "code"),- (Iml, "iml", "text/plain", "code"),- (Isml, "isml", "text/plain", "code"),- (Jmx, "jmx", "text/plain", "code"),- (Launch, "launch", "text/plain", "code"),- (Menu, "menu", "text/plain", "code"),- (Mxml, "mxml", "text/plain", "code"),- (Nuspec, "nuspec", "text/plain", "code"),- (Opml, "opml", "text/plain", "code"),- (Owl, "owl", "text/plain", "code"),- (Proj, "proj", "text/plain", "code"),- (Props, "props", "text/plain", "code"),- (Pt, "pt", "text/plain", "code"),- (Publishsettings, "publishsettings", "text/plain", "code"),- (Pubxml, "pubxml", "text/plain", "code"),- (PubxmlUser, "pubxml.user", "text/plain", "code"),- (Rbxlx, "rbxlx", "text/plain", "code"),- (Rbxmx, "rbxmx", "text/plain", "code"),- (Rdf, "rdf", "text/plain", "code"),- (Rng, "rng", "text/plain", "code"),- (Rss, "rss", "text/plain", "code"),- (Shproj, "shproj", "text/plain", "code"),- (Storyboard, "storyboard", "text/plain", "code"),- (Targets, "targets", "text/plain", "code"),- (Tld, "tld", "text/plain", "code"),- (Tmx, "tmx", "text/plain", "code"),- (Vbproj, "vbproj", "text/plain", "code"),- (VbprojUser, "vbproj.user", "text/plain", "code"),- (Vcxproj, "vcxproj", "text/plain", "code"),- (VcxprojFilters, "vcxproj.filters", "text/plain", "code"),- (Wsdl, "wsdl", "text/plain", "code"),- (Wxi, "wxi", "text/plain", "code"),- (Wxl, "wxl", "text/plain", "code"),- (Wxs, "wxs", "text/plain", "code"),- (Xaml, "xaml", "text/plain", "code"),- (Xbl, "xbl", "text/plain", "code"),- (Xib, "xib", "text/plain", "code"),- (Xlf, "xlf", "text/plain", "code"),- (Xliff, "xliff", "text/plain", "code"),- (Xpdl, "xpdl", "text/plain", "code"),- (Xul, "xul", "text/plain", "code"),- (Xoml, "xoml", "text/plain", "code"),- (Xsl, "xsl", "text/plain", "code"),- (Xslt, "xslt", "text/plain", "code"),- (Yaml, "yaml", "text/plain", "code"),- (Yml, "yml", "text/plain", "code"),- (Eyaml, "eyaml", "text/plain", "code"),- (Eyml, "eyml", "text/plain", "code"),- (Cff, "cff", "text/plain", "code"),- (YamlTmlanguage, "yaml-tmlanguage", "text/plain", "code"),- (- YamlTmpreferences,- "yaml-tmpreferences",- "text/plain",- "code"- ),- (YamlTmtheme, "yaml-tmtheme", "text/plain", "code"),- (Winget, "winget", "text/plain", "code"),- (Txt, "txt", "text/plain", "code"),- (Csv, "csv", "text/plain", "code"),- (Tsv, "tsv", "text/plain", "code"),+ (Coffee, "coffee", "text/plain", Code),+ (Cson, "cson", "text/plain", Code),+ (Iced, "iced", "text/plain", Code),+ (C, "c", "text/plain", Code),+ (I, "i", "text/plain", Code),+ (Cpp, "cpp", "text/plain", Code),+ (Cppm, "cppm", "text/plain", Code),+ (Cc, "cc", "text/plain", Code),+ (Ccm, "ccm", "text/plain", Code),+ (Cxx, "cxx", "text/plain", Code),+ (Cxxm, "cxxm", "text/plain", Code),+ (CPlusPlus, "c++", "text/plain", Code),+ (CPlusPlusm, "c++m", "text/plain", Code),+ (Hpp, "hpp", "text/plain", Code),+ (Hh, "hh", "text/plain", Code),+ (Hxx, "hxx", "text/plain", Code),+ (HPlusPlus, "h++", "text/plain", Code),+ (H, "h", "text/plain", Code),+ (Ii, "ii", "text/plain", Code),+ (Ino, "ino", "text/plain", Code),+ (Inl, "inl", "text/plain", Code),+ (Ipp, "ipp", "text/plain", Code),+ (Ixx, "ixx", "text/plain", Code),+ (Tpp, "tpp", "text/plain", Code),+ (Txx, "txx", "text/plain", Code),+ (HppIn, "hpp.in", "text/plain", Code),+ (HIn, "h.in", "text/plain", Code),+ (Cu, "cu", "text/plain", Code),+ (Cuh, "cuh", "text/plain", Code),+ (Cs, "cs", "text/plain", Code),+ (Csx, "csx", "text/plain", Code),+ (Cake, "cake", "text/plain", Code),+ (Css, "css", "text/plain", Code),+ (Dart, "dart", "text/plain", Code),+ (Diff, "diff", "text/plain", Code),+ (Patch, "patch", "text/plain", Code),+ (Rej, "rej", "text/plain", Code),+ (Dockerfile, "dockerfile", "text/plain", Code),+ (Containerfile, "containerfile", "text/plain", Code),+ (Go, "go", "text/plain", Code),+ (Handlebars, "handlebars", "text/plain", Code),+ (Hbs, "hbs", "text/plain", Code),+ (Hjs, "hjs", "text/plain", Code),+ (Hlsl, "hlsl", "text/plain", Code),+ (Hlsli, "hlsli", "text/plain", Code),+ (Fx, "fx", "text/plain", Code),+ (Fxh, "fxh", "text/plain", Code),+ (Vsh, "vsh", "text/plain", Code),+ (Psh, "psh", "text/plain", Code),+ (Cginc, "cginc", "text/plain", Code),+ (Compute, "compute", "text/plain", Code),+ (Html, "html", "text/plain", Code),+ (Htm, "htm", "text/plain", Code),+ (Shtml, "shtml", "text/plain", Code),+ (Xhtml, "xhtml", "text/plain", Code),+ (Xht, "xht", "text/plain", Code),+ (Mdoc, "mdoc", "text/plain", Code),+ (Jsp, "jsp", "text/plain", Code),+ (Asp, "asp", "text/plain", Code),+ (Aspx, "aspx", "text/plain", Code),+ (Jshtm, "jshtm", "text/plain", Code),+ (Volt, "volt", "text/plain", Code),+ (Ejs, "ejs", "text/plain", Code),+ (Rhtml, "rhtml", "text/plain", Code),+ (Ini, "ini", "text/plain", Code),+ (Conf, "conf", "text/plain", Code),+ (Properties, "properties", "text/plain", Code),+ (Cfg, "cfg", "text/plain", Code),+ (Directory, "directory", "text/plain", Code),+ (Gitattributes, "gitattributes", "text/plain", Code),+ (Gitconfig, "gitconfig", "text/plain", Code),+ (Gitmodules, "gitmodules", "text/plain", Code),+ (Editorconfig, "editorconfig", "text/plain", Code),+ (Repo, "repo", "text/plain", Code),+ (Java, "java", "text/plain", Code),+ (Jav, "jav", "text/plain", Code),+ (Jsx, "jsx", "text/plain", Code),+ (Js, "js", "text/plain", Code),+ (Es6, "es6", "text/plain", Code),+ (Mjs, "mjs", "text/plain", Code),+ (Cjs, "cjs", "text/plain", Code),+ (Pac, "pac", "text/plain", Code),+ (Json, "json", "text/plain", Code),+ (Bowerrc, "bowerrc", "text/plain", Code),+ (Jscsrc, "jscsrc", "text/plain", Code),+ (Webmanifest, "webmanifest", "text/plain", Code),+ (JsMap, "js.map", "text/plain", Code),+ (CssMap, "css.map", "text/plain", Code),+ (TsMap, "ts.map", "text/plain", Code),+ (Har, "har", "text/plain", Code),+ (Jslintrc, "jslintrc", "text/plain", Code),+ (Jsonld, "jsonld", "text/plain", Code),+ (Geojson, "geojson", "text/plain", Code),+ (Ipynb, "ipynb", "text/plain", Code),+ (Vuerc, "vuerc", "text/plain", Code),+ (Jsonc, "jsonc", "text/plain", Code),+ (Eslintrc, "eslintrc", "text/plain", Code),+ (EslintrcJson, "eslintrc.json", "text/plain", Code),+ (Jsfmtrc, "jsfmtrc", "text/plain", Code),+ (Jshintrc, "jshintrc", "text/plain", Code),+ (Swcrc, "swcrc", "text/plain", Code),+ (Hintrc, "hintrc", "text/plain", Code),+ (Babelrc, "babelrc", "text/plain", Code),+ (Jsonl, "jsonl", "text/plain", Code),+ (Ndjson, "ndjson", "text/plain", Code),+ (CodeSnippets, "code-snippets", "text/plain", Code),+ (Jl, "jl", "text/plain", Code),+ (Jmd, "jmd", "text/plain", Code),+ (Sty, "sty", "text/plain", Code),+ (Cls, "cls", "text/plain", Code),+ (Bbx, "bbx", "text/plain", Code),+ (Cbx, "cbx", "text/plain", Code),+ (Tex, "tex", "text/plain", Code),+ (Ltx, "ltx", "text/plain", Code),+ (Ctx, "ctx", "text/plain", Code),+ (Bib, "bib", "text/plain", Code),+ (Less, "less", "text/plain", Code),+ (Log, "log", "text/plain", Code),+ (Lua, "lua", "text/plain", Code),+ (Mak, "mak", "text/plain", Code),+ (Mk, "mk", "text/plain", Code),+ (Mkd, "mkd", "text/plain", Code),+ (Mdwn, "mdwn", "text/plain", Code),+ (Mdown, "mdown", "text/plain", Code),+ (Markdown, "markdown", "text/plain", Code),+ (Markdn, "markdn", "text/plain", Code),+ (Mdtxt, "mdtxt", "text/plain", Code),+ (Mdtext, "mdtext", "text/plain", Code),+ (Workbook, "workbook", "text/plain", Code),+ (M, "m", "text/plain", Code),+ (Mm, "mm", "text/plain", Code),+ (Pl, "pl", "text/plain", Code),+ (Pm, "pm", "text/plain", Code),+ (Pod, "pod", "text/plain", Code),+ (T, "t", "text/plain", Code),+ (Psgi, "psgi", "text/plain", Code),+ (Raku, "raku", "text/plain", Code),+ (Rakumod, "rakumod", "text/plain", Code),+ (Rakutest, "rakutest", "text/plain", Code),+ (Rakudoc, "rakudoc", "text/plain", Code),+ (Nqp, "nqp", "text/plain", Code),+ (P6, "p6", "text/plain", Code),+ (Pl6, "pl6", "text/plain", Code),+ (Pm6, "pm6", "text/plain", Code),+ (Php, "php", "text/plain", Code),+ (Php4, "php4", "text/plain", Code),+ (Php5, "php5", "text/plain", Code),+ (Phtml, "phtml", "text/plain", Code),+ (Ctp, "ctp", "text/plain", Code),+ (Ps1, "ps1", "text/plain", Code),+ (Psm1, "psm1", "text/plain", Code),+ (Psd1, "psd1", "text/plain", Code),+ (Pssc, "pssc", "text/plain", Code),+ (Psrc, "psrc", "text/plain", Code),+ (Py, "py", "text/plain", Code),+ (Rpy, "rpy", "text/plain", Code),+ (Pyw, "pyw", "text/plain", Code),+ (Cpy, "cpy", "text/plain", Code),+ (Gyp, "gyp", "text/plain", Code),+ (Gypi, "gypi", "text/plain", Code),+ (Pyi, "pyi", "text/plain", Code),+ (Ipy, "ipy", "text/plain", Code),+ (Pyt, "pyt", "text/plain", Code),+ (R, "r", "text/plain", Code),+ (Rhistory, "rhistory", "text/plain", Code),+ (Rprofile, "rprofile", "text/plain", Code),+ (Rt, "rt", "text/plain", Code),+ (Cshtml, "cshtml", "text/plain", Code),+ (Razor, "razor", "text/plain", Code),+ (Rb, "rb", "text/plain", Code),+ (Rbx, "rbx", "text/plain", Code),+ (Rjs, "rjs", "text/plain", Code),+ (Gemspec, "gemspec", "text/plain", Code),+ (Rake, "rake", "text/plain", Code),+ (Ru, "ru", "text/plain", Code),+ (Erb, "erb", "text/plain", Code),+ (Podspec, "podspec", "text/plain", Code),+ (Rbi, "rbi", "text/plain", Code),+ (Rs, "rs", "text/plain", Code),+ (Scss, "scss", "text/plain", Code),+ (Sass, "sass", "text/plain", Code),+ (Shader, "shader", "text/plain", Code),+ (Sh, "sh", "text/plain", Code),+ (Bash, "bash", "text/plain", Code),+ (Bashrc, "bashrc", "text/plain", Code),+ (BashAliases, "bash_aliases", "text/plain", Code),+ (BashProfile, "bash_profile", "text/plain", Code),+ (BashLogin, "bash_login", "text/plain", Code),+ (Ebuild, "ebuild", "text/plain", Code),+ (Eclass, "eclass", "text/plain", Code),+ (Profile, "profile", "text/plain", Code),+ (BashLogout, "bash_logout", "text/plain", Code),+ (Xprofile, "xprofile", "text/plain", Code),+ (Xsession, "xsession", "text/plain", Code),+ (Xsessionrc, "xsessionrc", "text/plain", Code),+ (Zsh, "zsh", "text/plain", Code),+ (Zshrc, "zshrc", "text/plain", Code),+ (Zprofile, "zprofile", "text/plain", Code),+ (Zlogin, "zlogin", "text/plain", Code),+ (Zlogout, "zlogout", "text/plain", Code),+ (Zshenv, "zshenv", "text/plain", Code),+ (ZshTheme, "zsh-theme", "text/plain", Code),+ (Fish, "fish", "text/plain", Code),+ (Ksh, "ksh", "text/plain", Code),+ (Csh, "csh", "text/plain", Code),+ (Cshrc, "cshrc", "text/plain", Code),+ (Tcshrc, "tcshrc", "text/plain", Code),+ (Yashrc, "yashrc", "text/plain", Code),+ (YashProfile, "yash_profile", "text/plain", Code),+ (Sql, "sql", "text/plain", Code),+ (Dsql, "dsql", "text/plain", Code),+ (Swift, "swift", "text/plain", Code),+ (Ts, "ts", "text/plain", Code),+ (Cts, "cts", "text/plain", Code),+ (Mts, "mts", "text/plain", Code),+ (Tsx, "tsx", "text/plain", Code),+ (Tsbuildinfo, "tsbuildinfo", "text/plain", Code),+ (Xml, "xml", "text/plain", Code),+ (Xsd, "xsd", "text/plain", Code),+ (Ascx, "ascx", "text/plain", Code),+ (Atom, "atom", "text/plain", Code),+ (Axml, "axml", "text/plain", Code),+ (Axaml, "axaml", "text/plain", Code),+ (Bpmn, "bpmn", "text/plain", Code),+ (Cpt, "cpt", "text/plain", Code),+ (Csl, "csl", "text/plain", Code),+ (Csproj, "csproj", "text/plain", Code),+ (CsprojUser, "csproj.user", "text/plain", Code),+ (Dita, "dita", "text/plain", Code),+ (Ditamap, "ditamap", "text/plain", Code),+ (Dtd, "dtd", "text/plain", Code),+ (Ent, "ent", "text/plain", Code),+ (Mod, "mod", "text/plain", Code),+ (Dtml, "dtml", "text/plain", Code),+ (Fsproj, "fsproj", "text/plain", Code),+ (Fxml, "fxml", "text/plain", Code),+ (Iml, "iml", "text/plain", Code),+ (Isml, "isml", "text/plain", Code),+ (Jmx, "jmx", "text/plain", Code),+ (Launch, "launch", "text/plain", Code),+ (Menu, "menu", "text/plain", Code),+ (Mxml, "mxml", "text/plain", Code),+ (Nuspec, "nuspec", "text/plain", Code),+ (Opml, "opml", "text/plain", Code),+ (Owl, "owl", "text/plain", Code),+ (Proj, "proj", "text/plain", Code),+ (Props, "props", "text/plain", Code),+ (Pt, "pt", "text/plain", Code),+ (Publishsettings, "publishsettings", "text/plain", Code),+ (Pubxml, "pubxml", "text/plain", Code),+ (PubxmlUser, "pubxml.user", "text/plain", Code),+ (Rbxlx, "rbxlx", "text/plain", Code),+ (Rbxmx, "rbxmx", "text/plain", Code),+ (Rdf, "rdf", "text/plain", Code),+ (Rng, "rng", "text/plain", Code),+ (Rss, "rss", "text/plain", Code),+ (Shproj, "shproj", "text/plain", Code),+ (Storyboard, "storyboard", "text/plain", Code),+ (Targets, "targets", "text/plain", Code),+ (Tld, "tld", "text/plain", Code),+ (Tmx, "tmx", "text/plain", Code),+ (Vbproj, "vbproj", "text/plain", Code),+ (VbprojUser, "vbproj.user", "text/plain", Code),+ (Vcxproj, "vcxproj", "text/plain", Code),+ (VcxprojFilters, "vcxproj.filters", "text/plain", Code),+ (Wsdl, "wsdl", "text/plain", Code),+ (Wxi, "wxi", "text/plain", Code),+ (Wxl, "wxl", "text/plain", Code),+ (Wxs, "wxs", "text/plain", Code),+ (Xaml, "xaml", "text/plain", Code),+ (Xbl, "xbl", "text/plain", Code),+ (Xib, "xib", "text/plain", Code),+ (Xlf, "xlf", "text/plain", Code),+ (Xliff, "xliff", "text/plain", Code),+ (Xpdl, "xpdl", "text/plain", Code),+ (Xul, "xul", "text/plain", Code),+ (Xoml, "xoml", "text/plain", Code),+ (Xsl, "xsl", "text/plain", Code),+ (Xslt, "xslt", "text/plain", Code),+ (Yaml, "yaml", "text/plain", Code),+ (Yml, "yml", "text/plain", Code),+ (Eyaml, "eyaml", "text/plain", Code),+ (Eyml, "eyml", "text/plain", Code),+ (Cff, "cff", "text/plain", Code),+ (YamlTmlanguage, "yaml-tmlanguage", "text/plain", Code),+ (YamlTmpreferences, "yaml-tmpreferences", "text/plain", Code),+ (YamlTmtheme, "yaml-tmtheme", "text/plain", Code),+ (Winget, "winget", "text/plain", Code),+ (Txt, "txt", "text/plain", Code),+ (Csv, "csv", "text/plain", Code),+ (Tsv, "tsv", "text/plain", Code),// } Code block// images- (Jpeg, "jpeg", "image/jpeg", "image"),- (Jpg, "jpg", "image/jpeg", "image"),- (Png, "png", "image/png", "image"),- (Gif, "gif", "image/gif", "image"),- (Svg, "svg", "image/svg+xml", "image"),- (Webp, "webp", "image/webp", "image"),- (Avif, "avif", "image/avif", "image"),- (Bmp, "bmp", "image/bmp", "image"),- (Ico, "ico", "image/x-icon", "image"),- (Tiff, "tiff", "image/tiff", "image"),- (Tif, "tif", "image/tiff", "image"),- (Heic, "heic", "image/heic", "image"),- (Heif, "heif", "image/heif", "image"),+ (Jpeg, "jpeg", "image/jpeg", Image),+ (Jpg, "jpg", "image/jpeg", Image),+ (Png, "png", "image/png", Image),+ (Gif, "gif", "image/gif", Image),+ (Svg, "svg", "image/svg+xml", Image),+ (Webp, "webp", "image/webp", Image),+ (Avif, "avif", "image/avif", Image),+ (Bmp, "bmp", "image/bmp", Image),+ (Ico, "ico", "image/x-icon", Image),+ (Tiff, "tiff", "image/tiff", Image),+ (Tif, "tif", "image/tiff", Image),+ (Heic, "heic", "image/heic", Image),+ (Heif, "heif", "image/heif", Image),// NOT SUPPORTED BLOCKS// Archives and compressed files- (Tar, "tar", "application/x-tar", "archive"),- (TarGz, "tar.gz", "application/gzip", "archive"),- (Tgz, "tgz", "application/gzip", "archive"),- (Gz, "gz", "application/gzip", "archive"),- (Bz2, "bz2", "application/x-bzip2", "archive"),- (TarBz2, "tar.bz2", "application/x-bzip2", "archive"),- (Tbz2, "tbz2", "application/x-bzip2", "archive"),- (Z, "z", "application/x-compress", "archive"),- (TarZ, "tar.z", "application/x-compress", "archive"),- (Lz, "lz", "application/x-lzip", "archive"),- (TarLz, "tar.lz", "application/x-lzip", "archive"),- (Xz, "xz", "application/x-xz", "archive"),- (TarXz, "tar.xz", "application/x-xz", "archive"),- (Txz, "txz", "application/x-xz", "archive"),- (Lzma, "lzma", "application/x-lzma", "archive"),- (TarLzma, "tar.lzma", "application/x-lzma", "archive"),- (Rar, "rar", "application/vnd.rar", "archive"),- (SevenZ, "7z", "application/x-7z-compressed", "archive"),- (Zst, "zst", "application/zstd", "archive"),- (TarZst, "tar.zst", "application/zstd", "archive"),- (Tzst, "tzst", "application/zstd", "archive"),- (Zip, "zip", "application/zip", "archive"),+ (Tar, "tar", "application/x-tar", Archive),+ (TarGz, "tar.gz", "application/gzip", Archive),+ (Tgz, "tgz", "application/gzip", Archive),+ (Gz, "gz", "application/gzip", Archive),+ (Bz2, "bz2", "application/x-bzip2", Archive),+ (TarBz2, "tar.bz2", "application/x-bzip2", Archive),+ (Tbz2, "tbz2", "application/x-bzip2", Archive),+ (Z, "z", "application/x-compress", Archive),+ (TarZ, "tar.z", "application/x-compress", Archive),+ (Lz, "lz", "application/x-lzip", Archive),+ (TarLz, "tar.lz", "application/x-lzip", Archive),+ (Xz, "xz", "application/x-xz", Archive),+ (TarXz, "tar.xz", "application/x-xz", Archive),+ (Txz, "txz", "application/x-xz", Archive),+ (Lzma, "lzma", "application/x-lzma", Archive),+ (TarLzma, "tar.lzma", "application/x-lzma", Archive),+ (Rar, "rar", "application/vnd.rar", Archive),+ (SevenZ, "7z", "application/x-7z-compressed", Archive),+ (Zst, "zst", "application/zstd", Archive),+ (TarZst, "tar.zst", "application/zstd", Archive),+ (Tzst, "tzst", "application/zstd", Archive),+ (Zip, "zip", "application/zip", Archive),// Executable files- (Exe, "exe", "application/x-msdownload", "executable"),- (Msi, "msi", "application/x-msi", "executable"),- (Dll, "dll", "application/x-msdownload", "executable"),- (Bat, "bat", "application/x-bat", "executable"),- (Cmd, "cmd", "application/x-cmd", "executable"),- (Com, "com", "application/x-msdownload", "executable"),- (- AppImage,- "appimage",- "application/x-executable",- "executable"- ),- (App, "app", "application/x-executable", "executable"),- (Bin, "bin", "application/octet-stream", "executable"),+ (Exe, "exe", "application/x-msdownload", Executable),+ (Msi, "msi", "application/x-msi", Executable),+ (Dll, "dll", "application/x-msdownload", Executable),+ (Bat, "bat", "application/x-bat", Executable),+ (Cmd, "cmd", "application/x-cmd", Executable),+ (Com, "com", "application/x-msdownload", Executable),+ (AppImage, "appimage", "application/x-executable", Executable),+ (App, "app", "application/x-executable", Executable),+ (Bin, "bin", "application/octet-stream", Executable),(Deb,"deb","application/vnd.debian.binary-package",- "executable"+ Executable),- (Rpm, "rpm", "application/x-rpm", "executable"),+ (Rpm, "rpm", "application/x-rpm", Executable),(Apk,"apk","application/vnd.android.package-archive",- "executable"+ Executable),- (Dmg, "dmg", "application/x-apple-diskimage", "executable"),+ (Dmg, "dmg", "application/x-apple-diskimage", Executable),(Pkg,"pkg","application/vnd.apple.installer+xml",- "executable"+ Executable),- (Crx, "crx", "application/x-chrome-extension", "executable"),- (Xpi, "xpi", "application/x-xpinstall", "executable"),+ (Crx, "crx", "application/x-chrome-extension", Executable),+ (Xpi, "xpi", "application/x-xpinstall", Executable),// Audio files- (Mp3, "mp3", "audio/mpeg", "audio"),- (Wav, "wav", "audio/wav", "audio"),- (Ogg, "ogg", "audio/ogg", "audio"),- (Flac, "flac", "audio/flac", "audio"),- (Aac, "aac", "audio/aac", "audio"),- (M4a, "m4a", "audio/mp4", "audio"),- (Wma, "wma", "audio/x-ms-wma", "audio"),- (Mid, "mid", "audio/midi", "audio"),- (Midi, "midi", "audio/midi", "audio"),+ (Mp3, "mp3", "audio/mpeg", Audio),+ (Wav, "wav", "audio/wav", Audio),+ (Ogg, "ogg", "audio/ogg", Audio),+ (Flac, "flac", "audio/flac", Audio),+ (Aac, "aac", "audio/aac", Audio),+ (M4a, "m4a", "audio/mp4", Audio),+ (Wma, "wma", "audio/x-ms-wma", Audio),+ (Mid, "mid", "audio/midi", Audio),+ (Midi, "midi", "audio/midi", Audio),// Video files- (Mp4, "mp4", "video/mp4", "video"),- (Mkv, "mkv", "video/x-matroska", "video"),- (Webm, "webm", "video/webm", "video"),- (Avi, "avi", "video/x-msvideo", "video"),- (Mov, "mov", "video/quicktime", "video"),- (Wmv, "wmv", "video/x-ms-wmv", "video"),- (Mpg, "mpg", "video/mpeg", "video"),- (Mpeg, "mpeg", "video/mpeg", "video"),- (M4v, "m4v", "video/mp4", "video"),- (Flv, "flv", "video/x-flv", "video"),- (F4v, "f4v", "video/mp4", "video"),- (ThreeGp, "3gp", "video/3gpp", "video"),+ (Mp4, "mp4", "video/mp4", Video),+ (Mkv, "mkv", "video/x-matroska", Video),+ (Webm, "webm", "video/webm", Video),+ (Avi, "avi", "video/x-msvideo", Video),+ (Mov, "mov", "video/quicktime", Video),+ (Wmv, "wmv", "video/x-ms-wmv", Video),+ (Mpg, "mpg", "video/mpeg", Video),+ (Mpeg, "mpeg", "video/mpeg", Video),+ (M4v, "m4v", "video/mp4", Video),+ (Flv, "flv", "video/x-flv", Video),+ (F4v, "f4v", "video/mp4", Video),+ (ThreeGp, "3gp", "video/3gpp", Video),// Font files- (Ttf, "ttf", "font/ttf", "font"),- (Otf, "otf", "font/otf", "font"),- (Woff, "woff", "font/woff", "font"),- (Woff2, "woff2", "font/woff2", "font"),- (Eot, "eot", "application/vnd.ms-fontobject", "font"),+ (Ttf, "ttf", "font/ttf", Font),+ (Otf, "otf", "font/otf", Font),+ (Woff, "woff", "font/woff", Font),+ (Woff2, "woff2", "font/woff2", Font),+ (Eot, "eot", "application/vnd.ms-fontobject", Font),// Document formats- (Rtf, "rtf", "application/rtf", "document"),+ (Rtf, "rtf", "application/rtf", Document),(Odt,"odt","application/vnd.oasis.opendocument.text",- "document"+ Document),(Ods,"ods","application/vnd.oasis.opendocument.spreadsheet",- "document"+ Document),(Odp,"odp","application/vnd.oasis.opendocument.presentation",- "document"+ Document),(Odg,"odg","application/vnd.oasis.opendocument.graphics",- "document"+ Document),(Odf,"odf","application/vnd.oasis.opendocument.formula",- "document"+ Document),- (Epub, "epub", "application/epub+zip", "document"),- (Mobi, "mobi", "application/x-mobipocket-ebook", "document"),- (Azw, "azw", "application/vnd.amazon.ebook", "document"),- (Azw3, "azw3", "application/vnd.amazon.ebook", "document"),- (Djvu, "djvu", "image/vnd.djvu", "document"),- (Xls, "xls", "application/vnd.ms-excel", "document"),- (Ppt, "ppt", "application/vnd.ms-powerpoint", "document"),- (Pptx, "pptx", "application/xml", "document"),- (Xlsx, "xlsx", "application/xml", "document"),+ (Epub, "epub", "application/epub+zip", Document),+ (Mobi, "mobi", "application/x-mobipocket-ebook", Document),+ (Azw, "azw", "application/vnd.amazon.ebook", Document),+ (Azw3, "azw3", "application/vnd.amazon.ebook", Document),+ (Djvu, "djvu", "image/vnd.djvu", Document),+ (Xls, "xls", "application/vnd.ms-excel", Document),+ (Ppt, "ppt", "application/vnd.ms-powerpoint", Document),+ (Pptx, "pptx", "application/xml", Document),+ (Xlsx, "xlsx", "application/xml", Document),// Database files- (Db, "db", "application/octet-stream", "database"),- (Sqlite, "sqlite", "application/vnd.sqlite3", "database"),- (Sqlite3, "sqlite3", "application/vnd.sqlite3", "database"),- (Mdb, "mdb", "application/vnd.ms-access", "database"),- (Accdb, "accdb", "application/vnd.ms-access", "database"),- (Dbf, "dbf", "application/x-dbf", "database"),+ (Db, "db", "application/octet-stream", Database),+ (Sqlite, "sqlite", "application/vnd.sqlite3", Database),+ (Sqlite3, "sqlite3", "application/vnd.sqlite3", Database),+ (Mdb, "mdb", "application/vnd.ms-access", Database),+ (Accdb, "accdb", "application/vnd.ms-access", Database),+ (Dbf, "dbf", "application/x-dbf", Database),// Data and config files- (Plist, "plist", "application/xml", "data"),- (Toml, "toml", "application/toml", "data"),- (Env, "env", "text/plain", "data"),- (Dot, "dot", "text/vnd.graphviz", "data"),- (Gv, "gv", "text/vnd.graphviz", "data"),- (Torrent, "torrent", "application/x-bittorrent", "data"),- (Ics, "ics", "text/calendar", "data"),- (Vcf, "vcf", "text/vcard", "data"),+ (Plist, "plist", "application/xml", Data),+ (Toml, "toml", "application/toml", Data),+ (Env, "env", "text/plain", Data),+ (Dot, "dot", "text/vnd.graphviz", Data),+ (Gv, "gv", "text/vnd.graphviz", Data),+ (Torrent, "torrent", "application/x-bittorrent", Data),+ (Ics, "ics", "text/calendar", Data),+ (Vcf, "vcf", "text/vcard", Data),// Vector graphics- (Ai, "ai", "application/postscript", "vector"),- (Eps, "eps", "application/postscript", "vector"),- (Ps, "ps", "application/postscript", "vector"),- (Dxf, "dxf", "image/vnd.dxf", "vector"),- (Dwg, "dwg", "image/vnd.dwg", "vector"),+ (Ai, "ai", "application/postscript", Vector),+ (Eps, "eps", "application/postscript", Vector),+ (Ps, "ps", "application/postscript", Vector),+ (Dxf, "dxf", "image/vnd.dxf", Vector),+ (Dwg, "dwg", "image/vnd.dwg", Vector),// 3D files- (Stl, "stl", "model/stl", "3d"),- (Obj, "obj", "model/obj", "3d"),- (Fbx, "fbx", "application/octet-stream", "3d"),- (Blend, "blend", "application/x-blender", "3d"),- (Dae, "dae", "model/vnd.collada+xml", "3d"),- (ThreeDs, "3ds", "application/x-3ds", "3d"),- (Gltf, "gltf", "model/gltf+json", "3d"),- (Glb, "glb", "model/gltf-binary", "3d"),+ (Stl, "stl", "model/stl", ThreeD),+ (Obj, "obj", "model/obj", ThreeD),+ (Fbx, "fbx", "application/octet-stream", ThreeD),+ (Blend, "blend", "application/x-blender", ThreeD),+ (Dae, "dae", "model/vnd.collada+xml", ThreeD),+ (ThreeDs, "3ds", "application/x-3ds", ThreeD),+ (Gltf, "gltf", "model/gltf+json", ThreeD),+ (Glb, "glb", "model/gltf-binary", ThreeD),// Virtual machine and container files- (Vhd, "vhd", "application/x-virtualbox-vhd", "vm"),- (Vhdx, "vhdx", "application/x-virtualbox-vhdx", "vm"),- (Vmdk, "vmdk", "application/x-vmdk", "vm"),- (Ova, "ova", "application/x-virtualbox-ova", "vm"),- (Ovf, "ovf", "application/x-virtualbox-ovf", "vm"),- (Iso, "iso", "application/x-iso9660-image", "vm"),- (Img, "img", "application/octet-stream", "vm"),+ (Vhd, "vhd", "application/x-virtualbox-vhd", Vm),+ (Vhdx, "vhdx", "application/x-virtualbox-vhdx", Vm),+ (Vmdk, "vmdk", "application/x-vmdk", Vm),+ (Ova, "ova", "application/x-virtualbox-ova", Vm),+ (Ovf, "ovf", "application/x-virtualbox-ovf", Vm),+ (Iso, "iso", "application/x-iso9660-image", Vm),+ (Img, "img", "application/octet-stream", Vm),// Miscellaneous- (Swf, "swf", "application/x-shockwave-flash", "media"),+ (Swf, "swf", "application/x-shockwave-flash", Media),);diff --git a/rust/cloud-storage/search_processing_service/Cargo.toml b/rust/cloud-storage/search_processing_service/Cargo.tomlindex 9d07225d67..32cf38011b 100644--- a/rust/cloud-storage/search_processing_service/Cargo.toml+++ b/rust/cloud-storage/search_processing_service/Cargo.toml@@ -57,6 +57,7 @@ macro_user_id = { path = "../macro_user_id" }macro_uuid = { path = "../macro_uuid" }mention_utils = { path = "../mention_utils" }model = { path = "../model" }+model_file_type = { path = "../model_file_type" }models_opensearch = { path = "../models_opensearch" }models_search = { path = "../models_search" }nom = { workspace = true }diff --git a/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs b/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rsindex 75821e0666..f725682259 100644--- a/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs+++ b/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs@@ -6,6 +6,7 @@ use model::document::{CONVERTED_DOCUMENT_FILE_NAME, DocumentMetadata, FileType,build_cloud_storage_bucket_document_key,};+use model_file_type::FileAssociation;use models_search::document::MarkdownParseResult;use opensearch_client::{OpensearchClient, date_format::EpochSeconds, upsert::document::UpsertDocumentArgs,@@ -70,8 +71,12 @@ pub async fn update_search_with_raw_document() -> anyhow::Result<()> {// Early exit if we do not support search on the file type// TODO: support other documents- match search_extractor_message.file_type.macro_app_path().as_str() {- "pdf" | "write" | "code" | "canvas" | "md" => {}+ match search_extractor_message.file_type.macro_app_path() {+ FileAssociation::Pdf(_)+ | FileAssociation::Write(_)+ | FileAssociation::Code(_)+ | model_file_type::FileAssociation::Canvas(_)+ | model_file_type::FileAssociation::Md(_) => {}_ => {tracing::warn!("unsupported file type");return Ok(());@@ -274,8 +279,8 @@ pub async fn update_search_with_sync_document(lexical_client: &lexical_client::LexicalClient,search_extractor_message: &SearchExtractorMessage,) -> anyhow::Result<()> {- match search_extractor_message.file_type.macro_app_path().as_str() {- "md" => {}+ match search_extractor_message.file_type.macro_app_path() {+ model_file_type::FileAssociation::Md(_) => {}_ => {tracing::warn!("unsupported file type");return Ok(());