Skip to content

Make finding 'context' for claude-code-send-command-with-context more flexible #146

Description

@verdammelt

I started using this package and I found that this function wouldn't send context if the buffer was not visiting a file. With some (a lot) of help from Claude I came up with a scheme where a list of context gathering functions would be called and the data from the first one that returned non-nil would be used.

For example I have a function that will return the filename on the currently line in a dried buffer (or file names if there is a region), and for other non-file-visiting buffers it would use the text of the current region along with the buffer name.

Does this sound like a good idea? Is there some other way claude-code.el is intended to be used such that this is not an issue?

Happy to share my hacked version, and/or open a PR.

Thanks.

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