summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--continuedev/src/continuedev/core/config.py5
-rw-r--r--continuedev/src/continuedev/libs/util/step_name_to_steps.py2
-rw-r--r--continuedev/src/continuedev/steps/open_config.py13
-rw-r--r--extension/README.md11
5 files changed, 42 insertions, 0 deletions
diff --git a/README.md b/README.md
index f917e505..7f950362 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,17 @@ Let Continue build the scaffolding of Python scripts, React components, and more
### [Download for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
+## 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/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index d268d247..3208e63d 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -50,6 +50,11 @@ class ContinueConfig(BaseModel):
step_name="SimpleChatStep",
),
SlashCommand(
+ name="config",
+ description="Open the config file to create new and edit existing slash commands",
+ step_name="OpenConfigStep",
+ ),
+ SlashCommand(
name="comment",
description="Write comments for the current file or highlighted code",
step_name="CommentCodeStep",
diff --git a/continuedev/src/continuedev/libs/util/step_name_to_steps.py b/continuedev/src/continuedev/libs/util/step_name_to_steps.py
index f431f317..d329e110 100644
--- a/continuedev/src/continuedev/libs/util/step_name_to_steps.py
+++ b/continuedev/src/continuedev/libs/util/step_name_to_steps.py
@@ -12,6 +12,7 @@ from ...recipes.DDtoBQRecipe.main import DDtoBQRecipe
from ...recipes.DeployPipelineAirflowRecipe.main import DeployPipelineAirflowRecipe
from ...steps.on_traceback import DefaultOnTracebackStep
from ...steps.clear_history import ClearHistoryStep
+from ...steps.open_config import OpenConfigStep
# 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
@@ -27,6 +28,7 @@ step_name_to_step_class = {
"DeployPipelineAirflowRecipe": DeployPipelineAirflowRecipe,
"DefaultOnTracebackStep": DefaultOnTracebackStep,
"ClearHistoryStep": ClearHistoryStep,
+ "OpenConfigStep": OpenConfigStep
}
diff --git a/continuedev/src/continuedev/steps/open_config.py b/continuedev/src/continuedev/steps/open_config.py
new file mode 100644
index 00000000..43c1b7ce
--- /dev/null
+++ b/continuedev/src/continuedev/steps/open_config.py
@@ -0,0 +1,13 @@
+from ..core.main import Step
+from ..core.sdk import ContinueSDK
+import os
+
+
+class OpenConfigStep(Step):
+ name: str = "Open config"
+
+ async def run(self, sdk: ContinueSDK):
+ global_dir = os.path.expanduser('~/.continue')
+ config_path = os.path.join(global_dir, 'config.json')
+ print(config_path)
+ await sdk.ide.setFileOpen(config_path) \ No newline at end of file
diff --git a/extension/README.md b/extension/README.md
index 1766cef1..4786c99b 100644
--- a/extension/README.md
+++ b/extension/README.md
@@ -25,6 +25,17 @@ Let Continue build the scaffolding of Python scripts, React components, and more
- `Write Python in a new file to get Posthog events`
- `Add a React component for syntax highlighted code`
+## 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