summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-10-16 20:20:46 -0700
committerNate Sesti <sestinj@gmail.com>2023-10-16 20:20:46 -0700
commit7f56590ef8e4fb2ccfe2ff7d0ab10b4250269514 (patch)
tree972074f3ab0e0496849a153741b3952c21453344
parent4279b4f0455f72f2ff2b2e5f6dbbc89d260504a7 (diff)
downloadsncontinue-7f56590ef8e4fb2ccfe2ff7d0ab10b4250269514.tar.gz
sncontinue-7f56590ef8e4fb2ccfe2ff7d0ab10b4250269514.tar.bz2
sncontinue-7f56590ef8e4fb2ccfe2ff7d0ab10b4250269514.zip
📝 default config.py full file
-rw-r--r--server/config.py86
-rw-r--r--server/continuedev/core/sdk.py2
2 files changed, 87 insertions, 1 deletions
diff --git a/server/config.py b/server/config.py
new file mode 100644
index 00000000..29c05a6c
--- /dev/null
+++ b/server/config.py
@@ -0,0 +1,86 @@
+"""
+This is the Continue configuration file.
+
+See https://continue.dev/docs/customization to for documentation of the available options.
+"""
+
+from continuedev.core.models import Models
+from continuedev.core.config import CustomCommand, SlashCommand, ContinueConfig
+from continuedev.libs.llm import OpenAIFreeTrial
+
+from continuedev.plugins.context_providers import (
+ DiffContextProvider,
+ TerminalContextProvider,
+ URLContextProvider,
+ GitHubIssuesContextProvider,
+)
+from continuedev.plugins.steps import (
+ ClearHistoryStep,
+ CommentCodeStep,
+ EditHighlightedCodeStep,
+ GenerateShellCommandStep,
+ OpenConfigStep,
+)
+from continuedev.plugins.steps.share_session import ShareSessionStep
+
+config = ContinueConfig(
+ allow_anonymous_telemetry=True,
+ models=Models(
+ default=OpenAIFreeTrial(api_key="", model="gpt-4"),
+ summarize=OpenAIFreeTrial(api_key="", model="gpt-3.5-turbo"),
+ ),
+ system_message=None,
+ temperature=0.5,
+ custom_commands=[
+ CustomCommand(
+ name="test",
+ description="Write unit tests for highlighted code",
+ prompt="Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
+ )
+ ],
+ slash_commands=[
+ SlashCommand(
+ name="edit",
+ description="Edit highlighted code",
+ step=EditHighlightedCodeStep,
+ ),
+ SlashCommand(
+ name="config",
+ description="Customize Continue",
+ step=OpenConfigStep,
+ ),
+ SlashCommand(
+ name="comment",
+ description="Write comments for the highlighted code",
+ step=CommentCodeStep,
+ ),
+ SlashCommand(
+ name="clear",
+ description="Clear step history",
+ step=ClearHistoryStep,
+ ),
+ SlashCommand(
+ name="share",
+ description="Download and share this session",
+ step=ShareSessionStep,
+ ),
+ SlashCommand(
+ name="cmd",
+ description="Generate a shell command",
+ step=GenerateShellCommandStep,
+ ),
+ ],
+ context_providers=[
+ # GitHubIssuesContextProvider(
+ # repo_name="<your github username or organization>/<your repo name>",
+ # auth_token="<your github auth token>"
+ # ),
+ DiffContextProvider(),
+ URLContextProvider(
+ preset_urls=[
+ # Add any common urls you reference here so they appear in autocomplete
+ ]
+ ),
+ TerminalContextProvider(),
+ ],
+)
diff --git a/server/continuedev/core/sdk.py b/server/continuedev/core/sdk.py
index 65ac9c58..5c4906ee 100644
--- a/server/continuedev/core/sdk.py
+++ b/server/continuedev/core/sdk.py
@@ -83,7 +83,7 @@ class ContinueSDK(AbstractContinueSDK):
msg_step = MessageStep(
name="Invalid Continue Config File", message=formatted_err
)
- msg_step.description = f"Falling back to default config settings due to the following error in `~/.continue/config.py`.\n```\n{formatted_err}\n```\n\nIt's possible this was caused by an update to the Continue config format. If you'd like to see the new recommended default `config.py`, check [here](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/constants/default_config.py).\n\nIf the error is related to OpenAIServerInfo, see the updated way of using these parameters [here](https://continue.dev/docs/customization#azure-openai-service)."
+ msg_step.description = f"Falling back to default config settings due to the following error in `~/.continue/config.py`.\n```\n{formatted_err}\n```\n\nIt's possible this was caused by an update to the Continue config format. If you'd like to see the new recommended default `config.py`, check [here](https://github.com/continuedev/continue/blob/main/server/config.py).\n\nIf the error is related to OpenAIServerInfo, see the updated way of using these parameters [here](https://continue.dev/docs/customization#azure-openai-service)."
self.history.add_node(
HistoryNode(step=msg_step, observation=None, depth=0, active=False)
)