This pull request introduces version 1.1.0 of ContextR, which adds a comprehensive plugin system and numerous enhancements to make building context for LLMs more flexible, secure, and user-friendly. The changes build upon the foundation established in commit 5f12e7030c9aca54ec73a5877e788015d62bcfc1, adding significant new functionality while maintaining backward compatibility.
- Implemented a flexible plugin architecture supporting:
- Security scanners for detecting sensitive information
- Output renderers for formatting context in different ways
- LLM reviewers for code analysis and summarization
- Added plugin discovery and loading from a designated plugins directory
- Created a plugin management system with lifecycle hooks
- GitIgnore Security Scanner: Automatically exclude files matched by .gitignore patterns
- Sensitive Data Security Scanner: Detect API keys, passwords, and other sensitive information
- Special handling for env files with option to include only keys without values
- Security warnings integration with output renderers
- Added ability to show the full project tree structure
- Support for including files in the tree without their contents
- Pattern-based configuration for list-only files
- Special handling for binary files with appropriate placeholders
- Markdown Renderer: Creates documentation with syntax highlighting and table of contents
- HTML Renderer: Generates interactive HTML with collapsible sections and security warnings
- Enhanced console and JSON renderers
- Base framework for LLM-powered code review
- Local LLM integration with support for Ollama, LLama.cpp, and GPT4All
- No API key requirements - works with locally installed models
- Code summarization and security analysis capabilities
- New commands for tree operations and security scanning
- Visual interface for building context and managing files
- File tree navigation with drag-and-drop support
- Configuration management with visual controls
- Resolved all TypeScript compilation errors
- Added explicit type annotations where needed
- Updated type definitions for better compatibility
- Support for both CommonJS and ES modules
- Improved import compatibility across different JavaScript environments
- Consistent API across module systems
- Optimized file collection process
- Improved handling of large files
- Better error handling and reporting
- Updated README.md with detailed usage examples
- Added RELEASE_NOTES.md with version 1.1.0 details
- Created UPDATES.md documenting changes from enhanced version
- Added VSCode extension concept documentation
- Added comprehensive examples demonstrating all features
- Examples for both CommonJS and ES modules
- Security features demonstration
- Tree view and list-only mode examples
- Added architecture diagrams
- Created usage example visualizations
- Added logo and UI mockups
- Added tests for all new features
- Improved existing test coverage
- Created test documentation in docs/testing.md
- Plugin System Tests: PluginManager.test.ts, PluginEnabledFileContextBuilder.test.ts
- Security Scanner Tests: GitIgnoreSecurityScanner.test.ts, SensitiveDataSecurityScanner.test.ts
- Output Renderer Tests: MarkdownRenderer.test.ts, HTMLRenderer.test.ts
- Pattern Matching Tests: RegexPatternMatcher.test.ts, WhitelistBlacklist.test.ts
None. This release maintains backward compatibility with previous versions.
- Implement the VS Code extension based on the concept document
- Add more security scanners and output renderers
- Enhance LLM integration capabilities
- Improve documentation for the plugin system
-
Install dependencies:
npm install
-
Build the library:
npm run build
-
Run the example usage:
node dist/cjs/example-usage.js
-
Launch the Studio UI:
npx contextr studio
-
Run tests:
npm test
Please review the following key areas:
- Plugin system architecture
- Security scanner implementations
- UI Studio mode functionality
- TypeScript type definitions
- Test coverage for new features
This PR addresses the need for a more extensible and feature-rich context building system for LLMs, with particular focus on security, visualization, and customization.