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(auto-edit): fix the cody status bar with new suggestion mode #6691

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

hitesh-1997
Copy link
Contributor

Context

Cody Status bar for autocomplete is broken right now with the introduction of new suggestion modes.
image

Test plan

  • Switch between different modes in the toggle bar.
  • Added a demo below
Loom.Message.-.18.January.2025.mp4

async onSelect() {
// Show a QuickPick for the user to choose a new value.
const selection = await vscode.window.showQuickPick(requiredValues, {
placeHolder: `Current: “${currentValue}”. Pick a new mode...`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @toolmantim
I wanted to get your review on these string that we are showing to the user on the UI. Do you think these look okay or we should change them to something else ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how they currently look in the UI:

image image

Copy link
Contributor

@toolmantim toolmantim Jan 20, 2025

Choose a reason for hiding this comment

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

All the existing settings in the "enable/disable features" are boolean… I think instead we add this in a section above it @hitesh-1997 & @umpox:

section label: "code suggestion settings"
icon: code (unless you find something better)
title: "Code Suggestion Mode (${current})"
description: "Choose how Cody suggests inline code changes"

q: Have we dropped the cog right hand action, for configuring autocomplete file types? We could add it to the next quickpick where you choose…

placeholder: "Choose an option"
section label: options
options:

  • title: "Autocomplete"
    description: "Suggest code completions for the rest of the line or block"
  • title: "Auto-edit"
    description: "Suggest additions, changes and deletions around cursor based on file changes"
  • title: Disabled
    description: "No code suggestions"

If autocomplete is enabled, add this extra section:

section label: settings

  • title: "Autocomplete Settings"
    description: "Open Cody autocomplete settings"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @toolmantim
Would it be possible to add a quick design snapshot ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for the response @toolmantim
The new design looks really good, implemented the same :)

Copy link
Contributor

@umpox umpox left a comment

Choose a reason for hiding this comment

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

LGTM from a code perspective, I'll leave @toolmantim to comment on the design but suggest we merge and fix forward :)

@@ -127,13 +127,6 @@ export function isUserEligibleForAutoeditsFeature(
authStatus: AuthStatus,
productSubscription: UserProductSubscription | null
): AutoeditsUserEligibilityInfo {
console.log({
Copy link
Member

Choose a reason for hiding this comment

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

TY

Copy link
Member

@valerybugakov valerybugakov left a comment

Choose a reason for hiding this comment

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

LGMT

@hitesh-1997 hitesh-1997 merged commit 0fe2fff into main Jan 29, 2025
20 of 21 checks passed
@hitesh-1997 hitesh-1997 deleted the hitesh/fix-status-bar-auto-edit branch January 29, 2025 07:59
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.

4 participants