Skip to content

Accept diff is not working on gitcommit anymore #1124

Open
@jiz4oh

Description

@jiz4oh

Hi, thank you create the powerful plugin.

I upgraded the plugin recently and I found the <c-y> is broken on the gitcommit.

My workflow is described below:

  1. open fugitive
  2. call :Git commit to open the gitcommit window
  3. call CopilotChatCommit
  4. call <c-y> to put the commit messages to the gitcommit window

The workflow works fine until I upgrade the plugin.

I try to debug the why and I found the copilot.chat:get_closest_block() return

{
  content = "fix(yarepl): correct aider source syntax property\n\nChanges the configuration property from 'source_func' to 'source_syntax' to \nmatch the expected configuration parameter name in yarepl plugin.",
  end_line = 15,
  header = {
    filename = "code-block",
    filetype = "gitcommit"
  },
  start_line = 12
}

and get_diff return nil.

hope the info can help you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions