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

Make Play Button stateful and remove intent toggle #6833

Merged
merged 6 commits into from
Jan 28, 2025

Conversation

thenamankumar
Copy link
Member

This PR:

  • Removes the intent toggle feature completely.
  • Changes the intent dropdown behavior to only select the intent and not execute it automatically.
  • Enables the submit button even when the chat is empty.

Test plan

  • the intent options in the dropdown only selects the intent mode and doesn't execute it.
  • after selecting the intent, changing the input, doesn't reset the intent.
  • on submit the selected intent is used and the intent selection message is displayed accordingly.
  • loading a chat from history and editing the message, doesn't persist the intent mode previously manually selected.
  • selecting a prompt correctly executes it in chat & edit modes.
  • make sure the submit button isn't disabled when the input is empty.

Copy link
Contributor

@janhartman janhartman left a comment

Choose a reason for hiding this comment

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

Code LGTM, but I'll defer to Erika/Beyang for the backport approval :)

Copy link
Contributor

@bahrmichael bahrmichael left a comment

Choose a reason for hiding this comment

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

LGTM

@thenamankumar thenamankumar merged commit 2edd264 into main Jan 28, 2025
21 checks passed
@thenamankumar thenamankumar deleted the naman/stateful-play-button branch January 28, 2025 09:12
@sourcegraph-release-bot
Copy link
Collaborator

The backport to vscode-v1.64.x failed at https://github.com/sourcegraph/cody/actions/runs/13007104159:

The process '/usr/bin/git' failed with exit code 1

To backport this PR manually, you can either:

Via the sg tool

Use the sg backport command to backport your commit to the release branch.

sg backport -r vscode-v1.64.x -p 6833
Via your terminal

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-vscode-v1.64.x vscode-v1.64.x
# Navigate to the new working tree
cd .worktrees/backport-vscode-v1.64.x
# Create a new branch
git switch --create backport-6833-to-vscode-v1.64.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2edd2640026853acb0038300c60cb6b08fffc3a6
# Push it to GitHub
git push --set-upstream origin backport-6833-to-vscode-v1.64.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-vscode-v1.64.x

If you encouter conflict, first resolve the conflict and stage all files, then run the commands below:

git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-6833-to-vscode-v1.64.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-vscode-v1.64.x
  • Follow above instructions to backport the commit.
  • Create a pull request where the base branch is vscode-v1.64.x and the compare/head branch is backport-6833-to-vscode-v1.64.x., click here to create the pull request.

Once the pull request has been created, please ensure the following:

  • Make sure to tag @sourcegraph/release in the pull request description.

  • kindly remove the release-blocker from this pull request.

@sourcegraph-release-bot
Copy link
Collaborator

The backport to jb-v7.12.x failed at https://github.com/sourcegraph/cody/actions/runs/13007104159:

The process '/usr/bin/git' failed with exit code 1

To backport this PR manually, you can either:

Via the sg tool

Use the sg backport command to backport your commit to the release branch.

sg backport -r jb-v7.12.x -p 6833
Via your terminal

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-jb-v7.12.x jb-v7.12.x
# Navigate to the new working tree
cd .worktrees/backport-jb-v7.12.x
# Create a new branch
git switch --create backport-6833-to-jb-v7.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2edd2640026853acb0038300c60cb6b08fffc3a6
# Push it to GitHub
git push --set-upstream origin backport-6833-to-jb-v7.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.12.x

If you encouter conflict, first resolve the conflict and stage all files, then run the commands below:

git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-6833-to-jb-v7.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.12.x
  • Follow above instructions to backport the commit.
  • Create a pull request where the base branch is jb-v7.12.x and the compare/head branch is backport-6833-to-jb-v7.12.x., click here to create the pull request.

Once the pull request has been created, please ensure the following:

  • Make sure to tag @sourcegraph/release in the pull request description.

  • kindly remove the release-blocker from this pull request.

thenamankumar added a commit that referenced this pull request Jan 28, 2025
This PR:
- Removes the intent toggle feature completely.
- Changes the intent dropdown behavior to only select the intent and not
execute it automatically.
- Enables the submit button even when the chat is empty.

- the intent options in the dropdown only selects the intent mode and
doesn't execute it.
- after selecting the intent, changing the input, doesn't reset the
intent.
- on submit the selected intent is used and the intent selection message
is displayed accordingly.
- loading a chat from history and editing the message, doesn't persist
the intent mode previously manually selected.
- selecting a prompt correctly executes it in chat & edit modes.
- make sure the submit button isn't disabled when the input is empty.
thenamankumar added a commit that referenced this pull request Jan 28, 2025
This PR:
- Removes the intent toggle feature completely.
- Changes the intent dropdown behavior to only select the intent and not
execute it automatically.
- Enables the submit button even when the chat is empty.

- the intent options in the dropdown only selects the intent mode and
doesn't execute it.
- after selecting the intent, changing the input, doesn't reset the
intent.
- on submit the selected intent is used and the intent selection message
is displayed accordingly.
- loading a chat from history and editing the message, doesn't persist
the intent mode previously manually selected.
- selecting a prompt correctly executes it in chat & edit modes.
- make sure the submit button isn't disabled when the input is empty.
@thenamankumar
Copy link
Member Author

These changes are pre-approved by @beyang during Monday's team sync. Merging the backports to unblock.

thenamankumar added a commit that referenced this pull request Jan 28, 2025
backport: #6833
This PR:
- Removes the intent toggle feature completely.
- Changes the intent dropdown behavior to only select the intent and not
execute it automatically.
- Enables the submit button even when the chat is empty.

- the intent options in the dropdown only selects the intent mode and
doesn't execute it.
- after selecting the intent, changing the input, doesn't reset the
intent.
- on submit the selected intent is used and the intent selection message
is displayed accordingly.
- loading a chat from history and editing the message, doesn't persist
the intent mode previously manually selected.
- selecting a prompt correctly executes it in chat & edit modes.
- make sure the submit button isn't disabled when the input is empty.


## Test plan

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->
thenamankumar added a commit that referenced this pull request Jan 28, 2025
backport: #6833


This PR:

Removes the intent toggle feature completely.

Changes the intent dropdown behavior to only select the intent and not
execute it automatically.

Enables the submit button even when the chat is empty.

## Test plan


the intent options in the dropdown only selects the intent mode and
doesn't execute it.

after selecting the intent, changing the input, doesn't reset the
intent.

on submit the selected intent is used and the intent selection message
is displayed accordingly.

loading a chat from history and editing the message, doesn't persist the
intent mode previously manually selected.

selecting a prompt correctly executes it in chat & edit modes.

make sure the submit button isn't disabled when the input is empty.


<!-- Required. See
https://docs-legacy.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants