posit-dev / posit-dev/positron
Console: Make Cmd+R (search history) use fuzzy matching and ranking
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Today, the Cmd R history search in the Positron console uses exact substring matching. In order to find an element in the history, you must type an exact match for some part of the code.
Compare to the algorithm used by the Command Palette:
We could improve the usefulness of the history search in the Console by making it more like the Palette:
- removing duplicates
- ranking by "frecency" (notice how the Palette prioritizes "recently opened"; we'd prioritize "recently run")
- making the search fuzzier, so the characters just need to appear in the code in any order -- e.g
libggwould matchlibrary(ggplot2)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Console Cmd+R history search and the Command Palette matching algorithm, then compare their matching and ranking behavior. Done means history results remove duplicates, support fuzzy character matching such as libgg for library(ggplot2), and rank recently run entries higher.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100