Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krshrimali/context-pilot-rs
Get relevant files/authors for your code - binary written in rust. Plugins available in NeoVim and VSCode (separate repositories)
https://github.com/krshrimali/context-pilot-rs
developer-experience developer-tools git rust
Last synced: 6 days ago
JSON representation
Get relevant files/authors for your code - binary written in rust. Plugins available in NeoVim and VSCode (separate repositories)
- Host: GitHub
- URL: https://github.com/krshrimali/context-pilot-rs
- Owner: krshrimali
- Created: 2023-06-10T06:25:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-20T18:04:33.000Z (18 days ago)
- Last Synced: 2024-10-25T10:53:48.650Z (13 days ago)
- Topics: developer-experience, developer-tools, git, rust
- Language: Rust
- Homepage:
- Size: 180 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ContextPilot: All the context, right at your ~door~ code step.
## What is ContextPilot?
Use this binary to find top N (all for now) relevant files and authors for the given:
- Line of Code
- Range of lines
- Current FilePlugins available for both [NeoVim](https://github.com/krshrimali/context-pilot.nvim) and [Visual Studio Code](https://github.com/krshrimali/context-pilot-vscode).
## Why do you need it?
We all ask the questions below, once in every 2 days if not daily!
- Hi, where to look for the usage of this class?
- Hey, do you know who could help me with this?
- I changed this file, is there any other file I should look at as well?
- I’m not sure if I understand where we are using this.As developers, code means us more than a paragraph. This does exactly that.
## Algorithm
INPUT: Your whole file/section of code/current line
For each line:
- If line >= Threshold:
- let commit_hash = get_commit_sha(line_number.start, line_number.end)
- file_author_details = get_files_changed(commit_hash)
- recurse(commit_hash) # 5 times:
- commit_hash = get_previous_commit_sha(commit_hash)
- file_author_details = get_files_changed(commit_hash)
- Generate BTreeMap for frequency mapping
- return most N common files and authors## Future Steps
1. Store results for each commit hash in an in-house DB
2. Indexing when the editor starts (optional)
3. Configurable for both VSCode and NeoVim
4. Ship PyCharm Extension
5. Integrate LLM for deciding top 5 files and authors for relevance## Building
(TODO: Improve this section of code)
```bash
cargo build --release
cargo run
```## Want to contribute?
Create an issue and let me know!!