@mhalder/qdrant-mcp-server 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.codecov.yml +16 -0
  2. package/.github/workflows/claude-code-review.yml +6 -5
  3. package/.releaserc.json +8 -1
  4. package/CHANGELOG.md +34 -0
  5. package/README.md +259 -9
  6. package/build/code/chunker/base.d.ts +19 -0
  7. package/build/code/chunker/base.d.ts.map +1 -0
  8. package/build/code/chunker/base.js +5 -0
  9. package/build/code/chunker/base.js.map +1 -0
  10. package/build/code/chunker/character-chunker.d.ts +22 -0
  11. package/build/code/chunker/character-chunker.d.ts.map +1 -0
  12. package/build/code/chunker/character-chunker.js +111 -0
  13. package/build/code/chunker/character-chunker.js.map +1 -0
  14. package/build/code/chunker/tree-sitter-chunker.d.ts +29 -0
  15. package/build/code/chunker/tree-sitter-chunker.d.ts.map +1 -0
  16. package/build/code/chunker/tree-sitter-chunker.js +213 -0
  17. package/build/code/chunker/tree-sitter-chunker.js.map +1 -0
  18. package/build/code/config.d.ts +11 -0
  19. package/build/code/config.d.ts.map +1 -0
  20. package/build/code/config.js +145 -0
  21. package/build/code/config.js.map +1 -0
  22. package/build/code/indexer.d.ts +42 -0
  23. package/build/code/indexer.d.ts.map +1 -0
  24. package/build/code/indexer.js +508 -0
  25. package/build/code/indexer.js.map +1 -0
  26. package/build/code/metadata.d.ts +32 -0
  27. package/build/code/metadata.d.ts.map +1 -0
  28. package/build/code/metadata.js +128 -0
  29. package/build/code/metadata.js.map +1 -0
  30. package/build/code/scanner.d.ts +35 -0
  31. package/build/code/scanner.d.ts.map +1 -0
  32. package/build/code/scanner.js +108 -0
  33. package/build/code/scanner.js.map +1 -0
  34. package/build/code/sync/merkle.d.ts +45 -0
  35. package/build/code/sync/merkle.d.ts.map +1 -0
  36. package/build/code/sync/merkle.js +116 -0
  37. package/build/code/sync/merkle.js.map +1 -0
  38. package/build/code/sync/snapshot.d.ts +41 -0
  39. package/build/code/sync/snapshot.d.ts.map +1 -0
  40. package/build/code/sync/snapshot.js +91 -0
  41. package/build/code/sync/snapshot.js.map +1 -0
  42. package/build/code/sync/synchronizer.d.ts +53 -0
  43. package/build/code/sync/synchronizer.d.ts.map +1 -0
  44. package/build/code/sync/synchronizer.js +132 -0
  45. package/build/code/sync/synchronizer.js.map +1 -0
  46. package/build/code/types.d.ts +98 -0
  47. package/build/code/types.d.ts.map +1 -0
  48. package/build/code/types.js +5 -0
  49. package/build/code/types.js.map +1 -0
  50. package/build/index.js +252 -1
  51. package/build/index.js.map +1 -1
  52. package/build/qdrant/client.d.ts +1 -1
  53. package/build/qdrant/client.d.ts.map +1 -1
  54. package/build/qdrant/client.js +2 -2
  55. package/build/qdrant/client.js.map +1 -1
  56. package/build/qdrant/client.test.js +16 -0
  57. package/build/qdrant/client.test.js.map +1 -1
  58. package/examples/code-search/README.md +271 -0
  59. package/package.json +15 -2
  60. package/src/code/chunker/base.ts +22 -0
  61. package/src/code/chunker/character-chunker.ts +131 -0
  62. package/src/code/chunker/tree-sitter-chunker.ts +250 -0
  63. package/src/code/config.ts +156 -0
  64. package/src/code/indexer.ts +613 -0
  65. package/src/code/metadata.ts +153 -0
  66. package/src/code/scanner.ts +124 -0
  67. package/src/code/sync/merkle.ts +136 -0
  68. package/src/code/sync/snapshot.ts +110 -0
  69. package/src/code/sync/synchronizer.ts +154 -0
  70. package/src/code/types.ts +117 -0
  71. package/src/index.ts +298 -1
  72. package/src/qdrant/client.test.ts +20 -0
  73. package/src/qdrant/client.ts +2 -2
  74. package/tests/code/chunker/character-chunker.test.ts +141 -0
  75. package/tests/code/chunker/tree-sitter-chunker.test.ts +275 -0
  76. package/tests/code/fixtures/sample-py/calculator.py +32 -0
  77. package/tests/code/fixtures/sample-ts/async-operations.ts +120 -0
  78. package/tests/code/fixtures/sample-ts/auth.ts +31 -0
  79. package/tests/code/fixtures/sample-ts/config.ts +52 -0
  80. package/tests/code/fixtures/sample-ts/database.ts +50 -0
  81. package/tests/code/fixtures/sample-ts/index.ts +39 -0
  82. package/tests/code/fixtures/sample-ts/types-advanced.ts +132 -0
  83. package/tests/code/fixtures/sample-ts/utils.ts +105 -0
  84. package/tests/code/fixtures/sample-ts/validator.ts +169 -0
  85. package/tests/code/indexer.test.ts +828 -0
  86. package/tests/code/integration.test.ts +708 -0
  87. package/tests/code/metadata.test.ts +457 -0
  88. package/tests/code/scanner.test.ts +131 -0
  89. package/tests/code/sync/merkle.test.ts +406 -0
  90. package/tests/code/sync/snapshot.test.ts +360 -0
  91. package/tests/code/sync/synchronizer.test.ts +501 -0
  92. package/vitest.config.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhalder/qdrant-mcp-server",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "MCP server for semantic search using local Qdrant and Ollama (default) with support for OpenAI, Cohere, and Voyage AI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,7 +30,11 @@
