feat: improve references search#107
Merged
Merged
Conversation
cguedes
reviewed
Jun 9, 2023
cguedes
left a comment
Collaborator
There was a problem hiding this comment.
I'm not sure an atom should be used here.
Comment on lines
+31
to
+36
| export const getReferencesFuseAtom = atom( | ||
| (get) => | ||
| new Fuse(get(getReferencesAtom), { | ||
| keys: ['title', 'authors.fullName'], | ||
| }), | ||
| ); |
Collaborator
There was a problem hiding this comment.
Why do you think this should be an atom? I can only think of keeping the instance alive and therefore performance, but for that we might use a UseRef in the react component (this is a UI concern).
Another though is about (underlying) references getting updated and the atom being the best solution.
Collaborator
Author
There was a problem hiding this comment.
No, you're right, there are no particular to use an atom here. Beside, I think this creates a new instance every time we read the atom so it does not even keep the instance alive
Improve logging for sidecar
Co-authored-by: Mathis Pierron <[email protected]>
* feat: Add AI interaction for text rewrite (#60) * linter fix * Fix unit test reading OPENAI_API_KEY with .get * Adjust AI View to use rewrite sidecar command * Use `self.n_options` instead of hard-coded 1 * Create useCallablePromise and improve code * remove unused dependencies --------- Co-authored-by: Carlos Guedes <[email protected]> Co-authored-by: Carlos Guedes <[email protected]>
cguedes
previously approved these changes
Jun 9, 2023
cguedes
approved these changes
Jun 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #106
This enables searching references by title and author names in the reference selector.
This also uses fuse.js library to implement fuzzy search. The search options can easily be configured in the corresponding atom