Skip to content

Commit

Permalink
improve copilot readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Dec 18, 2023
1 parent 565be6a commit 0e15f41
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions apps/vscode/copilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,27 @@ This directory contains some very experimental commands for interacting with Cop

## Inline chat / refactoring / code generation

There are some commands to interact with the inline chat:
There are some commands to interact with the inline chat, leveraging Cursorless targets:

| Command | Description |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `"pilot change funk air"` | selects function containing air token and opens inline chat to enable typing instructions for how Copilot should change the function. |
| `"pilot change funk air to <phrase>"` | tells Copilot to apply the instructions in `<phrase>` to the function containing air token. For example, `"pilot change funk air to remove arguments"`. |
| `"pilot test funk air"` | Asks copilot to generate a test for the function containing air token. |
| `"pilot doc funk air"` | Asks copilot to generate documentation for the function containing air token. |
| `"pilot fix funk air"` | Tells copilot to fix the function containing air token. |
| `"pilot fix funk air to <phrase>"` | Tells copilot to fix the function containing air token using the instructions in `<phrase>`. For example, `"pilot fix funk air to remove warnings"`. |
| `"pilot make <phrase>"` | Tells copilot to generate code using the instructions in `<phrase>`, at the current cursor position. For example, `"pilot make a function that returns the sum of two numbers"`. |
| Command | Description | Example |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- |
| `"pilot change <target>"` | selects target and opens inline chat to enable typing instructions for how Copilot should change the target. | `"pilot change funk air"` |
| `"pilot change <target> to <phrase>"` | tells Copilot to apply the instructions in `<phrase>` to the target. | `"pilot change funk air to remove arguments"`. |
| `"pilot test <target>"` | Asks copilot to generate a test for the target. | `"pilot test funk air"` |
| `"pilot doc <target>"` | Asks copilot to generate documentation for the target. | `"pilot doc funk air"` |
| `"pilot fix <target>"` | Tells copilot to fix the target. | `"pilot fix funk air"` |
| `"pilot fix <target> to <phrase>"` | Tells copilot to fix the target using the instructions in `<phrase>`. | `"pilot fix funk air to remove warnings"` |
| `"pilot make <phrase>"` | Tells copilot to generate code using the instructions in `<phrase>`, at the current cursor position. | `"pilot make a function that returns the sum of two numbers"` |

## Chat sidebar

There are some commands to interact with the chat sidebar:

| Command | Description |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `"pilot chat"` | opens chat to enable typing |
| `"pilot chat hello world"` | opens chat, types "hello world" and hits enter |
| `"pilot bring first"` | inserts first code block in most recent chat response into your editor at cursor position |
| `"pilot copy first"` | copies first code block in most recent chat response |
| `"pilot bring second last"` | inserts second-to-last code block in most recent chat response into your editor at cursor position |
| `"pilot bring first after state air"` | inserts first code block in most recent chat response into your editor after statement containing air token |
| `"pilot bring first to funk"` | replaces function containing your cursor with first code block in most recent chat response |
| Command | Description | Example |
| --------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `"pilot chat"` | opens chat to enable typing | |
| `"pilot chat hello world"` | opens chat, types "hello world" and hits enter | |
| `"pilot bring <ordinal>"` | inserts nth code block in most recent chat response into your editor at cursor position | `"pilot bring first"`, `"pilot bring last"`, `"pilot bring second last"` |
| `"pilot copy <ordinal>"` | copies nth code block in most recent chat response | `"pilot copy first"` |
| `"pilot bring <ordinal> <destination>"` | inserts nth code block in most recent chat response into your editor at Cursorless destination | `"pilot bring first after state air"`, `"pilot bring first to line air"` |
| `"pilot bring first to funk"` | replaces function containing your cursor with first code block in most recent chat response | |

0 comments on commit 0e15f41

Please sign in to comment.