Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically Find Similar Notes on Emacs in Background #827

Merged
merged 8 commits into from
Jun 23, 2024

Conversation

debanjum
Copy link
Member

@debanjum debanjum commented Jun 19, 2024

Khoj will find and display notes similar to the current entry in the side pane when

  1. find similar is open in side pane and
  2. cursor has moved to a new entry

Major

  • Find similar notes to current note at cursor automatically in background
  • Only show headings of search result and increase default results count

Minor

  • Pass absolute path of file to index from khoj.el emacs client
  • Update help message to only show the smaller set of new keybindings
  • Fix edge cases in loading some chat sessions

@debanjum debanjum force-pushed the automatic-find-similar-in-emacs branch from 4124965 to 507feaa Compare June 19, 2024 20:31
- Call find similar on current element if point has moved to new
  element
- Delete the first result from find-similar search results as that'll
  be the current note (which is trivially most similar to itself)
- Determine find-similar based text formating at the rendering layer
  rather than at the top level find-similar func
Previously it would show complete result body this would make the
result width variable and hard to track all the returned results

Showing just heading makes it easier to track
Previously the cursor would move to the Khoj side pane on opening it.
This would break user's flow, especially when find similar triggers
automatically

New behavior maintains smoother update of auto find similar without
disrupting user browsing
@debanjum debanjum force-pushed the automatic-find-similar-in-emacs branch 3 times, most recently from ad441ae to 571cea4 Compare June 21, 2024 05:11
When create new conversation session, automatically request query. As
that is expected next action after creating new session

Pass session-id to khoj-chat to allow reuse from
create-new-conversation func

When delete conversation session, do not call load chat session.
Unnecessary action.

Use thread-last to improve code flow in new, delete conversation funcs
@debanjum debanjum force-pushed the automatic-find-similar-in-emacs branch from 571cea4 to 427575e Compare June 21, 2024 05:25
@debanjum debanjum added the plugin Improvements or additions to content or UI integrations label Jun 21, 2024
@debanjum debanjum merged commit a940624 into master Jun 23, 2024
8 checks passed
@debanjum debanjum deleted the automatic-find-similar-in-emacs branch June 23, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin Improvements or additions to content or UI integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant