Skip to content

Commit

Permalink
Enforce non-interactive when prompt parameter is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
yorevs committed Aug 19, 2024
1 parent e8685b6 commit 25292f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/askai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _setup_arguments(self) -> None:
nargs="?")\
.option(
"prompt", "p", "prompt",
"specifies the query prompt file (not useful with interactive mode).",
"specifies the landing prompt file (not useful with interactive mode).",
nargs="?")\
.option(
"engine", "e", "engine",
Expand Down
1 change: 1 addition & 0 deletions src/main/askai/core/askai_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
self._ready: bool = False
self._query_prompt = query_prompt
self._query_string: QueryString = query_string if isinstance(query_string, str) else " ".join(query_string)
configs.is_interactive = configs.is_interactive if not query_prompt else False
self._startup()

def run(self) -> None:
Expand Down

0 comments on commit 25292f9

Please sign in to comment.