From 8eaf078638c0d2d9c14aa0cc8e465df66f01e4df Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 12 May 2025 18:18:07 -0700 Subject: [PATCH] feat: update tutorial files w/ agent mode step --- .../src/main/resources/continue_tutorial.java | 49 ++++++------ .../src/main/resources/continue_tutorial.py | 75 +++++++++---------- .../src/main/resources/continue_tutorial.ts | 47 ++++++------ extensions/vscode/continue_tutorial.py | 47 +++++++----- 4 files changed, 107 insertions(+), 111 deletions(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index e566b14ce..04ca35062 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -4,22 +4,23 @@ // / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ // \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ // -// Chat, Edit, and Autocomplete tutorial +// Autocomplete, Edit, Chat, and Agent tutorial // -// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // +// Autocomplete provides inline code suggestions as you type. -// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. +// 1. Place cursor after `sortingAlgorithm:` below and press [Enter] +// 2. Press [Tab] to accept the Autocomplete suggestion -// See an example at https://docs.continue.dev/getting-started/install +// Basic assertion for sortingAlgorithm: -// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // +// Edit is a convenient way to make quick changes to specific code and files. -// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— - -// Highlight the code below -// Press [Cmd + L] to add to Chat -// Try asking Continue "what sorting algorithm is this?" +// 1. Highlight the code below +// 2. Press [Cmd/Ctrl + I] to Edit +// 3. Try asking Continue to "make this more readable" public static int[] sortingAlgorithm(int[] x) { for (int i = 0; i < x.length; i++) { for (int j = 0; j < x.length - 1; j++) { @@ -33,14 +34,12 @@ 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 +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // +// Chat makes it easy to ask for help from an LLM without needing to leave the IDE. -// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— - -// Highlight the code below -// Press [Cmd + I] to Edit -// Try asking Continue to "make this more readable" +// 1. Highlight the code below +// 2. Press [Cmd/Ctrl + L] to add to Chat +// 3. Try asking Continue "what sorting algorithm is this?" public static int[] sortingAlgorithm2(int[] x) { for (int i = 0; i < x.length; i++) { for (int j = 0; j < x.length - 1; j++) { @@ -54,15 +53,11 @@ public static int[] sortingAlgorithm2(int[] x) { return x; } -// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— +// ————————————————————————————————————————————————— Agent ————————————————————————————————————————————————— // +// Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, +// allowing the model to make decisions and save you the work of manually finding context and performing actions. -// Place cursor after `sortingAlgorithm:` below and press [Enter] -// Press [Tab] to accept the Autocomplete suggestion +// 1. Switch from "Chat" to "Agent" mode using the dropdown in the bottom left of the input box +// 2. Try asking Continue "Write unit tests for this code in a new file and run the test" -// Basic assertion for sortingAlgorithm: - - - -// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— - -// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— // \ No newline at end of file diff --git a/extensions/intellij/src/main/resources/continue_tutorial.py b/extensions/intellij/src/main/resources/continue_tutorial.py index 4670772df..d1840877b 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.py +++ b/extensions/intellij/src/main/resources/continue_tutorial.py @@ -4,54 +4,49 @@ / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ - Chat, Edit, and Autocomplete tutorial + Autocomplete, Edit, Chat, and Agent tutorial """ -# ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- -# First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. +# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # +# Autocomplete provides inline code suggestions as you type. -# See an example at https://docs.continue.dev/getting-started/install - -# Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. - -# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— - -## Highlight the code below -## 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)): - for j in range(len(x) - 1): - if x[j] > x[j + 1]: - 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 ————————————————————————————————————————————————— - -## Highlight the code below -## Press [Cmd + I] to Edit -## Try asking Continue to "make this more readable" -def sorting_algorithm(x): - for i in range(len(x)): - for j in range(len(x) - 1): - if x[j] > x[j + 1]: - x[j], x[j + 1] = x[j + 1], x[j] - return x - -# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— - -## Place cursor after `sorting_algorithm:` below and press [Enter] -## Press [Tab] to accept the Autocomplete suggestion +# 1. Place cursor after `sorting_algorithm:` below and press [Enter] +# 2. Press [Tab] to accept the Autocomplete suggestion # Basic assertion for sorting_algorithm: +# ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— # +# Edit is a convenient way to make quick changes to specific code and files. +# 1. Highlight the code below +# 2. Press [Cmd/Ctrl + I] to Edit +# 3. Try asking Continue to "make this more readable" +def sorting_algorithm(x): + for i in range(len(x)): + for j in range(len(x) - 1): + if x[j] > x[j + 1]: + x[j], x[j + 1] = x[j + 1], x[j] + return x +# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # +# Chat makes it easy to ask for help from an LLM without needing to leave the IDE. -# —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— +# 1. Highlight the code below +# 2. Press [Cmd/Ctrl + L] to add to Chat +# 3. Try asking Continue "what sorting algorithm is this?" +def sorting_algorithm2(x): + for i in range(len(x)): + for j in range(len(x) - 1): + if x[j] > x[j + 1]: + x[j], x[j + 1] = x[j + 1], x[j] + return x -# Visit the Continue Docs at https://docs.continue.dev/getting-started/overview +# ————————————————————————————————————————————————— Agent ————————————————————————————————————————————————— # +# Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, +# allowing the model to make decisions and save you the work of manually finding context and performing actions. + +# 1. Switch from "Chat" to "Agent" mode using the dropdown in the bottom left of the input box +# 2. Try asking Continue "Write unit tests for this code in a new file and run the test" + +# —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # \ No newline at end of file diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 4cde323ca..2dd4092ea 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -4,22 +4,23 @@ // / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ // \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ // -// Chat, Edit, and Autocomplete tutorial +// Autocomplete, Edit, Chat, and Agent tutorial // -// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // +// Autocomplete provides inline code suggestions as you type. -// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. +// 1. Place cursor after `sortingAlgorithm:` below and press [Enter] +// 2. Press [Tab] to accept the Autocomplete suggestion -// See an example at https://docs.continue.dev/getting-started/install +// Basic assertion for sortingAlgorithm: -// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // +// Edit is a convenient way to make quick changes to specific code and files. -// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— - -// Highlight the code below -// Press [Cmd + L] to add to Chat -// Try asking Continue "what sorting algorithm is this?" +// 1. Highlight the code below +// 2. Press [Cmd/Ctrl + I] to Edit +// 3. Try asking Continue to "make this more readable" function sortingAlgorithm(x: number[]): number[] { for (let i = 0; i < x.length; i++) { for (let j = 0; j < x.length - 1; j++) { @@ -33,14 +34,12 @@ 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 +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // +// Chat makes it easy to ask for help from an LLM without needing to leave the IDE. -// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— - -// Highlight the code below -// Press [Cmd + I] to Edit -// Try asking Continue to "make this more readable" +// 1. Highlight the code below +// 2. Press [Cmd/Ctrl + L] to add to Chat +// 3. Try asking Continue "what sorting algorithm is this?" function sortingAlgorithm2(x: number[]): number[] { for (let i = 0; i < x.length; i++) { for (let j = 0; j < x.length - 1; j++) { @@ -54,13 +53,11 @@ function sortingAlgorithm2(x: number[]): number[] { return x; } -// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— +// ————————————————————————————————————————————————— Agent ————————————————————————————————————————————————— // +// Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, +// allowing the model to make decisions and save you the work of manually finding context and performing actions. -// Place cursor after `sortingAlgorithm:` below and press [Enter] -// Press [Tab] to accept the Autocomplete suggestion +// 1. Switch from "Chat" to "Agent" mode using the dropdown in the bottom left of the input box +// 2. Try asking Continue "Write unit tests for this code in a new file and run the test" -// Basic assertion for sortingAlgorithm: - -// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— - -// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— // diff --git a/extensions/vscode/continue_tutorial.py b/extensions/vscode/continue_tutorial.py index 785ffae1c..fc1cbf893 100644 --- a/extensions/vscode/continue_tutorial.py +++ b/extensions/vscode/continue_tutorial.py @@ -4,28 +4,24 @@ / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ - Chat, Edit, and Autocomplete tutorial + Autocomplete, Edit, Chat, and Agent tutorial """ -# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # +# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # +# Autocomplete provides inline code suggestions as you type. -## Highlight the code below -## Press [Cmd/Ctrl + L] to add to Chat -## Try asking Continue "what sorting algorithm is this?" -def sorting_algorithm(x): - for i in range(len(x)): - for j in range(len(x) - 1): - if x[j] > x[j + 1]: - x[j], x[j + 1] = x[j + 1], x[j] - return x +# 1. Place cursor after `sorting_algorithm:` below and press [Enter] +# 2. Press [Tab] to accept the Autocomplete suggestion +# Basic assertion for sorting_algorithm: # ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— # +# Edit is a convenient way to make quick changes to specific code and files. -## Highlight the code below -## Press [Cmd/Ctrl + I] to Edit -## Try asking Continue to "make this more readable" +# 1. Highlight the code below +# 2. Press [Cmd/Ctrl + I] to Edit +# 3. Try asking Continue to "make this more readable" def sorting_algorithm(x): for i in range(len(x)): for j in range(len(x) - 1): @@ -33,12 +29,25 @@ def sorting_algorithm(x): x[j], x[j + 1] = x[j + 1], x[j] return x -# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # +# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # +# Chat makes it easy to ask for help from an LLM without needing to leave the IDE. -## Place cursor after `sorting_algorithm...` below and press [Enter] -## Press [Tab] to accept the Autocomplete suggestion +# 1. Highlight the code below +# 2. Press [Cmd/Ctrl + L] to add to Chat +# 3. Try asking Continue "what sorting algorithm is this?" +def sorting_algorithm2(x): + for i in range(len(x)): + for j in range(len(x) - 1): + if x[j] > x[j + 1]: + x[j], x[j + 1] = x[j + 1], x[j] + return x -# Basic assertion for sorting_algorithm... +# ————————————————————————————————————————————————— Agent ————————————————————————————————————————————————— # +# Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, +# allowing the model to make decisions and save you the work of manually finding context and performing actions. +# 1. Switch from "Chat" to "Agent" mode using the dropdown in the bottom left of the input box +# 2. Try asking Continue "Write unit tests for this code in a new file", +# or if you have Python installed, "Write unit tests for this code in a new file and run the test" -# —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # +# —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # \ No newline at end of file