copying from old repo

This commit is contained in:
Nate Sesti 2023-05-23 23:45:12 -04:00
commit f53768612b
238 changed files with 60884 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

138
.gitignore vendored Normal file
View file

@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
**/node_modules
**/out
**/.vscode
notes.txt
cached_embeddings.pkl
.ruff_cache
codeql

14
README.md Normal file
View file

@ -0,0 +1,14 @@
# Continue
Try out latest version:
- `cd extension`
- `npm run package`
- `cd build`
- `code --install-extension continue-0.0.1.vsix`
Resources
- [Continue Github Project](https://github.com/orgs/continuedev/projects/1/views/1)
- [Continue User Guide](https://www.notion.so/continue-dev/Continue-User-Guide-1c6ad99887d0474d9e42206f6c98efa4)
- [Continue - Mission & Vision](https://continue-dev.notion.site/Continue-a8e41af9801641f79d2c8565907bbd22)

2
continuedev/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
notes.md
config.json

19
continuedev/README.md Normal file
View file

@ -0,0 +1,19 @@
## Steps to start
- `cd continue/continue`
- Make sure packages are installed with `poetry install`
- `poetry shell`
- `cd ..`
- `python3 -m continuedev.src.continuedev`
## Steps to generate JSON Schema
Same up until last step and then `python3 -m continuedev.src.scripts.gen_json_schema`.
## Start the server
Same steps, then `uvicorn continue.src.server.main:app --reload`.
## To build
Run `poetry build` and it will output wheel and tarball files in `./dist`.

0
continuedev/__init__.py Normal file
View file

1694
continuedev/poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

2
continuedev/poetry.toml Normal file
View file

@ -0,0 +1,2 @@
[virtualenvs]
in-project = true

View file

@ -0,0 +1,25 @@
[tool.poetry]
name = "continuedev"
version = "0.1.0"
description = ""
authors = ["Nate Sesti <sestinj@gmail.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.95.1"
typer = "^0.7.0"
openai = "^0.27.5"
boltons = "^23.0.0"
pydantic = "^1.10.7"
uvicorn = "^0.21.1"
python-dotenv = "^1.0.0"
nest-asyncio = "^1.5.6"
websockets = "^11.0.2"
urllib3 = "1.26.15"
gpt-index = "^0.6.8"
setuptools = "^67.7.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

View file

View file

View file

@ -0,0 +1 @@
data

View file

@ -0,0 +1,78 @@
import subprocess
import sys
from llama_index import GPTVectorStoreIndex, StorageContext, load_index_from_storage
import os
from typer import Typer
from enum import Enum
from .update import update_codebase_index, create_codebase_index, index_dir_for, get_current_branch
from .replace import replace_additional_index
app = Typer()
def query_codebase_index(query: str) -> str:
"""Query the codebase index."""
branch = subprocess.check_output(
["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode("utf-8").strip()
path = index_dir_for(branch)
if not os.path.exists(path):
print("No index found for the codebase at ", path)
return ""
storage_context = StorageContext.from_defaults(
persist_dir=index_dir_for(branch))
index = load_index_from_storage(storage_context)
# index = GPTVectorStoreIndex.load_from_disk(path)
engine = index.as_query_engine()
return engine.query(query)
def query_additional_index(query: str) -> str:
"""Query the additional index."""
index = GPTVectorStoreIndex.load_from_disk('data/additional_index.json')
return index.query(query)
class IndexTypeOption(str, Enum):
codebase = "codebase"
additional = "additional"
@app.command()
def query(context: IndexTypeOption, query: str):
if context == IndexTypeOption.additional:
response = query_additional_index(query)
elif context == IndexTypeOption.codebase:
response = query_codebase_index(query)
else:
print("Error: unknown context")
print({"response": response})
@app.command()
def check_index_exists(root_path: str):
branch = get_current_branch()
exists = os.path.exists(index_dir_for(branch))
print({"exists": exists})
@app.command()
def update():
update_codebase_index()
print("Updated codebase index")
@app.command("create")
def create_index():
create_codebase_index()
print("Created file index")
@app.command()
def replace_additional_index(info: str):
replace_additional_index()
print("Replaced additional index")
if __name__ == '__main__':
app()

View file

@ -0,0 +1,19 @@
import sys
from llama_index import GPTVectorStoreIndex, Document
def replace_additional_index(info: str):
"""Replace the additional index."""
with open('data/additional_context.txt', 'w') as f:
f.write(info)
documents = [Document(info)]
index = GPTVectorStoreIndex(documents)
index.save_to_disk('data/additional_index.json')
print("Additional index replaced")
if __name__ == "__main__":
"""python3 replace.py <info>"""
info = sys.argv[1] if len(sys.argv) > 1 else None
if info:
replace_additional_index(info)

View file

@ -0,0 +1,213 @@
# import faiss
import json
import os
import subprocess
from llama_index.langchain_helpers.text_splitter import TokenTextSplitter
from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader, Document
from typing import List, Generator, Tuple
from dotenv import load_dotenv
load_dotenv()
FILE_TYPES_TO_IGNORE = [
'.pyc',
'.png',
'.jpg',
'.jpeg',
'.gif',
'.svg',
'.ico'
]
def further_filter(files: List[str], root_dir: str):
"""Further filter files before indexing."""
for file in files:
if file.endswith(tuple(FILE_TYPES_TO_IGNORE)) or file.startswith('.git') or file.startswith('archive'):
continue
yield root_dir + "/" + file
def get_git_root_dir(path: str):
"""Get the root directory of a Git repository."""
try:
return subprocess.check_output(['git', 'rev-parse', '--show-toplevel'], cwd=path).strip().decode()
except subprocess.CalledProcessError:
return None
def get_git_ignored_files(root_dir: str):
"""Get the list of ignored files in a Git repository."""
try:
output = subprocess.check_output(
['git', 'ls-files', '--ignored', '--others', '--exclude-standard'], cwd=root_dir).strip().decode()
return output.split('\n')
except subprocess.CalledProcessError:
return []
def get_all_files(root_dir: str):
"""Get a list of all files in a directory."""
for dir_path, _, file_names in os.walk(root_dir):
for file_name in file_names:
yield os.path.join(os.path.relpath(dir_path, root_dir), file_name)
def get_input_files(root_dir: str):
"""Get a list of all files in a Git repository that are not ignored."""
ignored_files = set(get_git_ignored_files(root_dir))
all_files = set(get_all_files(root_dir))
nonignored_files = all_files - ignored_files
return further_filter(nonignored_files, root_dir)
def load_gpt_index_documents(root: str) -> List[Document]:
"""Loads a list of GPTIndex Documents, respecting .gitignore files."""
# Get input files
input_files = get_input_files(root)
# Use SimpleDirectoryReader to load the files into Documents
return SimpleDirectoryReader(root, input_files=input_files, file_metadata=lambda filename: {"filename": filename}).load_data()
def index_dir_for(branch: str) -> str:
return f"/Users/natesesti/Desktop/continue/continuedev/src/continuedev/libs/data/{branch}"
def get_git_root_dir():
return "/Users/natesesti/Desktop/continue/extension/examples/python"
result = subprocess.run(['git', 'rev-parse', '--show-toplevel'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return result.stdout.decode().strip()
def get_current_branch() -> str:
return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode("utf-8").strip()
def get_current_commit() -> str:
return subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("utf-8").strip()
def create_codebase_index():
"""Create a new index for the current branch."""
branch = get_current_branch()
if not os.path.exists(index_dir_for(branch)):
os.makedirs(index_dir_for(branch))
print("ROOT DIRECTORY: ", get_git_root_dir())
documents = load_gpt_index_documents(get_git_root_dir())
chunks = {}
doc_chunks = []
for doc in documents:
text_splitter = TokenTextSplitter()
text_chunks = text_splitter.split_text(doc.text)
filename = doc.extra_info["filename"]
chunks[filename] = len(text_chunks)
for i, text in enumerate(text_chunks):
doc_chunks.append(Document(text, doc_id=f"{filename}::{i}"))
with open(f"{index_dir_for(branch)}/metadata.json", "w") as f:
json.dump({"commit": get_current_commit(),
"chunks": chunks}, f, indent=4)
index = GPTVectorStoreIndex([])
for chunk in doc_chunks:
index.insert(chunk)
# d = 1536 # Dimension of text-ada-embedding-002
# faiss_index = faiss.IndexFlatL2(d)
# index = GPTFaissIndex(documents, faiss_index=faiss_index)
# index.save_to_disk(f"{index_dir_for(branch)}/index.json", faiss_index_save_path=f"{index_dir_for(branch)}/index_faiss_core.index")
index.storage_context.persist(
persist_dir=index_dir_for(branch))
print("Codebase index created")
def get_modified_deleted_files() -> Tuple[List[str], List[str]]:
"""Get a list of all files that have been modified since the last commit."""
branch = get_current_branch()
current_commit = get_current_commit()
metadata = f"{index_dir_for(branch)}/metadata.json"
with open(metadata, "r") as f:
previous_commit = json.load(f)["commit"]
modified_deleted_files = subprocess.check_output(
["git", "diff", "--name-only", previous_commit, current_commit]).decode("utf-8").strip()
modified_deleted_files = modified_deleted_files.split("\n")
modified_deleted_files = [f for f in modified_deleted_files if f]
root = get_git_root_dir()
deleted_files = [
f for f in modified_deleted_files if not os.path.exists(root + "/" + f)]
modified_files = [
f for f in modified_deleted_files if os.path.exists(root + "/" + f)]
return further_filter(modified_files, index_dir_for(branch)), further_filter(deleted_files, index_dir_for(branch))
def update_codebase_index():
"""Update the index with a list of files."""
branch = get_current_branch()
if not os.path.exists(index_dir_for(branch)):
create_codebase_index()
else:
# index = GPTFaissIndex.load_from_disk(f"{index_dir_for(branch)}/index.json", faiss_index_save_path=f"{index_dir_for(branch)}/index_faiss_core.index")
index = GPTVectorStoreIndex.load_from_disk(
f"{index_dir_for(branch)}/index.json")
modified_files, deleted_files = get_modified_deleted_files()
with open(f"{index_dir_for(branch)}/metadata.json", "r") as f:
metadata = json.load(f)
for file in deleted_files:
num_chunks = metadata["chunks"][file]
for i in range(num_chunks):
index.delete(f"{file}::{i}")
del metadata["chunks"][file]
print(f"Deleted {file}")
for file in modified_files:
if file in metadata["chunks"]:
num_chunks = metadata["chunks"][file]
for i in range(num_chunks):
index.delete(f"{file}::{i}")
print(f"Deleted old version of {file}")
with open(file, "r") as f:
text = f.read()
text_splitter = TokenTextSplitter()
text_chunks = text_splitter.split_text(text)
for i, text in enumerate(text_chunks):
index.insert(Document(text, doc_id=f"{file}::{i}"))
metadata["chunks"][file] = len(text_chunks)
print(f"Inserted new version of {file}")
metadata["commit"] = get_current_commit()
with open(f"{index_dir_for(branch)}/metadata.json", "w") as f:
json.dump(metadata, f, indent=4)
print("Codebase index updated")
if __name__ == "__main__":
"""python3 update.py"""
update_codebase_index()

View file

@ -0,0 +1,423 @@
import traceback
import time
from typing import Callable, Coroutine, Dict, Generator, List, Tuple, Union
from ..models.filesystem_edit import EditDiff, FileEdit, FileEditWithFullContents, FileSystemEdit
from ..models.filesystem import FileSystem
from pydantic import BaseModel, parse_file_as, validator
from .llm import LLM
from .observation import Observation, UserInputObservation
from ..server.ide_protocol import AbstractIdeProtocolServer
from .util.queue import AsyncSubscriptionQueue
class ContinueBaseModel(BaseModel):
class Config:
underscore_attrs_are_private = True
class HistoryNode(ContinueBaseModel):
"""A point in history, a list of which make up History"""
step: "Step"
observation: Union[Observation, None]
depth: int
class History(ContinueBaseModel):
"""A history of steps taken and their results"""
timeline: List[HistoryNode]
current_index: int
def add_node(self, node: HistoryNode):
self.timeline.insert(self.current_index + 1, node)
self.current_index += 1
def get_current(self) -> Union[HistoryNode, None]:
if self.current_index < 0:
return None
return self.timeline[self.current_index]
def remove_current_and_substeps(self):
self.timeline.pop(self.current_index)
while self.get_current() is not None and self.get_current().depth > 0:
self.timeline.pop(self.current_index)
def take_next_step(self) -> Union["Step", None]:
if self.has_future():
self.current_index += 1
current_state = self.get_current()
if current_state is None:
return None
return current_state.step
return None
def get_current_index(self) -> int:
return self.current_index
def has_future(self) -> bool:
return self.current_index < len(self.timeline) - 1
def step_back(self):
self.current_index -= 1
def last_observation(self) -> Union[Observation, None]:
state = self.get_current()
if state is None:
return None
return state.observation
@classmethod
def from_empty(cls):
return cls(timeline=[], current_index=-1)
class FullState(ContinueBaseModel):
"""A full state of the program, including the history"""
history: History
active: bool
user_input_queue: List[str]
class Policy(ContinueBaseModel):
"""A rule that determines which step to take next"""
# Note that history is mutable, kinda sus
def next(self, history: History = History.from_empty()) -> "Step":
raise NotImplementedError
class ContinueSDK:
"""The SDK provided as parameters to a step"""
llm: LLM
ide: AbstractIdeProtocolServer
__agent: "Agent"
def __init__(self, agent: "Agent", llm: Union[LLM, None] = None):
if llm is None:
self.llm = agent.llm
else:
self.llm = llm
self.ide = agent.ide
self.__agent = agent
@property
def history(self) -> History:
return self.__agent.history
async def run_step(self, step: "Step") -> Coroutine[Observation, None, None]:
return await self.__agent._run_singular_step(step)
async def apply_filesystem_edit(self, edit: FileSystemEdit):
await self.run_step(FileSystemEditStep(edit=edit))
async def wait_for_user_input(self) -> str:
return await self.__agent.wait_for_user_input()
class Agent(ContinueBaseModel):
llm: LLM
policy: Policy
ide: AbstractIdeProtocolServer
history: History = History.from_empty()
_on_update_callbacks: List[Callable[["FullState"], None]] = []
_active: bool = False
_should_halt: bool = False
_main_user_input_queue: List[str] = []
_user_input_queue = AsyncSubscriptionQueue()
class Config:
arbitrary_types_allowed = True
def get_full_state(self) -> FullState:
return FullState(history=self.history, active=self._active, user_input_queue=self._main_user_input_queue)
def on_update(self, callback: Callable[["FullState"], None]):
"""Subscribe to changes to state"""
self._on_update_callbacks.append(callback)
def update_subscribers(self):
full_state = self.get_full_state()
for callback in self._on_update_callbacks:
callback(full_state)
def __get_step_params(self, step: "Step"):
return ContinueSDK(agent=self, llm=self.llm.with_system_message(step.system_message))
def give_user_input(self, input: str, index: int):
self._user_input_queue.post(index, input)
async def wait_for_user_input(self) -> str:
self._active = False
self.update_subscribers()
await self._user_input_queue.get(self.history.current_index)
self._active = True
self.update_subscribers()
_manual_edits_buffer: List[FileEditWithFullContents] = []
async def reverse_to_index(self, index: int):
try:
while self.history.get_current_index() >= index:
current_step = self.history.get_current().step
self.history.step_back()
if issubclass(current_step.__class__, ReversibleStep):
await current_step.reverse(self.__get_step_params(current_step))
self.update_subscribers()
except Exception as e:
print(e)
def handle_manual_edits(self, edits: List[FileEditWithFullContents]):
for edit in edits:
self._manual_edits_buffer.append(edit)
# TODO: You're storing a lot of unecessary data here. Can compress into EditDiffs on the spot, and merge.
# self._manual_edits_buffer = merge_file_edit(self._manual_edits_buffer, edit)
def handle_traceback(self, traceback: str):
raise NotImplementedError
_step_depth: int = 0
async def _run_singular_step(self, step: "Step", is_future_step: bool = False) -> Coroutine[Observation, None, None]:
if not is_future_step:
# Check manual edits buffer, clear out if needed by creating a ManualEditStep
if len(self._manual_edits_buffer) > 0:
manualEditsStep = ManualEditStep.from_sequence(
self._manual_edits_buffer)
self._manual_edits_buffer = []
await self._run_singular_step(manualEditsStep)
# Update history - do this first so we get top-first tree ordering
self.history.add_node(HistoryNode(
step=step, observation=None, depth=self._step_depth))
# Run step
self._step_depth += 1
observation = await step(self.__get_step_params(step))
self._step_depth -= 1
# Add observation to history
self.history.get_current().observation = observation
# Update its description
step._set_description(await step.describe(self.llm))
# Call all subscribed callbacks
self.update_subscribers()
return observation
async def run_from_step(self, step: "Step"):
# if self._active:
# raise RuntimeError("Agent is already running")
self._active = True
next_step = step
is_future_step = False
while not (next_step is None or self._should_halt):
try:
if is_future_step:
# If future step, then we are replaying and need to delete the step from history so it can be replaced
self.history.remove_current_and_substeps()
observation = await self._run_singular_step(next_step, is_future_step)
if next_step := self.policy.next(self.history):
is_future_step = False
elif next_step := self.history.take_next_step():
is_future_step = True
else:
next_step = None
except Exception as e:
print(
f"Error while running step: \n{''.join(traceback.format_tb(e.__traceback__))}\n{e}")
next_step = None
self._active = False
# Doing this so active can make it to the frontend after steps are done. But want better state syncing tools
for callback in self._on_update_callbacks:
callback(None)
async def run_from_observation(self, observation: Observation):
next_step = self.policy.next(self.history)
await self.run_from_step(next_step)
async def run_policy(self):
first_step = self.policy.next(self.history)
await self.run_from_step(first_step)
async def _request_halt(self):
if self._active:
self._should_halt = True
while self._active:
time.sleep(0.1)
self._should_halt = False
return None
async def accept_user_input(self, user_input: str):
self._main_user_input_queue.append(user_input)
self.update_subscribers()
if len(self._main_user_input_queue) > 1:
return
# await self._request_halt()
# Just run the step that takes user input, and
# then up to the policy to decide how to deal with it.
self._main_user_input_queue.pop(0)
self.update_subscribers()
await self.run_from_step(UserInputStep(user_input=user_input))
while len(self._main_user_input_queue) > 0:
await self.run_from_step(UserInputStep(
user_input=self._main_user_input_queue.pop(0)))
async def accept_refinement_input(self, user_input: str, index: int):
await self._request_halt()
await self.reverse_to_index(index)
await self.run_from_step(UserInputStep(user_input=user_input))
class Step(ContinueBaseModel):
name: str = None
hide: bool = False
_description: Union[str, None] = None
system_message: Union[str, None] = None
class Config:
copy_on_model_validation = False
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
if self._description is not None:
return self._description
return "Running step: " + self.name
def _set_description(self, description: str):
self._description = description
def dict(self, *args, **kwargs):
d = super().dict(*args, **kwargs)
if self._description is not None:
d["description"] = self._description
else:
d["description"] = self.name
return d
@validator("name", pre=True, always=True)
def name_is_class_name(cls, name):
if name is None:
return cls.__name__
return name
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
raise NotImplementedError
async def __call__(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
return await self.run(sdk)
def __rshift__(self, other: "Step"):
steps = []
if isinstance(self, SequentialStep):
steps = self.steps
else:
steps.append(self)
if isinstance(other, SequentialStep):
steps += other.steps
else:
steps.append(other)
return SequentialStep(steps=steps)
class SequentialStep(Step):
steps: list[Step]
hide: bool = True
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
for step in self.steps:
observation = await sdk.run_step(step)
return observation
class ReversibleStep(Step):
async def reverse(self, sdk: ContinueSDK):
raise NotImplementedError
class FileSystemEditStep(ReversibleStep):
edit: FileSystemEdit
_diff: Union[EditDiff, None] = None
hide: bool = True
async def run(self, sdk: "ContinueSDK") -> Coroutine[Observation, None, None]:
self._diff = await sdk.ide.applyFileSystemEdit(self.edit)
return None
async def reverse(self, sdk: "ContinueSDK"):
await sdk.ide.applyFileSystemEdit(self._diff.backward)
# Where and when should file saves happen?
class ManualEditStep(ReversibleStep):
edit_diff: EditDiff
hide: bool = True
hide: bool = True
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return "Manual edit step"
# TODO - only handling FileEdit here, but need all other types of FileSystemEdits
# Also requires the merge_file_edit function
# return llm.complete(dedent(f"""This code was replaced:
# {self.edit_diff.backward.replacement}
# With this code:
# {self.edit_diff.forward.replacement}
# Maximally concise summary of changes in bullet points (can use markdown):
# """))
@classmethod
def from_sequence(cls, edits: List[FileEditWithFullContents]) -> "ManualEditStep":
diffs = []
for edit in edits:
_, diff = FileSystem.apply_edit_to_str(
edit.fileContents, edit.fileEdit)
diffs.append(diff)
return cls(edit_diff=EditDiff.from_sequence(diffs))
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
return None
async def reverse(self, sdk: ContinueSDK):
await sdk.ide.applyFileSystemEdit(self.edit_diff.backward)
class UserInputStep(Step):
user_input: str
name: str = "User Input"
hide: bool = True
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return self.user_input
async def run(self, sdk: ContinueSDK) -> Coroutine[UserInputObservation, None, None]:
return UserInputObservation(user_input=self.user_input)
class ValidatorObservation(Observation):
passed: bool
observation: Observation
class Validator(Step):
def run(self, sdk: ContinueSDK) -> ValidatorObservation:
raise NotImplementedError
HistoryNode.update_forward_refs()

View file

@ -0,0 +1,22 @@
from typing import Union
from ...models.main import AbstractModel
from pydantic import BaseModel
class LLM(BaseModel):
system_message: Union[str, None] = None
def complete(self, prompt: str, **kwargs):
"""Return the completion of the text with the given temperature."""
raise
def __call__(self, prompt: str, **kwargs):
return self.complete(prompt, **kwargs)
def fine_tune(self, pairs: list):
"""Fine tune the model on the given prompt/completion pairs."""
raise NotImplementedError
def with_system_message(self, system_message: Union[str, None]):
"""Return a new model with the given system message."""
raise NotImplementedError

View file

@ -0,0 +1,14 @@
from .llm import LLM
from transformers import AutoTokenizer, AutoModelForCausalLM
class HuggingFace(LLM):
def __init__(self, model_path: str = "Salesforce/codegen-2B-mono"):
self.model_path = model_path
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
self.model = AutoModelForCausalLM.from_pretrained(model_path)
def complete(self, prompt: str, **kwargs):
args = { "max_tokens": 100 } | kwargs
input_ids = self.tokenizer(prompt, return_tensors="pt").input_ids
generated_ids = self.model.generate(input_ids, max_length=args["max_tokens"])
return self.tokenizer.decode(generated_ids[0], skip_special_tokens=True)

View file

@ -0,0 +1,159 @@
import asyncio
import time
from typing import Any, Dict, Generator, List, Union
import openai
import aiohttp
from ..llm import LLM
from pydantic import BaseModel, validator
class OpenAI(LLM):
api_key: str
completion_count: int = 0
default_model: str = "text-davinci-003"
@validator("api_key", pre=True, always=True)
def validate_api_key(cls, v):
openai.api_key = v
return v
def with_system_message(self, system_message: Union[str, None]):
return OpenAI(api_key=self.api_key, system_message=system_message)
def stream_chat(self, messages, **kwargs) -> Generator[Union[Any, List, Dict], None, None]:
self.completion_count += 1
args = {"max_tokens": 512, "temperature": 0.5, "top_p": 1,
"frequency_penalty": 0, "presence_penalty": 0} | kwargs
args["stream"] = True
args["model"] = "gpt-3.5-turbo"
for chunk in openai.ChatCompletion.create(
messages=messages,
**args,
):
if "content" in chunk.choices[0].delta:
yield chunk.choices[0].delta.content
else:
continue
def stream_complete(self, prompt: str, **kwargs) -> Generator[Union[Any, List, Dict], None, None]:
self.completion_count += 1
args = {"model": self.default_model, "max_tokens": 512, "temperature": 0.5,
"top_p": 1, "frequency_penalty": 0, "presence_penalty": 0, "suffix": None} | kwargs
args["stream"] = True
if args["model"] == "gpt-3.5-turbo":
generator = openai.ChatCompletion.create(
messages=[{
"role": "user",
"content": prompt
}],
**args,
)
for chunk in generator:
yield chunk.choices[0].message.content
else:
generator = openai.Completion.create(
prompt=prompt,
**args,
)
for chunk in generator:
yield chunk.choices[0].text
def complete(self, prompt: str, **kwargs) -> str:
t1 = time.time()
self.completion_count += 1
args = {"model": self.default_model, "max_tokens": 512, "temperature": 0.5, "top_p": 1,
"frequency_penalty": 0, "presence_penalty": 0, "stream": False} | kwargs
if args["model"] == "gpt-3.5-turbo":
messages = [{
"role": "user",
"content": prompt
}]
if self.system_message:
messages.insert(0, {
"role": "system",
"content": self.system_message
})
resp = openai.ChatCompletion.create(
messages=messages,
**args,
).choices[0].message.content
else:
resp = openai.Completion.create(
prompt=prompt,
**args,
).choices[0].text
t2 = time.time()
print("Completion time:", t2 - t1)
return resp
def edit(self, inp: str, instruction: str) -> str:
try:
resp = openai.Edit.create(
input=inp,
instruction=instruction,
model='text-davinci-edit-001'
).choices[0].text
return resp
except Exception as e:
print("OpenAI error:", e)
raise e
def parallel_edit(self, inputs: list[str], instructions: Union[List[str], str], **kwargs) -> list[str]:
args = {"temperature": 0.5, "top_p": 1} | kwargs
args['model'] = 'text-davinci-edit-001'
async def fn():
async with aiohttp.ClientSession() as session:
tasks = []
async def get(input, instruction):
async with session.post("https://api.openai.com/v1/edits", headers={
"Content-Type": "application/json",
"Authorization": "Bearer " + self.api_key
}, json={"model": args["model"], "input": input, "instruction": instruction, "temperature": args["temperature"], "max_tokens": args["max_tokens"], "suffix": args["suffix"]}) as resp:
json = await resp.json()
if "error" in json:
print("ERROR IN GPT-3 RESPONSE: ", json)
return None
return json["choices"][0]["text"]
for i in range(len(inputs)):
tasks.append(get(inputs[i], instructions[i] if isinstance(
instructions, list) else instructions))
return await asyncio.gather(*tasks)
return asyncio.run(fn())
def parallel_complete(self, prompts: list[str], suffixes: Union[list[str], None] = None, **kwargs) -> list[str]:
self.completion_count += len(prompts)
args = {"model": self.default_model, "max_tokens": 512, "temperature": 0.5,
"top_p": 1, "frequency_penalty": 0, "presence_penalty": 0} | kwargs
async def fn():
async with aiohttp.ClientSession() as session:
tasks = []
async def get(prompt, suffix):
async with session.post("https://api.openai.com/v1/completions", headers={
"Content-Type": "application/json",
"Authorization": "Bearer " + self.api_key
}, json={"model": args["model"], "prompt": prompt, "temperature": args["temperature"], "max_tokens": args["max_tokens"], "suffix": suffix}) as resp:
json = await resp.json()
if "error" in json:
print("ERROR IN GPT-3 RESPONSE: ", json)
return None
return json["choices"][0]["text"]
for i in range(len(prompts)):
tasks.append(asyncio.ensure_future(
get(prompts[i], suffixes[i] if suffixes else None)))
return await asyncio.gather(*tasks)
return asyncio.run(fn())

View file

@ -0,0 +1,71 @@
from typing import Dict, List, Union
from ...models.filesystem import RangeInFileWithContents
from ...models.filesystem_edit import FileEdit
class MarkdownStyleEncoderDecoder:
# Filename -> the part of the file you care about
range_in_files: List[RangeInFileWithContents]
def __init__(self, range_in_files: List[RangeInFileWithContents]):
self.range_in_files = range_in_files
def encode(self) -> str:
return "\n\n".join([
f"File ({rif.filepath})\n```\n{rif.contents}\n```"
for rif in self.range_in_files
])
def _suggestions_to_file_edits(self, suggestions: Dict[str, str]) -> List[FileEdit]:
file_edits: List[FileEdit] = []
for suggestion_filepath, suggestion in suggestions.items():
matching_rifs = list(
filter(lambda r: r.filepath == suggestion_filepath, self.range_in_files))
if (len(matching_rifs) > 0):
range_in_file = matching_rifs[0]
file_edits.append(FileEdit(
range=range_in_file.range,
filepath=range_in_file.filepath,
replacement=suggestion
))
return file_edits
def _decode_to_suggestions(self, completion: str) -> Dict[str, str]:
if len(self.range_in_files) == 0:
return {}
if not '```' in completion:
completion = "```\n" + completion + "\n```"
if completion.strip().splitlines()[0].strip() == '```':
first_filepath = self.range_in_files[0].filepath
completion = f"File ({first_filepath})\n" + completion
suggestions: Dict[str, str] = {}
current_file_lines: List[str] = []
current_filepath: Union[str, None] = None
last_was_file = False
inside_file = False
for line in completion.splitlines():
if line.strip().startswith("File ("):
last_was_file = True
current_filepath = line.strip()[6:-1]
elif last_was_file and line.startswith("```"):
last_was_file = False
inside_file = True
elif inside_file:
if line.startswith("```"):
inside_file = False
suggestions[current_filepath] = "\n".join(
current_file_lines)
current_file_lines = []
current_filepath = None
else:
current_file_lines.append(line)
return suggestions
def decode(self, completion: str) -> List[FileEdit]:
suggestions = self._decode_to_suggestions(completion)
file_edits = self._suggestions_to_file_edits(suggestions)
return file_edits

View file

@ -0,0 +1,112 @@
from typing import Any, Callable, List, Tuple, Union
from ..llm import LLM
from .openai import OpenAI
def cls_method_to_str(cls_name: str, init: str, method: str) -> str:
"""Convert class and method info to formatted code"""
return f"""class {cls_name}:
{init}
{method}"""
# Prompter classes
class Prompter:
def __init__(self, llm: LLM = None):
if llm is None:
self.llm = OpenAI()
else:
self.llm = llm
def _compile_prompt(self, inp: Any) -> Tuple[str, str, Union[str, None]]:
"Takes input and returns prompt, prefix, suffix"
raise NotImplementedError
def complete(self, inp: Any, **kwargs) -> str:
prompt, prefix, suffix = self._compile_prompt(inp)
resp = self.llm.complete(prompt + prefix, suffix=suffix, **kwargs)
return prefix + resp + (suffix or "")
def __call__(self, inp: Any, **kwargs) -> str:
return self.complete(inp, **kwargs)
def parallel_complete(self, inps: List[Any]) -> List[str]:
prompts = []
prefixes = []
suffixes = []
for inp in inps:
prompt, prefix, suffix = self._compile_prompt(inp)
prompts.append(prompt)
prefixes.append(prefix)
suffixes.append(suffix)
resps = self.llm.parallel_complete(
[prompt + prefix for prompt, prefix in zip(prompts, prefixes)], suffixes=suffixes)
return [prefix + resp + (suffix or "") for prefix, resp, suffix in zip(prefixes, resps, suffixes)]
class MixedPrompter(Prompter):
def __init__(self, prompters: List[Prompter], router: Callable[[Any], int], llm: LLM = None):
super().__init__(llm=llm)
self.prompters = prompters
self.router = router
def _compile_prompt(self, inp: Any) -> Tuple[str, str, Union[str, None]]:
prompter = self.prompters[self.router(inp)]
return prompter._compile_prompt(inp)
def complete(self, inp: Any, **kwargs) -> str:
prompter = self.prompters[self.router(inp)]
return prompter.complete(inp, **kwargs)
class SimplePrompter(Prompter):
def __init__(self, prompt_fn: Callable[[Any], str], llm: LLM = None):
super().__init__(llm=llm)
self.prompt_fn = prompt_fn
def _compile_prompt(self, inp: Any) -> Tuple[str, str, Union[str, None]]:
return self.prompt_fn(inp), "", None
class FormatStringPrompter(SimplePrompter):
"""Pass a formatted string, and the input should be a dict with the keys to format"""
def __init__(self, prompt: str, llm: LLM = None):
super().__init__(lambda inp: prompt.format(**inp), llm=llm)
class BasicCommentPrompter(SimplePrompter):
def __init__(self, comment: str, llm: LLM = None):
super().__init__(lambda inp: f"""{inp}
# {comment}""", llm=llm)
class EditPrompter(Prompter):
def __init__(self, prompt_fn: Callable[[Any], Tuple[str, str]], llm: LLM = None):
super().__init__(llm=llm)
self.prompt_fn = prompt_fn
def complete(self, inp: str, **kwargs) -> str:
inp, instruction = self.prompt_fn(inp)
return self.llm.edit(inp, instruction, **kwargs)
def parallel_complete(self, inps: List[Any]) -> List[str]:
prompts = []
instructions = []
for inp in inps:
prompt, instruction = self.prompt_fn(inp)
prompts.append(prompt)
instructions.append(instruction)
return self.llm.parallel_edit(prompts, instructions)
class InsertPrompter(Prompter):
def __init__(self, prompt_fn: Callable[[Any], Tuple[str, str, str]], llm: LLM = None):
super().__init__(llm=llm)
self.prompt_fn = prompt_fn
def _compile_prompt(self, inp: Any) -> Tuple[str, str, Union[str, None]]:
return self.prompt_fn(inp)

View file

@ -0,0 +1,34 @@
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers import GPT2TokenizerFast
gpt2_tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
def count_tokens(text: str) -> int:
return len(gpt2_tokenizer.encode(text))
prices = {
# All prices are per 1k tokens
"fine-tune-train": {
"davinci": 0.03,
"curie": 0.03,
"babbage": 0.0006,
"ada": 0.0004,
},
"completion": {
"davinci": 0.02,
"curie": 0.002,
"babbage": 0.0005,
"ada": 0.0004,
},
"fine-tune-completion": {
"davinci": 0.12,
"curie": 0.012,
"babbage": 0.0024,
"ada": 0.0016,
},
"embedding": {
"ada": 0.0004
}
}
def get_price(text: str, model: str="davinci", task: str="completion") -> float:
return count_tokens(text) * prices[task][model] / 1000

View file

@ -0,0 +1,35 @@
from pydantic import BaseModel, validator
from ..models.main import Traceback
class Observation(BaseModel):
pass
class TracebackObservation(Observation):
traceback: Traceback
class ValidatorObservation(Observation):
passed: bool
class UserInputObservation(Observation):
user_input: str
class DictObservation(Observation):
values: dict
def __getitem__(self, key):
return self.values[key]
class TextObservation(Observation):
text: str
@validator("text", pre=True, always=True)
def text_not_none(cls, v):
if v is None:
return ""
return v

View file

@ -0,0 +1,91 @@
from typing import List, Tuple, Type
from .steps.ty import CreatePipelineStep
from .core import Step, Validator, Policy, History
from .observation import Observation, TracebackObservation, UserInputObservation
from .steps.main import EditCodeStep, EditHighlightedCodeStep, SolveTracebackStep, RunCodeStep, FasterEditHighlightedCodeStep
from .steps.nate import WritePytestsStep, CreateTableStep
from .steps.chroma import AnswerQuestionChroma, EditFileChroma
class DemoPolicy(Policy):
ran_code_last: bool = False
cmd: str
def next(self, history: History) -> Step:
observation = history.last_observation()
if observation is not None and isinstance(observation, UserInputObservation):
# This could be defined with ObservationTypePolicy. Ergonomics not right though.
if " test" in observation.user_input.lower():
return WritePytestsStep(instructions=observation.user_input)
elif "/dlt" in observation.user_input.lower() or " dlt" in observation.user_input.lower():
return CreatePipelineStep()
elif "/table" in observation.user_input:
return CreateTableStep(sql_str=" ".join(observation.user_input.split(" ")[1:]))
elif "/ask" in observation.user_input:
return AnswerQuestionChroma(question=" ".join(observation.user_input.split(" ")[1:]))
elif "/edit" in observation.user_input:
return EditFileChroma(request=" ".join(observation.user_input.split(" ")[1:]))
return EditHighlightedCodeStep(user_input=observation.user_input)
state = history.get_current()
if state is None or not self.ran_code_last:
self.ran_code_last = True
return RunCodeStep(cmd=self.cmd)
if observation is not None and isinstance(observation, TracebackObservation):
self.ran_code_last = False
return SolveTracebackStep(traceback=observation.traceback)
else:
return None
class ObservationTypePolicy(Policy):
def __init__(self, base_policy: Policy, observation_type: Type[Observation], step_type: Type[Step]):
self.observation_type = observation_type
self.step_type = step_type
self.base_policy = base_policy
def next(self, history: History) -> Step:
observation = history.last_observation()
if observation is not None and isinstance(observation, self.observation_type):
return self.step_type(observation)
return self.base_policy.next(history)
class PolicyWrappedWithValidators(Policy):
"""Default is to stop, unless the validator tells what to do next"""
index: int
stage: int
def __init__(self, base_policy: Policy, pairs: List[Tuple[Validator, Type[Step]]]):
# Want to pass Type[Validator], or just the Validator? Question of where params are coming from.
self.pairs = pairs
self.index = len(pairs)
self.validating = 0
self.base_policy = base_policy
def next(self, history: History) -> Step:
if self.index == len(self.pairs):
self.index = 0
return self.base_policy.next(history)
if self.stage == 0:
# Running the validator at the current index for the first time
validator, step = self.pairs[self.index]
self.stage = 1
return validator
elif self.stage == 1:
# Previously ran the validator at the current index, now receiving its ValidatorObservation
observation = history.last_observation()
if observation.passed:
self.stage = 0
self.index += 1
if self.index == len(self.pairs):
self.index = 0
return self.base_policy.next(history)
else:
return self.pairs[self.index][0]
else:
_, step_type = self.pairs[self.index]
return step_type(observation)

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,62 @@
from textwrap import dedent
from typing import Coroutine, Union
from ...models.filesystem_edit import AddDirectory, AddFile
from ..observation import Observation, TextObservation
from ..core import Step, ContinueSDK
from .main import EditCodeStep, EditFileStep, RunCommandStep, WaitForUserConfirmationStep
from ..chroma.query import query_codebase_index
from .main import EditFileStep
class AnswerQuestionChroma(Step):
question: str
_answer: Union[str, None] = None
name: str = "Answer Question"
async def describe(self, llm) -> Coroutine[str, None, None]:
if self._answer is None:
return f"Answering the question: {self.question}"
else:
return self._answer
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
results = query_codebase_index(self.question)
code_snippets = ""
files = []
for node in results.source_nodes:
resource_name = list(node.node.relationships.values())[0]
filepath = resource_name[:resource_name.index("::")]
files.append(filepath)
code_snippets += f"""{filepath}```\n{node.node.text}\n```\n\n"""
prompt = dedent(f"""Here are a few snippets of code that might be useful in answering the question:
{code_snippets}
Here is the question to answer:
{self.question}
Here is the answer:""")
answer = sdk.llm.complete(prompt)
print(answer)
self._answer = answer
await sdk.ide.setFileOpen(files[0])
class EditFileChroma(Step):
request: str
hide: bool = True
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
results = query_codebase_index(self.request)
resource_name = list(
results.source_nodes[0].node.relationships.values())[0]
filepath = resource_name[:resource_name.index("::")]
await sdk.run_step(EditFileStep(filepath=filepath, prompt=f"Here is the code:\n\n{{code}}\n\nHere is the user request:\n\n{self.request}\n\nHere is the code after making the requested changes:\n"))

View file

@ -0,0 +1,18 @@
from ...core import ContinueSDK, Step
class ImplementAbstractMethodStep(Step):
name: str = "Implement abstract method for all subclasses"
method_name: str
class_name: str
async def run(self, sdk: ContinueSDK):
implementations = await sdk.lsp.go_to_implementations(self.class_name)
for implementation in implementations:
await sdk.edit_file(
range_in_files=[implementation.range_in_file],
prompt=f"Implement method `{self.method_name}` for this subclass of `{self.class_name}`",
)

View file

@ -0,0 +1,81 @@
from textwrap import dedent
from ....models.filesystem_edit import AddFile
from ...core import Step, ContinueSDK
from ..main import WaitForUserInputStep
class SetupPipelineStep(Step):
api_description: str # e.g. "I want to load data from the weatherapi.com API"
async def run(self, sdk: ContinueSDK):
source_name = sdk.llm.complete(
f"Write a snake_case name for the data source described by {self.api_description}: ").strip()
filename = f'{source_name}.py'
# running commands to get started when creating a new dlt pipeline
await sdk.run([
'python3 -m venv env',
'source env/bin/activate',
'pip install dlt',
'dlt init {source_name} duckdb',
'Y',
'pip install -r requirements.txt'
])
# editing the resource function to call the requested API
await sdk.edit_file(
filename=filename,
prompt=f'Edit the resource function to call the API described by this: {self.api_description}'
)
# wait for user to put API key in secrets.toml
await sdk.ide.setFileOpen(".dlt/secrets.toml")
await sdk.wait_for_user_confirmation("Please add the API key to the `secrets.toml` file and then press `Continue`")
return {"source_name": source_name}
class ValidatePipelineStep(Step):
async def run(self, sdk: ContinueSDK):
source_name = sdk.history.last_observation()["source_name"]
filename = f'{source_name}.py'
# test that the API call works
await sdk.run(f'python3 {filename}')
# remove exit() from the main main function
await sdk.edit_file(
filename=filename,
prompt='Remove exit() from the main function'
)
# load the data into the DuckDB instance
await sdk.run(f'python3 {filename}')
table_name = f"{source_name}.{source_name}_resource"
tables_query_code = dedent(f'''\
import duckdb
# connect to DuckDB instance
conn = duckdb.connect(database="{source_name}.duckdb")
# get table names
rows = conn.execute("SELECT * FROM {table_name};").fetchall()
# print table names
for row in rows:
print(row)
''')
await sdk.apply_filesystem_edit(AddFile(filepath='query.py', content=tables_query_code))
await sdk.run('env/bin/python3 query.py')
class CreatePipelineStep(Step):
async def run(self, sdk: ContinueSDK):
await sdk.run_step(
WaitForUserInputStep(prompt="What API do you want to load data from?") >>
SetupPipelineStep() >>
ValidatePipelineStep()
)

View file

@ -0,0 +1,48 @@
from textwrap import dedent
from ....models.filesystem_edit import AddFile
from ...core import Step, ContinueSDK
from ..main import WaitForUserInputStep, EditFileStep
class EditReduxStateStep(Step):
description: str # e.g. "I want to load data from the weatherapi.com API"
async def run(self, sdk: ContinueSDK):
# Find the right file to edit
# RootStore
store_filename = ""
sdk.run_step(
EditFileStep(
filename=store_filename,
prompt=f"Edit the root store to add a new slice for {self.description}"
)
)
store_file_contents = await sdk.ide.readFile(store_filename)
# Selector
selector_filename = ""
sdk.run_step(EditFileStep(
filepath=selector_filename,
prompt=f"Edit the selector to add a new property for {self.description}. The store looks like this: {store_file_contents}"
)
# Reducer
reducer_filename = ""
sdk.run_step(EditFileStep(
filepath=reducer_filename,
prompt=f"Edit the reducer to add a new property for {self.description}. The store looks like this: {store_file_contents}"
"""
Starts with implementing selector
1. RootStore
2. Selector
3. Reducer or entire slice
Need to first determine whether this is an:
1. edit
2. add new reducer and property in existing slice
3. add whole new slice
4. build redux from scratch
"""

View file

@ -0,0 +1,42 @@
from textwrap import dedent
from ...core import Step, ContinueSDK
class CreateTableStep(Step):
sql_str: str
name: str = "Create a table in TypeORM"
async def run(self, sdk: ContinueSDK):
# Write TypeORM entity
entity_name = self.sql_str.split(" ")[2].capitalize()
await sdk.edit_file(
f"src/entity/{entity_name}.ts",
dedent(f"""\
{self.sql_str}
Write a TypeORM entity called {entity_name} for this table, importing as necessary:""")
)
# Add entity to data-source.ts
await sdk.edit_file(filepath="src/data-source.ts", prompt=f"Add the {entity_name} entity:")
# Generate blank migration for the entity
out = await sdk.run(f"npx typeorm migration:create ./src/migration/Create{entity_name}Table")
migration_filepath = out.text.split(" ")[1]
# Wait for user input
await sdk.wait_for_user_confirmation("Fill in the migration?")
# Fill in the migration
await sdk.edit_file(
migration_filepath,
dedent(f"""\
This is the table that was created:
{self.sql_str}
Fill in the migration for the table:"""),
)
# Run the migration
await sdk.run("npx typeorm-ts-node-commonjs migration:run -d ./src/data-source.ts")

View file

@ -0,0 +1,345 @@
import time
from typing import Callable, Coroutine, List, Union
from ..llm import LLM
from ...models.main import Traceback, Range
from ...models.filesystem_edit import EditDiff, FileEdit
from ...models.filesystem import RangeInFile, RangeInFileWithContents
from ..observation import Observation, TextObservation
from ..llm.prompt_utils import MarkdownStyleEncoderDecoder
from textwrap import dedent
from ..core import History, Policy, Step, ContinueSDK, Observation
import subprocess
from ..util.traceback_parsers import parse_python_traceback
from ..observation import TracebackObservation
import json
class RunPolicyUntilDoneStep(Step):
policy: "Policy"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
next_step = self.policy.next(sdk.history)
while next_step is not None:
observation = await sdk.run_step(next_step)
next_step = self.policy.next(sdk.history)
return observation
class RunCommandStep(Step):
cmd: str
name: str = "Run command"
_description: str = None
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
if self._description is not None:
return self._description
return self.cmd
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
cwd = await sdk.ide.getWorkspaceDirectory()
result = subprocess.run(
self.cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
stdout = result.stdout.decode("utf-8")
stderr = result.stderr.decode("utf-8")
print(stdout, stderr)
# If it fails, return the error
if result.returncode != 0:
return TextObservation(text=stderr)
else:
return TextObservation(text=stdout)
class WaitForUserInputStep(Step):
prompt: str
name: str = "Waiting for user input"
_description: Union[str, None] = None
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return self.prompt
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
self._description = self.prompt
resp = await sdk.wait_for_user_input()
return TextObservation(text=resp)
class WaitForUserConfirmationStep(Step):
prompt: str
name: str = "Waiting for user confirmation"
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return self.prompt
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
self._description = self.prompt
resp = await sdk.wait_for_user_input()
return TextObservation(text=resp)
class RunCodeStep(Step):
cmd: str
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return f"Ran command: `{self.cmd}`"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
result = subprocess.run(
self.cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout = result.stdout.decode("utf-8")
stderr = result.stderr.decode("utf-8")
print(stdout, stderr)
# If it fails, return the error
tb = parse_python_traceback(stdout) or parse_python_traceback(stderr)
if tb:
return TracebackObservation(traceback=tb)
else:
self.hide = True
return None
class EditCodeStep(Step):
# Might make an even more specific atomic step, which is "apply file edit"
range_in_files: List[RangeInFile]
prompt: str # String with {code} somewhere
name: str = "Edit code"
_edit_diffs: Union[List[EditDiff], None] = None
_prompt: Union[str, None] = None
_completion: Union[str, None] = None
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
if self._edit_diffs is None:
return "Editing files: " + ", ".join(map(lambda rif: rif.filepath, self.range_in_files))
elif len(self._edit_diffs) == 0:
return "No edits made"
else:
return llm.complete(dedent(f"""{self._prompt}{self._completion}
Maximally concise summary of changes in bullet points (can use markdown):
"""))
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
rif_with_contents = []
for range_in_file in self.range_in_files:
file_contents = await sdk.ide.readRangeInFile(range_in_file)
rif_with_contents.append(
RangeInFileWithContents.from_range_in_file(range_in_file, file_contents))
enc_dec = MarkdownStyleEncoderDecoder(rif_with_contents)
code_string = enc_dec.encode()
prompt = self.prompt.format(code=code_string)
completion = sdk.llm.complete(prompt)
# Temporarily doing this to generate description.
self._prompt = prompt
self._completion = completion
file_edits = enc_dec.decode(completion)
self._edit_diffs = []
for file_edit in file_edits:
diff = await sdk.apply_filesystem_edit(file_edit)
self._edit_diffs.append(diff)
for filepath in set([file_edit.filepath for file_edit in file_edits]):
await sdk.ide.saveFile(filepath)
await sdk.ide.setFileOpen(filepath)
return None
class EditFileStep(Step):
filepath: str
prompt: str
hide: bool = True
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return "Editing file: " + self.filepath
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
file_contents = await sdk.ide.readFile(self.filepath)
await sdk.run_step(EditCodeStep(
range_in_files=[RangeInFile.from_entire_file(
self.filepath, file_contents)],
prompt=self.prompt
))
class FasterEditHighlightedCodeStep(Step):
user_input: str
hide = True
_completion: str = "Edit Code"
_edit_diffs: Union[List[EditDiff], None] = None
_prompt: str = dedent("""Below is the code before changes:
{code}
This is the user request:
{user_input}
Edit the code to perfectly satifsfy the user request. Format the changes you want to make as a comma-separated array of JSON objects of the form:
{{
"edits": [{{
"filepath": <FILEPATH>,
"replace_me": <CODE_TO_REPLACE>,
"replace_with": <CODE_TO_REPLACE_WITH>
}}]
}}
For example, if you want to replace the code `x = 1` with `x = 2` in main.py, you would write:
{{
"edits": [{{
"filepath": "main.py",
"replace_me": "x = 1",
"replace_with": "x = 2"
}}]
}}
If you wanted to delete the code `def sum(a, b):\\n return a + b` in main.py, you would write:
{{
"edits": [{{
"filepath": "main.py",
"replace_me": "def sum(a, b):\\n return a + b",
"replace_with": ""
}}]
}}
Respond with only as many edits as needed, and output only the list of json objects, no other text.
""")
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return "Editing highlighted code"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
range_in_files = await sdk.ide.getHighlightedCode()
if len(range_in_files) == 0:
# Get the full contents of all open files
files = await sdk.ide.getOpenFiles()
contents = {}
for file in files:
contents[file] = await sdk.ide.readFile(file)
range_in_files = [RangeInFile.from_entire_file(
filepath, content) for filepath, content in contents.items()]
rif_with_contents = []
for range_in_file in range_in_files:
file_contents = await sdk.ide.readRangeInFile(range_in_file)
rif_with_contents.append(
RangeInFileWithContents.from_range_in_file(range_in_file, file_contents))
enc_dec = MarkdownStyleEncoderDecoder(rif_with_contents)
code_string = enc_dec.encode()
prompt = self._prompt.format(
code=code_string, user_input=self.user_input)
rif_dict = {}
for rif in rif_with_contents:
rif_dict[rif.filepath] = rif.contents
completion = sdk.llm.complete(prompt)
# Temporarily doing this to generate description.
self._prompt = prompt
self._completion = completion
# ALTERNATIVE DECODING STEP HERE
file_edits = []
obj = json.loads(completion.strip())
for edit in obj["edits"]:
filepath = edit["filepath"]
replace_me = edit["replace_me"]
replace_with = edit["replace_with"]
file_edits.append(
FileEdit(filepath=filepath, range=Range.from_snippet_in_file(content=rif_dict[filepath], snippet=replace_me), replacement=replace_with))
# ------------------------------
self._edit_diffs = []
for file_edit in file_edits:
diff = await sdk.apply_filesystem_edit(file_edit)
self._edit_diffs.append(diff)
for filepath in set([file_edit.filepath for file_edit in file_edits]):
await sdk.ide.saveFile(filepath)
await sdk.ide.setFileOpen(filepath)
return None
class EditHighlightedCodeStep(Step):
user_input: str
hide = True
_prompt: str = dedent("""Below is the code before changes:
{code}
This is the user request:
{user_input}
This is the code after being changed to perfectly satisfy the user request:
""")
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return "Editing highlighted code"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
range_in_files = await sdk.ide.getHighlightedCode()
if len(range_in_files) == 0:
# Get the full contents of all open files
files = await sdk.ide.getOpenFiles()
contents = {}
for file in files:
contents[file] = await sdk.ide.readFile(file)
range_in_files = [RangeInFile.from_entire_file(
filepath, content) for filepath, content in contents.items()]
await sdk.run_step(EditCodeStep(
range_in_files=range_in_files, prompt=self._prompt.format(code="{code}", user_input=self.user_input)))
class FindCodeStep(Step):
prompt: str
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return "Finding code"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
return await sdk.ide.getOpenFiles()
class UserInputStep(Step):
user_input: str
class SolveTracebackStep(Step):
traceback: Traceback
async def describe(self, llm: LLM) -> Coroutine[str, None, None]:
return f"```\n{self.traceback.full_traceback}\n```"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
prompt = dedent("""I ran into this problem with my Python code:
{traceback}
Below are the files that might need to be fixed:
{code}
This is what the code should be in order to avoid the problem:
""").format(traceback=self.traceback.full_traceback, code="{code}")
range_in_files = []
for frame in self.traceback.frames:
content = await sdk.ide.readFile(frame.filepath)
range_in_files.append(
RangeInFile.from_entire_file(frame.filepath, content))
await sdk.run_step(EditCodeStep(
range_in_files=range_in_files, prompt=prompt))
return None

View file

@ -0,0 +1,26 @@
# When an edit is made to an existing class or a new sqlalchemy class is created,
# this should be kicked off.
from ...models.filesystem import RangeInFile
from .main import EditCodeStep, RunCommandStep
from ..core import Step
class MigrationStep(Step):
name: str = "Create and run an alembic migration."
edited_file: str
async def run(self, sdk):
recent_edits = await sdk.ide.get_recent_edits(self.edited_file)
recent_edits_string = "\n\n".join(
map(lambda x: x.to_string(), recent_edits))
description = await sdk.llm.complete(f"{recent_edits_string}\n\nGenerate a short description of the migration made in the above changes:\n")
await sdk.run_step(RunCommandStep(cmd=f"cd libs && poetry run alembic revision --autogenerate -m {description}"))
migration_file = f"libs/alembic/versions/{?}.py"
contents = await sdk.ide.readFile(migration_file)
await sdk.run_step(EditCodeStep(
range_in_files=[RangeInFile.from_entire_file(migration_file, contents)],
prompt=f"Here are the changes made to the sqlalchemy classes:\n\n{recent_edits_string}\n\nThis is the generated migration file:\n\n{{code}}\n\nReview the migration file to make sure it correctly reflects the changes made to the sqlalchemy classes.",
))
await sdk.run_step(RunCommandStep(cmd="cd libs && poetry run alembic upgrade head"))

View file

@ -0,0 +1,215 @@
import asyncio
from textwrap import dedent
import time
from typing import Coroutine, Union
from ...models.main import Range
from ...models.filesystem import RangeInFile
from ...models.filesystem_edit import AddDirectory, AddFile
from ..observation import Observation, TextObservation
from ..core import Step, ContinueSDK
from .main import EditCodeStep, EditFileStep, RunCommandStep, WaitForUserConfirmationStep
import os
class WritePytestsStep(Step):
for_filepath: Union[str, None] = None
instructions: str = "Write unit tests for this file."
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
if self.for_filepath is None:
self.for_filepath = (await sdk.ide.getOpenFiles())[0]
filename = os.path.basename(self.for_filepath)
dirname = os.path.dirname(self.for_filepath)
path_dir = os.path.join(dirname, "tests")
if not os.path.exists(path_dir):
await sdk.apply_filesystem_edit(AddDirectory(path=path_dir))
path = os.path.join(path_dir, f"test_{filename}")
if os.path.exists(path):
return None
for_file_contents = await sdk.ide.readFile(self.for_filepath)
prompt = dedent(f"""This is the file you will write unit tests for:
```python
{for_file_contents}
```
Here are additional instructions:
"{self.instructions}"
Here is a complete set of pytest unit tests:
""")
# tests = sdk.llm.complete(prompt)
tests = '''
import pytest
from ..calculator import Calculator
@pytest.fixture
def calculator():
return Calculator()
def test_add(calculator):
assert calculator.add(2, 3) == 5
assert calculator.add(10, -2) == 8
assert calculator.add(0, 0) == 0
def test_sub(calculator):
assert calculator.sub(2, 3) == -1
assert calculator.sub(10, -2) == 12
assert calculator.sub(0, 0) == 0
def test_mul(calculator):
assert calculator.mul(2, 3) == 6
assert calculator.mul(10, -2) == -20
assert calculator.mul(0, 0) == 0
def test_div(calculator):
assert calculator.div(2, 3) == 0.6666666666666666
assert calculator.div(10, -2) == -5
assert calculator.div(0, 1) == 0
def test_exp(calculator):
assert calculator.exp(2, 3) == 8
assert calculator.exp(10, -2) == 0.01
assert calculator.exp(0, 0) == 1
'''
time.sleep(3.5)
await sdk.apply_filesystem_edit(AddFile(filepath=path, content=tests))
return None
class CreatePyplot(Step):
# Wish there was a way to add import, specify dependency
name: str = "Create a pyplot"
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
code = dedent("""import matplotlib.pyplot as plt
import numpy as np
{instructions}
plt.xlabel("{x_label}")
plt.ylabel("{y_label}")
plt.title("{title}")
plt.show()
""")
class ImplementAbstractMethodStep(Step):
name: str = "Implement abstract method for all subclasses"
method_name: str = "def walk(self, path: str) -> List[str]"
class_name: str = "FileSystem"
async def run(self, sdk: ContinueSDK):
await sdk.run_step(WaitForUserConfirmationStep(prompt="Detected new abstract method. Implement in all subclasses?"))
implementations = []
for filepath in ["/Users/natesesti/Desktop/continue/extension/examples/python/filesystem/real.py", "/Users/natesesti/Desktop/continue/extension/examples/python/filesystem/virtual.py"]:
contents = await sdk.ide.readFile(filepath)
implementations.append(
RangeInFile.from_entire_file(filepath, contents))
for implementation in implementations:
await sdk.run_step(EditCodeStep(
range_in_files=[implementation],
prompt=f"{{code}}\nRewrite the class, implementing the method `{self.method_name}`.\n",
))
class CreateTableStep(Step):
sql_str: str
name: str = "Create a table"
hide = True
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
# Write the TypeORM entity
entity_name = "Order"
orm_entity = '''import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity()
export class Order {
@PrimaryGeneratedColumn()
order_id: number;
@Column()
customer_id: number;
@Column()
order_date: Date;
@Column()
order_total: number;
@Column()
shipping_address: string;
@Column()
billing_address: string;
@Column()
payment_method: string;
@Column()
order_status: string;
@Column()
tracking_number: string;
}'''
time.sleep(2)
# orm_entity = sdk.llm.complete(
# f"{self.sql_str}\n\nWrite a TypeORM entity called {entity_name} for this table, importing as necessary:")
# sdk.llm.complete("What is the name of the entity?")
await sdk.apply_filesystem_edit(AddFile(filepath=f"/Users/natesesti/Desktop/continue/extension/examples/python/MyProject/src/entity/{entity_name}.ts", content=orm_entity))
await sdk.ide.setFileOpen(f"/Users/natesesti/Desktop/continue/extension/examples/python/MyProject/src/entity/{entity_name}.ts", True)
# Add entity to data-source.ts
await sdk.run_step(EditFileStep(
filepath=f"/Users/natesesti/Desktop/continue/extension/examples/python/MyProject/src/data-source.ts",
prompt=f"{{code}}\nAdd the {entity_name} entity:\n",
))
# Generate blank migration for the entity
obs: TextObservation = await sdk.run_step(RunCommandStep(
cmd=f"npx typeorm migration:create ./src/migration/Create{entity_name}Table"
))
migration_filepath = obs.text.split(" ")[1]
# Wait for user input
await sdk.run_step(WaitForUserConfirmationStep(prompt="Fill in the migration?"))
# Fill in the migration
await sdk.run_step(EditFileStep(
filepath=migration_filepath,
prompt=f"{{code}}\nThis is the table that was created:\n{self.sql_str}\n\nFill in the migration for the table:\n",
))
# Run the migration
command_step = RunCommandStep(
cmd=f"""sqlite3 database.sqlite 'CREATE TABLE orders (
order_id SERIAL PRIMARY KEY,
customer_id INTEGER,
order_date DATE,
order_total NUMERIC,
shipping_address TEXT,
billing_address TEXT,
payment_method TEXT,
order_status TEXT,
tracking_number TEXT
);'"""
)
command_step._description = "npx typeorm-ts-node-commonjs migration:run -d ./src/data-source.ts"
await sdk.run_step(command_step)

View file

@ -0,0 +1,37 @@
from textwrap import dedent
from ...models.filesystem_edit import AddDirectory, AddFile
from ..core import Step, ContinueSDK
import os
class WritePytestsStep(Step):
for_filepath: str
async def run(self, sdk: ContinueSDK):
filename, dirname = os.path.split(self.for_filepath)
path_dir = os.path.join(dirname, "tests")
if not os.path.exists(path_dir):
await sdk.apply_filesystem_edit(AddDirectory(path=path_dir))
path = os.path.join(path_dir, f"test_{filename}")
if os.path.exists(path):
return
for_file_contents = await sdk.ide.readFile(self.for_filepath)
prompt = dedent(f"""\
This is the file you will write unit tests for:
```python
{for_file_contents}
```
Here are additional instructions:
"{self.instructions}"
Here is a complete set of pytest unit tests:
""")
tests = sdk.llm.complete(prompt)
await sdk.apply_filesystem_edit(AddFile(filepath=path, content=tests))

View file

@ -0,0 +1,153 @@
import subprocess
from ...models.main import Position, Range
from ...models.filesystem import RangeInFile
from ...models.filesystem_edit import AddDirectory, AddFile, FileEdit
from ..observation import DictObservation
from ..core import History, Step, ContinueSDK, Policy
from .main import EditCodeStep, RunCommandStep, WaitForUserInputStep, WaitForUserConfirmationStep
source_name = "weather_api"
class SetupPipelineStep(Step):
name = "Setup Pipeline"
api_description: str # e.g. "I want to load data from the weatherapi.com API"
async def run(self, sdk: ContinueSDK):
# source_name = sdk.llm.complete(
# f"Write a snake_case name for the data source described by {self.api_description}: ").strip()
filename = f'/Users/natesesti/Desktop/continue/extension/examples/python/{source_name}.py'
# running commands to get started when creating a new dlt pipeline
process = subprocess.Popen(
'/bin/bash', stdin=subprocess.PIPE, stdout=subprocess.PIPE)
out, err = process.communicate(f'''
cd /Users/natesesti/Desktop/continue/extension/examples/python && python3 -m venv env && source env/bin/activate && pip install dlt && dlt init {source_name} duckdb
Y
pip install -r requirements.txt && pip install dlt[duckdb]'''.encode())
process = subprocess.Popen(
'/bin/bash', stdin=subprocess.PIPE, stdout=subprocess.PIPE)
out, err = process.communicate(
f'''cd /Users/natesesti/Desktop/continue/extension/examples/python && source env/bin/activate && pip install -r requirements.txt'''.encode())
# await sdk.run_step(
# RunCommandStep(cmd="cd /Users/natesesti/Desktop/continue/extension/examples/python") >>
# RunCommandStep(cmd=f'python3 -m venv env') >>
# RunCommandStep(cmd=f'source env/bin/activate') >>
# RunCommandStep(cmd=f'pip install dlt') >>
# RunCommandStep(cmd=f'dlt init {source_name} duckdb') >>
# RunCommandStep(cmd=f'pip install -r requirements')
# )
# editing the resource function to call the requested API
await sdk.ide.setFileOpen(filename)
contents = await sdk.ide.readFile(filename)
await sdk.run_step(EditCodeStep(
range_in_files=[RangeInFile.from_entire_file(filename, contents)],
prompt=f'{{code}}\n\nRewrite the entire file, editing the resource function to call the API described by this: {self.api_description}'
))
# wait for user to put API key in secrets.toml
await sdk.ide.setFileOpen("/Users/natesesti/Desktop/continue/extension/examples/python/.dlt/secrets.toml")
await sdk.run_step(WaitForUserConfirmationStep(prompt=f"Please add the API key to the `secrets.toml` file and then press `Continue`"))
return DictObservation(values={"source_name": source_name})
class ValidatePipelineStep(Step):
name = "Validate Pipeline"
async def run(self, sdk: ContinueSDK):
# source_name = sdk.history.last_observation()["source_name"]
filename = f'/Users/natesesti/Desktop/continue/extension/examples/python/{source_name}.py'
# test that the API call works
await sdk.run_step(RunCommandStep(cmd=f'env/bin/python3 weather_api.py'))
# TODO: validate that the response code is 200 (i.e. successful) else loop
# remove exit() from the main main function
await sdk.ide.setFileOpen(filename)
contents = await sdk.ide.readFile(filename)
new_contents = contents.replace('exit()', '')
await sdk.apply_filesystem_edit(FileEdit(filepath=filename, range=Range.from_entire_file(contents), replacement=new_contents))
await sdk.ide.saveFile(filename)
# await sdk.run_step(EditCodeStep(
# range_in_files=[RangeInFile.from_entire_file(filename)],
# prompt=f'Remove exit() from the main function'
# ))
# test that dlt loads the data into the DuckDB instance
await sdk.run_step(RunCommandStep(cmd=f'env/bin/python3 weather_api.py'))
# TODO: validate that `dlt` outputted success via print(load_info) else loop
# write Python code in `query.py` that queries the DuckDB instance to validate it worked
query_filename = '/Users/natesesti/Desktop/continue/extension/examples/python/query.py'
names_query_code = '''
import duckdb
# Connect to the DuckDB instance
con = duckdb.connect('weather.duckdb')
# Query the schema_name.table_name
result = conn.execute("SELECT table_schema || '.' || table_name FROM information_schema.tables WHERE table_schema NOT IN ('information_schema', 'pg_catalog')").fetchall()
# Print the schema_name.table_name(s) to stdout
for r in result:
print(r[0])
'''
# await sdk.apply_filesystem_edit(FileEdit.from_insertion(
# filepath=query_filename,
# position=Position(line=0, character=0),
# content=names_query_code
# ))
# await sdk.run_step(RunCommandStep(cmd=f'env/bin/python3 query.py'))
# TODO: replace with code that grabs all non-dlt `schema_name.table_name`s outputted by previous query
table_name = "weather_api.weather_api_resource"
tables_query_code = f'''
import duckdb
# connect to DuckDB instance
conn = duckdb.connect(database="weather.duckdb")
# get table names
rows = conn.execute("SELECT * FROM {table_name};").fetchall()
# print table names
for row in rows:
print(row)
'''
await sdk.apply_filesystem_edit(AddFile(filepath=query_filename, content=tables_query_code))
await sdk.ide.setFileOpen(query_filename)
# await sdk.apply_filesystem_edit(FileEdit(filepath=query_filename, replacement=tables_query_code,
# range=Range.from_entire_file(content=names_query_code)))
await sdk.run_step(RunCommandStep(cmd=f'env/bin/python3 query.py'))
class CreatePipelinePolicy(Policy):
_current_state: str = "init"
def next(self, history: History = History.from_empty()) -> "Step":
if self._current_state == "init":
self._current_state = "setup"
return WaitForUserInputStep(prompt="What API do you want to load data from?")
elif self._current_state == "setup":
self._current_state = "validate"
return SetupPipelineStep()
elif self._current_state == "validate":
self._current_state = "done"
return ValidatePipelineStep()
else:
return None
class CreatePipelineStep(Step):
async def run(self, sdk: ContinueSDK):
await sdk.run_step(
WaitForUserInputStep(prompt="What API do you want to load data from?") >>
SetupPipelineStep(api_description="Load data from the WeatherAPI.com API") >>
ValidatePipelineStep()
)

View file

@ -0,0 +1,127 @@
import os
from pathlib import Path
from typing import Iterable, List, Union
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
from ..models.main import FileEdit, DeleteDirectory, DeleteFile, AddDirectory, AddFile, FileSystemEdit, Position, Range, RenameFile, RenameDirectory, SequentialFileSystemEdit
from ..models.filesystem import FileSystem
from ..libs.main import Agent
from ..libs.map_path import map_path
from ..libs.steps.main import ManualEditAction
import shutil
import difflib
def create_copy(orig_root: str, copy_root: str = None, ignore: Iterable[str] = []):
# TODO: Make ignore a spec, like .gitignore
if copy_root is None:
copy_root = Path(orig_root) / ".continue-copy"
ignore.append(str(copy_root))
ignore = set(ignore)
os.mkdir(copy_root)
# I think you're messing up a lot of absolute paths here
for child in os.listdir():
if os.path.isdir(child):
if child not in ignore:
os.mkdir(map_path(child))
create_copy(Path(orig_root) / child,
Path(copy_root) / child, ignore)
else:
os.symlink(child, map_path(child))
else:
if child not in ignore:
shutil.copyfile(child, map_path(child))
else:
os.symlink(child, map_path(child))
def calculate_diff(filepath: str, original: str, updated: str) -> List[FileEdit]:
s = difflib.SequenceMatcher(None, original, updated)
offset = 0 # The indices are offset by previous deletions/insertions
edits = []
for tag, i1, i2, j1, j2 in s.get_opcodes():
i1, i2, j1, j2 = i1 + offset, i2 + offset, j1 + offset, j2 + offset
replacement = updated[j1:j2]
if tag == "equal":
pass
elif tag == "delete":
edits.append(FileEdit.from_deletion(
filepath, Range.from_indices(original, i1, i2)))
offset -= i2 - i1
elif tag == "insert":
edits.append(FileEdit.from_insertion(
filepath, Position.from_index(original, i1), replacement))
offset += j2 - j1
elif tag == "replace":
edits.append(FileEdit(filepath, Range.from_indices(
original, i1, i2), replacement))
offset += (j2 - j1) - (i2 + i1)
else:
raise Exception("Unexpected difflib.SequenceMatcher tag: " + tag)
return edits
# The whole usage of watchdog here should only be specific to RealFileSystem, you want to have a different "Observer" class for VirtualFileSystem, which would depend on being sent notifications
class CopyCodebaseEventHandler(PatternMatchingEventHandler):
def __init__(self, ignore_directories: List[str], ignore_patterns: List[str], agent: Agent, orig_root: str, copy_root: str, filesystem: FileSystem):
super().__init__(ignore_directories=ignore_directories, ignore_patterns=ignore_patterns)
self.agent = agent
self.orig_root = orig_root
self.copy_root = copy_root
self.filesystem = filesystem
# For now, we'll just make the update immediately, but eventually need to sync with agent.
# It should be the agent that makes the update right? It's just another action, everything comes from a single stream.
def _event_to_edit(self, event) -> Union[FileSystemEdit, None]:
# NOTE: You'll need to map paths to create both an action within the copy filesystem (the one you take) and one in the original fileystem (the one you'll record and allow the user to accept). Basically just need a converter built in to the FileSystemEdit class
src = event.src_path()
if event.is_directory:
if event.event_type == "moved":
return RenameDirectory(src, event.dest_path())
elif event.event_type == "deleted":
return DeleteDirectory(src)
elif event.event_type == "created":
return AddDirectory(src)
else:
if event.event_type == "moved":
return RenameFile(src, event.dest_path())
elif event.event_type == "deleted":
return DeleteFile(src)
elif event.event_type == "created":
contents = self.filesystem.read(src)
# Unclear whether it will always pass a "modified" event right after if something like echo "abc" > newfile.txt happens
return AddFile(src, contents)
elif event.event_type == "modified":
# Watchdog doesn't pass the contents or edit, so have to get it myself and diff
updated = self.filesystem.read(src)
copy_filepath = map_path(src, self.orig_root, self.copy_root)
old = self.filesystem.read(copy_filepath)
edits = calculate_diff(src, updated, old)
return SequentialFileSystemEdit(edits)
return None
def on_any_event(self, event):
edit = self._event_to_edit(event)
if edit is None:
return
edit = edit.with_mapped_paths(self.orig_root, self.copy_root)
action = ManualEditAction(edit)
self.agent.act(action)
def maintain_copy_workspace(agent: Agent, filesystem: FileSystem, orig_root: str, copy_root: str):
observer = Observer()
event_handler = CopyCodebaseEventHandler(
[".git"], [], agent, orig_root, copy_root, filesystem)
observer.schedule(event_handler, orig_root, recursive=True)
observer.start()
try:
while observer.isAlive():
observer.join(1)
finally:
observer.stop()
observer.join()

View file

@ -0,0 +1,16 @@
from pathlib import Path
def map_path(path: str, orig_root: str, copy_root: str) -> Path:
path = Path(path)
if path.is_relative_to(orig_root):
if path.is_absolute():
return Path(copy_root) / path.relative_to(orig_root)
else:
return path
else:
if path.is_absolute():
return path
else:
# For this one, you need to know the directory from which the relative path is being used.
return Path(orig_root) / path

View file

@ -0,0 +1,17 @@
import asyncio
from typing import Dict
class AsyncSubscriptionQueue:
# The correct way to do this is probably to keep request IDs
queues: Dict[str, asyncio.Queue] = {}
def post(self, messageType: str, data: any):
if messageType not in self.queues:
self.queues.update({messageType: asyncio.Queue()})
self.queues[messageType].put_nowait(data)
async def get(self, message_type: str) -> any:
if message_type not in self.queues:
self.queues.update({message_type: asyncio.Queue()})
return await self.queues[message_type].get()

View file

@ -0,0 +1,24 @@
from typing import Union
from ...models.main import Traceback
from boltons import tbutils
def sort_func(items):
"""Sort a list of items."""
return sorted(items)
def parse_python_traceback(stdout: str) -> Union[Traceback, None]:
"""Parse a python traceback from stdout."""
# Sometimes paths are not quoted, but they need to be
if "File \"" not in stdout:
stdout = stdout.replace("File ", "File \"").replace(
", line ", "\", line ")
try:
tbutil_parsed_exc = tbutils.ParsedException.from_string(stdout)
return Traceback.from_tbutil_parsed_exc(tbutil_parsed_exc)
except Exception:
return None

View file

@ -0,0 +1,328 @@
from abc import ABC, abstractmethod
from typing import Dict, List, Tuple
import os
from ..models.main import Position, Range, AbstractModel
from pydantic import BaseModel
from .filesystem_edit import FileSystemEdit, FileEdit, AddFile, DeleteFile, RenameDirectory, RenameFile, AddDirectory, DeleteDirectory, EditDiff, SequentialFileSystemEdit
class RangeInFile(BaseModel):
filepath: str
range: Range
def __hash__(self):
return hash((self.filepath, self.range))
@staticmethod
def from_entire_file(filepath: str, content: str) -> "RangeInFile":
range = Range.from_entire_file(content)
return RangeInFile(
filepath=filepath,
range=range
)
class RangeInFileWithContents(RangeInFile):
contents: str
def __hash__(self):
return hash((self.filepath, self.range, self.contents))
@staticmethod
def from_entire_file(filepath: str, content: str) -> "RangeInFileWithContents":
lines = content.splitlines()
return RangeInFileWithContents(
filepath=filepath,
range=Range.from_shorthand(
0, 0, len(lines) - 1, len(lines[-1]) - 1),
contents=content
)
@staticmethod
def from_range_in_file(rif: RangeInFile, content: str) -> "RangeInFileWithContents":
return RangeInFileWithContents(
filepath=rif.filepath,
range=rif.range,
contents=content
)
class FileSystem(AbstractModel):
"""An abstract filesystem that can read/write from a set of files."""
@abstractmethod
def read(self, path) -> str:
raise NotImplementedError
@abstractmethod
def readlines(self, path) -> List[str]:
raise NotImplementedError
@abstractmethod
def write(self, path, content):
raise NotImplementedError
@abstractmethod
def exists(self, path) -> bool:
raise NotImplementedError
@abstractmethod
def read_range_in_file(self, r: RangeInFile) -> str:
raise NotImplementedError
@abstractmethod
def rename_file(self, filepath: str, new_filepath: str):
raise NotImplementedError
@abstractmethod
def rename_directory(self, path: str, new_path: str):
raise NotImplementedError
@abstractmethod
def delete_file(self, filepath: str):
raise NotImplementedError
@abstractmethod
def delete_directory(self, path: str):
raise NotImplementedError
@abstractmethod
def add_directory(self, path: str):
raise NotImplementedError
@abstractmethod
def apply_file_edit(self, edit: FileEdit) -> EditDiff:
raise NotImplementedError
@abstractmethod
def apply_edit(self, edit: FileSystemEdit) -> EditDiff:
"""Apply edit to filesystem, calculate the reverse edit, and return and EditDiff"""
raise NotImplementedError
@classmethod
def read_range_in_str(self, s: str, r: Range) -> str:
lines = s.splitlines()[r.start.line:r.end.line + 1]
if len(lines) == 0:
return ""
lines[0] = lines[0][r.start.character:]
lines[-1] = lines[-1][:r.end.character + 1]
return "\n".join(lines)
@classmethod
def apply_edit_to_str(cls, s: str, edit: FileEdit) -> Tuple[str, EditDiff]:
original = cls.read_range_in_str(s, edit.range)
# Split lines and deal with some edge cases (could obviously be nicer)
lines = s.splitlines()
if s.startswith("\n"):
lines.insert(0, "")
if s.endswith("\n"):
lines.append("")
if len(lines) == 0:
lines = [""]
end = Position(line=edit.range.end.line,
character=edit.range.end.character)
if edit.range.end.line == len(lines) and edit.range.end.character == 0:
end = Position(line=edit.range.end.line - 1,
character=len(lines[min(len(lines) - 1, edit.range.end.line - 1)]))
before_lines = lines[:edit.range.start.line]
after_lines = lines[end.line + 1:]
between_str = lines[min(len(lines) - 1, edit.range.start.line)][:edit.range.start.character] + \
edit.replacement + \
lines[min(len(lines) - 1, end.line)][end.character + 1:]
new_range = Range(
start=edit.range.start,
end=Position(
line=edit.range.start.line +
len(edit.replacement.splitlines()) - 1,
character=edit.range.start.character +
len(edit.replacement.splitlines()
[-1]) if edit.replacement != "" else 0
)
)
lines = before_lines + between_str.splitlines() + after_lines
return "\n".join(lines), EditDiff(
forward=edit,
backward=FileEdit(
filepath=edit.filepath,
range=new_range,
replacement=original
)
)
def reverse_edit_on_str(self, s: str, diff: EditDiff) -> str:
lines = s.splitlines()
replacement_lines = diff.replacement.splitlines()
replacement_d_lines = len(replacement_lines)
replacement_d_chars = len(replacement_lines[-1])
replacement_range = Range(
start=diff.edit.range.start,
end=Position(
line=diff.edit.range.start + replacement_d_lines,
character=diff.edit.range.start.character + replacement_d_chars
)
)
before_lines = lines[:replacement_range.start.line]
after_lines = lines[replacement_range.end.line + 1:]
between_str = lines[replacement_range.start.line][:replacement_range.start.character] + \
diff.original + \
lines[replacement_range.end.line][replacement_range.end.character + 1:]
lines = before_lines + between_str.splitlines() + after_lines
return "\n".join(lines)
def apply_edit(self, edit: FileSystemEdit) -> EditDiff:
backward = None
if isinstance(edit, FileEdit):
diff = self.apply_file_edit(edit)
backward = diff.backward
elif isinstance(edit, AddFile):
self.write(edit.filepath, edit.content)
backward = DeleteFile(edit.filepath)
elif isinstance(edit, DeleteFile):
contents = self.read(edit.filepath)
backward = AddFile(edit.filepath, contents)
self.delete_file(edit.filepath)
elif isinstance(edit, RenameFile):
self.rename_file(edit.filepath, edit.new_filepath)
backward = RenameFile(filepath=edit.new_filepath,
new_filepath=edit.filepath)
elif isinstance(edit, AddDirectory):
self.add_directory(edit.path)
backward = DeleteDirectory(edit.path)
elif isinstance(edit, DeleteDirectory):
# This isn't atomic!
backward_edits = []
for root, dirs, files in os.walk(edit.path, topdown=False):
for f in files:
path = os.path.join(root, f)
backward_edits.append(self.apply_edit(DeleteFile(path)))
for d in dirs:
path = os.path.join(root, d)
backward_edits.append(
self.apply_edit(DeleteDirectory(path)))
backward_edits.append(self.apply_edit(DeleteDirectory(edit.path)))
backward_edits.reverse()
backward = SequentialFileSystemEdit(edits=backward_edits)
elif isinstance(edit, RenameDirectory):
self.rename_directory(edit.path, edit.new_path)
backward = RenameDirectory(path=edit.new_path, new_path=edit.path)
elif isinstance(edit, FileSystemEdit):
backward_edits = []
for edit in edit.next_edit():
backward_edits.append(self.apply_edit(edit))
backward_edits.reverse()
backward = SequentialFileSystemEdit(edits=backward_edits)
else:
raise TypeError("Unknown FileSystemEdit type: " + str(type(edit)))
return EditDiff(
forward=edit,
backward=backward
)
class RealFileSystem(FileSystem):
"""A filesystem that reads/writes from the actual filesystem."""
def read(self, path) -> str:
with open(path, "r") as f:
return f.read()
def readlines(self, path) -> List[str]:
with open(path, "r") as f:
return f.readlines()
def write(self, path, content):
with open(path, "w") as f:
f.write(content)
def exists(self, path) -> bool:
return os.path.exists(path)
def read_range_in_file(self, r: RangeInFile) -> str:
return FileSystem.read_range_in_str(self.read(r.filepath), r.range)
def rename_file(self, filepath: str, new_filepath: str):
os.rename(filepath, new_filepath)
def rename_directory(self, path: str, new_path: str):
os.rename(path, new_path)
def delete_file(self, filepath: str):
os.remove(filepath)
def delete_directory(self, path: str):
raise NotImplementedError
def add_directory(self, path: str):
os.makedirs(path)
def apply_file_edit(self, edit: FileEdit) -> EditDiff:
old_content = self.read(edit.filepath)
new_content, diff = FileSystem.apply_edit_to_str(old_content, edit)
self.write(edit.filepath, new_content)
return diff
class VirtualFileSystem(FileSystem):
"""A simulated filesystem from a mapping of filepath to file contents."""
files: Dict[str, str]
def __init__(self, files: Dict[str, str]):
self.files = files
def read(self, path) -> str:
return self.files[path]
def readlines(self, path) -> List[str]:
return self.files[path].splitlines()
def write(self, path, content):
self.files[path] = content
def exists(self, path) -> bool:
return path in self.files
def read_range_in_file(self, r: RangeInFile) -> str:
return FileSystem.read_range_in_str(self.read(r.filepath), r.range)
def rename_file(self, filepath: str, new_filepath: str):
self.files[new_filepath] = self.files[filepath]
del self.files[filepath]
def rename_directory(self, path: str, new_path: str):
for filepath in self.files:
if filepath.startswith(path):
new_filepath = new_path + filepath[len(path):]
self.files[new_filepath] = self.files[filepath]
del self.files[filepath]
def delete_file(self, filepath: str):
del self.files[filepath]
def delete_directory(self, path: str):
raise NotImplementedError
def add_directory(self, path: str):
# For reasons as seen here and in delete_directory, a Dict[str, str] might not be the best represntation. Could just preprocess to something better upon __init__
pass
def apply_file_edit(self, edit: FileEdit) -> EditDiff:
old_content = self.read(edit.filepath)
new_content, original = FileSystem.apply_edit_to_str(old_content, edit)
self.write(edit.filepath, new_content)
return EditDiff(
edit=edit,
original=original
)
# TODO: Uniform errors thrown by any FileSystem subclass.

View file

@ -0,0 +1,136 @@
from abc import abstractmethod
from typing import Generator, List
from pydantic import BaseModel
from .main import Position, Range
from ..libs.util.map_path import map_path
import os
class FileSystemEdit(BaseModel):
@abstractmethod
def next_edit(self) -> Generator["FileSystemEdit", None, None]:
raise NotImplementedError
@abstractmethod
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
raise NotImplementedError
class AtomicFileSystemEdit(FileSystemEdit):
def next_edit(self) -> Generator["FileSystemEdit", None, None]:
yield self
class FileEdit(AtomicFileSystemEdit):
filepath: str
range: Range
replacement: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return FileEdit(map_path(self.filepath, orig_root, copy_root), self.range, self.replacement)
@staticmethod
def from_deletion(filepath: str, start: Position, end: Position) -> "FileEdit":
return FileEdit(filepath, Range(start, end), "")
@staticmethod
def from_insertion(filepath: str, position: Position, content: str) -> "FileEdit":
return FileEdit(filepath=filepath, range=Range.from_shorthand(position.line, position.character, position.line, position.character), replacement=content)
class FileEditWithFullContents(BaseModel):
fileEdit: FileEdit
fileContents: str
class AddFile(AtomicFileSystemEdit):
filepath: str
content: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return AddFile(self, map_path(self.filepath, orig_root, copy_root), self.content)
class DeleteFile(AtomicFileSystemEdit):
filepath: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return DeleteFile(map_path(self.filepath, orig_root, copy_root))
class RenameFile(AtomicFileSystemEdit):
filepath: str
new_filepath: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return RenameFile(map_path(self.filepath, orig_root, copy_root), map_path(self.new_filepath, orig_root, copy_root))
class AddDirectory(AtomicFileSystemEdit):
path: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return AddDirectory(map_path(self.path, orig_root, copy_root))
class DeleteDirectory(AtomicFileSystemEdit):
path: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return DeleteDirectory(map_path(self.path, orig_root, copy_root))
class RenameDirectory(AtomicFileSystemEdit):
path: str
new_path: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return RenameDirectory(map_path(self.filepath, orig_root, copy_root), map_path(self.new_path, orig_root, copy_root))
class DeleteDirectoryRecursive(FileSystemEdit):
path: str
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return DeleteDirectoryRecursive(map_path(self.path, orig_root, copy_root))
def next_edit(self) -> Generator[FileSystemEdit, None, None]:
yield DeleteDirectory(path=self.path)
for child in os.listdir(self.path):
child_path = os.path.join(self.path, child)
if os.path.isdir(child_path):
yield DeleteDirectoryRecursive(path=child_path)
else:
yield DeleteFile(filepath=child_path)
class SequentialFileSystemEdit(FileSystemEdit):
edits: List[FileSystemEdit]
def with_mapped_paths(self, orig_root: str, copy_root: str) -> "FileSystemEdit":
return SequentialFileSystemEdit([
edit.with_mapped_paths(orig_root, copy_root)
for edit in self.edits
])
def next_edit(self) -> Generator["FileSystemEdit", None, None]:
for edit in self.edits:
yield from edit.next_edit()
class EditDiff(BaseModel):
"""A reversible edit that can be applied to a file."""
forward: FileSystemEdit
backward: FileSystemEdit
@classmethod
def from_sequence(cls, diffs: List["EditDiff"]) -> "EditDiff":
forwards = []
backwards = []
for diff in diffs:
forwards.append(diff.forward)
backwards.insert(0, diff.backward)
return cls(
forward=SequentialFileSystemEdit(edits=forwards),
backward=SequentialFileSystemEdit(edits=backwards)
)

View file

@ -0,0 +1,39 @@
from .main import *
from .filesystem import RangeInFile, FileEdit
from .filesystem_edit import FileEditWithFullContents
from pydantic import schema_json_of
import os
MODELS_TO_GENERATE = [
Position, Range, Traceback, TracebackFrame
] + [
RangeInFile, FileEdit
] + [
FileEditWithFullContents
]
RENAMES = {
"ExampleClass": "RenamedName"
}
SCHEMA_DIR = "schema/json"
def clear_schemas():
for filename in os.listdir(SCHEMA_DIR):
if filename.endswith(".json"):
os.remove(os.path.join(SCHEMA_DIR, filename))
if __name__ == "__main__":
clear_schemas()
for model in MODELS_TO_GENERATE:
title = RENAMES.get(model.__name__, model.__name__)
try:
json = schema_json_of(model, indent=2, title=title)
except Exception as e:
print(f"Failed to generate json schema for {title}: ", e)
continue
with open(f"{SCHEMA_DIR}/{title}.json", "w") as f:
f.write(json)

View file

@ -0,0 +1,131 @@
from abc import ABC
from typing import List, Union
from pydantic import BaseModel, root_validator
from functools import total_ordering
@total_ordering
class Position(BaseModel):
line: int
character: int
def __hash__(self):
return hash((self.line, self.character))
def __eq__(self, other: "Position") -> bool:
return self.line == other.line and self.character == other.character
def __lt__(self, other: "Position") -> bool:
if self.line < other.line:
return True
elif self.line == other.line:
return self.character < other.character
else:
return False
@staticmethod
def from_index(string: str, index: int) -> "Position":
"""Convert index in string to line and character"""
line = string.count("\n", 0, index)
if line == 1:
character = index
else:
character = index - string.rindex("\n", 0, index) - 1
return Position(line=line, character=character)
class Range(BaseModel):
"""A range in a file. 0-indexed."""
start: Position
end: Position
def __hash__(self):
return hash((self.start, self.end))
def union(self, other: "Range") -> "Range":
return Range(
start=min(self.start, other.start),
end=max(self.end, other.end),
)
def is_empty(self) -> bool:
return self.start == self.end
def overlaps_with(self, other: "Range") -> bool:
return not (self.end < other.start or self.start > other.end)
@staticmethod
def from_indices(string: str, start_index: int, end_index: int) -> "Range":
return Range(
start=Position.from_index(string, start_index),
end=Position.from_index(string, end_index)
)
@staticmethod
def from_shorthand(start_line: int, start_char: int, end_line: int, end_char: int) -> "Range":
return Range(
start=Position(
line=start_line,
character=start_char
),
end=Position(
line=end_line,
character=end_char
)
)
@staticmethod
def from_entire_file(content: str) -> "Range":
lines = content.splitlines()
if len(lines) == 0:
return Range.from_shorthand(0, 0, 0, 0)
return Range.from_shorthand(0, 0, len(lines) - 1, len(lines[-1]) - 1)
@staticmethod
def from_snippet_in_file(content: str, snippet: str) -> "Range":
start_index = content.index(snippet)
end_index = start_index + len(snippet)
return Range.from_indices(content, start_index, end_index)
class AbstractModel(ABC, BaseModel):
@root_validator(pre=True)
def check_is_subclass(cls, values):
if not issubclass(cls, AbstractModel):
raise TypeError(
"AbstractModel subclasses must be subclasses of AbstractModel")
class TracebackFrame(BaseModel):
filepath: str
lineno: int
function: str
code: Union[str, None]
def __eq__(self, other):
return self.filepath == other.filepath and self.lineno == other.lineno and self.function == other.function
class Traceback(BaseModel):
frames: List[TracebackFrame]
message: str
error_type: str
full_traceback: Union[str, None]
@classmethod
def from_tbutil_parsed_exc(cls, tbutil_parsed_exc):
return cls(
frames=[
TracebackFrame(
filepath=frame["filepath"],
lineno=frame["lineno"],
function=frame["funcname"],
code=frame["source_line"],
)
for frame in tbutil_parsed_exc.frames
],
message=tbutil_parsed_exc.exc_msg,
error_type=tbutil_parsed_exc.exc_type,
full_traceback=tbutil_parsed_exc.to_string(),
)

View file

@ -0,0 +1,26 @@
from typing import List
import pluggy
from .step import hookspecs
from .step.libs import hello_world
builtin_libs = [hello_world]
def get_plugin_manager(use_plugins: List[str]) -> pluggy.PluginManager:
pm = pluggy.PluginManager("continue.step")
pm.add_hookspecs(hookspecs)
pm.load_setuptools_entrypoints("continue.step")
# Only use plugins that are specified in the config file
for plugin, name in pm.list_name_plugin():
if name not in use_plugins:
pm.set_blocked(plugin)
# Print warning if plugin not found
for name in use_plugins:
if not pm.has_plugin(name):
print(f"Plugin {name} not found.")
for lib in builtin_libs:
pm.register(lib)
return pm

View file

@ -0,0 +1,21 @@
def load_validator_plugin(config: ValidatorPluginConfig) -> Validator:
if config.name == "continue.tb_validator":
return PythonTracebackValidator(config.cmd, config.cwd)
elif config.name == "continue.pytest_validator":
return PytestValidator(cwd=config.cwd)
else:
raise KeyError("Unknown validator plugin name")
def load_llm_plugin(config: LLMPluginConfig) -> LLM:
if config.provider == "openai":
return OpenAI(api_key=config.api_key)
else:
raise KeyError("Unknown LLM provider: " + config.provider)
def load_policy_plugin(config: PolicyPluginConfig) -> Policy:
if config.name == "continue.random_policy":
return RandomPolicy()
elif config.name == "continue.dfs_policy":
return DFSPolicy()
else:
raise KeyError("Unknown policy plugin name")

View file

@ -0,0 +1,4 @@
import pluggy
hookimpl = pluggy.HookimplMarker("continue.policy")
"""Marker to be imported and used in plugins (and for own implementations)"""

View file

@ -0,0 +1,10 @@
from typing import List, Tuple
import pluggy
from ...libs.policy import Policy, Step
hookspec = pluggy.HookspecMarker("continue.policy")
class PolicyPlugin(Policy):
@hookspec
def next(self) -> Step:
"""Get the next step to run"""

View file

@ -0,0 +1,22 @@
from plugins import policy
from ....libs.observation import Observation
from ....libs.steps import Step
from ....libs.core import History
class AlternatingPolicy:
"""A Policy that alternates between two steps."""
def __init__(self, first: Step, second: Step):
self.first = first
self.second = second
self.last_was_first = False
@policy.hookimpl
def next(self, history: History) -> Step:
if self.last_was_first:
self.last_was_first = False
return self.second
else:
self.last_was_first = True
return self.first

View file

@ -0,0 +1,4 @@
import pluggy
hookimpl = pluggy.HookimplMarker("continue.step")
"""Marker to be imported and used in plugins (and for own implementations)"""

View file

@ -0,0 +1,13 @@
from typing import Coroutine
import pluggy
from ...libs.core import ContinueSDK, Step, Observation
hookspec = pluggy.HookspecMarker("continue.step")
# Perhaps Actions should be generic about what their inputs must be.
class StepPlugin(Step):
@hookspec
async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
"""Run"""

View file

@ -0,0 +1,9 @@
from ....plugins import step
from ....libs.steps import ContinueSDK
class HelloWorldStep:
"""A Step that prints "Hello World!"."""
@step.hookimpl
def run(sdk: ContinueSDK):
print("Hello World!")

View file

@ -0,0 +1,302 @@
# This is a separate server from server/main.py
import asyncio
import os
from typing import Any, Dict, List, Type, TypeVar, Union
import uuid
from fastapi import WebSocket, Body, APIRouter
from uvicorn.main import Server
from ..libs.util.queue import AsyncSubscriptionQueue
from ..models.filesystem import FileSystem, RangeInFile, EditDiff, RealFileSystem
from ..models.main import Traceback
from ..models.filesystem_edit import AddDirectory, AddFile, DeleteDirectory, DeleteFile, FileSystemEdit, FileEdit, FileEditWithFullContents, RenameDirectory, RenameFile, SequentialFileSystemEdit
from pydantic import BaseModel
from .notebook import SessionManager, session_manager
from .ide_protocol import AbstractIdeProtocolServer
router = APIRouter(prefix="/ide", tags=["ide"])
# Graceful shutdown by closing websockets
original_handler = Server.handle_exit
class AppStatus:
should_exit = False
@staticmethod
def handle_exit(*args, **kwargs):
AppStatus.should_exit = True
print("Shutting down")
original_handler(*args, **kwargs)
Server.handle_exit = AppStatus.handle_exit
# TYPES #
class FileEditsUpdate(BaseModel):
messageType: str = "fileEdits"
fileEdits: List[FileEditWithFullContents]
class OpenFilesResponse(BaseModel):
messageType: str = "openFiles"
openFiles: List[str]
class HighlightedCodeResponse(BaseModel):
messageType: str = "highlightedCode"
highlightedCode: List[RangeInFile]
class ShowSuggestionRequest(BaseModel):
messageType: str = "showSuggestion"
suggestion: FileEdit
class ShowSuggestionResponse(BaseModel):
messageType: str = "showSuggestion"
suggestion: FileEdit
accepted: bool
class ReadFileResponse(BaseModel):
messageType: str = "readFile"
contents: str
class EditFileResponse(BaseModel):
messageType: str = "editFile"
fileEdit: FileEditWithFullContents
class WorkspaceDirectoryResponse(BaseModel):
messageType: str = "workspaceDirectory"
workspaceDirectory: str
T = TypeVar("T", bound=BaseModel)
class IdeProtocolServer(AbstractIdeProtocolServer):
websocket: WebSocket
session_manager: SessionManager
sub_queue: AsyncSubscriptionQueue = AsyncSubscriptionQueue()
def __init__(self, session_manager: SessionManager):
self.session_manager = session_manager
async def _send_json(self, data: Any):
await self.websocket.send_json(data)
async def _receive_json(self, message_type: str) -> Any:
return await self.sub_queue.get(message_type)
async def _send_and_receive_json(self, data: Any, resp_model: Type[T], message_type: str) -> T:
await self._send_json(data)
resp = await self._receive_json(message_type)
return resp_model.parse_obj(resp)
async def handle_json(self, data: Any):
t = data["messageType"]
if t == "openNotebook":
await self.openNotebook()
elif t == "setFileOpen":
await self.setFileOpen(data["filepath"], data["open"])
elif t == "fileEdits":
fileEdits = list(
map(lambda d: FileEditWithFullContents.parse_obj(d), data["fileEdits"]))
self.onFileEdits(fileEdits)
elif t in ["highlightedCode", "openFiles", "readFile", "editFile", "workspaceDirectory"]:
self.sub_queue.post(t, data)
else:
raise ValueError("Unknown message type", t)
# ------------------------------- #
# Request actions in IDE, doesn't matter which Session
def showSuggestion():
pass
async def setFileOpen(self, filepath: str, open: bool = True):
# Agent needs access to this.
await self.websocket.send_json({
"messageType": "setFileOpen",
"filepath": filepath,
"open": open
})
async def openNotebook(self):
session_id = self.session_manager.new_session(self)
await self._send_json({
"messageType": "openNotebook",
"sessionId": session_id
})
async def showSuggestionsAndWait(self, suggestions: List[FileEdit]) -> bool:
ids = [str(uuid.uuid4()) for _ in suggestions]
for i in range(len(suggestions)):
self._send_json({
"messageType": "showSuggestion",
"suggestion": suggestions[i],
"suggestionId": ids[i]
})
responses = await asyncio.gather(*[
self._receive_json(ShowSuggestionResponse)
for i in range(len(suggestions))
]) # WORKING ON THIS FLOW HERE. Fine now to just await for response, instead of doing something fancy with a "waiting" state on the agent.
# Just need connect the suggestionId to the IDE (and the notebook)
return any([r.accepted for r in responses])
# ------------------------------- #
# Here needs to pass message onto the Agent OR Agent just subscribes.
# This is where you might have triggers: plugins can subscribe to certian events
# like file changes, tracebacks, etc...
def onAcceptRejectSuggestion(self, suggestionId: str, accepted: bool):
pass
def onTraceback(self, traceback: Traceback):
# Same as below, maybe not every agent?
for _, session in self.session_manager.sessions.items():
session.agent.handle_traceback(traceback)
def onFileSystemUpdate(self, update: FileSystemEdit):
# Access to Agent (so SessionManager)
pass
def onCloseNotebook(self, session_id: str):
# Accesss to SessionManager
pass
def onOpenNotebookRequest(self):
pass
def onFileEdits(self, edits: List[FileEditWithFullContents]):
# Send the file edits to ALL agents.
# Maybe not ideal behavior
for _, session in self.session_manager.sessions.items():
session.agent.handle_manual_edits(edits)
# Request information. Session doesn't matter.
async def getOpenFiles(self) -> List[str]:
resp = await self._send_and_receive_json({
"messageType": "openFiles"
}, OpenFilesResponse, "openFiles")
return resp.openFiles
async def getWorkspaceDirectory(self) -> str:
resp = await self._send_and_receive_json({
"messageType": "workspaceDirectory"
}, WorkspaceDirectoryResponse, "workspaceDirectory")
return resp.workspaceDirectory
async def getHighlightedCode(self) -> List[RangeInFile]:
resp = await self._send_and_receive_json({
"messageType": "highlightedCode"
}, HighlightedCodeResponse, "highlightedCode")
return resp.highlightedCode
async def readFile(self, filepath: str) -> str:
"""Read a file"""
resp = await self._send_and_receive_json({
"messageType": "readFile",
"filepath": filepath
}, ReadFileResponse, "readFile")
return resp.contents
async def saveFile(self, filepath: str):
"""Save a file"""
await self._send_json({
"messageType": "saveFile",
"filepath": filepath
})
async def readRangeInFile(self, range_in_file: RangeInFile) -> str:
"""Read a range in a file"""
full_contents = await self.readFile(range_in_file.filepath)
return FileSystem.read_range_in_str(full_contents, range_in_file.range)
async def editFile(self, edit: FileEdit) -> FileEditWithFullContents:
"""Edit a file"""
resp = await self._send_and_receive_json({
"messageType": "editFile",
"edit": edit.dict()
}, EditFileResponse, "editFile")
return resp.fileEdit
async def applyFileSystemEdit(self, edit: FileSystemEdit) -> EditDiff:
"""Apply a file edit"""
backward = None
fs = RealFileSystem()
if isinstance(edit, FileEdit):
file_edit = await self.editFile(edit)
_, diff = FileSystem.apply_edit_to_str(
file_edit.fileContents, file_edit.fileEdit)
backward = diff.backward
elif isinstance(edit, AddFile):
fs.write(edit.filepath, edit.content)
backward = DeleteFile(filepath=edit.filepath)
elif isinstance(edit, DeleteFile):
contents = await self.readFile(edit.filepath)
backward = AddFile(filepath=edit.filepath, content=contents)
fs.delete_file(edit.filepath)
elif isinstance(edit, RenameFile):
fs.rename_file(edit.filepath, edit.new_filepath)
backward = RenameFile(filepath=edit.new_filepath,
new_filepath=edit.filepath)
elif isinstance(edit, AddDirectory):
fs.add_directory(edit.path)
backward = DeleteDirectory(path=edit.path)
elif isinstance(edit, DeleteDirectory):
# This isn't atomic!
backward_edits = []
for root, dirs, files in os.walk(edit.path, topdown=False):
for f in files:
path = os.path.join(root, f)
edit_diff = await self.applyFileSystemEdit(DeleteFile(filepath=path))
backward_edits.append(edit_diff)
for d in dirs:
path = os.path.join(root, d)
edit_diff = await self.applyFileSystemEdit(DeleteDirectory(path=path))
backward_edits.append(edit_diff)
edit_diff = await self.applyFileSystemEdit(DeleteDirectory(path=edit.path))
backward_edits.append(edit_diff)
backward_edits.reverse()
backward = SequentialFileSystemEdit(edits=backward_edits)
elif isinstance(edit, RenameDirectory):
fs.rename_directory(edit.path, edit.new_path)
backward = RenameDirectory(path=edit.new_path, new_path=edit.path)
elif isinstance(edit, FileSystemEdit):
diffs = []
for edit in edit.next_edit():
edit_diff = await self.applyFileSystemEdit(edit)
diffs.append(edit_diff)
backward = EditDiff.from_sequence(diffs=diffs).backward
else:
raise TypeError("Unknown FileSystemEdit type: " + str(type(edit)))
return EditDiff(
forward=edit,
backward=backward
)
ideProtocolServer = IdeProtocolServer(session_manager)
@router.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
print("Accepted websocket connection from, ", websocket.client)
await websocket.send_json({"messageType": "connected"})
ideProtocolServer.websocket = websocket
while True:
data = await websocket.receive_json()
await ideProtocolServer.handle_json(data)
await websocket.close()

View file

@ -0,0 +1,80 @@
from typing import Any, List
from abc import ABC, abstractmethod
from ..models.main import Traceback
from ..models.filesystem_edit import FileEdit, FileSystemEdit, EditDiff
from ..models.filesystem import RangeInFile
class AbstractIdeProtocolServer(ABC):
@abstractmethod
async def handle_json(self, data: Any):
"""Handle a json message"""
@abstractmethod
def showSuggestion():
"""Show a suggestion to the user"""
@abstractmethod
async def getWorkspaceDirectory(self):
"""Get the workspace directory"""
@abstractmethod
async def setFileOpen(self, filepath: str, open: bool = True):
"""Set whether a file is open"""
@abstractmethod
async def openNotebook(self):
"""Open a notebook"""
@abstractmethod
async def showSuggestionsAndWait(self, suggestions: List[FileEdit]) -> bool:
"""Show suggestions to the user and wait for a response"""
@abstractmethod
def onAcceptRejectSuggestion(self, suggestionId: str, accepted: bool):
"""Called when the user accepts or rejects a suggestion"""
@abstractmethod
def onTraceback(self, traceback: Traceback):
"""Called when a traceback is received"""
@abstractmethod
def onFileSystemUpdate(self, update: FileSystemEdit):
"""Called when a file system update is received"""
@abstractmethod
def onCloseNotebook(self, session_id: str):
"""Called when a notebook is closed"""
@abstractmethod
def onOpenNotebookRequest(self):
"""Called when a notebook is requested to be opened"""
@abstractmethod
async def getOpenFiles(self) -> List[str]:
"""Get a list of open files"""
@abstractmethod
async def getHighlightedCode(self) -> List[RangeInFile]:
"""Get a list of highlighted code"""
@abstractmethod
async def readFile(self, filepath: str) -> str:
"""Read a file"""
@abstractmethod
async def readRangeInFile(self, range_in_file: RangeInFile) -> str:
"""Read a range in a file"""
@abstractmethod
async def editFile(self, edit: FileEdit):
"""Edit a file"""
@abstractmethod
async def applyFileSystemEdit(self, edit: FileSystemEdit) -> EditDiff:
"""Apply a file edit"""
@abstractmethod
async def saveFile(self, filepath: str):
"""Save a file"""

View file

@ -0,0 +1,39 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from .ide import router as ide_router
from .notebook import router as notebook_router
import uvicorn
import argparse
app = FastAPI()
app.include_router(ide_router)
app.include_router(notebook_router)
# Add CORS support
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/health")
def health():
return {"status": "ok"}
# add cli arg for server port
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--port", help="server port", type=int, default=8000)
args = parser.parse_args()
def run_server():
uvicorn.run(app, host="0.0.0.0", port=args.port, log_config="logging.ini")
if __name__ == "__main__":
run_server()

View file

@ -0,0 +1,198 @@
from fastapi import FastAPI, Depends, Header, WebSocket, APIRouter
from typing import Any, Dict, List, Union
from uuid import uuid4
from pydantic import BaseModel
from uvicorn.main import Server
from ..models.filesystem_edit import FileEditWithFullContents
from ..libs.policy import DemoPolicy
from ..libs.core import Agent, FullState, History, Step
from ..libs.steps.nate import ImplementAbstractMethodStep
from ..libs.observation import Observation
from dotenv import load_dotenv
from ..libs.llm.openai import OpenAI
from .ide_protocol import AbstractIdeProtocolServer
import os
import asyncio
import nest_asyncio
nest_asyncio.apply()
load_dotenv()
openai_api_key = os.getenv("OPENAI_API_KEY")
router = APIRouter(prefix="/notebook", tags=["notebook"])
# Graceful shutdown by closing websockets
original_handler = Server.handle_exit
class AppStatus:
should_exit = False
@staticmethod
def handle_exit(*args, **kwargs):
AppStatus.should_exit = True
print("Shutting down")
original_handler(*args, **kwargs)
Server.handle_exit = AppStatus.handle_exit
class Session:
session_id: str
agent: Agent
ws: Union[WebSocket, None]
def __init__(self, session_id: str, agent: Agent):
self.session_id = session_id
self.agent = agent
self.ws = None
class DemoAgent(Agent):
first_seen: bool = False
cumulative_edit_string = ""
def handle_manual_edits(self, edits: List[FileEditWithFullContents]):
for edit in edits:
self.cumulative_edit_string += edit.fileEdit.replacement
self._manual_edits_buffer.append(edit)
# Note that you're storing a lot of unecessary data here. Can compress into EditDiffs on the spot, and merge.
# self._manual_edits_buffer = merge_file_edit(self._manual_edits_buffer, edit)
# FOR DEMO PURPOSES
if edit.fileEdit.filepath.endswith("filesystem.py") and "List" in self.cumulative_edit_string and ":" in edit.fileEdit.replacement:
self.cumulative_edit_string = ""
asyncio.create_task(self.run_from_step(
ImplementAbstractMethodStep()))
class SessionManager:
sessions: Dict[str, Session] = {}
_event_loop: Union[asyncio.BaseEventLoop, None] = None
def get_session(self, session_id: str) -> Session:
if session_id not in self.sessions:
raise KeyError("Session ID not recognized")
return self.sessions[session_id]
def new_session(self, ide: AbstractIdeProtocolServer) -> str:
cmd = "python3 /Users/natesesti/Desktop/continue/extension/examples/python/main.py"
agent = DemoAgent(llm=OpenAI(api_key=openai_api_key),
policy=DemoPolicy(cmd=cmd), ide=ide)
session_id = str(uuid4())
session = Session(session_id=session_id, agent=agent)
self.sessions[session_id] = session
def on_update(state: FullState):
session_manager.send_ws_data(session_id, {
"messageType": "state",
"state": agent.get_full_state().dict()
})
agent.on_update(on_update)
asyncio.create_task(agent.run_policy())
return session_id
def remove_session(self, session_id: str):
del self.sessions[session_id]
def register_websocket(self, session_id: str, ws: WebSocket):
self.sessions[session_id].ws = ws
print("Registered websocket for session", session_id)
def send_ws_data(self, session_id: str, data: Any):
if self.sessions[session_id].ws is None:
print(f"Session {session_id} has no websocket")
return
async def a():
await self.sessions[session_id].ws.send_json(data)
# Run coroutine in background
if self._event_loop is None or self._event_loop.is_closed():
self._event_loop = asyncio.new_event_loop()
self._event_loop.run_until_complete(a())
self._event_loop.close()
else:
self._event_loop.run_until_complete(a())
self._event_loop.close()
session_manager = SessionManager()
def session(x_continue_session_id: str = Header("anonymous")) -> Session:
return session_manager.get_session(x_continue_session_id)
def websocket_session(session_id: str) -> Session:
return session_manager.get_session(session_id)
class StartSessionBody(BaseModel):
config_file_path: Union[str, None]
class StartSessionResp(BaseModel):
session_id: str
@router.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket, session: Session = Depends(websocket_session)):
await websocket.accept()
session_manager.register_websocket(session.session_id, websocket)
data = await websocket.receive_text()
# Update any history that may have happened before connection
await websocket.send_json({
"messageType": "state",
"state": session_manager.get_session(session.session_id).agent.get_full_state().dict()
})
print("Session started", data)
while AppStatus.should_exit is False:
data = await websocket.receive_json()
print("Received data", data)
if "messageType" not in data:
continue
messageType = data["messageType"]
try:
if messageType == "main_input":
# Do something with user input
asyncio.create_task(
session.agent.accept_user_input(data["value"]))
elif messageType == "step_user_input":
asyncio.create_task(
session.agent.give_user_input(data["value"], data["index"]))
elif messageType == "refinement_input":
asyncio.create_task(
session.agent.accept_refinement_input(data["value"], data["index"]))
elif messageType == "reverse":
# Reverse the history to the given index
asyncio.create_task(
session.agent.reverse_to_index(data["index"]))
except Exception as e:
print(e)
print("Closing websocket")
await websocket.close()
@router.post("/run")
def request_run(step: Step, session=Depends(session)):
"""Tell an agent to take a specific action."""
asyncio.create_task(session.agent.run_from_step(step))
return "Success"
@router.get("/history")
def get_history(session=Depends(session)) -> History:
return session.agent.history
@router.post("/observation")
def post_observation(observation: Observation, session=Depends(session)):
asyncio.create_task(session.agent.run_from_observation(observation))
return "Success"

20
docs/.gitignore vendored Normal file
View file

@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

3
docs/babel.config.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View file

@ -0,0 +1,9 @@
# Agent
`Agent` contains the
- History
- LLM
- Policy
- IDE
**Q: should we really call this abstraction agent?**

View file

@ -0,0 +1,13 @@
# Core
The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
The `Core` includes
- IDE protocol
- GUI protocol
- SDK
- Agent
There is a two-way sync between an IDE and the GUI that happens through Core.
**Q: does this make sense as a concept?**

13
docs/docs/concepts/gui.md Normal file
View file

@ -0,0 +1,13 @@
# GUI
The `GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly.
**From GUI to Core**
- Natural language instructions from the developer
- Hover / clicked on a step
- Other user input
**From Core to GUI**
- Updates to state (e.g. a new step)
**Q: do we call this the Continue GUI or Notebook?**

View file

@ -0,0 +1,5 @@
# History
`History` is the ordered record of all past steps.
**Q: What step data and metadata is stored in the history?**

81
docs/docs/concepts/ide.md Normal file
View file

@ -0,0 +1,81 @@
# IDE
## Supported IDEs
### VS Code
The VS Code extension implementation can be found at `/continue/extension/src`
## IDE Protocol methods
### handle_json
Handle a json message
### showSuggestion
Show a suggestion to the user
### getWorkspaceDirectory
Get the workspace directory
### setFileOpen
Set whether a file is open
### openNotebook
Open a notebook
### showSuggestionsAndWait
Show suggestions to the user and wait for a response
### onAcceptRejectSuggestion
Called when the user accepts or rejects a suggestion
### onTraceback
Called when a traceback is received
### onFileSystemUpdate
Called when a file system update is received
### onCloseNotebook
Called when a notebook is closed
### onOpenNotebookRequest
Called when a notebook is requested to be opened
### getOpenFiles
Get a list of open files
### getHighlightedCode
Get a list of highlighted code
### readFile
Read a file
### readRangeInFile
Read a range in a file
### editFile
Edit a file
### applyFileSystemEdit
Apply a file edit
### saveFile
Save a file

View file

@ -0,0 +1,7 @@
# LLM
`LLM` is the large language model that can be used in steps to automate that require some judgement based on context (e.g. generating code based on docs, explaining an error given a stack trace, etc)
**Q: should we call this LLM? Perhaps just model?**
**Q: should this abstraction be connected to agent?**

View file

@ -0,0 +1,7 @@
# Policy
The policy determines what step to run next
**Q: what else do folks need to understand about policies?**
**Q: what is the future plan for policies?**

View file

@ -0,0 +1,7 @@
# Recipe
An ordered sequence of steps that are intended to accomplish some complete task
Actually just a step that is composed of only other steps / recipes.
Altnerative names: workflow, plugin

48
docs/docs/concepts/sdk.md Normal file
View file

@ -0,0 +1,48 @@
# SDK
The `SDK` gives you access to tools (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps.
## SDK methods
### run_step
### edit_file
Edits a file
#### Parameters
- `filepath` (required): the location of the file that should be edited
- `prompt` (required): instructions for how the LLM should edit the file
### run
Runs a command
#### Parameters
- `command` (required): the command that should be run
### wait_for_user_confirmation
Waits for the user to review the steps that ran before running the next steps
#### Paramaters
- `question` (required): asks the user to confirm something specific
### ide.getOpenFiles
Gets the name of the files that are open in the IDE currently
### sdk.ide.readFile
Gets the contents of the file located at the `filepath`
#### Paramaters
- `filepath` (required): the location of the file that should be read
### sdk.ide.get_recent_edits
**Q: what does this method do?**

View file

@ -0,0 +1,9 @@
# State
*Note: this is only a proposed concept at this point*
Steps can add, edit, and remove observations / memories stored in state.
Allows you to pass context of previous steps, other files, etc.
Alternative names: memory, observation store

View file

@ -0,0 +1,53 @@
# Step
A step is
## Step methods
### `run` (required)
the code that should run when executed by the policy
### `description` (optional)
the definition of what the step does in natural language
### `reverse` (optional)
the code that should run when the step is reversed
### `modify` (optional)
the code that should run when the step is rerun with feedback
## Steps
### Core
#### RunCommandStep
#### EditCodeStep
#### ManualEditStep
### Community
#### CreateTableStep
Create a table in TypeORM
#### MigrationStep
Create and run an alembic migration
##### Parameters
- `edited_file`:
#### WritePytestsStep
Write unit tests for this file.
##### Parameters
- for_filepath (required): the path of the file that unit tests should be created for

View file

@ -0,0 +1,64 @@
# Create a Recipe
## 1. Create a step
### Using the SDK
You will want to use the SDK when you are opening directories, editing files, using models, etc.
This will ensure that these actions are recorded as steps, so they are reviewable, reversable, and rerunnable.
### Allow for configurability
Steps can include optional parameters that allow users to configure them
```python
from continueos import ContinueSDK
class CreatePytestsStep(Step):
input_file_path: str
output_file_prefix: str
output_dir_path: str
async def run(self, sdk: ContinueSDK):
code = await sdk.ide.readFile(self.input_file_path)
sdk.run_step(CreateDirStep(output_dir_path))
sdk.run_step(WritePytestsStep(code, output_file_prefix, output_dir_path))
```
### Adjust for different OS
You might want to implement your steps, so that they can run on Linux, MacOS, and Windows.
```python
from continueos import ContinueSDK
import platform
class SetUpVenvStep(Step):
async def run(self, sdk: ContinueSDK):
os = platform.system()
if os == "Windows":
await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
else:
await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
```
## 2. Compose steps together
By convention, the name of every recipe ends with `Recipe`.
```python
class CreatePipelineRecipe(Step):
async def run(self, sdk: ContinueSDK):
await sdk.run_step(
WaitForUserInputStep(prompt="What API do you want to load data from?") >>
SetupPipelineStep() >>
ValidatePipelineStep()
)
```

21
docs/docs/intro.md Normal file
View file

@ -0,0 +1,21 @@
# Introduction
## Scripts reimagined in the age of LLMs
### Automate more steps of your software development workflows using LLMs
#### An open-source framework to accelerate your use of LLMs while coding
1. Leverage steps created by others in your workflows as you code.
2. Customize steps and compose them together to fit your workflows.
3. Review, reverse, and rerun steps to use LLMs with confidence.
## How Continue works
The Continue framework consists of a `SDK`, a `GUI`, and a `Core` that brings everything together.
The `SDK` gives you access to tools (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps.
The `GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly.
The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.

117
docs/docusaurus.config.js Normal file
View file

@ -0,0 +1,117 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Continue',
tagline: 'an open source autopilot for refining software',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://continue.dev',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'continuedev', // Usually your GitHub org/user name.
projectName: 'continue', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/continuedev/continue/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Continue',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
},
{
href: 'https://github.com/continuedev/continue',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Introduction',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Twitter',
href: 'https://twitter.com/continuedev',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/continuedev/continue',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Continue, Inc.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;

21450
docs/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

43
docs/package.json Normal file
View file

@ -0,0 +1,43 @@
{
"name": "continue-docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
}

39
docs/sidebars.js Normal file
View file

@ -0,0 +1,39 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: [
'intro',
'create-a-recipe',
{
type: 'category',
label: 'Concepts',
items: [
'concepts/agent',
'concepts/core',
'concepts/gui',
'concepts/history',
'concepts/ide',
'concepts/llm',
'concepts/policy',
'concepts/recipes',
'concepts/sdk',
'concepts/step',
],
},
],
};
module.exports = sidebars;

View file

@ -0,0 +1,64 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];
function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View file

@ -0,0 +1,11 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

30
docs/src/css/custom.css Normal file
View file

@ -0,0 +1,30 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

41
docs/src/pages/index.js Normal file
View file

@ -0,0 +1,41 @@
import React from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View file

@ -0,0 +1,23 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}

0
docs/static/.nojekyll vendored Normal file
View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
docs/static/img/docusaurus.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

BIN
docs/static/img/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

1
docs/static/img/logo.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -0,0 +1,171 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1088" height="687.962" viewBox="0 0 1088 687.962">
<title>Easy to Use</title>
<g id="Group_12" data-name="Group 12" transform="translate(-57 -56)">
<g id="Group_11" data-name="Group 11" transform="translate(57 56)">
<path id="Path_83" data-name="Path 83" d="M1017.81,560.461c-5.27,45.15-16.22,81.4-31.25,110.31-20,38.52-54.21,54.04-84.77,70.28a193.275,193.275,0,0,1-27.46,11.94c-55.61,19.3-117.85,14.18-166.74,3.99a657.282,657.282,0,0,0-104.09-13.16q-14.97-.675-29.97-.67c-15.42.02-293.07,5.29-360.67-131.57-16.69-33.76-28.13-75-32.24-125.27-11.63-142.12,52.29-235.46,134.74-296.47,155.97-115.41,369.76-110.57,523.43,7.88C941.15,276.621,1036.99,396.031,1017.81,560.461Z" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_84" data-name="Path 84" d="M986.56,670.771c-20,38.52-47.21,64.04-77.77,80.28a193.272,193.272,0,0,1-27.46,11.94c-55.61,19.3-117.85,14.18-166.74,3.99a657.3,657.3,0,0,0-104.09-13.16q-14.97-.675-29.97-.67-23.13.03-46.25,1.72c-100.17,7.36-253.82-6.43-321.42-143.29L382,283.981,444.95,445.6l20.09,51.59,55.37-75.98L549,381.981l130.2,149.27,36.8-81.27L970.78,657.9l14.21,11.59Z" transform="translate(-56 -106.019)" fill="#f2f2f2"/>
<path id="Path_85" data-name="Path 85" d="M302,282.962l26-57,36,83-31-60Z" opacity="0.1"/>
<path id="Path_86" data-name="Path 86" d="M610.5,753.821q-14.97-.675-29.97-.67L465.04,497.191Z" transform="translate(-56 -106.019)" opacity="0.1"/>
<path id="Path_87" data-name="Path 87" d="M464.411,315.191,493,292.962l130,150-132-128Z" opacity="0.1"/>
<path id="Path_88" data-name="Path 88" d="M908.79,751.051a193.265,193.265,0,0,1-27.46,11.94L679.2,531.251Z" transform="translate(-56 -106.019)" opacity="0.1"/>
<circle id="Ellipse_11" data-name="Ellipse 11" cx="3" cy="3" r="3" transform="translate(479 98.962)" fill="#f2f2f2"/>
<circle id="Ellipse_12" data-name="Ellipse 12" cx="3" cy="3" r="3" transform="translate(396 201.962)" fill="#f2f2f2"/>
<circle id="Ellipse_13" data-name="Ellipse 13" cx="2" cy="2" r="2" transform="translate(600 220.962)" fill="#f2f2f2"/>
<circle id="Ellipse_14" data-name="Ellipse 14" cx="2" cy="2" r="2" transform="translate(180 265.962)" fill="#f2f2f2"/>
<circle id="Ellipse_15" data-name="Ellipse 15" cx="2" cy="2" r="2" transform="translate(612 96.962)" fill="#f2f2f2"/>
<circle id="Ellipse_16" data-name="Ellipse 16" cx="2" cy="2" r="2" transform="translate(736 192.962)" fill="#f2f2f2"/>
<circle id="Ellipse_17" data-name="Ellipse 17" cx="2" cy="2" r="2" transform="translate(858 344.962)" fill="#f2f2f2"/>
<path id="Path_89" data-name="Path 89" d="M306,121.222h-2.76v-2.76h-1.48v2.76H299V122.7h2.76v2.759h1.48V122.7H306Z" fill="#f2f2f2"/>
<path id="Path_90" data-name="Path 90" d="M848,424.222h-2.76v-2.76h-1.48v2.76H841V425.7h2.76v2.759h1.48V425.7H848Z" fill="#f2f2f2"/>
<path id="Path_91" data-name="Path 91" d="M1144,719.981c0,16.569-243.557,74-544,74s-544-57.431-544-74,243.557,14,544,14S1144,703.413,1144,719.981Z" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_92" data-name="Path 92" d="M1144,719.981c0,16.569-243.557,74-544,74s-544-57.431-544-74,243.557,14,544,14S1144,703.413,1144,719.981Z" transform="translate(-56 -106.019)" opacity="0.1"/>
<ellipse id="Ellipse_18" data-name="Ellipse 18" cx="544" cy="30" rx="544" ry="30" transform="translate(0 583.962)" fill="#3f3d56"/>
<path id="Path_93" data-name="Path 93" d="M624,677.981c0,33.137-14.775,24-33,24s-33,9.137-33-24,33-96,33-96S624,644.844,624,677.981Z" transform="translate(-56 -106.019)" fill="#ff6584"/>
<path id="Path_94" data-name="Path 94" d="M606,690.66c0,15.062-6.716,10.909-15,10.909s-15,4.153-15-10.909,15-43.636,15-43.636S606,675.6,606,690.66Z" transform="translate(-56 -106.019)" opacity="0.1"/>
<rect id="Rectangle_97" data-name="Rectangle 97" width="92" height="18" rx="9" transform="translate(489 604.962)" fill="#2f2e41"/>
<rect id="Rectangle_98" data-name="Rectangle 98" width="92" height="18" rx="9" transform="translate(489 586.962)" fill="#2f2e41"/>
<path id="Path_95" data-name="Path 95" d="M193,596.547c0,55.343,34.719,100.126,77.626,100.126" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_96" data-name="Path 96" d="M270.626,696.673c0-55.965,38.745-101.251,86.626-101.251" transform="translate(-56 -106.019)" fill="#6c63ff"/>
<path id="Path_97" data-name="Path 97" d="M221.125,601.564c0,52.57,22.14,95.109,49.5,95.109" transform="translate(-56 -106.019)" fill="#6c63ff"/>
<path id="Path_98" data-name="Path 98" d="M270.626,696.673c0-71.511,44.783-129.377,100.126-129.377" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_99" data-name="Path 99" d="M254.3,697.379s11.009-.339,14.326-2.7,16.934-5.183,17.757-1.395,16.544,18.844,4.115,18.945-28.879-1.936-32.19-3.953S254.3,697.379,254.3,697.379Z" transform="translate(-56 -106.019)" fill="#a8a8a8"/>
<path id="Path_100" data-name="Path 100" d="M290.716,710.909c-12.429.1-28.879-1.936-32.19-3.953-2.522-1.536-3.527-7.048-3.863-9.591l-.368.014s.7,8.879,4.009,10.9,19.761,4.053,32.19,3.953c3.588-.029,4.827-1.305,4.759-3.2C294.755,710.174,293.386,710.887,290.716,710.909Z" transform="translate(-56 -106.019)" opacity="0.2"/>
<path id="Path_101" data-name="Path 101" d="M777.429,633.081c0,38.029,23.857,68.8,53.341,68.8" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_102" data-name="Path 102" d="M830.769,701.882c0-38.456,26.623-69.575,59.525-69.575" transform="translate(-56 -106.019)" fill="#6c63ff"/>
<path id="Path_103" data-name="Path 103" d="M796.755,636.528c0,36.124,15.213,65.354,34.014,65.354" transform="translate(-56 -106.019)" fill="#6c63ff"/>
<path id="Path_104" data-name="Path 104" d="M830.769,701.882c0-49.139,30.773-88.9,68.8-88.9" transform="translate(-56 -106.019)" fill="#3f3d56"/>
<path id="Path_105" data-name="Path 105" d="M819.548,702.367s7.565-.233,9.844-1.856,11.636-3.562,12.2-.958,11.368,12.949,2.828,13.018-19.844-1.33-22.119-2.716S819.548,702.367,819.548,702.367Z" transform="translate(-56 -106.019)" fill="#a8a8a8"/>
<path id="Path_106" data-name="Path 106" d="M844.574,711.664c-8.54.069-19.844-1.33-22.119-2.716-1.733-1.056-2.423-4.843-2.654-6.59l-.253.01s.479,6.1,2.755,7.487,13.579,2.785,22.119,2.716c2.465-.02,3.317-.9,3.27-2.2C847.349,711.159,846.409,711.649,844.574,711.664Z" transform="translate(-56 -106.019)" opacity="0.2"/>
<path id="Path_107" data-name="Path 107" d="M949.813,724.718s11.36-1.729,14.5-4.591,16.89-7.488,18.217-3.667,19.494,17.447,6.633,19.107-30.153,1.609-33.835-.065S949.813,724.718,949.813,724.718Z" transform="translate(-56 -106.019)" fill="#a8a8a8"/>
<path id="Path_108" data-name="Path 108" d="M989.228,734.173c-12.86,1.659-30.153,1.609-33.835-.065-2.8-1.275-4.535-6.858-5.2-9.45l-.379.061s1.833,9.109,5.516,10.783,20.975,1.725,33.835.065c3.712-.479,4.836-1.956,4.529-3.906C993.319,732.907,991.991,733.817,989.228,734.173Z" transform="translate(-56 -106.019)" opacity="0.2"/>
<path id="Path_109" data-name="Path 109" d="M670.26,723.9s9.587-1.459,12.237-3.875,14.255-6.32,15.374-3.095,16.452,14.725,5.6,16.125-25.448,1.358-28.555-.055S670.26,723.9,670.26,723.9Z" transform="translate(-56 -106.019)" fill="#a8a8a8"/>
<path id="Path_110" data-name="Path 110" d="M703.524,731.875c-10.853,1.4-25.448,1.358-28.555-.055-2.367-1.076-3.827-5.788-4.39-7.976l-.32.051s1.547,7.687,4.655,9.1,17.7,1.456,28.555.055c3.133-.4,4.081-1.651,3.822-3.3C706.977,730.807,705.856,731.575,703.524,731.875Z" transform="translate(-56 -106.019)" opacity="0.2"/>
<path id="Path_111" data-name="Path 111" d="M178.389,719.109s7.463-1.136,9.527-3.016,11.1-4.92,11.969-2.409,12.808,11.463,4.358,12.553-19.811,1.057-22.23-.043S178.389,719.109,178.389,719.109Z" transform="translate(-56 -106.019)" fill="#a8a8a8"/>
<path id="Path_112" data-name="Path 112" d="M204.285,725.321c-8.449,1.09-19.811,1.057-22.23-.043-1.842-.838-2.979-4.506-3.417-6.209l-.249.04s1.2,5.984,3.624,7.085,13.781,1.133,22.23.043c2.439-.315,3.177-1.285,2.976-2.566C206.973,724.489,206.1,725.087,204.285,725.321Z" transform="translate(-56 -106.019)" opacity="0.2"/>
<path id="Path_113" data-name="Path 113" d="M439.7,707.337c0,30.22-42.124,20.873-93.7,20.873s-93.074,9.347-93.074-20.873,42.118-36.793,93.694-36.793S439.7,677.117,439.7,707.337Z" transform="translate(-56 -106.019)" opacity="0.1"/>
<path id="Path_114" data-name="Path 114" d="M439.7,699.9c0,30.22-42.124,20.873-93.7,20.873s-93.074,9.347-93.074-20.873S295.04,663.1,346.616,663.1,439.7,669.676,439.7,699.9Z" transform="translate(-56 -106.019)" fill="#3f3d56"/>
</g>
<g id="docusaurus_keytar" transform="translate(312.271 493.733)">
<path id="Path_40" data-name="Path 40" d="M99,52h91.791V89.153H99Z" transform="translate(5.904 -14.001)" fill="#fff" fill-rule="evenodd"/>
<path id="Path_41" data-name="Path 41" d="M24.855,163.927A21.828,21.828,0,0,1,5.947,153a21.829,21.829,0,0,0,18.908,32.782H46.71V163.927Z" transform="translate(-3 -4.634)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_42" data-name="Path 42" d="M121.861,61.1l76.514-4.782V45.39A21.854,21.854,0,0,0,176.52,23.535H78.173L75.441,18.8a3.154,3.154,0,0,0-5.464,0l-2.732,4.732L64.513,18.8a3.154,3.154,0,0,0-5.464,0l-2.732,4.732L53.586,18.8a3.154,3.154,0,0,0-5.464,0L45.39,23.535c-.024,0-.046,0-.071,0l-4.526-4.525a3.153,3.153,0,0,0-5.276,1.414l-1.5,5.577-5.674-1.521a3.154,3.154,0,0,0-3.863,3.864L26,34.023l-5.575,1.494a3.155,3.155,0,0,0-1.416,5.278l4.526,4.526c0,.023,0,.046,0,.07L18.8,48.122a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,59.05a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,69.977a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,80.9a3.154,3.154,0,0,0,0,5.464L23.535,89.1,18.8,91.832a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,102.76a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,113.687a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,124.615a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,135.542a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,146.469a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,157.4a3.154,3.154,0,0,0,0,5.464l4.732,2.732L18.8,168.324a3.154,3.154,0,0,0,0,5.464l4.732,2.732A21.854,21.854,0,0,0,45.39,198.375H176.52a21.854,21.854,0,0,0,21.855-21.855V89.1l-76.514-4.782a11.632,11.632,0,0,1,0-23.219" transform="translate(-1.681 -17.226)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_43" data-name="Path 43" d="M143,186.71h32.782V143H143Z" transform="translate(9.984 -5.561)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_44" data-name="Path 44" d="M196.71,159.855a5.438,5.438,0,0,0-.7.07c-.042-.164-.081-.329-.127-.493a5.457,5.457,0,1,0-5.4-9.372q-.181-.185-.366-.367a5.454,5.454,0,1,0-9.384-5.4c-.162-.046-.325-.084-.486-.126a5.467,5.467,0,1,0-10.788,0c-.162.042-.325.08-.486.126a5.457,5.457,0,1,0-9.384,5.4,21.843,21.843,0,1,0,36.421,21.02,5.452,5.452,0,1,0,.7-10.858" transform="translate(10.912 -6.025)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_45" data-name="Path 45" d="M153,124.855h32.782V103H153Z" transform="translate(10.912 -9.271)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_46" data-name="Path 46" d="M194.855,116.765a2.732,2.732,0,1,0,0-5.464,2.811,2.811,0,0,0-.349.035c-.022-.082-.04-.164-.063-.246a2.733,2.733,0,0,0-1.052-5.253,2.7,2.7,0,0,0-1.648.566q-.09-.093-.184-.184a2.7,2.7,0,0,0,.553-1.633,2.732,2.732,0,0,0-5.245-1.07,10.928,10.928,0,1,0,0,21.031,2.732,2.732,0,0,0,5.245-1.07,2.7,2.7,0,0,0-.553-1.633q.093-.09.184-.184a2.7,2.7,0,0,0,1.648.566,2.732,2.732,0,0,0,1.052-5.253c.023-.081.042-.164.063-.246a2.814,2.814,0,0,0,.349.035" transform="translate(12.767 -9.377)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_47" data-name="Path 47" d="M65.087,56.891a2.732,2.732,0,0,1-2.732-2.732,8.2,8.2,0,0,0-16.391,0,2.732,2.732,0,0,1-5.464,0,13.659,13.659,0,0,1,27.319,0,2.732,2.732,0,0,1-2.732,2.732" transform="translate(0.478 -15.068)" fill-rule="evenodd"/>
<path id="Path_48" data-name="Path 48" d="M103,191.347h65.565a21.854,21.854,0,0,0,21.855-21.855V93H124.855A21.854,21.854,0,0,0,103,114.855Z" transform="translate(6.275 -10.199)" fill="#ffff50" fill-rule="evenodd"/>
<path id="Path_49" data-name="Path 49" d="M173.216,129.787H118.535a1.093,1.093,0,1,1,0-2.185h54.681a1.093,1.093,0,0,1,0,2.185m0,21.855H118.535a1.093,1.093,0,1,1,0-2.186h54.681a1.093,1.093,0,0,1,0,2.186m0,21.855H118.535a1.093,1.093,0,1,1,0-2.185h54.681a1.093,1.093,0,0,1,0,2.185m0-54.434H118.535a1.093,1.093,0,1,1,0-2.185h54.681a1.093,1.093,0,0,1,0,2.185m0,21.652H118.535a1.093,1.093,0,1,1,0-2.186h54.681a1.093,1.093,0,0,1,0,2.186m0,21.855H118.535a1.093,1.093,0,1,1,0-2.186h54.681a1.093,1.093,0,0,1,0,2.186M189.585,61.611c-.013,0-.024-.007-.037-.005-3.377.115-4.974,3.492-6.384,6.472-1.471,3.114-2.608,5.139-4.473,5.078-2.064-.074-3.244-2.406-4.494-4.874-1.436-2.835-3.075-6.049-6.516-5.929-3.329.114-4.932,3.053-6.346,5.646-1.5,2.762-2.529,4.442-4.5,4.364-2.106-.076-3.225-1.972-4.52-4.167-1.444-2.443-3.112-5.191-6.487-5.1-3.272.113-4.879,2.606-6.3,4.808-1.5,2.328-2.552,3.746-4.551,3.662-2.156-.076-3.27-1.65-4.558-3.472-1.447-2.047-3.077-4.363-6.442-4.251-3.2.109-4.807,2.153-6.224,3.954-1.346,1.709-2.4,3.062-4.621,2.977a1.093,1.093,0,0,0-.079,2.186c3.3.11,4.967-1.967,6.417-3.81,1.286-1.635,2.4-3.045,4.582-3.12,2.1-.09,3.091,1.218,4.584,3.327,1.417,2,3.026,4.277,6.263,4.394,3.391.114,5.022-2.42,6.467-4.663,1.292-2,2.406-3.734,4.535-3.807,1.959-.073,3.026,1.475,4.529,4.022,1.417,2.4,3.023,5.121,6.324,5.241,3.415.118,5.064-2.863,6.5-5.5,1.245-2.282,2.419-4.437,4.5-4.509,1.959-.046,2.981,1.743,4.492,4.732,1.412,2.79,3.013,5.95,6.365,6.071l.185,0c3.348,0,4.937-3.36,6.343-6.331,1.245-2.634,2.423-5.114,4.444-5.216Z" transform="translate(7.109 -13.11)" fill-rule="evenodd"/>
<path id="Path_50" data-name="Path 50" d="M83,186.71h43.71V143H83Z" transform="translate(4.42 -5.561)" fill="#3ecc5f" fill-rule="evenodd"/>
<g id="Group_8" data-name="Group 8" transform="matrix(0.966, -0.259, 0.259, 0.966, 109.327, 91.085)">
<rect id="Rectangle_3" data-name="Rectangle 3" width="92.361" height="36.462" rx="2" transform="translate(0 0)" fill="#d8d8d8"/>
<g id="Group_2" data-name="Group 2" transform="translate(1.531 23.03)">
<rect id="Rectangle_4" data-name="Rectangle 4" width="5.336" height="5.336" rx="1" transform="translate(16.797 0)" fill="#4a4a4a"/>
<rect id="Rectangle_5" data-name="Rectangle 5" width="5.336" height="5.336" rx="1" transform="translate(23.12 0)" fill="#4a4a4a"/>
<rect id="Rectangle_6" data-name="Rectangle 6" width="5.336" height="5.336" rx="1" transform="translate(29.444 0)" fill="#4a4a4a"/>
<rect id="Rectangle_7" data-name="Rectangle 7" width="5.336" height="5.336" rx="1" transform="translate(35.768 0)" fill="#4a4a4a"/>
<rect id="Rectangle_8" data-name="Rectangle 8" width="5.336" height="5.336" rx="1" transform="translate(42.091 0)" fill="#4a4a4a"/>
<rect id="Rectangle_9" data-name="Rectangle 9" width="5.336" height="5.336" rx="1" transform="translate(48.415 0)" fill="#4a4a4a"/>
<rect id="Rectangle_10" data-name="Rectangle 10" width="5.336" height="5.336" rx="1" transform="translate(54.739 0)" fill="#4a4a4a"/>
<rect id="Rectangle_11" data-name="Rectangle 11" width="5.336" height="5.336" rx="1" transform="translate(61.063 0)" fill="#4a4a4a"/>
<rect id="Rectangle_12" data-name="Rectangle 12" width="5.336" height="5.336" rx="1" transform="translate(67.386 0)" fill="#4a4a4a"/>
<path id="Path_51" data-name="Path 51" d="M1.093,0H14.518a1.093,1.093,0,0,1,1.093,1.093V4.243a1.093,1.093,0,0,1-1.093,1.093H1.093A1.093,1.093,0,0,1,0,4.243V1.093A1.093,1.093,0,0,1,1.093,0ZM75,0H88.426a1.093,1.093,0,0,1,1.093,1.093V4.243a1.093,1.093,0,0,1-1.093,1.093H75a1.093,1.093,0,0,1-1.093-1.093V1.093A1.093,1.093,0,0,1,75,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
</g>
<g id="Group_3" data-name="Group 3" transform="translate(1.531 10.261)">
<path id="Path_52" data-name="Path 52" d="M1.093,0H6.218A1.093,1.093,0,0,1,7.31,1.093V4.242A1.093,1.093,0,0,1,6.218,5.335H1.093A1.093,1.093,0,0,1,0,4.242V1.093A1.093,1.093,0,0,1,1.093,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_13" data-name="Rectangle 13" width="5.336" height="5.336" rx="1" transform="translate(8.299 0)" fill="#4a4a4a"/>
<rect id="Rectangle_14" data-name="Rectangle 14" width="5.336" height="5.336" rx="1" transform="translate(14.623 0)" fill="#4a4a4a"/>
<rect id="Rectangle_15" data-name="Rectangle 15" width="5.336" height="5.336" rx="1" transform="translate(20.947 0)" fill="#4a4a4a"/>
<rect id="Rectangle_16" data-name="Rectangle 16" width="5.336" height="5.336" rx="1" transform="translate(27.271 0)" fill="#4a4a4a"/>
<rect id="Rectangle_17" data-name="Rectangle 17" width="5.336" height="5.336" rx="1" transform="translate(33.594 0)" fill="#4a4a4a"/>
<rect id="Rectangle_18" data-name="Rectangle 18" width="5.336" height="5.336" rx="1" transform="translate(39.918 0)" fill="#4a4a4a"/>
<rect id="Rectangle_19" data-name="Rectangle 19" width="5.336" height="5.336" rx="1" transform="translate(46.242 0)" fill="#4a4a4a"/>
<rect id="Rectangle_20" data-name="Rectangle 20" width="5.336" height="5.336" rx="1" transform="translate(52.565 0)" fill="#4a4a4a"/>
<rect id="Rectangle_21" data-name="Rectangle 21" width="5.336" height="5.336" rx="1" transform="translate(58.888 0)" fill="#4a4a4a"/>
<rect id="Rectangle_22" data-name="Rectangle 22" width="5.336" height="5.336" rx="1" transform="translate(65.212 0)" fill="#4a4a4a"/>
<rect id="Rectangle_23" data-name="Rectangle 23" width="5.336" height="5.336" rx="1" transform="translate(71.536 0)" fill="#4a4a4a"/>
<rect id="Rectangle_24" data-name="Rectangle 24" width="5.336" height="5.336" rx="1" transform="translate(77.859 0)" fill="#4a4a4a"/>
<rect id="Rectangle_25" data-name="Rectangle 25" width="5.336" height="5.336" rx="1" transform="translate(84.183 0)" fill="#4a4a4a"/>
</g>
<g id="Group_4" data-name="Group 4" transform="translate(91.05 9.546) rotate(180)">
<path id="Path_53" data-name="Path 53" d="M1.093,0H6.219A1.093,1.093,0,0,1,7.312,1.093v3.15A1.093,1.093,0,0,1,6.219,5.336H1.093A1.093,1.093,0,0,1,0,4.243V1.093A1.093,1.093,0,0,1,1.093,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_26" data-name="Rectangle 26" width="5.336" height="5.336" rx="1" transform="translate(8.299 0)" fill="#4a4a4a"/>
<rect id="Rectangle_27" data-name="Rectangle 27" width="5.336" height="5.336" rx="1" transform="translate(14.623 0)" fill="#4a4a4a"/>
<rect id="Rectangle_28" data-name="Rectangle 28" width="5.336" height="5.336" rx="1" transform="translate(20.947 0)" fill="#4a4a4a"/>
<rect id="Rectangle_29" data-name="Rectangle 29" width="5.336" height="5.336" rx="1" transform="translate(27.271 0)" fill="#4a4a4a"/>
<rect id="Rectangle_30" data-name="Rectangle 30" width="5.336" height="5.336" rx="1" transform="translate(33.594 0)" fill="#4a4a4a"/>
<rect id="Rectangle_31" data-name="Rectangle 31" width="5.336" height="5.336" rx="1" transform="translate(39.918 0)" fill="#4a4a4a"/>
<rect id="Rectangle_32" data-name="Rectangle 32" width="5.336" height="5.336" rx="1" transform="translate(46.242 0)" fill="#4a4a4a"/>
<rect id="Rectangle_33" data-name="Rectangle 33" width="5.336" height="5.336" rx="1" transform="translate(52.565 0)" fill="#4a4a4a"/>
<rect id="Rectangle_34" data-name="Rectangle 34" width="5.336" height="5.336" rx="1" transform="translate(58.889 0)" fill="#4a4a4a"/>
<rect id="Rectangle_35" data-name="Rectangle 35" width="5.336" height="5.336" rx="1" transform="translate(65.213 0)" fill="#4a4a4a"/>
<rect id="Rectangle_36" data-name="Rectangle 36" width="5.336" height="5.336" rx="1" transform="translate(71.537 0)" fill="#4a4a4a"/>
<rect id="Rectangle_37" data-name="Rectangle 37" width="5.336" height="5.336" rx="1" transform="translate(77.86 0)" fill="#4a4a4a"/>
<rect id="Rectangle_38" data-name="Rectangle 38" width="5.336" height="5.336" rx="1" transform="translate(84.183 0)" fill="#4a4a4a"/>
<rect id="Rectangle_39" data-name="Rectangle 39" width="5.336" height="5.336" rx="1" transform="translate(8.299 0)" fill="#4a4a4a"/>
<rect id="Rectangle_40" data-name="Rectangle 40" width="5.336" height="5.336" rx="1" transform="translate(14.623 0)" fill="#4a4a4a"/>
<rect id="Rectangle_41" data-name="Rectangle 41" width="5.336" height="5.336" rx="1" transform="translate(20.947 0)" fill="#4a4a4a"/>
<rect id="Rectangle_42" data-name="Rectangle 42" width="5.336" height="5.336" rx="1" transform="translate(27.271 0)" fill="#4a4a4a"/>
<rect id="Rectangle_43" data-name="Rectangle 43" width="5.336" height="5.336" rx="1" transform="translate(33.594 0)" fill="#4a4a4a"/>
<rect id="Rectangle_44" data-name="Rectangle 44" width="5.336" height="5.336" rx="1" transform="translate(39.918 0)" fill="#4a4a4a"/>
<rect id="Rectangle_45" data-name="Rectangle 45" width="5.336" height="5.336" rx="1" transform="translate(46.242 0)" fill="#4a4a4a"/>
<rect id="Rectangle_46" data-name="Rectangle 46" width="5.336" height="5.336" rx="1" transform="translate(52.565 0)" fill="#4a4a4a"/>
<rect id="Rectangle_47" data-name="Rectangle 47" width="5.336" height="5.336" rx="1" transform="translate(58.889 0)" fill="#4a4a4a"/>
<rect id="Rectangle_48" data-name="Rectangle 48" width="5.336" height="5.336" rx="1" transform="translate(65.213 0)" fill="#4a4a4a"/>
<rect id="Rectangle_49" data-name="Rectangle 49" width="5.336" height="5.336" rx="1" transform="translate(71.537 0)" fill="#4a4a4a"/>
<rect id="Rectangle_50" data-name="Rectangle 50" width="5.336" height="5.336" rx="1" transform="translate(77.86 0)" fill="#4a4a4a"/>
<rect id="Rectangle_51" data-name="Rectangle 51" width="5.336" height="5.336" rx="1" transform="translate(84.183 0)" fill="#4a4a4a"/>
</g>
<g id="Group_6" data-name="Group 6" transform="translate(1.531 16.584)">
<path id="Path_54" data-name="Path 54" d="M1.093,0h7.3A1.093,1.093,0,0,1,9.485,1.093v3.15A1.093,1.093,0,0,1,8.392,5.336h-7.3A1.093,1.093,0,0,1,0,4.243V1.094A1.093,1.093,0,0,1,1.093,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<g id="Group_5" data-name="Group 5" transform="translate(10.671 0)">
<rect id="Rectangle_52" data-name="Rectangle 52" width="5.336" height="5.336" rx="1" fill="#4a4a4a"/>
<rect id="Rectangle_53" data-name="Rectangle 53" width="5.336" height="5.336" rx="1" transform="translate(6.324 0)" fill="#4a4a4a"/>
<rect id="Rectangle_54" data-name="Rectangle 54" width="5.336" height="5.336" rx="1" transform="translate(12.647 0)" fill="#4a4a4a"/>
<rect id="Rectangle_55" data-name="Rectangle 55" width="5.336" height="5.336" rx="1" transform="translate(18.971 0)" fill="#4a4a4a"/>
<rect id="Rectangle_56" data-name="Rectangle 56" width="5.336" height="5.336" rx="1" transform="translate(25.295 0)" fill="#4a4a4a"/>
<rect id="Rectangle_57" data-name="Rectangle 57" width="5.336" height="5.336" rx="1" transform="translate(31.619 0)" fill="#4a4a4a"/>
<rect id="Rectangle_58" data-name="Rectangle 58" width="5.336" height="5.336" rx="1" transform="translate(37.942 0)" fill="#4a4a4a"/>
<rect id="Rectangle_59" data-name="Rectangle 59" width="5.336" height="5.336" rx="1" transform="translate(44.265 0)" fill="#4a4a4a"/>
<rect id="Rectangle_60" data-name="Rectangle 60" width="5.336" height="5.336" rx="1" transform="translate(50.589 0)" fill="#4a4a4a"/>
<rect id="Rectangle_61" data-name="Rectangle 61" width="5.336" height="5.336" rx="1" transform="translate(56.912 0)" fill="#4a4a4a"/>
<rect id="Rectangle_62" data-name="Rectangle 62" width="5.336" height="5.336" rx="1" transform="translate(63.236 0)" fill="#4a4a4a"/>
</g>
<path id="Path_55" data-name="Path 55" d="M1.094,0H8A1.093,1.093,0,0,1,9.091,1.093v3.15A1.093,1.093,0,0,1,8,5.336H1.093A1.093,1.093,0,0,1,0,4.243V1.094A1.093,1.093,0,0,1,1.093,0Z" transform="translate(80.428 0)" fill="#4a4a4a" fill-rule="evenodd"/>
</g>
<g id="Group_7" data-name="Group 7" transform="translate(1.531 29.627)">
<rect id="Rectangle_63" data-name="Rectangle 63" width="5.336" height="5.336" rx="1" transform="translate(0 0)" fill="#4a4a4a"/>
<rect id="Rectangle_64" data-name="Rectangle 64" width="5.336" height="5.336" rx="1" transform="translate(6.324 0)" fill="#4a4a4a"/>
<rect id="Rectangle_65" data-name="Rectangle 65" width="5.336" height="5.336" rx="1" transform="translate(12.647 0)" fill="#4a4a4a"/>
<rect id="Rectangle_66" data-name="Rectangle 66" width="5.336" height="5.336" rx="1" transform="translate(18.971 0)" fill="#4a4a4a"/>
<path id="Path_56" data-name="Path 56" d="M1.093,0H31.515a1.093,1.093,0,0,1,1.093,1.093V4.244a1.093,1.093,0,0,1-1.093,1.093H1.093A1.093,1.093,0,0,1,0,4.244V1.093A1.093,1.093,0,0,1,1.093,0ZM34.687,0h3.942a1.093,1.093,0,0,1,1.093,1.093V4.244a1.093,1.093,0,0,1-1.093,1.093H34.687a1.093,1.093,0,0,1-1.093-1.093V1.093A1.093,1.093,0,0,1,34.687,0Z" transform="translate(25.294 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_67" data-name="Rectangle 67" width="5.336" height="5.336" rx="1" transform="translate(66.003 0)" fill="#4a4a4a"/>
<rect id="Rectangle_68" data-name="Rectangle 68" width="5.336" height="5.336" rx="1" transform="translate(72.327 0)" fill="#4a4a4a"/>
<rect id="Rectangle_69" data-name="Rectangle 69" width="5.336" height="5.336" rx="1" transform="translate(84.183 0)" fill="#4a4a4a"/>
<path id="Path_57" data-name="Path 57" d="M5.336,0V1.18A1.093,1.093,0,0,1,4.243,2.273H1.093A1.093,1.093,0,0,1,0,1.18V0Z" transform="translate(83.59 2.273) rotate(180)" fill="#4a4a4a"/>
<path id="Path_58" data-name="Path 58" d="M5.336,0V1.18A1.093,1.093,0,0,1,4.243,2.273H1.093A1.093,1.093,0,0,1,0,1.18V0Z" transform="translate(78.255 3.063)" fill="#4a4a4a"/>
</g>
<rect id="Rectangle_70" data-name="Rectangle 70" width="88.927" height="2.371" rx="1.085" transform="translate(1.925 1.17)" fill="#4a4a4a"/>
<rect id="Rectangle_71" data-name="Rectangle 71" width="4.986" height="1.581" rx="0.723" transform="translate(4.1 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_72" data-name="Rectangle 72" width="4.986" height="1.581" rx="0.723" transform="translate(10.923 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_73" data-name="Rectangle 73" width="4.986" height="1.581" rx="0.723" transform="translate(16.173 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_74" data-name="Rectangle 74" width="4.986" height="1.581" rx="0.723" transform="translate(21.421 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_75" data-name="Rectangle 75" width="4.986" height="1.581" rx="0.723" transform="translate(26.671 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_76" data-name="Rectangle 76" width="4.986" height="1.581" rx="0.723" transform="translate(33.232 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_77" data-name="Rectangle 77" width="4.986" height="1.581" rx="0.723" transform="translate(38.48 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_78" data-name="Rectangle 78" width="4.986" height="1.581" rx="0.723" transform="translate(43.73 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_79" data-name="Rectangle 79" width="4.986" height="1.581" rx="0.723" transform="translate(48.978 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_80" data-name="Rectangle 80" width="4.986" height="1.581" rx="0.723" transform="translate(55.54 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_81" data-name="Rectangle 81" width="4.986" height="1.581" rx="0.723" transform="translate(60.788 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_82" data-name="Rectangle 82" width="4.986" height="1.581" rx="0.723" transform="translate(66.038 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_83" data-name="Rectangle 83" width="4.986" height="1.581" rx="0.723" transform="translate(72.599 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_84" data-name="Rectangle 84" width="4.986" height="1.581" rx="0.723" transform="translate(77.847 1.566)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_85" data-name="Rectangle 85" width="4.986" height="1.581" rx="0.723" transform="translate(83.097 1.566)" fill="#d8d8d8" opacity="0.136"/>
</g>
<path id="Path_59" data-name="Path 59" d="M146.71,159.855a5.439,5.439,0,0,0-.7.07c-.042-.164-.081-.329-.127-.493a5.457,5.457,0,1,0-5.4-9.372q-.181-.185-.366-.367a5.454,5.454,0,1,0-9.384-5.4c-.162-.046-.325-.084-.486-.126a5.467,5.467,0,1,0-10.788,0c-.162.042-.325.08-.486.126a5.457,5.457,0,1,0-9.384,5.4,21.843,21.843,0,1,0,36.421,21.02,5.452,5.452,0,1,0,.7-10.858" transform="translate(6.275 -6.025)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_60" data-name="Path 60" d="M83,124.855h43.71V103H83Z" transform="translate(4.42 -9.271)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_61" data-name="Path 61" d="M134.855,116.765a2.732,2.732,0,1,0,0-5.464,2.811,2.811,0,0,0-.349.035c-.022-.082-.04-.164-.063-.246a2.733,2.733,0,0,0-1.052-5.253,2.7,2.7,0,0,0-1.648.566q-.09-.093-.184-.184a2.7,2.7,0,0,0,.553-1.633,2.732,2.732,0,0,0-5.245-1.07,10.928,10.928,0,1,0,0,21.031,2.732,2.732,0,0,0,5.245-1.07,2.7,2.7,0,0,0-.553-1.633q.093-.09.184-.184a2.7,2.7,0,0,0,1.648.566,2.732,2.732,0,0,0,1.052-5.253c.023-.081.042-.164.063-.246a2.811,2.811,0,0,0,.349.035" transform="translate(7.202 -9.377)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_62" data-name="Path 62" d="M143.232,42.33a2.967,2.967,0,0,1-.535-.055,2.754,2.754,0,0,1-.514-.153,2.838,2.838,0,0,1-.471-.251,4.139,4.139,0,0,1-.415-.339,3.2,3.2,0,0,1-.338-.415A2.7,2.7,0,0,1,140.5,39.6a2.968,2.968,0,0,1,.055-.535,3.152,3.152,0,0,1,.152-.514,2.874,2.874,0,0,1,.252-.47,2.633,2.633,0,0,1,.753-.754,2.837,2.837,0,0,1,.471-.251,2.753,2.753,0,0,1,.514-.153,2.527,2.527,0,0,1,1.071,0,2.654,2.654,0,0,1,.983.4,4.139,4.139,0,0,1,.415.339,4.019,4.019,0,0,1,.339.415,2.786,2.786,0,0,1,.251.47,2.864,2.864,0,0,1,.208,1.049,2.77,2.77,0,0,1-.8,1.934,4.139,4.139,0,0,1-.415.339,2.722,2.722,0,0,1-1.519.459m21.855-1.366a2.789,2.789,0,0,1-1.935-.8,4.162,4.162,0,0,1-.338-.415,2.7,2.7,0,0,1-.459-1.519,2.789,2.789,0,0,1,.8-1.934,4.139,4.139,0,0,1,.415-.339,2.838,2.838,0,0,1,.471-.251,2.752,2.752,0,0,1,.514-.153,2.527,2.527,0,0,1,1.071,0,2.654,2.654,0,0,1,.983.4,4.139,4.139,0,0,1,.415.339,2.79,2.79,0,0,1,.8,1.934,3.069,3.069,0,0,1-.055.535,2.779,2.779,0,0,1-.153.514,3.885,3.885,0,0,1-.251.47,4.02,4.02,0,0,1-.339.415,4.138,4.138,0,0,1-.415.339,2.722,2.722,0,0,1-1.519.459" transform="translate(9.753 -15.532)" fill-rule="evenodd"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,170 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1041.277" height="554.141" viewBox="0 0 1041.277 554.141">
<title>Powered by React</title>
<g id="Group_24" data-name="Group 24" transform="translate(-440 -263)">
<g id="Group_23" data-name="Group 23" transform="translate(439.989 262.965)">
<path id="Path_299" data-name="Path 299" d="M1040.82,611.12q-1.74,3.75-3.47,7.4-2.7,5.67-5.33,11.12c-.78,1.61-1.56,3.19-2.32,4.77-8.6,17.57-16.63,33.11-23.45,45.89A73.21,73.21,0,0,1,942.44,719l-151.65,1.65h-1.6l-13,.14-11.12.12-34.1.37h-1.38l-17.36.19h-.53l-107,1.16-95.51,1-11.11.12-69,.75H429l-44.75.48h-.48l-141.5,1.53-42.33.46a87.991,87.991,0,0,1-10.79-.54h0c-1.22-.14-2.44-.3-3.65-.49a87.38,87.38,0,0,1-51.29-27.54C116,678.37,102.75,655,93.85,629.64q-1.93-5.49-3.6-11.12C59.44,514.37,97,380,164.6,290.08q4.25-5.64,8.64-11l.07-.08c20.79-25.52,44.1-46.84,68.93-62,44-26.91,92.75-34.49,140.7-11.9,40.57,19.12,78.45,28.11,115.17,30.55,3.71.24,7.42.42,11.11.53,84.23,2.65,163.17-27.7,255.87-47.29,3.69-.78,7.39-1.55,11.12-2.28,66.13-13.16,139.49-20.1,226.73-5.51a189.089,189.089,0,0,1,26.76,6.4q5.77,1.86,11.12,4c41.64,16.94,64.35,48.24,74,87.46q1.37,5.46,2.37,11.11C1134.3,384.41,1084.19,518.23,1040.82,611.12Z" transform="translate(-79.34 -172.91)" fill="#f2f2f2"/>
<path id="Path_300" data-name="Path 300" d="M576.36,618.52a95.21,95.21,0,0,1-1.87,11.12h93.7V618.52Zm-78.25,62.81,11.11-.09V653.77c-3.81-.17-7.52-.34-11.11-.52ZM265.19,618.52v11.12h198.5V618.52ZM1114.87,279h-74V191.51q-5.35-2.17-11.12-4V279H776.21V186.58c-3.73.73-7.43,1.5-11.12,2.28V279H509.22V236.15c-3.69-.11-7.4-.29-11.11-.53V279H242.24V217c-24.83,15.16-48.14,36.48-68.93,62h-.07v.08q-4.4,5.4-8.64,11h8.64V618.52h-83q1.66,5.63,3.6,11.12h79.39v93.62a87,87,0,0,0,12.2,2.79c1.21.19,2.43.35,3.65.49h0a87.991,87.991,0,0,0,10.79.54l42.33-.46v-97H498.11v94.21l11.11-.12V629.64H765.09V721l11.12-.12V629.64H1029.7v4.77c.76-1.58,1.54-3.16,2.32-4.77q2.63-5.45,5.33-11.12,1.73-3.64,3.47-7.4v-321h76.42Q1116.23,284.43,1114.87,279ZM242.24,618.52V290.08H498.11V618.52Zm267,0V290.08H765.09V618.52Zm520.48,0H776.21V290.08H1029.7Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_301" data-name="Path 301" d="M863.09,533.65v13l-151.92,1.4-1.62.03-57.74.53-1.38.02-17.55.15h-.52l-106.98.99L349.77,551.4h-.15l-44.65.42-.48.01-198.4,1.82v-15l46.65-28,93.6-.78,2-.01.66-.01,2-.03,44.94-.37,2.01-.01.64-.01,2-.01L315,509.3l.38-.01,35.55-.3h.29l277.4-2.34,6.79-.05h.68l5.18-.05,37.65-.31,2-.03,1.85-.02h.96l11.71-.09,2.32-.03,3.11-.02,9.75-.09,15.47-.13,2-.02,3.48-.02h.65l74.71-.64Z" fill="#65617d"/>
<path id="Path_302" data-name="Path 302" d="M863.09,533.65v13l-151.92,1.4-1.62.03-57.74.53-1.38.02-17.55.15h-.52l-106.98.99L349.77,551.4h-.15l-44.65.42-.48.01-198.4,1.82v-15l46.65-28,93.6-.78,2-.01.66-.01,2-.03,44.94-.37,2.01-.01.64-.01,2-.01L315,509.3l.38-.01,35.55-.3h.29l277.4-2.34,6.79-.05h.68l5.18-.05,37.65-.31,2-.03,1.85-.02h.96l11.71-.09,2.32-.03,3.11-.02,9.75-.09,15.47-.13,2-.02,3.48-.02h.65l74.71-.64Z" opacity="0.2"/>
<path id="Path_303" data-name="Path 303" d="M375.44,656.57v24.49a6.13,6.13,0,0,1-3.5,5.54,6,6,0,0,1-2.5.6l-34.9.74a6,6,0,0,1-2.7-.57,6.12,6.12,0,0,1-3.57-5.57V656.57Z" transform="translate(-79.34 -172.91)" fill="#3f3d56"/>
<path id="Path_304" data-name="Path 304" d="M375.44,656.57v24.49a6.13,6.13,0,0,1-3.5,5.54,6,6,0,0,1-2.5.6l-34.9.74a6,6,0,0,1-2.7-.57,6.12,6.12,0,0,1-3.57-5.57V656.57Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_305" data-name="Path 305" d="M377.44,656.57v24.49a6.13,6.13,0,0,1-3.5,5.54,6,6,0,0,1-2.5.6l-34.9.74a6,6,0,0,1-2.7-.57,6.12,6.12,0,0,1-3.57-5.57V656.57Z" transform="translate(-79.34 -172.91)" fill="#3f3d56"/>
<rect id="Rectangle_137" data-name="Rectangle 137" width="47.17" height="31.5" transform="translate(680.92 483.65)" fill="#3f3d56"/>
<rect id="Rectangle_138" data-name="Rectangle 138" width="47.17" height="31.5" transform="translate(680.92 483.65)" opacity="0.1"/>
<rect id="Rectangle_139" data-name="Rectangle 139" width="47.17" height="31.5" transform="translate(678.92 483.65)" fill="#3f3d56"/>
<path id="Path_306" data-name="Path 306" d="M298.09,483.65v4.97l-47.17,1.26v-6.23Z" opacity="0.1"/>
<path id="Path_307" data-name="Path 307" d="M460.69,485.27v168.2a4,4,0,0,1-3.85,3.95l-191.65,5.1h-.05a4,4,0,0,1-3.95-3.95V485.27a4,4,0,0,1,3.95-3.95h191.6a4,4,0,0,1,3.95,3.95Z" transform="translate(-79.34 -172.91)" fill="#65617d"/>
<path id="Path_308" data-name="Path 308" d="M265.19,481.32v181.2h-.05a4,4,0,0,1-3.95-3.95V485.27a4,4,0,0,1,3.95-3.95Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_309" data-name="Path 309" d="M194.59,319.15h177.5V467.4l-177.5,4Z" fill="#39374d"/>
<path id="Path_310" data-name="Path 310" d="M726.09,483.65v6.41l-47.17-1.26v-5.15Z" opacity="0.1"/>
<path id="Path_311" data-name="Path 311" d="M867.69,485.27v173.3a4,4,0,0,1-4,3.95h0L672,657.42a4,4,0,0,1-3.85-3.95V485.27a4,4,0,0,1,3.95-3.95H863.7a4,4,0,0,1,3.99,3.95Z" transform="translate(-79.34 -172.91)" fill="#65617d"/>
<path id="Path_312" data-name="Path 312" d="M867.69,485.27v173.3a4,4,0,0,1-4,3.95h0V481.32h0a4,4,0,0,1,4,3.95Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_313" data-name="Path 313" d="M775.59,319.15H598.09V467.4l177.5,4Z" fill="#39374d"/>
<path id="Path_314" data-name="Path 314" d="M663.19,485.27v168.2a4,4,0,0,1-3.85,3.95l-191.65,5.1h0a4,4,0,0,1-4-3.95V485.27a4,4,0,0,1,3.95-3.95h191.6A4,4,0,0,1,663.19,485.27Z" transform="translate(-79.34 -172.91)" fill="#65617d"/>
<path id="Path_315" data-name="Path 315" d="M397.09,319.15h177.5V467.4l-177.5,4Z" fill="#4267b2"/>
<path id="Path_316" data-name="Path 316" d="M863.09,533.65v13l-151.92,1.4-1.62.03-57.74.53-1.38.02-17.55.15h-.52l-106.98.99L349.77,551.4h-.15l-44.65.42-.48.01-198.4,1.82v-15l202.51-1.33h.48l40.99-.28h.19l283.08-1.87h.29l.17-.01h.47l4.79-.03h1.46l74.49-.5,4.4-.02.98-.01Z" opacity="0.1"/>
<circle id="Ellipse_111" data-name="Ellipse 111" cx="51.33" cy="51.33" r="51.33" transform="translate(435.93 246.82)" fill="#fbbebe"/>
<path id="Path_317" data-name="Path 317" d="M617.94,550.07s-99.5,12-90,0c3.44-4.34,4.39-17.2,4.2-31.85-.06-4.45-.22-9.06-.45-13.65-1.1-22-3.75-43.5-3.75-43.5s87-41,77-8.5c-4,13.13-2.69,31.57.35,48.88.89,5.05,1.92,10,3,14.7a344.66,344.66,0,0,0,9.65,33.92Z" transform="translate(-79.34 -172.91)" fill="#fbbebe"/>
<path id="Path_318" data-name="Path 318" d="M585.47,546c11.51-2.13,23.7-6,34.53-1.54,2.85,1.17,5.47,2.88,8.39,3.86s6.12,1.22,9.16,1.91c10.68,2.42,19.34,10.55,24.9,20s8.44,20.14,11.26,30.72l6.9,25.83c6,22.45,12,45.09,13.39,68.3a2437.506,2437.506,0,0,1-250.84,1.43c5.44-10.34,11-21.31,10.54-33s-7.19-23.22-4.76-34.74c1.55-7.34,6.57-13.39,9.64-20.22,8.75-19.52,1.94-45.79,17.32-60.65,6.92-6.68,17-9.21,26.63-8.89,12.28.41,24.85,4.24,37,6.11C555.09,547.48,569.79,548.88,585.47,546Z" transform="translate(-79.34 -172.91)" fill="#ff6584"/>
<path id="Path_319" data-name="Path 319" d="M716.37,657.17l-.1,1.43v.1l-.17,2.3-1.33,18.51-1.61,22.3-.46,6.28-1,13.44v.17l-107,1-175.59,1.9v.84h-.14v-1.12l.45-14.36.86-28.06.74-23.79.07-2.37a10.53,10.53,0,0,1,11.42-10.17c4.72.4,10.85.89,18.18,1.41l3,.22c42.33,2.94,120.56,6.74,199.5,2,1.66-.09,3.33-.19,5-.31,12.24-.77,24.47-1.76,36.58-3a10.53,10.53,0,0,1,11.6,11.23Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_320" data-name="Path 320" d="M429.08,725.44v-.84l175.62-1.91,107-1h.3v-.17l1-13.44.43-6,1.64-22.61,1.29-17.9v-.44a10.617,10.617,0,0,0-.11-2.47.3.3,0,0,0,0-.1,10.391,10.391,0,0,0-2-4.64,10.54,10.54,0,0,0-9.42-4c-12.11,1.24-24.34,2.23-36.58,3-1.67.12-3.34.22-5,.31-78.94,4.69-157.17.89-199.5-2l-3-.22c-7.33-.52-13.46-1-18.18-1.41a10.54,10.54,0,0,0-11.24,8.53,11,11,0,0,0-.18,1.64l-.68,22.16L429.54,710l-.44,14.36v1.12Z" transform="translate(-79.34 -172.91)" fill="#3f3d56"/>
<path id="Path_321" data-name="Path 321" d="M716.67,664.18l-1.23,15.33-1.83,22.85-.46,5.72-1,12.81-.06.64v.17h0l-.15,1.48.11-1.48h-.29l-107,1-175.65,1.9v-.28l.49-14.36,1-28.06.64-18.65A6.36,6.36,0,0,1,434.3,658a6.25,6.25,0,0,1,3.78-.9c2.1.17,4.68.37,7.69.59,4.89.36,10.92.78,17.94,1.22,13,.82,29.31,1.7,48,2.42,52,2,122.2,2.67,188.88-3.17,3-.26,6.1-.55,9.13-.84a6.26,6.26,0,0,1,3.48.66,5.159,5.159,0,0,1,.86.54,6.14,6.14,0,0,1,2,2.46,3.564,3.564,0,0,1,.25.61A6.279,6.279,0,0,1,716.67,664.18Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_322" data-name="Path 322" d="M377.44,677.87v3.19a6.13,6.13,0,0,1-3.5,5.54l-40.1.77a6.12,6.12,0,0,1-3.57-5.57v-3Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_323" data-name="Path 323" d="M298.59,515.57l-52.25,1V507.9l52.25-1Z" fill="#3f3d56"/>
<path id="Path_324" data-name="Path 324" d="M298.59,515.57l-52.25,1V507.9l52.25-1Z" opacity="0.1"/>
<path id="Path_325" data-name="Path 325" d="M300.59,515.57l-52.25,1V507.9l52.25-1Z" fill="#3f3d56"/>
<path id="Path_326" data-name="Path 326" d="M758.56,679.87v3.19a6.13,6.13,0,0,0,3.5,5.54l40.1.77a6.12,6.12,0,0,0,3.57-5.57v-3Z" transform="translate(-79.34 -172.91)" opacity="0.1"/>
<path id="Path_327" data-name="Path 327" d="M678.72,517.57l52.25,1V509.9l-52.25-1Z" opacity="0.1"/>
<path id="Path_328" data-name="Path 328" d="M676.72,517.57l52.25,1V509.9l-52.25-1Z" fill="#3f3d56"/>
<path id="Path_329" data-name="Path 329" d="M534.13,486.79c.08,7-3.16,13.6-5.91,20.07a163.491,163.491,0,0,0-12.66,74.71c.73,11,2.58,22,.73,32.9s-8.43,21.77-19,24.9c17.53,10.45,41.26,9.35,57.76-2.66,8.79-6.4,15.34-15.33,21.75-24.11a97.86,97.86,0,0,1-13.31,44.75A103.43,103.43,0,0,0,637,616.53c4.31-5.81,8.06-12.19,9.72-19.23,3.09-13-1.22-26.51-4.51-39.5a266.055,266.055,0,0,1-6.17-33c-.43-3.56-.78-7.22.1-10.7,1-4.07,3.67-7.51,5.64-11.22,5.6-10.54,5.73-23.3,2.86-34.88s-8.49-22.26-14.06-32.81c-4.46-8.46-9.3-17.31-17.46-22.28-5.1-3.1-11-4.39-16.88-5.64l-25.37-5.43c-5.55-1.19-11.26-2.38-16.87-1.51-9.47,1.48-16.14,8.32-22,15.34-4.59,5.46-15.81,15.71-16.6,22.86-.72,6.59,5.1,17.63,6.09,24.58,1.3,9,2.22,6,7.3,11.52C532,478.05,534.07,482,534.13,486.79Z" transform="translate(-79.34 -172.91)" fill="#3f3d56"/>
</g>
<g id="docusaurus_keytar" transform="translate(670.271 615.768)">
<path id="Path_40" data-name="Path 40" d="M99,52h43.635V69.662H99Z" transform="translate(-49.132 -33.936)" fill="#fff" fill-rule="evenodd"/>
<path id="Path_41" data-name="Path 41" d="M13.389,158.195A10.377,10.377,0,0,1,4.4,153a10.377,10.377,0,0,0,8.988,15.584H23.779V158.195Z" transform="translate(-3 -82.47)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_42" data-name="Path 42" d="M66.967,38.083l36.373-2.273V30.615A10.389,10.389,0,0,0,92.95,20.226H46.2l-1.3-2.249a1.5,1.5,0,0,0-2.6,0L41,20.226l-1.3-2.249a1.5,1.5,0,0,0-2.6,0l-1.3,2.249-1.3-2.249a1.5,1.5,0,0,0-2.6,0l-1.3,2.249-.034,0-2.152-2.151a1.5,1.5,0,0,0-2.508.672L25.21,21.4l-2.7-.723a1.5,1.5,0,0,0-1.836,1.837l.722,2.7-2.65.71a1.5,1.5,0,0,0-.673,2.509l2.152,2.152c0,.011,0,.022,0,.033l-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6L20.226,41l-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3-2.249,1.3a1.5,1.5,0,0,0,0,2.6l2.249,1.3A10.389,10.389,0,0,0,30.615,103.34H92.95A10.389,10.389,0,0,0,103.34,92.95V51.393L66.967,49.12a5.53,5.53,0,0,1,0-11.038" transform="translate(-9.836 -17.226)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_43" data-name="Path 43" d="M143,163.779h15.584V143H143Z" transform="translate(-70.275 -77.665)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_44" data-name="Path 44" d="M173.779,148.389a2.582,2.582,0,0,0-.332.033c-.02-.078-.038-.156-.06-.234a2.594,2.594,0,1,0-2.567-4.455q-.086-.088-.174-.175a2.593,2.593,0,1,0-4.461-2.569c-.077-.022-.154-.04-.231-.06a2.6,2.6,0,1,0-5.128,0c-.077.02-.154.038-.231.06a2.594,2.594,0,1,0-4.461,2.569,10.384,10.384,0,1,0,17.314,9.992,2.592,2.592,0,1,0,.332-5.161" transform="translate(-75.08 -75.262)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_45" data-name="Path 45" d="M153,113.389h15.584V103H153Z" transform="translate(-75.08 -58.444)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_46" data-name="Path 46" d="M183.389,108.944a1.3,1.3,0,1,0,0-2.6,1.336,1.336,0,0,0-.166.017c-.01-.039-.019-.078-.03-.117a1.3,1.3,0,0,0-.5-2.5,1.285,1.285,0,0,0-.783.269q-.043-.044-.087-.087a1.285,1.285,0,0,0,.263-.776,1.3,1.3,0,0,0-2.493-.509,5.195,5.195,0,1,0,0,10,1.3,1.3,0,0,0,2.493-.509,1.285,1.285,0,0,0-.263-.776q.044-.043.087-.087a1.285,1.285,0,0,0,.783.269,1.3,1.3,0,0,0,.5-2.5c.011-.038.02-.078.03-.117a1.337,1.337,0,0,0,.166.017" transform="translate(-84.691 -57.894)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_47" data-name="Path 47" d="M52.188,48.292a1.3,1.3,0,0,1-1.3-1.3,3.9,3.9,0,0,0-7.792,0,1.3,1.3,0,1,1-2.6,0,6.493,6.493,0,0,1,12.987,0,1.3,1.3,0,0,1-1.3,1.3" transform="translate(-21.02 -28.41)" fill-rule="evenodd"/>
<path id="Path_48" data-name="Path 48" d="M103,139.752h31.168a10.389,10.389,0,0,0,10.389-10.389V93H113.389A10.389,10.389,0,0,0,103,103.389Z" transform="translate(-51.054 -53.638)" fill="#ffff50" fill-rule="evenodd"/>
<path id="Path_49" data-name="Path 49" d="M141.1,94.017H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m0,10.389H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m0,10.389H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m0-25.877H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m0,10.293H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m0,10.389H115.106a.519.519,0,1,1,0-1.039H141.1a.519.519,0,0,1,0,1.039m7.782-47.993c-.006,0-.011,0-.018,0-1.605.055-2.365,1.66-3.035,3.077-.7,1.48-1.24,2.443-2.126,2.414-.981-.035-1.542-1.144-2.137-2.317-.683-1.347-1.462-2.876-3.1-2.819-1.582.054-2.344,1.451-3.017,2.684-.715,1.313-1.2,2.112-2.141,2.075-1-.036-1.533-.938-2.149-1.981-.686-1.162-1.479-2.467-3.084-2.423-1.555.053-2.319,1.239-2.994,2.286-.713,1.106-1.213,1.781-2.164,1.741-1.025-.036-1.554-.784-2.167-1.65-.688-.973-1.463-2.074-3.062-2.021a3.815,3.815,0,0,0-2.959,1.879c-.64.812-1.14,1.456-2.2,1.415a.52.52,0,0,0-.037,1.039,3.588,3.588,0,0,0,3.05-1.811c.611-.777,1.139-1.448,2.178-1.483,1-.043,1.47.579,2.179,1.582.674.953,1.438,2.033,2.977,2.089,1.612.054,2.387-1.151,3.074-2.217.614-.953,1.144-1.775,2.156-1.81.931-.035,1.438.7,2.153,1.912.674,1.141,1.437,2.434,3.006,2.491,1.623.056,2.407-1.361,3.09-2.616.592-1.085,1.15-2.109,2.14-2.143.931-.022,1.417.829,2.135,2.249.671,1.326,1.432,2.828,3.026,2.886l.088,0c1.592,0,2.347-1.6,3.015-3.01.592-1.252,1.152-2.431,2.113-2.479Z" transform="translate(-55.378 -38.552)" fill-rule="evenodd"/>
<path id="Path_50" data-name="Path 50" d="M83,163.779h20.779V143H83Z" transform="translate(-41.443 -77.665)" fill="#3ecc5f" fill-rule="evenodd"/>
<g id="Group_8" data-name="Group 8" transform="matrix(0.966, -0.259, 0.259, 0.966, 51.971, 43.3)">
<rect id="Rectangle_3" data-name="Rectangle 3" width="43.906" height="17.333" rx="2" transform="translate(0 0)" fill="#d8d8d8"/>
<g id="Group_2" data-name="Group 2" transform="translate(0.728 10.948)">
<rect id="Rectangle_4" data-name="Rectangle 4" width="2.537" height="2.537" rx="1" transform="translate(7.985 0)" fill="#4a4a4a"/>
<rect id="Rectangle_5" data-name="Rectangle 5" width="2.537" height="2.537" rx="1" transform="translate(10.991 0)" fill="#4a4a4a"/>
<rect id="Rectangle_6" data-name="Rectangle 6" width="2.537" height="2.537" rx="1" transform="translate(13.997 0)" fill="#4a4a4a"/>
<rect id="Rectangle_7" data-name="Rectangle 7" width="2.537" height="2.537" rx="1" transform="translate(17.003 0)" fill="#4a4a4a"/>
<rect id="Rectangle_8" data-name="Rectangle 8" width="2.537" height="2.537" rx="1" transform="translate(20.009 0)" fill="#4a4a4a"/>
<rect id="Rectangle_9" data-name="Rectangle 9" width="2.537" height="2.537" rx="1" transform="translate(23.015 0)" fill="#4a4a4a"/>
<rect id="Rectangle_10" data-name="Rectangle 10" width="2.537" height="2.537" rx="1" transform="translate(26.021 0)" fill="#4a4a4a"/>
<rect id="Rectangle_11" data-name="Rectangle 11" width="2.537" height="2.537" rx="1" transform="translate(29.028 0)" fill="#4a4a4a"/>
<rect id="Rectangle_12" data-name="Rectangle 12" width="2.537" height="2.537" rx="1" transform="translate(32.034 0)" fill="#4a4a4a"/>
<path id="Path_51" data-name="Path 51" d="M.519,0H6.9A.519.519,0,0,1,7.421.52v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.017V.519A.519.519,0,0,1,.519,0ZM35.653,0h6.383a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H35.652a.519.519,0,0,1-.519-.519V.519A.519.519,0,0,1,35.652,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
</g>
<g id="Group_3" data-name="Group 3" transform="translate(0.728 4.878)">
<path id="Path_52" data-name="Path 52" d="M.519,0H2.956a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.017V.519A.519.519,0,0,1,.519,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_13" data-name="Rectangle 13" width="2.537" height="2.537" rx="1" transform="translate(3.945 0)" fill="#4a4a4a"/>
<rect id="Rectangle_14" data-name="Rectangle 14" width="2.537" height="2.537" rx="1" transform="translate(6.951 0)" fill="#4a4a4a"/>
<rect id="Rectangle_15" data-name="Rectangle 15" width="2.537" height="2.537" rx="1" transform="translate(9.958 0)" fill="#4a4a4a"/>
<rect id="Rectangle_16" data-name="Rectangle 16" width="2.537" height="2.537" rx="1" transform="translate(12.964 0)" fill="#4a4a4a"/>
<rect id="Rectangle_17" data-name="Rectangle 17" width="2.537" height="2.537" rx="1" transform="translate(15.97 0)" fill="#4a4a4a"/>
<rect id="Rectangle_18" data-name="Rectangle 18" width="2.537" height="2.537" rx="1" transform="translate(18.976 0)" fill="#4a4a4a"/>
<rect id="Rectangle_19" data-name="Rectangle 19" width="2.537" height="2.537" rx="1" transform="translate(21.982 0)" fill="#4a4a4a"/>
<rect id="Rectangle_20" data-name="Rectangle 20" width="2.537" height="2.537" rx="1" transform="translate(24.988 0)" fill="#4a4a4a"/>
<rect id="Rectangle_21" data-name="Rectangle 21" width="2.537" height="2.537" rx="1" transform="translate(27.994 0)" fill="#4a4a4a"/>
<rect id="Rectangle_22" data-name="Rectangle 22" width="2.537" height="2.537" rx="1" transform="translate(31 0)" fill="#4a4a4a"/>
<rect id="Rectangle_23" data-name="Rectangle 23" width="2.537" height="2.537" rx="1" transform="translate(34.006 0)" fill="#4a4a4a"/>
<rect id="Rectangle_24" data-name="Rectangle 24" width="2.537" height="2.537" rx="1" transform="translate(37.012 0)" fill="#4a4a4a"/>
<rect id="Rectangle_25" data-name="Rectangle 25" width="2.537" height="2.537" rx="1" transform="translate(40.018 0)" fill="#4a4a4a"/>
</g>
<g id="Group_4" data-name="Group 4" transform="translate(43.283 4.538) rotate(180)">
<path id="Path_53" data-name="Path 53" d="M.519,0H2.956a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.017V.519A.519.519,0,0,1,.519,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_26" data-name="Rectangle 26" width="2.537" height="2.537" rx="1" transform="translate(3.945 0)" fill="#4a4a4a"/>
<rect id="Rectangle_27" data-name="Rectangle 27" width="2.537" height="2.537" rx="1" transform="translate(6.951 0)" fill="#4a4a4a"/>
<rect id="Rectangle_28" data-name="Rectangle 28" width="2.537" height="2.537" rx="1" transform="translate(9.958 0)" fill="#4a4a4a"/>
<rect id="Rectangle_29" data-name="Rectangle 29" width="2.537" height="2.537" rx="1" transform="translate(12.964 0)" fill="#4a4a4a"/>
<rect id="Rectangle_30" data-name="Rectangle 30" width="2.537" height="2.537" rx="1" transform="translate(15.97 0)" fill="#4a4a4a"/>
<rect id="Rectangle_31" data-name="Rectangle 31" width="2.537" height="2.537" rx="1" transform="translate(18.976 0)" fill="#4a4a4a"/>
<rect id="Rectangle_32" data-name="Rectangle 32" width="2.537" height="2.537" rx="1" transform="translate(21.982 0)" fill="#4a4a4a"/>
<rect id="Rectangle_33" data-name="Rectangle 33" width="2.537" height="2.537" rx="1" transform="translate(24.988 0)" fill="#4a4a4a"/>
<rect id="Rectangle_34" data-name="Rectangle 34" width="2.537" height="2.537" rx="1" transform="translate(27.994 0)" fill="#4a4a4a"/>
<rect id="Rectangle_35" data-name="Rectangle 35" width="2.537" height="2.537" rx="1" transform="translate(31.001 0)" fill="#4a4a4a"/>
<rect id="Rectangle_36" data-name="Rectangle 36" width="2.537" height="2.537" rx="1" transform="translate(34.007 0)" fill="#4a4a4a"/>
<rect id="Rectangle_37" data-name="Rectangle 37" width="2.537" height="2.537" rx="1" transform="translate(37.013 0)" fill="#4a4a4a"/>
<rect id="Rectangle_38" data-name="Rectangle 38" width="2.537" height="2.537" rx="1" transform="translate(40.018 0)" fill="#4a4a4a"/>
<rect id="Rectangle_39" data-name="Rectangle 39" width="2.537" height="2.537" rx="1" transform="translate(3.945 0)" fill="#4a4a4a"/>
<rect id="Rectangle_40" data-name="Rectangle 40" width="2.537" height="2.537" rx="1" transform="translate(6.951 0)" fill="#4a4a4a"/>
<rect id="Rectangle_41" data-name="Rectangle 41" width="2.537" height="2.537" rx="1" transform="translate(9.958 0)" fill="#4a4a4a"/>
<rect id="Rectangle_42" data-name="Rectangle 42" width="2.537" height="2.537" rx="1" transform="translate(12.964 0)" fill="#4a4a4a"/>
<rect id="Rectangle_43" data-name="Rectangle 43" width="2.537" height="2.537" rx="1" transform="translate(15.97 0)" fill="#4a4a4a"/>
<rect id="Rectangle_44" data-name="Rectangle 44" width="2.537" height="2.537" rx="1" transform="translate(18.976 0)" fill="#4a4a4a"/>
<rect id="Rectangle_45" data-name="Rectangle 45" width="2.537" height="2.537" rx="1" transform="translate(21.982 0)" fill="#4a4a4a"/>
<rect id="Rectangle_46" data-name="Rectangle 46" width="2.537" height="2.537" rx="1" transform="translate(24.988 0)" fill="#4a4a4a"/>
<rect id="Rectangle_47" data-name="Rectangle 47" width="2.537" height="2.537" rx="1" transform="translate(27.994 0)" fill="#4a4a4a"/>
<rect id="Rectangle_48" data-name="Rectangle 48" width="2.537" height="2.537" rx="1" transform="translate(31.001 0)" fill="#4a4a4a"/>
<rect id="Rectangle_49" data-name="Rectangle 49" width="2.537" height="2.537" rx="1" transform="translate(34.007 0)" fill="#4a4a4a"/>
<rect id="Rectangle_50" data-name="Rectangle 50" width="2.537" height="2.537" rx="1" transform="translate(37.013 0)" fill="#4a4a4a"/>
<rect id="Rectangle_51" data-name="Rectangle 51" width="2.537" height="2.537" rx="1" transform="translate(40.018 0)" fill="#4a4a4a"/>
</g>
<g id="Group_6" data-name="Group 6" transform="translate(0.728 7.883)">
<path id="Path_54" data-name="Path 54" d="M.519,0h3.47a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.017V.52A.519.519,0,0,1,.519,0Z" transform="translate(0 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<g id="Group_5" data-name="Group 5" transform="translate(5.073 0)">
<rect id="Rectangle_52" data-name="Rectangle 52" width="2.537" height="2.537" rx="1" transform="translate(0 0)" fill="#4a4a4a"/>
<rect id="Rectangle_53" data-name="Rectangle 53" width="2.537" height="2.537" rx="1" transform="translate(3.006 0)" fill="#4a4a4a"/>
<rect id="Rectangle_54" data-name="Rectangle 54" width="2.537" height="2.537" rx="1" transform="translate(6.012 0)" fill="#4a4a4a"/>
<rect id="Rectangle_55" data-name="Rectangle 55" width="2.537" height="2.537" rx="1" transform="translate(9.018 0)" fill="#4a4a4a"/>
<rect id="Rectangle_56" data-name="Rectangle 56" width="2.537" height="2.537" rx="1" transform="translate(12.025 0)" fill="#4a4a4a"/>
<rect id="Rectangle_57" data-name="Rectangle 57" width="2.537" height="2.537" rx="1" transform="translate(15.031 0)" fill="#4a4a4a"/>
<rect id="Rectangle_58" data-name="Rectangle 58" width="2.537" height="2.537" rx="1" transform="translate(18.037 0)" fill="#4a4a4a"/>
<rect id="Rectangle_59" data-name="Rectangle 59" width="2.537" height="2.537" rx="1" transform="translate(21.042 0)" fill="#4a4a4a"/>
<rect id="Rectangle_60" data-name="Rectangle 60" width="2.537" height="2.537" rx="1" transform="translate(24.049 0)" fill="#4a4a4a"/>
<rect id="Rectangle_61" data-name="Rectangle 61" width="2.537" height="2.537" rx="1" transform="translate(27.055 0)" fill="#4a4a4a"/>
<rect id="Rectangle_62" data-name="Rectangle 62" width="2.537" height="2.537" rx="1" transform="translate(30.061 0)" fill="#4a4a4a"/>
</g>
<path id="Path_55" data-name="Path 55" d="M.52,0H3.8a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.017V.52A.519.519,0,0,1,.519,0Z" transform="translate(38.234 0)" fill="#4a4a4a" fill-rule="evenodd"/>
</g>
<g id="Group_7" data-name="Group 7" transform="translate(0.728 14.084)">
<rect id="Rectangle_63" data-name="Rectangle 63" width="2.537" height="2.537" rx="1" transform="translate(0 0)" fill="#4a4a4a"/>
<rect id="Rectangle_64" data-name="Rectangle 64" width="2.537" height="2.537" rx="1" transform="translate(3.006 0)" fill="#4a4a4a"/>
<rect id="Rectangle_65" data-name="Rectangle 65" width="2.537" height="2.537" rx="1" transform="translate(6.012 0)" fill="#4a4a4a"/>
<rect id="Rectangle_66" data-name="Rectangle 66" width="2.537" height="2.537" rx="1" transform="translate(9.018 0)" fill="#4a4a4a"/>
<path id="Path_56" data-name="Path 56" d="M.519,0H14.981A.519.519,0,0,1,15.5.519v1.5a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,2.018V.519A.519.519,0,0,1,.519,0Zm15.97,0h1.874a.519.519,0,0,1,.519.519v1.5a.519.519,0,0,1-.519.519H16.489a.519.519,0,0,1-.519-.519V.519A.519.519,0,0,1,16.489,0Z" transform="translate(12.024 0)" fill="#4a4a4a" fill-rule="evenodd"/>
<rect id="Rectangle_67" data-name="Rectangle 67" width="2.537" height="2.537" rx="1" transform="translate(31.376 0)" fill="#4a4a4a"/>
<rect id="Rectangle_68" data-name="Rectangle 68" width="2.537" height="2.537" rx="1" transform="translate(34.382 0)" fill="#4a4a4a"/>
<rect id="Rectangle_69" data-name="Rectangle 69" width="2.537" height="2.537" rx="1" transform="translate(40.018 0)" fill="#4a4a4a"/>
<path id="Path_57" data-name="Path 57" d="M2.537,0V.561a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,.561V0Z" transform="translate(39.736 1.08) rotate(180)" fill="#4a4a4a"/>
<path id="Path_58" data-name="Path 58" d="M2.537,0V.561a.519.519,0,0,1-.519.519H.519A.519.519,0,0,1,0,.561V0Z" transform="translate(37.2 1.456)" fill="#4a4a4a"/>
</g>
<rect id="Rectangle_70" data-name="Rectangle 70" width="42.273" height="1.127" rx="0.564" transform="translate(0.915 0.556)" fill="#4a4a4a"/>
<rect id="Rectangle_71" data-name="Rectangle 71" width="2.37" height="0.752" rx="0.376" transform="translate(1.949 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_72" data-name="Rectangle 72" width="2.37" height="0.752" rx="0.376" transform="translate(5.193 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_73" data-name="Rectangle 73" width="2.37" height="0.752" rx="0.376" transform="translate(7.688 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_74" data-name="Rectangle 74" width="2.37" height="0.752" rx="0.376" transform="translate(10.183 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_75" data-name="Rectangle 75" width="2.37" height="0.752" rx="0.376" transform="translate(12.679 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_76" data-name="Rectangle 76" width="2.37" height="0.752" rx="0.376" transform="translate(15.797 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_77" data-name="Rectangle 77" width="2.37" height="0.752" rx="0.376" transform="translate(18.292 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_78" data-name="Rectangle 78" width="2.37" height="0.752" rx="0.376" transform="translate(20.788 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_79" data-name="Rectangle 79" width="2.37" height="0.752" rx="0.376" transform="translate(23.283 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_80" data-name="Rectangle 80" width="2.37" height="0.752" rx="0.376" transform="translate(26.402 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_81" data-name="Rectangle 81" width="2.37" height="0.752" rx="0.376" transform="translate(28.897 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_82" data-name="Rectangle 82" width="2.37" height="0.752" rx="0.376" transform="translate(31.393 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_83" data-name="Rectangle 83" width="2.37" height="0.752" rx="0.376" transform="translate(34.512 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_84" data-name="Rectangle 84" width="2.37" height="0.752" rx="0.376" transform="translate(37.007 0.744)" fill="#d8d8d8" opacity="0.136"/>
<rect id="Rectangle_85" data-name="Rectangle 85" width="2.37" height="0.752" rx="0.376" transform="translate(39.502 0.744)" fill="#d8d8d8" opacity="0.136"/>
</g>
<path id="Path_59" data-name="Path 59" d="M123.779,148.389a2.583,2.583,0,0,0-.332.033c-.02-.078-.038-.156-.06-.234a2.594,2.594,0,1,0-2.567-4.455q-.086-.088-.174-.175a2.593,2.593,0,1,0-4.461-2.569c-.077-.022-.154-.04-.231-.06a2.6,2.6,0,1,0-5.128,0c-.077.02-.154.038-.231.06a2.594,2.594,0,1,0-4.461,2.569,10.384,10.384,0,1,0,17.314,9.992,2.592,2.592,0,1,0,.332-5.161" transform="translate(-51.054 -75.262)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_60" data-name="Path 60" d="M83,113.389h20.779V103H83Z" transform="translate(-41.443 -58.444)" fill="#3ecc5f" fill-rule="evenodd"/>
<path id="Path_61" data-name="Path 61" d="M123.389,108.944a1.3,1.3,0,1,0,0-2.6,1.338,1.338,0,0,0-.166.017c-.01-.039-.019-.078-.03-.117a1.3,1.3,0,0,0-.5-2.5,1.285,1.285,0,0,0-.783.269q-.043-.044-.087-.087a1.285,1.285,0,0,0,.263-.776,1.3,1.3,0,0,0-2.493-.509,5.195,5.195,0,1,0,0,10,1.3,1.3,0,0,0,2.493-.509,1.285,1.285,0,0,0-.263-.776q.044-.043.087-.087a1.285,1.285,0,0,0,.783.269,1.3,1.3,0,0,0,.5-2.5c.011-.038.02-.078.03-.117a1.335,1.335,0,0,0,.166.017" transform="translate(-55.859 -57.894)" fill="#44d860" fill-rule="evenodd"/>
<path id="Path_62" data-name="Path 62" d="M141.8,38.745a1.41,1.41,0,0,1-.255-.026,1.309,1.309,0,0,1-.244-.073,1.349,1.349,0,0,1-.224-.119,1.967,1.967,0,0,1-.2-.161,1.52,1.52,0,0,1-.161-.2,1.282,1.282,0,0,1-.218-.722,1.41,1.41,0,0,1,.026-.255,1.5,1.5,0,0,1,.072-.244,1.364,1.364,0,0,1,.12-.223,1.252,1.252,0,0,1,.358-.358,1.349,1.349,0,0,1,.224-.119,1.309,1.309,0,0,1,.244-.073,1.2,1.2,0,0,1,.509,0,1.262,1.262,0,0,1,.468.192,1.968,1.968,0,0,1,.2.161,1.908,1.908,0,0,1,.161.2,1.322,1.322,0,0,1,.12.223,1.361,1.361,0,0,1,.1.5,1.317,1.317,0,0,1-.379.919,1.968,1.968,0,0,1-.2.161,1.346,1.346,0,0,1-.223.119,1.332,1.332,0,0,1-.5.1m10.389-.649a1.326,1.326,0,0,1-.92-.379,1.979,1.979,0,0,1-.161-.2,1.282,1.282,0,0,1-.218-.722,1.326,1.326,0,0,1,.379-.919,1.967,1.967,0,0,1,.2-.161,1.351,1.351,0,0,1,.224-.119,1.308,1.308,0,0,1,.244-.073,1.2,1.2,0,0,1,.509,0,1.262,1.262,0,0,1,.468.192,1.967,1.967,0,0,1,.2.161,1.326,1.326,0,0,1,.379.919,1.461,1.461,0,0,1-.026.255,1.323,1.323,0,0,1-.073.244,1.847,1.847,0,0,1-.119.223,1.911,1.911,0,0,1-.161.2,1.967,1.967,0,0,1-.2.161,1.294,1.294,0,0,1-.722.218" transform="translate(-69.074 -26.006)" fill-rule="evenodd"/>
</g>
<g id="React-icon" transform="translate(906.3 541.56)">
<path id="Path_330" data-name="Path 330" d="M263.668,117.179c0-5.827-7.3-11.35-18.487-14.775,2.582-11.4,1.434-20.477-3.622-23.382a7.861,7.861,0,0,0-4.016-1v4a4.152,4.152,0,0,1,2.044.466c2.439,1.4,3.5,6.724,2.672,13.574-.2,1.685-.52,3.461-.914,5.272a86.9,86.9,0,0,0-11.386-1.954,87.469,87.469,0,0,0-7.459-8.965c5.845-5.433,11.332-8.41,15.062-8.41V78h0c-4.931,0-11.386,3.514-17.913,9.611-6.527-6.061-12.982-9.539-17.913-9.539v4c3.712,0,9.216,2.959,15.062,8.356a84.687,84.687,0,0,0-7.405,8.947,83.732,83.732,0,0,0-11.4,1.972c-.412-1.793-.717-3.532-.932-5.2-.843-6.85.2-12.175,2.618-13.592a3.991,3.991,0,0,1,2.062-.466v-4h0a8,8,0,0,0-4.052,1c-5.039,2.9-6.168,11.96-3.568,23.328-11.153,3.443-18.415,8.947-18.415,14.757,0,5.828,7.3,11.35,18.487,14.775-2.582,11.4-1.434,20.477,3.622,23.382a7.882,7.882,0,0,0,4.034,1c4.931,0,11.386-3.514,17.913-9.611,6.527,6.061,12.982,9.539,17.913,9.539a8,8,0,0,0,4.052-1c5.039-2.9,6.168-11.96,3.568-23.328C256.406,128.511,263.668,122.988,263.668,117.179Zm-23.346-11.96c-.663,2.313-1.488,4.7-2.421,7.083-.735-1.434-1.506-2.869-2.349-4.3-.825-1.434-1.7-2.833-2.582-4.2C235.517,104.179,237.974,104.645,240.323,105.219Zm-8.212,19.1c-1.4,2.421-2.833,4.716-4.321,6.85-2.672.233-5.379.359-8.1.359-2.708,0-5.415-.126-8.069-.341q-2.232-3.2-4.339-6.814-2.044-3.523-3.73-7.136c1.112-2.4,2.367-4.805,3.712-7.154,1.4-2.421,2.833-4.716,4.321-6.85,2.672-.233,5.379-.359,8.1-.359,2.708,0,5.415.126,8.069.341q2.232,3.2,4.339,6.814,2.044,3.523,3.73,7.136C234.692,119.564,233.455,121.966,232.11,124.315Zm5.792-2.331c.968,2.4,1.793,4.805,2.474,7.136-2.349.574-4.823,1.058-7.387,1.434.879-1.381,1.757-2.8,2.582-4.25C236.4,124.871,237.167,123.419,237.9,121.984ZM219.72,141.116a73.921,73.921,0,0,1-4.985-5.738c1.614.072,3.263.126,4.931.126,1.685,0,3.353-.036,4.985-.126A69.993,69.993,0,0,1,219.72,141.116ZM206.38,130.555c-2.546-.377-5-.843-7.352-1.417.663-2.313,1.488-4.7,2.421-7.083.735,1.434,1.506,2.869,2.349,4.3S205.5,129.192,206.38,130.555ZM219.63,93.241a73.924,73.924,0,0,1,4.985,5.738c-1.614-.072-3.263-.126-4.931-.126-1.686,0-3.353.036-4.985.126A69.993,69.993,0,0,1,219.63,93.241ZM206.362,103.8c-.879,1.381-1.757,2.8-2.582,4.25-.825,1.434-1.6,2.869-2.331,4.3-.968-2.4-1.793-4.805-2.474-7.136C201.323,104.663,203.8,104.179,206.362,103.8Zm-16.227,22.449c-6.348-2.708-10.454-6.258-10.454-9.073s4.106-6.383,10.454-9.073c1.542-.663,3.228-1.255,4.967-1.811a86.122,86.122,0,0,0,4.034,10.92,84.9,84.9,0,0,0-3.981,10.866C193.38,127.525,191.694,126.915,190.134,126.252Zm9.647,25.623c-2.439-1.4-3.5-6.724-2.672-13.574.2-1.686.52-3.461.914-5.272a86.9,86.9,0,0,0,11.386,1.954,87.465,87.465,0,0,0,7.459,8.965c-5.845,5.433-11.332,8.41-15.062,8.41A4.279,4.279,0,0,1,199.781,151.875Zm42.532-13.663c.843,6.85-.2,12.175-2.618,13.592a3.99,3.99,0,0,1-2.062.466c-3.712,0-9.216-2.959-15.062-8.356a84.689,84.689,0,0,0,7.405-8.947,83.731,83.731,0,0,0,11.4-1.972A50.194,50.194,0,0,1,242.313,138.212Zm6.9-11.96c-1.542.663-3.228,1.255-4.967,1.811a86.12,86.12,0,0,0-4.034-10.92,84.9,84.9,0,0,0,3.981-10.866c1.775.556,3.461,1.165,5.039,1.829,6.348,2.708,10.454,6.258,10.454,9.073C259.67,119.994,255.564,123.562,249.216,126.252Z" fill="#61dafb"/>
<path id="Path_331" data-name="Path 331" d="M320.8,78.4Z" transform="translate(-119.082 -0.328)" fill="#61dafb"/>
<circle id="Ellipse_112" data-name="Ellipse 112" cx="8.194" cy="8.194" r="8.194" transform="translate(211.472 108.984)" fill="#61dafb"/>
<path id="Path_332" data-name="Path 332" d="M520.5,78.1Z" transform="translate(-282.975 -0.082)" fill="#61dafb"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -0,0 +1,40 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1129" height="663" viewBox="0 0 1129 663">
<title>Focus on What Matters</title>
<circle cx="321" cy="321" r="321" fill="#f2f2f2" />
<ellipse cx="559" cy="635.49998" rx="514" ry="27.50002" fill="#3f3d56" />
<ellipse cx="558" cy="627" rx="460" ry="22" opacity="0.2" />
<rect x="131" y="152.5" width="840" height="50" fill="#3f3d56" />
<path d="M166.5,727.3299A21.67009,21.67009,0,0,0,188.1701,749H984.8299A21.67009,21.67009,0,0,0,1006.5,727.3299V296h-840Z" transform="translate(-35.5 -118.5)" fill="#3f3d56" />
<path d="M984.8299,236H188.1701A21.67009,21.67009,0,0,0,166.5,257.6701V296h840V257.6701A21.67009,21.67009,0,0,0,984.8299,236Z" transform="translate(-35.5 -118.5)" fill="#3f3d56" />
<path d="M984.8299,236H188.1701A21.67009,21.67009,0,0,0,166.5,257.6701V296h840V257.6701A21.67009,21.67009,0,0,0,984.8299,236Z" transform="translate(-35.5 -118.5)" opacity="0.2" />
<circle cx="181" cy="147.5" r="13" fill="#3f3d56" />
<circle cx="217" cy="147.5" r="13" fill="#3f3d56" />
<circle cx="253" cy="147.5" r="13" fill="#3f3d56" />
<rect x="168" y="213.5" width="337" height="386" rx="5.33505" fill="#606060" />
<rect x="603" y="272.5" width="284" height="22" rx="5.47638" fill="#2e8555" />
<rect x="537" y="352.5" width="416" height="15" rx="5.47638" fill="#2e8555" />
<rect x="537" y="396.5" width="416" height="15" rx="5.47638" fill="#2e8555" />
<rect x="537" y="440.5" width="416" height="15" rx="5.47638" fill="#2e8555" />
<rect x="537" y="484.5" width="416" height="15" rx="5.47638" fill="#2e8555" />
<rect x="865" y="552.5" width="88" height="26" rx="7.02756" fill="#3ecc5f" />
<path d="M1088.60287,624.61594a30.11371,30.11371,0,0,0,3.98291-15.266c0-13.79652-8.54358-24.98081-19.08256-24.98081s-19.08256,11.18429-19.08256,24.98081a30.11411,30.11411,0,0,0,3.98291,15.266,31.248,31.248,0,0,0,0,30.53213,31.248,31.248,0,0,0,0,30.53208,31.248,31.248,0,0,0,0,30.53208,30.11408,30.11408,0,0,0-3.98291,15.266c0,13.79652,8.54353,24.98081,19.08256,24.98081s19.08256-11.18429,19.08256-24.98081a30.11368,30.11368,0,0,0-3.98291-15.266,31.248,31.248,0,0,0,0-30.53208,31.248,31.248,0,0,0,0-30.53208,31.248,31.248,0,0,0,0-30.53213Z" transform="translate(-35.5 -118.5)" fill="#3f3d56" />
<ellipse cx="1038.00321" cy="460.31783" rx="19.08256" ry="24.9808" fill="#3f3d56" />
<ellipse cx="1038.00321" cy="429.78574" rx="19.08256" ry="24.9808" fill="#3f3d56" />
<path d="M1144.93871,339.34489a91.61081,91.61081,0,0,0,7.10658-10.46092l-50.141-8.23491,54.22885.4033a91.566,91.566,0,0,0,1.74556-72.42605l-72.75449,37.74139,67.09658-49.32086a91.41255,91.41255,0,1,0-150.971,102.29805,91.45842,91.45842,0,0,0-10.42451,16.66946l65.0866,33.81447-69.40046-23.292a91.46011,91.46011,0,0,0,14.73837,85.83669,91.40575,91.40575,0,1,0,143.68892,0,91.41808,91.41808,0,0,0,0-113.02862Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M981.6885,395.8592a91.01343,91.01343,0,0,0,19.56129,56.51431,91.40575,91.40575,0,1,0,143.68892,0C1157.18982,436.82067,981.6885,385.60008,981.6885,395.8592Z" transform="translate(-35.5 -118.5)" opacity="0.1" />
<path d="M365.62,461.43628H477.094v45.12043H365.62Z" transform="translate(-35.5 -118.5)" fill="#fff" fill-rule="evenodd" />
<path d="M264.76252,608.74122a26.50931,26.50931,0,0,1-22.96231-13.27072,26.50976,26.50976,0,0,0,22.96231,39.81215H291.304V608.74122Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M384.17242,468.57061l92.92155-5.80726V449.49263a26.54091,26.54091,0,0,0-26.54143-26.54143H331.1161l-3.31768-5.74622a3.83043,3.83043,0,0,0-6.63536,0l-3.31768,5.74622-3.31767-5.74622a3.83043,3.83043,0,0,0-6.63536,0l-3.31768,5.74622L301.257,417.205a3.83043,3.83043,0,0,0-6.63536,0L291.304,422.9512c-.02919,0-.05573.004-.08625.004l-5.49674-5.49541a3.8293,3.8293,0,0,0-6.4071,1.71723l-1.81676,6.77338L270.607,424.1031a3.82993,3.82993,0,0,0-4.6912,4.69253l1.84463,6.89148-6.77072,1.81411a3.8315,3.8315,0,0,0-1.71988,6.40975l5.49673,5.49673c0,.02787-.004.05574-.004.08493l-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74621,3.31768L259.0163,466.081a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31767a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31767a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31768a3.83042,3.83042,0,0,0,0,6.63535l5.74622,3.31768-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768L259.0163,558.976a3.83042,3.83042,0,0,0,0,6.63535l5.74622,3.31768-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768-5.74622,3.31768a3.83042,3.83042,0,0,0,0,6.63535l5.74622,3.31768-5.74622,3.31768a3.83043,3.83043,0,0,0,0,6.63536l5.74622,3.31768A26.54091,26.54091,0,0,0,291.304,635.28265H450.55254A26.5409,26.5409,0,0,0,477.094,608.74122V502.5755l-92.92155-5.80727a14.12639,14.12639,0,0,1,0-28.19762" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M424.01111,635.28265h39.81214V582.19979H424.01111Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M490.36468,602.10586a6.60242,6.60242,0,0,0-.848.08493c-.05042-.19906-.09821-.39945-.15393-.59852A6.62668,6.62668,0,1,0,482.80568,590.21q-.2203-.22491-.44457-.44589a6.62391,6.62391,0,1,0-11.39689-6.56369c-.1964-.05575-.39414-.10218-.59056-.15262a6.63957,6.63957,0,1,0-13.10086,0c-.1964.05042-.39414.09687-.59056.15262a6.62767,6.62767,0,1,0-11.39688,6.56369,26.52754,26.52754,0,1,0,44.23127,25.52756,6.6211,6.6211,0,1,0,.848-13.18579" transform="translate(-35.5 -118.5)" fill="#44d860" fill-rule="evenodd" />
<path d="M437.28182,555.65836H477.094V529.11693H437.28182Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M490.36468,545.70532a3.31768,3.31768,0,0,0,0-6.63536,3.41133,3.41133,0,0,0-.42333.04247c-.02655-.09953-.04911-.19907-.077-.29859a3.319,3.319,0,0,0-1.278-6.37923,3.28174,3.28174,0,0,0-2.00122.68742q-.10947-.11346-.22294-.22295a3.282,3.282,0,0,0,.67149-1.98265,3.31768,3.31768,0,0,0-6.37-1.2992,13.27078,13.27078,0,1,0,0,25.54082,3.31768,3.31768,0,0,0,6.37-1.2992,3.282,3.282,0,0,0-.67149-1.98265q.11347-.10947.22294-.22294a3.28174,3.28174,0,0,0,2.00122.68742,3.31768,3.31768,0,0,0,1.278-6.37923c.02786-.0982.05042-.19907.077-.29859a3.41325,3.41325,0,0,0,.42333.04246" transform="translate(-35.5 -118.5)" fill="#44d860" fill-rule="evenodd" />
<path d="M317.84538,466.081a3.31768,3.31768,0,0,1-3.31767-3.31768,9.953,9.953,0,1,0-19.90608,0,3.31768,3.31768,0,1,1-6.63535,0,16.58839,16.58839,0,1,1,33.17678,0,3.31768,3.31768,0,0,1-3.31768,3.31768" transform="translate(-35.5 -118.5)" fill-rule="evenodd" />
<path d="M370.92825,635.28265h79.62429A26.5409,26.5409,0,0,0,477.094,608.74122v-92.895H397.46968a26.54091,26.54091,0,0,0-26.54143,26.54143Z" transform="translate(-35.5 -118.5)" fill="#ffff50" fill-rule="evenodd" />
<path d="M457.21444,556.98543H390.80778a1.32707,1.32707,0,0,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414m0,26.54143H390.80778a1.32707,1.32707,0,1,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414m0,26.54143H390.80778a1.32707,1.32707,0,1,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414m0-66.10674H390.80778a1.32707,1.32707,0,0,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414m0,26.29459H390.80778a1.32707,1.32707,0,0,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414m0,26.54143H390.80778a1.32707,1.32707,0,0,1,0-2.65414h66.40666a1.32707,1.32707,0,0,1,0,2.65414M477.094,474.19076c-.01592,0-.0292-.008-.04512-.00663-4.10064.13934-6.04083,4.24132-7.75274,7.86024-1.78623,3.78215-3.16771,6.24122-5.43171,6.16691-2.50685-.09024-3.94007-2.92222-5.45825-5.91874-1.74377-3.44243-3.73438-7.34667-7.91333-7.20069-4.04227.138-5.98907,3.70784-7.70631,6.857-1.82738,3.35484-3.07084,5.39455-5.46887,5.30033-2.55727-.09289-3.91619-2.39536-5.48877-5.06013-1.75306-2.96733-3.77951-6.30359-7.8775-6.18946-3.97326.13669-5.92537,3.16507-7.64791,5.83912-1.82207,2.82666-3.09872,4.5492-5.52725,4.447-2.61832-.09289-3.9706-2.00388-5.53522-4.21611-1.757-2.4856-3.737-5.299-7.82308-5.16231-3.88567.13271-5.83779,2.61434-7.559,4.80135-1.635,2.07555-2.9116,3.71846-5.61218,3.615a1.32793,1.32793,0,1,0-.09555,2.65414c4.00377.134,6.03154-2.38873,7.79257-4.6275,1.562-1.9853,2.91027-3.69855,5.56441-3.78879,2.55594-.10882,3.75429,1.47968,5.56707,4.04093,1.7212,2.43385,3.67465,5.19416,7.60545,5.33616,4.11789.138,6.09921-2.93946,7.8536-5.66261,1.56861-2.43385,2.92221-4.53461,5.50734-4.62352,2.37944-.08892,3.67466,1.79154,5.50072,4.885,1.72121,2.91557,3.67069,6.21865,7.67977,6.36463,4.14709.14332,6.14965-3.47693,7.89475-6.68181,1.51155-2.77092,2.93814-5.38791,5.46621-5.4755,2.37944-.05573,3.62025,2.11668,5.45558,5.74622,1.71459,3.388,3.65875,7.22591,7.73019,7.37321l.22429.004c4.06614,0,5.99571-4.08074,7.70364-7.68905,1.51154-3.19825,2.94211-6.21069,5.3972-6.33411Z" transform="translate(-35.5 -118.5)" fill-rule="evenodd" />
<path d="M344.38682,635.28265h53.08286V582.19979H344.38682Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M424.01111,602.10586a6.60242,6.60242,0,0,0-.848.08493c-.05042-.19906-.09821-.39945-.15394-.59852A6.62667,6.62667,0,1,0,416.45211,590.21q-.2203-.22491-.44458-.44589a6.62391,6.62391,0,1,0-11.39689-6.56369c-.1964-.05575-.39413-.10218-.59054-.15262a6.63957,6.63957,0,1,0-13.10084,0c-.19641.05042-.39414.09687-.59055.15262a6.62767,6.62767,0,1,0-11.39689,6.56369,26.52755,26.52755,0,1,0,44.2313,25.52756,6.6211,6.6211,0,1,0,.848-13.18579" transform="translate(-35.5 -118.5)" fill="#44d860" fill-rule="evenodd" />
<path d="M344.38682,555.65836h53.08286V529.11693H344.38682Z" transform="translate(-35.5 -118.5)" fill="#3ecc5f" fill-rule="evenodd" />
<path d="M410.74039,545.70532a3.31768,3.31768,0,1,0,0-6.63536,3.41133,3.41133,0,0,0-.42333.04247c-.02655-.09953-.04911-.19907-.077-.29859a3.319,3.319,0,0,0-1.278-6.37923,3.28174,3.28174,0,0,0-2.00122.68742q-.10947-.11346-.22294-.22295a3.282,3.282,0,0,0,.67149-1.98265,3.31768,3.31768,0,0,0-6.37-1.2992,13.27078,13.27078,0,1,0,0,25.54082,3.31768,3.31768,0,0,0,6.37-1.2992,3.282,3.282,0,0,0-.67149-1.98265q.11347-.10947.22294-.22294a3.28174,3.28174,0,0,0,2.00122.68742,3.31768,3.31768,0,0,0,1.278-6.37923c.02786-.0982.05042-.19907.077-.29859a3.41325,3.41325,0,0,0,.42333.04246" transform="translate(-35.5 -118.5)" fill="#44d860" fill-rule="evenodd" />
<path d="M424.01111,447.8338a3.60349,3.60349,0,0,1-.65028-.06636,3.34415,3.34415,0,0,1-.62372-.18579,3.44679,3.44679,0,0,1-.572-.30522,5.02708,5.02708,0,0,1-.50429-.4114,3.88726,3.88726,0,0,1-.41007-.50428,3.27532,3.27532,0,0,1-.55737-1.84463,3.60248,3.60248,0,0,1,.06636-.65027,3.82638,3.82638,0,0,1,.18447-.62373,3.48858,3.48858,0,0,1,.30656-.57064,3.197,3.197,0,0,1,.91436-.91568,3.44685,3.44685,0,0,1,.572-.30523,3.344,3.344,0,0,1,.62372-.18578,3.06907,3.06907,0,0,1,1.30053,0,3.22332,3.22332,0,0,1,1.19436.491,5.02835,5.02835,0,0,1,.50429.41139,4.8801,4.8801,0,0,1,.41139.50429,3.38246,3.38246,0,0,1,.30522.57064,3.47806,3.47806,0,0,1,.25215,1.274A3.36394,3.36394,0,0,1,426.36,446.865a5.02708,5.02708,0,0,1-.50429.4114,3.3057,3.3057,0,0,1-1.84463.55737m26.54143-1.65884a3.38754,3.38754,0,0,1-2.35024-.96877,5.04185,5.04185,0,0,1-.41007-.50428,3.27532,3.27532,0,0,1-.55737-1.84463,3.38659,3.38659,0,0,1,.96744-2.34892,5.02559,5.02559,0,0,1,.50429-.41139,3.44685,3.44685,0,0,1,.572-.30523,3.3432,3.3432,0,0,1,.62373-.18579,3.06952,3.06952,0,0,1,1.30052,0,3.22356,3.22356,0,0,1,1.19436.491,5.02559,5.02559,0,0,1,.50429.41139,3.38792,3.38792,0,0,1,.96876,2.34892,3.72635,3.72635,0,0,1-.06636.65026,3.37387,3.37387,0,0,1-.18579.62373,4.71469,4.71469,0,0,1-.30522.57064,4.8801,4.8801,0,0,1-.41139.50429,5.02559,5.02559,0,0,1-.50429.41139,3.30547,3.30547,0,0,1-1.84463.55737" transform="translate(-35.5 -118.5)" fill-rule="evenodd" />
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

18
extension/.eslintrc.json Normal file
View file

@ -0,0 +1,18 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}

6
extension/.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
.vscode/
node_modules/
out/
.vscode-test/
data/
src/client

11
extension/.vscodeignore Normal file
View file

@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
scripts/env/**

9
extension/CHANGELOG.md Normal file
View file

@ -0,0 +1,9 @@
# Change Log
All notable changes to the "continue" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release

5
extension/LICENSE.txt Normal file
View file

@ -0,0 +1,5 @@
/*******************************************************
* Copyright (C) 2023 Continue <nate@continue.dev>
*
* All rights reserved.
*******************************************************/

36
extension/README.md Normal file
View file

@ -0,0 +1,36 @@
# continue
Bug report to fix in 1/10th the time.
Our debugging assistant automatically handles tedious portions of the debugging process, such as:
- Fault localization
- Enumerating potential error sources
- Generating fixes
- Pulling in outside context
- Following data flows
- Parsing tracebacks
- Generate unit tests
- Generate docstrings
# Features
### Ask a Question
`cmd+shift+j` to open up a universal search bar, where you can ask questions of your codebase in natural language.
### Fault Localization
Either manually highlight code snippets you think are suspicious, or let us find them for you.
### Generate a Fix
Once Continue has code snippets to work with, it can generate a fix. Just click to accept or reject, or make the tweak you need.
### Stacktrace Parsing
Any stacktrace that appears in your VSCode terminal will be caught by us so we can immediately begin the debugging process. For small bugs that you might have quickly solved, we'll just speed up the process to be nearly instantaneous.
### Generate Unit Tests and Docstrings
Use `cmd+shift+i` to generate a unit test for the function surrounding your cursor position, and `cmd+shift+l` to generate a docstring.

View file

@ -0,0 +1,3 @@
{
"API_URL": "http://localhost:8000"
}

View file

@ -0,0 +1,3 @@
{
"API_URL": "https://basin.dev"
}

10
extension/examples/.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
# ignore secrets, virtual environments and typical python compilation artifacts
secrets.toml
# ignore basic python artifacts
.env
**/__pycache__/
**/*.py[cod]
**/*$py.class
# ignore duckdb
*.duckdb
*.wal

Some files were not shown because too many files have changed in this diff Show more