diff options
24 files changed, 252 insertions, 77 deletions
@@ -9,19 +9,20 @@ <div align="center"> [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fcontinuedev%2Fcontinue) - <a target="_blank" href="https://discord.gg/vapESyrFmJ" style="background:none"> - <img src="https://img.shields.io/badge/discord-join-continue.svg?labelColor=191937&color=6F6FF7&logo=discord" /> - </a> +<a target="_blank" href="https://discord.gg/vapESyrFmJ" style="background:none"> +<img src="https://img.shields.io/badge/discord-join-continue.svg?labelColor=191937&color=6F6FF7&logo=discord" /> +</a> + +![Editing With Continue](readme.gif) -![Editing With Continue](edit.gif) </div> ## Task, not tab, auto-complete -### Get possible explainations +### Answer coding questions + +Highlight sections of code and ask Continue for another perspective -Ask Continue about a part of your code to get another perspective - “how can I set up a Prisma schema that cascades deletes?” - “where in the page should I be making this request to the backend?” - “how can I communicate between these iframes?” @@ -29,13 +30,15 @@ Ask Continue about a part of your code to get another perspective ### Edit in natural language Highlight a section of code and instruct Continue to refactor it + - “/edit migrate this digital ocean terraform file into one that works for GCP” - “/edit change this plot into a bar chart in this dashboard component” - “/edit rewrite this function to be async” ### Generate files from scratch -Let Continue build the scaffolding of Python scripts, React components, and more +Open a blank file and let Continue start new Python scripts, React components, etc. + - “/edit here is a connector for postgres, now write one for kafka” - “/edit make an IAM policy that creates a user with read-only access to S3” - “/edit use this schema to write me a SQL query that gets recently churned users” @@ -44,27 +47,15 @@ Let Continue build the scaffolding of Python scripts, React components, and more ### [Download for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) -## Install - Continue requires that you have Python 3.8 or greater. If you do not, please [install](https://python.org) it If your Continue server is not setting up, please check the console logs: + 1. `cmd+shift+p` (MacOS) / `ctrl+shift+p` (Windows) 2. Search for and then select "Developer: Toggle Developer Tools" 3. Select `Console` 4. Read the console logs -## OpenAI API Key - -New users can try out Continue with GPT-4 using a proxy server that securely makes calls to OpenAI using our API key. Continue should just work the first time you install the extension in VS Code. - -Once you are using Continue regularly though, you will need to add an OpenAI API key that has access to GPT-4 by following these steps: -1. Copy your API key from https://platform.openai.com/account/api-keys -2. Use the `cmd`+`,` (Mac) / `ctrl`+`,` (Windows) to open your VS Code settings -3. Type "Continue" in the search bar -4. Click `Edit in settings.json` under **Continue: OpenAI_API_KEY" section** -5. Paste your API key as the value for "continue.OPENAI_API_KEY" in `settings.json` - ## License [Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE) diff --git a/continuedev/.gitignore b/continuedev/.gitignore new file mode 100644 index 00000000..391ae7db --- /dev/null +++ b/continuedev/.gitignore @@ -0,0 +1,2 @@ +notes.md +config.json
\ No newline at end of file diff --git a/continuedev/src/continuedev/libs/util/step_name_to_steps.py b/continuedev/src/continuedev/libs/util/step_name_to_steps.py new file mode 100644 index 00000000..baa25da6 --- /dev/null +++ b/continuedev/src/continuedev/libs/util/step_name_to_steps.py @@ -0,0 +1,43 @@ +from typing import Dict + +from ...core.main import Step +from ...plugins.steps.core.core import UserInputStep +from ...plugins.steps.main import EditHighlightedCodeStep +from ...plugins.steps.chat import SimpleChatStep +from ...plugins.steps.comment_code import CommentCodeStep +from ...plugins.steps.feedback import FeedbackStep +from ...plugins.recipes.AddTransformRecipe.main import AddTransformRecipe +from ...plugins.recipes.CreatePipelineRecipe.main import CreatePipelineRecipe +from ...plugins.recipes.DDtoBQRecipe.main import DDtoBQRecipe +from ...plugins.recipes.DeployPipelineAirflowRecipe.main import DeployPipelineAirflowRecipe +from ...plugins.steps.on_traceback import DefaultOnTracebackStep +from ...plugins.steps.clear_history import ClearHistoryStep +from ...plugins.steps.open_config import OpenConfigStep +from ...plugins.steps.help import HelpStep + +# This mapping is used to convert from string in ContinueConfig json to corresponding Step class. +# Used for example in slash_commands and steps_on_startup +step_name_to_step_class = { + "UserInputStep": UserInputStep, + "EditHighlightedCodeStep": EditHighlightedCodeStep, + "SimpleChatStep": SimpleChatStep, + "CommentCodeStep": CommentCodeStep, + "FeedbackStep": FeedbackStep, + "AddTransformRecipe": AddTransformRecipe, + "CreatePipelineRecipe": CreatePipelineRecipe, + "DDtoBQRecipe": DDtoBQRecipe, + "DeployPipelineAirflowRecipe": DeployPipelineAirflowRecipe, + "DefaultOnTracebackStep": DefaultOnTracebackStep, + "ClearHistoryStep": ClearHistoryStep, + "OpenConfigStep": OpenConfigStep, + "HelpStep": HelpStep, +} + + +def get_step_from_name(step_name: str, params: Dict) -> Step: + try: + return step_name_to_step_class[step_name](**params) + except: + print( + f"Incorrect parameters for step {step_name}. Parameters provided were: {params}") + raise diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md index de3b9e11..1b9a8c4b 100644 --- a/docs/docs/telemetry.md +++ b/docs/docs/telemetry.md @@ -9,8 +9,10 @@ Continue collects and reports **anonymous** usage information. This data is esse We track
- the steps that are run and their parameters
-- toggling of the data collection switch
- whether you accept or reject suggestions (not the code itself)
+- the traceback when an error occurs
+
+All data is anonymous and cleaned of PII before being sent to PostHog.
## How to opt out
diff --git a/extension/README.md b/extension/README.md index 2944325b..acb9e097 100644 --- a/extension/README.md +++ b/extension/README.md @@ -7,6 +7,7 @@ ### Get possible explainations Ask Continue about a part of your code to get another perspective + - “how can I set up a Prisma schema that cascades deletes?” - “where in the page should I be making this request to the backend?” - “how can I communicate between these iframes?” @@ -14,38 +15,32 @@ Ask Continue about a part of your code to get another perspective ### Edit in natural language Highlight a section of code and instruct Continue to refactor it + - “/edit migrate this digital ocean terraform file into one that works for GCP” - “/edit change this plot into a bar chart in this dashboard component” - “/edit rewrite this function to be async” ### Generate files from scratch -Let Continue build the scaffolding of Python scripts, React components, and more +Open a blank file and let Continue start new Python scripts, React components, etc. + - “/edit here is a connector for postgres, now write one for kafka” - “/edit make an IAM policy that creates a user with read-only access to S3” - “/edit use this schema to write me a SQL query that gets recently churned users” -## Install +## Getting Started + +### [Download for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) Continue requires that you have Python 3.8 or greater. If you do not, please [install](https://python.org) it If your Continue server is not setting up, please check the console logs: + 1. `cmd+shift+p` (MacOS) / `ctrl+shift+p` (Windows) 2. Search for and then select "Developer: Toggle Developer Tools" 3. Select `Console` 4. Read the console logs -## OpenAI API Key - -New users can try out Continue with GPT-4 using a proxy server that securely makes calls to OpenAI using our API key. Continue should just work the first time you install the extension in VS Code. - -Once you are using Continue regularly though, you will need to add an OpenAI API key that has access to GPT-4 by following these steps: -1. Copy your API key from https://platform.openai.com/account/api-keys -2. Use the `cmd`+`,` (Mac) / `ctrl`+`,` (Windows) to open your VS Code settings -3. Type "Continue" in the search bar -4. Click `Edit in settings.json` under **Continue: OpenAI_API_KEY" section** -5. Paste your API key as the value for "continue.OPENAI_API_KEY" in `settings.json` - ## License -[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)
\ No newline at end of file +[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE) diff --git a/extension/config/config.json b/extension/config/config.json new file mode 100644 index 00000000..b4b9993e --- /dev/null +++ b/extension/config/config.json @@ -0,0 +1,3 @@ +{ + "API_URL": "http://localhost:65432" +} diff --git a/extension/config/dev_config.json b/extension/config/dev_config.json new file mode 100644 index 00000000..b4b9993e --- /dev/null +++ b/extension/config/dev_config.json @@ -0,0 +1,3 @@ +{ + "API_URL": "http://localhost:65432" +} diff --git a/extension/config/prod_config.json b/extension/config/prod_config.json new file mode 100644 index 00000000..dc0d0797 --- /dev/null +++ b/extension/config/prod_config.json @@ -0,0 +1,3 @@ +{ + "API_URL": "https://basin.dev" +} diff --git a/extension/media/Lexend/Lexend-VariableFont_wght.ttf b/extension/media/Lexend/Lexend-VariableFont_wght.ttf Binary files differnew file mode 100644 index 00000000..b294dc84 --- /dev/null +++ b/extension/media/Lexend/Lexend-VariableFont_wght.ttf diff --git a/extension/media/Lexend/OFL.txt b/extension/media/Lexend/OFL.txt new file mode 100644 index 00000000..6b679248 --- /dev/null +++ b/extension/media/Lexend/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Lexend Project Authors (https://github.com/googlefonts/lexend), with Reserved Font Name “RevReading Lexend”.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/extension/media/Lexend/README.txt b/extension/media/Lexend/README.txt new file mode 100644 index 00000000..f2966dfe --- /dev/null +++ b/extension/media/Lexend/README.txt @@ -0,0 +1,71 @@ +Lexend Variable Font +==================== + +This download contains Lexend as both a variable font and static fonts. + +Lexend is a variable font with this axis: + wght + +This means all the styles are contained in a single file: + Lexend-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Lexend: + static/Lexend-Thin.ttf + static/Lexend-ExtraLight.ttf + static/Lexend-Light.ttf + static/Lexend-Regular.ttf + static/Lexend-Medium.ttf + static/Lexend-SemiBold.ttf + static/Lexend-Bold.ttf + static/Lexend-ExtraBold.ttf + static/Lexend-Black.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/extension/media/Lexend/static/Lexend-Black.ttf b/extension/media/Lexend/static/Lexend-Black.ttf Binary files differnew file mode 100644 index 00000000..2fea087c --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Black.ttf diff --git a/extension/media/Lexend/static/Lexend-Bold.ttf b/extension/media/Lexend/static/Lexend-Bold.ttf Binary files differnew file mode 100644 index 00000000..95884f6e --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Bold.ttf diff --git a/extension/media/Lexend/static/Lexend-ExtraBold.ttf b/extension/media/Lexend/static/Lexend-ExtraBold.ttf Binary files differnew file mode 100644 index 00000000..02f84ed3 --- /dev/null +++ b/extension/media/Lexend/static/Lexend-ExtraBold.ttf diff --git a/extension/media/Lexend/static/Lexend-ExtraLight.ttf b/extension/media/Lexend/static/Lexend-ExtraLight.ttf Binary files differnew file mode 100644 index 00000000..20e7068d --- /dev/null +++ b/extension/media/Lexend/static/Lexend-ExtraLight.ttf diff --git a/extension/media/Lexend/static/Lexend-Light.ttf b/extension/media/Lexend/static/Lexend-Light.ttf Binary files differnew file mode 100644 index 00000000..fb6d097c --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Light.ttf diff --git a/extension/media/Lexend/static/Lexend-Medium.ttf b/extension/media/Lexend/static/Lexend-Medium.ttf Binary files differnew file mode 100644 index 00000000..d91a8673 --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Medium.ttf diff --git a/extension/media/Lexend/static/Lexend-Regular.ttf b/extension/media/Lexend/static/Lexend-Regular.ttf Binary files differnew file mode 100644 index 00000000..b423d3ab --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Regular.ttf diff --git a/extension/media/Lexend/static/Lexend-SemiBold.ttf b/extension/media/Lexend/static/Lexend-SemiBold.ttf Binary files differnew file mode 100644 index 00000000..9dcb8214 --- /dev/null +++ b/extension/media/Lexend/static/Lexend-SemiBold.ttf diff --git a/extension/media/Lexend/static/Lexend-Thin.ttf b/extension/media/Lexend/static/Lexend-Thin.ttf Binary files differnew file mode 100644 index 00000000..0d7df881 --- /dev/null +++ b/extension/media/Lexend/static/Lexend-Thin.ttf diff --git a/extension/src/util/messenger.ts b/extension/src/util/messenger.ts index dc59a593..32490a68 100644 --- a/extension/src/util/messenger.ts +++ b/extension/src/util/messenger.ts @@ -111,7 +111,6 @@ export class WebsocketMessenger extends Messenger { if (this.websocket.readyState !== this.websocket.CONNECTING) { this.websocket = this._newWebsocket(); } - this.websocket.addEventListener("open", () => { this.websocket.send(payload); }); diff --git a/media/intro.gif b/media/intro.gif Binary files differindex f872dc91..2ecd0e5b 100644 --- a/media/intro.gif +++ b/media/intro.gif diff --git a/readme.gif b/readme.gif Binary files differnew file mode 100644 index 00000000..1fdeefb7 --- /dev/null +++ b/readme.gif diff --git a/schema/json/FullState.json b/schema/json/FullState.json index 7b6dfd6b..aea199fe 100644 --- a/schema/json/FullState.json +++ b/schema/json/FullState.json @@ -15,10 +15,7 @@ "type": "string" } }, - "required": [ - "name", - "arguments" - ] + "required": ["name", "arguments"] }, "ChatMessage": { "title": "ChatMessage", @@ -26,12 +23,7 @@ "properties": { "role": { "title": "Role", - "enum": [ - "assistant", - "user", - "system", - "function" - ], + "enum": ["assistant", "user", "system", "function"], "type": "string" }, "content": { @@ -50,10 +42,7 @@ "$ref": "#/definitions/FunctionCall" } }, - "required": [ - "role", - "summary" - ] + "required": ["role", "summary"] }, "Step": { "title": "Step", @@ -130,10 +119,7 @@ } } }, - "required": [ - "step", - "depth" - ] + "required": ["step", "depth"] }, "History": { "title": "History", @@ -152,10 +138,7 @@ "type": "integer" } }, - "required": [ - "timeline", - "current_index" - ] + "required": ["timeline", "current_index"] }, "SlashCommandDescription": { "title": "SlashCommandDescription", @@ -170,10 +153,7 @@ "type": "string" } }, - "required": [ - "name", - "description" - ] + "required": ["name", "description"] }, "ContextItemId": { "title": "ContextItemId", @@ -189,10 +169,7 @@ "type": "string" } }, - "required": [ - "provider_title", - "item_id" - ] + "required": ["provider_title", "item_id"] }, "ContextItemDescription": { "title": "ContextItemDescription", @@ -211,11 +188,7 @@ "$ref": "#/definitions/ContextItemId" } }, - "required": [ - "name", - "description", - "id" - ] + "required": ["name", "description", "id"] }, "ContextItem": { "title": "ContextItem", @@ -240,10 +213,7 @@ "type": "boolean" } }, - "required": [ - "description", - "content" - ] + "required": ["description", "content"] }, "src__continuedev__core__main__FullState": { "title": "FullState", @@ -298,4 +268,4 @@ ] } } -}
\ No newline at end of file +} |