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

Fix bug where up/down arrow keys always navigate chat history #1323

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

olafurpg
Copy link
Member

Fixes #1134

Previously, pressing up/down arrow keys in the chat input always replaced the entire contents of the chat input with the previous/next chat message from history. This was a regression that was introduced in the commit https://sourcegraph.com/github.com/sourcegraph/jetbrains/-/commit/88a21694097716fbe53b84e76b3124cb3454af76#diff-91c99de25d8f01dab68bee8fa28fb6f1L80 where the variable isInHistoryMode got removed. This PR adds back the original logic for isInHistoryMode so the chat input works like before.

Test plan

Manually tested. See demo https://www.loom.com/share/4806fcaeaa9e44519d12e8b6d16a29a0

Fixes #1134

Previously, pressing up/down arrow keys in the chat input always
replaced the entire contents of the chat input with the previous/next
chat message from history. This was a regression that was introduced
in the commit https://sourcegraph.com/github.com/sourcegraph/jetbrains/-/commit/88a21694097716fbe53b84e76b3124cb3454af76#diff-91c99de25d8f01dab68bee8fa28fb6f1L80
where the variable `isInHistoryMode` got removed. This PR adds back the
original logic for `isInHistoryMode` so the chat input works like
before.

Demo https://www.loom.com/share/4806fcaeaa9e44519d12e8b6d16a29a0
@olafurpg olafurpg requested a review from pkukielka April 16, 2024 11:03
@olafurpg olafurpg enabled auto-merge (squash) April 16, 2024 11:10
Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@olafurpg olafurpg merged commit e892953 into main Apr 16, 2024
5 checks passed
@olafurpg olafurpg deleted the olafurpg/issue-1134 branch April 16, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: pressing UpArrow in multiline message has surprising behavior
2 participants