summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-06-05 09:35:25 +0200
committerGitHub <noreply@github.com>2023-06-05 09:35:25 +0200
commitffdfad51ffff037565e7b07a2e38c1cbcb6066da (patch)
treec3ea886502a2a32bd8dc576afb7115946a7ebe4b /continuedev
parentd1ccdb83c546710f0438798bf67168be2cf65ca6 (diff)
parent65099504c45579707b0122d16f908feb3bad6c65 (diff)
downloadsncontinue-ffdfad51ffff037565e7b07a2e38c1cbcb6066da.tar.gz
sncontinue-ffdfad51ffff037565e7b07a2e38c1cbcb6066da.tar.bz2
sncontinue-ffdfad51ffff037565e7b07a2e38c1cbcb6066da.zip
Merge pull request #64 from continuedev/docs-v0
docs v0
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/README.md15
-rw-r--r--continuedev/src/continuedev/core/abstract_sdk.py6
-rw-r--r--continuedev/src/continuedev/core/sdk.py4
-rw-r--r--continuedev/src/continuedev/steps/core/core.py4
4 files changed, 15 insertions, 14 deletions
diff --git a/continuedev/README.md b/continuedev/README.md
index d6718c14..911d467d 100644
--- a/continuedev/README.md
+++ b/continuedev/README.md
@@ -6,13 +6,14 @@ Continue is a Python library for automating repetitive sequences of software dev
## Continue Server
-The Continue server acts as a bridge between the Continue React app and your IDE, running your recipes and acting on the codebase. Start it by running the following commands:
-
-- `cd continuedev`
-- Make sure packages are installed with `poetry install`
-- `poetry shell`
-- `cd ..`
-- `python3 -m continuedev.src.continuedev.server.main`
+The Continue server acts as a bridge between the Continue React app and your IDE, running your recipes and acting on the codebase.
+
+Start it by running the following commands:
+1. `cd continuedev`
+2. Make sure packages are installed with `poetry install`
+3. `poetry shell`
+4. `cd ..`
+5. `python3 -m continuedev.src.continuedev.server.main`
## Scripts
diff --git a/continuedev/src/continuedev/core/abstract_sdk.py b/continuedev/src/continuedev/core/abstract_sdk.py
index 9278f873..1c800875 100644
--- a/continuedev/src/continuedev/core/abstract_sdk.py
+++ b/continuedev/src/continuedev/core/abstract_sdk.py
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
-from typing import Coroutine, List
+from typing import Coroutine, List, Union
from .config import ContinueConfig
from ..models.filesystem_edit import FileSystemEdit
@@ -45,7 +45,7 @@ class AbstractContinueSDK(ABC):
pass
@abstractmethod
- async def run(self, commands: List[str] | str, cwd: str = None):
+ async def run(self, commands: Union[List[str], str], cwd: str = None):
pass
@abstractmethod
@@ -57,7 +57,7 @@ class AbstractContinueSDK(ABC):
pass
@abstractmethod
- async def add_file(self, filename: str, content: str | None):
+ async def add_file(self, filename: str, content: Union[str, None]):
pass
@abstractmethod
diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py
index 5bd77d11..8317a3d1 100644
--- a/continuedev/src/continuedev/core/sdk.py
+++ b/continuedev/src/continuedev/core/sdk.py
@@ -73,7 +73,7 @@ class ContinueSDK(AbstractContinueSDK):
async def wait_for_user_confirmation(self, prompt: str):
return await self.run_step(WaitForUserConfirmationStep(prompt=prompt))
- async def run(self, commands: List[str] | str, cwd: str = None):
+ async def run(self, commands: Union[List[str], str], cwd: str = None):
commands = commands if isinstance(commands, List) else [commands]
return await self.run_step(ShellCommandsStep(cmds=commands, cwd=cwd))
@@ -93,7 +93,7 @@ class ContinueSDK(AbstractContinueSDK):
file_edit = FileEdit.from_append(filepath, previous_content, content)
await self.ide.applyFileSystemEdit(file_edit)
- async def add_file(self, filename: str, content: str | None):
+ async def add_file(self, filename: str, content: Union[str, None]):
filepath = await self._ensure_absolute_path(filename)
return await self.run_step(FileSystemEditStep(edit=AddFile(filepath=filepath, content=content)))
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py
index d7f7a307..fdcd9837 100644
--- a/continuedev/src/continuedev/steps/core/core.py
+++ b/continuedev/src/continuedev/steps/core/core.py
@@ -40,10 +40,10 @@ class FileSystemEditStep(ReversibleStep):
class ShellCommandsStep(Step):
cmds: List[str]
- cwd: str | None = None
+ cwd: Union[str, None] = None
name: str = "Run Shell Commands"
- _err_text: str | None = None
+ _err_text: Union[str, None] = None
async def describe(self, models: Models) -> Coroutine[str, None, None]:
if self._err_text is not None: