Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset editor intent on new chat and empty editor value (#5991)
This PR solves a bug and implements a minor feature. Well call it bugfix or feature whatever. Right now if the intent of chat is set to anything search/chat/edit/insert and you create a new chat, the intent is not reset. why? because the react component is not re-rendered and its key={n=index}, obviously the index stays 0 when you create a new chat. So this PR: 1. resets the intent when the input is cleared. 2. resets the intent when the message is changes. ## Test plan - change the intent, clear the input, the intent should reset - change the intent, submit the message, create a new chat, the intent should reset. ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
- Loading branch information