Allow 'leann ask' to accept a positional question

This commit is contained in:
Andy Lee
2025-09-23 15:16:59 -07:00
parent db7ba27ff6
commit 47aeb85f82
3 changed files with 50 additions and 33 deletions

14
tests/test_cli_ask.py Normal file
View File

@@ -0,0 +1,14 @@
from leann.cli import LeannCLI
def test_cli_ask_accepts_positional_query(tmp_path, monkeypatch):
monkeypatch.chdir(tmp_path)
cli = LeannCLI()
parser = cli.create_parser()
args = parser.parse_args(["ask", "my-docs", "Where are prompts configured?"])
assert args.command == "ask"
assert args.index_name == "my-docs"
assert args.query == "Where are prompts configured?"