Bug: The "New" button does not work
Summary
After starting a conversation with the Assistant, the "New" button does not work. You have to navigate to another page (such as the history page) and then click "New" from there.
Steps to reproduce
- Navigate to
/assistant - Start a conversation (requires an OpenAI API token)
- Click "New"
- Nothing happens
would this one have conflicts? low hanging fruit.
@3thanHead this one should be safe to pick up!
@davidmyersdev technically, since this view is used to create a new conversation, wouldn't there be no need for a "New" button here, since it would only redirect to the same page. All it currently does is increment the query string: https://github.com/davidmyersdev/octo/blob/main/components/AssistantContainer.vue#L12 https://github.com/davidmyersdev/octo/blob/main/composables/useSoftNavigation.ts#L8
The conversation isn't started and available in history until the first message is sent. Does removing the "New" button on the assistant view solve the issue?
For posterity, @3thanHead and I discussed in person that the bug here happens only when a new conversation is started and the page is not reloaded. For more context, the useSoftNavigation feature was originally implemented to prevent the URL change from re-rendering the page components. This happened due to a previous hack I had in place where URL changes would force pages to re-render. I believe removing that hack is what broke this functionality.
Understood. Played around with this a bit. If I remove this watcher (https://github.com/davidmyersdev/octo/blob/main/components/AssistantContainer.vue#L14-L20) and add redirect with vue router instead when message is submitted, bug is solved. Putting PR up for this.
Fixed in #302! Thanks so much @3thanHead! 🎉