From 74f9a23d58e6130a5adf739423fdae7e8caf90aa Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 4 Feb 2025 17:50:51 -0800 Subject: [PATCH 1/4] comment adjustments --- .../src/main/resources/continue_tutorial.java | 24 ++++++++--------- .../src/main/resources/continue_tutorial.ts | 26 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index 41ac854c0..808f51021 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -1,14 +1,14 @@ -/* _________ _____ _____ - __ ____/______ _______ __ /____(_)_______ ____ _______ - _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ - / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ - \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ - - Chat, Edit, and Autocomplete tutorial -*/ +// _________ _____ _____ +// __ ____/______ _______ __ /____(_)_______ ____ _______ +// _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ +// / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ +// \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// +// Chat, Edit, and Autocomplete tutorial +// -/* ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + J] to add to Chat @@ -26,7 +26,7 @@ public static int[] sortingAlgorithm(int[] x) { return x; } -/* ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + I] to Edit @@ -44,7 +44,7 @@ public static int[] sortingAlgorithm2(int[] x) { return x; } -/* ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— */ +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // Place cursor after `sortingAlgorithm...` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion @@ -52,4 +52,4 @@ public static int[] sortingAlgorithm2(int[] x) { // Basic assertion for sortingAlgorithm... -/* —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— */ +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 301fc248c..1f4714249 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -1,14 +1,13 @@ -/* _________ _____ _____ - __ ____/______ _______ __ /____(_)_______ ____ _______ - _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ - / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ - \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// _________ _____ _____ +// __ ____/______ _______ __ /____(_)_______ ____ _______ +// _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ +// / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ +// \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// +// Chat, Edit, and Autocomplete tutorial +// - Chat, Edit, and Autocomplete tutorial -*/ - - -/* ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + J] to add to Chat @@ -26,7 +25,7 @@ function sortingAlgorithm(x: number[]): number[] { return x; } -/* ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + I] to Edit @@ -44,12 +43,11 @@ function sortingAlgorithm2(x: number[]): number[] { return x; } -/* ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— */ +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // Place cursor after `sortingAlgorithm...` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion // Basic assertion for sortingAlgorithm... - -/* —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— */ +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— From 0c2de5cb5fa744895436d2a70d1d8d90c58befca Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 10:38:38 -0800 Subject: [PATCH 2/4] update tutorial files --- .../ContinuePluginStartupActivity.kt | 8 +++++ .../src/main/resources/continue_tutorial.java | 19 +++++++++--- .../src/main/resources/continue_tutorial.py | 29 ++++++++++++++----- .../src/main/resources/continue_tutorial.ts | 23 +++++++++++---- extensions/vscode/src/util/tutorial.ts | 7 ++++- 5 files changed, 68 insertions(+), 18 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 72819421a..bae7857a4 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -47,7 +47,15 @@ fun showTutorial(project: Project) { throw IOException("Resource not found: $tutorialFileName") } var content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) + + // All jetbrains will use J instead of L + content = content.replace("[Cmd + L]", "[Cmd + J]") + content = content.replace("[Cmd + Shift + L]", "[Cmd + Shift + J]") + if (!System.getProperty("os.name").lowercase().contains("mac")) { + content = content.replace("[Cmd + J]", "[Ctrl + J]") + content = content.replace("[Cmd + Shift + J]", "[Ctrl + Shift + J]") + content = content.replace("[Cmd + I]", "[Ctrl + I]") content = content.replace("⌘", "⌃") } val filepath = Paths.get(getContinueGlobalPath(), tutorialFileName).toString() diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index 808f51021..ace69a67d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -7,11 +7,18 @@ // Chat, Edit, and Autocomplete tutorial // +// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- + +// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +// See an example at https://docs.continue.dev/getting-started/install + +// Follow the instructions in the sidebar to setup models for Chat and Autocomplete. // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + J] to add to Chat +// Press [Cmd + L] to add to Chat // Try asking Continue "what sorting algorithm is this?" public static int[] sortingAlgorithm(int[] x) { for (int i = 0; i < x.length; i++) { @@ -26,10 +33,13 @@ public static int[] sortingAlgorithm(int[] x) { return x; } +// [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +// This will add the code into the current chat + // ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + I] to Edit +// Press [Cmd + I] to Edit // Try asking Continue to "make this more readable" public static int[] sortingAlgorithm2(int[] x) { for (int i = 0; i < x.length; i++) { @@ -46,10 +56,11 @@ public static int[] sortingAlgorithm2(int[] x) { // ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -// Place cursor after `sortingAlgorithm...` below and press [Enter] +// Place cursor after `sortingAlgorithm:` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion -// Basic assertion for sortingAlgorithm... +// Basic assertion for sortingAlgorithm: + // —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.py b/extensions/intellij/src/main/resources/continue_tutorial.py index 16a297c16..0b526993d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.py +++ b/extensions/intellij/src/main/resources/continue_tutorial.py @@ -7,11 +7,18 @@ Chat, Edit, and Autocomplete tutorial """ +# ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- -# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # +# First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +# See an example at https://docs.continue.dev/getting-started/install + +# Follow the instructions in the sidebar to set up models for Chat and Autocomplete. + +# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— ## Highlight the code below -## Press [Cmd/Ctrl + J] to add to Chat +## Press [Cmd + L] to add to Chat ## Try asking Continue "what sorting algorithm is this?" def sorting_algorithm(x): for i in range(len(x)): @@ -20,11 +27,13 @@ def sorting_algorithm(x): x[j], x[j + 1] = x[j + 1], x[j] return x +# [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +# This will add the code into the current chat -# ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— # +# ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— ## Highlight the code below -## Press [Cmd/Ctrl + I] to Edit +## Press [Cmd + I] to Edit ## Try asking Continue to "make this more readable" def sorting_algorithm(x): for i in range(len(x)): @@ -33,12 +42,16 @@ def sorting_algorithm(x): x[j], x[j + 1] = x[j + 1], x[j] return x -# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # +# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -## Place cursor after `sorting_algorithm...` below and press [Enter] +## Place cursor after `sorting_algorithm:` below and press [Enter] ## Press [Tab] to accept the Autocomplete suggestion -# Basic assertion for sorting_algorithm... +# Basic assertion for sorting_algorithm: -# —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # + + +# —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +# Visit the Continue Docs at https://docs.continue.dev/getting-started/overview diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 1f4714249..9d6271e57 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -7,10 +7,18 @@ // Chat, Edit, and Autocomplete tutorial // +// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- + +// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +// See an example at https://docs.continue.dev/getting-started/install + +// Follow the instructions in the sidebar to set up models for Chat and Autocomplete. + // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + J] to add to Chat +// Press [Cmd + L] to add to Chat // Try asking Continue "what sorting algorithm is this?" function sortingAlgorithm(x: number[]): number[] { for (let i = 0; i < x.length; i++) { @@ -25,10 +33,13 @@ function sortingAlgorithm(x: number[]): number[] { return x; } +// [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +// This will add the code into the current chat + // ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + I] to Edit +// Press [Cmd + I] to Edit // Try asking Continue to "make this more readable" function sortingAlgorithm2(x: number[]): number[] { for (let i = 0; i < x.length; i++) { @@ -45,9 +56,11 @@ function sortingAlgorithm2(x: number[]): number[] { // ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -// Place cursor after `sortingAlgorithm...` below and press [Enter] +// Place cursor after `sortingAlgorithm:` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion -// Basic assertion for sortingAlgorithm... +// Basic assertion for sortingAlgorithm: -// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— +// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview diff --git a/extensions/vscode/src/util/tutorial.ts b/extensions/vscode/src/util/tutorial.ts index 45a86a675..6557b5790 100644 --- a/extensions/vscode/src/util/tutorial.ts +++ b/extensions/vscode/src/util/tutorial.ts @@ -16,7 +16,12 @@ export async function showTutorial(ide: IDE) { // Ensure keyboard shortcuts match OS if (process.platform !== "darwin") { let tutorialContent = await ide.readFile(tutorialUri.toString()); - tutorialContent = tutorialContent.replace("⌘", "^").replace("Cmd", "Ctrl"); + tutorialContent = tutorialContent + .replaceAll("[Cmd + L]", "[Ctrl + L]") + .replaceAll("[Cmd + Shift + L]", "[Ctrl + Shift + L]") + .replaceAll("[Cmd + I]", "[Ctrl + I]") + .replaceAll("⌘", "^"); + await ide.writeFile(tutorialUri.toString(), tutorialContent); } From ed690c72576de1eee0dc4e4e78b74ab1b4cb6bcd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 10:39:52 -0800 Subject: [PATCH 3/4] tutorial file unify --- extensions/intellij/src/main/resources/continue_tutorial.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index ace69a67d..a0cb9fa5d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -63,4 +63,6 @@ public static int[] sortingAlgorithm2(int[] x) { -// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— +// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview From 0728b17cdb5b9433ffa8e031cb6aa570afa55d8d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 11:38:46 -0800 Subject: [PATCH 4/4] tutorial copy updates --- extensions/intellij/src/main/resources/continue_tutorial.java | 2 +- extensions/intellij/src/main/resources/continue_tutorial.py | 2 +- extensions/intellij/src/main/resources/continue_tutorial.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index a0cb9fa5d..e566b14ce 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -13,7 +13,7 @@ // See an example at https://docs.continue.dev/getting-started/install -// Follow the instructions in the sidebar to setup models for Chat and Autocomplete. +// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.py b/extensions/intellij/src/main/resources/continue_tutorial.py index 0b526993d..4670772df 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.py +++ b/extensions/intellij/src/main/resources/continue_tutorial.py @@ -13,7 +13,7 @@ # See an example at https://docs.continue.dev/getting-started/install -# Follow the instructions in the sidebar to set up models for Chat and Autocomplete. +# Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. # ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 9d6271e57..4cde323ca 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -13,7 +13,7 @@ // See an example at https://docs.continue.dev/getting-started/install -// Follow the instructions in the sidebar to set up models for Chat and Autocomplete. +// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. // ————————————————————————————————————————————————— Chat —————————————————————————————————————————————————