Elffuss BraidHub

kikocis/continue public

3ff29c567dd0 · 3.6 KiBRawPermalink
1// _________ _____ _____
2// __ ____/______ _______ __ /____(_)_______ ____ _______
3// _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \
4// / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/
5// \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/
6//
7// Autocomplete, Edit, Chat, and Agent tutorial
8//
9
10// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— //
11// Autocomplete provides inline code suggestions as you type.
12
13// 1. Place cursor after `sortingAlgorithm:` below and press [Enter]
14// 2. Press [Tab] to accept the Autocomplete suggestion
15
16// Basic assertion for sortingAlgorithm:
17
18// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— //
19// Edit is a convenient way to make quick changes to specific code and files.
20
21// 1. Highlight the code below
22// 2. Press [Cmd/Ctrl + I] to Edit
23// 3. Try asking Continue to "make this more readable"
24public static int[] sortingAlgorithm(int[] x) {
25 for (int i = 0; i < x.length; i++) {
26 for (int j = 0; j < x.length - 1; j++) {
27 if (x[j] > x[j + 1]) {
28 int temp = x[j];
29 x[j] = x[j + 1];
30 x[j + 1] = temp;
31 }
32 }
33 }
34 return x;
35}
36
37// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— //
38// Chat makes it easy to ask for help from an LLM without needing to leave the IDE.
39
40// 1. Highlight the code below
41// 2. Press [Cmd/Ctrl + J] to add to Chat
42// 3. Try asking Continue "what sorting algorithm is this?"
43public static int[] sortingAlgorithm2(int[] x) {
44 for (int i = 0; i < x.length; i++) {
45 for (int j = 0; j < x.length - 1; j++) {
46 if (x[j] > x[j + 1]) {
47 int temp = x[j];
48 x[j] = x[j + 1];
49 x[j + 1] = temp;
50 }
51 }
52 }
53 return x;
54}
55
56// ————————————————————————————————————————————————— Agent ————————————————————————————————————————————————— //
57// Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing
58// the model to make decisions and save you the work of manually finding context and performing actions.
59
60// 1. Switch from "Chat" to "Agent" mode using the dropdown in the bottom left of the input box
61// 2. Use the "/init" slash command to generate a CONTINUE.md file
62
63// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— //