diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index cc131582..d70ff362 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -1,10 +1,21 @@ -name: "Run TODO to Issue" - -on: ["push"] +name: "Convert TODO to Issue" +on: + push: + workflow_dispatch: + inputs: + MANUAL_COMMIT_REF: + description: "The SHA of the commit to get the diff for" + required: true + MANUAL_BASE_REF: + description: "By default, the commit entered above is compared to the one directly before it; to go back further, enter an earlier SHA here" + required: false jobs: build: runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v3" - name: "TODO to Issue" - uses: "alstr/todo-to-issue-action@v4" + uses: "alstr/todo-to-issue-action@master" + env: + MANUAL_COMMIT_REF: ${{ inputs.MANUAL_COMMIT_REF }} + MANUAL_BASE_REF: ${{ inputs.MANUAL_BASE_REF }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9543d5..e9845ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.6.2](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v1.6.1...v1.6.2) (2024-02-20) + + +### Bug Fixes + +* set filetype to markdown for toggle vsplit buffer ([1e250ff](https://github.com/CopilotC-Nvim/CopilotChat.nvim/commit/1e250ff1d751fc187e220ac596eb745f09e805aa)) + ## [1.6.1](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v1.6.0...v1.6.1) (2024-02-18) diff --git a/doc/CopilotChat.txt b/doc/CopilotChat.txt index 0b157fa0..2ad03ce2 100644 --- a/doc/CopilotChat.txt +++ b/doc/CopilotChat.txt @@ -1,4 +1,4 @@ -*CopilotChat.txt* For NVIM v0.8.0 Last change: 2024 February 18 +*CopilotChat.txt* For NVIM v0.8.0 Last change: 2024 February 20 ============================================================================== Table of Contents *CopilotChat-table-of-contents* diff --git a/rplugin/python3/CopilotChat/handlers/chat_handler.py b/rplugin/python3/CopilotChat/handlers/chat_handler.py index 153497c0..8e2745e2 100644 --- a/rplugin/python3/CopilotChat/handlers/chat_handler.py +++ b/rplugin/python3/CopilotChat/handlers/chat_handler.py @@ -17,7 +17,7 @@ def is_module_installed(name): return False -# TODO: Abort request if the user closes the layout +# TODO: Support Custom Instructions when this issue has been resolved https://github.com/microsoft/vscode-copilot-release/issues/563 class ChatHandler: has_show_extra_info = False @@ -266,6 +266,7 @@ def _add_chat_messages( self.nvim.exec_lua( 'require("CopilotChat.utils").log_info(...)', "Asking Copilot" ) + # TODO: Abort request if the user closes the layout for token in self.copilot.ask( system_prompt, prompt, code, language=cast(str, file_type), model=model ): diff --git a/rplugin/python3/CopilotChat/handlers/inplace_chat_handler.py b/rplugin/python3/CopilotChat/handlers/inplace_chat_handler.py index 1f206527..0342d864 100644 --- a/rplugin/python3/CopilotChat/handlers/inplace_chat_handler.py +++ b/rplugin/python3/CopilotChat/handlers/inplace_chat_handler.py @@ -232,6 +232,7 @@ def _toggle_system_model(self): self.copilot_popup.unmount() self.copilot_popup.mount(controlled=True) + # TODO: Add custom keymaps for in-place chat as suggestion here https://discord.com/channels/1200633211236122665/1200633212041449606/1208065809285382164 def _set_keymaps(self): """Set the keymaps for the chat handler.""" self.prompt_popup.map("n", "", lambda: self._chat()) diff --git a/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py b/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py index 16dce5cd..1608c53a 100644 --- a/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py +++ b/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py @@ -52,6 +52,7 @@ def toggle_vsplit(self): pass self.vsplit() + self.buffer.option("filetype", "markdown") def chat(self, prompt: str, filetype: str, code: str = ""): self.buffer.option("filetype", "markdown") diff --git a/rplugin/python3/CopilotChat/utilities.py b/rplugin/python3/CopilotChat/utilities.py index fbc418e3..f9a5c618 100644 --- a/rplugin/python3/CopilotChat/utilities.py +++ b/rplugin/python3/CopilotChat/utilities.py @@ -43,7 +43,7 @@ def generate_request( "model": model, "n": 1, "stream": True, - "temperature": 0.1, + "temperature": 0.1, # TODO: add temperature setting, refer the suggestion from user https://discord.com/channels/1200633211236122665/1209114805147926538/1209189717791477870 "top_p": 1, "messages": messages, } diff --git a/syntax.json b/syntax.json new file mode 100644 index 00000000..978c116b --- /dev/null +++ b/syntax.json @@ -0,0 +1,736 @@ +[ + { + "language": "Python", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "'''", + "end": "'''" + } + }, + { + "type": "block", + "pattern": { + "start": "\"\"\"", + "end": "\"\"\"" + } + } + ] + }, + { + "language": "Elixir", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "YAML", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "Ruby", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "=begin", + "end": "=end" + } + } + ] + }, + { + "language": "PHP", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + }, + { + "type": "block", + "pattern": { + "start": "" + } + } + ] + }, + { + "language": "C", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "C++", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "C#", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Java", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "JavaScript", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "JSON with Comments", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "JSON5", + "markers": [ + { + "type": "line", + "pattern": "//" + } + ] + }, + { + "language": "Julia", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "#=", + "end": "=#" + } + } + ] + }, + { + "language": "Starlark", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "TypeScript", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "TSX", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Dart", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Kotlin", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Scala", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Objective-C", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Sass", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Less", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Swift", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Haskell", + "markers": [ + { + "type": "line", + "pattern": "--" + }, + { + "type": "block", + "pattern": { + "start": "{-", + "end": "-}" + } + } + ] + }, + { + "language": "HTML", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + } + ] + }, + { + "language": "CSS", + "markers": [ + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "AutoHotkey", + "markers": [ + { + "type": "line", + "pattern": ";" + } + ] + }, + { + "language": "Markdown", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + }, + { + "type": "block", + "pattern": { + "start": "{/\\*", + "end": "\\*/}" + } + }, + { + "type": "line", + "pattern": "- \\[ \\]" + } + ] + }, + { + "language": "RMarkdown", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + } + ] + }, + { + "language": "Shell", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "Handlebars", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + }, + { + "type": "block", + "pattern": { + "start": "{{!", + "end": "}}" + } + } + ] + }, + { + "language": "Org", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "#\\+begin_comment", + "end": "#\\+end_comment" + } + } + ] + }, + { + "language": "TeX", + "markers": [ + { + "type": "line", + "pattern": "%" + }, + { + "type": "line", + "pattern": "\\\\todo{" + }, + { + "type": "block", + "pattern": { + "start": "\\\\begin{comment}", + "end": "\\\\end{comment}" + } + } + ] + }, + { + "language": "SQL", + "markers": [ + { + "type": "line", + "pattern": "--" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "HTML+Razor", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + }, + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Rust", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Vue", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + }, + { + "type": "line", + "pattern": "//" + } + ] + }, + { + "language": "ABAP", + "markers": [ + { + "type": "line", + "pattern": "\"" + }, + { + "type": "line", + "pattern": "\\*" + } + ] + }, + { + "language": "ABAP CDS", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "GDScript", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "Go", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "HCL", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "SCSS", + "markers": [ + { + "type": "line", + "pattern": "//" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "Twig", + "markers": [ + { + "type": "block", + "pattern": { + "start": "{#", + "end": "#}" + } + } + ] + }, + { + "language": "Crystal", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "R", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, + { + "language": "Clojure", + "markers": [ + { + "type": "line", + "pattern": ";;" + } + ] + }, + { + "language": "Nix", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] + }, + { + "language": "XML", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + } + ] + } +] diff --git a/version.txt b/version.txt index 9c6d6293..fdd3be6d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.6.1 +1.6.2