Skip to content

Commit

Permalink
Improve cli startup speed (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
djcopley authored Sep 1, 2024
1 parent 3ba5413 commit fb85276
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shelloracle/shelloracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ async def shelloracle() -> None:
:returns: None
:raises KeyboardInterrupt: if the user presses CTRL+C
"""
config = get_config()
provider = get_provider(config.provider)()

if not (prompt := get_query_from_pipe()):
default_prompt = os.environ.get("SHOR_DEFAULT_PROMPT")
prompt = await prompt_user(default_prompt)
logger.info("user prompt: %s", prompt)

config = get_config()
provider = get_provider(config.provider)()

shell_command = ""
with create_app_session_from_tty(), patch_stdout(raw=True), spinner() as sp:
async for token in provider.generate(prompt):
Expand Down

0 comments on commit fb85276

Please sign in to comment.