summaryrefslogtreecommitdiff
path: root/continuedev/src/continuedev/steps
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-18 13:19:51 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-18 13:19:51 -0700
commit33b3bbed4c848927919a845bda06bc3b775453ed (patch)
treef29f2604677be0e6573d856fff39eb05cd044ce4 /continuedev/src/continuedev/steps
parentc3f0b21350346506ef77e19bd5567c88e8db6c63 (diff)
downloadsncontinue-33b3bbed4c848927919a845bda06bc3b775453ed.tar.gz
sncontinue-33b3bbed4c848927919a845bda06bc3b775453ed.tar.bz2
sncontinue-33b3bbed4c848927919a845bda06bc3b775453ed.zip
docs and welcome step
Diffstat (limited to 'continuedev/src/continuedev/steps')
-rw-r--r--continuedev/src/continuedev/steps/welcome.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/continuedev/src/continuedev/steps/welcome.py b/continuedev/src/continuedev/steps/welcome.py
new file mode 100644
index 00000000..fd9e9f65
--- /dev/null
+++ b/continuedev/src/continuedev/steps/welcome.py
@@ -0,0 +1,30 @@
+from textwrap import dedent
+from ..models.filesystem_edit import AddFile
+from ..core.main import Step
+from ..core.sdk import ContinueSDK, Models
+import os
+
+
+class WelcomeStep(Step):
+ name: str = "Welcome to Continue!"
+ hide: bool = True
+
+ async def describe(self, models: Models):
+ return "Welcome to Continue!"
+
+ async def run(self, sdk: ContinueSDK):
+ continue_dir = os.path.expanduser("~/.continue")
+ filepath = os.path.join(continue_dir, "calculator.py")
+ if os.path.exists(filepath):
+ return
+ if not os.path.exists(continue_dir):
+ os.mkdir(continue_dir)
+
+ await sdk.ide.applyFileSystemEdit(AddFile(filepath=filepath, content=dedent("""\
+ \"\"\"
+ Welcome to Continue! To get acquainted, delete this comment and try to use Continue for the following:
+ - "Write me a calculator class"
+ - Ask for a new method, maybe "exp" or "mod" or sqrt"
+ - Type /comment to write comments for the entire class
+ - Ask about how the class works, how to write it in another language, or anything else you can think of
+ \"\"\"""")))