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

cody: toggle config for inline and non-stop no reload required #53348

Merged
merged 7 commits into from
Jun 13, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jun 12, 2023

Requested by #53307
Close #53351 #53363

This PR includes:

  • Updating the configuration for Inline Assist no longer requires users to reload the extension.
  • Remove Code Lens to save Inline Fixup
  • Add Undo Code Lens to Inline Fixup jobs that undo changes made by Cody
  • Remove all comment threads from file when file is closed

For details: https://www.loom.com/share/540f4953b1ac4c9d81e90f4c37f86c2d?sid=41c65fd7-1be2-4225-92eb-3c7fa56766f8

Test plan

All the existing tests should be passing.

Cody_.Toggle.configs.for.Inline.Assist.and.Non-Stop.Cody.mp4

@cla-bot cla-bot bot added the cla-signed label Jun 12, 2023
@abeatrix abeatrix requested review from philipp-spiess and a team June 12, 2023 22:47
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Jun 12, 2023

📖 Storybook live preview

this.contextStore.set(id, { docUri, original, replacement })
}

public async undo(id: string): Promise<void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clicking on undo will replace the replacement context with the original context

Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

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

  • We shouldn't add a "revert" to the code lens, it seems unrelated. The lenses have a scope within the file; revert applies over the whole file.
  • Don't make non-stop fixup dynamic in this way. This needs care to handle in-flight work work shutting down cleanly. I don't think it's worth it because it will complicate respinning, etc. but if we want to do it, it needs tests and probably more work.
  • Up to you about inline chat but do similar concerns apply?

client/cody/CHANGELOG.md Outdated Show resolved Hide resolved
const isTesting = process.env.CODY_TESTING === 'true'
if (e.affectsConfiguration('cody')) {
// Non-Stop Cody
const enableNonStop = (config.get('experimental.nonStop') as boolean) || isTesting
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not make non-stop fixups configurable at runtime. There's work to cleanly shut down things in flight if you can toggle this dynamically that isn't being attempted here. So please back this part of the change out.

Inline assist, I leave to you judgement, but you should test cases like having an inline assist spinning and then turning the feature off; having it on, spin, off, on again, etc.

On the whole I don't think this is worth the complexity it might entail. Do people want to flip the availability of these features off and on a lot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I will remove Non-Stop Cody from this.

Do people want to flip the availability of these features off and on a lot?

I think we just want to make it easier so that users do need to reload their IDE when they enable the feature.

@abeatrix
Copy link
Contributor Author

@dominiccooney updated based on your last review

  • We shouldn't add a "revert" to the code lens, it seems unrelated. The lenses have a scope within the file; revert applies over the whole file.

    • Removed.
  • Don't make non-stop fixup dynamic in this way. This needs care to handle in-flight work work shutting down cleanly. I don't think it's worth it because it will complicate respinning, etc. but if we want to do it, it needs tests and probably more work.

    • Removed toggle for Non-Stop fixup
  • Up to you about inline chat but do similar concerns apply?

    • Keeping this for Inline Chat because the toggle is for the ability to create a comment thread. It does not affect any inflight fixup job is handled by the Fixup recipe.

Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

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

Looks good.

Would be great to spell out the command to run the existing tests in the test plan. It will help others grok how to run those tests.

@abeatrix abeatrix merged commit 484da80 into main Jun 13, 2023
29 checks passed
@abeatrix abeatrix deleted the bee/cody-toggle-inline-fixup branch June 13, 2023 12:12
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.

cody: code lens to undo fixups in Inline Assist
3 participants