Skip to main content
Glama
VueParseStrategy.ts885 B
import type { Node } from 'web-tree-sitter'; import type { ParseContext } from './BaseParseStrategy.js'; import { BaseParseStrategy } from './BaseParseStrategy.js'; export class VueParseStrategy extends BaseParseStrategy { 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; const selectedLines = this.extractLines(lines, startRow, endRow); if (!selectedLines) { return null; } const chunk = selectedLines.join('\n'); // Create a unique ID for this chunk const chunkId = `${name}:${startRow}`; if (processedChunks.has(chunkId)) { return null; } processedChunks.add(chunkId); return chunk; } }

Latest Blog Posts

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