From f0ed95d6934f3f36cfafdd9d22d5e8285d715460 Mon Sep 17 00:00:00 2001 From: restlessronin <88921269+restlessronin@users.noreply.github.com> Date: Sat, 6 Jan 2024 01:55:48 +0530 Subject: [PATCH] clarify the meaning of highlight (#718) * clarify the meaning of highlight * delete duplicated text --- README.md | 4 ++-- core/commands/slash/edit.ts | 2 +- docs/docs/how-to-use-continue.md | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c1eeb8421..dffca7596 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ ### Answer coding questions -Highlight sections of code and ask Continue for another perspective +Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) sections of code and ask Continue for another perspective - “what does this forRoot() static function do in nestjs?” - “why is the first left join in this query necessary here?” @@ -40,7 +40,7 @@ Highlight sections of code and ask Continue for another perspective ### Edit in natural language -Highlight a section of code and instruct Continue to refactor it +Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) a section of code and instruct Continue to refactor it - “/edit rewrite this to return a flattened list from a 3x3 matrix” - “/edit refactor these into an angular flex layout on one line" diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index 3c2f76cdf..00d1c00e4 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -210,7 +210,7 @@ const EditSlashCommand: SlashCommand = { ); if (!contextItemToEdit) { - yield "Highlight the code that you want to edit first"; + yield "Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) the code that you want to edit first"; return; } diff --git a/docs/docs/how-to-use-continue.md b/docs/docs/how-to-use-continue.md index 5bd4fcb98..31cd80249 100644 --- a/docs/docs/how-to-use-continue.md +++ b/docs/docs/how-to-use-continue.md @@ -18,6 +18,8 @@ As you use Continue more, you will learn when to trust it. A great way to get st If you are trying to use it for a new task and don’t have a sense of how much Continue can help you complete it, it can often be helpful to start like this: +'Highlight' refers to the act of selecting a text range in a file and pressing 'cmd+shift+M' (Macos) or 'ctrl+shift+M' (Windows) to include it in the Continue chat message. + 1. Highlight the code section(s) that you don’t understand and type "tell me how this code works" in the input box 2. If the explanation seems reasonable, then, while still highlighting the code section(s), type "how would you change this code to [INSERT TASK]?" 3. If this explanation is also pretty good, then, while still highlighting the code section(s), type `/edit [INSERT TASK]`. If you like the suggested diff, use `cmd+shift+enter` to accept the changes.