MCPcopy Create free account
hub / github.com/diillson/chatcli / DefaultDirectoryScanOptions

Function DefaultDirectoryScanOptions

utils/file_utils.go:42–66  ·  view source on GitHub ↗

DefaultDirectoryScanOptions retorna opções padrão para escaneamento

(logger *zap.Logger)

Source from the content-addressed store, hash-verified

40
41// DefaultDirectoryScanOptions retorna opções padrão para escaneamento
42func DefaultDirectoryScanOptions(logger *zap.Logger) DirectoryScanOptions {
43 return DirectoryScanOptions{
44 MaxTotalSize: 10 * 1024 * 1024, // 10MB limite total
45 MaxFilesToProcess: 100, // Máximo 100 arquivos
46 Logger: logger,
47 Extensions: []string{
48 ".go", ".py", ".js", ".ts", ".jsx", ".tsx", ".java", ".c", ".cpp", ".h", ".hpp",
49 ".cs", ".rb", ".php", ".html", ".css", ".scss", ".less", ".json", ".xml", ".yaml",
50 ".yml", ".md", ".txt", ".sql", ".sh", ".bash", ".zsh", ".env", ".toml", ".ini",
51 ".config", ".rs", ".dart", ".swift", ".kt", ".groovy", ".scala", ".pl", ".pm", ".tf",
52 },
53 ExcludeDirs: []string{
54 ".git", "node_modules", "vendor", "build", "dist", "target",
55 "bin", "obj", ".idea", ".vscode", "__pycache__",
56 },
57 ExcludePatterns: []string{
58 "*.exe", "*.dll", "*.so", "*.dylib", "*.zip", "*.tar", "*.gz", "*.rar",
59 "*.jar", "*.war", "*.ear", "*.class", "*.o", "*.a", "*.pyc", "*.pyo",
60 "*.bin", "*.dat", "*.db", "*.sqlite", "*.sqlite3", "*.log", "*.tmp",
61 "*.bak", "*.swp", "*.swo", "*.swn", "*.lock", "package-lock.json",
62 "yarn.lock", "Cargo.lock", "*.sum", "*.mod",
63 },
64 IncludeHidden: false,
65 }
66}
67
68// DetectFileType detecta o tipo de arquivo com base na extensão
69func DetectFileType(filePath string) string {

Callers 9

processFileCommandMethod · 0.92
processDirectorySmartMethod · 0.92
CreateContextMethod · 0.92
UpdateContextMethod · 0.92
ProcessPathsMethod · 0.92
TestProcessDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestProcessDirectoryFunction · 0.68