feat: update tutorial files w/ agent mode step

This commit is contained in:
Patrick Erichsen 2025-05-12 18:18:07 -07:00
parent e0b38ea746
commit 8eaf078638
4 changed files with 107 additions and 111 deletions

View file

@ -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 ——————————————————— //

View file

@ -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 ——————————————————— #

View file

@ -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 ——————————————————— //

View file

@ -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 ——————————————————— #