diff options
| author | Ty Dunn <ty@tydunn.com> | 2023-06-05 09:35:25 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-05 09:35:25 +0200 | 
| commit | 1261c54b736b29be361ac30fe1fd9bad52e62c2d (patch) | |
| tree | 1b462d1ab3bb2a2b0fc134ba92d3af7da2d72a57 /continuedev | |
| parent | 99d0cf12dcd1481e719e78483fc7df080dc95954 (diff) | |
| parent | 897e6dc1239be26db74a933d10325b86ae55e5fb (diff) | |
| download | sncontinue-1261c54b736b29be361ac30fe1fd9bad52e62c2d.tar.gz sncontinue-1261c54b736b29be361ac30fe1fd9bad52e62c2d.tar.bz2 sncontinue-1261c54b736b29be361ac30fe1fd9bad52e62c2d.zip | |
Merge pull request #64 from continuedev/docs-v0
docs v0
Diffstat (limited to 'continuedev')
| -rw-r--r-- | continuedev/README.md | 15 | ||||
| -rw-r--r-- | continuedev/src/continuedev/core/abstract_sdk.py | 6 | ||||
| -rw-r--r-- | continuedev/src/continuedev/core/sdk.py | 4 | ||||
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 4 | 
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: | 