30
30
  "url": "https://github.com/mhalder/qdrant-mcp-server.git"
31
31
  },
32
32
  "publishConfig": {
33
- "access": "public"
33
+ "access": "public",
34
+ "provenance": true
35
+ },
36
+ "overrides": {
37
+ "tree-sitter": "^0.25.0"
34
38
  },
35
39
  "dependencies": {
36
40
  "@modelcontextprotocol/sdk": "^1.0.4",
@@ -38,7 +42,16 @@
38
42
  "bottleneck": "^2.19.5",
39
43
  "cohere-ai": "^7.19.0",
40
44
  "express": "^5.1.0",
45
+ "ignore": "^7.0.5",
41
46
  "openai": "^4.77.3",
47
+ "tree-sitter": "^0.25.0",
48
+ "tree-sitter-bash": "^0.25.0",
49
+ "tree-sitter-go": "^0.25.0",
50
+ "tree-sitter-java": "^0.23.5",
51
+ "tree-sitter-javascript": "^0.25.0",
52
+ "tree-sitter-python": "^0.25.0",
53
+ "tree-sitter-rust": "^0.24.0",
54
+ "tree-sitter-typescript": "^0.23.2",
42
55
  "zod": "^3.24.1"
43
56
  },
44
57
  "devDependencies": {
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Base interface for code chunkers
3
+ */
4
+
5
+ import type { CodeChunk } from "../types.js";
6
+
7
+ export interface CodeChunker {
8
+ /**
9
+ * Split code into semantic chunks
10
+ */
11
+ chunk(code: string, filePath: string, language: string): Promise<CodeChunk[]>;
12
+
13
+ /**
14
+ * Check if language is supported by this chunker
15
+ */
16
+ supportsLanguage(language: string): boolean;
17
+
18
+ /**
19
+ * Get chunking strategy name
20
+ */
21
+ getStrategyName(): string;
22
+ }
@@ -0,0 +1,131 @@
1
+ /**
2
+ * CharacterChunker - Simple character-based chunking with overlap
3
+ * Used as fallback when AST parsing is not available
4
+ */
5
+
6
+ import type { ChunkerConfig, CodeChunk } from "../types.js";
7
+ import type { CodeChunker } from "./base.js";
8
+
9
+ export class CharacterChunker implements CodeChunker {
10
+ constructor(private config: ChunkerConfig) {}
11
+
12
+ async chunk(code: string, filePath: string, language: string): Promise<CodeChunk[]> {
13
+ const chunks: CodeChunk[] = [];
14
+ const lines = code.split("\n");
15
+
16
+ let currentChunk = "";
17
+ let currentStartLine = 1;
18
+ let currentLineCount = 0;
19
+ let chunkIndex = 0;
20
+
21
+ for (let i = 0; i < lines.length; i++) {
22
+ const line = lines[i];
23
+ currentChunk += `${line}\n`;
24
+ currentLineCount++;
25
+
26
+ // Check if we've reached chunk size
27
+ if (currentChunk.length >= this.config.chunkSize) {
28
+ // Try to find a good break point (end of function, class, or empty line)
29
+ const breakPoint = this.findBreakPoint(lines, i + 1);
30
+
31
+ if (breakPoint > i && breakPoint - i < 20) {
32
+ // Include lines up to break point, but respect maxChunkSize
33
+ for (let j = i + 1; j <= breakPoint && j < lines.length; j++) {
34
+ const nextLine = `${lines[j]}\n`;
35
+ // Stop if adding this line would exceed maxChunkSize
36
+ if (currentChunk.length + nextLine.length > this.config.maxChunkSize) {
37
+ break;
38
+ }
39
+ currentChunk += nextLine;
40
+ currentLineCount++;
41
+ i = j;
42
+ }
43
+ }
44
+
45
+ // Create chunk
46
+ chunks.push({
47
+ content: currentChunk.trim(),
48
+ startLine: currentStartLine,
49
+ endLine: currentStartLine + currentLineCount - 1,
50
+ metadata: {
51
+ filePath,
52
+ language,
53
+ chunkIndex,
54
+ chunkType: "block",
55
+ },
56
+ });
57
+
58
+ chunkIndex++;
59
+
60
+ // Calculate overlap
61
+ const overlapLines = this.calculateOverlapLines(currentLineCount);
62
+ const _overlapStart = Math.max(0, currentLineCount - overlapLines);
63
+
64
+ // Start new chunk with overlap
65
+ currentChunk = `${lines.slice(i - overlapLines + 1, i + 1).join("\n")}\n`;
66
+ currentStartLine = currentStartLine + currentLineCount - overlapLines;
67
+ currentLineCount = overlapLines;
68
+ }
69
+ }
70
+
71
+ // Add remaining content as final chunk
72
+ if (currentChunk.trim().length > 50) {
73
+ chunks.push({
74
+ content: currentChunk.trim(),
75
+ startLine: currentStartLine,
76
+ endLine: currentStartLine + currentLineCount - 1,
77
+ metadata: {
78
+ filePath,
79
+ language,
80
+ chunkIndex,
81
+ chunkType: "block",
82
+ },
83
+ });
84
+ }
85
+
86
+ return chunks;
87
+ }
88
+
89
+ supportsLanguage(_language: string): boolean {
90
+ // Character chunker supports all languages
91
+ return true;
92
+ }
93
+
94
+ getStrategyName(): string {
95
+ return "character-based";
96
+ }
97
+
98
+ /**
99
+ * Find a good break point in the code (empty line, closing brace, etc.)
100
+ */
101
+ private findBreakPoint(lines: string[], startIdx: number): number {
102
+ const searchWindow = Math.min(20, lines.length - startIdx);
103
+
104
+ for (let i = 0; i < searchWindow; i++) {
105
+ const line = lines[startIdx + i]?.trim() || "";
106
+
107
+ // Good break points
108
+ if (
109
+ line === "" ||
110
+ line === "}" ||
111
+ line === "};" ||
112
+ line === "]);" ||
113
+ line.startsWith("//") ||
114
+ line.startsWith("#")
115
+ ) {
116
+ return startIdx + i;
117
+ }
118
+ }
119
+
120
+ return startIdx;
121
+ }
122
+
123
+ /**
124
+ * Calculate number of lines to overlap based on chunk size
125
+ */
126
+ private calculateOverlapLines(totalLines: number): number {
127
+ const overlapChars = this.config.chunkOverlap;
128
+ const avgCharsPerLine = this.config.chunkSize / Math.max(totalLines, 1);
129
+ return Math.floor(overlapChars / Math.max(avgCharsPerLine, 1));
130
+ }
131
+ }
@@ -0,0 +1,250 @@
1
+ /**
2
+ * TreeSitterChunker - AST-aware code chunking using tree-sitter
3
+ * Primary chunking strategy for supported languages
4
+ */
5
+
6
+ import Parser from "tree-sitter";
7
+ // tree-sitter language modules don't have proper types
8
+ import Bash from "tree-sitter-bash";
9
+ import Go from "tree-sitter-go";
10
+ import Java from "tree-sitter-java";
11
+ import JavaScript from "tree-sitter-javascript";
12
+ import Python from "tree-sitter-python";
13
+ import Rust from "tree-sitter-rust";
14
+ import TypeScript from "tree-sitter-typescript";
15
+
16
+ import type { ChunkerConfig, CodeChunk } from "../types.js";
17
+ import type { CodeChunker } from "./base.js";
18
+ import { CharacterChunker } from "./character-chunker.js";
19
+
20
+ interface LanguageConfig {
21
+ parser: Parser;
22
+ chunkableTypes: string[];
23
+ }
24
+
25
+ export class TreeSitterChunker implements CodeChunker {
26
+ private languages: Map<string, LanguageConfig> = new Map();
27
+ private fallbackChunker: CharacterChunker;
28
+
29
+ constructor(private config: ChunkerConfig) {
30
+ this.fallbackChunker = new CharacterChunker(config);
31
+ this.initializeParsers();
32
+ }
33
+
34
+ private initializeParsers(): void {
35
+ // TypeScript
36
+ const tsParser = new Parser();
37
+ tsParser.setLanguage(TypeScript.typescript as any);
38
+ this.languages.set("typescript", {
39
+ parser: tsParser,
40
+ chunkableTypes: [
41
+ "function_declaration",
42
+ "method_definition",
43
+ "class_declaration",
44
+ "interface_declaration",
45
+ "type_alias_declaration",
46
+ "enum_declaration",
47
+ ],
48
+ });
49
+
50
+ // JavaScript
51
+ const jsParser = new Parser();
52
+ jsParser.setLanguage(JavaScript as any);
53
+ this.languages.set("javascript", {
54
+ parser: jsParser,
55
+ chunkableTypes: [
56
+ "function_declaration",
57
+ "method_definition",
58
+ "class_declaration",
59
+ "export_statement",
60
+ ],
61
+ });
62
+
63
+ // Python
64
+ const pyParser = new Parser();
65
+ pyParser.setLanguage(Python as any);
66
+ this.languages.set("python", {
67
+ parser: pyParser,
68
+ chunkableTypes: ["function_definition", "class_definition", "decorated_definition"],
69
+ });
70
+
71
+ // Go
72
+ const goParser = new Parser();
73
+ goParser.setLanguage(Go as any);
74
+ this.languages.set("go", {
75
+ parser: goParser,
76
+ chunkableTypes: [
77
+ "function_declaration",
78
+ "method_declaration",
79
+ "type_declaration",
80
+ "interface_declaration",
81
+ ],
82
+ });
83
+
84
+ // Rust
85
+ const rustParser = new Parser();
86
+ rustParser.setLanguage(Rust as any);
87
+ this.languages.set("rust", {
88
+ parser: rustParser,
89
+ chunkableTypes: ["function_item", "impl_item", "trait_item", "struct_item", "enum_item"],
90
+ });
91
+
92
+ // Java
93
+ const javaParser = new Parser();
94
+ javaParser.setLanguage(Java as any);
95
+ this.languages.set("java", {
96
+ parser: javaParser,
97
+ chunkableTypes: [
98
+ "method_declaration",
99
+ "class_declaration",
100
+ "interface_declaration",
101
+ "enum_declaration",
102
+ ],
103
+ });
104
+
105
+ // Bash
106
+ const bashParser = new Parser();
107
+ bashParser.setLanguage(Bash as any);
108
+ this.languages.set("bash", {
109
+ parser: bashParser,
110
+ chunkableTypes: ["function_definition", "command"],
111
+ });
112
+ }
113
+
114
+ async chunk(code: string, filePath: string, language: string): Promise<CodeChunk[]> {
115
+ const langConfig = this.languages.get(language);
116
+
117
+ if (!langConfig) {
118
+ // Fallback to character-based chunking
119
+ return this.fallbackChunker.chunk(code, filePath, language);
120
+ }
121
+
122
+ try {
123
+ const tree = langConfig.parser.parse(code);
124
+ const chunks: CodeChunk[] = [];
125
+
126
+ // Find all chunkable nodes
127
+ const nodes = this.findChunkableNodes(tree.rootNode, langConfig.chunkableTypes);
128
+
129
+ for (const [index, node] of nodes.entries()) {
130
+ const content = code.substring(node.startIndex, node.endIndex);
131
+
132
+ // Skip chunks that are too small
133
+ if (content.length < 50) {
134
+ continue;
135
+ }
136
+
137
+ // If chunk is too large, fall back to character chunking for this node
138
+ if (content.length > this.config.maxChunkSize * 2) {
139
+ const subChunks = await this.fallbackChunker.chunk(content, filePath, language);
140
+ // Adjust line numbers for sub-chunks
141
+ for (const subChunk of subChunks) {
142
+ chunks.push({
143
+ ...subChunk,
144
+ startLine: node.startPosition.row + 1 + subChunk.startLine - 1,
145
+ endLine: node.startPosition.row + 1 + subChunk.endLine - 1,
146
+ metadata: {
147
+ ...subChunk.metadata,
148
+ chunkIndex: chunks.length,
149
+ },
150
+ });
151
+ }
152
+ continue;
153
+ }
154
+
155
+ chunks.push({
156
+ content: content.trim(),
157
+ startLine: node.startPosition.row + 1,
158
+ endLine: node.endPosition.row + 1,
159
+ metadata: {
160
+ filePath,
161
+ language,
162
+ chunkIndex: index,
163
+ chunkType: this.getChunkType(node.type),
164
+ name: this.extractName(node, code),
165
+ },
166
+ });
167
+ }
168
+
169
+ // If no chunks found or file is small, use fallback
170
+ if (chunks.length === 0 && code.length > 100) {
171
+ return this.fallbackChunker.chunk(code, filePath, language);
172
+ }
173
+
174
+ return chunks;
175
+ } catch (error) {
176
+ // On parsing error, fallback to character-based chunking
177
+ console.error(`Tree-sitter parsing failed for ${filePath}:`, error);
178
+ return this.fallbackChunker.chunk(code, filePath, language);
179
+ }
180
+ }
181
+
182
+ supportsLanguage(language: string): boolean {
183
+ return this.languages.has(language);
184
+ }
185
+
186
+ getStrategyName(): string {
187
+ return "tree-sitter";
188
+ }
189
+
190
+ /**
191
+ * Find all chunkable nodes in the AST
192
+ */
193
+ private findChunkableNodes(
194
+ node: Parser.SyntaxNode,
195
+ chunkableTypes: string[]
196
+ ): Parser.SyntaxNode[] {
197
+ const nodes: Parser.SyntaxNode[] = [];
198
+
199
+ const traverse = (n: Parser.SyntaxNode) => {
200
+ if (chunkableTypes.includes(n.type)) {
201
+ nodes.push(n);
202
+ // Don't traverse children of chunkable nodes to avoid nested chunks
203
+ return;
204
+ }
205
+
206
+ for (const child of n.children) {
207
+ traverse(child);
208
+ }
209
+ };
210
+
211
+ traverse(node);
212
+ return nodes;
213
+ }
214
+
215
+ /**
216
+ * Extract function/class name from AST node
217
+ */
218
+ private extractName(node: Parser.SyntaxNode, code: string): string | undefined {
219
+ // Try to find name node
220
+ const nameNode = node.childForFieldName("name");
221
+ if (nameNode) {
222
+ return code.substring(nameNode.startIndex, nameNode.endIndex);
223
+ }
224
+
225
+ // For some node types, name might be in a different location
226
+ for (const child of node.children) {
227
+ if (child.type === "identifier" || child.type === "type_identifier") {
228
+ return code.substring(child.startIndex, child.endIndex);
229
+ }
230
+ }
231
+
232
+ return undefined;
233
+ }
234
+
235
+ /**
236
+ * Map AST node type to chunk type
237
+ */
238
+ private getChunkType(nodeType: string): "function" | "class" | "interface" | "block" {
239
+ if (nodeType.includes("function") || nodeType.includes("method")) {
240
+ return "function";
241
+ }
242
+ if (nodeType.includes("class") || nodeType.includes("struct")) {
243
+ return "class";
244
+ }
245
+ if (nodeType.includes("interface") || nodeType.includes("trait")) {
246
+ return "interface";
247
+ }
248
+ return "block";
249
+ }
250
+ }
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Configuration and constants for code vectorization
3
+ */
4
+
5
+ export const DEFAULT_CODE_EXTENSIONS = [
6
+ // TypeScript/JavaScript
7
+ ".ts",
8
+ ".tsx",
9
+ ".js",
10
+ ".jsx",
11
+ // Python
12
+ ".py",
13
+ // Go
14
+ ".go",
15
+ // Rust
16
+ ".rs",
17
+ // Java/Kotlin
18
+ ".java",
19
+ ".kt",
20
+ // C/C++
21
+ ".c",
22
+ ".cpp",
23
+ ".h",
24
+ ".hpp",
25
+ ".cc",
26
+ ".cxx",
27
+ // C#
28
+ ".cs",
29
+ // Ruby
30
+ ".rb",
31
+ // PHP
32
+ ".php",
33
+ // Swift
34
+ ".swift",
35
+ // Dart
36
+ ".dart",
37
+ // Scala
38
+ ".scala",
39
+ // Clojure
40
+ ".clj",
41
+ ".cljs",
42
+ // Haskell
43
+ ".hs",
44
+ // OCaml
45
+ ".ml",
46
+ // Shell
47
+ ".sh",
48
+ ".bash",
49
+ ".zsh",
50
+ ".fish",
51
+ // SQL/Data
52
+ ".sql",
53
+ ".proto",
54
+ ".graphql",
55
+ // Web
56
+ ".vue",
57
+ ".svelte",
58
+ // Config/Markup
59
+ ".md",
60
+ ".markdown",
61
+ ".json",
62
+ ".yaml",
63
+ ".yml",
64
+ ".toml",
65
+ ".xml",
66
+ ];
67
+
68
+ export const DEFAULT_IGNORE_PATTERNS = [
69
+ "node_modules/**",
70
+ "dist/**",
71
+ "build/**",
72
+ "out/**",
73
+ "target/**",
74
+ "coverage/**",
75
+ ".nyc_output/**",
76
+ ".cache/**",
77
+ "__pycache__/**",
78
+ ".git/**",
79
+ ".svn/**",
80
+ ".hg/**",
81
+ ".vscode/**",
82
+ ".idea/**",
83
+ "*.min.js",
84
+ "*.min.css",
85
+ "*.bundle.js",
86
+ "*.map",
87
+ "*.log",
88
+ ".env",
89
+ ".env.*",
90
+ ];
91
+
92
+ export const LANGUAGE_MAP: Record<string, string> = {
93
+ // TypeScript/JavaScript
94
+ ".ts": "typescript",
95
+ ".tsx": "typescript",
96
+ ".js": "javascript",
97
+ ".jsx": "javascript",
98
+
99
+ // Backend languages
100
+ ".py": "python",
101
+ ".java": "java",
102
+ ".go": "go",
103
+ ".rs": "rust",
104
+ ".rb": "ruby",
105
+ ".php": "php",
106
+
107
+ // Systems languages
108
+ ".c": "c",
109
+ ".cpp": "cpp",
110
+ ".cc": "cpp",
111
+ ".cxx": "cpp",
112
+ ".h": "c",
113
+ ".hpp": "cpp",
114
+ ".cs": "c_sharp",
115
+
116
+ // Mobile
117
+ ".swift": "swift",
118
+ ".kt": "kotlin",
119
+ ".dart": "dart",
120
+
121
+ // Functional
122
+ ".scala": "scala",
123
+ ".clj": "clojure",
124
+ ".cljs": "clojure",
125
+ ".hs": "haskell",
126
+ ".ml": "ocaml",
127
+
128
+ // Scripting
129
+ ".sh": "bash",
130
+ ".bash": "bash",
131
+ ".zsh": "bash",
132
+ ".fish": "fish",
133
+
134
+ // Data/Query
135
+ ".sql": "sql",
136
+ ".proto": "proto",
137
+ ".graphql": "graphql",
138
+
139
+ // Markup/Config
140
+ ".md": "markdown",
141
+ ".markdown": "markdown",
142
+ ".json": "json",
143
+ ".yaml": "yaml",
144
+ ".yml": "yaml",
145
+ ".toml": "toml",
146
+ ".xml": "xml",
147
+
148
+ // Web
149
+ ".vue": "vue",
150
+ ".svelte": "svelte",
151
+ };
152
+
153
+ export const DEFAULT_CHUNK_SIZE = 2500;
154
+ export const DEFAULT_CHUNK_OVERLAP = 300;
155
+ export const DEFAULT_BATCH_SIZE = 100;
156
+ export const DEFAULT_SEARCH_LIMIT = 5;