| 1 | """ _________ _____ _____ |
| 2 | __ ____/______ _______ __ /____(_)_______ ____ _______ |
| 3 | _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ |
| 4 | / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ |
| 5 | \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ |
| 6 | |
| 7 | Chat, Edit, and Autocomplete tutorial |
| 8 | """ |
| 9 | |
| 10 | |
| 11 | # ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # |
| 12 | |
| 13 | ## Highlight the code below |
| 14 | ## Press [Cmd/Ctrl + L] to add to Chat |
| 15 | ## Try asking Continue "what sorting algorithm is this?" |
| 16 | def sorting_algorithm(x): |
| 17 | for i in range(len(x)): |
| 18 | for j in range(len(x) - 1): |
| 19 | if x[j] > x[j + 1]: |
| 20 | x[j], x[j + 1] = x[j + 1], x[j] |
| 21 | return x |
| 22 | |
| 23 | |
| 24 | # ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— # |
| 25 | |
| 26 | ## Highlight the code below |
| 27 | ## Press [Cmd/Ctrl + I] to Edit |
| 28 | ## Try asking Continue to "make this more readable" |
| 29 | def sorting_algorithm(x): |
| 30 | for i in range(len(x)): |
| 31 | for j in range(len(x) - 1): |
| 32 | if x[j] > x[j + 1]: |
| 33 | x[j], x[j + 1] = x[j + 1], x[j] |
| 34 | return x |
| 35 | |
| 36 | # ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # |
| 37 | |
| 38 | ## Place cursor after `sorting_algorithm...` below and press [Enter] |
| 39 | ## Press [Tab] to accept the Autocomplete suggestion |
| 40 | |
| 41 | # Basic assertion for sorting_algorithm... |
| 42 | |
| 43 | |
| 44 | # —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # |