- Replace complex word boundary/regex matching with simple string.includes()
- Maintain all subcomponents in search results
- Preserve proper matchInfo for packages and subcomponents
- Add test cases for case-insensitive matching
- Add test cases for partial string matching
- Add test cases using real data from package-manager-template
- Verify search behavior with actual component data
This commit significantly enhances the Python tree-sitter parser to support a comprehensive range of Python language constructs, enabling more accurate and detailed code analysis.
Key improvements:
- Added support for method definitions (instance, class, and static methods)
- Added support for decorators on functions and classes
- Added support for module-level variables and constants
- Added support for async functions and methods
- Added support for property getters/setters
- Added support for type annotations in various contexts
- Added support for dataclasses
- Added support for nested functions and classes
- Added support for generator functions
- Added support for list/dict/set comprehensions
- Added support for lambda functions
- Added support for abstract base classes and methods
The parser now handles Python's rich feature set more comprehensively, including special Python patterns like decorators, type annotations, and various comprehension types. This enables better code navigation, understanding, and analysis for Python codebases.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This enhancement significantly expands the Java parser's capabilities to recognize and parse a wide range of Java language constructs:
- Added support for enum declarations and enum constants
- Added support for annotation type declarations and elements
- Added support for field declarations
- Added support for constructor declarations
- Added support for lambda expressions
- Added support for inner and anonymous classes
- Added support for type parameters (generics)
- Added support for package and import declarations
These improvements enable more comprehensive code analysis for Java projects, providing better definition extraction and navigation capabilities.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This enhancement significantly expands the Go parser's capabilities to recognize and extract a comprehensive set of language constructs:
- Added support for struct and interface definitions with proper type identification
- Implemented parsing for constant declarations (both single and in blocks)
- Added support for variable declarations (both single and in blocks)
- Added recognition of type aliases with proper distinction from regular types
- Implemented special handling for init functions
- Added support for anonymous functions, including nested function literals
- Improved documentation and organization of query patterns
These enhancements enable more accurate code navigation, better symbol extraction, and improved code intelligence for Go codebases.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This enhancement significantly expands the C++ parser's capabilities to recognize and extract a wide range of modern C++ language constructs, improving code navigation and analysis.
New supported language constructs include:
- Union declarations and their members
- Destructors and their implementations
- Operator overloading (including stream operators)
- Free-standing and namespace-scoped functions
- Enum declarations (both traditional and scoped enum class)
- Lambda expressions and their captures
- Attributes and annotations
- Method overrides with virtual/override specifiers
- Exception specifications (noexcept)
- Default parameters in function declarations
- Variadic templates and parameter packs
- Structured bindings (C++17)
- Inline namespaces and nested namespace declarations
- Template specializations and instantiations
- Constructor implementations
This enhancement provides more comprehensive code structure analysis for C++ codebases, particularly those using modern C++ features from C++11, C++14, and C++17 standards.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
- Enhanced the Tree-Sitter parser for JavaScript/TypeScript with support for advanced language constructs
- Modified the parser to exclude comments from the output
- Consolidated sample code in tests for better maintainability
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: add comprehensive Rust Tree-sitter tests
Add test suite for Rust language support in Tree-sitter:
- Verify parsing of struct definitions
- Verify parsing of method definitions within impl blocks
- Verify parsing of standalone function definitions
- Add tests for complex Rust structures
- Include skipped debug test for future diagnostics
These tests confirm the existing Rust support in Tree-sitter is working correctly and provide a foundation for future enhancements to the Rust parser.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* feat: enhance Rust tree-sitter parser with advanced language structures
- Add support for additional Rust language structures:
- Enum definitions
- Trait definitions
- Impl trait for struct
- Generic structs with lifetime parameters
- Macro definitions
- Module definitions
- Union types
- Closures
- Match expressions
- Where clauses
- Async functions
- Impl blocks with generic parameters
- Complex trait bounds
- Update tests to verify capture of these structures
- Modify debug helper to use environment variables
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
---------
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Problem:
Closing auxiliary windows (e.g., from "open in editor") could prematurely dispose the shared singleton McpHub instance, shutting down MCP servers unexpectedly while other panels (like the sidebar) might still be active.
Solution:
Implemented reference counting directly within the McpHub class to manage its own lifecycle based on active clients (ClineProvider instances).
- Added `refCount`, `registerClient()`, and `unregisterClient()` methods to McpHub.
- McpHub now disposes itself only when the last registered client unregisters (`refCount` reaches 0).
- ClineProvider instances now call `mcpHub.registerClient()` upon initialization and `mcpHub.unregisterClient()` upon disposal.
- Removed the direct `mcpHub.dispose()` call from ClineProvider.dispose.
Benefit:
This ensures the shared McpHub instance remains active as long as at least one ClineProvider instance is using it. Cleanup now correctly occurs only when the last provider is closed or during full extension deactivation. This centralizes the resource's lifecycle logic within the resource class itself.
Files Changed:
- src/services/mcp/McpHub.ts
- src/core/webview/ClineProvider.ts