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

feat: enhance CopilotChat.nvim plugin with new features and improvements #140

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

dgokcin
Copy link
Owner

@dgokcin dgokcin commented Dec 9, 2024

Summary

This PR introduces several enhancements and new features to the CopilotChat.nvim plugin, including improved prompt handling, additional commands, and better integration with Telescope and CMP.

Changes

  • Refactored the plugin structure by encapsulating functionality within a module ().
  • Added a new function for prompt selection using Telescope.
  • Updated plugin dependencies and configuration options.
  • Introduced custom contexts for git diff and pull request generation.
  • Enhanced prompt definitions with system prompts for better context.
  • Added new commands for generating commit messages and pull requests.
  • Improved key mappings for various CopilotChat functionalities.
  • Disabled line numbers in the chat window for better readability.
  • Integrated CMP setup for better completion support.
  • Created user commands for visual mode and inline chat with Copilot.

Additional Notes

  • The new context fetches the latest changes from the remote repository and generates a diff between the current branch and main.
  • Custom prompts now include system prompts to provide better context for the AI.
  • The PR generation prompt includes detailed instructions for creating a pull request using the Work seamlessly with GitHub from the command line.

USAGE
gh [flags]

CORE COMMANDS
auth: Authenticate gh and git with GitHub
browse: Open the repository in the browser
codespace: Connect to and manage codespaces
gist: Manage gists
issue: Manage issues
org: Manage organizations
pr: Manage pull requests
project: Work with GitHub Projects.
release: Manage releases
repo: Manage repositories

GITHUB ACTIONS COMMANDS
cache: Manage GitHub Actions caches
run: View details about workflow runs
workflow: View details about GitHub Actions workflows

EXTENSION COMMANDS
copilot: Extension copilot

ALIAS COMMANDS
co: Alias for "pr checkout"

ADDITIONAL COMMANDS
alias: Create command shortcuts
api: Make an authenticated GitHub API request
attestation: Work with artifact attestations
completion: Generate shell completion scripts
config: Manage configuration for gh
extension: Manage gh extensions
gpg-key: Manage GPG keys
label: Manage labels
ruleset: View info about repo rulesets
search: Search for repositories, issues, and pull requests
secret: Manage GitHub secrets
ssh-key: Manage SSH keys
status: Print information about relevant issues, pull requests, and notifications across repositories
variable: Manage GitHub Actions variables

HELP TOPICS
actions: Learn about working with GitHub Actions
environment: Environment variables that can be used with gh
exit-codes: Exit codes used by gh
formatting: Formatting options for JSON data exported from gh
mintty: Information about using gh with MinTTY
reference: A comprehensive reference of all gh commands

FLAGS
--help Show help for command
--version Show gh version

EXAMPLES
$ gh issue create
$ gh repo clone cli/cli
$ gh pr checkout 321

LEARN MORE
Use gh <command> <subcommand> --help for more information about a command.
Read the manual at https://cli.github.com/manual CLI.

- replaced  with module
- removed redundant prompt definitions
- added prompt picker using Telescope
- updated plugin dependencies and options
- introduced custom contexts for git operations
- added new prompts for code and text-related tasks
- implemented new key mappings for various commands
- improved setup and configuration functions
- enhanced user commands for visual and inline chat
- disabled line numbers in chat window
- integrated CMP setup
…tation

- added a description for the pr_diff context to explain its purpose
- fixed indentation for the prompt in the CommitUnstaged context
@dgokcin dgokcin merged commit cf03e9f into main Dec 9, 2024
2 checks passed
@dgokcin dgokcin deleted the copilot-chat-updates branch December 9, 2024 12:30
dgokcin added a commit that referenced this pull request Dec 11, 2024
…nts (#140)

* refactor(copilot-chat): restructure plugin configuration

* feat(copilot-chat): add description for pr_diff context and fix indentation

- added a description for the pr_diff context to explain its purpose
- fixed indentation for the prompt in the CommitUnstaged context

* refactor: improve indentation for copilot-chat
@dgokcin dgokcin mentioned this pull request Dec 11, 2024
dgokcin added a commit that referenced this pull request Dec 11, 2024
* major plugin update(#139)

* feat(git): add hello alias for greeting message

* feat: add smear-cursor

* fix: resolve weird vscode error after update

* feat: add some work related aliases

* chore: update work related git settings

* fix: fix for ai stuff

* feat: enhance CopilotChat.nvim plugin with new features and improvements (#140)

* refactor(copilot-chat): restructure plugin configuration

* feat(copilot-chat): add description for pr_diff context and fix indentation

- added a description for the pr_diff context to explain its purpose
- fixed indentation for the prompt in the CommitUnstaged context

* refactor: improve indentation for copilot-chat

* feat: update git configuration setup (#142)

- add personal and work gitconfig includes in base.gitconfig
- consolidate personal and work git setup into a single target in makefiles/gitconfigs.mk
- update clean target in makefiles/utils.mk to remove new gitconfig files
- keep personal-git and work-git targets for backward compatibility
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.

1 participant