Skip to main content
Glama
MIT License
27,120
19,789
  • Linux
  • Apple
VueParseStrategy.ts•986 B
import type { Node } from 'web-tree-sitter'; import type { ParseContext, ParseStrategy } from './ParseStrategy.js'; export class VueParseStrategy implements ParseStrategy { parseCapture( capture: { node: Node; name: string }, lines: string[], processedChunks: Set<string>, _context: ParseContext, ): string | null { const { node, name } = capture; const startRow = node.startPosition.row; const endRow = node.endPosition.row; if (!lines[startRow]) { return null; } // Extract the content based on the capture type const selectedLines = lines.slice(startRow, endRow + 1); if (selectedLines.length < 1) { return null; } const chunk = selectedLines.join('\n'); const _normalizedChunk = chunk.trim(); // Create a unique ID for this chunk const chunkId = `${name}:${startRow}`; if (processedChunks.has(chunkId)) { return null; } processedChunks.add(chunkId); return chunk; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yamadashy/repomix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server