-
Notifications
You must be signed in to change notification settings - Fork 7
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
proper removal of previous entries #125
Conversation
session_id = request.json.get('sessionId') | ||
history = request.json.get('history', []) | ||
settings = request.json.get('settings', {}) | ||
|
||
if query is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows querying by:
- just a query string
- a query string + history
- just history (as the last item is going to be the query)
setQuery(v); | ||
onQuery && onQuery(v); | ||
}} | ||
abortSearch={() => controller.abort()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if multiple things are started (e.g. <Followups onClick={...}>
, you only want to abort the last one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right - fixed
This is mainly a lot of reshuffling of the code. The previous code would display a history of previous interactions, each of which could be deleted, but this wouldn't have any effect on the current search. Which was annoying when you wanted to delete the last response and try again - it would delete it, but then you'd still have to copy your search phrase over.
Now when the last item is deleted, it will return to editing the previous query