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: command filter regex #594

Merged
merged 3 commits into from
Aug 7, 2023
Merged

fix: command filter regex #594

merged 3 commits into from
Aug 7, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Aug 7, 2023

RE: https://sourcegraph.slack.com/archives/C05AGQYD528/p1691422532897009

fix: command filter regex

Currently, typing /r or /reset would reset the chat as expected, but if you create a new slash command that starts with r, for example, /release, it would still perform the reset command because of the current REGEX we are using for the /reset command.

This PR fixes that issue along with the same issue for /search and /fix

Test plan

After

submitting chat with /read should not perform reset
submitting chat with /stop should not perform search
submitting chat with /fox should not perform fix.

Before

submitting chat with /read performs reset
submitting chat with /stop performs search
submitting chat with /fox performs fix

@abeatrix abeatrix requested a review from a team August 7, 2023 15:41
Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

LGTM

vscode/src/chat/MessageProvider.ts Outdated Show resolved Hide resolved
vscode/src/chat/MessageProvider.ts Outdated Show resolved Hide resolved
@philipp-spiess philipp-spiess mentioned this pull request Aug 7, 2023
5 tasks
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
@abeatrix abeatrix enabled auto-merge (squash) August 7, 2023 15:48
@abeatrix abeatrix merged commit 39c4d2f into main Aug 7, 2023
9 checks passed
@abeatrix abeatrix deleted the bee/command-regex branch August 7, 2023 15:50
philipp-spiess added a commit that referenced this pull request Aug 7, 2023
## Waiting for

- [x] #581
- [x] #591
- [x] #594
- [x] #593
- [x] #597

## Test plan

Just a release change

<!-- Required. See
https://docs.sourcegraph.com/dev/background-information/testing_principles.
-->
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.

None yet

2 participants