mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-06-27 15:56:28 +00:00
Formatting
This commit is contained in:
parent
98336d02ac
commit
744a90134b
@ -100,4 +100,4 @@ public record FileAttachment(FileAttachmentType Type, string FileName, string Fi
|
|||||||
|
|
||||||
return FileAttachmentType.FORBIDDEN;
|
return FileAttachmentType.FORBIDDEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using AIStudio.Tools.PluginSystem;
|
using AIStudio.Tools.PluginSystem;
|
||||||
|
// ReSharper disable MemberCanBePrivate.Global
|
||||||
|
|
||||||
namespace AIStudio.Tools.Rust;
|
namespace AIStudio.Tools.Rust;
|
||||||
|
|
||||||
@ -74,7 +75,8 @@ public static class FileTypes
|
|||||||
if (types == null || types.Length == 0)
|
if (types == null || types.Length == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (types.Length == 1) return types[0];
|
if (types.Length == 1)
|
||||||
|
return types[0];
|
||||||
|
|
||||||
return FileTypeFilter.Composite(TB("Custom"), OnlyAllowTypes(types));
|
return FileTypeFilter.Composite(TB("Custom"), OnlyAllowTypes(types));
|
||||||
}
|
}
|
||||||
@ -110,19 +112,19 @@ public static class FileTypes
|
|||||||
|
|
||||||
var fileName = Path.GetFileName(filePath);
|
var fileName = Path.GetFileName(filePath);
|
||||||
if (string.IsNullOrWhiteSpace(fileName))
|
if (string.IsNullOrWhiteSpace(fileName))
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (types.Any(t => t.ContainsType(SOURCE_LIKE_FILE_NAMES)))
|
if (types.Any(t => t.ContainsType(SOURCE_LIKE_FILE_NAMES)))
|
||||||
{
|
{
|
||||||
if (SOURCE_LIKE_FILE_NAMES.FilterExtensions.Contains(fileName)) return true;
|
if (SOURCE_LIKE_FILE_NAMES.FilterExtensions.Contains(fileName))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (types.Any(t => t.ContainsType(SOURCE_LIKE_FILE_NAME_PREFIXES))){
|
if (types.Any(t => t.ContainsType(SOURCE_LIKE_FILE_NAME_PREFIXES))){
|
||||||
if (SOURCE_LIKE_FILE_NAME_PREFIXES.FilterExtensions.Any(prefix => fileName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))) return true;
|
if (SOURCE_LIKE_FILE_NAME_PREFIXES.FilterExtensions.Any(prefix => fileName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user