diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-09-16 23:17:59 -0700 | 
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-09-16 23:17:59 -0700 | 
| commit | c9c2fe681050745290f3ae4389a9ee7cff35fc91 (patch) | |
| tree | 823ce5fc1f3bab122b23d71392476e3dc632f9fc | |
| parent | 6a8c48f72c697865d8889fe528aba1ad930011b5 (diff) | |
| download | sncontinue-c9c2fe681050745290f3ae4389a9ee7cff35fc91.tar.gz sncontinue-c9c2fe681050745290f3ae4389a9ee7cff35fc91.tar.bz2 sncontinue-c9c2fe681050745290f3ae4389a9ee7cff35fc91.zip  | |
rename run_step_headless to run
| -rw-r--r-- | continuedev/src/continuedev/__main__.py | 8 | ||||
| -rw-r--r-- | continuedev/src/continuedev/headless/__init__.py | 9 | ||||
| -rw-r--r-- | extension/react-app/src/pages/gui.tsx | 20 | 
3 files changed, 23 insertions, 14 deletions
diff --git a/continuedev/src/continuedev/__main__.py b/continuedev/src/continuedev/__main__.py index efd62d64..52fb85b7 100644 --- a/continuedev/src/continuedev/__main__.py +++ b/continuedev/src/continuedev/__main__.py @@ -1,9 +1,8 @@ -import asyncio  from typing import Optional  import typer -from .headless import start_headless_session +from .headless import run  from .server.main import run_server  app = typer.Typer() @@ -19,10 +18,7 @@ def main(      headless: bool = typer.Option(False, help="Run in headless mode"),  ):      if headless: -        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)) +        run(config)      else:          run_server(port=port, host=host) diff --git a/continuedev/src/continuedev/headless/__init__.py b/continuedev/src/continuedev/headless/__init__.py index 27722ee7..fb2c9768 100644 --- a/continuedev/src/continuedev/headless/__init__.py +++ b/continuedev/src/continuedev/headless/__init__.py @@ -22,9 +22,12 @@ async def start_headless_session(      return await session_manager.new_session(ide, config=config) -def run_step_headless(step: Step): -    config = ContinueConfig() -    config.steps_on_startup = [step] +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)) diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx index 35531f8c..9f58c505 100644 --- a/extension/react-app/src/pages/gui.tsx +++ b/extension/react-app/src/pages/gui.tsx @@ -265,7 +265,10 @@ function GUI(props: GUIProps) {                    Continue's OpenAI API key. To keep using Continue, you can                    either use your own API key, or use a local LLM. To read more                    about the options, see our{" "} -                  <a href="https://continue.dev/docs/customization/models"> +                  <a +                    href="https://continue.dev/docs/customization/models" +                    target="_blank" +                  >                      documentation                    </a>                    . If you're just looking for fastest way to keep going, type @@ -433,6 +436,7 @@ function GUI(props: GUIProps) {                  <a                    style={{ color: "inherit" }}                    href="https://continue.dev/docs/troubleshooting" +                  target="_blank"                  >                    Troubleshooting help                  </a> @@ -462,13 +466,19 @@ function GUI(props: GUIProps) {                  cursor: "pointer",                  opacity: 0.7,                }} -              onClick={() => { -                postVscMessage("reloadWindow", {}); -              }}              > -              <u>Reload the window</u> +              <u> +                <a +                  style={{ color: "inherit" }} +                  href="https://continue.dev/docs/walkthroughs/manually-run-continue#recommended-use-the-continuedev-pypi-package" +                  target="_blank" +                > +                  Manually start server +                </a> +              </u>              </p>            </div> +            <div className="w-3/4 m-auto text-center text-xs">              {/* Tip: Drag the Continue logo from the far left of the window to the              right, then toggle Continue using option/alt+command+m. */}  | 
