Skip to content

Close AI Assistant window after applying the generated commit message #2535

Description

@liudh56

Description

When clicking the Use button in the AI Assistant, the generated commit message is applied to the commit message editor, but the AI Assistant window remains open.

Since the generation task is normally complete after the message has been applied, it would be more convenient if the window closed automatically.

Current behavior

  1. Generate a commit message with the AI Assistant.
  2. Click Use.
  3. The generated message is applied successfully.
  4. The AI Assistant window remains open and must be closed manually.

Expected behavior

After clicking Use and successfully applying the generated commit message, the AI Assistant window should close automatically.

Motivation

This would remove an unnecessary extra click and make the AI-assisted commit workflow feel more natural:

  1. Generate the message.
  2. Review it.
  3. Apply it and return directly to the commit view.

The Regenerate button would remain available before the message is applied.

Possible implementation

The window could call Close() after vm.Use(vm.Response) succeeds in OnUseClicked.

Image

I have tested this behavior in a local build, and it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions