* refactor: ♻️ get rid of continuedev.src.continuedev structure * refactor: ♻️ switching back to server folder * feat: ✨ make config.py imports shorter * feat: 🔖 publish as pre-release vscode extension * refactor: ♻️ refactor and add more completion params to ui * build: 🏗️ download from preview S3
19 lines
580 B
Python
19 lines
580 B
Python
import asyncio
|
|
from typing import Union
|
|
|
|
from .core.config import ContinueConfig
|
|
from .core.main import Step
|
|
from .headless import start_headless_session
|
|
|
|
|
|
def run(step_or_config: Union[Step, ContinueConfig]):
|
|
if isinstance(step_or_config, ContinueConfig):
|
|
config = step_or_config
|
|
else:
|
|
config = ContinueConfig()
|
|
config.steps_on_startup = [step_or_config]
|
|
|
|
loop = asyncio.get_event_loop()
|
|
loop.run_until_complete(start_headless_session(config=config))
|
|
tasks = asyncio.all_tasks(loop)
|
|
loop.run_until_complete(asyncio.gather(*tasks))
|