Commit c234cb3
Add MCP server with pagination and TUI refactoring
This commit adds comprehensive MCP (Model Context Protocol) support and refactors the TUI into a dedicated crate.
## MCP Server Features
- Full stdio transport implementation with tool discovery
- Pagination support with cursor-based navigation (1-200 results per page)
- Session management with TTL and automatic cleanup (60s expiration)
- Search tools: semantic_search, regex_search, hybrid_search, lexical_search
- Index tools: index_status, reindex, health_check
- Fallback strategies: automatic semantic → lexical when embeddings unavailable
- 7 comprehensive integration tests for pagination and edge cases
## TUI Refactoring
- Extracted 3,084 lines of TUI code into dedicated ck-tui crate
- Clean modular architecture with public API
- Config persistence to ~/.config/ck/tui.json
- Multiple preview modes (Heatmap, Syntax, Chunks)
- Multiple search modes (Semantic, Regex, Hybrid)
- Multi-select workflow and editor integration
- Real-time indexing progress with file/chunk counts
## CLI Enhancements
- Color-coded similarity scores with RGB gradient heatmap
- Enhanced visual output with Unicode box drawing
- Near-miss tracking for threshold queries
## Core Improvements
- Span validation with Span::new() to prevent invalid spans
- Mixed line ending support (Unix \n, Windows \r\n, Mac \r)
- Memory-efficient streaming file operations
- Better PDF content path resolution
## Technical Details
- Session cleanup: LRU-based eviction with periodic task (30s)
- Line ending tracking: split_lines_with_endings() for byte precision
- SearchResults enhancement: closest_below_threshold field
- Full test coverage with integration tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cd5ad76 commit c234cb3
81 files changed
Lines changed: 12372 additions & 14331 deletions
File tree
- ck-ann
- ck-chunk
- ck-cli
- src
- mcp
- tui
- tests
- ck-core/src
- ck-embed
- ck-engine
- src
- ck-index
- ck-models
- ck-tui
- src
- ck-vscode
- resources
- src
- webview
- docs
- _sass/color_schemes
- assets/js
- explanation
- how-to
- reference
- tutorials
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
5 | 39 | | |
6 | 40 | | |
7 | 41 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
70 | 93 | | |
71 | 94 | | |
72 | 95 | | |
| |||
348 | 371 | | |
349 | 372 | | |
350 | 373 | | |
| 374 | + | |
351 | 375 | | |
352 | 376 | | |
353 | 377 | | |
| |||
0 commit comments